havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
jmdade has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rollabunna has joined #ruby
shadoi has joined #ruby
shadoi has quit [Client Quit]
gord0 has joined #ruby
Xeago has joined #ruby
shadoi has joined #ruby
shadoi has quit [Client Quit]
<gord0> sorry new to ruby. best way to install local gems. i saw the option --local as well as --user-install. which one to use?
Giordano has joined #ruby
RegulationD has quit [Remote host closed the connection]
aibot has quit [Ping timeout: 240 seconds]
shadoi has joined #ruby
shadoi has quit [Client Quit]
ebbflowgo has joined #ruby
beauby has quit [Ping timeout: 244 seconds]
<jhass> --local is about network connections, not install location
InvGhost has quit [Ping timeout: 272 seconds]
roshanavand has quit [Remote host closed the connection]
shadoi has joined #ruby
shadoi has quit [Client Quit]
<Giordano> Hey guys, I wanna try TDD with ruby and was wondering if there is a nice open source project that follows TDD and that I could contribute. I would appreciate if anyone could give me some suggestions
shadoi has joined #ruby
shadoi has quit [Client Quit]
aibot has joined #ruby
sanjayu has quit [Ping timeout: 276 seconds]
shadoi has joined #ruby
shadoi has quit [Client Quit]
IrishGringo has joined #ruby
shadoi has joined #ruby
shadoi has quit [Client Quit]
Eising has quit [Ping timeout: 255 seconds]
shadoi has joined #ruby
shadoi has quit [Client Quit]
Eising has joined #ruby
shadoi has joined #ruby
shadoi has quit [Client Quit]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
howdoicomputer has quit [Ping timeout: 260 seconds]
shadoi has joined #ruby
shadoi has quit [Client Quit]
<jericon> jhass: how about this?
<jericon> >> olddate = DateTime.now(); newdate = olddate.next_year; oldate.step(newdate).select { |date| date.day == 1 }.map { |date| date.strftime('%Y.%m') }
<ruboto> jericon # => uninitialized constant DateTime (NameError) ...check link for more (https://eval.in/475339)
<jericon> >> require 'date'; olddate = DateTime.now(); newdate = olddate.next_year; oldate.step(newdate).select { |date| date.day == 1 }.map { |date| date.strftime('%Y.%m') }
<ruboto> jericon # => undefined local variable or method `oldate' for main:Object (NameError) ...check link for more (https://eval.in/475340)
shadoi has joined #ruby
shadoi has quit [Client Quit]
<jericon> bah
<jericon> >> require 'date'; olddate = DateTime.now(); newdate = olddate.next_year; olddate.step(newdate).select { |date| date.day == 1 }.map { |date| date.strftime('%Y.%m') }
<ruboto> jericon # => ["2015.12", "2016.01", "2016.02", "2016.03", "2016.04", "2016.05", "2016.06", "2016.07", "2016.08", ...check link for more (https://eval.in/475343)
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
Xeago has quit [Ping timeout: 264 seconds]
<jhass> jericon: well, to get n elements you build a list of 30n items
<jericon> Yeah.
<jericon> true
vasilakisfil has quit [Ping timeout: 240 seconds]
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
tmtwd has quit [Ping timeout: 240 seconds]
shadoi has joined #ruby
shadoi has quit [Client Quit]
babblebre has quit [Quit: Connection closed for inactivity]
shadoi has joined #ruby
shadoi has quit [Client Quit]
cdg has quit [Remote host closed the connection]
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
pawnbox has joined #ruby
shadoi has joined #ruby
shadoi has quit [Client Quit]
<zenspider> rawr
shadoi has joined #ruby
shadoi has quit [Client Quit]
aspiers_ has joined #ruby
NeverDie has quit [Quit: http://radiux.io/]
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
lkba has joined #ruby
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
momomomomo has quit [Quit: momomomomo]
<gord0> jhass: so if i just do gem install /path/to/gem. it should be ok?
shadoi has joined #ruby
shadoi has quit [Client Quit]
<jhass> gord0: depends on your system configuration
pawnbox has quit [Ping timeout: 260 seconds]
<jhass> and what you want
dviola has quit [Quit: WeeChat 1.3]
<gord0> jhass: i just want to be able to install them form a local path. i'm on centos 6.6
shadoi has joined #ruby
shadoi has quit [Client Quit]
yoongkang has joined #ruby
<jhass> should work
shadoi has joined #ruby
karapetyan has quit [Remote host closed the connection]
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
kies has joined #ruby
axsuul has quit [Ping timeout: 255 seconds]
shadoi has joined #ruby
shadoi has quit [Client Quit]
roshanavand has joined #ruby
<gord0> thanks
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yoongkang has quit [Ping timeout: 260 seconds]
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
houhoulis has joined #ruby
shadoi has joined #ruby
shadoi has quit [Client Quit]
jackjackdripper has quit [Quit: Leaving.]
roshanavand has quit [Ping timeout: 240 seconds]
shadoi has joined #ruby
shadoi has quit [Client Quit]
jobewan has quit [Quit: Leaving]
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
IrishGringo has quit [Read error: Connection timed out]
nateberkopec has quit [Quit: Leaving...]
arooni has joined #ruby
shadoi has joined #ruby
shadoi has quit [Client Quit]
shadoi has joined #ruby
shadoi has quit [Client Quit]
htmldrum has quit [Ping timeout: 272 seconds]
blackmesa has quit [Ping timeout: 272 seconds]
DoctorWedgeworth has joined #ruby
_seanc_ has quit [Ping timeout: 264 seconds]
n_blownapart has joined #ruby
nateberkopec has joined #ruby
gambl0re has quit [Ping timeout: 260 seconds]
_blizzy_ has joined #ruby
Mia has quit [Read error: Connection reset by peer]
rodfersou has quit [Remote host closed the connection]
<baweaver> !kick shadoi Fix your connection
m_abdelfattah has quit [Quit: Textual IRC Client: www.textualapp.com]
<reaVer> that is not a connection issue
<reaVer> he joined and left all those times
RobertBirnie has joined #ruby
shock_one has joined #ruby
nettoweb has joined #ruby
<DoctorWedgeworth> sorry for newbie question. How can I make this work in one line? I think the problem is that both arguments are in an array instead of being two separate numbers: Range.new("45000-46000".split(/[^\d]+/, 2).map { |s| s.to_i })
<centrx> >> Range.new("45000-46000".split(/[^\d]+/, 2).map { |s| s.to_i })
<ruboto> centrx # => wrong number of arguments (1 for 2..3) (ArgumentError) ...check link for more (https://eval.in/475355)
<Radar> y u use regex are you trying to kill us all?
<Radar> >> Range.new(*("45000-46000".split("-").map(&:to_i)))
<ruboto> Radar # => 45000..46000 (https://eval.in/475356)
juddey has joined #ruby
<baweaver> >> eval("45000-46000".sub('-', '..')) # :P
<ruboto> baweaver # => 45000..46000 (https://eval.in/475357)
<DoctorWedgeworth> ah just needed the * :) thank you
<DoctorWedgeworth> heh
* jhass hands baweaver a stash of "this is a joke" markers
<jhass> looks like you ran out of yours
ur5us has quit [Remote host closed the connection]
<baweaver> all praise eval
djstorm has quit [Ping timeout: 260 seconds]
<baweaver> !!! THIS IS A JOKE !!!
<baweaver> ah, thanks jhass
n_blownapart has quit []
NeverDie has joined #ruby
shock_one has quit [Ping timeout: 244 seconds]
alzig has quit [Ping timeout: 250 seconds]
patrick2 has joined #ruby
htmldrum has joined #ruby
mistermocha has joined #ruby
snockerton has quit [Quit: Leaving.]
hxegon has quit [Quit: leaving]
J4D has joined #ruby
patrick3 has quit [Ping timeout: 260 seconds]
tulak has quit [Remote host closed the connection]
* ja roflmaos out loud on the floor while rolling
tulak has joined #ruby
<shevy> omg
pawnbox has joined #ruby
weemsledeux has joined #ruby
ascarter has joined #ruby
vinleod has joined #ruby
J4D has quit [Quit: Textual IRC Client: www.textualapp.com]
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tristan-Speccy has joined #ruby
vdamewood has quit [Ping timeout: 272 seconds]
Tristan-Speccy is now known as Guest24441
SleepySensei has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
cwong_on_irc has quit [Quit: Leaving.]
tubulife- has joined #ruby
RegulationD has joined #ruby
jackcom has joined #ruby
vinleod is now known as vdamewood
nofxx has quit [Ping timeout: 240 seconds]
<shevy> hmm when you have this code:
shadoi has joined #ruby
<shevy> module Foo; @debug = true; end
<shevy> how do you call @debug there?
<Radar> You ... don't?
SleepySensei has quit [Ping timeout: 255 seconds]
<shevy> no, I mean what name would it have
<jhass> I would call it module level instance variable
<shevy> ok
RegulationD has quit [Ping timeout: 272 seconds]
shadoi has quit [Client Quit]
<Radar> Foo.instance_variable_get("@debug")
goodcodeguy has joined #ruby
Aria has quit [Ping timeout: 272 seconds]
nofxxx has quit [Remote host closed the connection]
ur5us has joined #ruby
sankaber has quit [Quit: Textual IRC Client: www.textualapp.com]
three18ti has quit [Ping timeout: 240 seconds]
marr has quit [Ping timeout: 255 seconds]
sankaber has joined #ruby
<Ox0dea> *:@debug
aredridel has joined #ruby
Jardayn has quit [Quit: Leaving]
three18ti has joined #ruby
exadeci has joined #ruby
DoctorWedgeworth has quit [Quit: Leaving]
shadoi has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
nofxx has joined #ruby
craysiii has quit [Quit: Leaving.]
Synthead has joined #ruby
yoongkang has joined #ruby
nettoweb has joined #ruby
bruce_lee2 has joined #ruby
mrd_ has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
nettoweb has quit [Client Quit]
yoongkang has quit [Ping timeout: 250 seconds]
bruce_lee has quit [Ping timeout: 250 seconds]
atomical has joined #ruby
bruce_lee2 has quit [Changing host]
bruce_lee2 has joined #ruby
djellemah has quit [Ping timeout: 265 seconds]
failshell has joined #ruby
tulak_ has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
mostlybadfly has joined #ruby
gerard0 has quit [Quit: Textual IRC Client: www.textualapp.com]
Spami has quit [Quit: This computer has gone to sleep]
antoniobeyah has quit [Quit: antoniobeyah]
tulak has quit [Ping timeout: 255 seconds]
roshanavand has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.3]
dimasg has joined #ruby
<droptone> Evenin, gents!
<droptone> Question, if I have a condition with a functio in it
<droptone> such as if !compare_my_values(val1, val2) ....
<droptone> if I think say: else ...
<droptone> Will that still execute the function but render the code under else if the function returns true instead of false?
_blizzy_ has quit [Quit: Leaving]
<droptone> example: if !compare_my_values(val1, val2); puts "Weee"; else; puts "Booo"; end;
<droptone> Just to shove it all on one line for the sake of this IRC channel.
<centrx> droptone, That's what an if-statement does...?
<droptone> Right, I just didnt know if it would still execute the function.
<droptone> Good deal, thank you.
roshanavand has quit [Ping timeout: 240 seconds]
<centrx> droptone, In order to determine whether the function returns true, it has to execute it
<centrx> droptone, But it executes once, and then branches
<droptone> Right, it'll only execute it once, correct?
<centrx> right
<droptone> Oh, you mean the if tree branches.
<droptone> Yes, of course, thank you.
ascarter has quit [Read error: Connection reset by peer]
asas has quit [Ping timeout: 246 seconds]
greister has quit [Quit: WeeChat 1.3]
rdavila has joined #ruby
elcontrastador has joined #ruby
tulak_ has quit [Remote host closed the connection]
greister has joined #ruby
ascarter has joined #ruby
asas has joined #ruby
baweaver has quit [Remote host closed the connection]
ascarter has quit [Client Quit]
tubulife- has quit [Quit: ZNC - http://znc.in]
greister has quit [Quit: WeeChat 1.3]
shinnya has joined #ruby
gusTester has joined #ruby
greister has joined #ruby
rubie has quit [Remote host closed the connection]
gatman_ has quit []
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 276 seconds]
millerti has joined #ruby
failshell has quit []
mistermocha has quit [Remote host closed the connection]
Some-body_ has joined #ruby
RTG` has quit [Ping timeout: 255 seconds]
DarthGandalf has quit [Read error: Connection reset by peer]
Some-body_ is now known as DarthGandalf
RTG` has joined #ruby
bb010g has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nso95- has joined #ruby
dome22xl has joined #ruby
waka has joined #ruby
greister has quit [Quit: WeeChat 1.3]
devyn has joined #ruby
auzty has joined #ruby
vdamewood has quit [Ping timeout: 240 seconds]
nso95- has quit [Ping timeout: 244 seconds]
JoshGlzBrk has joined #ruby
nigget has joined #ruby
<nigget> Hi
greister has joined #ruby
aspiers_ has quit [Ping timeout: 264 seconds]
s2013 has joined #ruby
badon has left #ruby ["Leaving"]
gusTester has quit [Quit: Leaving.]
haraoka has joined #ruby
greister has quit [Client Quit]
greister has joined #ruby
<Coraline> nigget: change your nick
yoongkang has joined #ruby
<Coraline> !kick nigget Offensive nick
nigget was kicked from #ruby by ruboto [Offensive nick]
roshanavand has joined #ruby
The_Phoenix has joined #ruby
nigget has joined #ruby
gusTester has joined #ruby
<nigget> How is my Nick offensive? I can name at least 10 people with extremely offensive nicks in here
<jhass> !ban nigget !T 1w offensive nick
nigget was kicked from #ruby by ChanServ [Banned: offensive nick]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pedahzur has joined #ruby
yoongkang has quit [Ping timeout: 250 seconds]
roshanavand has quit [Ping timeout: 240 seconds]
<pedahzur> Slightly silly question, with an easy answer, I hope. I am trying to debug a failing rspec test. The failure message, in part is, expected "<blah>" to have parameters: <big data structure here>. It does not print out, however, what it actually got when the test failed. If I had that, I might be able to figure out what went wrong. How do I obtain that information? :)
<Coraline> puts?
<jhass> are you sure? it's sometimes hard to spot in a big structured
gusTester has quit [Quit: Leaving.]
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
dome22xl has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
pawnbox has joined #ruby
jbrhbr has quit [Quit: Leaving.]
confounds has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 240 seconds]
nso95- has joined #ruby
nso95- has joined #ruby
skcin7 has joined #ruby
<pedahzur> Coraline: Where do I put the puts? I just have an is_expect.to block.
Ox0dea has quit [Quit: WeeChat 1.4-dev]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
confounds has quit []
s2013 has joined #ruby
confounds has joined #ruby
<pedahzur> jhass: Not sure what you mean. There is a line that says it expected it to have parameters: <prints data structure here> then nothing after saying what it actually got.
<jhass> pedahzur: there's not always a newline, the "got: " can be "inside" the big structure and may be hard to spot
<pedahzur> BLARGH....buried was down in that text is a 'was'
<driftig> jhass: Why is nigget offensive exactly?
<jhass> driftig: use urbandictionary.com
shadoi has quit [Quit: Leaving.]
nso95- has quit [Remote host closed the connection]
jetpackjoe has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<driftig> I find it a bit petty. It may not be racially motivated to discriminate anyone at all.
jetpackjoe has quit [Max SendQ exceeded]
<jhass> driftig: we have a regular who's "creative"
<driftig> I hope they find some closure in their creativity.
<setient> hmm
<setient> you know a ruby plugin to a bot that checks urban dictionary for words could be useful.
<setient> when someone joins
<setient> i can see problems though
beauby has joined #ruby
nofxxx has joined #ruby
Bellthoven has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest24441 is now known as Tristan-Speccy
jgorak has joined #ruby
nso95 has joined #ruby
<jgorak> Hey all. Noob question I've not been able to find the right google terms for: I got used to setting a default like 'dst = src || "empty"'. Works great for strings, but not so hot with booleans where I really mean to check nil but false gets caught up in there. Is there a shorthand trick like this that works for any type meaning "the first one if it is defined, otherwise the second one"?
nso95 has quit [Client Quit]
<jhass> not really, no, dst = src.nil? ? "empty" : src is as good as you get
freerobby has quit [Quit: Leaving.]
pedahzur has quit []
<jgorak> That's the best I found, too. Just hoped to make everything real pretty and same. Oh well. Thanks for confirming
rubie has joined #ruby
_seanc_ has joined #ruby
<Giordano> jgorak: personally I like to do src.present? i think is more idiomatic
<jhass> Giordano: read the question though, present? would have even more "false positives" than ||
<jhass> besides, it's activesupport
nateberkopec has quit [Quit: Leaving...]
towski__ has quit [Remote host closed the connection]
baweaver has joined #ruby
deadlock has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
replay has quit []
diegoaguilar has quit [Ping timeout: 276 seconds]
haraoka has quit [Ping timeout: 246 seconds]
baweaver has quit [Ping timeout: 272 seconds]
ledestin has joined #ruby
jetpackjoe has joined #ruby
diegoaguilar has joined #ruby
nofxxx has quit [Remote host closed the connection]
nofxxx has joined #ruby
TomPeed has joined #ruby
barhum2013 has quit [Quit: barhum2013]
barhum2013 has joined #ruby
Giordano has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Giordano has joined #ruby
barhum2013 has quit [Client Quit]
CodingWolf has quit [Ping timeout: 255 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nofxx_ has joined #ruby
nofxx_ has joined #ruby
dimasg has quit [Ping timeout: 250 seconds]
frem has quit [Quit: Connection closed for inactivity]
nofxxx has quit [Ping timeout: 240 seconds]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
nofxx_ has quit [Remote host closed the connection]
nofxxx has joined #ruby
Rickmasta has joined #ruby
nofxx_ has joined #ruby
nofxx_ has joined #ruby
nofxxx has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
goodcodeguy has joined #ruby
yqt has quit [Ping timeout: 250 seconds]
CrazyEddy has quit [Remote host closed the connection]
asas has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
Darmani has joined #ruby
axsuul has joined #ruby
goodcodeguy has quit [Client Quit]
shadoi has joined #ruby
goodcodeguy has joined #ruby
weemsledeux has joined #ruby
Darmani has left #ruby [#ruby]
gambl0re has joined #ruby
Zaphon has joined #ruby
<Zaphon> Hello?
sankaber has joined #ruby
<blubjr> hi zaphon
yoongkang has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
<Zaphon> Hey man, is it cool to ask questions about Ruby here?
solocshaw has joined #ruby
patrick2 has quit [Ping timeout: 240 seconds]
CrazyEddy has joined #ruby
patrick2 has joined #ruby
roshanavand has joined #ruby
yoongkang has quit [Ping timeout: 255 seconds]
nofxx_ has quit [Ping timeout: 264 seconds]
roshanavand has quit [Ping timeout: 240 seconds]
rawheadon has quit [Quit: Leaving...]
_stu_ has quit [Quit: _stu_]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has joined #ruby
Bellthoven has quit []
jameswatling has joined #ruby
nso95- has joined #ruby
pawnbox has joined #ruby
ascarter has joined #ruby
cdg has joined #ruby
<havenwood> Zaphon: Ruby questions are welcome!
<zenspider> Zaphon: no. we hate questions
<zenspider> wait. I think I got that backwards again
akira has joined #ruby
<Zaphon> Lol...
akira is now known as Guest75108
roshanavand has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
<Zaphon> So I'm still a beginner, I haven't really had a programming background before trying Ruby. I'm still trying to wrap my head around tying blocks with methods on arrays and strings and stuff.
<Zaphon> So anyway... Is there a simple way to understand this stuff?
akira__ has quit [Ping timeout: 244 seconds]
rubie has quit [Remote host closed the connection]
User458764 has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
<Radar> Zaphon: Do you have some code in particular that you're struggling with?
<Zaphon> Well I'm on Codewars, it's a website where you practice solving problems in Ruby, c#, etc.
dlitvak has quit [Remote host closed the connection]
spt0 has joined #ruby
<Zaphon> One of the problems in particular is to find the longest word within a string and print it to the console.
spt0 has left #ruby [#ruby]
<Zaphon> But I'm not exactly sure where to start...
dimasg has joined #ruby
<zenspider> "tying blocks w/ methods on arrays and strings and stuff" is... vague
yes`r has joined #ruby
yeshacker has quit [Ping timeout: 272 seconds]
<driftig> zenspider has been away a while.
<Zaphon> haha yeah I guess it is... Well let me see if I can find a specific example.
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
nchambers is now known as dtscode
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
malconis has joined #ruby
arooni has quit [Quit: Leaving]
<Zaphon> Okay so... I wrote this out with my thoughts on the side of where I get confused.
rubie has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
baweaver has joined #ruby
tjbiddle has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
maletor has joined #ruby
maletor has quit [Client Quit]
spt0_ has joined #ruby
Meow-J has joined #ruby
<zenspider> Zaphon: is there a question?
spt0_ has left #ruby [#ruby]
hagabaka has quit [Read error: Connection reset by peer]
stannard has joined #ruby
blur3d has joined #ruby
<Zaphon> Well what's the best way to parse the string? And how should I isolate the longest word from the string?
hagabaka has joined #ruby
skweek has joined #ruby
<zenspider> stop worrying about best. focus on working.
braincrash has quit [Quit: bye bye]
<Zaphon> I can't even get it to work..
<zenspider> then don't bother with best yet
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zenspider> right now, you're starting with `string.each`. But, you're talking about "words"... so how do you go from string to words?
<Zaphon> string.each?
The_Phoenix has quit [Quit: Leaving.]
|ifei5g00d has quit []
stannard has quit [Ping timeout: 276 seconds]
_seanc_ has quit [Ping timeout: 252 seconds]
skweek has quit [Ping timeout: 240 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zaphon has quit [Quit: Page closed]
wwalker has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
braincrash has joined #ruby
The_Phoenix has joined #ruby
deadlock has quit [Ping timeout: 264 seconds]
rubie has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
shock_one has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeverDie has quit [Quit: http://radiux.io/]
NeverDie has joined #ruby
beauby has quit [Ping timeout: 272 seconds]
yes`r has quit [Ping timeout: 264 seconds]
linuxboytoo has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
shock_one has quit [Ping timeout: 272 seconds]
<wwalker> so, if I execute(sql) (in Rails) I get back an array of arrays. I would like to be able to do : rows.each{|row| puts row.fname, row.lname...} rows may have 250,000 arrays in it, so the overhead of creating OpenStructs out of each one seems too expensive.
s00pcan has quit [Remote host closed the connection]
<wwalker> Anyone know a module that does something along this line?
ascarter has joined #ruby
yoongkang has joined #ruby
rakm has joined #ruby
<baweaver> wwalker: !rails
<baweaver> !rails
* baweaver sighs
<baweaver> #RubyOnRails is where you should ask
linuxboytoo has quit [Ping timeout: 272 seconds]
hahuang65_ has joined #ruby
<wwalker> baweaver: I'm not looking for a rails solution. I think this is the standard results of a database call (array of arrays)
<baweaver> ActiveRecord
<wwalker> I do very little with rails. I'm trying to find an efficient solution
ebbflowgo has quit [Quit: ebbflowgo]
<wwalker> lol AR is the cause of the problems
<baweaver> how much do you know about splatting
<wwalker> by that term, nothing. gimme a sec
<baweaver> hash.each do |key, value|
<baweaver> wwalker: don't bother
<baweaver> explaining will be easier on this one
<wwalker> ok, i see what it is now
<baweaver> >> array = [1,2,3]
<ruboto> baweaver # => [1, 2, 3] (https://eval.in/475414)
yoongkang has quit [Ping timeout: 264 seconds]
<baweaver> >> first, *rest = [1,2,3]
<ruboto> baweaver # => [1, 2, 3] (https://eval.in/475415)
<baweaver> >> first, *rest = [1,2,3]; first
<ruboto> baweaver # => 1 (https://eval.in/475416)
<baweaver> did you know block args work the same way?
<wwalker> sure
tmtwd has joined #ruby
<baweaver> [%w(wwalker user 1 2)].each { |(fname, lname, age, posts)| p fname + lname + age + posts }
<baweaver> >> [%w(wwalker user 1 2)].each { |(fname, lname, age, posts)| p fname + lname + age + posts }
<ruboto> baweaver # => "wwalkeruser12" ...check link for more (https://eval.in/475417)
<baweaver> you can use that for inline name assignment
<wwalker> my direct solution was columns = %w( fname lname address ) , then I could access as : row[column_hash[lname]]
juddey has quit [Ping timeout: 264 seconds]
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<wwalker> that's slick
Oog has joined #ruby
<wwalker> I'll keep that in mind. that does look quite useful
jetpackjoe has joined #ruby
<baweaver> there was a good article on splatting earlier
<baweaver> need to find it again
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver> it was somewhere on afreshcup.com
<baweaver> (which is also a good read)
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wwalker> Thanks!
DurstBurger has quit [Ping timeout: 244 seconds]
greenbigfrog has quit [Quit: The server of my BNC just shutdown or got killed!!!]
xcesariox has joined #ruby
malconis has joined #ruby
xcesariox has quit [Max SendQ exceeded]
gusTester has joined #ruby
pawnbox has quit [Remote host closed the connection]
gusTester has left #ruby [#ruby]
cdg has quit [Remote host closed the connection]
lfam has joined #ruby
lfam has left #ruby ["Leaving"]
gix has quit [Ping timeout: 272 seconds]
_seanc_ has joined #ruby
ur5us has quit [Read error: No route to host]
|ifei5g00d has joined #ruby
mallu has joined #ruby
ur5us has joined #ruby
<mallu> can you please tell me what I am doing wrong? https://gist.github.com/anonymous/21658512d7b6e16f0922
<Radar> mallu: where do I start?
* Radar now opens the gist
<mallu> Radar: Raindrops.convert(6) is not giving correct value
mrd_ has joined #ruby
gix has joined #ruby
skweek has joined #ruby
rubie has joined #ruby
<Radar> mallu: Walk through the code/
<Radar> mallu: on line 10, what is prime_factors?
pawnbox has joined #ruby
<mallu> Radar: [2, 1, 3, 1]
CloCkWeRX has left #ruby [#ruby]
<mallu> Radar: so I should get 'Pling'
<mallu> Radar: or am I missing something?
skweek has quit [Ping timeout: 246 seconds]
rubie has quit [Remote host closed the connection]
ldrancer has joined #ruby
pawnbox has quit [Ping timeout: 272 seconds]
borislow has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dimasg has quit [Ping timeout: 240 seconds]
borislow has left #ruby [#ruby]
pawnbox has joined #ruby
theery has joined #ruby
<ldrancer> you know windows used to if you viewed code in a browser window, execute it?
<Radar> mallu: Are you certain?
<Radar> mallu: Make sure that the code is getting to that line.
<mallu> Radar: what do you mean?
<Radar> mallu:
<Radar> Prove to me that the code is getting to that line.
<Radar> Get the program to actually output something
pawnbox has quit [Ping timeout: 272 seconds]
<ldrancer> yea it worked on me once
Ca1us has quit [Ping timeout: 276 seconds]
NeverDie has quit [Quit: http://radiux.io/]
malconis has joined #ruby
boirslaw has joined #ruby
pawnbox has joined #ruby
rubie has joined #ruby
boirslaw has left #ruby [#ruby]
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spt0 has joined #ruby
pdoherty has joined #ruby
pawnbox_ has joined #ruby
sanjayu has joined #ruby
yes`r has joined #ruby
<mallu> Radar: I found the issue.. I'm returning string within if statement
<Radar> mallu: congrats :)
davedev2_ has quit [Ping timeout: 246 seconds]
davedev24 has joined #ruby
Caius has joined #ruby
beagles has quit [Ping timeout: 260 seconds]
Oog has quit []
pawnbox has quit [Ping timeout: 276 seconds]
Karpuragauram has joined #ruby
solenoids has quit [Ping timeout: 260 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
b3nt_pin has joined #ruby
b3nt_pin is now known as Guest65357
starkruzr has joined #ruby
confounds has quit [Remote host closed the connection]
djellemah has joined #ruby
Giordano has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
darkf has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mallu> Radar: can you please take a look at this? https://gist.github.com/anonymous/024e789a1647c4632a4b
<Radar> mallu: Did you spend 15 mins debugging it yet?
<mallu> yes
<Radar> mallu: Look up "Ruby ternary statement" on google and compare the examples with what you have ther.e
<zenspider> ugh
<mallu> Radar: puts true ? "true" : "false"
<Radar> mallu: Great, so you have an example. Now compare it to what you have.
<zenspider> a.b? c : d -- "b?" is the method name, not "b" followed by "?"
<zenspider> the syntax is `condition ? truthy : falsy`
<zenspider> your condition is `a.b?`
theery has quit []
<zenspider> waits for a *ding* or a *woosh*
<mallu> zenspider: forgive my ignorance, my condition is string.empty? true return number false return string
trosborn has joined #ruby
<mallu> zenspider: so I don't quite follow you
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
* Radar drowns the horse
<Radar> string.empty? ? number : string
Rollabunna has quit [Remote host closed the connection]
<Radar> string.empty? is the condition
<Radar> then you need another ? to start the ternary expression's "true" statement
Rollabunna has joined #ruby
<Radar> Then a : starts the "false" statement
<zenspider> and that'd be the *woosh*
<mallu> got it :)
* zenspider walks away
<mallu> thank you guys
solenoids has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
pawnbox_ has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
d0nn1e has quit [Ping timeout: 272 seconds]
zast has joined #ruby
<mallu> Radar: zenspider: please take a look at it and let me know if I can make this script better https://gist.github.com/anonymous/95147f7e88a7dc036a20
<havenwood> ?gist_usage mallu
<ruboto> mallu, To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
ur5us has joined #ruby
<Radar> Seems a lot like homework to me.
<Radar> Or consulting
<Radar> Homework I don't do
<Radar> Consulting I do do. I can send through my normal contract if you'd like?
<havenwood> Pling, Plang, Plong as a Service.
d0nn1e has joined #ruby
Rollabunna has quit [Ping timeout: 272 seconds]
tubulife- has joined #ruby
houhoulis has quit [Remote host closed the connection]
<havenwood> mallu: One thing to make it better is consistent two-spaced soft tabs. :)
blur3d has quit [Quit: blur3d]
pawnbox has joined #ruby
skweek has joined #ruby
<mallu> Radar: not homework. from http://exercism.io/
<mallu> havenwood: noted
grill has joined #ruby
<Radar> mallu: Why are you soliciting feedback here? It is what exercism.io is good for
iateadonut has joined #ruby
<mallu> Radar: I am not getting any response from exrcism. seems like nobody is reviewing codes there
<havenwood> mallu: Drop the explicit return from your last line.
iateadonut has quit [Client Quit]
<havenwood> mallu: (It'll return anyways if it make it there.)
<mallu> havenwood: correct.. thank you
parantapVikram has joined #ruby
parantapVikram has quit [Remote host closed the connection]
Vivekananda has joined #ruby
<havenwood> mallu: Since you're not instantiating your class use a module instead.
<havenwood> mallu: module Raindrops
<Radar> I wonder if this even needs to be implemented as a module
<Radar> it could just be a function
<Radar> method, whatever
<mallu> havenwood: exercism's test is calling Raindrops.convert(105)
<mallu> thats why I was creating the class
pawnbox has quit [Ping timeout: 260 seconds]
<havenwood> mallu: What I was suggesting was changing `class` to `module` in your code.
<havenwood> mallu: On line 3.
<mallu> havenwood: ok
yfeldblum has quit [Ping timeout: 246 seconds]
Mia has joined #ruby
Mia has joined #ruby
<Radar> mallu: ok, that makes sense then
<mallu> thanks guys
greenbigfrog has joined #ruby
devyn has quit [Read error: Connection reset by peer]
<havenwood> mallu: Happy coding!
devyn has joined #ruby
trosborn has quit [Quit: trosborn]
<mallu> havenwood: thanks.. I'll be bugging you guys later :)
DurstBurger has joined #ruby
Oog has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
<ldrancer> everything about atoms is made up. are their atomic bombs? was hiroshima a fire bomb
<havenwood> ?ot ldrancer
<ruboto> ldrancer, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
<ldrancer> whats all this bulllll
<ldrancer> quantum discussion was brought up
lxsameer has joined #ruby
lxsameer has joined #ruby
<ldrancer> off of which topic..
<ldrancer> oh wait wrong room
<ldrancer> maybei should leave
<ldrancer> coding 2 rooms
ldrancer has left #ruby [#ruby]
skcin7_ has joined #ruby
cwong_on_irc has joined #ruby
pawnbox has joined #ruby
rubie has quit [Remote host closed the connection]
skcin7 has quit [Ping timeout: 255 seconds]
_seanc_ has quit [Quit: _seanc_]
_seanc_ has joined #ruby
davedev24 has quit []
dimasg has joined #ruby
dlitvak has joined #ruby
krz has joined #ruby
Oog has quit [Read error: Connection reset by peer]
VeryBewitching has quit [Quit: Konversation terminated!]
mallu has quit [Ping timeout: 246 seconds]
_seanc_ has quit [Client Quit]
lurch_ has joined #ruby
dlitvak has quit [Ping timeout: 264 seconds]
Bugboy1028 has quit [Ping timeout: 272 seconds]
krz has quit [Read error: Connection reset by peer]
axsuul has quit [Read error: Connection reset by peer]
amclain has quit [Quit: Leaving]
axsuul has joined #ruby
confounds has joined #ruby
rubie has joined #ruby
dionysus69 has joined #ruby
Bugboy1028 has joined #ruby
trosborn has joined #ruby
pawnbox has quit [Remote host closed the connection]
jameswatling has quit []
pawnbox has joined #ruby
moeabdol has quit [Ping timeout: 255 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
trosborn has quit [Quit: trosborn]
dimasg has quit [Ping timeout: 240 seconds]
solocshaw has quit [Ping timeout: 240 seconds]
naftilos76 has joined #ruby
Gnut has joined #ruby
xcesariox has joined #ruby
SOLDIERz has joined #ruby
SOLDIERz has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 240 seconds]
deadlock has joined #ruby
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DoubleMalt has joined #ruby
aganov has joined #ruby
patdohere has joined #ruby
dhjondoh has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
grill has joined #ruby
patdohere has quit [Ping timeout: 264 seconds]
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
deadlock has quit [Quit: Leaving]
trosborn has joined #ruby
camilasan has quit [Remote host closed the connection]
trosborn has left #ruby [#ruby]
camilasan has joined #ruby
Oog has joined #ruby
d0lph1n98 has joined #ruby
ta has quit [Remote host closed the connection]
hahuang65_ has quit [Quit: Connection closed for inactivity]
ur5us has quit [Remote host closed the connection]
d0lph1n98 has quit [Read error: Connection reset by peer]
hahuang61 has joined #ruby
spt0 has quit [Quit: Leaving]
Oog has quit []
tagrudev has joined #ruby
hahuang61 has quit [Ping timeout: 246 seconds]
Pupp3tm4st3r has joined #ruby
roshanavand has joined #ruby
certainty|mobile has joined #ruby
<certainty|mobile> moin
jondot has joined #ruby
maloik has joined #ruby
Pupp3tm4st3r has quit [Ping timeout: 252 seconds]
roshanavand has quit [Ping timeout: 260 seconds]
skade has joined #ruby
aufi has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus70 has joined #ruby
maloik has quit [Ping timeout: 244 seconds]
psy_ has quit [Remote host closed the connection]
agent_white has quit [Read error: Connection reset by peer]
rubie has quit [Remote host closed the connection]
dionysus70 is now known as dionysus69
ur5us has joined #ruby
cyberfawkes has joined #ruby
codecop has joined #ruby
<cyberfawkes> is there a way to simplify this? guess = gets.chomp guess = guess.to_i!
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
zast has left #ruby [#ruby]
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 244 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
moeabdol has joined #ruby
<pontiki> other than `guess = gets.chomp.to_i` ? i'm not aware of a `.to_i!` method
favadi has joined #ruby
<cyberfawkes> derp
<cyberfawkes> *headdesk*
<cyberfawkes> thank you
<pontiki> cow-erker asked if there was a way to determine with a regular expression *only* if a string of numbers represents a number less than 750. any clues? i have *none* at all
karapetyan has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
Pupp3tm4st3r has joined #ruby
lubekpl has joined #ruby
lubekpl has quit [Client Quit]
moeabdol has quit [Ping timeout: 244 seconds]
alzig has joined #ruby
User458764 has joined #ruby
jetpackjoe has joined #ruby
nso95- has quit [Remote host closed the connection]
htmldrum has quit [Ping timeout: 246 seconds]
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
<cyberfawkes> how do I "do nothing" in an if statement?
<blubjr> why do you want to
dionysus69 has quit [Ping timeout: 276 seconds]
<ja> cyberfawkes: are you sure you don't simply want `unless`?
naftilos76 has quit [Quit: Αποχώρησε]
pawnbox has quit [Remote host closed the connection]
skcin7_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roshanavand has joined #ruby
roshanavand has quit [Remote host closed the connection]
leat has joined #ruby
pawnbox has joined #ruby
Rickmasta has joined #ruby
roshanavand has joined #ruby
troys has joined #ruby
agent_white has joined #ruby
confounds has quit []
<cyberfawkes> nevermind, got it.
<cyberfawkes> I was doing it wrong. *headdesk*
<cyberfawkes> not sure why the tabbing(four spaces) is showing up this way, but oh well.
<cyberfawkes> thoughts?
<cyberfawkes> (first stab at ruby)
nso95- has joined #ruby
nso95- has joined #ruby
hxegon has joined #ruby
trautwein has joined #ruby
nw1 has left #ruby ["WeeChat 1.3"]
sandstrom has joined #ruby
<ja> looks good, cyberfawkes
<cyberfawkes> anything I can improve, or any bad habits that you see?
<cyberfawkes> Thank you by the way :)
<havenwood> pontiki: /\A([0-6]?[0-9]?[0-9]|7[0-4][0-9]|750)\z/
pawnbox has quit [Remote host closed the connection]
yoongkang has joined #ruby
<hxegon> Is there a clean way to test if x.nil? or x.empty? without erroring for trying nil.empty?
<hxegon> I'm feeling a ternary, but wanted to check
<ja> cyberfawkes: maybe, just for shits 'n' giggles, use `until guess_count == 3` instead
<blubjr> x.nil? || x.empty?
<certainty|mobile> hxegon x.nil? || x.empty?
<cyberfawkes> ja: instead of the while loop?
<blubjr> or is short circuiting, it stops evaluating once it gets its first true value
<hxegon> blubjr, certainty|mobile thanks, didn't know you could do that.
<ja> cyberfawkes: and definitely use two spaces for indentation instead of four, but that's absolutely the only thing near to “bad” I can see! :D
<certainty|mobile> || short-circuits
<ja> cyberfawkes: yes, instead of the while
<cyberfawkes> lol why two spaces?
<ja> it’s The Ruby Way™
<ja> because ruby is so tight
<ja> it only needs two spaces
<cyberfawkes> lol there is a lot of ruby qwerks.
<cyberfawkes> Like 0 for example...
<cyberfawkes> 0 == nil
<cyberfawkes> False
<cyberfawkes> IT'S TRUE DAMMIT
<cyberfawkes> xD
<ja> indeed, good sir
<ja> OF COURSE IT'S NOT!
<cyberfawkes> I'm so use to C, and Python.
Meow-J has quit [Quit: Connection closed for inactivity]
<ja> ah :D
<cyberfawkes> Whereas 0 is null.
troys has quit [Quit: Bye]
<ja> … at least not PHP ^_^
<cyberfawkes> heh
<ja> wait, 0 is null in Python‽
<cyberfawkes> yes
<cyberfawkes> well zero, is zero.
emilkarl has joined #ruby
<cyberfawkes> it doesn't exist.
<cyberfawkes> it's not a value.
<ja> but comparing it to null yields true‽
<blubjr> haha the other day i made the dumbest mistake, i forgot to initialize an array, and then i was seeing that it was nil when i wanted it to be [], but i do a lot of lisp so that didnt register as a problem to me
<ja> lol, blubjr
<ja> almost makes me wish some kind of Lisp-Ruby hybrid existed
<cyberfawkes> hmm, I am wrong.
<cyberfawkes> 0 == None
<cyberfawkes> Yields False
yoongkang has quit [Ping timeout: 244 seconds]
<ja> Good! :X
nso95- has quit [Remote host closed the connection]
diegoaguilar has quit [Ping timeout: 272 seconds]
<ja> cyberfawkes: `guess_count = guess_count + 1` could be shortened to `guess_count += 1`
lubekpl has joined #ruby
<hxegon> >> ''.to_f.zero? # hmm
<ruboto> hxegon # => true (https://eval.in/475461)
ohaibbq has joined #ruby
Rollabunna has joined #ruby
radgeRayden has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
<hxegon> probably should leave in the explicit #empty? for clarity.
<cyberfawkes> ja: oh thank god, I was going to miss that ability.
<ja> cyberfawkes: perhaps you already tried `guess_count++` and watched that fail? if you're used to C
<cyberfawkes> yes, sadly
fedexo has quit [Ping timeout: 240 seconds]
tjbiddle has quit [Quit: tjbiddle]
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anisha has joined #ruby
<cyberfawkes> all of the suggestions you made, except the two spaces xD
pawnbox has quit [Ping timeout: 252 seconds]
<ja> just you wait, cyberfawkes… suddenly you won't be able to resist it no more… x3
yardenbar has joined #ruby
<cyberfawkes> heh, we'll see.
Rollabunna has quit [Ping timeout: 276 seconds]
passcod has quit [Remote host closed the connection]
<ja> cyberfawkes: here's how I would've written it: https://gist.github.com/alminde/93122a26d32d79a4ea82
passcod has joined #ruby
<ja> cyberfawkes: I think it makes more sense not to pass `rand_num` around like you did through the second argument to the `logic` method
<ja> *shrug*
<cyberfawkes> how would I get around that, without making rand_num a global variable?
<ja> just my two ears (the cent-equivalent of danish crowns)
shadoi has quit [Quit: Leaving.]
<ja> cyberfawkes: by making a class and doing it with an instance variable
<cyberfawkes> I haven't even the foggiest idea of how to do that.
hamilto-nyan is now known as nyan-category
vire has joined #ruby
cdg has joined #ruby
<cyberfawkes> to google!
howdoi has joined #ruby
<ja> spilers ahead ʘ‿ʘ
<ja> +o
<cyberfawkes> s/spilers/spoilers ?
<ja> AFFIRMATORY
<cyberfawkes> wayyyyy over my head at this point lol
<ja> many people prefer to write the `private` like https://gist.github.com/alminde/93122a26d32d79a4ea82 though… (which makes all following methods private)
<ja> cyberfawkes: aw, come on, man! I basically just wrote `class` and `new` and some @s and that's all! :DDd
cdg has quit [Ping timeout: 250 seconds]
grill has joined #ruby
Asher has quit [Read error: No route to host]
Asher1 has joined #ruby
The_Phoenix has quit [Read error: No route to host]
tjbiddle has joined #ruby
Gnut has quit [Ping timeout: 250 seconds]
ta has joined #ruby
Asher1 is now known as Asher
shock_one has joined #ruby
The_Phoenix has joined #ruby
timonv has joined #ruby
<cyberfawkes> lol still confuses the heck out of me.
<cyberfawkes> I learn best by doing. So I'm like this is how I did it in python so... here goes. And then just google'd when I got stuck.
jondot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jas02 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<ja> cyberfawkes: https://gist.github.com/alminde/93122a26d32d79a4ea82 — how about now? ( ͡° ͜ʖ ͡°)
solars has joined #ruby
<cyberfawkes> ja: are you on a Mac?
<ja> learning by doing is the best for me as well
<ja> how can you tell, cyberfawkes?
<shevy> by the way you type
<ja> ☉_☉ what's that supposed to mean, shevy?
<cyberfawkes> Nope, lol
<cyberfawkes> it's because ja is using textual.
<shevy> they type differently
* ja is using irssi
<cyberfawkes> really?
User458764 has joined #ruby
<cyberfawkes> hmm, I've only seen people using Textual making faces like that. heh
<ja> yes! why did you think I was using Textual? :o
<ja> oh
<ja> haha
<shevy> aha
<shevy> I don't see it, it must be unicode :)
shock_one has quit [Ping timeout: 276 seconds]
<cyberfawkes> I'm using irssi on my fedora server :)
<ja> welcome to the twenty-first century, shevy! :3
rcerny has joined #ruby
TomyWork has joined #ruby
<cyberfawkes> ssh + tmux + irssi = life
<shevy> geek + geek + geek = triple geek
<ja> oh man, i really need to get off screen and onto tmux
<cyberfawkes> ja: I made the switch yesterday.
<cyberfawkes> it's a pain at first.
<ja> cyberfawkes: if you're ever annoyed about timed out ssh sessions when reopening your laptop, or if you're often on crappy cell connections: give mosh a try — it's incredibly great!
roshanavand has quit [Remote host closed the connection]
<shevy> mosh? is that a shell?
<ja> what's painful about it, cyberfawkes? remembering to hit ^b instead of ^a? :D
<cyberfawkes> my suggestion is to change the bind key from C-b to C-a
<cyberfawkes> fucking emacs-like modifiers...
<ja> shevy: it's a layer on top of ssh that adds roaming and latency compensation
<cyberfawkes> ja: I fixed that lol
<cyberfawkes> now it's a+d :)
hxegon has quit [Quit: leaving]
jmdade has joined #ruby
<rcerny> hi, could anyone give me a hand? Trying to learn ruby by completing a small project. I have a hash and am trying to fill erb template. Can’t find correct syntax to render the value instead of key /shy
<ja> lol one of the main reasons I wanna move to tmux is so I can use ^a/^e as “Home”/“End”
<cyberfawkes> ^?
jondot has joined #ruby
<ja> sorry, C-a/C-e
<cyberfawkes> ah
<ja> or not “home” and “end”, maybe. more like “go to beginning of line” and “go to end of line”
<cyberfawkes> I wish tmux used vi like commands/keys
<cyberfawkes> instead of emacs
<cyberfawkes> who the heck uses emacs anyway?
<ja> like with the modes vi has?
<cyberfawkes> s/vi/vim
* ja is pretty sure richard stallman uses emacs
<ja> so that's one person…
<cyberfawkes> well Richard Stallman is a pretentious douche. lol
<ja> hahaha, yeah, well… you know what they say…
<cyberfawkes> ermagherd it's GNU/Linux!!!!!
skade has quit [Quit: Computer has gone to sleep.]
<cyberfawkes> Stop trying to make GNU/Linux happen... it's not going to happen.
roshanavand has joined #ruby
emilkarl has quit [Quit: emilkarl]
jondot has quit [Client Quit]
agit0 has joined #ruby
<ja> Yeah, they should focus on GNU Hurd instead
<baweaver> that's quite enough of that
<ja> “Latest release: 0.7 / 31 October 2015; 15 days ago” — wow, seems like they are!
<baweaver> no need to rant about
<cyberfawkes> baweaver: who's ranting?
rcerny has quit [Quit: rcerny]
<cyberfawkes> In retrospect I probably should've installed OpenBSD, or CentOS on my server instead of Fedora. :/
<ja> why not RubyOS? :>
<cyberfawkes> So I don't have to upgrade versions every 6 months.
<shevy> ja we don't have enough ruby code yet
scripore has joined #ruby
<ja> dang it :<
scripore has quit [Client Quit]
<ja> but we have the technology!
<baweaver> tmux has vi keybindings anyways
<cyberfawkes> Although OpenBSD would've pissed off a few of my friends. XD
<baweaver> bindkey -v
vire has quit [Ping timeout: 240 seconds]
<baweaver> probably want to rebind ctrl-r for backsearch though
<cyberfawkes> My PDF reader, and Chrome allow me to scroll with hjkl. It's amazing.
leat has quit [Ping timeout: 265 seconds]
<baweaver> you scroll a line / char at a time?
pawnbox has joined #ruby
emilkarl has joined #ruby
pawnbox_ has joined #ruby
<cyberfawkes> heh, no.
pawnbox has quit [Read error: Connection reset by peer]
<cyberfawkes> it's similar to use a scroll pad on a laptop in a way.
<cyberfawkes> Vimium for Chrome <3
<cyberfawkes> s/use/using
<cyberfawkes> ja: personally I don't see any real differences in tmux from screen. At least for irssi anyway.
<cyberfawkes> the status bar is quite annoying, but I got rid of that.
blaxter has joined #ruby
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandstrom has quit [Quit: My computer has gone to sleep.]
<shevy> awwww python
<shevy> def greeting(name: str) -> str:
pawnbox_ has quit [Ping timeout: 255 seconds]
akem has quit [Ping timeout: 246 seconds]
SCHAAP137 has joined #ruby
rdavila has joined #ruby
scripore has joined #ruby
vire has joined #ruby
yfeldblum has joined #ruby
<cyberfawkes> dammit!!!!
<cyberfawkes> agent_white: -_-
joonty has joined #ruby
<cyberfawkes> ja: this was in the .vimrc file agent_white sent me "Set TAB to be turned into spaces - "2" becuz... Ruby! But can be turned into 4 for Python, etc."
mooe has joined #ruby
vire has quit [Client Quit]
rdavila has quit [Client Quit]
roshanavand has quit [Remote host closed the connection]
InvGhost has joined #ruby
moeabdol has joined #ruby
Hounddog has joined #ruby
ledestin has quit [Ping timeout: 265 seconds]
maloik has joined #ruby
roshanavand has joined #ruby
yoongkang has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
<cyberfawkes> what's with all of the joins/quits in this channel?
<ja> cyberfawkes: so you weren't a totally poweruser of screen before?
<ja> cyberfawkes: lol, nice. agent_white knows what's up, apparently.
<cyberfawkes> I really only used screen for processes I wanted to keep running in the background.
<cyberfawkes> ie upgrades and such.
<cyberfawkes> irssi, weechat, etc.
<ja> ye, me too. never really got into all its features.
<cyberfawkes> also when I was coding with friends on a server we'd use screen
shredding has joined #ruby
<shevy> you'd scream?
<cyberfawkes> only if she did it right.
davidt has quit [Ping timeout: 240 seconds]
<ja> cyberfawkes: how'd you do that? I can never seem to get screen working across users. or sudo'd screen.
scripore has quit [Quit: This computer has gone to sleep]
marr has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
<cyberfawkes> ja: when you're attached to a screen, the other use would type screen -x
<cyberfawkes> which is attach to an attached screen.
Schmidt has joined #ruby
<ja> yeah
c0m0 has joined #ruby
<ja> but then you were logged in as the same user?
<cyberfawkes> well yes.
<ja> xD no good!
<cyberfawkes> you couldn't do it across users, at least to the best of my knowledge.
<ja> at leat not for when I've needed it
roshanavand has quit [Remote host closed the connection]
<cyberfawkes> which wasn't a concern to me because I either ran the server, or was in the sudoers group.
<ja> there has to be a way!
<cyberfawkes> so I could just
andikr has joined #ruby
<cyberfawkes> sudo su ja
<cyberfawkes> screen -x
roshanavand has joined #ruby
<ja> oh, so that worked at least?
<cyberfawkes> yeah
<ja> nice
<ja> weird that I've had so many problems with it
<cyberfawkes> It's great for messing with my friends who run their irssi clients on my server. xD
<ja> haha, I can definitely imagine
<cyberfawkes> I was attached one day, and he typed in his password.
<cyberfawkes> I started typing in his buffer, "oh, so that's your password."
<cyberfawkes> XD
<ja> lol
<cyberfawkes> apparently it was his facebook password too xD
<ja> did he freak out?
<cyberfawkes> yes, not sure why though.
<ja> oh, “apparently” as in he told you or as in you tried it? XB
<cyberfawkes> He told me, I'm not that much of an ass xD
<ja> hahaha, suuure
roshanavand has quit [Remote host closed the connection]
skade has joined #ruby
agent_white has joined #ruby
<cyberfawkes> secret1 is not the best password xD
<shevy> better than mine
* cyberfawkes is unsure if agent_white is actually here... or a ghost in the shell. >.>
<baweaver> hunter1 wins
<cyberfawkes> heh
<cyberfawkes> bash.org baweaver?
<baweaver> yeah
<cyberfawkes> heh lol
<shevy> hahaha
<cyberfawkes> I actually tried that on Facebook.
<cyberfawkes> People fell for it...
<baweaver> anyways, we have #ruby-offtopic for this type of thing
<cyberfawkes> depr
<cyberfawkes> s/depr/derp
<baweaver> just trying to make sure questions don't get lost on here.
<cyberfawkes> understandable.
<ja> thanks, baweaver!
emilkarl has quit [Quit: emilkarl]
dhjondoh has quit [Quit: dhjondoh]
dhjondoh has joined #ruby
A124 has joined #ruby
alzig has quit [Remote host closed the connection]
sandstrom has joined #ruby
ur5us has joined #ruby
yoongkang has quit [Remote host closed the connection]
yoongkang has joined #ruby
subscope has joined #ruby
baweaver has quit [Remote host closed the connection]
hahuang61 has joined #ruby
pawnbox has joined #ruby
ledestin has joined #ruby
nso95 has joined #ruby
bersimoes has joined #ruby
pawnbox has quit [Remote host closed the connection]
aeontech has quit [Quit: aeontech]
bersimoes has quit [Ping timeout: 252 seconds]
Hounddog has quit [Ping timeout: 246 seconds]
Hounddog has joined #ruby
prolink has joined #ruby
<prolink> is ruby a good programming language?
<blubjr> no way
<prolink> okay
<prolink> please don't call me a troll but i keep hearing from other programmers that ruby is useless and i want to know why they says that
cloudbud has joined #ruby
<cloudbud> Hi I have written a ookbook in ruby it gives me an error : TypeError --------- no implicit conversion of Array into String
<prolink> they says those things and they make points that i don't get because i'm knew to all this and i want to understand
<prolink> cloudbud: i'm a beginner but that means you have type error
<prolink> a type error means that it's not of the same type
<prolink> cloudbud: can you post your code?
Xeago has joined #ruby
elaptics`away is now known as elaptics
shock_one has joined #ruby
<cloudbud> prolink : that i know but how to resolve this
<prolink> well i would like to get a look at your code to make a sense of all this
<prolink> they says the best way to understand is to see what's going on
nettoweb has joined #ruby
<cloudbud> prolink : http://pastebin.com/Dd3K1NCW
<ruboto> cloudbud, as I told you already, please use https://gist.github.com
<prolink> gist is bad because you have to link your github
Hounddog has quit [Ping timeout: 272 seconds]
ismaelga has joined #ruby
<prolink> if you push your code to gist and i says it's garbage you won't like that because your employer might fire you for being a retard
<nso95> prolink: pastie is considered an accepable alternative here
<prolink> what's wrong with pastebin?
<nso95> Also, no you don’t need to link gist witih your github
<prolink> i thought they was the ones who started all this paste nonsense
<cloudbud> prolink : can u look into the code
_edgecase_ has joined #ruby
<prolink> i'm looking at it
<prolink> i'm not good mind you
<prolink> i just started and i am a bit retarded
emilkarl has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
<cloudbud> prolink : okay
<blubjr> stop saying 'retarded'
<prolink> blubjr: what's wrong with retarded? i'm from boston and we says it all the time it means that you aint smart in something
moeabdol has joined #ruby
<blubjr> its offensive
<prolink> cloudbud: are you sure you need all those quotes in the square brackets
<cloudbud> prolink : i dont have any idea
<prolink> blubjr: it's only offensive if your retarded and if you know you aint retarded you aint gonna get offended
<prolink> because you know you aint retarded
Hounddog has joined #ruby
nettoweb has quit [Ping timeout: 240 seconds]
<nso95> prolink: you’re disgusting
<prolink> cloudbud: try getting rid of those quotes and without the quotes they should be variables
<prolink> those variables should be some sorta paramaters
<prolink> or am i retarded?
<cloudbud> prolink : can you pastebin
jetpackjoe has joined #ruby
InvGhostt has joined #ruby
bersimoes has joined #ruby
shock_one has quit [Remote host closed the connection]
DoubleMalt has quit [Ping timeout: 240 seconds]
jondot has joined #ruby
Hounddog has quit [Ping timeout: 272 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leat has joined #ruby
Hounddog has joined #ruby
jgorak_ has joined #ruby
DoubleMalt has joined #ruby
InvGhost has quit [Ping timeout: 250 seconds]
darkf_ has joined #ruby
darkf has quit [Disconnected by services]
pawnbox has joined #ruby
darkf_ is now known as darkf
Mon_Ouie has joined #ruby
nettoweb has joined #ruby
rdark has joined #ruby
rdark has joined #ruby
blackmesa has joined #ruby
nettoweb has quit [Max SendQ exceeded]
jgorak has quit [Ping timeout: 276 seconds]
Hounddog has quit [Ping timeout: 240 seconds]
Hounddog has joined #ruby
timonv has joined #ruby
kimegede has joined #ruby
jetpackjoe has quit [Quit: Textual IRC Client: www.textualapp.com]
CodingWolf has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
tomphp has joined #ruby
emilkarl has quit [Quit: emilkarl]
ohaibbq has quit [Quit: Leaving...]
pawnbox has joined #ruby
tubulife- has quit [Ping timeout: 250 seconds]
<shevy> hmmm
Hounddog has quit [Ping timeout: 272 seconds]
pawnbox has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
Mack has joined #ruby
Mack is now known as Guest55224
shock_one has joined #ruby
Hounddog has joined #ruby
Rickmasta has joined #ruby
aspiers_ has joined #ruby
lurch_ has quit [Quit: lurch_]
_edgecase_ has quit []
rdark has quit [Quit: leaving]
rdark has joined #ruby
rdark has quit [Changing host]
rdark has joined #ruby
nettoweb has joined #ruby
lurch_ has joined #ruby
<Guest55224> Hi good to go
devyn has quit [Read error: Connection reset by peer]
devyn has joined #ruby
NeverTired has joined #ruby
shock_one has quit []
Cohedrin has joined #ruby
dimasg has joined #ruby
ismaelga has quit []
tjbiddle has quit [Quit: tjbiddle]
patrick3 has joined #ruby
EvilDMP has left #ruby ["Textual IRC Client: www.textualapp.com"]
pawnbox has joined #ruby
Rollabunna has joined #ruby
bersimoes has quit [Ping timeout: 255 seconds]
patrick2 has quit [Ping timeout: 252 seconds]
KensoDev has quit [Remote host closed the connection]
leat has quit [Quit: leat]
leat has joined #ruby
bersimoes has joined #ruby
leat has quit [Client Quit]
UtkarshRay has joined #ruby
leat has joined #ruby
myztic has joined #ruby
leat has quit [Client Quit]
leat has joined #ruby
<leat> uit
Rollabunna has quit [Ping timeout: 250 seconds]
leat has quit [Client Quit]
Spami has joined #ruby
TvL2386 has joined #ruby
Mon_Ouie has quit [Ping timeout: 244 seconds]
leat has joined #ruby
leat has quit [Client Quit]
nfk|laptop has joined #ruby
skcin7 has joined #ruby
<shevy> a question
<shevy> on linux, for GNU configure based projects... if I do:
poguez_ has quit [Quit: Connection closed for inactivity]
<shevy> result = `./configure` # eg run a configure script
<shevy> will this use a specific PID (process id)?
<shevy> (The above code is then run in ruby of course)
lkba has quit [Ping timeout: 260 seconds]
InvGhostt has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
Rollabunna has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leat has joined #ruby
leat has quit [Client Quit]
leat has joined #ruby
CodingWolf has quit [Ping timeout: 246 seconds]
moeabdol has quit [Ping timeout: 244 seconds]
baweaver has quit [Ping timeout: 272 seconds]
<shevy> hmmm
tubulife- has joined #ruby
<shevy> running configure like that seems to spawn one instance of "gcc" which probably also spawns up "cc1"
<shevy> at least ps ax says that
Trynemjoel has quit [Ping timeout: 264 seconds]
Gadgetoid has quit [Ping timeout: 272 seconds]
kimegede has quit [Excess Flood]
kimegede has joined #ruby
tubuliferous_ has quit [Ping timeout: 272 seconds]
unreal has quit [Ping timeout: 272 seconds]
freedrull has quit [Ping timeout: 272 seconds]
Pumukel has joined #ruby
freedrull has joined #ruby
unreal has joined #ruby
Gadgetoid has joined #ruby
kerunaru has joined #ruby
<BLuEGoD> AR/Arel related. I have a STI model which has a many to many relationship through a mapping table, such as Stis <-> Things. I want to do Sti.joins(:things) but is complaining about the parent model parent.thing_id does not exist... Any idea how to achieve this?
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Nahra has quit [Ping timeout: 246 seconds]
<apeiros> ?rails BLuEGoD
<ruboto> BLuEGoD, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<yorickpeterse> morning
rodfersou has joined #ruby
loechel has joined #ruby
Pumukel has quit [Ping timeout: 240 seconds]
bersimoes has quit [Read error: Connection reset by peer]
<BLuEGoD> technically it's related to AR/Arel gems and not to Rails, but fair enough.
loechel is now known as Pumukel
nettoweb has joined #ruby
certainty|mobile has quit [Ping timeout: 240 seconds]
<apeiros> !fact add ?ar For activerecord/arel questions , please join #RubyOnRails, since they're maintained as a part of it. Note: you need to be identified with NickServ, see /msg NickServ HELP
* apeiros grumbles
<apeiros> !fact add ar For activerecord/arel questions , please join #RubyOnRails, since they're maintained as a part of it. Note: you need to be identified with NickServ, see /msg NickServ HELP
<ruboto> apeiros, I will remember that ar is For activerecord/arel questions , please join #RubyOnRails, since they're maintained as a part of it. Note: you need to be identified with NickServ, see /msg NickServ HELP
* apeiros was silly
* apeiros hopes this gets rid of the repeat "but this is only AR/arel, not rails" :)
<apeiros> !fact ed ar For activerecord/arel questions, please join #RubyOnRails, since they're maintained as a part of it. Note: you need to be identified with NickServ, see /msg NickServ HELP
<ruboto> apeiros, I stand corrected that ar is For activerecord/arel questions, please join #RubyOnRails, since they're maintained as a part of it. Note: you need to be identified with NickServ, see /msg NickServ HELP
bersimoes has joined #ruby
KnownSyntax has quit [Quit: Connection closed for inactivity]
doddok has joined #ruby
ych has joined #ruby
ych is now known as Guest58727
pawnbox has quit [Remote host closed the connection]
doddok has left #ruby [#ruby]
pawnbox has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
dmolina has joined #ruby
<Guest55224> i am getting utc date conversion error
<Guest55224> here is code processedtime.in_time_zone(TZInfo::Timezone.get('UTC'))
doddok has joined #ruby
<apeiros> in_time_zone - that sounds like rails?
dionysus69 has joined #ruby
prolink has quit [Quit: Page closed]
subscope has joined #ruby
arup_r has joined #ruby
rizli has joined #ruby
rizli has left #ruby [#ruby]
rizli has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
doddok has quit [Quit: Leaving]
<Guest55224> <apeiros> yes
rizli has left #ruby [#ruby]
rizli has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rizli has left #ruby [#ruby]
rizli has joined #ruby
roshanav_ has joined #ruby
roshanav_ has quit [Remote host closed the connection]
cwong_on_irc has quit [Quit: Leaving.]
roshanavand has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
roshanavand has quit [Remote host closed the connection]
<apeiros> ?rails Guest55224
<ruboto> Guest55224, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
roshanavand has joined #ruby
roshanavand has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dimasg has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
Guest55224 has left #ruby [#ruby]
will_wielder has joined #ruby
TPBallbag has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
bersimoes has quit [Read error: Connection reset by peer]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brt has joined #ruby
bersimoes has joined #ruby
gustav_ has joined #ruby
Nahra has joined #ruby
karapetyan has quit [Remote host closed the connection]
platzhirsch has joined #ruby
roshanavand has joined #ruby
axsuul has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
<Bish> hi fans, i want to parse a hash with JSON.parse and get notified about every change on that resulting hash, is there a way i can accomplish this
rizli has quit [Quit: Leaving.]
<Bish> i overloaded []=, but that doesn't catch the case of obj[][]=, any ideas?
doddok has joined #ruby
Guest58727 has quit [Quit: Textual IRC Client: www.textualapp.com]
tvw has joined #ruby
baweaver has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yardenbar has quit [Ping timeout: 244 seconds]
ldnunes has joined #ruby
karapetyan has quit [Remote host closed the connection]
maloik has quit [Ping timeout: 264 seconds]
yardenbar has joined #ruby
nso95- has joined #ruby
nso95- has quit [Changing host]
nso95- has joined #ruby
nso95 has quit [Quit: nso95]
karapetyan has joined #ruby
bersimoes has quit [Read error: Connection reset by peer]
joneshf-laptop_ has quit [Remote host closed the connection]
joneshf-laptop has joined #ruby
baweaver has quit [Ping timeout: 272 seconds]
maloik has joined #ruby
<will_wielder> hmmm
DoubleMalt has joined #ruby
bersimoes has joined #ruby
favadi has joined #ruby
TPBallbag has quit [Quit: don't try and hack my account Ballkenende]
skade has quit [Quit: Computer has gone to sleep.]
yardenbar has quit [Ping timeout: 240 seconds]
Ilyes512 has joined #ruby
mrd_ has quit [Quit: Leaving]
prestorium has joined #ruby
Gi0 has quit [Remote host closed the connection]
will_wielder has left #ruby [#ruby]
joneshf-laptop has quit [Remote host closed the connection]
dotix has joined #ruby
InvGhostt has joined #ruby
yardenbar has joined #ruby
yoongkang has quit [Remote host closed the connection]
stannard has joined #ruby
tulak has joined #ruby
futilegames has joined #ruby
Nahra has quit [Ping timeout: 272 seconds]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yardenbar has quit [Ping timeout: 252 seconds]
stannard has quit [Ping timeout: 244 seconds]
futilegames has quit [Client Quit]
dlitvak has joined #ruby
joneshf-laptop has joined #ruby
<Bish> >> x = {}; def x.[]= i,v; p i,v; super;end; x['i get printed, yay']=3;
<ruboto> Bish # => "i get printed, yay" ...check link for more (https://eval.in/475612)
yoongkang has joined #ruby
<Bish> is this legit :D?
yoongkang has quit [Remote host closed the connection]
yoongkang has joined #ruby
Rickmasta has joined #ruby
ebbflowgo has joined #ruby
Ilyes512 has quit [Quit: Textual IRC Client: www.textualapp.com]
minimalism has quit [Quit: leaving]
bersimoes has quit [Read error: Connection reset by peer]
maloik_ has joined #ruby
yardenbar has joined #ruby
<canton7> "legit" in what sense?
aspiers_ has quit [Quit: WeeChat 1.3]
bersimoes has joined #ruby
<alexherbo2> Hi
Tempesta has joined #ruby
curses has joined #ruby
sandstrom has joined #ruby
maloik has quit [Ping timeout: 272 seconds]
karapetyan has quit [Remote host closed the connection]
nso95- has quit [Remote host closed the connection]
karapetyan has joined #ruby
Azure has quit [Ping timeout: 246 seconds]
<Bish> canton7, will people think im crazy if i am doing this
<canton7> probably :P
<Bish> i did several things like this :D, im curious if this will result in me dyin
<cloudbud> Hi I am getting an error TypeError --------- no implicit conversion of Array into String in chef cookbook
<Bish> cloudbud, that's not nearly enough information
yoongkang has quit [Remote host closed the connection]
<Bish> can i check for multiple classes with .is_a?
<cloudbud> Bish : this is the code
<gregf_> Bish: i concur that you are worthy to be sacrificed for doing evil things ;)
karapetyan has quit [Ping timeout: 260 seconds]
<Bish> that's sweet, maybe you should see my code so convince you otherwise
<Bish> cloudbud, did you write it in whitespace? :p because i don't see code
<ruboto> cloudbud, as I told you already, please use https://gist.github.com
lurch_ has quit [Quit: lurch_]
<gregf_> s/as I told you already//
<canton7> aand the entire exception message, including the whole stack trace?
<Bish> cloudbud, and what line causes the mistake?
<cloudbud> Bish : that is not shown in the error msg just the error is being shown
<Bish> >> 1.is_a? ['Numeric']
<ruboto> Bish # => class or module required (TypeError) ...check link for more (https://eval.in/475622)
<Bish> >> 1.is_a? Numeric,Integer
kstuart has joined #ruby
lurch_ has joined #ruby
<ruboto> Bish # => wrong number of arguments (2 for 1) (ArgumentError) ...check link for more (https://eval.in/475623)
<Bish> cloudbud, well than you should catch the exception and find out
<Bish> could be anywhere, where an array is used
Guest65357 is now known as beagles
<Bish> >> File.method :each
<ruboto> Bish # => undefined method `each' for class `Class' (NameError) ...check link for more (https://eval.in/475624)
<Bish> >> File.new.method :each
<ruboto> Bish # => wrong number of arguments (0 for 1..3) (ArgumentError) ...check link for more (https://eval.in/475625)
<Bish> i wanted to be cool, but i can't
<Bish> File.open(authorized_keys_file).each do ... <= File doesn't have .each, does it?
howdoicomputer has quit [Ping timeout: 250 seconds]
doddok has left #ruby [#ruby]
<Bish> >> File.instance_method :each
<ruboto> Bish # => #<UnboundMethod: File(IO)#each> (https://eval.in/475626)
<Bish> whopsie.
Peg-leg has joined #ruby
yoongkang has joined #ruby
Cohedrin has quit [Remote host closed the connection]
Cohedrin has joined #ruby
JammyHammy has quit [Read error: Connection reset by peer]
ItSANgo has quit [Ping timeout: 240 seconds]
codecop has quit [Remote host closed the connection]
baweaver has joined #ruby
NeverTired has quit [Quit: Connection closed for inactivity]
dkam has joined #ruby
karapetyan has joined #ruby
kimegede_ has joined #ruby
ItSANgo__ has joined #ruby
kimegede_ has quit [Client Quit]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kimegede_ has joined #ruby
avril14th has quit [Remote host closed the connection]
kimegede has quit [Ping timeout: 265 seconds]
atomical has joined #ruby
baweaver has quit [Ping timeout: 272 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
mooe has quit [Quit: Connection closed for inactivity]
maloik_ has quit [Ping timeout: 240 seconds]
mrfoto has joined #ruby
atomical has quit [Ping timeout: 255 seconds]
Mon_Ouie has joined #ruby
<Bish> sorry, im confused by the docs
maloik has joined #ruby
<Bish> how do i pass blocks to another? if i do &block in parameter list, does it get a parameter, or is it just a name for the block then
<Bish> do i have to do it in the beginning or the end?! hngg
platzhirsch has quit [Remote host closed the connection]
mrfoto has quit [Remote host closed the connection]
mrfoto has joined #ruby
lxsameer has quit [Remote host closed the connection]
mrfoto has quit [Client Quit]
<blubjr> >> def f(x, &block); block.call x; end; f(2) {|x| x + 1} # bish
<ruboto> blubjr # => 3 (https://eval.in/475638)
subscope has joined #ruby
<Bish> and how would i pass block to another method in f?
bersimoes has quit [Read error: Connection reset by peer]
<Bish> and is the &block just a name for the block, because i could the same thing with yield.
skade has joined #ruby
<blubjr> >> def f(x, &block); block.call x; end; def g(&block); f(1, &block); end; g {|x| x + 2}
<ruboto> blubjr # => 3 (https://eval.in/475639)
<blubjr> like that you mean
Pupp3tm4st3r has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
bersimoes has joined #ruby
karapetyan has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
<Bish> hm, i did it that way, doesn't work somehow
cloudbud has quit [Ping timeout: 246 seconds]
<blubjr> what exactly did you write
Coldblackice has quit [Ping timeout: 276 seconds]
Ox0dea has joined #ruby
<gregf_> >> def f; yield 3;end; f { |x| x+2 }
<ruboto> gregf_ # => 5 (https://eval.in/475641)
sepp2k has joined #ruby
<blubjr> blocks are so ugly
<Ox0dea> >> def foo; proc[41] end; foo &:succ
<ruboto> Ox0dea # => 42 (https://eval.in/475642)
aryaching has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
bweston92 has quit [Remote host closed the connection]
<gregf_> >> def foo; proc[:foo"] end; foo &:upcase
<ruboto> gregf_ # => /tmp/execpad-9c0265c21949/source-9c0265c21949:2: syntax error, unexpected tSTRING_BEG, expecting ']' ...check link for more (https://eval.in/475643)
<gregf_> >> def foo; proc["foo"] end; foo &:upcase
<ruboto> gregf_ # => "FOO" (https://eval.in/475644)
Xeago has quit [Read error: Connection reset by peer]
CodingWolf has joined #ruby
dkam has quit [Quit: Be back later ...]
Xeago has joined #ruby
alexherbo2 has quit [Quit: WeeChat 1.3]
Pupp3tm4st3r has joined #ruby
bkxd has joined #ruby
<Ox0dea> ?experiment gregf_
<ruboto> gregf_, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
CodingWolf has quit [Max SendQ exceeded]
CodingWolf has joined #ruby
Robert__ has joined #ruby
karapetyan has quit [Remote host closed the connection]
InvGhostt has quit [Ping timeout: 260 seconds]
bersimoes has quit [Remote host closed the connection]
atomical has joined #ruby
InvGhostt has joined #ruby
roshanavand has quit [Remote host closed the connection]
karapetyan has joined #ruby
x0f has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
pawnbox has quit [Remote host closed the connection]
aspiers has joined #ruby
joonty has quit [Quit: joonty]
karapetyan has quit [Ping timeout: 240 seconds]
howdoicomputer has joined #ruby
pawnbox has joined #ruby
<gregf_> Ox0dea: were you not experimenting?
lurch_ has quit [Quit: lurch_]
lxsameer has quit [Ping timeout: 260 seconds]
akem has joined #ruby
InvGhostt has quit [Ping timeout: 240 seconds]
<Ox0dea> gregf_: No, I was demonstrating.
<gregf_> *shrugs*
<gregf_> some people can only give excuses
RegulationD has joined #ruby
lurch_ has joined #ruby
tk__ has joined #ruby
<Ox0dea> gregf_: You learned something, did you not?
howdoicomputer has quit [Ping timeout: 240 seconds]
Fredrich010 has quit []
roshanavand has joined #ruby
<gregf_> Ox0dea: sure did, but that would not pass a code review ;)
lxsameer has joined #ruby
lxsameer has joined #ruby
<Ox0dea> gregf_: I did not specify of what it was demonstrative, only that it was.
bkxd has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 244 seconds]
bkxd has joined #ruby
ldnunes has quit [Read error: Connection timed out]
freerobby has joined #ruby
ldnunes has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
dhjondoh has joined #ruby
Robert__ has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Mon_Ouie has quit [Ping timeout: 264 seconds]
millerti has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
decoponio has joined #ruby
arup_r has quit [Remote host closed the connection]
trautwein has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
trautwein has joined #ruby
karapetyan has joined #ruby
<gregf_> Ox0dea: thanks anyways. yeah, something new learned ;)
ta has quit [Remote host closed the connection]
A124 has quit [Quit: '']
karapetyan has quit [Ping timeout: 246 seconds]
arup_r has joined #ruby
<guardian> hello, how do I express with rspec that I want File.open to raise in the context of my test>
<guardian> ?
Pumukel has quit [Ping timeout: 246 seconds]
ebbflowgo has quit [Quit: ebbflowgo]
<yorickpeterse> expect { File.open(...) }.to raise_error(SomeErrorClass)
<yorickpeterse> guardian: ^
kp666 has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
suchness has quit [Read error: Connection reset by peer]
TvL2386 has quit [Ping timeout: 252 seconds]
arup___ has joined #ruby
synthroid has joined #ruby
sdothum has joined #ruby
arup_r has quit [Ping timeout: 250 seconds]
arup___ has quit [Client Quit]
bersimoes has joined #ruby
arup_r has joined #ruby
InvGhostt has joined #ruby
yoongkang has quit [Remote host closed the connection]
Marsupermammal has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
bersimoes has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Read error: Connection reset by peer]
<pontiki> havenwood: thanks for the regex
Spami has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
spt0 has joined #ruby
kp666_ has joined #ruby
pl1ght has quit [Ping timeout: 276 seconds]
sepp2k has quit [Ping timeout: 264 seconds]
pl1ght has joined #ruby
pawnbox has quit [Remote host closed the connection]
kp666 has quit [Ping timeout: 264 seconds]
huyderman has joined #ruby
d0lph1n98 has joined #ruby
gusTester has joined #ruby
dviola has joined #ruby
User458764 has joined #ruby
avril14th has joined #ruby
gustav_ has quit [Remote host closed the connection]
Xeago has joined #ruby
kp666_ has quit [Ping timeout: 240 seconds]
zotherstupidguy has quit [Quit: WeeChat 1.3]
diegoaguilar has joined #ruby
Xeago has quit [Remote host closed the connection]
atomical has quit [Ping timeout: 255 seconds]
atomical has joined #ruby
sgambino has joined #ruby
<Bish> how do i build a hash that automaticially syncs itself with disk on write?
<Bish> because what i do, seems pretty helpless
auzty has quit [Quit: Leaving]
Xeago has joined #ruby
<huyderman> Well, you'd probably have to override #[]=
<Bish> that's what i do, but i just had another wow effect with ruby
<Bish> i can overwrite Hash#[]= just for one "namespace"?
<Bish> that's so fucking great.
goodcodeguy has joined #ruby
howdoicomputer has joined #ruby
<yorickpeterse> or you can just write your own class and not having to worry about debugging #[]= being overwritten on a per file basis
<huyderman> You should probably make a subclass or wrap the hash in a new class though, not monkeypatch Hash
d0lph1n98 has quit [Quit: leaving]
<Bish> but if i overwrite hash as inner class, would it make any difference?
<Bish> yorickpeterse, is it per file basis? as far as i can tell it's per-"namespace" module,class or whatever? no?
lxsameer has quit [Quit: Leaving]
<Bish> huyderman, i'd love to do that, but JSON.parse gives me a Hash
<Ox0dea> Bish: You can define #[]= on any Hash's singleton class.
nateberkopec has joined #ruby
<Bish> sure, i could copy the content into "myHash"
<Bish> Ox0dea, every object has it's one Hash singleton class? (that's what i think i observed)
<huyderman> Bish: It would probably be cleaner
<Bish> because Module/Class inherits them from Kernel?
<Ox0dea> Bish: No, but every *object* has a singleton class.
cdg has joined #ruby
<Bish> and that singleton class, holds the information about overwritten Hash methods ? that's confusing
<Ox0dea> Bish: You can define #[]= on a per-Hash basis.
axsuul has joined #ruby
<Ox0dea> You can define #foo on a per-Object basis.
<Bish> Ox0dea, im doing that right now, but that seems even more hacky
<yorickpeterse> Bish: if you're talking about refinements, they're scoped to files
<yorickpeterse> err wait
<yorickpeterse> lexically
<yorickpeterse> derp
<huyderman> monkeypatching is often hacky ;)
<yorickpeterse> either way, just use a separate class
arup_r has quit [Remote host closed the connection]
<yorickpeterse> hacking Hash to do something fundamentally different is wrong
dhjondoh has quit [Quit: dhjondoh]
senayar has joined #ruby
<Bish> yorickpeterse, too bad, it would be cool either way
moeabdol has joined #ruby
TomPeed has joined #ruby
<Ox0dea> >> def (foo = {}).[]= k, v; super k, v * 2; end; foo[:a] = 21; foo # Bish
<ruboto> Ox0dea # => {:a=>42} (https://eval.in/475733)
<Ox0dea> You're doing that?
beauby has joined #ruby
alexherbo2 has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
<Bish> Ox0dea, yes
codecop has joined #ruby
favadi has joined #ruby
<Ox0dea> It's not the worst approach to syncing a Hash with disk, but that's hardly the best idea. :P
InvGhostt has quit [Ping timeout: 260 seconds]
jondot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Bish> >> module T class X def Hash.whopidu true end p Hash.instance_methods(:whopidu) end
<ruboto> Bish # => /tmp/execpad-f3ce9e860e70/source-f3ce9e860e70:2: syntax error, unexpected keyword_def, expecting '<' ...check link for more (https://eval.in/475736)
<Bish> >> module T; class X; def Hash.whopidu; true; end; p Hash.instance_methods(:whopidu); end
<ruboto> Bish # => /tmp/execpad-793d859332eb/source-793d859332eb:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/475737)
<Ox0dea> So much confusion in that snippet.
<Ox0dea> Bish: Please stop. That won't do at all what you seem to think it will.
<ljarvis> wat
pl1ght has quit [Ping timeout: 264 seconds]
poguez_ has joined #ruby
jondot has joined #ruby
<Bish> yorickpeterse, https://eval.in/475739
fxkr has left #ruby [#ruby]
<Bish> Hash does not have "whopidu" outside of class, inside it does
<Ox0dea> ...
<Bish> im sorry that i am not as fast as you guys :p
<Ox0dea> Bish: You're not defining an instance method there.
<Bish> i am not?
<Bish> oh sorry, but i did it the right way, already
silverdust has quit [Ping timeout: 240 seconds]
<Bish> that's it
<ljarvis> what's with the argument to instance_methods
<Ox0dea> A fundamental misunderstanding.
<ljarvis> I see
<ljarvis> Bish: see docs on instance_methods, it doesn't take a symbol
<Bish> well, either way, you can see it, i might get something wrong
<Bish> but to me it looks right, and cool :P
<ljarvis> what looks cool?
<Bish> being able to overload basic functions just for one class
<Bish> but Ox0dea tell sme im wrong, so i probably am
<ljarvis> it's not overloading
<ljarvis> just fyi
Xeago has quit [Remote host closed the connection]
<Ox0dea> Bish: You're just adding a method to Hash itself, not instances thereof.
<Ox0dea> I was showing you how to override one of those instances on any given Hash.
Gnut has joined #ruby
<huyderman> Actually, he's defining a new class T::X::Hash...
<ljarvis> tehe
<ljarvis> Ruby, not even hash
Guest75108 has quit [Remote host closed the connection]
curses has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Bish> but the original Hash stuff gets copied?
<huyderman> Bish: No
<ljarvis> you can confirm it quite easily in your code
<Bish> oh i see... that's why i think it's awesome
<Bish> yeah ofcourse, just didn't think of it
<Ox0dea> Bish: `Hash` refers to two different things on Lines 9 and 11 in your most recent snippet.
<ljarvis> anyway monkey patching is like kicking babies
<ljarvis> fun but unkind
<ljarvis> wait
<huyderman> lol
ta has joined #ruby
atomical_ has joined #ruby
Xeago has joined #ruby
arup_r has joined #ruby
Jardayn has joined #ruby
<huyderman> Bish: Just save yourself the trouble and make a new class, rather than funky monkey-patching. It's much easier and cleaner, and you'll save yourself alot of trouble debugging later...
lurch_ has quit [Quit: lurch_]
<Ox0dea> I think providing a custom definition of #[]= on some Hash makes perfect sense in some cases.
Torrieri has joined #ruby
lurch_ has joined #ruby
<Ox0dea> What's the harm?
<ljarvis> I couldn't even tell that that was the goal
troulouliou_div2 has joined #ruby
<ljarvis> or is that just a rebutal
davedev24 has joined #ruby
<ljarvis> rebuttal*
<Ox0dea> It's unclear exactly what Bish is going for, to be frank.
tomaz_b has joined #ruby
<ljarvis> I agree, to be Bill.
atomical has quit [Ping timeout: 255 seconds]
<huyderman> I *think* ha want's to read from a JSON to a hash, and have that hash automagically persist itself when you change the values
gustav_ has joined #ruby
jondot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis> seems reasonable
araujo has quit [Ping timeout: 250 seconds]
<Ox0dea> Seems like a perfect use case for defining #[]= on some Hash's singleton class, yeah?
B1n4r10 has joined #ruby
dhjondoh has joined #ruby
araujo has joined #ruby
<ljarvis> sure, I mean.. I'd prolly create a wrapper but i like rappers
<Ox0dea> `HashWithPersistedUpdate`?
<tomaz_b> hi guys .. i have one newbie question... i would like to use Dir.mktmpdir for some process... to create a temp dir and some stuff around this. The problem is that i would like to specify in which directory I would like this temp dir. But the system... or code is creating this temp folder in a /var/something/bla/bla and if i want to specify my directory for this temp folder i get errors around /moj/path/var/tempfolder...
<ljarvis> `ActivePersistedActionHash`
<Ox0dea> Ha.
RobertBirnie has joined #ruby
<tomaz_b> can somebody plese suggest how to specify a directory for tempfolders...
Kendos-Kenlen has joined #ruby
dwithers has joined #ruby
<Ox0dea> tomaz_b: You want a self-destructing temporary directory, yes?
araujo has quit [Max SendQ exceeded]
<tomaz_b> yes
<Ox0dea> tomaz_b: And you don't want the convenience of it living in /tmp for just that purpose?
<tomaz_b> yes
<Ox0dea> Why
<ljarvis> then specifying your own directory won't allow this
varunwachaspati has joined #ruby
<ljarvis> what if the program crashes? use /tmp
<Ox0dea> !next
<ljarvis> !prev
<varunwachaspati> just curious, Is subtyping supported in ruby?
araujo has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse> varunwachaspati: there's class inheritence
<ljarvis> that's a bucket of worms. Lunch time bbiab
<tomaz_b> ok... problem solved...
<yorickpeterse> and modules that can be included
<ljarvis> tomaz_b: horray
tomaz_b has quit [Quit: Leaving]
<ljarvis> hooray
<ljarvis> or something
araujo has quit [Max SendQ exceeded]
bersimoes has joined #ruby
<varunwachaspati> I know subclassing/inheritance is a way through which subtyping is implemented
araujo has joined #ruby
<varunwachaspati> can someone show me simple code which exhibhits subtyping
<Ox0dea> varunwachaspati: Do you mean subclassing?
User458764 has joined #ruby
_stu_ has joined #ruby
<yorickpeterse> varunwachaspati: class A < B; end
<Bish> huyderman, ofc im saving myself the trouble, but i want to understand how it works
<varunwachaspati> nope subtyping
<apeiros> varunwachaspati: classes aren't types.
<Bish> why does overloading hash in main work?
<Ox0dea> Bish: Because at the top level, `Hash` refers to the Hash we all know and love.
<varunwachaspati> apeiros: so then ruby doesn't support subtyping
Gnut has quit [Ping timeout: 240 seconds]
<Ox0dea> varunwachaspati: Ruby doesn't even have types in the general sense of the word.
<apeiros> ruby doesn't have types, and consequently no subtyping.
<Bish> but i can make an instance of "Hash we all know and love" in any module/class
<Ox0dea> Bish: Yes, because constant resolution.
<Bish> sounds like a song name to me
<Ox0dea> Sounds like a way to resolve the names of constants to me.
<yorickpeterse> ugh, the hardest thing in programming: asserting thread-safety
kobain has joined #ruby
<Ox0dea> >> module M; Hash = Class.new; Hash == ::Hash; end # Bish
<ruboto> Ox0dea # => false (https://eval.in/475766)
Rollabunna has quit [Remote host closed the connection]
<Ox0dea> Bish: There, `Hash` alone refers to `M::Hash`, whereas `::Hash` circumvents constant resolution to explicitly refer to the one available at the top level.
<shevy> long live ruby \o/
<Ox0dea> Living is dead! Long live long living!
<shevy> yorickpeterse I thought the hardest thing is finding a good name
moeabdol has quit [Quit: WeeChat 1.3]
bersimoes has quit [Remote host closed the connection]
<yorickpeterse> that and off by one errors
joonty has joined #ruby
Xeago has quit [Remote host closed the connection]
Gnut has joined #ruby
<Ox0dea> The hardest thing in computer science is my REDACTED.
moeabdol has joined #ruby
gambl0re has quit [Ping timeout: 264 seconds]
<Bish> Ox0dea, would you rather A) overwrite []= for each instance of Hash B) create my own class, and copy the contentsw
howdoi has quit [Quit: Connection closed for inactivity]
dwithers1 has joined #ruby
<Ox0dea> Bish: Oh, I hadn't caught that you've got more than one.
<Ox0dea> If that's the case, the latter certainly makes more sense.
<Bish> well, basicially it is one, but they're nested
dwithers has quit [Read error: Connection reset by peer]
yoongkang has joined #ruby
pawnbox has joined #ruby
<Bish> does that man i could do
<Bish> class Hash < Hash :D
failshell has joined #ruby
InvGhostt has joined #ruby
<Ox0dea> Bish: That does thicken the plot a little, but you're probably still better off creating a class for the sake of clarifying intent.
Gnut has quit [Ping timeout: 260 seconds]
tomaz_b has joined #ruby
<Bish> i just want to understand!
<shevy> cool Bish
<shevy> class String < String
<shevy> I don't think I have seen this before
tomaz_b has quit [Remote host closed the connection]
* Bish is a clever boy
<Ox0dea> Bish: When wouldn't that work? :P
<shevy> >> class Hash < Hash; end
<ruboto> shevy # => superclass mismatch for class Hash (TypeError) ...check link for more (https://eval.in/475771)
<shevy> haha! it is its own wrong superclass!!!
<Ox0dea> That's right, shevy. At the top level.
andikr has quit [Remote host closed the connection]
<Ox0dea> >> $VERBOSE = nil; Hash = Class.new(Hash)
<ruboto> Ox0dea # => Hash (https://eval.in/475772)
<Ox0dea> It's a little weird that that works?
roshanavand has quit [Remote host closed the connection]
<Bish> >> Module Test class Hash < Hash end end
<ruboto> Bish # => /tmp/execpad-818961dfcf15/source-818961dfcf15:2: syntax error, unexpected keyword_end, expecting ';' ...check link for more (https://eval.in/475773)
<shevy> Ox0dea you and your anonymous magic
<Ox0dea> I squashed the reassigned constant warning, not the superclass mismatch, mind.
<adaedra> Anonymous?
<Ox0dea> shevy: "Anonymous" means "without a name".
<Ox0dea> I am naming all these things you've been considering to be "anonymous".
<shevy> precisely
pawnbox_ has joined #ruby
<Ox0dea> >> (Foo = Class.new).respond_to? :name # shevy
yoongkang has quit [Ping timeout: 255 seconds]
<ruboto> Ox0dea # => true (https://eval.in/475779)
<Bish> what about this one
<Ox0dea> Why `i`?
<shevy> Ox0dea sure, the object responds to .name which is just a method
<Ox0dea> shevy: But that means it has a name... the very antithesis of anonymity.
<shevy> it could be called .buxdehude too
<Ox0dea> Now you're being deliberately obtuse.
<shevy> or .id
<shevy> wait, we had that ...
<Bish> shevy, i was shitting bricks, when i first was driving by buxtehude
<adaedra> >> (Foo = Class.new).name
<ruboto> adaedra # => "Foo" (https://eval.in/475781)
<shevy> Bish LOL
bruce_lee2 is now known as bruce_lee
<adaedra> Here, it _has_ a name.
<Bish> i never knew it was a real village
sigurding has joined #ruby
beauby has quit [Read error: Connection reset by peer]
<Bish> https://eval.in/475778 <= what do you think? isn't that beautiful?
<shevy> Bish I've never been there but there is a town called Fucking in Austria... you pronounce it Fuuuuuuuu-cking though https://en.wikipedia.org/wiki/Fucking,_Austria
<huyderman> Bish: You're really just subclassing Hash as Test::Hash now
pawnbox has quit [Ping timeout: 250 seconds]
beauby has joined #ruby
<Bish> shevy, im german, so that's not hard for me :D
<adaedra> Bish, shevy, this belongs to -offtopic.
<Bish> adaedra, does mentioning off topics belong to offtipic?
kies has quit [Ping timeout: 246 seconds]
<shevy> right, germans go into offtopic!
babblebre has joined #ruby
allcentury has joined #ruby
roshanavand has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
<Bish> huyderman, but would that result in json.parse using my Hash?
elaptics is now known as elaptics`away
<huyderman> Probably not
<Bish> https://eval.in/475788 well, that is interesting, i think i understand it now.
dhjondoh has joined #ruby
dhjondoh has quit [Remote host closed the connection]
sankaber has joined #ruby
linuxboytoo has joined #ruby
<Bish> https://eval.in/475794 <= also super interesting :3
shredding has quit [Ping timeout: 276 seconds]
profsimm has joined #ruby
pdoherty has quit [Ping timeout: 250 seconds]
<huyderman> When you reference Hash inside the Test module, it will resolve to Test::Hash
<huyderman> If you want the "real" Hash, you'll need write ::Hash
TvL2386 has joined #ruby
<profsimm> When I use any gem with --watch mode my ruby pegs up to 100% on Windows. Any clues?
jackcom has left #ruby [#ruby]
<huyderman> but JSON will not execute in the context of the Test module, so it will resolve to the root Hash not Test::Hash
<Bish> i think i understand it now
e7d has quit [Quit: Leaving]
<Bish> but if i create my own Hash as subclass of Hash, will i be able to fill it with MyHash.new NormalHash
kp666 has joined #ruby
scripore has joined #ruby
<Ox0dea> Bish: You'll have to redefine #initialize, since MyHash.new will behave like Hash.new, which isn't what you want in this case.
psy_ has joined #ruby
<Bish> okay that sucks, but i'll be fine
<Bish> too bad there is no cool mechanism for "listeners"
ta has quit [Remote host closed the connection]
psy_ has quit [Max SendQ exceeded]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Ox0dea> Bish: You could say `MyHash[normal_hash]`, but probably don't.
<huyderman> class SubHash < Hash; def initialize(hsh); replace(hsh); end; end;
psy_ has joined #ruby
<Diabolik> just started properly learning JS, I already miss Ruby :(
<Ox0dea> Diabolik: Start learning proper JS? :P
axsuul has quit [Ping timeout: 240 seconds]
howdoicomputer has joined #ruby
<Diabolik> im learning React atm
<Diabolik> have to for the job
<Ox0dea> Well, React != JS, for what that's worth.
<Diabolik> by proper do you mean class oriented ES6 JS?
<havenwood> JSON::GeneratorError: 839: NaN not allowed in JSON
RegulationD has joined #ruby
<Ox0dea> Diabolik: More or less.
certainty|mobile has joined #ruby
<profsimm> Diabolik: check out TypeScript
<Ox0dea> profsimm: Diabolik is not likely to be at liberty to do so.
avril14th has quit [Remote host closed the connection]
<profsimm> Ox0dea: if he simply presumed he's not at liberty to do so before he even asks, the one restricting their freedom is themself.
RobertBirnie has quit [Read error: Connection reset by peer]
<profsimm> The grammar in my previous sentence is criminal.
<profsimm> But you get the point.
howdoicomputer has quit [Ping timeout: 260 seconds]
* havenwood waits on Perl6Script transpiler
RegulationD has quit [Ping timeout: 255 seconds]
freerobby has quit [Ping timeout: 276 seconds]
<Ox0dea> profsimm: Our "at liberty to do so"s lined up.
blaxter has quit [Quit: foo]
yes`r has quit [Ping timeout: 240 seconds]
aganov has quit [Quit: Leaving]
<Ox0dea> In any case, I was only facetiously harkening back to their having picked up JS for work.
sanjayu has quit [Ping timeout: 240 seconds]
tk__ has quit [Quit: ばいばい]
RobertBirnie has joined #ruby
<Ox0dea> Om Next is React + immutable data structures and it's faster. I think Uncle Bob wasn't far off the mark in calling Clojure the "hundred-year language".
akem has quit [Ping timeout: 250 seconds]
<profsimm> Ox0dea: I'm not sure we can talk about "faster" because one runs in browsers and the other isn't available for browsers
<Ox0dea> s/faster/more performant/ in the interest of technical accuracy.
tagrudev has quit [Remote host closed the connection]
<Ox0dea> profsimm: ClojureScript is very much a thing.
<havenwood> profsimm: ClojureScript is quite nice!
<profsimm> Ox0dea: yes but it's not "faster" is it. It's compiled to JS
<Ox0dea> profsimm: David Nolen's benchmarks speak quite for themselves.
<apeiros> javascript runs just fine outside of browsers too
freerobby has joined #ruby
<profsimm> apeiros: we're discussing React, where you can use parts of it outside a browser, but it largely makes no sense.
<havenwood> profsimm: See the `No native implementation`s: http://himera.herokuapp.com/synonym.html
<Ox0dea> profsimm: That's the beauty of it! ClojureScript *does* transpile to JS, and yet Om Next's use of immutable data structures permits it to outperform "native", so to speak.
<profsimm> Ox0dea: that makes no sense.
<Ox0dea> profsimm: Are you asking me to do your research for you?
maikowblue has joined #ruby
<profsimm> Ox0dea: no I'm just asking you back up your statements I guess.
norc has joined #ruby
dhollinger has joined #ruby
<profsimm> Ox0dea: React is also based on immutable data structures internally. Whether they do it well is another thing.
stannard has joined #ruby
nfk|laptop has quit [Ping timeout: 252 seconds]
<profsimm> Ox0dea: but when it hits the V8, it's V8 opcodes, and no language can "outperform native" as that language doesn't even exist at the point it's compiled to opcodes.
elaptics`away is now known as elaptics
<Bish> why is ClojureScript so cool?
<Diabolik> ^
<Bish> i mean i love lisp, but what's so great about it
<Bish> inb4 it's not lisp, that's not what i mean
<profsimm> Bish: it's not popular as a mainstream language therefore it' cool. Don't you know your Hipster 101
<Ox0dea> profsimm: https://archive.is/8lxzi#selection-191.0-203.72
<Ox0dea> There's the rub.
neonalpine has joined #ruby
<Ox0dea> profsimm: Be not proud of your ignorance.
<profsimm> Ox0dea: that's how React works as well.
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> profsimm: Then why does Om outperform on benchmarks?
<profsimm> Ox0dea: where
<Ox0dea> No more spoonfeeding.
<profsimm> Ox0dea: yeah, so it outperforms on benchmarks that shall remain unspoken of.
agit0 has joined #ruby
<Ox0dea> s/unspoken of/undiscovered/, if you've truly forgotten how to attain knowledge you've a genuine interest in acquiring.
<profsimm> Ox0dea: well on *my* benchmarks, that I won't link you to, nothing outperforms Basic, so.
<profsimm> Basic is better.
<Bish> i like turtles.
<Ox0dea> profsimm: Do you still have that page open?
e7d has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anisha has quit [Quit: Leaving]
<profsimm> Ox0dea: should I play drum rolls waiting for you to reveal those benchmarks, or will you just link.
ruby-prudi has joined #ruby
<Bish> why did i never heard of om or clojurescript, jesus, i seem to be living behind the moon.
<Ox0dea> profsimm: Do you know how to use your browser's "find in page" feature?
<profsimm> *drum rolls*
favadi has quit [Quit: Textual IRC Client: www.textualapp.com]
dwithers2 has joined #ruby
trautwei_ has joined #ruby
<profsimm> *drum rolls intensify... slowly*
<profsimm> You can cut the dramatic suspense with a knife in 'ere
Shizus has joined #ruby
ych has joined #ruby
<apeiros> I suggest to drink it. suspense is tasty and very refreshing.
<profsimm> Soon we'll know how ClojureScript outperforms the platform it runs on by doing what React already does
<Ox0dea> profsimm: You have implied that you wish to be treated like an infant, and so I shall refrain from overloading your delicate circuitry until such time as you have indicated that you are ready for the next step in this phase of your enlightenment.
ych is now known as Guest92956
<apeiros> Ox0dea: moderate your tone please.
podman has joined #ruby
<profsimm> Ox0dea: I wish to be treated like an infant, because you want to state bold claims and then tell me "prove my point for yourself"
<profsimm> Ox0dea: that's not how logic works my friend
<Ox0dea> profsimm: Ctrl-F is not a terribly difficult chord to execute.
<Ox0dea> Nor is "benchmark" a particularly troublesome word to type.
<Ox0dea> You can do this.
<Ox0dea> I have faith in you.
<profsimm> Ox0dea: there's no such word in the page you linked me to
<profsimm> Ox0dea: also your troll is weak, and so... see ya
<Ox0dea> apeiros: Help! I'm being trolled!
nfk|laptop has joined #ruby
ItSANgo__ has quit [Quit: Leaving...]
<Shizus> Hello, if I define a constant in a class, is this constant allocated everytime I instantiate an object of the given class?
<apeiros> profsimm: I think Ox0dea refers to https://archive.is/8lxzi#selection-191.0-203.72, and "benchmark" is indeed in there
<Bish> what's so cool about react?
<Bish> im serious, i wanna now.
<havenwood> Bish: It reacts.
<Diabolik> ^
<Ox0dea> Shizus: Nope.
dwithers1 has quit [Ping timeout: 276 seconds]
trautwein has quit [Ping timeout: 276 seconds]
<Bish> so does uranium. don't want it near me, tho
colegatron has joined #ruby
<Shizus> Good, thank you Ox0dea
sankaber has joined #ruby
<Ox0dea> Shizus: Happy to help.
<profsimm> apeiros, Ox0dea those benchmarks compare Om and React on *one side* and Backbone on the *other*, suggesting Om and React operate in a similar way with similar performance.
<apeiros> Ox0dea: I don't see that as trolling. I concur with profsimm that if you claim A is faster than B and there's benchmarks to prove it, it's your duty to supply/link them.
<profsimm> apeiros, Ox0dea: the point under debate was that Om is faster than React.
e7d has quit [Read error: Connection reset by peer]
<profsimm> apeiros, Ox0dea so I guess there was no point.
<apeiros> profsimm: I've actually only seen Om vs. Backbone in that last link. so yeah…
JJM has joined #ruby
<Bish> if clojurescript is compiling to js, how can it be faster than js :o?
_stu_ has quit [Quit: _stu_]
JJM is now known as Guest73056
<Ox0dea> Bish: Better data structures.
<profsimm> So Om is in fact an interface *for React*
<profsimm> Ok, I guess this makes everything even funnier :P
blackmesa has joined #ruby
<Bish> well, but if a compiler can create those strucutres, a programmer can do so, too? right?
<Bish> so it's just easier to construct good data structures in clojure?
Nahra has joined #ruby
<Ox0dea> profsimm: Sorry, I do seem to have conflated that post with one of Nolen's talks.
Xeago has joined #ruby
<Bish> Ox0dea, im serious, those things amaze me, please answer me instead of having a useless discussion, it will be not in vain!
<profsimm> Ox0dea: all right
<Ox0dea> Bish: I am not your Google.
colegatron has quit [Ping timeout: 260 seconds]
<norc> Shizus: When you instantiate a class 2 things happen. Allocation and #initialize get called. That's all there is.
profsimm has quit [Quit: Page closed]
<Bish> but my question is not about clojure :/ it's about languages itself
ItSANgo has joined #ruby
<Bish> but i am not getting what's cool about react either, so maybe i shouldn't bother
<Ox0dea> Bish: It doesn't take much of a theoretical leap to realize that we could write a data structure with, say, better cache locality than Ruby's Hash in Ruby itself.
<gregf_> Bish: Ox0dea is google *ducks*
<havenwood> Bish: Want to read up on data structures like Clojure is using but not Clojure itself?
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
colegatron has joined #ruby
<norc> Ah, are we having one of these intense drumstick discussions at the moment?
kerunaru has quit [Ping timeout: 265 seconds]
<havenwood> norc: Turkey drumsticks?!
Shizus has quit [Ping timeout: 246 seconds]
tulak has quit [Ping timeout: 272 seconds]
Tempesta has quit [Read error: Connection reset by peer]
<Bish> Ox0dea, see, i wouldn't have come up with that, 'cause im stupid. even though i had all of this in cs lectures
dwithers2 has quit [Ping timeout: 272 seconds]
<Bish> so that leap is massive for me, but i understand it, it's a good way to learn to listen to people, who are willing to answer :P
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
TvL2386 has quit [Ping timeout: 252 seconds]
<Bish> but since it compiles to js, a programmer could write those things in js, just not that easy, right?
<Ox0dea> Bish: Just so. :)
Tempesta has joined #ruby
<Bish> im aware of the fact, that i am asking question i know the answers to, i just want to know
User458764 has joined #ruby
Torrieri has quit [Quit: Be back later ...]
<Ox0dea> Public validation is good for... something, I guess.
_blizzy_ has joined #ruby
<Bish> so you're claiming clojurescript compiles good which gets run faster in js because of effects the generated code has on cache/jit or whatever
aeontech has joined #ruby
<Bish> s/good/good code/
InvGhostt has quit [Ping timeout: 272 seconds]
<Bish> #ruby-way-offtopic
NeverDie has joined #ruby
gustav_ has quit [Remote host closed the connection]
Torrieri has joined #ruby
Torrieri has quit [Changing host]
Torrieri has joined #ruby
ItSANgo has quit [Quit: Leaving...]
Xeago has quit [Remote host closed the connection]
<havenwood> Matz said he's not against persistent data structures in Ruby 3.0 it just needs more research.
pawnbox_ has quit [Remote host closed the connection]
Kartikay has joined #ruby
mistermocha has joined #ruby
<Kartikay> Hi everyone!!
<Kartikay> What is the analog of the python dir() in ruby?
<gregf_> .methods?
<Kartikay> gregf_: Thanks a lot!
mistermocha has quit [Remote host closed the connection]
snockerton has joined #ruby
<Ox0dea> Kartikay: Are you making the sacred switch? :)
<havenwood> Kartikay: Or in Pry maybe a: ls
<Kartikay> Ox0dea: What's that?
<havenwood> ?pry Kartikay
<ruboto> Kartikay, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
bersimoes has joined #ruby
<Kartikay> havenwood: Oh thanks, I was just going to ask about analogs of ipython next. How did you read my mind?
<ljarvis> analogs
<ljarvis> tehe
<gregf_> i've never ever used a repl(only a debugger). Kartikay, similar to python -c '', you can do a ruby -le ''
dwithers2 has joined #ruby
gustav_ has joined #ruby
pawnbox has joined #ruby
<gregf_> s/analogs/something along the lines of/g; # only weak people make fun of others. low on self esteem
beauby has quit [Ping timeout: 252 seconds]
Spami has joined #ruby
codecop has quit [Remote host closed the connection]
uri has joined #ruby
Xeago has joined #ruby
<ljarvis> ...
<ljarvis> wat
alexherbo2 has quit [Quit: WeeChat 1.3]
s2013 has joined #ruby
<Ox0dea> >> 'analogs'.include?('anal') && 'analogs'.include?('logs') # gregf_
<ruboto> Ox0dea # => true (https://eval.in/475826)
<Ox0dea> I suspect that was the cause of ljarvis' "tehe".
<ljarvis> tehe
kimegede_ has quit [Quit: Leaving...]
InvGhostt has joined #ruby
diegoaguilar_ has joined #ruby
diegoaguilar has quit [Ping timeout: 240 seconds]
<ljarvis> anyway I'm absolutely pumped off of self esteem so your analyzation is inaccurate
Kartikay has left #ruby [#ruby]
Kartikay has joined #ruby
ItSANgo has joined #ruby
CloCkWeRX has joined #ruby
<Ox0dea> $ git rekt
s2013 has quit [Read error: Connection reset by peer]
norc has quit [Ping timeout: 246 seconds]
bluOxigen has joined #ruby
pandaant has joined #ruby
<gregf_> >> /(?<tehe>(?:l?j?a?r?v?i?s)|tehe)*/ =~ "tehe";p [tehe]
<ruboto> gregf_ # => ["tehe"] ...check link for more (https://eval.in/475832)
arup_r has quit [Remote host closed the connection]
<ljarvis> :/
<Ox0dea> gregf_: Please explain what has been demonstrated.
Nahra has quit [Ping timeout: 250 seconds]
<ljarvis> ooo
<ljarvis> i can answer this
<ljarvis> pick me
<Ox0dea> ljarvis: I choose you!
<ljarvis> ok
<ljarvis> nothing!
<gregf_> Ox0dea: you said tehe was a word in your vocabulary? not in mine :|
<ljarvis> did i get it right?
mrfoto has joined #ruby
stannard has quit [Remote host closed the connection]
<Ox0dea> ljarvis: You did! Well done. <3
<ljarvis> <333
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<gregf_> *insanity doesnt have limits* *runs*
bersimoes has quit [Remote host closed the connection]
stannard has joined #ruby
dmcp_ has joined #ruby
<Kartikay> Does anyone here use sublime?
<Ox0dea> Kartikay: Decent people might nevertheless be able to assist you with your question; please ask it.
<Kartikay> Ok, So I am having trouble in finding the files for the build system
<Kartikay> I dont know where the settings are located (on linux)
<Ox0dea> Kartikay: Are you trying to tell Sublime where your Ruby interpreter lives, then?
<Kartikay> Ox0dea: Yes, absolutely
<Ox0dea> Kartikay: Which distro?
<Kartikay> Ox0dea: Its Ubuntu
<Ox0dea> Kartikay: How did you install it?
<ljarvis> How many walkers have you killed?
<Kartikay> I installed it by installing a ppa with apt-get
rodfersou is now known as rodfersou|lunch
<Ox0dea> apt-get doesn't install PPAs.
<Kartikay> Ox0dea: Wait I will tell you what commands I ran
* Bish hates debian and anything that hatched from it
gord0 has left #ruby [#ruby]
<Ox0dea> Kartikay: Your configuration files should be in `~/.config/sublime-text-3`.
yardenbar has quit [Ping timeout: 265 seconds]
<Ox0dea> But, well, are you sure you can't change the interpreter from within the GUI?
<Kartikay> Ox0dea: Ok thanks I found it
<Kartikay> There is no GUI in sublime
frem has joined #ruby
<Kartikay> for the setting
beauby has joined #ruby
<Ox0dea> Are you sure?
djstorm has joined #ruby
antgel has quit [Ping timeout: 265 seconds]
<Kartikay> Ox0dea: Yes, we have to do all the configuration through text files.
grill has joined #ruby
zotherstupidguy has joined #ruby
antgel has joined #ruby
<Ox0dea> Kartikay: Ah, right. You want `~/.config/sublime-text-3/Packages/Ruby/Ruby.sublime-build`.
rdark has quit [Read error: Connection reset by peer]
huyderman has quit [Remote host closed the connection]
<Ox0dea> Something very much like that, at any rate.
<Kartikay> Ox0dea: Yes, I did it
<Ox0dea> Nice.
<Kartikay> SOlved the problem, thanks
jas02 has left #ruby [#ruby]
e7d has joined #ruby
<Ox0dea> Sure thing.
howdoicomputer has joined #ruby
atomical_ has quit [Max SendQ exceeded]
<Kartikay> Ok, now a ruby question. I have the following code: file = open(filename); puts file.read; close(file);
<Kartikay> But close(file) gives me an error
<Ox0dea> Kartikay: Alas, `open` being available at the top level is an anomaly.
roger_rabbit has quit [Ping timeout: 260 seconds]
<Ox0dea> It's actually Kernel#open, which is for more than just files. You probably shouldn't use it without a good reason.
<Kartikay> Ohkk, thanks
<havenwood> Kartikay: It's common to see the block form of File.open, which self-closes. In this case the simplest might be: file = File.read file
<gregf_> Kartikay: are you trying to map python to ruby 'literally'?
<havenwood> (Ignoring my use of `file` twice.)
<Kartikay> gregf_: No, I'm trying to learn ruby from the book "Learn ruby the hard way"
<Ox0dea> Somebody stop them!
howdoicomputer has quit [Ping timeout: 252 seconds]
sankaber has joined #ruby
rdark has joined #ruby
platzhirsch has joined #ruby
<havenwood> Kartikay: The Hard Way is known for not being particularly idiomatic Ruby. But it might be good for a quick introduction coming from Python since it seems like a Pythonista's take on Ruby.
wpp has joined #ruby
<havenwood> Kartikay: Just keep in mind there might be a nice idiomatic Ruby way to do it! Good to ask here. :)
shinnya has joined #ruby
atomical has joined #ruby
<Kartikay> Ok, but what is "idiomatic"?
<havenwood> Kartikay: The way a Rubyist would do it.
s2013 has joined #ruby
<Kartikay> Nice definition, but if you already dont know Ruby, then how will you explain it?
mmitchell has joined #ruby
nfk|laptop has quit [Quit: yawn]
unreal has quit [Read error: Connection reset by peer]
<Bish> if im returning an instance of an inner class
<havenwood> Kartikay: Code that avoids known pitfalls, embraces known advantages, and looks pretty.
<Bish> will the outside world know about this object?
baweaver has joined #ruby
<Kartikay> ok, thanks
<Papierkorb> Bish: yes of course
unreal has joined #ruby
tulak has joined #ruby
Xeago has quit [Remote host closed the connection]
weemsledeux has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has joined #ruby
kerunaru has joined #ruby
RobertBirnie has quit [Ping timeout: 244 seconds]
<Kartikay> Which book would you recommend for learning ruby if I already know Python, C and Java?
bersimoes has joined #ruby
Xeago has joined #ruby
blueOxigen has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
<havenwood> Kartikay: Hem, maybe the Well-Grounded Rubyist, Second Edition.
s2013 has quit [Read error: Connection reset by peer]
<Ox0dea> Bish: You can't hide anything from ObjectSpace. :)
RobertBirnie has joined #ruby
<Ox0dea> Not without dropping to C, anyway.
JoshGlzBrk has joined #ruby
JoshGlzBrk has quit [Client Quit]
bluOxigen has quit [Ping timeout: 240 seconds]
User458764 has joined #ruby
pdoherty has joined #ruby
<Bish> ready or not, here i come, you can't hide
<Bish> nz nz nz
dionysus69 has quit [Ping timeout: 260 seconds]
dorei has joined #ruby
cornerma1 has joined #ruby
davedev2_ has joined #ruby
<Kartikay> havenwood: Any free ebook?
<Ox0dea> Kartikay: Are you quite fluent in those other languages?
<havenwood> Kartikay: Some book links here: http://ruby-community.com/pages/links
<Kartikay> Ox0dea: Nearly
<Ox0dea> "Fluent" is fluid.
gustav_ has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
<Ox0dea> That is, I'm having trouble parsing "nearly fluent".
scripore has quit [Quit: This computer has gone to sleep]
Xeago has joined #ruby
<Kartikay> Ox0dea: You can assume I am fluent
<Bish> can i save blocks in a class variable?
<Bish> he can, but will he!?
cornerman has quit [Ping timeout: 255 seconds]
cornerma1 is now known as cornerman
senayar has quit [Ping timeout: 240 seconds]
ruby-prudi has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
<Ox0dea> Bish: You can save Procs like any other value.
davedev24 has quit [Ping timeout: 272 seconds]
<Bish> but blocks != procs, right?
jackjackdripper has joined #ruby
<Bish> sure i can cast it, will it get casted implicitly?
<adaedra> only internally.
<Ox0dea> Right, but they're similar enough for most intensive porpoises.
dotix has quit [Ping timeout: 272 seconds]
<Bish> overwriting []= is easy as 123, right?
<Ox0dea> Yes. Welcome to Ruby.
<Bish> def []= idx,value, right?
<Ox0dea> No.
<adaedra> >> def z(&b); b.class; end; b {}
<ruboto> adaedra # => undefined method `b' for main:Object (NoMethodError) ...check link for more (https://eval.in/475848)
<adaedra> >> def z(&b); b.class; end; z {}
<ruboto> adaedra # => Proc (https://eval.in/475849)
<Bish> Ox0dea, what am i missing?
<adaedra> voilà
<shevy> was this french!
<Ox0dea> Bish: Oh, yeah, sorry.
<Ox0dea> I thought you were asking about defining it on a specific object.
beauby has quit [Ping timeout: 240 seconds]
<Ox0dea> Because previous conversation.
<Bish> bleeh it does not work >:|
Xeago has quit [Remote host closed the connection]
<shevy> Ox0dea is not quite awake today
<adaedra> shevy: it's used in English. Maybe without the `, though.
Pupp3tm4st3r has quit [Remote host closed the connection]
jackjackdripper has quit [Client Quit]
<Bish> it works for [], though
<shevy> adaedra yeah they steal words, they even stole "kindergarten"!
gustav_ has joined #ruby
<Ox0dea> Bish: Post code?
jackjackdripper has joined #ruby
futilegames has joined #ruby
<Ox0dea> shevy: They're our cognates now!
<Bish> sorry for intendenned, i don't know the noun.
<adaedra> Dat indent.
<Bish> i just copy pasted from terminal, looked like this, not my fault!
agent_white has quit [Read error: Connection reset by peer]
aufi has quit [Quit: Konversation terminated!]
gustav_ has quit [Remote host closed the connection]
futilegames has quit [Client Quit]
Rollabunna has joined #ruby
s2013 has joined #ruby
sankaber has quit [Remote host closed the connection]
<Bish> oh i know why it doesn't work
<Bish> copy isn't deep
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
trautwei_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sankaber has joined #ruby
<Bish> can i do .is_a? for multiple classes?
<Bish> like 1.is_a? [Numeric,Fixnum]
agent_white has joined #ruby
<Bish> or will i have to do it myself
<adaedra> did you try?
<Ox0dea> Bish: https://eval.in/475853
CloCkWeRX has quit [Ping timeout: 250 seconds]
_blizzy_ has quit [Quit: Leaving]
sdothum has joined #ruby
casadei has joined #ruby
<Ox0dea> But hey, you knew "depth" was the issue, so you're probably all set
<Bish> but as usual your version looks way cooler
<Ox0dea> <3
maloik has quit [Ping timeout: 260 seconds]
bersimoes has quit [Ping timeout: 260 seconds]
<Bish> === casts to class? cooooooooooool
Rollabunna has quit [Ping timeout: 276 seconds]
failshell has quit [Remote host closed the connection]
bersimoes has joined #ruby
Nahra has joined #ruby
<Bish> now the block gets called, but not at the point i wanted it to, atleast progress
mistermocha has joined #ruby
<Bish> the block is in the scope of the "issuer" of the block, is there some way to access the scope of the object calling the proc?
<Bish> just curious
<Ox0dea> Not without getting your hands inappropriately dirty.
_blizzy_ has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
s1kx has joined #ruby
<pipework> That gem is so fun for upping the dynamagical qualities of ruby.
<Ox0dea> It's about as far as I've seen Ruby pushed without outside help.
<pipework> Ah the set_trace_fun method. :D
<Ox0dea> Bolted-on immutability?! Only in Ruby.
yoongkang has joined #ruby
<pipework> Oh my god those.
<pipework> though*
<pipework> Ox0dea: I thought this was a different article. This is good shtuff for lulz.
scripore has joined #ruby
iateadonut has joined #ruby
rippa has joined #ruby
neonalpine has quit []
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
cwong_on_irc has joined #ruby
rubie has quit []
hxegon has joined #ruby
yoongkang has quit [Ping timeout: 252 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xeago has joined #ruby
alexherbo2 has joined #ruby
alexherbo2 has quit [Client Quit]
synthroid has quit [Remote host closed the connection]
radgeRayden has joined #ruby
Guest92956 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dviola> is it possible to use capybara from the CLI? like similar to a phantomjs script
timonv has quit [Quit: WeeChat 1.3]
will_wielder has joined #ruby
<dviola> or should I just write JS and use phantomjs for that?
CloCkWeRX has joined #ruby
<dviola> I need to simulate a login and measure the time it takes for the login and write the results in my db, perhaps run that from curl every 15 minutes
<dviola> err, cron, not curl
s2013_ has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
maloik has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dviola> or capybara is actually meant to be used with rspec/minitest?
timonv has joined #ruby
barhum2013 has joined #ruby
<Bish> geez this shit is not working!
blackmesa has quit [Ping timeout: 260 seconds]
patrick3 has quit [Quit: Leaving]
s00pcan has joined #ruby
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SCHAAP137 has quit [Remote host closed the connection]
<jhass> dviola: I don't see a strict requirement of it being used inside a test framework
maloik has quit [Ping timeout: 244 seconds]
sepp2k has joined #ruby
dfinninger has joined #ruby
bersimoes has quit [Read error: Connection reset by peer]
axsuul has joined #ruby
fedexo has joined #ruby
solars has quit [Ping timeout: 240 seconds]
thejamespinto has joined #ruby
will_wielder has left #ruby [#ruby]
codecop has joined #ruby
bersimoes has joined #ruby
s2013_ has quit [Ping timeout: 272 seconds]
Nahra has quit [Ping timeout: 244 seconds]
RobertBirnie has joined #ruby
senayar has joined #ruby
howdoicomputer has joined #ruby
s2013 has joined #ruby
azgil has joined #ruby
howdoicomputer has quit [Ping timeout: 246 seconds]
jbrhbr has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
arup___ has joined #ruby
agent_white has joined #ruby
millerti has joined #ruby
_blizzy_ has quit [Quit: Leaving]
mistermocha has quit [Ping timeout: 240 seconds]
Nahra has joined #ruby
millerti has quit [Max SendQ exceeded]
gregf has quit [Quit: WeeChat 1.3]
Kartikay has left #ruby [#ruby]
tulak has quit [Remote host closed the connection]
mrfoto has quit []
JoshGlzBrk has joined #ruby
arup_r has quit [Ping timeout: 272 seconds]
goodcodeguy has joined #ruby
baweaver has joined #ruby
kies has joined #ruby
TomyWork has quit [Ping timeout: 260 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JoshGlzBrk has quit [Client Quit]
kerunaru has quit [Ping timeout: 246 seconds]
weemsledeux has joined #ruby
will_wielder has joined #ruby
asas has joined #ruby
symm- has joined #ruby
dfinninger has quit []
baweaver has quit [Ping timeout: 264 seconds]
allcentury has quit [Ping timeout: 240 seconds]
avril14th has joined #ruby
mary5030 has joined #ruby
uber has quit [Quit: bye]
slick has quit [Quit: bye]
mary5030 has quit [Remote host closed the connection]
purplexed- has joined #ruby
purplexed- has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
Xiti has quit [Quit: Xiti]
uber has joined #ruby
Xiti has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
<purplexed-> Hey all. I'm having terrible trouble getting aws-sdk to work properly. I've searched high and low on google with no resolution. I've installed the gems: aws-sdk-core, aws-sdk-resources , and use require 'aws-sdk' .. but it says i can't find the file.
Wsewolod has joined #ruby
wpp has quit [Quit: ZZZzzz…]
towski_ has joined #ruby
synthroid has joined #ruby
s2013 has quit [Ping timeout: 240 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JoshGlzBrk has joined #ruby
Kendos-Kenlen has quit [Quit: Konversation terminated!]
<jhass> purplexed-: anything for gem which aws-sdk? how exactly did you install the gems, eg as root while running ruby with another user?
UtkarshRay has quit [Ping timeout: 272 seconds]
JoshGlzBrk has quit [Client Quit]
<jhass> purplexed-: the aws-sdk file is provided by the aws-sdk gem apparently, did you install that? https://github.com/aws/aws-sdk-ruby/tree/master/aws-sdk/lib
yes`r has joined #ruby
<purplexed-> jhass: sudo gem install ... is how I installed them .. and yes, I'm running ruby as my standard user on ubuntu
amclain has joined #ruby
* purplexed- facepalms
<purplexed-> thanks jhass
beatboxchad has quit [Remote host closed the connection]
<jhass> yw
baweaver has joined #ruby
will_wielder has quit [Quit: leaving]
asas has quit [Ping timeout: 272 seconds]
nofxx has joined #ruby
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has joined #ruby
TomPeed is now known as pdev_autism
barhum2013 has quit [Quit: barhum2013]
bersimoes has quit [Read error: Connection reset by peer]
gregf has joined #ruby
barhum2013 has joined #ruby
zomgbie has joined #ruby
skweek has quit [Ping timeout: 255 seconds]
shinnya has quit [Ping timeout: 240 seconds]
barhum2013 has quit [Client Quit]
timonv has quit [Ping timeout: 260 seconds]
linuxboytoo has quit [Remote host closed the connection]
<shevy> hmm... would you rather go with ... class Postinstall ... or ... class PostInstall - it will do some post-install (post-installation) stuff, such as symlinking into some target positions
linuxboytoo has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
senayar has quit []
scripore has quit [Quit: This computer has gone to sleep]
joonty has quit [Quit: joonty]
bersimoes has joined #ruby
<havenwood> shevy: Two words!
linuxboytoo has quit [Ping timeout: 255 seconds]
<shevy> hmm
<shevy> ok
<havenwood> shevy: It hasn't yet gotten caught in it's own gravity to become hyphenated then eventually joined.
yoongkang has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
<Ox0dea> shevy: What sort of argument(s) does PostInstall.new take?
<havenwood> Speaking of Freedom Patching I heard Larry Wall calling it Monkey Typing and kinda like that.
<havenwood> Duck Typing. Monkey Typing.
certainty|mobile has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
<shevy> Ox0dea currently only the dataset that describes the given program at hand
allcentury has quit [Ping timeout: 264 seconds]
RobertBirnie has joined #ruby
<shevy> it now carries its proud new name class PostInstall
<Ox0dea> I think it's either a bad name or a bad abstraction. :<
lsmola has quit [Ping timeout: 260 seconds]
<shevy> it's beautiful
jbrhbr has quit [Quit: Leaving.]
<baweaver> PostInstall refers to an action
<baweaver> What unit is it working with?
<baweaver> a task
alexherbo2 has joined #ruby
yoongkang has quit [Ping timeout: 264 seconds]
skade has quit [Quit: Computer has gone to sleep.]
<baweaver> as the post install, I want to run n tasks to finish
RobertBi_ has joined #ruby
<baweaver> heck, you could get away with an array of tasks in there even
<shevy> Ox0dea let me grab a good example similar to LFS
linuxboytoo has quit [Remote host closed the connection]
<shevy> hmm ... not sure if it is a good example ... but it is one; at http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssl.html the "cp -vfr doc/* /usr/share/doc/openssl-1.0.2d" step
RobertBirnie has quit [Ping timeout: 260 seconds]
<Ox0dea> shevy: Are you trying to model LFS in Ruby, then?
<Ox0dea> $ gem i lfs
<Ox0dea> Quick!
<shevy> nah, I only use lfs as a glorified way to snatch info!
tubuliferous_ has joined #ruby
<shevy> it's nice that they made it
<Ox0dea> For some definition of "made".
dionysus69 has joined #ruby
<Ox0dea> >> %w[LFS DIY].map { |s| s.bytes.reduce(0) { |a, b| a + b - 64 } } # So close.
<ruboto> Ox0dea # => [37, 38] (https://eval.in/475894)
maloik has joined #ruby
timonv has joined #ruby
Guest52138 has joined #ruby
<dviola> lots of people have told me to just write JS if I need to simulate some browser usage but I always used capybara just fine for that from ruby, the thing is I need to write some standalone script that will run from cron
<dviola> will capybara be fine for that
<dviola> JS is painful for me at this point
jackjackdripper1 has joined #ruby
gregor3005 has joined #ruby
<gregor3005> hi, short tip. whats the best way to create desktop gui's with ruby?
zacstewart has quit [Remote host closed the connection]
<nofxx> dviola, you can use phantomjs under the hood -> poltergeist
failshell has joined #ruby
dancer_ has quit [Ping timeout: 252 seconds]
Guest52138 has quit [Client Quit]
<havenwood> gregor3005: There are a variety of options but I'm not sure what to recommend: https://www.ruby-toolbox.com/categories/GUI_Frameworks
<gregor3005> havenwood: i found this before but there a many of them
<jhass> gregor3005: what's your target platform?
maloik has quit [Ping timeout: 250 seconds]
<havenwood> gregor3005: Does JRuby work for you?
<shevy> dviola come back to ruby man
<gregor3005> jhass: multiple platforms
jackjackdripper has quit [Ping timeout: 272 seconds]
<dviola> shevy: I never left
<havenwood> gregor3005: Shoes4 (the latest shoes) has been getting a lot of love: https://github.com/shoes/shoes4#readme
<gregor3005> havenwood: i used ruby only to build shell applications
<dviola> shevy: lol
<havenwood> gregor3005: aye
<dviola> nofxx: trying that now, ty
tvw has quit [Remote host closed the connection]
Ox0dea has quit [Quit: WeeChat 1.4-dev]
<gregor3005> havenwood: thx, i try it
<[spoiler]> gregor3005: I'd recommend Qt bindings too (not sure how good the bindings are, but I like working with Qt)
casadei has quit [Remote host closed the connection]
<grill> what exactly does this do? (@results ||= "") << "run"
<havenwood> gregor3005: Give the samples/ a run, they're some fun ones.
axsuul has quit [Ping timeout: 240 seconds]
<[spoiler]> grill: creates an empty string if @results is nil, and then appends "run" to that string, if @results wasn't nil, the it tries to append "run" to an existing string (assuming @results is a string)
dancer_ has joined #ruby
<havenwood> grill: Which parts are confusing? Know what `||=` does?
akem has joined #ruby
<gregor3005> [spoiler]: is qt recommended for multiple platforms? i try to build a open source solution to the new austrian law about cash systems :-D
<grill> i do not know what ||= does. It sounds like it's a logical or + and = though
<dviola> I think Qt itself ships bindings for ruby?
<dviola> I'm not sure
<[spoiler]> gregor3005: yes I use Qt for multiple platforms (I need to support Linux and Windows only, though, but I assume it works on Mac, too)
<nofxx> gregor3005, that's old school... make a web/SaaS thing
<[spoiler]> grill: it's basically `@results = (@results || "")`
s2013 has joined #ruby
howdoicomputer has joined #ruby
<nofxx> grill, x ||= y is same as x = x || y
<grill> nice
CloCkWeRX has quit [Ping timeout: 264 seconds]
<havenwood> nofxx: x || x = y
zacstewart has joined #ruby
<jhass> x || x = y is the best approximation, yeah
myztic has quit [Ping timeout: 240 seconds]
dancer_ has quit [Disconnected by services]
dancer_ has joined #ruby
<nofxx> havenwood, ah, ok, don't set it again
<dviola> nofxx: rack-test requires a rack application, but none was given
<dviola> I get this for some reason
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fantazo has joined #ruby
alexherbo2 has quit [Quit: WeeChat 1.3]
<nofxx> dviola, hm, you need to fool it to think it's on test.... what about mechanize?
howdoicomputer has quit [Ping timeout: 252 seconds]
<nofxx> not sure it can use phantom but, worth a try
azul has quit [Read error: Connection reset by peer]
<ljarvis> it cant
<ljarvis> well, not without hacking
bersimoes has quit [Read error: Connection reset by peer]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dviola> ljarvis: are you referring to my use case
<nofxx> ljarvis, any other js enabled solution?
c0m0 has quit [Ping timeout: 240 seconds]
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
darkf has quit [Quit: Leaving]
<ljarvis> no it's headless, there have been many hack attempts
dionysus69 has quit [Read error: Connection reset by peer]
bersimoes has joined #ruby
dionysus69 has joined #ruby
<ljarvis> I generally tell people to avoid doing that kind of stuff, mech just isn't built for it
myztic has joined #ruby
grill has quit [Ping timeout: 240 seconds]
<dviola> nofxx: I got it to work like this but I get that annoying browser window when it runs: http://ix.io/mtT/rb
<dviola> using the selenium backend
failshell has quit [Remote host closed the connection]
lemur has joined #ruby
maletor has joined #ruby
dancer_ has quit [Disconnected by services]
Nahra has quit [Ping timeout: 272 seconds]
dmolina has quit [Read error: Connection reset by peer]
dancer_ has joined #ruby
dmolina has joined #ruby
dancer_ has quit [Disconnected by services]
<purplexed-> Hi all. I'm having trouble with the Amazon SDK, https://gist.github.com/sonicjolt/a3a4d5f80e9b079cce1f --- for some reason the S3 reference is not working, eventhough I'm writing exactly whats in the example. Can anyone see something blatantly incorrect ?
jackjackdripper1 has quit [Quit: Leaving.]
<dviola> ljarvis: so it sounds like I'll have to go write js and use phantomjs for this? bah
dancer_ has joined #ruby
dancer_ has quit [Disconnected by services]
eyes_not has joined #ruby
dancer_ has joined #ruby
dancer_ has quit [Disconnected by services]
dionysus69 has quit [Ping timeout: 240 seconds]
thejamespinto has quit [Ping timeout: 265 seconds]
dancer_ has joined #ruby
lemur has quit [Ping timeout: 246 seconds]
dancer_ has quit [Disconnected by services]
thejamespinto has joined #ruby
dancer_ has joined #ruby
<jhass> dviola: did you try poltergeist yet?
dionysus69 has joined #ruby
skweek has joined #ruby
<dviola> jhass: yes
sigurding has quit [Quit: sigurding]
<jhass> dviola: but?
<[spoiler]> jhass: it haunts you after you use it
jbrhbr has joined #ruby
<[spoiler]> then you need to throw salt all around your bedroom afterwards
<jhass> eh, the chips already there should deal with it
dancer_ has quit [Max SendQ exceeded]
<dviola> rack-test requires a rack application, but none was given (ArgumentError)
ndancer has joined #ruby
<jhass> pass a dummy?
ndancer is now known as Guest59314
joe-998877 has joined #ruby
<dviola> nvm I got it to work I think
<dviola> Capybara.current_driver = :poltergeist
<dviola> doesn't complain anymore
Guest59314 has quit [Max SendQ exceeded]
<dviola> ^_^
ndancer_ has joined #ruby
skade has joined #ruby
<[spoiler]> dviola: don't forget the salt
<dviola> salt?
poguez_ has quit [Quit: Connection closed for inactivity]
<[spoiler]> in case the poltergeist comes to haunt you :P
<[spoiler]> it's a silly joke, nvm :(
<dviola> works <3
zacstewart has quit [Remote host closed the connection]
ascarter has joined #ruby
gusTester has left #ruby [#ruby]
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
fedexo has quit [Ping timeout: 240 seconds]
howdoicomputer has joined #ruby
<joe-998877> results = h.getblock( h.getblockhash( 8888 ), true ) ; p results['tx'] produces: ["5c27ed957b7ca932f1905c234d13ac435137eaa5c77ee25f07ef9b929aaa7300"]
<joe-998877> How do I get rid of the [ and ]? Tried results2 = results['tx']; p results2[2..-2]and got nil. New to ruby. Thanks for any insight
blackmesa has joined #ruby
<[spoiler]> joe-998877: results['tx'][0]
<jhass> joe-998877: you use p, which calls .inspect on the passed object
<jhass> joe-998877: the [ ] signal an array
<jhass> the " " signal a string
<[spoiler]> what he said ^
<jhass> joe-998877: so puts results["txt"].first
<joe-998877> thanks back in a few
jackjackdripper has joined #ruby
B1n4r10 has quit [Ping timeout: 250 seconds]
eyes_not has quit [Quit: Leaving...]
Rollabunna has joined #ruby
nso95- has joined #ruby
nso95- has joined #ruby
skade has quit [Read error: Connection reset by peer]
mostlybadfly has quit [Quit: Connection closed for inactivity]
s2013 has quit [Read error: Connection reset by peer]
<gregor3005> [spoiler]: when i will use qt you have some good starting points?
<[spoiler]> gregor3005: I only used C++ Qt, not the Ruby bindings
<[spoiler]> they seem to be slightly outdated, too (there's Qt 5 now)
AlphaAtom has joined #ruby
<[spoiler]> gregor3005: you might be better off with a webapp or even using shoes4
off is now known as gremax
blackmesa has quit [Ping timeout: 250 seconds]
nso95- has quit [Remote host closed the connection]
tubuliferous_ has quit [Ping timeout: 260 seconds]
<[spoiler]> gregor3005: a webapp will be more maintainable anyway (in terms of updates). You won't need to harass your clients to install an update or have some update system in place, not to mention you will have less issues with cross-platform bullshit (that's outside of the framework's scope)
<gregor3005> [spoiler]: normally i build applications with jsf (java) but today i get the idea to build a fast application which will be used also offline on multiple operation systems. because i like ruby i give it a shot
Rollabunna has quit [Ping timeout: 260 seconds]
B1n4r10 has joined #ruby
lurch_ has quit [Quit: lurch_]
jackjackdripper has quit [Quit: Leaving.]
mistermocha has joined #ruby
dionysus69 has quit [Quit: dionysus69]
shadoi has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
towski_ has quit [Remote host closed the connection]
<gregor3005> [spoiler]: i played with qtbindings. i think this will to the job in combination with sqlite to solve it. you have some advices to print to a receipt printer, helful gem's?
blackmesa has joined #ruby
<dviola> does this looks more or less correct to you? https://gist.github.com/diegoviola/dc7782c20817843e2faa
towski_ has joined #ruby
spider-mario has joined #ruby
<jhass> looks like a correct 404
dionysus69 has joined #ruby
<[spoiler]> gregor3005: uh no not really. I never had to print anything from ruby, tbf
<jhass> dviola: not sure what you're asking about
bersimoes has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
<dviola> if you think I'm calculating the time right
pawnbox has joined #ruby
<jhass> well, depends on how exact you need it
<dviola> in seconds or ms
cdg has quit [Remote host closed the connection]
<jhass> I mean more like whether you need it to be safe against jumps in the system clock, due to NTP or leap seconds
shinnya has joined #ruby
cdg has joined #ruby
failshell has joined #ruby
karapetyan has joined #ruby
PlasmaStar has quit [Ping timeout: 240 seconds]
<dviola> jhass: I don't care about that part right now
zapata has quit [Ping timeout: 240 seconds]
yeticry has quit [Ping timeout: 260 seconds]
<jhass> then it should be fine
danzilio has quit [Ping timeout: 240 seconds]
thesheff17 has quit [Ping timeout: 240 seconds]
bascht has quit [Ping timeout: 240 seconds]
Guest10558 has quit [Ping timeout: 240 seconds]
casadei has joined #ruby
yeticry has joined #ruby
bersimoes has joined #ruby
Mon_Ouie has joined #ruby
<[spoiler]> jhass: does ruby have a monotonic timer in the stdlib, though?
tomphp has joined #ruby
ItSANgo has quit [Quit: Leaving...]
ych has joined #ruby
ych is now known as Guest1602
B1n4r10 has quit [Ping timeout: 272 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
danzilio has joined #ruby
konr has joined #ruby
thesheff17 has joined #ruby
Guest1602 has quit [Max SendQ exceeded]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dviola> ty
BillSussman has joined #ruby
maletor has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
skweek has quit [Ping timeout: 246 seconds]
karapetyan has quit [Ping timeout: 244 seconds]
maloik has joined #ruby
PlasmaStar has joined #ruby
<jhass> [spoiler]: sort of it exposes clock_gettime somewhere
Olipro_ has joined #ruby
Olipro_ is now known as Guest10223
arup___ has quit []
<[spoiler]> Didn't know it did that! :)
based_pdev_ has joined #ruby
Jackneill has joined #ruby
maloik has quit [Ping timeout: 246 seconds]
`based_pdev` has quit [Ping timeout: 246 seconds]
yeticry has quit [Read error: Connection reset by peer]
roshanavand has quit [Remote host closed the connection]
<apeiros> [spoiler]: iirc it's relatively new (2.1 or so)
roshanavand has joined #ruby
yeticry has joined #ruby
koba has joined #ruby
roshanavand has quit [Remote host closed the connection]
zapata has joined #ruby
bascht has joined #ruby
ht__ has joined #ruby
ht__ has quit [Client Quit]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<purplexed-> finally got it to work. Seems I was mixing up V1 and V2 of the amazon sdk
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<purplexed-> all it needs now is a require 'aws-sdk' and it works
AndyBotwin has joined #ruby
mistermocha has quit [Ping timeout: 276 seconds]
BillSussman has quit [Ping timeout: 265 seconds]
ht__ has joined #ruby
tulak has joined #ruby
s2013 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
maloik has joined #ruby
lemur has joined #ruby
tulak has quit [Ping timeout: 252 seconds]
s2013 has quit [Ping timeout: 255 seconds]
bersimoes has quit [Remote host closed the connection]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
lemur has quit [Ping timeout: 272 seconds]
<[spoiler]> apeiros: I had a weird nostalgic moment when you said "relatively new" because 2.1 isn't really that new, but then I remembered using 1.8.6 and when 1.8.7 came out (I think that's around the time I first started using Ruby and joined this channel)
luca768 has quit [Read error: Connection reset by peer]
<[spoiler]> Which was probably 2 years ago, or so
<[spoiler]> endofrandom
diegoaguilar_ has quit [Ping timeout: 264 seconds]
stannard_ has joined #ruby
thejamespinto has quit []
dmolina has quit [Ping timeout: 250 seconds]
<jhass> 18>> RUBY_DESCRIPTION
<ruboto> jhass # => "ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-linux]" (https://eval.in/475950)
<jhass> ah damn, newer patchlevel
roshanavand has joined #ruby
diegoaguilar_ has joined #ruby
<[spoiler]> hahaha
dravine has quit [Ping timeout: 240 seconds]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Tempesta has quit [Ping timeout: 260 seconds]
troulouliou_div2 has quit [Ping timeout: 252 seconds]
stannard has quit [Ping timeout: 265 seconds]
kerunaru has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
dimasg has joined #ruby
zacstewart has joined #ruby
kirun has joined #ruby
tubuliferous_ has joined #ruby
<[spoiler]> wat 2008? No way
<[spoiler]> No. Way.
<[spoiler]> Actually it kinda makes sense, now that I think about what I was doing in 2008
based_pdev_ has quit [Read error: Connection reset by peer]
baweaver has quit [Read error: Connection reset by peer]
<eam> as much as the ruby community groans about 1.8 being old you'd think it was cut in the early 90s
ochkoffein has quit [Quit: -----------------------------------------------]
baweaver has joined #ruby
<shevy> I loved 1.8.x!
<shevy> I wish I would have started with ruby 1.0
<drbrain> I think 1.6.6 was my first ruby
<drbrain> #humblebrag
<[spoiler]> haha
<eam> drbrain: around the same for me too
<[spoiler]> I don't think I actually got serious with Ruby until at least 1.9.3 or so
baweaver has quit [Remote host closed the connection]
<shevy> you are a late bloomer
B1n4r10 has joined #ruby
<eam> I only played around with it until 2004 or so, when I tried to port a bunch of nontrivial perl infra to it -- and failed because Socket had some dumb limitations because of how the green threads worked
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
<eam> iirc the specific issue is that the socket construtor would block until connect() finished
<[spoiler]> 1.9.3 was in 2011, that sounds about right. I probably had like a first contact with Ruby in 2008 or so (I was 15 back then) and then around 2011 started working on a project in Ruby (which had more C than Ruby probably, since it was mostly wrappers around a C project I was working on then)
based_pdev has joined #ruby
cdg has quit [Remote host closed the connection]
<eam> I didn't work anywhere that seriously used it until 2012
<jbrhbr> convention question: assuming one understands the precedence rules around &&,||,and,or, is there a consensus about which one is considered more Rubyish in cases where there's no logical difference?
<eam> jbrhbr: and/or is kinda buggy, best avoided
<[spoiler]> and and or have weird precedence
<eam> >> [true or false]
<ruboto> eam # => /tmp/execpad-b48cc4413b44/source-b48cc4413b44:2: syntax error, unexpected keyword_or, expecting ']' ...check link for more (https://eval.in/475959)
kerunaru has quit [Ping timeout: 244 seconds]
<eam> [spoiler]: the precedence isn't weird - lower is better in a lot of cases
<jbrhbr> but you can just learn the precedence.
<jbrhbr> if it's buggy, that's a much bigger problem :o
<eam> in perl I strongly prefer and/or for flow control because of it
m8 has joined #ruby
<jbrhbr> eam: i'm asking for the same reason (perl history)
<eam> jbrhbr: it'll blow up the parser in a bunch of cases that should work (like the above)
<jbrhbr> wow
strgbrew has joined #ruby
dimasg has quit [Ping timeout: 255 seconds]
<[spoiler]> eam: Well, it's not "weird," but I expected it to be the same as && and || when I first tried it
B1n4r10 has quit [Ping timeout: 240 seconds]
<[spoiler]> although wrapping it () should work (in eam's example)
<eam> >> def f x; x; end; f(true or false)
<ruboto> eam # => /tmp/execpad-d5d932ab6d58/source-d5d932ab6d58:2: syntax error, unexpected keyword_or, expecting ')' ...check link for more (https://eval.in/475960)
<[spoiler]> >>[(tue or false)]
<ruboto> [spoiler] # => undefined local variable or method `tue' for main:Object (NameError) ...check link for more (https://eval.in/475961)
<[spoiler]> weird
<[spoiler]> oh tue
<eam> >> def f x; x; end; f((true or false))
<ruboto> eam # => true (https://eval.in/475962)
decoponio has quit [Quit: Leaving...]
<jbrhbr> [spoiler]: a reasonable assumption, but those of us whose innocence has been corrupted by Perl beforehand may see this as less disturbing :p
Archyme has quit [Ping timeout: 240 seconds]
<[spoiler]> jbrhbr: I admit that I never wrote a line of perl in my life :P
<jbrhbr> eam: i really appreciate those examples, thanks
<drbrain> I added NewRelic to our perl app at work, that's the most perl I've written ever
<drbrain> it was very confusing
<eam> jbrhbr: otherwise it works just like perl, and I do use and/or for flow control sometimes
<drbrain> even though it was only 50 lines or so
<eam> thing() or other_thing()
<eam> drbrain: what's most confusing about it?
<drbrain> mostly the debugging side
mices has left #ruby ["Leaving"]
<drbrain> since I don't know perl I couldn't figure out how to `p some_obj` without much flailing
<[spoiler]> LOL
<eam> I like the enforced hungarian notation of basic Hash/Array/Scalar types
<eam> drbrain: print Dumper $obj :)
<drbrain> fortunately the app looks something like a rails app, so finding out where to add the instrumentation wasn't hard
rdark has quit [Ping timeout: 260 seconds]
<drbrain> yeah, but Dumper wasn't available everywhere so there was more flailing getting it to load
<eam> it ... oughta be. It's core
<jbrhbr> sorry if i started a language war
<eam> maybe a rhel system where they screw around and lift core stuff out
<eam> jbrhbr: hopefully not a war, I'm just curious :)
aryaching has quit [Ping timeout: 244 seconds]
<jbrhbr> hehe
brt has quit [Ping timeout: 260 seconds]
<jbrhbr> ok
<[spoiler]> jbrhbr: we're rubysts. There's no language wars here, unless you mention python or php
<[spoiler]> (just kidding!)
<mg^^> I almost always use and/or in a perlish fashion where I want something like x.do_something or abort("it didn't do it")
<mg^^> and && / || for conditionals
<eam> perl does not constitute a threat in 2015, I don't think
rodfersou|lunch is now known as rodfersou
<drbrain> eam: well, I don't know perl, so adjust appropriately
<jbrhbr> eam: good point :p
<eam> the history and heritage is super interesting though - I think
roshanavand has joined #ruby
<eam> drbrain: yeah, I'm just always curious for the hot take of someone who's skilled in a scripting language but doesn't know perl
<[spoiler]> eam: no threat because ruby is the ultimate supreme language of the universe. You ruby, or you die
<drbrain> that this app was written by responsible perlers helped a ton
<[spoiler]> #RubyOrDie!
yoongkang has joined #ruby
<eam> one thing I wish ruby did that's perlish is to just use def to create a lambda
<mg^^> as a person who formerly used perl for most things, ruby was a confortable transition
<mg^^> of course my boss accused me of writing the most readable perl code he's ever seen so...
Peg-leg has quit [Quit: Leaving.]
<[spoiler]> mg^^: ...so when you switched to ruby, you became a poet?
<jbrhbr> i'm still trying to understand the scoping rules around ruby lambdas
<[spoiler]> nobody knows what you meant, but it gets the point across in the end? :P
<jbrhbr> there's some kind of local scope free variable binding that happens which blew my mind, need to read up on it
<mg^^> hahaha
<eam> sub foo {} -> $cb = sub {} -- in ruby this would be like sb = def(a,b); end
<eam> jbrhbr: the scoping changed *drastically* between 1.8 and newer btw
<jbrhbr> ok
<jbrhbr> good times :D
<mg^^> The big thing about transitioning to Ruby was learning to effectively use blocks to get things done
<[spoiler]> This reminds me, someone from work asked me to implement something for them (he's a PHP developer). So I implemented in in Ruby in under 2 minutes, but he was like "I don't understand anything that's happening..." and then I spent like an hour copying it to PHP because... not sure if it was PHP's fault or if I'm just overestimating my knowledge of PHP and am actually shit at PHP
alexherbo2 has joined #ruby
<jbrhbr> so far they seem like an effective way to obfuscate things to me
<mg^^> now it just seems so natural it's hard to go back
<jbrhbr> at least the convention of how they are used
<[spoiler]> it was basically an idea we were talking about (on how to handle something)
cdg has joined #ruby
<eam> php is a hell of a lot more confusing than perl imo
roshanavand has quit [Ping timeout: 240 seconds]
<drbrain> I think blocks, enumerable and enumerators are ruby's most powerful features
<cyberfawkes> I always thought php was quite easy.
<cyberfawkes> but that was years ago.
bersimoes has joined #ruby
<mg^^> yeah php takes the worst of Perl and BASIC and mashes them together
<cyberfawkes> if I had a string, how would I print it multiple times?
<[spoiler]> drbrain: there was lots of blocks and usage of Enumerable methods in my code lol
<drbrain> it's a weirdly pleasant merger of functional and OO styles
cdg has quit [Remote host closed the connection]
<eam> drbrain: coming from perl it was welcome to find 'em -- but they're kinda odd in ruby
<[spoiler]> that's what confused him probably (and what took me a lot of time to find equivalents in PHP, which didn't exists, so I had to implement them myself)
<[spoiler]> cyberfawkes: in php?
<mg^^> I should reimplement my JAPH in Ruby
<jbrhbr> eam: the penalty on self-documenting code seems hardly worth the weak level of encapsulation that is ostensibly the reason for using blocks during configuration, for example
<cyberfawkes> no, in ruby.
<cyberfawkes> lol
Archyme has joined #ruby
<jbrhbr> but what do i know
<[spoiler]> n.times { puts "string" }
yoongkang has quit [Ping timeout: 276 seconds]
<jbrhbr> just trying to make sense of this stuff
<cyberfawkes> [spoiler]: thank you
lbj_ has joined #ruby
<[spoiler]> cyberfawkes: there's also `"string " * 5`
<[spoiler]> but that won't print it 5 times, it will generate a string of `"string string string string string "`
<eam> jbrhbr: one big reason to use blocks is it allows a destructor to run after the operation
<mg^^> puts ['string'] * 5
<[spoiler]> that will also work ^
yqt has joined #ruby
<eam> jbrhbr: if you're coming from perl, you might be familiar with something like: sub thing { $fh = open(); ....; }
<cyberfawkes> thanks guys
<[spoiler]> cyberfawkes: mg^^'s example generates an array of five "string" strings
<eam> jbrhbr: In perl, the descriptor would be destroyed after thing() runs. In ruby, that will cause a descriptor leak
<[spoiler]> so ["string, "string", "string, "string, "sting"]
bersimoes has quit [Ping timeout: 260 seconds]
brt has joined #ruby
<[spoiler]> s/sting/string/
<eam> the File.open {} syntax lets File do cleanup after the block runs, closing the descriptor
<mg^^> yeah my example is not efficient
<mg^^> but it works
fantazo has quit [Ping timeout: 250 seconds]
<[spoiler]> and when you give `puts` an arry, it will print each element on a new line
<eam> IMO that's a big part of why the block syntax is so popular in ruby
<mg^^> you wouldn't want to do it with a large N
<eam> it lets you fake destructor-style patterns
Archyme has quit [Ping timeout: 250 seconds]
dimasg has joined #ruby
axsuul has joined #ruby
<jbrhbr> eam: interesting, thanks
lbj_ has quit [Ping timeout: 246 seconds]
arup_r has joined #ruby
akem has quit [Ping timeout: 260 seconds]
palms has joined #ruby
<mg^^> I've used those destructor type patterns quite a few times myself
palms has left #ruby [#ruby]
ItSANgo has joined #ruby
<mg^^> set up your resources, yield them to the block, clean them up... very clean way to get things done
yfeldblum has joined #ruby
<[spoiler]> Yep, agreed
<[spoiler]> they are really convenient
kadoppe has quit [Ping timeout: 276 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
podman has quit [Quit: Connection closed for inactivity]
DotKite has joined #ruby
linuxboytoo has joined #ruby
prestorium has quit [Quit: Leaving]
kadoppe has joined #ruby
pawnbox has quit [Remote host closed the connection]
BlackCoyote has joined #ruby
toretore has joined #ruby
zacstewart has quit [Remote host closed the connection]
zacstewart has joined #ruby
cdg has joined #ruby
imperator has joined #ruby
juddey has joined #ruby
roshanavand has joined #ruby
fantazo has joined #ruby
<DotKite> Got a question about procs. Say I have a function called f1 that has a variable a. Now suppose I declare a proc outside of f1 that is meant to maniputlate the data contained in a. If I call the proc with in f1 is the variable a out of scope for the proc?
joe-998877 has quit [Quit: Leaving]
s2013 has joined #ruby
B1n4r10 has joined #ruby
kerunaru has joined #ruby
<drbrain> >> a = 0; -> { a += 1 }.call; a
<ruboto> drbrain # => 1 (https://eval.in/475983)
<drbrain> DotKite: like that? ↑
<cyberfawkes> Note to self: #!/usr/bin/env ruby fork while fork is probably something I shouldn't have ran... Derp
scripore has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
<mg^^> hahah
<drbrain> DotKite: oh, no, a would be out of scope there
<DotKite> hmmm
<mg^^> yeah I read that as given proc @my_proc, something like def f1; a = 5; @my_proc.call; end... @my_proc cannot see a
pawnbox has joined #ruby
karapetyan has joined #ruby
<cyberfawkes> well now that my computer is rebooted...
AlphaAtom has quit [Read error: Connection reset by peer]
<DotKite> so say i Have a block of code that is just kinda messy and i want to wrap it just so the the function it is "in" just looks nicer, and possilby easier to maintain in the future
<DotKite> how would i go about doin that?
linuxboytoo has quit [Remote host closed the connection]
<jbrhbr> just move it to another function?
arthurnn_ has quit [Ping timeout: 240 seconds]
s2013 has quit [Ping timeout: 255 seconds]
linuxboytoo has joined #ruby
<DotKite> sure, but then wouldnt i have to pass the variables in the original function as arguments?
arthurnn has joined #ruby
Hounddog has quit [Remote host closed the connection]
<DotKite> wanted to know if there was a way to not have to do that
AlphaAtom has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
<jbrhbr> if you want to make the enclosing function look nicer by moving the stuff somewhere else with all of its state and things, just making another function seems like the simple way to my ruby noob mind
<jbrhbr> editors often have an 'extract method' feature which will set up the correct arguments and parameters for you
sigurding has joined #ruby
baweaver has joined #ruby
<[spoiler]> cyberfawkes: I had to reboot too! Our PCs are reboot buddies because they had a reboot party
elaptics is now known as elaptics`away
Guest73056 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[spoiler]> but I had to reboot for different reasons :P
AndyBotwin has quit [Quit: Leaving]
diegoaguilar__ has joined #ruby
linuxboytoo has quit [Ping timeout: 272 seconds]
diegoaguilar_ has quit [Ping timeout: 264 seconds]
diegoaguilar__ has quit [Max SendQ exceeded]
diegoaguilar__ has joined #ruby
skweek has joined #ruby
DoubleMalt has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlphaAtom has quit [Remote host closed the connection]
ur5us has joined #ruby
ItSANgo has quit [Quit: Leaving...]
towski_ has quit [Remote host closed the connection]
WillAmes has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
Liothen has quit [Quit: The Dogmatic Law of Shadowsong]
sandstrom has joined #ruby
NeverDie has quit [Quit: http://radiux.io/]
WillAmes has joined #ruby
kerunaru has quit [Quit: leaving]
<cyberfawkes> Lol [
<cyberfawkes> Lol [spoiler]
roshanavand has joined #ruby
JoshGlzBrk has joined #ruby
InvGhosttt has joined #ruby
s2013 has joined #ruby
ItSANgo has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
InvGhostt has quit [Ping timeout: 272 seconds]
JJM has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
JJM is now known as Guest5057
fantazo has quit [Quit: Verlassend]
tomaz_b has joined #ruby
InvGhosttt has quit [Ping timeout: 272 seconds]
InvGhost has joined #ruby
Coldblackice has joined #ruby
atomical has quit [Max SendQ exceeded]
Rickmasta has joined #ruby
VeryBewitching has joined #ruby
<VeryBewitching> G'day folks.
<havenwood> VeryBewitching: helloooo
Rollabunna has joined #ruby
<VeryBewitching> havenwood: How's the day treatin' ya?
timonv has quit [Ping timeout: 240 seconds]
scripore has quit [Quit: This computer has gone to sleep]
<havenwood> VeryBewitching: Not too shabby.
AlphaAtom has quit [Ping timeout: 252 seconds]
<VeryBewitching> Excellent.
Guest5057 has quit [Read error: Connection reset by peer]
Jardayn_two has joined #ruby
based_pdev has quit [Ping timeout: 260 seconds]
Jardayn has quit [Disconnected by services]
Jardayn_two is now known as Jardayn
baweaver has joined #ruby
Rollabunna has quit [Ping timeout: 255 seconds]
ldnunes has quit [Quit: Leaving]
jessemcgilallen has joined #ruby
jessemcgilallen has quit [Client Quit]
axsuul has quit [Ping timeout: 272 seconds]
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
yoongkang has joined #ruby
atomical has joined #ruby
iateadonut has left #ruby [#ruby]
grill_ has joined #ruby
<grill_> what's the best way to append one array to another
s2013 has quit [Ping timeout: 244 seconds]
<grill_> and why the asterisk in this example: a1.push(*a2)
minimalism has joined #ruby
jackjackdripper has joined #ruby
lemur has joined #ruby
<canton7> it's called the "splat operator"
<apeiros> that's bad
<apeiros> use concat
<apeiros> ary1.concat(ary2)
lemur has quit [Read error: Connection reset by peer]
<grill_> why's it bad?
roshanavand has joined #ruby
<apeiros> because ruby has to do a lot more than with concat.
lemur has joined #ruby
baweaver has quit [Read error: Connection reset by peer]
<apeiros> you can bench. with largeish arrays, push(*ary) will be quite a bit slower
braincrash has quit [Ping timeout: 246 seconds]
<grill_> what does push do and what does concat do
AlphaAtom has joined #ruby
<apeiros> ?ri
<ruboto> I don't know anything about ri
<apeiros> aaaah!
<apeiros> grill_: you know how to use documentation, yes'
<apeiros> ?
<grill_> i mean, sure. or you could just answer. that's what i'd do if the situation were reversed. or, if i didn't know, i'd say so and then direct them to the documentation
platzhirsch has left #ruby [#ruby]
<apeiros> hm, but it seems they've optimized that a lot in recent versions
roshanavand has quit [Ping timeout: 240 seconds]
jbrhbr has quit [Quit: Leaving.]
dhollinger has quit [Quit: WeeChat 1.3]
lenwood has joined #ruby
AlphaAtom has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 246 seconds]
AlphaAtom has joined #ruby
lemur has quit [Remote host closed the connection]
<VeryBewitching> push does what << does
<VeryBewitching> It adds the array as an element of the array.
<VeryBewitching> It doesn't merge them.
<VeryBewitching> >> [1, 2, 3].concat [1, 2, 3]
<ruboto> VeryBewitching # => [1, 2, 3, 1, 2, 3] (https://eval.in/475987)
<VeryBewitching> >> [1, 2, 3].push [1, 2, 3]
<ruboto> VeryBewitching # => [1, 2, 3, [1, 2, 3]] (https://eval.in/475988)
<canton7> yeah, hence using push(*other) rather than push(other)
<mg^^> and in your first example, the splat operator deconstructs the array into individual elements before giving them to push
<VeryBewitching> *nods*
Engin has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
koba_ has joined #ruby
<grill_> there we go. now that makes sense. thanks for the sensible answers
<VeryBewitching> grill_: irb ftw
pawnbox has joined #ruby
evandrojr has joined #ruby
koba has quit [Ping timeout: 240 seconds]
sigurding has quit [Quit: sigurding]
dionysus69 has joined #ruby
braincrash has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
stannard_ has quit [Remote host closed the connection]
arup_r has quit []
baweaver has joined #ruby
koba_ is now known as koba
|ifei5g00d has quit [Remote host closed the connection]
kimegede has joined #ruby
Guest38 has joined #ruby
lemur has joined #ruby
iateadonut has joined #ruby
iateadonut has quit [Client Quit]
mistermocha has joined #ruby
m3_del has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
agit0 has joined #ruby
tulak has joined #ruby
yoongkang has quit [Remote host closed the connection]
jbrhbr has joined #ruby
moei has quit [Quit: Leaving...]
baweaver has joined #ruby
asas has joined #ruby
tulak has quit [Ping timeout: 250 seconds]
_blizzy_ has joined #ruby
m3_del has quit [Remote host closed the connection]
pawnbox has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
m3_del has joined #ruby
koba has quit [Ping timeout: 250 seconds]
skade has joined #ruby
dlitvak has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 250 seconds]
tulak has joined #ruby
mostlybadfly has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
m3_del has quit [Ping timeout: 244 seconds]
RobertBi_ has quit [Ping timeout: 240 seconds]
pdev_autism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
grill_ has quit [Quit: Textual IRC Client: www.textualapp.com]
rakm has joined #ruby
lurch_ has joined #ruby
grill has joined #ruby
colegatron has quit [Ping timeout: 264 seconds]
jgpawletko has joined #ruby
roshanavand has joined #ruby
BraddPitt has quit [Quit: Changing server]
Trynemjoel has joined #ruby
dviola has quit [Ping timeout: 250 seconds]
jgpawletko has quit [Client Quit]
BraddPitt has joined #ruby
BraddPitt has quit [Client Quit]
diegoviola has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
BraddPitt has joined #ruby
BraddPitt has quit [Client Quit]
BraddPitt has joined #ruby
RobertBirnie has joined #ruby
User458764 has joined #ruby
sepp2k has quit [Quit: Leaving.]
dionysus69 has joined #ruby
_blizzy_ has quit [Quit: Leaving]
michaeldeol has joined #ruby
based_pdev has joined #ruby
gregor3005 has quit [Quit: Leaving.]
nettoweb has joined #ruby
RobertBirnie has quit [Client Quit]
DotKite has quit [Ping timeout: 246 seconds]
howdoicomputer has quit [Ping timeout: 250 seconds]
kimegede has quit [Quit: Leaving...]
colegatron has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
mistermocha has quit [Ping timeout: 244 seconds]
null_ref has quit []
Guest33 has joined #ruby
_blizzy_ has joined #ruby
roshanavand has joined #ruby
zeroDivisible has joined #ruby
dlitvak has joined #ruby
dikaio has joined #ruby
podman has joined #ruby
AlphaAtom has quit [Ping timeout: 240 seconds]
purplexed- has quit [Quit: Leaving]
roshanavand has quit [Ping timeout: 240 seconds]
mjuszczak has joined #ruby
yfeldblum has joined #ruby
tomphp has joined #ruby
purplexed- has joined #ruby
purplexed- has joined #ruby
houhoulis has joined #ruby
myztic has quit [Ping timeout: 260 seconds]
tulak has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tulak has joined #ruby
pandaant has quit [Remote host closed the connection]
ndancer_ has quit [Max SendQ exceeded]
skade has quit [Quit: Computer has gone to sleep.]
ndancer has joined #ruby
ndancer has quit [Changing host]
ndancer has joined #ruby
sarkis_ has quit [Quit: WeeChat 1.3]
michaeldeol has joined #ruby
AlphaAtom has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
terminal_ has joined #ruby
michaeldeol has quit [Client Quit]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mjuszczak has quit []
skade has joined #ruby
tomchapin has joined #ruby
otherj has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
dimasg has quit [Ping timeout: 264 seconds]
skade has quit [Client Quit]
[Butch] has joined #ruby
18WAA6551 has quit [Quit: Konversation terminated!]
skade has joined #ruby
solars has joined #ruby
towski_ has joined #ruby
roshanavand has joined #ruby
varunwachaspati has quit [Quit: Connection closed for inactivity]
dlitvak has quit [Remote host closed the connection]
ekinmur has joined #ruby
tomaz_b has quit [Quit: Leaving]
malconis has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
pwnd_nsfw has joined #ruby
zenguy_pc has quit [Ping timeout: 244 seconds]
zenguy_pc2 is now known as zenguy_pc
roshanavand has quit [Ping timeout: 240 seconds]
otherj has quit [Quit: .]
yoongkang has joined #ruby
houhoulis has quit [Remote host closed the connection]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoaguilar__ has quit [Remote host closed the connection]
m8 has quit [Quit: Sto andando via]
baweaver has joined #ruby
towski_ has quit [Remote host closed the connection]
Aasha has joined #ruby
tomchapin has quit [Quit: Textual IRC Client: www.textualapp.com]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zomgbie has quit [Quit: Lost terminal]
Wsewolod has quit [Ping timeout: 246 seconds]
NeverDie has joined #ruby
yoongkang has quit [Ping timeout: 260 seconds]
RobertBirnie has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jbrhbr has quit [Ping timeout: 276 seconds]
lemur has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_blizzy_ has quit [Quit: Leaving]
htmldrum has joined #ruby
failshell has quit []
B1n4r10 has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
roshanavand has joined #ruby
imperator has quit [Quit: Leaving]
jackjackdripper has joined #ruby
lenwood has quit [Ping timeout: 252 seconds]
_blizzy_ has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_blizzy_ has quit [Max SendQ exceeded]
dkam has joined #ruby
_blizzy_ has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
roshanavand has quit [Ping timeout: 240 seconds]
spider-mario has quit [Ping timeout: 260 seconds]
bubbys has quit [Ping timeout: 244 seconds]
sepp2k has joined #ruby
dionysus69 has joined #ruby
k3asd` has joined #ruby
Rollabunna has joined #ruby
k3asd` has quit [Client Quit]
azgil has quit [Ping timeout: 272 seconds]
k3asd` has joined #ruby
axsuul has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.3]
Guest38 has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
barhum2013 has joined #ruby
azgil has joined #ruby
Rollabunna has quit [Ping timeout: 250 seconds]
xcesariox has joined #ruby
lurch_ has quit [Quit: lurch_]
Marsuper_ has joined #ruby
Marsupermammal has quit [Ping timeout: 276 seconds]
dimasg has joined #ruby
lucyinthesky has joined #ruby
<droptone> Question: I'm trying to chan some string manipulation commands to save instructions here in this function.
lucyinthesky has left #ruby [#ruby]
<droptone> This appears to work fine: conPostalCode = ic["PostalCode"].to_s.strip.delete "\n\r\t" if !ic["PostalCode"].nil?
<droptone> I'm chaning .to_s(), .strip(), and .delete "\n\r\t"
Azure has joined #ruby
<droptone> and I receive no errors.
<droptone> However, when I try to do something simliar with a hash value that is appended to an array, I get an error:
<droptone> conNums << { "number" => ic["Phone1"].to_s.strip.delete "\n\r\t", "type" => ic["Phone1Type"].to_s } if !ic["Phone1"].nil?
<adaedra> if ! => unless, btw.
<droptone> chain*
<droptone> When I execute that, I get:
<droptone> syntax error, unexpected tSTRING_BEG, expecting '}'
<droptone> ...c["Phone1"].to_s.strip.delete "\n\r\t", "type" => ic["Phone1...
<adaedra> Put parenthesis around #delete argument.
<droptone> It appears to not like the .delete() call.
lenwood has joined #ruby
<droptone> Ahh
<droptone> That did it, awesome adaedra, thank you.
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has joined #ruby
<adaedra> Parenthesis can be omitted in number of cases; it doesn't mean that 1/ they're forbidden and 2/ you should remove every single one you can remove.
tomphp has joined #ruby
<havenwood> Don't remove them when it breaks the interpreter.
dikaio has joined #ruby
<havenwood> We can agree on that. :)
<pipework> adaedra: Unless you're from Seattle, then 2 is not correct.
barhum2013 has quit [Quit: barhum2013]
<adaedra> pf.
law has joined #ruby
ta has joined #ruby
azgil has quit [Ping timeout: 255 seconds]
<law> hey all, I'm messing around with the IniFile gem, and I notice that I can't use relative paths like '~/'
<law> instead I have to use '/Users/myuser/.some/path', which is... a PITA
<law> is there an easy way I can punch that functionality into the gem?
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<droptone> Sure, I understand, I've just always utilized .delete that way.
<droptone> Sans-parens
bubbys has joined #ruby
malconis has quit [Client Quit]
azgil has joined #ruby
roshanavand has joined #ruby
pawnbox has joined #ruby
spaceman__ has quit []
deadpoet has joined #ruby
<law> or am I stuck using File.expand() and friends?
<droptone> Question: I have an array of hashes, and the hashes contain several values, including "updated_at", which is a string but can be turned into a DateTime object via DateTime.parse().
<droptone> I want to search the array for the hash entry with the most recent updated_at value.
<droptone> Any thoughts as to how to approach this?
tomphp_ has joined #ruby
<jhass> law: File.expand_path
tomphp has quit [Ping timeout: 250 seconds]
<jhass> law: so yes, you gonna need to call it
uri_ has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
<havenwood> droptone: How about?: max_by { |h| DateTime.parse h['updated_at'] }
roshanavand has quit [Ping timeout: 240 seconds]
<droptone> Interesting.
scripore has joined #ruby
<droptone> so if the array is myarr
uri has quit [Ping timeout: 240 seconds]
<droptone> The syntax would be myarr.max_by { |h| DateTime.parse h["updated_at"] }
<droptone> ?
pawnbox has quit [Ping timeout: 272 seconds]
djbkd has joined #ruby
bubbys has quit [Ping timeout: 250 seconds]
<droptone> or, more specifically, most_recent = myarr.max_by { |h| DateTime.parse h["updated_at"] }
<droptone> havenwood, what don't you know man.
InvGhost has quit [Ping timeout: 272 seconds]
<droptone> God damn Ruby genius.
uri_ has quit [Client Quit]
Cohedrin has joined #ruby
<yorickpeterse> somebody call me?
<adaedra> maybe
<xybre> law: I use Pathname, which helps a lot.
<yorickpeterse> Ah sorry, I set up a highlight for "ruby genius"
<xybre> law: it's still basically a wrapper, but it streamlines things.
<yorickpeterse> I got annoyed by people referring to me all the time without anything showing up
<yorickpeterse> :troll:
<adaedra> yorickpeterse: eh, guess which gem disturbed me to be installed earlier?
<xybre> droptone: what format is the date string in?
<law> thanks all
<yorickpeterse> adaedra: nokogiri
myztic has joined #ruby
<adaedra> bravo!
<xybre> droptone: if its year.month.day or similar it's trivial to just do a string sort
<law> second question: I'm reading in two ini files, and I'd like to convert them to a hash and merge them
<law> looks like regular merge will overwrite, when I'd like to add
<law> let me gist up an example
<law> hrmm, point
<law> maybe I should add them as Object: IniFiles instead of converting to hash first
Guest33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
<xybre> law: are these two configuration files like a /etc/conf.ini and a ~/conf.ini where one may overwrite the values of the other?
Guest33 has joined #ruby
m3_del has joined #ruby
baweaver has joined #ruby
<xybre> If so then `hash1.merge(hash2)`
<law> in theory, yes. basically, I'm trying to load AWS credentials into a hash
InvGhost has joined #ruby
<law> but I have to parse two .ini files (at least) - .aws/config and .aws/credentials. Both have 'default' sections, and may have additional profiles
zacstewart has quit [Remote host closed the connection]
<Radar> Why are they .ini fiels
<Radar> files*
<Radar> Why aren't they .yaml files?
bubbys has joined #ruby
Torrieri has quit [Quit: Be back later ...]
maloik has quit [Ping timeout: 252 seconds]
<law> I dunno, ask amazon
<Radar> Convert them to yaml?
baweaver has quit [Ping timeout: 240 seconds]
Marsuper_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar> Then YAML.load_file(file)
<law> I need this little scriptlet to be interoperable with a pre-existing AWS CLI config
<law> so a user can have their pre-existing AWS config, my script reads it in, and Does Stuff(tm) with the information
pawnbox has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dionysus69 has quit [Quit: dionysus69]
synthroid has quit []
dionysus69 has joined #ruby
shadoi has quit [Quit: Leaving.]
<Radar> Ok.
dan3 has joined #ruby
<hxegon> is there a way to say: if x.nil? or x.empty? or x.something? without referencing x a bunch of times?
<Diabolik> is there an ELI5 explanation of the actor model anywhere?
cwong_on_irc has quit [Quit: Leaving.]
alvaro_o has joined #ruby
<Radar> hxegon: are you checking to see if it's blank?
pawnbox has quit [Ping timeout: 260 seconds]
marahin has joined #ruby
<hxegon> Radar: yes, but more so wondering if there is a clean way to run a bunch of boolean methods like that for an if/whatever statement
<Radar> hxegon: that's the cleanest way that I know of
<Radar> ActiveSupport (the gem) has a .blank? method which will condense your `.nil?` and `.blank?` checks.
babblebre has quit [Quit: Connection closed for inactivity]
<hxegon> Radar: thanks, I already have AS required for other stuff.
<marahin> Hello! If I want to get a certain interwebs page title - how do I do that? I'm using Mechanize.new(...).title, however it won't work for .pdfs hosted online (and they still have a title, or at least the title = page's host / address). Is there any way around it?
* Radar sees a question about parsing PDFs to get the titles, runs the other way
Billroot has joined #ruby
<marahin> hahaha
<hxegon> Radar: sane choice
baweaver has joined #ruby
<xybre> marahin: you could use a headless browser..
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<marahin> Radar, I really would like to avoid that! I guess the **easiest** workaround would be: checking if object has .title method (mechanize runs undefined method if title is missing [e.g. when it's a .pdf]), and if it doesn't, then setting title to nil / address string
TomPeed has joined #ruby
<marahin> but then, is there any way to check / run a method on an object and see if it returns any value?
<Radar> marahin: Yeah glhf with getting the titles off PDFs
<Radar> marahin: object.title.length == 0
Marsupermammal has joined #ruby
<marahin> Radar, as I've said, NoMethodError: undefined method `title'
<Radar> marahin: oh that
<marahin> yeah
lemur has joined #ruby
<Radar> marahin: object.respond_to?(:title)
dan3 has quit [Remote host closed the connection]
<marahin> easiest workaround would be to check if method exists
<marahin> ah!
<marahin> Radar, thank you very much.
<Radar> np
mjuszczak has joined #ruby
Billroot has quit [Client Quit]
m3_del has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
_djbkd has joined #ruby
m3_del has joined #ruby
skade has quit [Read error: Connection reset by peer]
nso95- has joined #ruby
solocshaw has joined #ruby
skade has joined #ruby
baweaver has quit [Ping timeout: 264 seconds]
chrisja has joined #ruby
k3asd` has quit [Ping timeout: 250 seconds]
maloik has joined #ruby
chrisja has quit [Client Quit]
chrisja has joined #ruby
m3_del has quit [Ping timeout: 244 seconds]
roshanavand has joined #ruby
atomical_ has joined #ruby
kies has quit [Ping timeout: 240 seconds]
bubbys has quit [Ping timeout: 240 seconds]
JJM has joined #ruby
JJM is now known as Guest80980
atomical has quit [Ping timeout: 255 seconds]
maloik has quit [Ping timeout: 264 seconds]
bubbys has joined #ruby
DrShoggoth has joined #ruby
ebbflowgo has joined #ruby
tomchapin has joined #ruby
sanjayu has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
<law> alright, dinking around with Ruby 2.1.2, and I see via http://ruby-doc.com/stdlib-2.1.2/libdoc/pp/rdoc/PP.html that there is indeed a 'pp' class
mjuszczak has quit []
<law> however, with my rvm-loaded Ruby 2.1.2, I... don't seem to have the ability to require 'pp'
<law> it always returns false
beauby has joined #ruby
<law> [23] pry(main)> require 'pp'
<law> => false
<xybre> law: that means its already loaded
<adaedra> because it's already loaded.
skade has quit [Ping timeout: 244 seconds]
<Radar> law: because it's already loaded
<Radar> (just in case you didn't get the message yet)
<xybre> law: try doing `require 'blahblah'` to see what happens when you require something that doesn't exist.
<law> heh
<law> ahh, fair enough
<drbrain> the only reason I've used the PP class is for: PP.pp (1..80).to_a, $stderr
<drbrain> the second argument lets you output to a different place
ebbflowgo has quit [Read error: Connection reset by peer]
<law> I'm trying to pp an AWS connection object
<drbrain> I think it can be anything with a #<< method
n_blownapart has joined #ruby
Anthony_ has joined #ruby
<law> and it is, uh... decidedly NOT pretty
_blizzy_ has quit [Disconnected by services]
<drbrain> law: yeah, users have to implement pretty_print_inspect for it to be prettier
<law> (have i mentioned that coding whilst battling a migraine makes me SUPER stupid?)
ebbflowgo has joined #ruby
Anthony_ is now known as _blizzy_
howdoicomputer has joined #ruby
<xybre> law: try pry and some of their plugins?
<drbrain> law: https://github.com/rubygems/rubygems/search?utf8=✓&q=pretty_print has some examples of how to implement a pretty_print
DenysLins has joined #ruby
_djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
mistermocha has joined #ruby
skade has joined #ruby
dkam_ has joined #ruby
dkam_ has quit [Remote host closed the connection]
<xybre> law: oh yeah, some people use awesome_print which does a better job with output, but also trashes the object heirachty with monkey patches.
pawnbox has joined #ruby
axsuul has quit [Ping timeout: 276 seconds]
Trynemjoel has quit [Ping timeout: 250 seconds]
dkam has quit [Ping timeout: 265 seconds]
jessemcgilallen has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
Trynemjoel has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sepp2k has quit [Read error: Connection reset by peer]
rodfersou has quit [Quit: leaving]
beauby has quit [Ping timeout: 276 seconds]
roshanavand has joined #ruby
nso95- has quit [Remote host closed the connection]
ebbflowgo has quit [Read error: Connection reset by peer]
lemur is now known as baweaver
ebbflowgo has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
pdoherty has quit [Ping timeout: 240 seconds]
Tempesta has joined #ruby
mary5030 has quit [Remote host closed the connection]
mjuszczak has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
linuxboytoo has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has joined #ruby
nso95- has joined #ruby
nso95- has joined #ruby
ledestin has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
Oatmeal has quit [Ping timeout: 240 seconds]
Gadgetoid has quit [Read error: No route to host]
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Gadgetoid has joined #ruby
nso95- has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
waka has quit [Read error: Connection reset by peer]
JazzyVariable227 has joined #ruby
nso95- has joined #ruby
nso95- has quit [Client Quit]
nso95- has joined #ruby
nso95- has quit [Changing host]
nso95- has joined #ruby
<law> don't suppose anyone here plays around with the Fog libraries and AWS, do they?
<jhass> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
weemsledeux has joined #ruby
kirun has quit [Remote host closed the connection]
Guest80980 has quit [Read error: Connection reset by peer]
bersimoes has joined #ruby
nso95- has quit [Remote host closed the connection]
<law> heh, fair enough. I'm familiar with using Fog to connect to Openstack and 'do stuff', but now I'm tasked with making it connect to AWS. Naturally, it's "different", and I can't seem to find much in the way of documentation regarding making Fog play nice with security groups (listing, creating, updating, deleting, etc)
_blizzy_ has quit [Quit: Leaving]
<droptone> Question: so I'm successfully using max_by to find the entry within my array of hashes that has the most recent updated_at value, but I need to add a seach param for see if "user"=>{"links"=>{"self" == a certain value.
zacstewart has joined #ruby
<jhass> &ri Enumerable#select @droptone
<droptone> As in, I need to get the most recently updated value (updated_at" for a specific user, with his id existing in "user"=>{"links"=>["self"
rigsby has joined #ruby
nso95- has joined #ruby
nso95- has quit [Changing host]
nso95- has joined #ruby
<droptone> I'm familiar with .select() `derpy - what is your suggestion for the best way to approach this?
<jhass> droptone: where does your data come from anyway?
<droptone> pull all entries in the array with the "user"=>{"links"=>{"self" with that ID via .select, then find the most recently updated with max_to?
<droptone> jhass: a remote API.
<jhass> and if you're familiar with select it should be obvious
n_blownapart has quit []
<jhass> and the API has no filtering capabilities itself?
<droptone> jhass: Is what I just said correct?
pawnbox has joined #ruby
<jhass> droptone: yeah
symm- has quit [Quit: Leaving...]
<droptone> jhass: Yes, it does, but I'm reducing API calls by sorting info internally.
<droptone> Perfect, thank you.
bersimoes has quit [Ping timeout: 260 seconds]
mistermocha has quit [Ping timeout: 265 seconds]
Oatmeal has joined #ruby
ins3ct has joined #ruby
malconis has joined #ruby
JoshGlzBrk has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 244 seconds]
malconis has quit [Client Quit]
dimasg has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 255 seconds]
[Butch] has quit [Quit: I'm out . . .]
yoongkang has joined #ruby
hkumar has joined #ruby
tomchapin has joined #ruby
saillard has joined #ruby
Cl0n3r has joined #ruby
nettoweb has joined #ruby
z1haze has joined #ruby
<z1haze> Hi, can I get help with email issues here? I cant figure out why mail wont send from my app? I have error logs but they mean nothing to me
freerobby has joined #ruby
<jhass> z1haze: actionmailer / rails ?
<z1haze> its discourse
<jhass> alis says there's a #discourse
bubbys has quit [Ping timeout: 260 seconds]
<z1haze> yea.. you cant be serious
scripore has quit [Quit: This computer has gone to sleep]
yoongkang has quit [Ping timeout: 240 seconds]
azgil has quit [Ping timeout: 244 seconds]
<z1haze> I've been in that chat for days and havent seen a single message reply
<jhass> are you asking ##c about support for windows since windows is written mostly in C?
n_blownapart has joined #ruby
Cl0n3r has quit [Remote host closed the connection]
<jhass> btw your paste is just some useless part of a backtrace, the error is somewhere above it
<z1haze> please dont be rude.. im just looking for help with the error message. I dont understand what it means
<z1haze> thats all i get
<jhass> there's no error message in what you pasted, period