havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8; 2.0.0-p648: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
skade has quit [Ping timeout: 276 seconds]
mondok has quit [Quit: Leaving]
ajf- has joined #ruby
emilford has joined #ruby
kobain has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
ruby[bot] has joined #ruby
emilford has quit [Ping timeout: 245 seconds]
victortyau has joined #ruby
lucasb has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
caffeinic has quit [Remote host closed the connection]
chouhoulis has joined #ruby
emilford has joined #ruby
mistermocha has joined #ruby
sandstrom has joined #ruby
janebootydoe has joined #ruby
beast_ has quit [Quit: Leaving]
akem has quit [Remote host closed the connection]
emilford has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 255 seconds]
blackgoat has quit [Read error: Connection reset by peer]
skade has joined #ruby
last_staff has quit [Quit: last_staff]
emilford has joined #ruby
hogetaro has quit [Read error: Connection reset by peer]
hogetaro has joined #ruby
blackgoat has joined #ruby
drocsid has joined #ruby
C0deMaver1ck has joined #ruby
C0deMaver1ck is now known as Guest69299
skade has quit [Ping timeout: 256 seconds]
victortyau has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
victortyau has joined #ruby
emilford has quit [Ping timeout: 276 seconds]
jottr has quit [Ping timeout: 276 seconds]
mistermocha has quit [Remote host closed the connection]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandstrom has quit [Quit: My computer has gone to sleep.]
Guest25647 has quit [Ping timeout: 272 seconds]
sandstrom has joined #ruby
emilford has joined #ruby
caffeinic has joined #ruby
Darmani has quit [Ping timeout: 252 seconds]
mfb2 has joined #ruby
jgt has joined #ruby
Jackneill has quit [Ping timeout: 255 seconds]
mfb2_ has joined #ruby
marcdel has quit [Ping timeout: 276 seconds]
northfurr has joined #ruby
emilford has quit [Ping timeout: 265 seconds]
symm- has quit [Ping timeout: 260 seconds]
wolffles has joined #ruby
mfb2 has quit [Ping timeout: 245 seconds]
cndiv has joined #ruby
usershell has joined #ruby
marcdel has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
drocsid has quit [Ping timeout: 250 seconds]
guacamole has joined #ruby
Nightmare is now known as HaythamKenway
emilford has joined #ruby
rwz__ has joined #ruby
victortyau has quit [Remote host closed the connection]
blur3d has quit [Quit: blur3d]
<norc_> dostoyevsky, I dont know. Lets figure it out.
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
victortyau has joined #ruby
cndiv has quit [Ping timeout: 260 seconds]
<norc_> asm>> def foo(); end; foo()
<ruby[bot]> norc_: I have disassembled your code, the result is at https://eval.in/503532
<norc_> asm>> -> { puts "foo" }.call()
<ruby[bot]> norc_: I have disassembled your code, the result is at https://eval.in/503533
krobzaur has joined #ruby
<norc_> dostoyevsky, looks like it does. :)
guacamole has quit [Client Quit]
mfb2_ has quit [Remote host closed the connection]
skade has joined #ruby
tuelz1 has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
norc_ has quit [Read error: Connection reset by peer]
norc__ has quit [Read error: Connection reset by peer]
<lucasb> this "asm>>" thing escapes backticks (`) ? can you try "asm>> `foo`" for me? :)
hogetaro has quit [Read error: Connection reset by peer]
usershell has quit [Remote host closed the connection]
tuelz1 has quit [Client Quit]
hogetaro has joined #ruby
sandstrom has joined #ruby
marcdel has quit [Ping timeout: 272 seconds]
emilford has joined #ruby
victortyau has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 264 seconds]
victortyau has joined #ruby
<dostoyevsky> thanks norc!
jam_ has joined #ruby
shellie_ has joined #ruby
caffeinic has quit [Remote host closed the connection]
emilford has quit [Ping timeout: 264 seconds]
lucasb has quit [Quit: leaving]
zenlot2 is now known as zenlot
northfurr has quit [Ping timeout: 240 seconds]
northfurr has joined #ruby
marcdel has joined #ruby
emilford has joined #ruby
marcdel has quit [Max SendQ exceeded]
marcdel has joined #ruby
marcdel has quit [Max SendQ exceeded]
marcdel has joined #ruby
justbleed has joined #ruby
guacamole has joined #ruby
guacamole has quit [Client Quit]
guacamole has joined #ruby
binaryplease has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
northfurr has quit [Read error: Connection reset by peer]
blackmes1 has joined #ruby
caffeinic has joined #ruby
hogetaro has quit [Read error: Connection reset by peer]
mfb2 has joined #ruby
hogetaro has joined #ruby
sandstrom has joined #ruby
howdoicomputer has joined #ruby
shellie_ has quit [Quit: hi ho silver away!]
diego1 has joined #ruby
mistermocha has joined #ruby
mfb2 has quit [Ping timeout: 255 seconds]
skade has quit [Quit: Computer has gone to sleep.]
lannonbr1 has quit [Quit: WeeChat 1.0.1]
lannonbr has joined #ruby
mfb2 has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diegoviola has quit [Ping timeout: 260 seconds]
howdoicomputer has quit [Ping timeout: 255 seconds]
diego1 is now known as diegoviola
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
mfb2 has quit [Remote host closed the connection]
peteyg has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
peteyg has joined #ruby
krz has joined #ruby
peteyg has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
mistermocha has quit [Remote host closed the connection]
B1n4r10 has joined #ruby
emilford has quit [Ping timeout: 264 seconds]
chouhoulis has quit [Ping timeout: 245 seconds]
Mokuluu has joined #ruby
hogetaro has quit [Read error: Connection reset by peer]
hogetaro has joined #ruby
<Ox0dea> dostoyevsky: Did you mean blocks?
pawnbox has quit [Ping timeout: 250 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
peteyg has joined #ruby
usershell has joined #ruby
emilford has joined #ruby
usershell has quit [Remote host closed the connection]
sandstrom has joined #ruby
<dostoyevsky> Ox0dea: yeah, blocks..
peteyg has quit [Read error: Connection reset by peer]
<Ox0dea> dostoyevsky: No, you have to invoke #set_trace_func with a Proc.
<bvbrandon> I’m having a serious issue :/ I have a form that isn’t saving any data and I can’t understand the issue
<bvbrandon> in the log I see the params comming through, then the SQL commits nil
marr has quit [Ping timeout: 260 seconds]
<dostoyevsky> Can I read the parameters of a block being called in set_trace_func?
peteyg has joined #ruby
Dimik has joined #ruby
fedexo has joined #ruby
emilford has quit [Ping timeout: 272 seconds]
skade has joined #ruby
<Ox0dea> dostoyevsky: https://eval.in/503574
CloCkWeRX has left #ruby [#ruby]
<Ox0dea> TracePoint is a lot nicer to work with than #set_trace_func.
<Ox0dea> And, as demonstrated, it makes it quite easy to get at the block parameters.
emilford has joined #ruby
arescorpio has joined #ruby
drocsid has joined #ruby
Limix has quit [Quit: Limix]
hogetaro has quit [Read error: Connection reset by peer]
jam_ has quit [Remote host closed the connection]
hogetaro has joined #ruby
northfurr has joined #ruby
emilford has quit [Ping timeout: 260 seconds]
<Ox0dea> This is fun. https://eval.in/503575
vishwa has joined #ruby
<bvbrandon> would anyone be willing to do a google hangout for an odd form isse I’m having?
<vishwa> How do you install a ruby gem fron github? I'm not on rails
sandstrom has quit [Quit: My computer has gone to sleep.]
Limix has joined #ruby
Limix has quit [Client Quit]
emilford has joined #ruby
sandstrom has joined #ruby
krobzaur has quit [Ping timeout: 276 seconds]
finisherr has quit [Quit: finisherr]
B1n4r10 has quit [Ping timeout: 240 seconds]
Limix has joined #ruby
Mokuluu has quit [Quit: Leaving]
Limix has quit [Client Quit]
Jardayn has quit [Read error: Connection reset by peer]
griffindy has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
vishwa has quit [Quit: leaving]
emilford has quit [Ping timeout: 245 seconds]
B1n4r10 has joined #ruby
oo7cat has joined #ruby
freudenshade has joined #ruby
marcdel has quit [Ping timeout: 264 seconds]
weemsledeux has joined #ruby
<freudenshade> When I run rake gem, I get a rake aborted!
<freudenshade> LoadError: cannot load such file -- bundler
<freudenshade> Error
<freudenshade> what does that mean?
emilford has joined #ruby
blackmes1 has quit [Ping timeout: 256 seconds]
nbdy has joined #ruby
usershell has joined #ruby
emilford has quit [Ping timeout: 265 seconds]
B1n4r10 has quit [Ping timeout: 255 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
sandstrom has joined #ruby
emilford has joined #ruby
usershell has quit [Ping timeout: 250 seconds]
hannelita has quit [Remote host closed the connection]
emilford has quit [Ping timeout: 245 seconds]
dlitvak has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
emilford has joined #ruby
<Radar> freudenshade: You don't have the bundler gem installed.
bronson has joined #ruby
bvbrandon has quit [Remote host closed the connection]
Channel6 has joined #ruby
emilford has quit [Ping timeout: 255 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
casadei has quit [Remote host closed the connection]
mfb2 has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
jam_ has joined #ruby
sandstrom has joined #ruby
chouhoulis has joined #ruby
gbgdev has joined #ruby
gbgdev has quit [Remote host closed the connection]
gbgdev has joined #ruby
gbgdev has quit [Client Quit]
emilford has joined #ruby
<freudenshade> Ok, done. And after bundler install, I now get ' Dont know how to build task 'gem' ' . What now Radar ?
<Radar> freudenshade: what is the full command that you're trying to run?
mfb2 has quit [Ping timeout: 245 seconds]
krobzaur has joined #ruby
chouhoulis has quit [Ping timeout: 256 seconds]
<freudenshade> just rake gem Radar
<Radar> freudenshade: and what should that command do?
<freudenshade> Trying to install a gem from github
<Radar> freudenshade: It all depends on the context of where you're running it.
<Radar> freudenshade: Which gem?
<freudenshade> I have no idea, mate. I'm just following a tutorial
phredus has quit [Read error: Connection reset by peer]
<Radar> freudenshade: Which tutorial?
<freudenshade> something on SO
<Radar> Got a link to that too so I can follow along too?
<freudenshade> DIfferent ones, in fact. After each erorr I went to a new one Radar
<freudenshade> Radar, ^
<freudenshade> This is the one im using now
<Radar> freudenshade: "rake -T" will show you the commands that are available.,
<Radar> freudenshade: Perhaps you're after "rake install"?
<Radar> Where is the post that recommends this particular gem?
<freudenshade> No post recommended this, I was looking for something to do this and found this repo
<Radar> Ok.
<freudenshade> rake install seems to have worked.
<Radar> What do you want that command to do when you run it? Is it to install the gem?
<freudenshade> Can I require it and use it now?
<freudenshade> Yeah, I wanted to install the gem
hxegon has quit [Ping timeout: 264 seconds]
<Radar> Yes you can require itg
<freudenshade> TBF I've never heard of rake before this
<Radar> You can require anything from a gem's lib dir
<Radar> require 'tf-idf-similiarity' will work
<freudenshade> I see, well thanks a lot Radar
<Radar> rake is Ruby's alternative to the make tool. We use it for running "tasks" in Ruby code.
<Radar> np
mahk_ has joined #ruby
<freudenshade> how did you learn all this stuff anyway
<freudenshade> I'm sort of a journeyman in ruby, I like it more than python which is why I use it. Everything is n object, is really cool
mahk_ has quit [Client Quit]
PsionTheory has quit [Remote host closed the connection]
phredus has joined #ruby
krz has quit [Ping timeout: 250 seconds]
fedexo has quit [Ping timeout: 260 seconds]
binaryplease has quit [Ping timeout: 265 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
dlitvak_ has joined #ruby
krobzaur has quit [Ping timeout: 276 seconds]
sandstrom has joined #ruby
<freudenshade> huh Radar?
<Radar> freudenshade: I've been doing it for 10 years. I learned by asking questions in this channel and #rubyonrails.
XxionxX has left #ruby [#ruby]
<Radar> freudenshade: I've also read a few books on it and I've even written some.
dlitvak has quit [Ping timeout: 264 seconds]
minimalism has quit [Quit: minimalism]
minimalism has joined #ruby
speakingcode has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 276 seconds]
speakingcode has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.3]
flughafen has quit [Ping timeout: 240 seconds]
<freudenshade> Radar: Are they good ?
<Radar> ?twgr
<ruby[bot]> Radar: I don't know anything about twgr
<Radar> ruby[bot]: hm I could've sworn you did.
<freudenshade> Radar: I'll find it myself, what is it called?
<Radar> freudenshade: When I was learning I read the first version of https://www.manning.com/books/the-well-grounded-rubyist-second-edition which was then called "Ruby for Rails"
<Radar> That'll cover everything about Ruby that you need to know and probably a touch more. You know python already so a lot of the first couple of chapters should be familiar to you, but I'd recommend going through those.
<freudenshade> thanks, i appreciate that
<freudenshade> I've been using rubymonks mainly
Bloomer has joined #ruby
Rodya_ has joined #ruby
<wolffles> ruby monks is pretty good
baweaver has quit [Remote host closed the connection]
<wolffles> i just found out about projecteluer.net more complicated problems
blackmes1 has joined #ruby
<Ox0dea> wolffles: Did you do #54?
al2o3-cr has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
<wolffles> im struggling wiht number 4 in the archives :/
<wolffles> speaking of which i need some help finding a simpler way to do this problem… i couldnt figure out which methods to use so i did it logically.
sandstrom has quit [Quit: My computer has gone to sleep.]
ledestin has joined #ruby
<Ox0dea> wolffles: https://eval.in/503578
<wolffles> you make it seem so easy :[
sandstrom has joined #ruby
flughafen has joined #ruby
djbkd has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
<Ox0dea> Well, whenever you've got a nested loop, you probably want #product instead.
northfurr has quit [Quit: northfurr]
<Ox0dea> >> %i[a b c].product [1,2,3]
<ruby[bot]> Ox0dea: # => [[:a, 1], [:a, 2], [:a, 3], [:b, 1], [:b, 2], [:b, 3], [:c, 1], [:c, 2], [:c, 3]] (https://eval.in/503579)
guacamole has joined #ruby
<wolffles> noted
blackmes1 has quit [Ping timeout: 240 seconds]
houhoulis has joined #ruby
jam_ has quit [Ping timeout: 255 seconds]
<Ox0dea> I dug up my #54 C solution: https://eval.in/503581
<freudenshade> Ox0dea: That is cool
<freudenshade> I did not know the bot could do that
<Ox0dea> freudenshade: Please be advised that it is for demonstration purposes, not experimentation.
[Kicker] has joined #ruby
<freudenshade> 10-4
<[Kicker]> hello
victortyau has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wolffles> Ox0dea: i just saw your #54 and i dont understand half of it :/
<Ox0dea> wolffles: Well, do you know C?
<wolffles> nope
iateadonut has joined #ruby
<wolffles> is that C?
<Ox0dea> Yeah.
<wolffles> derp
<Ox0dea> Really bad C.
<Ox0dea> But it's duper-fast.
victortyau has joined #ruby
solocshaw has quit [Ping timeout: 276 seconds]
ixti has quit [Quit: WeeChat 1.4]
graffix222 has quit [Ping timeout: 260 seconds]
ixti has joined #ruby
wolffles has quit [Quit: wolffles]
<freudenshade> Ox0dea: I know C, what are you tryig to do?
hannelita has joined #ruby
Antiarc has quit [Read error: Connection reset by peer]
<freudenshade> Winning hand of poker?
B1n4r10 has joined #ruby
hxegon has joined #ruby
<freudenshade> Nope, it's not poker
rkazak has quit [Quit: Sleep.....ing....]
Antiarc has joined #ruby
dorei has quit []
A124 has quit [Read error: Connection reset by peer]
davedev2_ has joined #ruby
pdoherty has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
hannelita has quit [Ping timeout: 255 seconds]
davedev24 has quit [Ping timeout: 240 seconds]
B1n4r10 has quit [Ping timeout: 255 seconds]
RobertBirnie has joined #ruby
sandstrom has joined #ruby
RobertBirnie has quit [Max SendQ exceeded]
A124 has joined #ruby
krz has joined #ruby
howdoicomputer has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby
howdoicomputer has quit [Ping timeout: 264 seconds]
guacamole has joined #ruby
jam_ has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CloCkWeRX has joined #ruby
al2o3-cr has joined #ruby
rkazak has joined #ruby
chouhoulis has joined #ruby
<shevy> so much verbose!
pdoherty has quit [Ping timeout: 272 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
ajf- has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandstrom has quit [Quit: My computer has gone to sleep.]
Yzguy has quit [Quit: Cya]
sandstrom has joined #ruby
hxegon has quit [Quit: BRB]
northfurr has joined #ruby
hxegon has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
wolffles has joined #ruby
hxegon has quit [Client Quit]
B1n4r10 has joined #ruby
dlitvak_ has quit [Remote host closed the connection]
krz has quit [Ping timeout: 276 seconds]
rkazak has quit [Quit: Sleep.....ing....]
hxegon has joined #ruby
xet7 has quit [Ping timeout: 265 seconds]
hxegon is now known as hxegon_AFK
hxegon_AFK is now known as hxegon
pdoherty has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
B1n4r10 has quit [Ping timeout: 272 seconds]
gregf has quit [Quit: WeeChat 1.3]
graffix222 has joined #ruby
[Kicker] has quit []
Guest82082 is now known as saneax_AFK
freudenshade has left #ruby [#ruby]
sperant has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
hypermist has left #ruby ["Leaving"]
ss_much has quit [Quit: Connection closed for inactivity]
sandstrom has joined #ruby
krz has joined #ruby
baweaver has joined #ruby
djbkd has quit [Remote host closed the connection]
blackmes1 has joined #ruby
emilford has quit [Ping timeout: 245 seconds]
baweaver has quit [Ping timeout: 245 seconds]
victortyau has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
graffix222 has quit [Ping timeout: 260 seconds]
asccigcc has joined #ruby
<adam_> Is there an elegant way to scanf a TCP socket? Netstrings style ("11:Hello World", where 11 is length to read)
blackmes1 has quit [Ping timeout: 265 seconds]
graffix222 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
dlitvak has joined #ruby
freerobby has quit [Quit: Leaving.]
dlitvak has quit [Remote host closed the connection]
dlitvak has joined #ruby
bmurt has quit [Quit: Textual IRC Client: www.textualapp.com]
sandstrom has joined #ruby
krz has quit [Ping timeout: 276 seconds]
mfb2 has joined #ruby
hannelita has joined #ruby
<Ox0dea> >> require 'scanf'; require 'socket'; TCPSocket.instance_method :scanf # adam_
<ruby[bot]> Ox0dea: # => #<UnboundMethod: TCPSocket(IO)#scanf> (https://eval.in/503605)
<adam_> Thanks. I used scanf in a prototype but it looks like it might be discarding the entire line
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marcdel has joined #ruby
mfb2 has quit [Ping timeout: 264 seconds]
wolffles has quit [Read error: Connection reset by peer]
Ivision has joined #ruby
hannelita has quit [Ping timeout: 255 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
arup_r has joined #ruby
Ivision has quit [Client Quit]
marcdel has quit [Ping timeout: 272 seconds]
braincrash has quit [Quit: bye bye]
sankaber has joined #ruby
janebootydoe has quit [Ping timeout: 276 seconds]
sperant has joined #ruby
d0nn1e has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
cashnguns has quit [Ping timeout: 250 seconds]
<Ox0dea> adam_: Well, that sucks. https://git.io/vzWXV
<adam_> ;\
<Ox0dea> It does buffer the line such that it can be searched for subsequent matches, but it's definitely eating it. :<
d0nn1e has joined #ruby
<adam_> I have a "solution" now using pack/unpack
<adam_> but broken when considering it doesn't follow netstrings protocol (http://cr.yp.to/proto/netstrings.txt)
<adam_> Just thought I was losing my mind with scanf ;)
northfurr has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
braincrash has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
victortyau has joined #ruby
colegatron has quit [Ping timeout: 255 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
krz has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.3]
tildes has joined #ruby
al2o3-cr has joined #ruby
saneax_AFK is now known as saneax
saneax is now known as Guest26463
asccigcc has quit [Quit: asccigcc]
stannard has joined #ruby
dlitvak has quit [Ping timeout: 260 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
pdoherty has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
sandstrom has joined #ruby
stannard has quit [Ping timeout: 272 seconds]
janebootydoe has joined #ruby
dlitvak has joined #ruby
baweaver has joined #ruby
gregf has joined #ruby
lemur has joined #ruby
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
colegatron has joined #ruby
asccigcc has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.3]
B1n4r10 has joined #ruby
al2o3-cr has joined #ruby
al2o3-cr has quit [Client Quit]
al2o3-cr has joined #ruby
baweaver has quit [Ping timeout: 264 seconds]
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgt has quit [Ping timeout: 240 seconds]
al2o3-cr has quit [Client Quit]
al2o3-cr has joined #ruby
al2o3-cr has quit [Client Quit]
al2o3-cr has joined #ruby
allencs has joined #ruby
B1n4r10 has quit [Ping timeout: 255 seconds]
allencs has quit [Client Quit]
b2zeldafreak has quit [Ping timeout: 272 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
codecop has joined #ruby
sandstrom has joined #ruby
BSab has joined #ruby
rkazak has joined #ruby
blackmes1 has joined #ruby
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
mistermocha has quit [Remote host closed the connection]
blackmes1 has quit [Read error: Connection reset by peer]
gix has quit [Ping timeout: 245 seconds]
Ebok has quit [Read error: Connection reset by peer]
guacamole has joined #ruby
B1n4r10 has joined #ruby
yeticry has quit [Ping timeout: 260 seconds]
Ebok has joined #ruby
Ebok has quit [Read error: Connection reset by peer]
yeticry has joined #ruby
Ebok has joined #ruby
marcdel has joined #ruby
tmtwd has joined #ruby
gix has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.3]
dlitvak has quit [Ping timeout: 265 seconds]
al2o3-cr has joined #ruby
al2o3-cr has quit [Client Quit]
marcdel has quit [Ping timeout: 264 seconds]
hannelita has joined #ruby
dfinninger has joined #ruby
Rodya_ has quit [Quit: Leaving...]
sperant has joined #ruby
al2o3-cr has joined #ruby
al2o3-cr has quit [Client Quit]
usershell has joined #ruby
dnewkerk has joined #ruby
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
stannard has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
hannelita has quit [Ping timeout: 264 seconds]
sandstrom has joined #ruby
dlitvak has joined #ruby
howdoicomputer has joined #ruby
agentmeerkat has joined #ruby
arescorpio has quit [Quit: Leaving.]
usershell has quit [Ping timeout: 272 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stannard has quit [Ping timeout: 255 seconds]
blackmes1 has joined #ruby
dlitvak_ has joined #ruby
bronson has joined #ruby
howdoicomputer has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 276 seconds]
al2o3-cr has joined #ruby
dlitvak_ has quit [Ping timeout: 255 seconds]
bronson has quit [Ping timeout: 265 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
queequeg1 has quit [Quit: Changing server]
chouhoulis has joined #ruby
dfinninger has quit [Remote host closed the connection]
victortyau has quit [Quit: Textual IRC Client: www.textualapp.com]
gregf has quit [Quit: WeeChat 1.3]
<adam_> Ox0dea: I fixed my problem by using `gets(':')`. Not super ideal, but an acceptable stopgap. (re: scanf on socket)
agentmeerkat has quit [Ping timeout: 272 seconds]
<Ox0dea> adam_: Ah, yep, that'd do it.
rhg135 has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
stevemackinnon has quit [Remote host closed the connection]
<Ox0dea> I always forget that #gets can behave like StringScanner.
<adam_> Same.
chouhoulis has quit [Ping timeout: 255 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
rhg135 has joined #ruby
marcdel has joined #ruby
marcdel has quit [Max SendQ exceeded]
usershell has joined #ruby
usershell has quit [Read error: Connection reset by peer]
marcdel has joined #ruby
usershell has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
sandstrom has joined #ruby
janebootydoe has quit [Ping timeout: 276 seconds]
blackmes1 has quit [Ping timeout: 276 seconds]
gregf has joined #ruby
krz has quit [Ping timeout: 255 seconds]
ghox has quit [Ping timeout: 260 seconds]
graffix222 has quit [Ping timeout: 260 seconds]
etqqkoiflwhb has joined #ruby
etqqkoiflwhb has quit [Remote host closed the connection]
etqqkoiflwhb has joined #ruby
st0opkid has joined #ruby
etqqkoiflwhb has quit [Client Quit]
etqqkoiflwhb has joined #ruby
lemur has quit [Read error: Connection reset by peer]
etqqkoiflwhb has quit [Remote host closed the connection]
etqqkoiflwhb has joined #ruby
baweaver has joined #ruby
ur5us has quit [Remote host closed the connection]
asccigcc has quit [Ping timeout: 245 seconds]
astrobun_ has joined #ruby
krz has joined #ruby
baweaver has quit [Ping timeout: 255 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
dnewkerk has quit [Ping timeout: 240 seconds]
akem has joined #ruby
sandstrom has joined #ruby
Guest69299 has quit [Read error: Connection reset by peer]
juddey has quit [Ping timeout: 255 seconds]
alyssadaemon has quit [Ping timeout: 250 seconds]
davedev2_ has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
davedev24 has joined #ruby
baweaver has quit [Remote host closed the connection]
davedev24 has quit [Client Quit]
baweaver has joined #ruby
stevemackinnon has joined #ruby
<sneakerhax> y
kknight has joined #ruby
zast has quit [Remote host closed the connection]
<kknight> how to Implement a server rquest in Ruby any solid link?
dlitvak has joined #ruby
asccigcc has joined #ruby
pawnbox has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
pawnbox has joined #ruby
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arup_r has quit []
guacamole has joined #ruby
asccigcc has quit [Client Quit]
sandstrom has joined #ruby
dlitvak has quit [Ping timeout: 256 seconds]
ss_much has joined #ruby
sperant has joined #ruby
akem has quit [Read error: Connection reset by peer]
rwz__ has quit [Quit: Connection closed for inactivity]
akem has joined #ruby
akem has quit [Remote host closed the connection]
hannelita has joined #ruby
akem has joined #ruby
ur5us has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
hannelita has quit [Ping timeout: 255 seconds]
gregf has quit [Quit: WeeChat 1.3]
sigurding has joined #ruby
B1n4r10 has quit [Ping timeout: 276 seconds]
rodolfowtf has quit [Read error: Connection reset by peer]
gregf has joined #ruby
last_staff has joined #ruby
speakingcode has quit [Ping timeout: 256 seconds]
norc has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
zeros0623 has joined #ruby
zeros0623 has quit [Client Quit]
tildes has quit [Ping timeout: 264 seconds]
sandstrom has joined #ruby
houhoulis has quit [Remote host closed the connection]
techsethi has joined #ruby
chouhoulis has joined #ruby
<norc> Talk about magic.
<TTilus> kknight: you want to make a http request?
<norc> That is about the best documented portion that I have seen.
<Ox0dea> norc: Where do I start?
skade has joined #ruby
dlitvak has joined #ruby
<norc> Oh just skim it through.
<Ox0dea> CRNL?
<norc> Also, gotta leave the train. be back in 15 minutes.
NoTroutAboutIt has joined #ruby
chouhoulis has quit [Ping timeout: 272 seconds]
C0deMaver1ck has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
norc has quit [Ping timeout: 252 seconds]
<NoTroutAboutIt> Can anyone here help my figure out why my attempt to permit params from multiple controllers is not working?
<NoTroutAboutIt> Easiest way to share my code is to probably share the stackoverflow question I just posted http://stackoverflow.com/questions/34848277/permitting-params-in-rails-when-form-references-multiple-models
<Radar> ?rails NoTroutAboutIt
<ruby[bot]> NoTroutAboutIt: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
arup_r has joined #ruby
<NoTroutAboutIt> Yeah
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
<NoTroutAboutIt> I guess I should go to the rubyonrails chat
asccigcc has joined #ruby
nbdy has quit [Quit: Textual IRC Client: www.textualapp.com]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
osvimer has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
osvimer has quit [Client Quit]
sandstrom has joined #ruby
<kknight> msg TTilus
<kknight> TTilus: yes
darkf has joined #ruby
BTRE has joined #ruby
tmtwd has quit [Ping timeout: 256 seconds]
blackgoat has quit [Ping timeout: 256 seconds]
solars has joined #ruby
Ishido has joined #ruby
c0ncealed has joined #ruby
jam___ has joined #ruby
techsethi has quit [Quit: techsethi]
wolffles has joined #ruby
asccigcc has quit [Quit: asccigcc]
Xzanron has joined #ruby
tmtwd has joined #ruby
claw has quit [Ping timeout: 245 seconds]
jam_ has quit [Ping timeout: 265 seconds]
astrobun_ has quit [Remote host closed the connection]
asccigcc has joined #ruby
blackmes1 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
dlitvak has quit [Ping timeout: 272 seconds]
claw has joined #ruby
krz has quit [Read error: Connection reset by peer]
sandstrom has joined #ruby
ympeg has joined #ruby
krz has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkazak has joined #ruby
asccigcc has quit [Quit: asccigcc]
dlitvak has joined #ruby
LMity has joined #ruby
marcdel has quit [Ping timeout: 240 seconds]
carraroj has joined #ruby
skade has quit [Ping timeout: 276 seconds]
dlitvak has quit [Ping timeout: 276 seconds]
LMity has quit [Ping timeout: 245 seconds]
rakm has joined #ruby
hannelita has joined #ruby
BSab has quit [Ping timeout: 256 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
techsethi has joined #ruby
helpa has quit [Remote host closed the connection]
astrobun_ has joined #ruby
sandstrom has joined #ruby
guacamole has joined #ruby
howdoicomputer has joined #ruby
hannelita has quit [Ping timeout: 264 seconds]
tmtwd has quit [Ping timeout: 255 seconds]
Channel6 has quit [Quit: Leaving]
<kknight> any link to Exposes a GET API as "api/request?connId=19&timeout=80"
<kknight> ?
vdamewood has joined #ruby
troulouliou_div2 has joined #ruby
yardenbar has joined #ruby
howdoicomputer has quit [Ping timeout: 256 seconds]
dmolina has joined #ruby
<kknight> hello in my irb when i type require 'socket' . it didn't return true, why?
karapetyan has joined #ruby
Radar has quit [Quit: ZNC - http://znc.in]
amclain has quit [Quit: Leaving]
chouhoulis has joined #ruby
<Ox0dea> kknight: What did it return?
last_staff has quit [Read error: Connection reset by peer]
dmolina has quit [Ping timeout: 265 seconds]
xet7 has joined #ruby
Radar has joined #ruby
drocsid has quit [Ping timeout: 250 seconds]
skade has joined #ruby
<kknight> it only return another irb
<kknight> means it doesn;t return anything
skade has quit [Client Quit]
<Ox0dea> kknight: The problem there is that you invoked irb from within irb.
<kknight> Ox0dea: i am reading a tut. there it expext to return true
<Ox0dea> >> [require('socket'), require('socket')] # kknight
<ruby[bot]> Ox0dea: # => [true, false] (https://eval.in/503637)
skade has joined #ruby
<Ox0dea> #require returns whether or not it had to load any code.
skade has quit [Read error: Connection reset by peer]
ThirstForKnowled has joined #ruby
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
sandstrom has quit [Quit: My computer has gone to sleep.]
chouhoulis has quit [Ping timeout: 265 seconds]
gagrio has joined #ruby
dn` has joined #ruby
<kknight> suppose i want to get socket address ob ibm.com then i have to type IPSocket::getaddress('www.ibm.com') isn't ?
<kknight> Ox0dea?
sandstrom has joined #ruby
dionysus69 has joined #ruby
dpg_ has quit [Ping timeout: 256 seconds]
blackmes1 has quit [Ping timeout: 255 seconds]
<kknight> solved
aganov has joined #ruby
<kknight> no need to reply!!
Radar has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dn` has quit [Client Quit]
helpa has joined #ruby
justbleed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NoTroutAboutIt has quit [Ping timeout: 260 seconds]
juddey has joined #ruby
lsmola has joined #ruby
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
stevemackinnon has quit [Remote host closed the connection]
guacamole has joined #ruby
sperant has joined #ruby
kp666 has joined #ruby
firstdayonthejob has joined #ruby
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
marcdel has joined #ruby
phredus has quit [Ping timeout: 250 seconds]
cornerma1 has joined #ruby
anisha has joined #ruby
marcdel has quit [Ping timeout: 272 seconds]
jgt has joined #ruby
Guest63 has joined #ruby
jas02 has joined #ruby
jackjackdripper has joined #ruby
UtkarshRay has joined #ruby
cornerman has quit [Ping timeout: 250 seconds]
cornerma1 is now known as cornerman
sandstrom has quit [Quit: My computer has gone to sleep.]
User458764 has joined #ruby
arup_r has quit []
etqqkoiflwhb has quit [Quit: (null)]
hannelita has joined #ruby
last_staff has joined #ruby
Macaveli has joined #ruby
hxegon has quit [Quit: BRB]
andikr has joined #ruby
SCHAAP137 has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
hannelita has quit [Ping timeout: 255 seconds]
TomyWork has joined #ruby
djbkd has quit [Quit: My people need me...]
ur5us has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
jbrhbr has joined #ruby
techsethi has quit [Quit: techsethi]
bronson has joined #ruby
einarj has joined #ruby
helpa has quit [Remote host closed the connection]
jam___ has quit [Remote host closed the connection]
kknight has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 265 seconds]
aufi has joined #ruby
chouhoulis has joined #ruby
ta has joined #ruby
edwinvdgraaf has joined #ruby
ur5us has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
shredding has joined #ruby
<adaedra> Hello
chouhoulis has quit [Ping timeout: 240 seconds]
surrounder has joined #ruby
sandstrom has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
grasshopper has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
ur5us has quit [Remote host closed the connection]
Guest63 is now known as Radar
ympeg has quit [Ping timeout: 265 seconds]
Hounddog has joined #ruby
blaxter has joined #ruby
beardsley has joined #ruby
benjohn has joined #ruby
antgel has joined #ruby
<beardsley> Don't lets everyone talk at once
tylersmith has quit [Ping timeout: 260 seconds]
CloCkWeRX has joined #ruby
minimalism has quit [Quit: minimalism]
marcdel has joined #ruby
firstdayonthejob has quit [Ping timeout: 255 seconds]
gruz0 has joined #ruby
<Ox0dea> What a sentence.
tylersmith has joined #ruby
* beardsley bows
devbug has quit [Read error: Connection reset by peer]
<beardsley> does it bother anyone else that [nil,nil,nil].any? == true
<beardsley> is true?
blackms has joined #ruby
ferr has joined #ruby
<adaedra> >> [nil,nil,nil].any? == true
<ruby[bot]> adaedra: # => false (https://eval.in/503675)
<beardsley> hmm
<Ox0dea> Pfft.
<Ox0dea> How embarrassing.
<beardsley> then I have an entirely different problem to debug...
futilegames has joined #ruby
marcdel has quit [Ping timeout: 272 seconds]
<Ox0dea> >> [].any? # beardsley: I think you were talking about this.
<ruby[bot]> Ox0dea: # => false (https://eval.in/503677)
<Ox0dea> Or not.
<Ox0dea> Oh!
<Ox0dea> >> [].all?
<beardsley> >> [].any?
<ruby[bot]> Ox0dea: # => true (https://eval.in/503678)
<Ox0dea> That's the confusing one.
<beardsley> wow, that's wacky
<Ox0dea> Not really. None of its elements are falsy!
helpa has joined #ruby
<beardsley> no, it's wacky
<Ox0dea> Why?
<beardsley> .any? implies that we're looking at elements
<beardsley> and no elements should be an obvious "no"
<Ox0dea> The bot didn't answer you, silly.
<beardsley> if it was "anything_in_there_falsy?" then it's cool
<Ox0dea> [].any? is false, [].all? is true.
<beardsley> oh, whew
<Ox0dea> Close one.
<beardsley> seriously
blackmes1 has joined #ruby
<beardsley> I felt as though I'd entered a domain of impossible geometry
<Ox0dea> #all? starts out "assuming" true and only returns false if it finds (or the optional block returns) a falsy element.
helpa has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> And it's just the opposite for #any?.
juddey has quit [Ping timeout: 245 seconds]
<beardsley> >> [[nil],nil,[nil,nil]].any?
<Ox0dea> Now you're trolling.
<beardsley> this bot doesn't like me
<Ox0dea> Shh bby is ok
Dimik has quit [Ping timeout: 260 seconds]
<beardsley> I feel like it thinks it knows more about ruby than I do..
gruz0 has quit [Quit: Leaving]
<adaedra> The bot won't reply if you're not registered.
rippa has joined #ruby
helpa has joined #ruby
helpa has quit [Remote host closed the connection]
<beardsley> bleh, registering
helpa has joined #ruby
<beardsley> papers, please
Radar has quit [Quit: Textual IRC Client: www.textualapp.com]
Radar has joined #ruby
User458764 has joined #ruby
<beardsley> wow, been a while since being on IRC. Guess noone #trivia's anymore...
Radar is now known as Guest36205
<beardsley> not a *massive* loss, I suppose
Guest36205 is now known as Radar
<Radar> hi beardsley
<beardsley> hi
<Ox0dea> beardsley: Come play Hangman in #ruby-offtopic?
<beardsley> meh. too late in the evening/morning/midday
<Ox0dea> But you were gonna play trivia?
<beardsley> no, just checked it out and noticed noone was tehre
vikaton has quit [Quit: Connection closed for inactivity]
<Ox0dea> Who is this noone guy?
<Ox0dea> I always pronounce that "new knee".
<Radar> Do you two have history?
<Radar> noone and beardsley I mean.
<Radar> Sounds like it.
aspiers has joined #ruby
scepticulous has joined #ruby
hannelita has joined #ruby
mikecmpbll has joined #ruby
tesuji has joined #ruby
beardsley has quit [Quit: [BX] Windows Me, coded entirely by blondes]
f4cl3y has joined #ruby
howdoicomputer has joined #ruby
f4cl3y has quit [Ping timeout: 276 seconds]
pandaant has joined #ruby
usershell has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 260 seconds]
drptbl has joined #ruby
beardsley has joined #ruby
<beardsley> >> nil.nil?
<ruby[bot]> beardsley: # => true (https://eval.in/503680)
<beardsley> Niiice
ferr has quit [Ping timeout: 255 seconds]
chouhoulis has joined #ruby
sftrabbit has joined #ruby
blackmes1 has quit [Ping timeout: 256 seconds]
mark3 has joined #ruby
DoubleMalt has joined #ruby
jbrhbr has quit [Quit: Leaving.]
Snowy has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
radgeRayden_ has quit [Ping timeout: 276 seconds]
benhuda has joined #ruby
iskander has joined #ruby
techsethi has joined #ruby
iskander has quit [Client Quit]
beardsley has quit [Quit: [BX] mIRCrap: JUST DON'T DO IT!]
Guest26463 is now known as saneax_AFK
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
einarj has quit [Remote host closed the connection]
mburns has quit [Ping timeout: 244 seconds]
marcdel has joined #ruby
Xeago has joined #ruby
saneax_AFK is now known as saneax
saneax is now known as Guest86995
krz has quit [Read error: Connection reset by peer]
howdoi has joined #ruby
dmolina has joined #ruby
c0m0 has joined #ruby
marcdel has quit [Ping timeout: 245 seconds]
skade has joined #ruby
beardsley has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
tvw has joined #ruby
krz has joined #ruby
rdark has joined #ruby
grasshopper has quit [Ping timeout: 276 seconds]
marr has joined #ruby
blur3d has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
blackmes1 has joined #ruby
wolffles has quit [Quit: wolffles]
rns has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
czsr has quit [Remote host closed the connection]
dwfait has joined #ruby
User458764 has joined #ruby
Coldblackice has quit [Ping timeout: 256 seconds]
last_staff has quit [Remote host closed the connection]
f4cl3y has joined #ruby
Xeago has joined #ruby
huyderman has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
neoliis has joined #ruby
FernandoBasso has joined #ruby
einarj has joined #ruby
neoliis has quit [Client Quit]
FernandoBasso1 has joined #ruby
last_staff has joined #ruby
Maxona has joined #ruby
grasshopper has joined #ruby
jaiks has joined #ruby
FernandoBasso has quit [Ping timeout: 276 seconds]
ohaibbq has quit [Remote host closed the connection]
<oo7cat> i can manipulate com of microsoft by ruby?
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
pawnbox has quit [Remote host closed the connection]
<jhass> most likely
<oo7cat> oh
<oo7cat> you can give me link that related with
<jhass> sure, http://google.com
<oo7cat> microsoft com ruby
<oo7cat> i can’t find result
<oo7cat> :(
<jhass> !enable Google
<jhass> ah right, not here
ljames has quit []
drptbl has joined #ruby
<jhass> try to think of other terms?
<oo7cat> i type ‘microsoft com ruby’ on the google search windows
sepp2k has joined #ruby
<jhass> type something else if that doesn't yield anything useful?
codecop has quit [Remote host closed the connection]
<oo7cat> i can’t find it with ‘ruby com’
<jhass> took me one and a half minute on google because I have no clue about this stuff
<jhass> use windows com api ruby
pawnbox has joined #ruby
<jhass> that's what I ended up searching
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
norc has joined #ruby
<oo7cat> gem install windows-api <—— if i type like this, then i can install win32 api?
Xeago has quit [Remote host closed the connection]
jam_ has joined #ruby
<norc> apeiros: Damn I should not have touched El Capitan...
rodfersou has joined #ruby
<norc> Getting the most bizarre behavior with ruby-oci8 now, different from what you experienced.
<jhass> please stop violating our channel rules
<oo7cat> ok jhass
joonty has joined #ruby
<oo7cat> :)
Maxona has quit [Quit: IRC]
tomphp has joined #ruby
sperant has joined #ruby
chouhoulis has joined #ruby
Xeago has joined #ruby
jam_ has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
colegatron has quit [Ping timeout: 256 seconds]
sonOfRa has quit [Quit: Bye!]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
skade has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 256 seconds]
craysiii has quit [Remote host closed the connection]
sonOfRa has joined #ruby
blackmes1 has quit [Ping timeout: 276 seconds]
<Eising> hmm, I seem to have a gem in my Gemfile that pulls a specific version of json as dependency, and that specific version fails to build with the ruby 2.3 docker I'm running. Any idea what I could do to find out which one it is?
skade has joined #ruby
marcdel has joined #ruby
<jhass> which version? bundle show json, bundle list | grep json or just look at your Gemfile.lock
<jhass> or which gem pulls it in as dependency?
<jhass> in that case looking at the Gemfile.lock is the easiest IMO
spooq has joined #ruby
<Eising> jhass: ah, Gemfile.lock might give me the answer. Didn't think of that
arup_r has joined #ruby
karapetyan has quit [Ping timeout: 276 seconds]
ldnunes has joined #ruby
<Eising> jhass: but this is actually weird. Let me pastebin the Gemfile.lock
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
<Eising> (pastie is unstable)
marcdel has quit [Ping timeout: 264 seconds]
<Eising> there's only one mention of json and that's as (1.8.1)
<Eising> but the newest is 1.8.3, and that is the one that will be installed with gem install...
Bloomer has quit [Remote host closed the connection]
stamina has joined #ruby
<Eising> Furthermore the Gemfile only wants 'json', no specific version
djbkd has quit []
User458764 has joined #ruby
skade has quit [Ping timeout: 245 seconds]
hannelita has quit [Remote host closed the connection]
DirtyFInn has joined #ruby
<jhass> Eising: that's just bundler doing its job
<jhass> run bundle update json if you want to update it
colegatron has joined #ruby
binaryplease has joined #ruby
DirtyFInn is now known as That_Guy
tagrudev has joined #ruby
tagrudev has quit [Client Quit]
binaryplease has quit [Client Quit]
hannelita has joined #ruby
binaryplease has joined #ruby
Macaveli has quit [Ping timeout: 245 seconds]
lipoqil has joined #ruby
CloCkWeRX has quit [Ping timeout: 245 seconds]
skade has joined #ruby
last_staff has quit [Remote host closed the connection]
last_staff has joined #ruby
jottr has joined #ruby
skade has quit [Client Quit]
slackR has quit [Quit: Ready to take off..... 3.....2.....]
jgt has quit [Ping timeout: 264 seconds]
f4cl3y has quit [Ping timeout: 245 seconds]
CloCkWeRX has joined #ruby
usershell has joined #ruby
lxsameer has joined #ruby
platzhirsch has joined #ruby
blackgoat has joined #ruby
slackR has joined #ruby
dlitvak has joined #ruby
<DefV> I have a specific method that I'm trying to improve memory usage on. Is there some way to benchmark this? Something I can wrap around the method call that gives me memory allocated / GC run etc, so I can see improvement?
<yorickpeterse> DefV: https://github.com/ko1/allocation_tracer, https://gitlab.com/gitlab-org/allocations (only gives counts), stuff like GC.stat
howdoicomputer has joined #ruby
howdoicomputer has quit [Ping timeout: 276 seconds]
bronson has joined #ruby
fsapo has joined #ruby
blackmes1 has joined #ruby
VaibhavRajput has joined #ruby
Coldblackice has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
chouhoulis has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marcdel has joined #ruby
<VaibhavRajput> Are there any way to upload file (multipart_part post form) with only Net::HTTP::Post
dlitvak has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
<adaedra> ?crosspost
<ruby[bot]> Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<VaibhavRajput> lol
<VaibhavRajput> I apologize.
chouhoulis has quit [Ping timeout: 260 seconds]
marcdel has quit [Ping timeout: 255 seconds]
rns has joined #ruby
f4cl3y has joined #ruby
techsethi has quit [Quit: techsethi]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
al2o3-cr has quit [Quit: WeeChat 1.3]
FernandoBasso has joined #ruby
x0f has quit [Ping timeout: 240 seconds]
FooMunki has joined #ruby
dlitvak_ has joined #ruby
FernandoBasso1 has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Remote host closed the connection]
FernandoBasso1 has joined #ruby
yfeldblum has joined #ruby
tvw has quit [Ping timeout: 255 seconds]
ropeney has joined #ruby
codecop has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
x0f has joined #ruby
FernandoBasso has quit [Ping timeout: 276 seconds]
ropeney has quit [Client Quit]
yfeldblum has quit [Remote host closed the connection]
blackmes1 has quit [Quit: WeeChat 1.3]
blackmesa has joined #ruby
myntcake has joined #ruby
techsethi has joined #ruby
al2o3-cr has joined #ruby
karapetyan has joined #ruby
astrobun_ has quit [Remote host closed the connection]
samgerber has joined #ruby
<samgerber> Anyone been forced to track down a mutable hash key bug irl? Is there a way to safely use arrays as hash keys? https://gist.github.com/SamGerber/8f0a5abb7133f649d188
krz has quit [Read error: Connection reset by peer]
sunslide has joined #ruby
<sunslide> hi guys, could use some very basic help with threads, I'm not sure how to return a value from a thread (using the 'thread' lib) as I can't really return a value from the callback nor can I pass it a variable by reference, anyone with a tip?
Kijkek has joined #ruby
<Mon_Ouie> You can call Thread#value to get the value of the block that was executed in the thread (if the thread isn't done running, this causes it to wait)
<Mon_Ouie> this causes the calling thread to wait*
dlitvak has joined #ruby
<TomyWork> is anyone aware of a library that can walk remote commits, either via normal git protocols or via the gitlab api? kinda like rugged, just remote
Kijkek is now known as Maxona
<TomyWork> right now I'm using rugged and I just run it locally on the gitlab server
Xeago has quit [Remote host closed the connection]
Maxona has quit [Quit: IRC]
dlitvak_ has quit [Ping timeout: 272 seconds]
sigurding has quit [Quit: sigurding]
<sunslide> Mon_Ouie: thanks for your help man! do you have any idea how I can make this asynchronous? like maybe with a global variable or anything else?
skade has joined #ruby
spooq has quit [Ping timeout: 255 seconds]
spooq has joined #ruby
Xeago has joined #ruby
binaryplease has quit [Ping timeout: 265 seconds]
ferr has joined #ruby
usershell has quit [Read error: Connection reset by peer]
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has quit [Remote host closed the connection]
usershell has joined #ruby
dmst has joined #ruby
marcdel has joined #ruby
jam_ has joined #ruby
techsethi has quit [Quit: techsethi]
<jhass> samgerber: I yet have to find a good usecase to use an array as hash key
<jhass> but if you do and don't freeze them you basically want to call .rehash all the time, so meh
<samgerber> jhass: Thanks! I'll go read about .rehash!!
<jhass> samgerber: I think you rather should think about why you think you need an array as hash key, as said usually you don't and if you do I'd be really curious as to why you think you do
marcdel has quit [Ping timeout: 260 seconds]
dlitvak_ has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
jam_ has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
<jhass> TomyWork: I don't think "normal git protocols" even allow that
tvw has joined #ruby
lucasb has joined #ruby
Jardayn has joined #ruby
<samgerber> jhass: I don't think I need them; just trying to soak up information at this point. Now I know not to use arrays as hash keys. Thanks!
<jhass> great :)
kobain has joined #ruby
f4cl3y has quit [Ping timeout: 276 seconds]
chouhoulis has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
ereslibre has quit [Ping timeout: 245 seconds]
binaryplease has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
Mon_Ouie has quit [Ping timeout: 245 seconds]
Miuers has joined #ruby
<TomyWork> jhass well a commit is an object. the normal git protocols should support querying objects, right?
<TomyWork> the dumb http protocol at least *g*
anisha has quit [Quit: Leaving]
<jhass> afaik they only support downloading them
c355e3b has joined #ruby
<jhass> "give me the object id for this ref" and "give me everything from this object id to this object id"
dwfait has quit [Remote host closed the connection]
sftrabbit has joined #ruby
oo7cat has left #ruby [#ruby]
<TomyWork> should be enough
<TomyWork> unless "from A to A" means nothing
<jhass> well, where ref is basic, not stuff like HEAD~50
ereslibre has joined #ruby
<jhass> so you'd always have at least a shallow clone I guess
<jhass> and then work on that locally
<jhass> requires some disk/ramdisk space still
dlitvak has joined #ruby
aryaching has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
sigurding has joined #ruby
dlitvak_ has quit [Ping timeout: 255 seconds]
dwfait has joined #ruby
brendan- has joined #ruby
f4cl3y has joined #ruby
Jardayn has quit [Ping timeout: 260 seconds]
VaibhavRajput has quit []
ThirstForKnowled has quit [Ping timeout: 272 seconds]
dwfait has quit [Remote host closed the connection]
Snowy has quit [Remote host closed the connection]
casadei has joined #ruby
krz has joined #ruby
Miuers has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dlitvak has quit [Remote host closed the connection]
Snowy has joined #ruby
Snowy has quit [Remote host closed the connection]
dlitvak has joined #ruby
aupadhye has joined #ruby
Snowy has joined #ruby
dwfait has joined #ruby
Snowy has quit [Remote host closed the connection]
dwfait has quit [Remote host closed the connection]
blackmesa has joined #ruby
TomPeed has joined #ruby
shinnya has joined #ruby
sigurding has quit [Quit: sigurding]
sigurding has joined #ruby
konsolebox has joined #ruby
gagrio has quit [Ping timeout: 276 seconds]
sdothum has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
hxegon has joined #ruby
samgerber has quit []
dlitvak has quit [Ping timeout: 256 seconds]
dlitvak has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marcdel has joined #ruby
howdoicomputer has joined #ruby
FernandoBasso has joined #ruby
dwfait has joined #ruby
GinoManWorks has quit [Read error: Connection reset by peer]
benhuda has joined #ruby
FooMunki has quit [Quit: FooMunki]
howdoicomputer has quit [Ping timeout: 240 seconds]
krz has quit [Ping timeout: 256 seconds]
marcdel has quit [Ping timeout: 264 seconds]
FernandoBasso1 has quit [Ping timeout: 276 seconds]
GinoManWorks has joined #ruby
emilford has joined #ruby
Snowy has joined #ruby
zacts has quit [Remote host closed the connection]
dlitvak_ has joined #ruby
dorei has joined #ruby
krz has joined #ruby
chouhoulis has joined #ruby
FernandoBasso1 has joined #ruby
gagrio has joined #ruby
dlitvak has quit [Ping timeout: 264 seconds]
skade has joined #ruby
govg has joined #ruby
sankaber has joined #ruby
futilegames_ has joined #ruby
usershell has quit [Remote host closed the connection]
FernandoBasso has quit [Ping timeout: 276 seconds]
futilegames has quit [Ping timeout: 255 seconds]
futilegames_ is now known as futilegames
chouhoulis has quit [Ping timeout: 272 seconds]
carraroj has quit [Ping timeout: 240 seconds]
arup_r has quit []
ferr has quit [Ping timeout: 256 seconds]
blackmesa has quit [Ping timeout: 272 seconds]
emilford has quit [Ping timeout: 245 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
usershell has joined #ruby
pdoherty has joined #ruby
ghox has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
phredus has joined #ruby
sftrabbit has joined #ruby
grxpwa has joined #ruby
emilford has joined #ruby
Guest86995 is now known as saneax_AFK
dlitvak has joined #ruby
futilegames has quit [Read error: Connection reset by peer]
dlitvak has quit [Remote host closed the connection]
futilegames has joined #ruby
jghgh has joined #ruby
arup_r has joined #ruby
dlitvak_ has quit [Ping timeout: 250 seconds]
jghgh has quit [Remote host closed the connection]
frozen3 has joined #ruby
frozen3 has quit [Client Quit]
benjohn has quit [Remote host closed the connection]
grxpwa has quit [Remote host closed the connection]
krobzaur has joined #ruby
disconnekted has joined #ruby
ramortegui has joined #ruby
futilegames_ has joined #ruby
futilegames has quit [Ping timeout: 245 seconds]
futilegames_ is now known as futilegames
kalopsian has joined #ruby
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krobzaur has quit [Ping timeout: 255 seconds]
floatingpoint has joined #ruby
marcdel has joined #ruby
futilegames has quit [Quit: futilegames]
floatingpoint has quit [Client Quit]
benjohn has joined #ruby
gagrio has quit [Ping timeout: 272 seconds]
myntcake has quit [Remote host closed the connection]
steffkes has joined #ruby
steffkes has joined #ruby
futilegames has joined #ruby
myntcake has joined #ruby
ixti has quit [Ping timeout: 256 seconds]
marcdel has quit [Ping timeout: 272 seconds]
osvimer has joined #ruby
B1n4r10 has joined #ruby
blackgoat has quit [Quit: WeeChat 1.3]
steffkes has quit [Ping timeout: 250 seconds]
steffkes has joined #ruby
stevenhaddox has joined #ruby
mfb2 has joined #ruby
codecop has quit [Remote host closed the connection]
TomPeed has joined #ruby
bronson has joined #ruby
konsolebox has quit [Ping timeout: 272 seconds]
jam_ has joined #ruby
aegis3121 has joined #ruby
atomical has joined #ruby
mfb2_ has joined #ruby
User458764 has joined #ruby
mfb2 has quit [Ping timeout: 255 seconds]
jam_ has quit [Ping timeout: 240 seconds]
B1n4r10 has quit [Ping timeout: 245 seconds]
chouhoulis has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
ghox_ has joined #ruby
blur3d has quit [Quit: blur3d]
That_Guy has quit [Quit: (going home)]
mfb2_ has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ixti has joined #ruby
pdoherty has quit [Ping timeout: 260 seconds]
polysics has joined #ruby
bewie has quit [Quit: leaving]
ghox has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Ping timeout: 265 seconds]
dionysus69 has quit [Ping timeout: 255 seconds]
dfinninger has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has quit [Read error: Connection reset by peer]
<hxegon> that feeling when you scrap 6 hours of work, rewrite it in 2 hours and its 100 * better :D
Xeago has joined #ruby
dmst has quit [Quit: Connection closed for inactivity]
<nickjj> hxegon, welcome to programming
<hxegon> I've been here a while, but it can be like looking for a light switch in a dark room sometimes. pretty nice when you find it though.
aegis3121 has quit [Ping timeout: 260 seconds]
steffkes has quit [Ping timeout: 240 seconds]
<nickjj> i still go through similar things too
<nickjj> write code -> make it work -> if it's worth it then make it better/more maintainable/etc.
<stevenhaddox> This is pretty much the whole point of red -> green -> refactor. Our second time through will almost always be cleaner and worth the effort.
kerunaru has joined #ruby
<hxegon> stevenhaddox finally got the diff between tdd and bdd and it's making my life so much simpler :)
<stevenhaddox> hxegon: I think that line varies from person to person, but I loved that moment for me personally.
hehnope has joined #ruby
colegatron has quit [Quit: Leaving]
<hehnope> anyone run activerecord behind pgpool with load balancing?
freerobby has joined #ruby
northfurr has joined #ruby
floatingpoint has joined #ruby
legit has left #ruby ["Leaving"]
casadei has quit [Remote host closed the connection]
dlitvak has joined #ruby
B1n4r10 has joined #ruby
usershell has quit [Remote host closed the connection]
carella has joined #ruby
northfurr has quit [Quit: northfurr]
dlitvak has quit [Ping timeout: 256 seconds]
Jardayn has joined #ruby
<hxegon> is this a rails question, or just a general postgres question hehnope
<hehnope> rails
<hxegon> ?rails hehnope
<ruby[bot]> hehnope: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
TomPeed has joined #ruby
hehnope has left #ruby [#ruby]
<hxegon> probably have better luck there
ta has quit [Remote host closed the connection]
victortyau has joined #ruby
fmcgeough has joined #ruby
pawnbox has quit [Remote host closed the connection]
nerfando has joined #ruby
pawnbox has joined #ruby
Xeago has quit [Remote host closed the connection]
crikiit has quit [Quit: Leaving]
nerfando has quit [Max SendQ exceeded]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
nerfando has joined #ruby
binaryplease has quit [Ping timeout: 260 seconds]
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gagrio has joined #ruby
weemsledeux has joined #ruby
troulouliou_div2 has quit [Ping timeout: 260 seconds]
minimalism has joined #ruby
kerunaru has quit [Quit: Textual IRC Client: www.textualapp.com]
marcdel has joined #ruby
CloCkWeRX has left #ruby [#ruby]
decoponio has joined #ruby
Xzanron_ has joined #ruby
floatingpoint has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
marcdel has quit [Ping timeout: 272 seconds]
Xzanron_ has quit [Client Quit]
aegis3121 has joined #ruby
Xzanron has quit [Ping timeout: 276 seconds]
skade has joined #ruby
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
saneax_AFK is now known as saneax
lxsameer has quit [Quit: Leaving]
imperator has joined #ruby
saneax is now known as Guest9617
<imperator> Anyone here have an HP-UX box I could have a dev account on? I'd like to port some C code to FFI, but have no way to test it.
roshanavand has joined #ruby
Outlastsheep has quit [Ping timeout: 255 seconds]
roshanavand has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
howdoicomputer has joined #ruby
dionysus69 has joined #ruby
carella has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
carella has joined #ruby
vdamewood has quit [Quit: Life beckons.]
aganov has quit [Remote host closed the connection]
Mirza has joined #ruby
Mirza has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 260 seconds]
steffkes has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
ghox_ has quit [Read error: Connection reset by peer]
ghox has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
polysics_ has joined #ruby
steffkes has joined #ruby
frem has joined #ruby
polysics has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
j_mcnally has joined #ruby
mfb2 has joined #ruby
roshanav_ has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
steffkes has quit [Ping timeout: 260 seconds]
usershell has joined #ruby
polysics has joined #ruby
chouhoulis has quit [Ping timeout: 255 seconds]
mfb2 has quit [Ping timeout: 256 seconds]
carraroj has joined #ruby
eyesnot has joined #ruby
polysics_ has quit [Ping timeout: 256 seconds]
mrtomme has quit [Ping timeout: 248 seconds]
casadei has joined #ruby
Azulinho has joined #ruby
mrtomme has joined #ruby
TomPeed has quit [Read error: Connection reset by peer]
norc has quit [Ping timeout: 252 seconds]
Gasher has joined #ruby
<Gasher> Hi, what's up with the whole 1.9.3 vs 2.* thing?
<ericwood_> Gasher: you should upgrade to 2
<ericwood_> 1.9.3 is EOL
<Gasher> I'm looking at a hosting website and they have the 1.9.3 only limitation of Ruby.
<ericwood_> doesn't sound like a very good website host, then
<ericwood_> hate to say it but that's kind of ridiculouus
aegis3121 has quit [Quit: Textual IRC Client: www.textualapp.com]
<Gasher> ericwood_; It's one of the leading ones, gandi.net
aegis3121 has joined #ruby
oo7cat has joined #ruby
<oo7cat> who live in us? today is holiday in us?
<ericwood_> oo7cat: MLK day
<oo7cat> MLK
<aegis3121> Martin Luther King Jr. Day
<oo7cat> i don’t know?
<oo7cat> Martin Luther King Jr. Day is holiday?
<aegis3121> yep
<aegis3121> Federal and State. Some schools, some businesses.
<oo7cat> thanks aegis3121 and ericwood_ :)
<oo7cat> oh
<oo7cat> thanks for information.
<aegis3121> no worries
<ericwood_> Gasher: 1.9.3 as a requirement seems so irresponsible
<ericwood_> Gasher: 1.9.3 no longer receives security updates: https://www.ruby-lang.org/en/news/2014/01/10/ruby-1-9-3-will-end-on-2015/
TomPeed has joined #ruby
<ericwood_> and it hasn't for nearly a year now...you might want to look for another host :|
depesz has joined #ruby
hightower2 has joined #ruby
babblebre has joined #ruby
<Gasher> I just thought about changing my sites to one site, gandi offers domains, VPSes and shared hosting.
carella has quit [Remote host closed the connection]
<depesz> hi. i'm hitting strange thing. It looks that when I have "class Discover::AWS", and in that class, I do: ec2 = Aws::EC2::Client.new() - ruby tried to load Discover::AWS::Aws (and probably Discover::AWS::Aws::EC2::Client
<depesz> any idea on why this might be?
agentmeerkat has joined #ruby
carella has joined #ruby
TomPeed has quit [Read error: Connection reset by peer]
<Gasher> What was the change from Ruby 1 to Ruby 2 anyway?
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
fmcgeough has quit [Ping timeout: 260 seconds]
tenderlove has joined #ruby
<ericwood_> Gasher: quite a few things...google "ruby 1.9.3 vs ruby 2" and you'll get a bunch of stuff
<ericwood_> too many things to list out here
carella has quit [Remote host closed the connection]
<ericwood_> but regardless, 1.9.3 as a requirement is irresponsible and a red flag
sandstrom has quit [Quit: My computer has gone to sleep.]
dlitvak_ has joined #ruby
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
<havenwood> Gasher: Think of 1.9.3 as a release candidate for 2.0.
User458764 has joined #ruby
<workmad3> depesz: constant lookup (e.g. Aws::EC2::Client) starts in the current scope and unwinds to the top... if the constant isn't found, ruby will raise an error with the current scope prefixed to the constant
carella has joined #ruby
dfinninger has quit [Remote host closed the connection]
marcdel has joined #ruby
<depesz> workmad3: ok, how can I make it use "global" Aws::EC2::Client?
<depesz> or any other class for that matter?
<workmad3> depesz: it would 'just work' if that class was loaded... it sounds like it isn't
<depesz> well, it is - i have "require 'aws-sdk'" at the beginning
<hightower2> Hey, is there a way I can use alias_method to alias class/module method to instance method? Such as: alias_method My::Module.method, :method ?
<workmad3> depesz: but if you want to force a top-level scope, you can use `::Aws::EC2::Client`
benhuda has joined #ruby
<workmad3> depesz: is that pulling in `Aws::EC2` or `AWS::EC2` though?
<havenwood> Gasher: The good news is its much easier to upgrade from 1.9+ than it was from 1.8 to 1.9. It may even *just work*.
dlitvak has quit [Ping timeout: 240 seconds]
<workmad3> depesz: this stuff is case-sensitive
<depesz> workmad3: will check, thank you.
gheegh has quit [Ping timeout: 276 seconds]
TomPeed has joined #ruby
<workmad3> depesz: if it should be `AWS::EC2` then you'll definitely need to use `::AWS::EC2::Client` in your class
<depesz> hmm .. it seems on work on one server, and doesn't on another.
<depesz> AWS seems to work everywhere.
<workmad3> as otherwise that first `::AWS` will conflict with your own class
<depesz> according to docs, it should be Aws: https://github.com/aws/aws-sdk-ruby
volty has joined #ruby
pawnbox has quit [Remote host closed the connection]
<workmad3> depesz: ok, then in one place you've not got the code you expected loaded
<depesz> workmad3: check this: http://fpaste.org/312003/31321711/
<depesz> from all I understand, it should work, shouldn't it?
<workmad3> depesz: which could mean you have the wrong version installed
pawnbox has joined #ruby
<Bish> can somebody tell me, how i do custom selects on Sequel::Model without encapsulating the answer as the model?
<depesz> workmad3: reading
marcdel has quit [Ping timeout: 255 seconds]
<Bish> i mean, if i do a group and count, it's still an instance of that model
<depesz> workmad3: but I'm getting error on uniitialized constant Aws, not AWS
shinnya has quit [Ping timeout: 245 seconds]
YankNYC has joined #ruby
stamina has quit [Ping timeout: 240 seconds]
<workmad3> depesz: which would imply that you have version 1 installed
<workmad3> depesz: and are using version 2 docs
<depesz> =$ gem list aws-sdk | grep 'aws-sdk '
<depesz> aws-sdk (2.2.11, 1.64.0)
<depesz> ok. i see that I have both. maybe that's the problem.
<workmad3> depesz: could easily be
<depesz> how can I make the script use v2 ?
benhuda has quit [Ping timeout: 255 seconds]
ferr has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkazak has joined #ruby
<havenwood> depesz: gem 'aws-sdk', '~> 2'
<volty> gem server, search does not work. Do I miss something?
<depesz> havenwood: in the .rb script?
<havenwood> depesz: Check the aws-sdk docs, but yeah right before the require. (Assuming you're not using a Gemfile here.)
skade has quit [Quit: Computer has gone to sleep.]
<havenwood> volty: gem -v
grasshopper has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<volty> 2.4.2
mary5030 has joined #ruby
<depesz> havenwood: OK. added before 'require' and it works.
<havenwood> volty: Well, that's not terribly old at all.
<depesz> finally.
<havenwood> volty: Current is: 2.5.1
mary5030 has quit [Remote host closed the connection]
<havenwood> volty: What happens when you `gem search` then?
<volty> havenwood: does gem server's search work for you ?
<volty> havenwood: it says not found, always
<havenwood> volty: Oh, maybe I misunderstood the question. What's the line you're trying?
mary5030 has joined #ruby
<volty> No gems matched "mechanize"
aegis3121 has quit [Ping timeout: 265 seconds]
lacrymology has joined #ruby
<lacrymology> I upgraded my system and now I'm getting this: /home/lacrymology/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require': This installation of RMagick was configured with ImageMagick 6.9.2 but ImageMagick 6.9.3-0 is in use. (RuntimeError)
<volty> havenwood: I am talking about the gem server & browser accessing localhost:8808
<lacrymology> I tried uninstalling activesupport and reinstalling it but I'm seeing the same error
<lacrymology> how can I rebuild that?
<lacrymology> or clean the cache
<havenwood> volty: Yeah, just realized that. I thought you meant the two commands weren't working. What do you get for?: gem source
<havenwood> lacrymology: Have you already?: rbenv rehash
lucasb has quit [Quit: leaving]
<volty> havenwood: I have the page, I can click on single gems from the list (and consult the doc), but the search isn't working.
<havenwood> lacrymology: For a fresh version of the cache see: gem help pristine
<havenwood> volty: I'm trying to see what your gem source is. What was the output from the `gem source` command?
gbgdev has joined #ruby
ixti has quit [Ping timeout: 255 seconds]
fmcgeough has joined #ruby
<havenwood> ?rbenv lacrymology
<ruby[bot]> lacrymology: Missing command under rbenv? Did you try `rbenv rehash`?
carella has quit [Remote host closed the connection]
<volty> havenwood: *** CURRENT SOURCES *** \nhttps://rubygems.org/
arup_r has quit []
<volty> havenwood: you say I should try to regenerate it ?
aufi has quit [Quit: Konversation terminated!]
<havenwood> The Bundler motto should be "Prefix `bundle exec` or it's not your Bundle!" and the rbenv motto should be "Run `rbenv rehash` or they might not be your gems!"
freerobby has quit [Quit: Leaving.]
lacrymology has quit [Ping timeout: 260 seconds]
<havenwood> volty: That look right. Just wanted to make sure you had the right source. Can you `gem install` gems?
gagrio has quit [Ping timeout: 245 seconds]
<volty> havenwood: yes, absolutely
<havenwood> might not be your Bundle, I suppose...
<havenwood> volty: Gist the output from?: gem source --debug
davedev24 has joined #ruby
drptbl_ has joined #ruby
lacrymology has joined #ruby
<lacrymology> havenwood: yes
<stevenhaddox> havenwood: Truth on both bundler & rbenv. I've got `b` aliased to `bundle exec`
pawnbox has quit [Remote host closed the connection]
casadei has quit [Read error: Connection reset by peer]
casadei_ has joined #ruby
pawnbox has joined #ruby
<havenwood> volty: Still looks good.
drptbl has quit [Ping timeout: 240 seconds]
<volty> havenwood: I am trying now to generate rdoc.
<volty> regenerate
mark3 has quit [Quit: Leaving.]
aryaching has quit [Ping timeout: 250 seconds]
rippa has quit [Read error: Connection reset by peer]
BSaboia has joined #ruby
rippa has joined #ruby
<havenwood> volty: I'm confused. What are you running exactly and what's the error?
codecop has joined #ruby
jam_ has joined #ruby
tenderlove has quit [Remote host closed the connection]
<volty> gem server starts a server that serves rdoc at (default) port 8808. Then you go there and consult the rdoc for your installed gems. Above on the right is an input field for search, but doesn't find anything I type..
hannelita has quit [Remote host closed the connection]
bronson has joined #ruby
<volty> and, of course, the url shorcuts do not get result (not found, always)
<havenwood> volty: Aha, gotcha. I wonder if ruby-build had rdoc disabled when you installed Ruby?
govg_ has joined #ruby
hannelita has joined #ruby
polysics has quit []
<volty> havenwood: have no idea. The fact is there is a list, but seems not indexed. I'll retry as soon as rdoc finishes the generation of the content. And hope.
<havenwood> volty: Ahhh.
Xeago has joined #ruby
steffkes has joined #ruby
ixti has joined #ruby
jam_ has quit [Ping timeout: 272 seconds]
duckson has joined #ruby
psy_ has joined #ruby
chouhoulis has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
ixti has quit [Client Quit]
disconnekted has quit [Remote host closed the connection]
lacrymology has quit [Quit: leaving]
Bloomer has joined #ruby
shredding has quit [Ping timeout: 260 seconds]
osvimer has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 276 seconds]
usershell has quit [Read error: Connection reset by peer]
oo7cat has left #ruby [#ruby]
steffkes has quit [Ping timeout: 260 seconds]
usershell has joined #ruby
aegis3121 has joined #ruby
guacamole has joined #ruby
guacamole has quit [Client Quit]
govg_ has quit [Quit: leaving]
SCHAAP137 has quit [Remote host closed the connection]
<volty> rdoc stuck. what is the latest ruby stable version ?
<havenwood> volty: 2.3.0
<volty> havenwood: do you use rbenv ?
<havenwood> volty: nope, i use chruby
<volty> ok , thx
<havenwood> ruby-install --latest ruby
tesuji has quit [Ping timeout: 264 seconds]
aryaching has joined #ruby
dlitvak_ has quit [Ping timeout: 255 seconds]
ferr has quit [Ping timeout: 272 seconds]
Azulinho has quit [Read error: Connection reset by peer]
dcunit3d has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
Azulinho has joined #ruby
dlitvak has joined #ruby
<hxegon> if I have 2 classes, say Person and People, would it make sense to have People inherit from Array?
Snowy has quit []
Rodya_ has joined #ruby
<aegis3121> No
<aegis3121> Well maybe
<volty> better: or Array containing People or People containing array
<aegis3121> but it would probably be better to just include Enumerable
chouhoulis has joined #ruby
Azulinho has quit [Client Quit]
<hxegon> aegis3121 thats probably what I'm looking for, ty
davedev24 has quit [Ping timeout: 240 seconds]
Azulinho has joined #ruby
marcdel has joined #ruby
jbrhbr has joined #ruby
stevenhaddox is now known as stevenhaddox_
davedev24 has joined #ruby
sandstrom has joined #ruby
drocsid has joined #ruby
elaptics is now known as elaptics`away
futilegames has quit [Quit: futilegames]
tercenya_ has quit []
stevenhaddox_ has quit [Quit: Leaving]
futilegames has joined #ruby
maikowblue has joined #ruby
chouhoulis has quit [Ping timeout: 264 seconds]
skade has joined #ruby
<aegis3121> hxegon delegate should be able to solve other problems you have (like using :[])
f4cl3y has quit [Ping timeout: 250 seconds]
pdoherty has joined #ruby
marcdel has quit [Ping timeout: 264 seconds]
<aegis3121> http://words.steveklabnik.com/beware-subclassing-ruby-core-classes kind of puts into words this idea
huyderman has quit [Remote host closed the connection]
davedev2_ has joined #ruby
dfinninger has joined #ruby
tenderlove has joined #ruby
skade has quit [Client Quit]
volty has quit [Quit: Konversation terminated!]
govg has quit [Ping timeout: 240 seconds]
dn` has joined #ruby
skade has joined #ruby
zambini has joined #ruby
NoTroutAboutIt has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
dlitvak has quit [Remote host closed the connection]
yardenbar has quit [Ping timeout: 260 seconds]
scepticulous has quit [Ping timeout: 250 seconds]
zambini has quit [Client Quit]
zambini has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dfinninger has quit [Ping timeout: 264 seconds]
skade has quit [Client Quit]
houhoulis has joined #ruby
dlitvak has joined #ruby
ympeg has joined #ruby
govg has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has quit [Ping timeout: 240 seconds]
aegis3121 has quit [Ping timeout: 272 seconds]
Renich has joined #ruby
amclain has joined #ruby
davedev24 has joined #ruby
blackmesa has joined #ruby
ferr has joined #ruby
usershell has quit [Remote host closed the connection]
antgel has quit [Ping timeout: 265 seconds]
workmad3_ has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev2_ has quit [Ping timeout: 240 seconds]
tomphp_ has joined #ruby
howdoicomputer has joined #ruby
tomphp_ has quit [Client Quit]
dlitvak has joined #ruby
workmad3 has quit [Disconnected by services]
workmad3_ is now known as workmad3
TomyWork has quit [Ping timeout: 248 seconds]
einarj has quit [Remote host closed the connection]
usershell has joined #ruby
tomphp has quit [Ping timeout: 264 seconds]
ferr has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
carraroj has quit [Ping timeout: 265 seconds]
usershell has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 276 seconds]
drocsid has quit [Ping timeout: 264 seconds]
edwinvdgraaf has quit [Ping timeout: 264 seconds]
carraroj has joined #ruby
BrunoSaboia has joined #ruby
arthurix has quit [Read error: Connection reset by peer]
arthurix has joined #ruby
arthurix_ has joined #ruby
andikr has quit [Remote host closed the connection]
caffeinic has quit [Remote host closed the connection]
agentmeerkat has quit [Ping timeout: 256 seconds]
drptbl_ has quit [Quit: My MAC has gone to sleep. zZz..]
usershell has joined #ruby
sepp2k has quit [Quit: Leaving.]
BSaboia has quit [Ping timeout: 276 seconds]
<mikecmpbll> bitwise operations on Bignum are like many many many multitudes slower than fixnum :'(
TomyLobo has joined #ruby
RobertBirnie has joined #ruby
blackms has quit [Quit: Leaving]
arthurix has quit [Ping timeout: 250 seconds]
dmolina has quit [Quit: Leaving.]
ico has joined #ruby
dmolina has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
FernandoBasso1 has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
tomphp has joined #ruby
al2o3-cr has joined #ruby
carella has joined #ruby
<mikecmpbll> nvm i take that back
Macaveli has joined #ruby
Moblin has joined #ruby
Macaveli has quit [Client Quit]
ghox has quit [Read error: Connection reset by peer]
BrunoSaboia has quit [Read error: Connection reset by peer]
dmolina has quit [Ping timeout: 264 seconds]
BrunoSaboia has joined #ruby
jbrhbr has quit [Quit: Leaving.]
tmtwd has joined #ruby
ico_ has joined #ruby
<imperator> there a nicer way to write this? results = network_interfaces.select{ |nic| nic if nic_ids.include?(nic.id) }
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Hounddog has quit [Ping timeout: 250 seconds]
NoTroutAboutIt has quit [Ping timeout: 250 seconds]
<Papierkorb> imperator: leave out the 'nic if' part
workmad3_ has joined #ruby
<Papierkorb> imperator: #select only cares about if the block returns truthy or falsy
<imperator> Papierkorb, ah, true
finisherr has joined #ruby
carraroj has quit [Ping timeout: 260 seconds]
<Papierkorb> imperator: isn't there "get network interface by nic id" method?
<Papierkorb> +a
pdoherty has quit [Ping timeout: 276 seconds]
bMalum has joined #ruby
ico has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
dwfait has quit [Remote host closed the connection]
wolffles has joined #ruby
symm- has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
nettoweb has joined #ruby
c0m0 has quit [Ping timeout: 256 seconds]
ico_ has quit [Ping timeout: 260 seconds]
dlitvak_ has joined #ruby
norc_ has joined #ruby
Melpaws has joined #ruby
carraroj has joined #ruby
marcdel has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
BSaboia has joined #ruby
mikecmpbll has joined #ruby
BrunoSaboia has quit [Ping timeout: 256 seconds]
cschneid_ has joined #ruby
marcdel has quit [Ping timeout: 240 seconds]
dlitvak_ has quit [Ping timeout: 240 seconds]
lucasb has joined #ruby
chouhoulis has joined #ruby
usershell has quit [Remote host closed the connection]
dlitvak has joined #ruby
jpterry has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
usershell has joined #ruby
techsethi has joined #ruby
usershell has quit [Remote host closed the connection]
usershell has joined #ruby
User458764 has joined #ruby
DarkElement has joined #ruby
Melpaws1 has joined #ruby
beast has joined #ruby
<DarkElement> How can I connect and parse a url with nokogiri/openuri? This is never connecting: Nokogiri::HTML.parse(open(url, :proxy => '159.122.253.8:3128'))
bronson has quit [Remote host closed the connection]
drocsid has joined #ruby
drocsid has quit [Remote host closed the connection]
usershell has quit [Remote host closed the connection]
Melpaws has quit [Ping timeout: 260 seconds]
usershell has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
jbrhbr has joined #ruby
<lucasb> I wonder if it makes difference to prepende "http://" to your :proxy string
<lucasb> *prepend
<zambini> lucasb: I ran into this last week, if Nokogiri uses the `URI` lib, you need to prepend the protocol
usershell has quit [Ping timeout: 250 seconds]
BrunoSaboia has joined #ruby
UtkarshRay has quit [Ping timeout: 240 seconds]
<al2o3-cr> lucasb: good call
agentmeerkat has joined #ruby
Azulinho has quit [Remote host closed the connection]
BSaboia has quit [Ping timeout: 250 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
finisherr has left #ruby [#ruby]
rkazak has joined #ruby
usershell has joined #ruby
dlitvak_ has joined #ruby
guacamole has joined #ruby
dlitvak has quit [Ping timeout: 256 seconds]
ThirstForKnowled has joined #ruby
RobertBirnie has quit [Ping timeout: 260 seconds]
B1n4r10 has quit [Ping timeout: 245 seconds]
<DarkElement> I tried it both with and without that
<DarkElement> Didn't make a difference
NoTroutAboutIt has joined #ruby
RobertBirnie has joined #ruby
<DarkElement> :(
ThirstForKnowled has quit [Client Quit]
namic has joined #ruby
tmtwd has quit [Ping timeout: 272 seconds]
OmegaA_ has left #ruby [#ruby]
SenpaiSilver has joined #ruby
speaking1ode has quit [Read error: Connection reset by peer]
TomPeed has joined #ruby
Channel6 has joined #ruby
Melpaws1 has quit [Ping timeout: 240 seconds]
Melpaws has joined #ruby
speakingcode has joined #ruby
namic has quit [Quit: Page closed]
devbug has joined #ruby
howdoicomputer has joined #ruby
sigurding has quit [Quit: sigurding]
solars has quit [Ping timeout: 264 seconds]
floatingpoint has joined #ruby
<lucasb> sorry, I don't know any further. but, open(url) doesn't give any errors?
camillo has joined #ruby
dlitvak has joined #ruby
<dorei> DarkElement: try: require 'nokogiri' ; require 'open-uri' ; doc = Nokogiri::HTML(open('http://www.google.com'))
edwinvdgraaf has joined #ruby
B1n4r10 has joined #ruby
howdoicomputer has quit [Ping timeout: 240 seconds]
carella has quit [Remote host closed the connection]
dlitvak_ has quit [Ping timeout: 240 seconds]
sol_ has quit [Ping timeout: 240 seconds]
camillo is now known as sol_
<DarkElement> dorei, that works
<dorei> DarkElement: if this doesnt work for the url you want, then maybe u need other lib to open the url, use wireshark to verify what's actually being send/received on the network
<dorei> there are some shitty sites that endup in an endless loop unless you get their cookies
<DarkElement> Do I need to do .parse for the doc variable now? (with nokogiri)
<dorei> nop
<DarkElement> awesome
<dorei> doc is your nokogiri document
<DarkElement> and I can just add :proxy => "http://ip:port" now
<dorei> ready for your xpath queries
bronson has joined #ruby
marcdel has joined #ruby
NoTroutAboutIt has quit [Ping timeout: 260 seconds]
<DarkElement> I prefer css selectors
<DarkElement> but yea
<DarkElement> Will it work with the :proxy => "http://ip:port" now?
<hxegon> hmm... 'You may have encountered a bug in ruby'. You don't say.
jam___ has joined #ruby
drptbl has joined #ruby
<dorei> DarkElement: no idea, give it a try
pdoherty has joined #ruby
<DarkElement> I am
s00pcan has quit [Ping timeout: 250 seconds]
<dorei> DarkElement: from open-uri documentation: The environment variables such as http_proxy, https_proxy and ftp_proxy are in effect by default.
Moblin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CoderPuppy has joined #ruby
J4D has joined #ruby
<DarkElement> Oh, so it was already doing proxies?
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby
<DarkElement> Also, it's not working with the proxy I added, unfortunately.
s00pcan has joined #ruby
stamina has joined #ruby
<dorei> DarkElement: try setting you proxy in enviroment variable
jam___ has quit [Ping timeout: 260 seconds]
cndiv has joined #ruby
<DarkElement> what do you mean
<DarkElement> Also
cpup has quit [Ping timeout: 260 seconds]
<DarkElement> I disabled the proxy, it is working, just slower. Oh well
carella has joined #ruby
<DarkElement> Reloading the page on error seems to work
<dorei> DarkElement: if you use bash it's something like: export HTTP_PROXY="http://my.proxy.com/"
<DarkElement> ok
<al2o3-cr> doc = Nokogiri.parse(open("http://www.google.com", :proxy => 'http://159.122.253.8:3128')) # this works on machine
victorty_ has joined #ruby
<DarkElement> al2o3-cr, doesn't work for craigslist though.
[Butch] has joined #ruby
<DarkElement> dorei, then it would default to that proxy?
gregf has joined #ruby
dlitvak_ has joined #ruby
<lucasb> I'm not sure, but maybe the envvar should be lowercase
benjohn has quit [Remote host closed the connection]
<DarkElement> oh well
<DarkElement> I'll just leave the scraper on while I work
victorty_ has quit [Client Quit]
<DarkElement> Will be at coffee shop all day anyway
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
cndiv has quit [Ping timeout: 264 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 240 seconds]
jas02 has quit [Quit: jas02]
dfinninger has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
Melpaws has quit [Ping timeout: 260 seconds]
Spami has joined #ruby
Melpaws has joined #ruby
Outlastsheep has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
dlitvak has quit [Ping timeout: 264 seconds]
Moblin has joined #ruby
govg has quit [Ping timeout: 264 seconds]
anisha has joined #ruby
Gasher has left #ruby ["Leaving"]
aegis3121 has joined #ruby
juddey has joined #ruby
krz has quit [Ping timeout: 240 seconds]
dfinninger has quit [Ping timeout: 276 seconds]
<apeiros> !ban oo7cat !P dear jackcom, we don't like it if you try to evade your ban.
jgt has joined #ruby
tvw has quit [Ping timeout: 265 seconds]
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
krz has joined #ruby
ta has joined #ruby
Channel6 has quit [Quit: Leaving]
ta has quit [Remote host closed the connection]
Moblin is now known as EbokianLabtop
ta has joined #ruby
jbrhbr has quit [Quit: Leaving.]
zambini has quit [Quit: Leaving.]
rodfersou is now known as rodfersou|afk
roshanavand has joined #ruby
roshanavand has quit [Remote host closed the connection]
roshana__ has joined #ruby
<hxegon> anyone want to help me hunt a ruby bug?
<hxegon> (potentially a ruby bug, I should say)
<Papierkorb> hxegon: just begin to describe the issue, and if at all possible, !gist (self-contained) an code example
arlek has joined #ruby
JohnT has joined #ruby
roshana__ has quit [Remote host closed the connection]
<arlek> are there any modern benchmarks between ruby and lua?
dlitvak has joined #ruby
roshanavand has joined #ruby
<hxegon> When I run my tests (minitest) I get a crash report from ruby. I have the crash report, and the code, here. https://github.com/clebrun/taxons
roshanavand has quit [Remote host closed the connection]
jbrhbr has joined #ruby
NoTroutAboutIt has joined #ruby
zambini has joined #ruby
<hxegon> started noticing it around the time I was working on these tests https://github.com/clebrun/taxons/blob/master/test/test_taxons.rb#L54 but I haven't been able to replicate outside guard yet
troulouliou_div2 has quit [Ping timeout: 260 seconds]
roshanav_ has quit [Ping timeout: 240 seconds]
craysiii has joined #ruby
craysiii has quit [Max SendQ exceeded]
zambini has quit [Client Quit]
<TomyLobo> arlek, my last info is that ruby doesn't have a JIT, hence Lua wins by default. I could be wrong, absolutely do not take my word for it
sigurding has joined #ruby
YankNYC has quit [Quit: Connection closed for inactivity]
chouhoulis has joined #ruby
dlitvak_ has quit [Ping timeout: 256 seconds]
craysiii has joined #ruby
dwfait has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
zambini has joined #ruby
<hxegon> ok, about to upload a rakefile that generates the crash for me with 2.3
<hxegon> done
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby
<Papierkorb> hxegon: link?
chouhoulis has quit [Ping timeout: 265 seconds]
<Papierkorb> .. to that 'rakefile' ?
<TomyLobo> arlek, https://attractivechaos.github.io/plb/ in this benchmark LuaJIT is faster than all ruby implementations in all but 2 tests (patmch:1t and patmch:2t)
<TomyLobo> those are regex stuff
<Papierkorb> hxegon: That's far from being self-contained, right now don't have the time to dig through some whole app
<hxegon> Papierkorb I'm reducing it now
iateadonut has quit [Ping timeout: 264 seconds]
krz has quit [Ping timeout: 276 seconds]
<TomyLobo> arlek, the author notes that "Lua does not come with a real regex engine, so its string pattern matching functions were used instead, which were not intended for speed."
NoTroutAboutIt has quit [Ping timeout: 250 seconds]
tomphp has joined #ruby
anisha has quit [Quit: Leaving]
<hxegon> alright, thinking this is with minitest. reduced the test file to this: https://github.com/clebrun/taxons/blob/replicate_bug/test/test_taxons.rb#L19
<Papierkorb> arlek: would've surprised me if LuaJIT would be slower, as it is really fast. Also, MRI does not do JITing.
podman has joined #ruby
nerfando has joined #ruby
<arlek> Hm... so it seems like Ruby would be more on par with Python than it is Lua!
<arlek> Lua's pretty fast!
depesz has left #ruby ["WeeChat 1.4-rc1"]
tomphp has quit [Client Quit]
DarkElement has quit [Quit: Leaving]
firstdayonthejob has joined #ruby
uri___ has joined #ruby
<TomyLobo> and pretty limited :)
<TomyLobo> i think the two are related
dlitvak_ has joined #ruby
d0nn1e has quit [Ping timeout: 240 seconds]
bronson has quit [Remote host closed the connection]
norc_ has quit [Ping timeout: 265 seconds]
<TomyLobo> hah, there's llvm-lua
<Papierkorb> Lua's standard library *is* really limited, but it serves a different purpose than say ruby, so that's fine.
d0nn1e has joined #ruby
dlitvak_ has quit [Remote host closed the connection]
tubuliferous_ has joined #ruby
dlitvak_ has joined #ruby
<TomyLobo> yep
<arlek> Well is there a way to precompile scripts into bytecode with ruby?
<TomyLobo> arlek, what do you mean by bytecode?
sankaber has joined #ruby
rdark has quit [Ping timeout: 256 seconds]
<TomyLobo> like .pyc files in python??
<Papierkorb> arlek: it's possible to do with ruby2.3, but not out of the box using some program parameter (AFAIK!). Also, this feature is experimental, and experimental features WILL be removed if people don't like it.
<TomyLobo> -?
<al2o3-cr> you mean as luac foo.lua arlek
<arlek> Just an intermediate bytecode in order to get past parsing times
<arlek> intermediate form*
<TomyLobo> arlek, parsing is done once
<TomyLobo> i would guess when the file is require'd
dlitvak has quit [Ping timeout: 260 seconds]
<TomyLobo> or first required, rather
<Papierkorb> arlek: Oh, and that file format is afaik not portable. So you could in theory cache it locally, but that's about it. But in general, I don't see the point of doing this...
blaxter has quit [Ping timeout: 250 seconds]
<arlek> I see.
<TomyLobo> Papierkorb, it could be used with omnibus
<Papierkorb> TomyLobo: a what?
<TomyLobo> or not?
<TomyLobo> Papierkorb, do you know gitlab?
<TomyLobo> it comes in a package with everything and its dog in it
<TomyLobo> they call it an omnibus package
Darmani has joined #ruby
<Papierkorb> ok
<TomyLobo> after the thing they use to package it
<Darmani> Hey kids<3
<TomyLobo> it bundles at least the software itself, the required ruby version, nginx, postresql and probably some more things i'm not aware of
<TomyLobo> oh, the gems of course
fantazo has joined #ruby
<Papierkorb> TomyLobo: Well then, that package is then installed locally to your computer I take? Well, no, as far I recall reading the ruby discussion on this feature, it's not portable, so that won't work. You could be lucky that it works from x64 to x64 machine, but that's not guaranteed.
Papierkorb has left #ruby ["Konversation terminated!"]
Papierkorb has joined #ruby
<TomyLobo> Papierkorb, so it's precompiled with cpu-specific optimization even?
einarj has joined #ruby
<Papierkorb> TomyLobo: No idea why it's not portable, I guess the usual endianess issues. In general, no guarantee on being portable, so it's not portable and if it works, you're just lucky :)
steffkes has joined #ruby
steffkes has joined #ruby
<TomyLobo> so let's say i have two amd64 ubuntu trusty machines. you're saying it's possible that it's not possible to run it on both?
<TomyLobo> i.e. down to luck?
dpg_ has joined #ruby
finisherr_ has joined #ruby
<Papierkorb> TomyLobo: As there is no guarantee given on that, yes. You could always be lucky that it works from x64 to x64 machine, but it could blow up if you e.g. to x64 to ARM.
aegis3121 has quit [Ping timeout: 255 seconds]
<TomyLobo> gitlab omnibus packages package ruby
<TomyLobo> which is a native platform-specific binary
<Papierkorb> TomyLobo: I'm not claiming that what you think about won't work. The issue is not if it's possible, but if it's guaranteed to work. If it's not guaranteed, but it works, then you're just lucky that it does
<TomyLobo> so amd64 <-> arm isnt even relevant here
DoubleMalt has quit [Remote host closed the connection]
stamina has quit [Ping timeout: 255 seconds]
<Papierkorb> TomyLobo: there is no guarantee. It doesn't matter from what to what you go.
sftrabbit has joined #ruby
<TomyLobo> oh well, they could always precompile in postinst
krz has joined #ruby
sakix has joined #ruby
freerobby has joined #ruby
radgeRayden_ has joined #ruby
victortyau has quit [Quit: Leaving]
Renich has quit [Remote host closed the connection]
aegis3121 has joined #ruby
Mackerel_ has joined #ruby
sandstrom has joined #ruby
Mackerel_ has quit [Client Quit]
BigFish has joined #ruby
tubuliferous_ has quit [Ping timeout: 250 seconds]
zeroDivisible has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
spooq has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
tildes has joined #ruby
platzhirsch has left #ruby [#ruby]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
Azulinho has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Azulinho has quit [Client Quit]
edwinvdgraaf has joined #ruby
wolffles has quit [Read error: Connection reset by peer]
Bloomer has quit [Remote host closed the connection]
dpg_ has quit [Ping timeout: 276 seconds]
emilford_ has joined #ruby
<hxegon> If anyone is interested, here is what came of that bug: https://github.com/thoughtbot/shoulda-context/issues/46
blackmesa has joined #ruby
Melpaws has quit [Quit: Leaving.]
nettoweb has joined #ruby
emilford has quit [Ping timeout: 255 seconds]
Jackneill has joined #ruby
ur5us has joined #ruby
choke has joined #ruby
wolffles has joined #ruby
ohaibbq has joined #ruby
arup_r has joined #ruby
tomchapin has joined #ruby
dlitvak has joined #ruby
techsethi has quit [Quit: techsethi]
<pizzaops> Is there a way to do a hash lookup with dot syntax, that just returns the key, bare?
<pizzaops> erm, the value, bare.
<pizzaops> Something like myhash.lookup(:foo)
<pizzaops> => 'bar'
Dimik has joined #ruby
<adaedra> &ri Hash#fetch
<pizzaops> rad, thanks!
<jhass> why though?
<adaedra> Be careful that it doesn't have the same semantics as Hash#[] in regard to missing keys.
<pizzaops> Hmm
<jhass> hash[:foo] is a method call too
<pizzaops> I want to mock (stub?) out the return values of certain hash lookups.
disconnekted has joined #ruby
<pizzaops> But I'm not sure how to do it with brace-syntax
<jhass> >> {foo: "bar"}.[](:foo)
<ruby[bot]> jhass: # => "bar" (https://eval.in/504096)
<pizzaops> Ahhhh
<jhass> you can just stub :[]
<pizzaops> Double thanks!
<apeiros> and that'd be a classic case of xy
<jhass> pizzaops: and now you learned why you should describe your problem, not the solution you imagine ;)
Ishido has quit [Remote host closed the connection]
dlitvak_ has quit [Ping timeout: 265 seconds]
emilford has joined #ruby
emilford_ has quit [Ping timeout: 255 seconds]
<pizzaops> lol
<pizzaops> What about this? allow settings.to receive(:host).and_return('pizza.vsphere.com')
<adaedra> rspec?
<pizzaops> yes
<adaedra> you have other ways to mock in rspec iirc.
<Papierkorb> adaedra: if you
bronson has joined #ruby
<adaedra> why wouldn't we stop the xy and you explain the whole problem?
<jhass> settings is the hash?
<Papierkorb> adaedra: if you're thinking about #stub, that's deprecated :)
carraroj has quit [Remote host closed the connection]
Ishido has joined #ruby
carraroj has joined #ruby
<adaedra> Papierkorb: I'm thinking I'm too old for this shit.
<pizzaops> settings is the hash, yes. Basically I have some methods to load settings into said hash from env vars or from a file, but for the method that USES the settings, I want to mock out that file/envvar parsing bit
<pizzaops> and just supply a valid hash
<jhass> so do that?
<jhass> why would you need to mock anything on the hash?
Mon_Ouie has joined #ruby
chouhoulis has joined #ruby
<jhass> mock the method that returns it
<pizzaops> If I knew the answers to those questions I wouldn't be asking :)
<pizzaops> So mock out the parse_config_file method, basically?
vF3hNGxc47h8 has joined #ruby
<jhass> you realize we don't see your screen?
<pizzaops> Yes.
<pizzaops> Just imagine I have some method that parses the config file and returns values, and some method that uses said values, and invokes parse_config_file to get them.
<jhass> probably yes
<pizzaops> And I'm trying to test the method that uses the values, not the functioning of my file parse.
<jhass> it's still very vague
pawnbox has quit [Remote host closed the connection]
<Papierkorb> adaedra: :P
cschneid_ has quit [Remote host closed the connection]
pwnd_nsfw has quit [Ping timeout: 260 seconds]
dwfait has quit [Remote host closed the connection]
dwfait has joined #ruby
ferr has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
dwfait has quit [Remote host closed the connection]
rkazak has quit [Quit: Sleep.....ing....]
dwfait has joined #ruby
jackjackdripper has joined #ruby
<adaedra> pizzaops: If I understand correctly, you want to test that something that uses your option hash does it correctly?
<pizzaops> Right.
<pizzaops> And I don't want to test the logic that creates the hash (in this test)
<pizzaops> I have a method that returns said hash, which should be tested separately, as I understand unit testing.
hannelita has quit [Remote host closed the connection]
<adaedra> Just replace the hash by something else
babblebre has quit [Quit: Connection closed for inactivity]
<pizzaops> adaedra: oh as in, I can replace the method that returns a hash, inside the tests for this thing that uses the tests, with just methodname = { somehash }?
dwfait has quit [Remote host closed the connection]
<pizzaops> uses the hash*
gregf has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<adaedra> or use rspec with expect(hash).to receive(:[]).with(:key).and_return(:potato) or something like that (I feel like Papierkorb wants to fix my syntax)
<adaedra> you don't replace the method which returns the hash, you make something else in place.
<Papierkorb> adaedra: looks fine. Although mocking a Hash sounds like overkill ^^;
<adaedra> Papierkorb: have a better idea?
<pizzaops> adaedra: the thing that "uses" the hash explicitly calls the method though, and sets local var "settings" equal to it. So how can I just use "something else?
<adaedra> Papierkorb: mit mehr Efficiency?
<Papierkorb> pizzaops, adaedra: expect(that_object).to receive(:that_config_hash_method).and_return(foo: 'bar')
ferr has quit [Ping timeout: 260 seconds]
jackjackdripper has quit [Client Quit]
<adaedra> pizzaops: ok, code please.
jackjackdripper has joined #ruby
<pizzaops> Sure.
J4D has quit [Quit: Textual IRC Client: www.textualapp.com]
<adaedra> Papierkorb: yeah, but that don't solve the problem of "does the next methods calls the right things on the hash", how suspect it looks
pawnbox has joined #ruby
Steve_Jobs has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
<pizzaops> adaedra: not sure why gist is making the indents look so weird, not like that in vim, but anyway: https://gist.github.com/pizzaops/5a1469d1a2f72f0ffafb
<pizzaops> I'm trying to test the initialize method.
<adaedra> Because you use tabs and spaces mixed.
<adaedra> :set sw=2 sts=2 sw=8 et
<adaedra> (iirc)
<pizzaops> adaedra: ah you know, the person I'm working with must be using tabs :P
dpg_ has joined #ruby
* adaedra gives pizzaops the tab correcter
<Papierkorb> adaedra: ok, in that case, both ways of "return a hash and expect(it) to receive :[] with :foo and_call_original" and "expect it to receive [] with :foo and return :bar" are equally good & ugly. Let's face it, those lines /are/ ugly ;)
<adaedra> Also called "baseball bat"
<Papierkorb> adaedra: Btw, sorry but I'm not closely following the conversation otherwise
<adaedra> Papierkorb: blame rspec.
<adaedra> Papierkorb: it's ok.
<pizzaops> adaedra: here it is, less weird: https://gist.github.com/pizzaops/b38c286ff517c88401ee
al2o3-cr has quit [Quit: WeeChat 1.3]
<adaedra> Once you checked the settings and thrown your colleague in a volcano, you can ggVG=.
<pizzaops> adaedra: hah. So, it's line 15 that I'm talking about basically.
pwnd_nsfw has joined #ruby
<pizzaops> process_environment_variables and process_config_file can both return a hash but I don't want to actually invoke those real methods when I test initialize.
<adaedra> this gist lacks of tests.
puria has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
<pizzaops> adaedra: because I'm not sure how to fake the hash so I'm not sure how to write the test :P
<pizzaops> adaedra: added one thing I was considering trying in the comments.
<pizzaops> It should at least illustrate what my intention is...
tomchapin has quit [Quit: Textual IRC Client: www.textualapp.com]
dpg_ has quit [Ping timeout: 240 seconds]
<adaedra> Your before do nothing, as you're assigning a local variable which goes out of scope the line after.
<pizzaops> adaedra: I realized that. But it still hopefully demonstrates what I'm trying to do.
<adaedra> Also, you make me hungry with your pizza.
imperator has left #ruby ["Leaving"]
<pizzaops> :)
tomchapin has joined #ruby
tildes has quit [Ping timeout: 260 seconds]
spider-mario has joined #ruby
<adaedra> Your file is not even valid
<pizzaops> ok
<adaedra> ah no, I misread
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
<adaedra> I hate github coloring.
<BigFish> this is terrible
blackmesa has quit [Ping timeout: 245 seconds]
<BigFish> why am i trying to introduce myself to coding, it's like giving myself splinters
Rodya_ has joined #ruby
maikowblue has quit [Ping timeout: 260 seconds]
yqt has joined #ruby
<adaedra> that won't be testable that way
dpg_ has joined #ruby
howdoicomputer has joined #ruby
<adaedra> you can't call process_envthing and process_confthing independently, as they are both called by initialize
dionysus69 has quit [Remote host closed the connection]
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
dionysus69 has joined #ruby
ta has quit [Read error: Connection reset by peer]
<pizzaops> It's fine for just one to return valid data.
<adaedra> so yeah, you have to mock them before initializing your object
<pizzaops> sure
ta has joined #ruby
jokke has quit [Disconnected by services]
krz has quit [Ping timeout: 264 seconds]
<adaedra> and in this mock, return a stubbed hash to see if you hit the right boxes
jokke1 has joined #ruby
RalfJ has joined #ruby
Rodya_ has joined #ruby
<pizzaops> So I tried https://gist.github.com/pizzaops/3f38f6ff44d58ddc88e2, and no matter where I put the before(:all) I get something like `The use of doubles or partial doubles from rspec-mocks outside of the per-test lifecycle is not supported.`
<pizzaops> I've tried it at the describe level, context level, it do level, and always that kind of error. Which makes me feel like I'm a crazy person.
<adaedra> Should be valid in the it block
devbug has quit [Ping timeout: 256 seconds]
ldnunes has quit [Quit: Leaving]
Xeago has joined #ruby
ferr has joined #ruby
fsapo has quit [Remote host closed the connection]
dlitvak has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 240 seconds]
sigurding has quit [Quit: sigurding]
who42 has joined #ruby
<adaedra> That's going too far into rspec for me
asmodlol has quit [Ping timeout: 256 seconds]
<awox> Using savon, is there a way to dump the list of types from a WDSL? I see client.operations returns the functions, but I'm looking for a list of the objects
<pizzaops> adaedra: thanks for trying :)
<Papierkorb> pizzaops: first, put the hash into a let(:config_hash){ .. }. then expect (prefer that over allow if possible) to receive your method .and_return(config_hash) - Prefer that over doing the same in the block.
<Papierkorb> pizzaops: then, don't use .should. just don't.
<pizzaops> heh ok
<Papierkorb> pizzaops: third, expect that process_env_vars to eq config_hash
asmodlol has joined #ruby
<Papierkorb> pizzaops: you can also expect process_env_vars to *be* config_hash
<pizzaops> Papierkorb: why not just let(:setting){..}?
<pizzaops> erm s/setting/settings
PedramT has joined #ruby
<Papierkorb> pizzaops: but IMO 'eq' is strong enough of an expectation here. The configuration class may create a #clone or #dup'licate of the hash, that won't alter the behaviour and thus will only crash your test for no gain (still, IMO)
<Papierkorb> pizzaops: well, you can choose whatever name, both are fine to me
<pizzaops> I just mean that settings is the actual variable the hash is stored in in the initialize method
emilford has quit [Ping timeout: 260 seconds]
<Papierkorb> pizzaops: the let() block returns the settings hash (or in general, you use let() to return test data)
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoviola has joined #ruby
al2o3-cr has joined #ruby
n00bdev has joined #ruby
* adaedra sends Papierkorb a virtual beer
finisherr_ has quit [Ping timeout: 255 seconds]
tubuliferous_ has joined #ruby
devbug has joined #ruby
<pizzaops> hmmm
Rutix has quit [Ping timeout: 245 seconds]
finisherr has joined #ruby
fantazo has quit [Ping timeout: 255 seconds]
dfinninger has joined #ruby
chouhoulis has joined #ruby
fatih has joined #ruby
dfinninger has quit [Ping timeout: 255 seconds]
<Papierkorb> pizzaops: Oh, and I wouldn't use describe blocks like that. I'd do something like this: https://gist.github.com/Papierkorb/320e3902343abc380136
<Papierkorb> pizzaops: also see the warning i wrote as comment
<pizzaops> Papierkorb: ah I see, this makes sense, thanks.
vifino has quit [Ping timeout: 255 seconds]
<Papierkorb> pizzaops: that method name sounds like it accesses ENV or some other (semi-)global variable. Consider modifying those instead.
<pizzaops> Yes, it accesses ENV because I want users to be able to configure via env var
darkf has quit [Quit: Leaving]
<Papierkorb> pizzaops: Like you could do before{ ENV['Foo'] = 'bar' } # And then check in the example that it was handled correctly
n00bdev has quit []
tomphp has joined #ruby
diegoviola has quit [Ping timeout: 260 seconds]
weemsledeux has joined #ruby
johnbburg has joined #ruby
usershell has quit [Remote host closed the connection]
dlitvak has joined #ruby
vifino has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
tomphp has quit [Client Quit]
fantazo has joined #ruby
<pizzaops> Papierkorb: so this — https://gist.github.com/pizzaops/3f38f6ff44d58ddc88e2 — now returns `You must provide credentials in either environment variables or a config file.` but I know from manual testing it won't return that if the env vars are correctly set. So I feel like I'm not successfully faking the return value of #process_environment_variables.
<pizzaops> That being said, #process_environment_variables is an instance method. Could that be why?
<Papierkorb> pizzaops: ...Yes.
dlitvak has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 240 seconds]
<Papierkorb> Don't look into the Rspec 2.6 docs, look at the RSpec 3.x docs
Cohedrin has joined #ruby
astrofog has joined #ruby
kadoppe has quit [Ping timeout: 272 seconds]
<Papierkorb> you're looking for expect_any_instance_of(TheClass).to receive(:the_method)...
Cohedrin has quit [Max SendQ exceeded]
<Papierkorb> I'd still change the environment around the method rather than stubbing it out thoughj
tomphp has joined #ruby
Cohedrin has joined #ruby
kadoppe has joined #ruby
<pizzaops> I think I'm looking for allow_any...., I'm not trying to test the output of TheClass's method TheMethod. I'm trying to fake it.
<pizzaops> i think i have something working now actually
marcdel has quit [Ping timeout: 265 seconds]
tomphp has quit [Read error: Connection reset by peer]
deallocate has joined #ruby
trif has joined #ruby
johnzorn has joined #ruby
deallocate has quit [Client Quit]
trif has left #ruby [#ruby]
diegoviola has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoviola has quit [Changing host]
diegoviola has joined #ruby
<pizzaops> Really appreciate your help.
roshanavand has joined #ruby
mikecmpbll has joined #ruby
FernandoBasso has joined #ruby
hannelita has joined #ruby
who42 has quit [Read error: Connection reset by peer]
roshanavand has quit [Ping timeout: 245 seconds]
who42 has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
hannelita has quit [Ping timeout: 255 seconds]
ELLIOTTCABLE is now known as ELLIOTTCABLEcabl
norc has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kfpratt has joined #ruby
PedramT has quit []
<norc> TomyLobo, technically the MRI does JIT
DurstBurger has joined #ruby
<norc> Not in the same sense that Rubinius or JRuby have it though.
<chrisseaton> norc: you mean it JITs to bytecode?
mwlang has joined #ruby
mondok has joined #ruby
<norc> Or actually no. It is not real JIT.
tomchapin has joined #ruby
<norc> It is just pure interpretation of bytecode.
choke has joined #ruby
griffindy has joined #ruby
tomchapin has quit [Client Quit]
<chrisseaton> norc: I don't think that's what anyone anywhere means by JIT though
<norc> Indeed.
yfeldblum has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc> asm>> puts "foo"
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/504173
ELLIOTTCABLEcabl is now known as ec^
<norc> Is going to yield the same machine code regardless.
asmodlol has quit [Ping timeout: 240 seconds]
<chrisseaton> norc: right, but that's not what anyone calls a 'JIT', technically or informally
<norc> As I said, I correct myself.
vF3hNGxc47h8 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
Rodya_ has quit [Remote host closed the connection]
disconnekted has quit [Remote host closed the connection]
Rodya_ has joined #ruby
asmodlol has joined #ruby
shinnya has joined #ruby
jbrhbr has quit [Quit: Leaving.]
tvw has joined #ruby
zambini has quit [Quit: Leaving.]
codecop has quit [Remote host closed the connection]
tomchapin has joined #ruby
Rodya_ has quit [Ping timeout: 260 seconds]
<Bish> hi guys, how do you model the mysql type "set" in sequel?
<Bish> or how would you guys handle flags for certain datasets
diego3 has joined #ruby
diego3 has quit [Changing host]
diego3 has joined #ruby
johnzorn has quit [Read error: Connection reset by peer]
hannelita has joined #ruby
zacts has joined #ruby
diegoviola has quit [Ping timeout: 240 seconds]
diego3 is now known as diegoviola
Xeago has quit [Remote host closed the connection]
nerfando has joined #ruby
nerfando has quit [Max SendQ exceeded]
nerfando has joined #ruby
arup_r has quit []
nerfando has quit [Max SendQ exceeded]
nerfando has joined #ruby
<norc> Bish, flags would be a different topic. The best way would be to use bitmasks there.
nerfando has quit [Max SendQ exceeded]
nerfando has joined #ruby
xet7 has quit [Read error: Connection reset by peer]
nerfando has quit [Max SendQ exceeded]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nerfando has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robbyoconnor has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
nerfando has quit [Client Quit]
robbyoconnor has joined #ruby
<Bish> norc: so i wouldve handle them myself?
mikecmpbll has joined #ruby
<norc> Bish, for bitmask flags, absolutely.
<Bish> well, the set-type of mysql is the exact same thing
<norc> That is enums..
<Bish> nope
<norc> What do you want. Flags or enums?
<Bish> set,enums both exist in mysql
carraroj has quit [Quit: Konversation terminated!]
steffkes has quit [Ping timeout: 260 seconds]
<norc> Oh!
<Bish> but sequel does't seem to support them, i might be wrong about that though, just didn't find it yet
<norc> If it doesn't, you can still use bitmasks with some integer type.
<Bish> they work great, but sometimes working with it is kind of a hazzle, since they will be put out as strings
<norc> Honestly I dont know much about MySQL.
stevenxl has joined #ruby
<Bish> yeah i thought about that one, too, but i figured if mysql has them, i might use them
<norc> Have successfully managed to avoid it for many years.
<Bish> norc: what are you using for high relational data?
<norc> Bish, PostgreSQL and Oracle.
nerfando has joined #ruby
<Bish> ah, okay, postgre doesn't have sets?
<Bish> ?
howdoicomputer has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Bish> yeah bitmasks, hmm could model them inside the model
akem has quit [Remote host closed the connection]
zerowaitstate has joined #ruby
<norc> Bish, well you have bit strings
<Bish> no, they will internally be handled as 32*x integers
<Bish> last time i checked
<norc> Bish, indeed.
<Bish> actually they're neat, i used them alot with php, but i stopped using anything else than ruby
akem has joined #ruby
<Bish> because, fuck me, ruby is nice, isn't it?
<norc> That depends on who you ask./
diego2 has joined #ruby
<Bish> well if you ask me, it's the best language out there, wish it was faster , though
<choke> I started ruby/rails less than a year ago from PHP. I look at PHP now, and swear I get a rare form of cancer every time I do
diego2 has quit [Changing host]
diego2 has joined #ruby
<norc> Bish, it is all domain specific though.
<norc> Most languages have their uses.
<choke> PHP's use is to make me throw up and wish I was dead... lol
ferr has quit [Quit: WeeChat 1.3]
<Bish> didn't yet hit a problem wish wasn't cleanly solved with ruby
<Ox0dea> PHP is for when you need to GSD, emphasis on the S.
<norc> Any Ruby has its flaws too.
<norc> Just look at Ox0dea for example, he is our prime example.
<Bish> for what?
<norc> When the languages forces you into boredom to come up with things like Otokari...
diegoviola has quit [Ping timeout: 240 seconds]
<Ox0dea> I wasn't bored when I wrote Otokari.
<Ox0dea> I was excited.
<Darmani> hey kidss
aupadhye has quit [Ping timeout: 250 seconds]
howdoicomputer has quit [Ping timeout: 264 seconds]
<norc> Well. The excitement surely was preceeded by boredome.
<Darmani> I wrote this script to check if a word could be an anagram. Do you think it's okay? Or could it be better?
<choke> I dunno about that Ox0dea -- with ruby I GSD more than I ever did with PHP in a single day
fantasticsid has joined #ruby
xet7 has joined #ruby
bMalum has quit [Read error: Connection reset by peer]
dtordable has joined #ruby
<norc> Darmani, you do not need the ternary operator at all.
<Darmani> just noticed that norc lol
<norc> Darmani, for extra points, refine that method into String.
<choke> Darmani, yeah don't need that ternary... would be nicer if there was some sort of dictionary attached so input is one word... there's a big chance that if i have two words, I already know if they're anagrams of each other.
diego2 is now known as diegoviola
<norc> Darmani, and by that I mean refinement. Not just monkey patching String.
<Darmani> norc - how2dothat.jpg
<Ox0dea> >> @_,$_,@__=->_,__{_==''?_:(__[_[$_-$_]]?_[$_-$_]:'')+@_[_[$_..-$_],__]},$$/$$,@__=->_{__,___=_[$_-$_],_[$_..-$_];_==''?_:@__[@_[___,->_{_<__}]]+__+@__[@_[___,->_{_>=__}]]};($__=->*_{__=@__[_[$.]];$*[$_-$_]==__ ?_:$*<<__;_[$.+=$_]?$__[*_]:!$*[$_]})['allergy', 'gallery', 'largely', 'regally'] # Darmani
<ruby[bot]> Ox0dea: # => true (https://eval.in/504176)
dlitvak has joined #ruby
<Ox0dea> There's my anagram checker.
<Bish> >> x = "anna";x[0...x.length] == x[x.length..-1] # naive version
<ruby[bot]> Bish: # => false (https://eval.in/504177)
<Bish> haha, okay
dcunit3d has quit [Ping timeout: 264 seconds]
<Darmani> choke - okay for sure.
<norc> Darmani, I think the examples show how to do it fairly simply.
<Darmani> Ox0dea - once again, that is hideous.
<Ox0dea> Liar.
<norc> It is not hideous.
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Bish> >> x = "anna";x[0...x.length/2] == x[x.length/2..-1] # naive version
fmcgeough has quit [Quit: fmcgeough]
<ruby[bot]> Bish: # => false (https://eval.in/504178)
<norc> The key is just $$/$$
<Bish> :(
<Darmani> xP
Rodya_ has joined #ruby
<norc> Once you figure that one out, the rest suddenly becomes obvious.
<Ox0dea> >> ' '=~/$/ # norc
<ruby[bot]> Ox0dea: # => 1 (https://eval.in/504179)
<Darmani> norc - Thanks! I'm going to read that right now.
<norc> Ox0dea, I like that one too.
tubuliferous_ has quit [Ping timeout: 260 seconds]
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc> updated for version.
<norc> (They are not experimental anymore)
blackgoat has joined #ruby
<Darmani> roger that
<Ox0dea> Just gimped. :/
<Ox0dea> It used to be that you could refine #method_missing but not #const_missing; instead of making the latter refineable, they made the former not. :(
tubuliferous_ has joined #ruby
<norc> Good.
<Ox0dea> Fine.
<norc> I have seen too many awful hacks using method_missing.
<norc> They can remove the method altogether for all I care.
<norc> Just leads to things like Rails.
dlitvak has quit [Ping timeout: 272 seconds]
<norc> ast>> @_,$_,@__=->_,__{_==''?_:(__[_[$_-$_]]?_[$_-$_]:'')+@_[_[$_..-$_],__]},$$/$$,@__=->_{__,___=_[$_-$_],_[$_..-$_];_==''?_:@__[@_[___,->_{_<__}]]+__+@__[@_[___,->_{_>=__}]]};($__=->*_{__=@__[_[$.]];$*[$_-$_]==__ ?_:$*<<__;_[$.+=$_]?$__[*_]:!$*[$_]})['allergy', 'gallery', 'largely', 'regally']
<ruby[bot]> norc: I have parsed your code, the result is at https://eval.in/504180
diegoviola has quit [Ping timeout: 260 seconds]
<norc> Yes. Helpful.
lxsameer has quit [Quit: Leaving]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
mwieloch has joined #ruby
puria has quit [Quit: Leaving]
<Ox0dea> Ha.
mwieloch has quit [Client Quit]
<norc> Ox0dea, btw I realized the other day that the scare about //=~str creating locals is perfectly fine.
karapetyan has quit [Remote host closed the connection]
<norc> Since that is what lhs regex are for.
<Ox0dea> norc: Have you seen? https://eval.in/459020
<norc> :-)
<Ox0dea> Is that right?
ixti has joined #ruby
ixti has quit [Client Quit]
<Ox0dea> The implicit matching stuff for -p and -n a la Perl?
<norc> What do you mean?
Spami has quit [Quit: Leaving]
<Darmani> docs are overrated
<Darmani> explain to me why all this extra shit is necessary
<norc> >> case "2" when /(?<foo>.)/ then puts foo end
<ruby[bot]> norc: # => undefined local variable or method `foo' for main:Object ...check link for more (https://eval.in/504182)
<norc> Even here its fine.
johnzorn has joined #ruby
<norc> Darmani, lets say for some bizarre reason you want to override String#length.
<norc> Darmani, by doing that you are likely to break tons of libraries and gems you might be using.
karapetyan has joined #ruby
Spami has joined #ruby
<Darmani> right.
<Ox0dea> norc: Regexp#=== isn't #=~.
<norc> Monkey patching stdlib clases should only be done with refinements.
<norc> Ox0dea, oh right.
<Darmani> Isn't that why we have Modules??
<norc> Darmani, modules are for reusing code mostlz.
<Darmani> i c
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc> Darmani, whenever you write functions and do not need state, put it inside a module.
<norc> That is the second use case for modules.
<norc> Otherwise you will be polluting Object.
<norc> &ri Math
<norc> is a good example
<Ox0dea> >> def anagrams? words; words.uniq { |w| w.upcase.chars.sort }.size == 1 end; anagrams? %w[snipe pines penis spine] # Darmani
<ruby[bot]> Ox0dea: # => true (https://eval.in/504183)
<Darmani> So, refining is to create your own methods within an already existing class?
<norc> Darmani, it is for modifying a class locally.
<Darmani> Ox0dea: That looks really nice
antgel has joined #ruby
kalopsian has quit [Ping timeout: 260 seconds]
<Ox0dea> Darmani: Is that a dick joke?
<norc> Darmani, think of using a refinement inside a module.
<Darmani> Ox0dea: It can be if you want it to.
hannelita has quit [Remote host closed the connection]
<norc> Darmani, once you leave the module, the class is like it was before, unchanged - which is a good thing.
<Darmani> norc: You are destroying my poor mind.
<norc> Darmani, just stop writing code outside modules and classes.
<Darmani> shattering the illusions that held me together Q.Q
<norc> It is just wrong.
<Ox0dea> Always.
<Darmani> YOUR WRONG
skade has joined #ruby
<Ox0dea> NO U
<Darmani> Lulz
fantazo has quit [Ping timeout: 245 seconds]
choke has joined #ruby
guacamol_ has joined #ruby
stevenxl has quit [Quit: leaving]
<norc> Ox0dea, I just realized that executing Ruby code in the SIGSEGV handler is not a wise idea..
<Darmani> So now...
<Darmani> Whenever I make a new method
<Darmani> I should do it like that?
<Ox0dea> norc: But totally doable!
Asher has quit [Quit: Leaving.]
guacamole has quit [Ping timeout: 240 seconds]
ss_much has joined #ruby
<norc> Ox0dea, except the SIGSEGV is a strong indicator that memory was fucked up - not the best starting point for continuing to execute Ruby code.
gbgdev has quit [Remote host closed the connection]
<norc> (Ignoring how charliesome shows how that can be neatly abused)
<Ox0dea> Aye, that's the trick I had in mind.
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<norc> Ox0dea, did you also know that charliesomes trick was the reason I started dissecting Ruby?
pandaant has quit [Quit: Lost terminal]
B1n4r10 has quit [Ping timeout: 264 seconds]
<norc> Couldnt get it to work on eval.in...
gbgdev has joined #ruby
<norc> That is how it all began. :S
<Ox0dea> Interesting.
<Ox0dea> I do vaguely remember your first questions being about exception handling.
Asher has joined #ruby
<norc> I hear exception and think longjmp.
atomical has quit [Ping timeout: 250 seconds]
<norc> I am that blemished.
kalopsian has joined #ruby
melter has quit [Ping timeout: 240 seconds]
<Ox0dea> Unbowed. Unbent. Unbroken.
antgel has quit [Ping timeout: 260 seconds]
gbgdev has quit [Ping timeout: 250 seconds]
stevemackinnon has joined #ruby
antgel has joined #ruby
<Darmani> https://repl.it/BeoF/1 - norc, Ox0dea
blackmesa has joined #ruby
<Darmani> It's a script that adds a number to an array. Does it look good?
podman has quit [Quit: Connection closed for inactivity]
<norc> Darmani, looks fine.
<norc> Darmani, you can leave the "" parameter to join btw
<Ox0dea> Usually.
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Darmani> norc: really? It does that naturally?
<norc> Darmani, try it out and see.
<Darmani> :o
<Darmani> thats cool.
<norc> Darmani, or better yet, read the documentation on methods before you use them.
<norc> ;-)
<norc> ri is really easy to use
<Darmani> Reading is for suckers
<norc> Then you better start sucking.
<Ox0dea> Dayum!
<Darmani> norc: lmao good answer.
yfeldblum has quit [Ping timeout: 256 seconds]
akem has quit [Remote host closed the connection]
<Darmani> For real though, it feels good to look at a problem and have kind of an idea of how to solve it.
<Ox0dea> >> "Got #{?e * 20}m"
<ruby[bot]> Ox0dea: # => "Got eeeeeeeeeeeeeeeeeeeem" (https://eval.in/504185)
<Ox0dea> Burnt to cinders, mate.
<norc> mmm
blackmes1 has joined #ruby
<Ox0dea> Sorry, that really was a great riposte.
nettoweb has joined #ruby
<Darmani> yes yes credit where credit is due.
<carella> is there any reason you used .split(//) instead of .split('')?
<Ox0dea> carella: Did you mean #chars?
<Ox0dea> >> 'foo'.chars
<ruby[bot]> Ox0dea: # => ["f", "o", "o"] (https://eval.in/504186)
ixti has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
<Darmani> carella - I understood them to be the same thing.
hannelita has joined #ruby
nettoweb has quit [Max SendQ exceeded]
<Darmani> Although you should probably ask norc or Ox0dea. They are great at sucking =P
<norc> I dont read Ruby documentation.
Rickmasta has joined #ruby
<carella> Darmani: I think (//) may work slower because it is a regex.
fantasticsid has quit [Quit: ERC (IRC client for Emacs 25.1.50.1)]
<norc> Ox0dea, I haven't heard that in a while.
<Darmani> carella - I mean... Possibly?
fantasticsid has joined #ruby
<tubbo> haha Ox0dea i love that
<carella> Ox0dea: Darmani, .chars looks better anyway
<havenwood> carella: A method without arguments is simpler than a method with arguments. :)
nettoweb has joined #ruby
<Darmani> carella - You're probably right ^.^ thanks
<Ox0dea> It's got nothing to do with looks or whatever; split(//) is retarded cargo-culting that should've died long ago.
gerep has joined #ruby
<havenwood> Is that a thing?
<Ox0dea> Of course.
<havenwood> Bastages!
<Darmani> norc - https://repl.it/BeoF/2
<carella> havenwood: I dont think I can agree with you in general
<Darmani> Why isn't my exception working?
<gerep> Hello people. I'm using FPM and running it with bundle exec I get an error on a ruby 2.0.0 file: find.rb on line 40 No such file or directory (Errno::ENOENT). The gist with my command and the error message: https://gist.github.com/gerep/20bd09fa45fe80beb3e0
blackmes1 has quit [Read error: Connection reset by peer]
apneic has joined #ruby
<havenwood> carella: It's true nonetheless.
<norc> havenwood, look at some popular Java classes. The endless stream of FactoryFactories is their newest achievement.
<carella> havenwood: Are you speaking about method that can't take arguments or about the method that can take no argument? :)
melter has joined #ruby
<carella> I thought of the latter at first
<Ox0dea> carella: Methods which take no arguments are likely to be more focused and thus easier to finagle into doing The Right Thing.
<Ox0dea> Sometimes.
<carella> Then you have to know what default will be use
<havenwood> carella: Like use ''.chars (no arguments) rather than any combo of a method with arguments.
BrunoSaboia has quit [Quit: Leaving]
<norc> Ox0dea, especially split. ;-)
<norc> Hah!
<carella> In that case, I agree
<norc> What a horrid Perl remnant.
sakix has quit [Ping timeout: 265 seconds]
<havenwood> carella: [:pie].one? rather than [:pie].size == 1
<Ox0dea> >> "foo \s\a\t\a\n bar".split
<ruby[bot]> Ox0dea: # => ["foo", "\a", "\a", "bar"] (https://eval.in/504200)
<Darmani> Ox0dea, norc - https://repl.it/BeoF/2
<norc> Ox0dea, that works as expected until $; is set.
<Ox0dea> norc: Just so.
<Darmani> when you get a chance, take a look.
<havenwood> $; = ?\N
<havenwood> I mean: ?\S
<norc> Darmani, use .chars instead of .split(//)
<Ox0dea> havenwood: Huh?
<Darmani> fine.
dstarh has joined #ruby
<havenwood> Ox0dea: Just blathering in psudocode. I need more coffee!
johnbburg has quit [Quit: Leaving.]
<norc> Darmani, then turn the conditional around to use Enumerable#any?
<norc> Which is more sensible to read.
cicloid has joined #ruby
<Ox0dea> havenwood: I mean, you *can* make the default splitter a Regexp, but ?\S is just "S".
<norc> returning from blocks is just ugh ugh.
arlek has quit [Ping timeout: 265 seconds]
<havenwood> Ox0dea: aye
<Darmani> norc - Okay fine. But it comes up as false and it shouldn't...
<havenwood> Ox0dea: I should have said: /\S/
<Ox0dea> Oui.
<norc> Darmani, you also probably want to use < rather than <=
jbrhbr has joined #ruby
<norc> Darmani, because 010 is quite a valid number.
<Ox0dea> >> 010
<ruby[bot]> Ox0dea: # => 8 (https://eval.in/504203)
<Darmani> norc - wat
<Ox0dea> ¯\_(ツ)_/¯
<norc> Ox0dea, well we are doing "010".to_i
<norc> so.
aspire has joined #ruby
<norc> Darmani, https://repl.it/BeoF/5
<Ox0dea> >> '%d' % '010' # norc
<ruby[bot]> Ox0dea: # => "8" (https://eval.in/504204)
<havenwood> >> Integer("010")
<havenwood> #=> 8
<ruby[bot]> havenwood: # => 8 (https://eval.in/504205)
<Ox0dea> Haha.
<norc> "010".to_i
<norc> okay
<norc> >> "010".to_i
<ruby[bot]> norc: # => 10 (https://eval.in/504206)
<norc> that is quite random here...
jam_ has joined #ruby
<Ox0dea> How do we stop the madness?
<Darmani> that link doesn't work norc.
<norc> Just accept it and call it Ruby.
gerep has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
einarj has quit [Remote host closed the connection]
zambini has joined #ruby
<norc> Darmani, it works just fine.
mary5030 has quit [Remote host closed the connection]
<norc> Ox0dea, sadly this is probably something that will never be changed to be consistent
<Ox0dea> Definitely not. :/
<Darmani> http://ideone.com/p95sdq - norc
<norc> Darmani, drop the return nil.
<norc> please.
<norc> it is not necessary.
<Darmani> norc - It's part of the challenge from the website.
<Darmani> I didn't choose to include it.
<norc> Darmani, the website is dumb then.
DoubleMalt has joined #ruby
<Darmani> Why does it return nil at all? It shouldn't.
<norc> Darmani, take a good long look at this> arr.any?{ |i| i < 0; return nil}
<Darmani> I don't get that.
<norc> Take a real good long look at it.
<Darmani> ok.....
SenpaiSilver has quit [Quit: Leaving]
<norc> It is just a really long way of simply saying: return nil.
stevenxl has joined #ruby
caffeinic has joined #ruby
ascarter has joined #ruby
<norc> (Assuming the array has at least one element)
<Darmani> o,o
nettoweb has quit [Ping timeout: 264 seconds]
<Ox0dea> Just keep throwing shit at the wall.
<Darmani> ohh wait...
<norc> Darmani, the block consists or two separate expressions.
<Darmani> return nil isn't under the conditional???
<carella> norc: I think it was a stub for one's implementation
<norc> Darmani, yes, and there is absolutely no reason whatsoever to return nil.
<Darmani> whaaaaat that's retarded
<Darmani> it's within the block
<norc> Darmani, arr.any?{ |i| i < 0 }
<norc> Darmani, is just fine.
<Darmani> how is it not under the conditional?
jam_ has quit [Ping timeout: 264 seconds]
<carella> You don't have a condition operator like `if` in there
<carella> why should it be?
<Darmani> "unless"
<norc> Darmani, you are doing something like this.
<Darmani> norc - I get that now.
<carella> Unless is outer scope
emilford has joined #ruby
<norc> Darmani, and again, arr.any?{ |i| i < 0 } - do it like that.
<Darmani> I did. That's how it looks in my editor.
<Darmani> norc - Thanks norc. For putting up with me and my stupid questions.
<Darmani> You're my hero.
ramortegui has quit [Quit: Ex-Chat]
Jackneill has quit [Remote host closed the connection]
<lucasb> Darmani: you are learning ruby pretty fast, congrats.
edwinvdgraaf has quit [Read error: Connection reset by peer]
bollullera has joined #ruby
edwinvdgraaf has joined #ruby
<Darmani> lucasb - Thanks dude. But I can't actually create a program to save my life. I can write tiny scripts that do this and that. But that's all :P
dfinninger has joined #ruby
houhoulis has quit [Remote host closed the connection]
<Cohedrin> Darmani what program do you want to be writting?
<Cohedrin> most programs start as just writting a script
<Cohedrin> then they evolve into a "program"
norc has quit [Ping timeout: 276 seconds]
TomPeed has joined #ruby
rodfersou|afk has quit [Quit: leaving]
<jbrhbr> Integer() and .to_i differ in integer format error handling as well (exception vs do-your-best). it's for the same reason but i first ran across this inconsistency there
finisherr has quit [Ping timeout: 255 seconds]
<Darmani> Cohedrin - yeah... I never know how to answer that question. That's what everyone keeps telling me though.
<Darmani> Cohedrin - One of these days I want to make a music player of some sort. When I'm at Ox0dea's or Radar's level =P
lacrymology has joined #ruby
<Radar> Hi.
dfinninger has quit [Ping timeout: 276 seconds]
<Darmani> Hey boo<3
<Ox0dea> Darmani: Dir['*.mp3'].each { |f| `mpg123 #{f}` }
<Ox0dea> !next
<lacrymology> how can I construct a list and then yield each element in it?
<apeiros> Ox0dea: use glob and drop the .each ;-p
ur5us has quit [Remote host closed the connection]
<Darmani> glob? Really that's a thing? lmao
<Ox0dea> apeiros: Could still use #[].
<apeiros> Ox0dea: sugared [] does not take blocks
<Ox0dea> apeiros: I meant unsugared, of course.
<Ox0dea> *desugared
<apeiros> yeah, ew. don't :)
<Ox0dea> Won't. :)
<apeiros> sugarfree
choke has joined #ruby
Rodya_ has quit [Remote host closed the connection]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<carella> what's that?)
<Ox0dea> carella: Dir['*.foo'] returns all the files in the current directory that match that pattern. If you spell it differently, you can say Dir.glob('.*foo') { |f| ... } to "do something" with each file.
<Ox0dea> Dir[foo] is just "sugar" for Dir.[](foo), but only the latter can take a block.
<carella> So #[] is a syntax sugar for glob?
marr has quit [Ping timeout: 245 seconds]
<Ox0dea> It's an alias, yeah.
<carella> oh, thanks
croberts has joined #ruby
<Radar> lacrymology: Do you have an example of what you're trying to do?
zenlot1 has joined #ruby
decoponio has quit [Quit: Leaving...]
moeabdol has joined #ruby
yfeldblum has joined #ruby
<lacrymology> Radar: I get a list of objects, modify some of them, and filter them, it's kind of involved. At the end I have a list and I want the caller to do `foo do |e| ... end`
skade has quit [Ping timeout: 276 seconds]
<lacrymology> with |e| being each element of that list
moeabdol has quit [Client Quit]
<Ox0dea> lacrymology: list.each { |e| yield e }
diegoviola has joined #ruby
huluhuluhulu has joined #ruby
<Radar> ^
moeabdol has joined #ruby
<Ox0dea> Can't say list.each(&method(:yield)) since yield isn't a method.
zenlot has quit [Ping timeout: 272 seconds]
johnzorn has quit [Remote host closed the connection]
karapetyan has quit []
<lacrymology> thanks
<lucasb> I put a yield method in my Object
<Ox0dea> Ballsy.
radgeRayden__ has joined #ruby
<Ox0dea> >> Enumerator::Yielder.instance_method :yield
<ruby[bot]> Ox0dea: # => #<UnboundMethod: Enumerator::Yielder#yield> (https://eval.in/504213)
karapetyan has joined #ruby
radgeRayden_ has quit [Ping timeout: 250 seconds]
<Radar> Ok calm dowon there
<Radar> -o
<bnagy> dwon?
<Radar> yeah
SenpaiSilver has joined #ruby
fatih has quit [Quit: Connection closed for inactivity]
aryaching has quit [Read error: No route to host]
devbug has quit [Ping timeout: 250 seconds]
<Ox0dea> Hash#merge lets you pass a block for resolving conflicts; it'd be nice if #invert did too.
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
phredus has quit [Read error: Connection reset by peer]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aryaching has joined #ruby
CloCkWeRX has joined #ruby
<Derailed> Hey everyone, newbie ruby question here: What's the different between defining classes in a module, versus defining a class like "class MyModule::MyClass"
<lucasb> {}.merge(h.to_a.map(&:reverse)) { ... }
<lucasb> oops, no, this doesn't work
mondok has quit [Ping timeout: 255 seconds]
ropeney has joined #ruby
<Ox0dea> Derailed: Constant resolution works differently: https://eval.in/504214
casadei_ has quit [Remote host closed the connection]
aspire has quit [Quit: Leaving]
dlitvak has joined #ruby
Hammy_Work has joined #ruby
<carella> Isn't MyModule::MyClass exist mostly for module extension?
devbug has joined #ruby
lucasb has quit [Quit: leaving]
<Derailed> Ox0dea, thanks. I clearly need to get my head around constant resolution and namespaces in ruby. I'm looking at code that defines classes "Product", "Domestic::Product" and "International::Product", and just trying to work out if they might ever be 'mistaken' for each other
cicloid has quit [Quit: zzZZzzzZzzzzzZZZz]
myntcake has quit [Quit: Leaving]
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Derailed> But I guess if you're ever referring to those classes, you would always do so with the fully qualified name?
karapetyan has quit [Remote host closed the connection]
<Derailed> ...unless you're a in a block delimited by 'module Domestic' for example?
<Ox0dea> Derailed: `self` is the same in both of those.
<Derailed> in both of which?
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nerium has joined #ruby
<Ox0dea> If you replace `p Foo` with `p self`, you get `M::C` in both cases.
<Ox0dea> Resolving the constant `Product` is never a "guessing game", so to speak.
<BigFish> the tutorial for Greeter classes are already giving me errors
<BigFish> it's a sign, i should run while i can
<Ox0dea> Yep.
phredus has joined #ruby
<Ox0dea> Don't succumb to the sunk cost fallacy.
<BigFish> sunk cost ?
<Derailed> Ox0dea, I think I get it, I'll find something to read about the constant resolution
<BigFish> .
who42 has quit [Ping timeout: 264 seconds]
<Ox0dea> Derailed: It's more or less like method resolution.
<Ox0dea> It walks up the ancestor chain looking for a matching constant; if it doesn't find one, it tries to invoke #const_missing on the receiver, and then walks up the ancestor chain resolving that.
herbst has joined #ruby
pdoherty has quit [Ping timeout: 250 seconds]
zambini has quit [Quit: Leaving.]
<Ox0dea> You'd only have to use a qualifier if you wanted to refer to Domestic::Product from within Internation::Product or vice-versa.
rakm has joined #ruby
zambini has joined #ruby
NoTroutAboutIt has joined #ruby
<Derailed> Ox0dea, side track: am I correct that the actual .rb files or directories these classes are defined in is meaningless? Unlike Python/java/etc, Ruby does not CARE what the filename is (although rails might care for it's magical autoloading?)
<Ox0dea> Derailed: Just so.
<Ox0dea> No harm in keeping things sanely organized, of course.
<Derailed> For context, it's a rails project I'm reading. These are all different models
<Ox0dea> Rails is picky about directory structure out-of-the-box, and there's little sense in bothering to circumvent it there.
sakix has joined #ruby
<Ox0dea> Convention > configuration only works if everybody's on board. :P
babblebre has joined #ruby
wolffles has quit [Quit: wolffles]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
solocshaw has joined #ruby
<BigFish> wrong number of arguments..
<BigFish> I don't see how, I'm following the dumb tut just fine
DoubleMalt has quit [Remote host closed the connection]
<BigFish> unless @name is a variable
<BigFish> ( ͡° ͜ʖ ͡°)
<Ox0dea> ¯\_(ツ)_/¯
<Ox0dea> Learn the violin.
Rickmasta has joined #ruby
sakix has quit [Ping timeout: 260 seconds]
Axy has quit [Ping timeout: 256 seconds]
moeabdol has quit [Quit: WeeChat 1.4]
antgel has quit [Ping timeout: 264 seconds]
Mia has quit [Read error: Connection reset by peer]
<Radar> BigFish: Just give it the right number of arguments.
sperant has joined #ruby
sperant has quit [Client Quit]
<Radar> That'll fix it.
<BigFish> stahp
<Radar> BigFish: what version of Ruby do you have installed btw? 2.3 has a better error message for that case.
<BigFish> i know you guys are programmers but these jokes give me no confidence
devbug has quit [Ping timeout: 264 seconds]
<carella> Paste some code
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
moeabdol has joined #ruby
wolffles has joined #ruby
wolffles has quit [Client Quit]
cicloid has joined #ruby
<BigFish> bottom of that page
<Radar> BigFish: No, your code.
<BigFish> :3c ?
<Radar> ?gist BigFish
<BigFish> you mean what i'm typing in
<ruby[bot]> BigFish: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<Radar> Take what code you have and put it on that.
<Radar> Yes.
ChameleonSix has joined #ruby
wolffles has joined #ruby
devbug has joined #ruby
<BigFish> How exciting, sharing tut code.
<Radar> Truly.
last_staff has quit [Quit: last_staff]
<Radar> BigFish: What method are you calling to get the error that you're seeing?
uri___ has quit [Quit: --]
<Radar> BigFish: (gotta crawl before you can walk, etc.)
huluhuluhulu has left #ruby [#ruby]
<carella> initialize, not initalize
<carella> to begin with
<BigFish> hmph
<carella> but that's another issue
ChameleonSix has left #ruby [#ruby]
<Radar> carella: That might be it actually.
uri_ has joined #ruby
<zenspider> what is this, python?
<zenspider> unreadable
<Radar> zenspider: THIS. IS. ... ok I'll stop now.
<carella> Radar: shouldn't be. It will just print nil
<Radar> zenspider: The indentation needs some work, but he's just new.
<ja> haha
choke has joined #ruby
<Radar> carella: Greeter.new("name") would give the wrong number of arguments.
<carella> Radar: crap, right
<Radar> ArgumentError: wrong number of arguments (given 1, expected 0) in my Ruby 2.34.
<Radar> Ruby 2.3*
Domaldel has quit [Quit: Leaving]
B1n4r10 has joined #ruby
<zenspider> carella: is it another issue?
<zenspider> it isn't, is it?
<BigFish> uh oh
<BigFish> forgot to end after say_hi
guacamole has joined #ruby
<zenspider> no
<zenspider> that's a syntax error, you didn't get a syntax error
howdoicomputer has joined #ruby
<carella> zenspider: that's it
<zenspider> you just have shitty indentation and can't tell you ended it
<carella> BigFish: You didn't forget
<BigFish> no I just had to rewrite it
<zenspider> you didn't HAVE to rewrite it. you rewrote it.
<carella> Do you really write it right in the irb?
<BigFish> It's what I know right now so yes
<BigFish> It's like what Radar said, crawling before I can walk
karapetyan has joined #ruby
guacamol_ has quit [Ping timeout: 255 seconds]
pdoherty has joined #ruby
<BigFish> huh
<BigFish> it worked for some reason
<carella> Well, it's your call, but i'd suggest writing it in the text editor
dn` has quit [Read error: Connection reset by peer]
herbst has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
dn` has joined #ruby
<carella> so you wouldn't have to retype it everytime
mary5030 has joined #ruby
zambini has quit [Quit: Leaving.]
guacamol_ has joined #ruby
dpg_ has quit [Ping timeout: 260 seconds]
dlitvak has quit [Ping timeout: 250 seconds]
dlitvak_ has joined #ruby
herbst has joined #ruby
asmodlol has quit [Ping timeout: 260 seconds]
howdoicomputer has quit [Ping timeout: 260 seconds]
lucasb has joined #ruby
<Radar> ^
zambini has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
moeabdol has quit [Quit: WeeChat 1.4]
vikas027 has joined #ruby
guacamole has quit [Ping timeout: 245 seconds]
asmodlol has joined #ruby
zambini has quit [Client Quit]
chouhoulis has quit [Remote host closed the connection]
uri_ has quit [Ping timeout: 265 seconds]
mary5030 has quit [Ping timeout: 240 seconds]
eyesnot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dpg_ has joined #ruby
chouhoulis has joined #ruby
pawnbox has joined #ruby
dlitvak_ has quit [Ping timeout: 240 seconds]
<vikas027> Hello Everyone, how can I write a file to a particular location in ruby, without location it is working fine though. - https://dpaste.de/FPiR
karapetyan has quit [Remote host closed the connection]
<Radar> vikas027: line 13 is invalid syntax.
ur5us has joined #ruby
zast has joined #ruby
<Radar> vikas027: Perhaps you meant FIle.join("/tmp/configs", job) ?
karapetyan has joined #ruby
ur5us has quit [Remote host closed the connection]
FernandoBasso has quit [Quit: Leaving]
<vikas027> @Radar: No, I don't want to join the files
<carella> it will join the name of the folder with the filename
<vikas027> Radar: There are bunch of different files, which I want to write to a location
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lucasb> I created a class Box with a single instance variable "@value", just to play with the concept of a variable storage as a first class object. this pattern has a name? is there example of this in the ecosystem or other languages?
<Radar> vikas027: Line 13 should probably be open(File.join("/tmp/configs/",job), 'a') { |f|
zambini has joined #ruby
northfurr has joined #ruby
<vikas027> carella: Ah, okay. Got it. Thanks, I will try this out.
<vikas027> Radar: Thanks to you too. :)
devbug has quit [Ping timeout: 265 seconds]
<Radar> ?code lucasb
<ruby[bot]> lucasb: We can't help you without your code, please post it to https://gist.github.com
<lucasb> class Box; def initialize(value); @value = value; end; end; Box.new(42)
<carella> please, open the link :)
dpg_ has quit [Ping timeout: 260 seconds]
dfinninger has joined #ruby
lkba has joined #ruby
<Radar> lucasb: That's just an instance variable which is exactly what it says on the tin: a variable for just that one instance.
pawnbox has quit [Ping timeout: 272 seconds]
<Ox0dea> lucasb: That should just be `Box = Struct.new(:value)`, mind.
<lucasb> Ox0dea: indeed, that would be simpler
jottr has quit [Ping timeout: 256 seconds]
<Ox0dea> Not simpler, but easier.
karapetyan has quit [Ping timeout: 260 seconds]
<lucasb> I'm just playing with ideas, I still don't know what I really want :)
<lucasb> anyway, I wanted a mutable self. But then I hit that error "Can't change the value of self"
zerowaitstate has quit [Quit: leaving]
<lucasb> that's why I created this Box
<Ox0dea> Are you sure you want a mutable self?
<vikas027> Radar, Carella: Thank you for pointing me there. This is working fine :) https://dpaste.de/6gpJ
<Radar> Great :)
<lucasb> Ox0dea: well, I'm just experimenting
dpg_ has joined #ruby
rcs has quit [Remote host closed the connection]
<Ox0dea> lucasb: I won't knock that.
astrofog has quit [Quit: Quite]
kalopsian has quit [Ping timeout: 250 seconds]
rcs has joined #ruby
aegis3121 has quit [Ping timeout: 260 seconds]
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
<carella> lucasb: When you asked about the name of this pattern what exactly did you mean? A class that will consist of exactly one variable?
blackmes1 has joined #ruby
skade has joined #ruby
freerobby has quit [Quit: Leaving.]
<lucasb> carella: yes, just wanted to know if there was something as simple as this concept in the wild. I think I saw something like that in Rust, but I don't understand that language very well
<Ox0dea> Boxing is for when your primitive types can't behave like objects.
<Ox0dea> That doesn't apply to Ruby.
uri_ has joined #ruby
<lucasb> yes, in that sense, I agree.
Mia has quit [Ping timeout: 256 seconds]
skade has quit [Client Quit]
x_ has joined #ruby
emilford has quit [Ping timeout: 276 seconds]
<Ox0dea> lucasb: https://eval.in/504236
<carella> lucasb: it can be useful if you want to separate your domain entity from its implementation
dlitvak has joined #ruby
<Ox0dea> lucasb: But probably pretend you didn't see that.
uri_ has quit [Client Quit]
<Ox0dea> It quickly goes wonky: https://eval.in/504237
djbkd has joined #ruby
<Ox0dea> Oh, and here's Hash#invert with conflict resolution: https://eval.in/504238
skade has joined #ruby
NoTroutAboutIt has quit [Ping timeout: 240 seconds]
futilegames has quit [Quit: futilegames]
<lucasb> yeah, I know nothing about fiddle. I still need to clarify my ideas before asking something concrete. Thanks for the initial sanity check, people :)
rcs has quit [Quit: ZNC - http://znc.in]
casadei has joined #ruby
futilegames has joined #ruby
rcs has joined #ruby
dlitvak has quit [Remote host closed the connection]
futilegames has quit [Client Quit]
NoTroutAboutIt has joined #ruby
firstdayonthejob has quit [Ping timeout: 276 seconds]
chouhoul_ has joined #ruby