jhass changed the topic of #ruby to: Welcome new users migrating from #ruby-lang! || Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
lolmaus_ has quit [Read error: Connection reset by peer]
marr has quit [Ping timeout: 256 seconds]
Vols has quit [Quit: Leaving]
lolmaus_ has joined #ruby
<zenspider> drbrain: would you consider this !, +, or - ?
<zenspider> I'm still not entirely convinced this doesn't have some strange repercussions
<zenspider> but I don't use it anymore, so I don't have my head inside rake
<drbrain> I don't think it's exactly a bugfix
<zenspider> so, + ?
<drbrain> and I don't think it's exactly a breaking change
<drbrain> yeah, a +, reasonable users shouldn't be affected by this
baweaver has quit [Ping timeout: 255 seconds]
endash has quit [Quit: endash]
<zenspider> just ones that are doing their own dynamic shit?
snsei has quit [Remote host closed the connection]
<zenspider> seems fair
snsei has joined #ruby
<drbrain> depending on top-level global methods from within objects is bad
sngeth_ has quit [Ping timeout: 252 seconds]
RobertBirnie has joined #ruby
<drbrain> (unless ruby put them on Kernel for you already)
fgo has joined #ruby
shock_one has joined #ruby
cndiv has quit []
tubuliferous_ has joined #ruby
nb_bez___ has joined #ruby
RobertBirnie has quit [Ping timeout: 246 seconds]
GitGud has quit [Read error: Connection reset by peer]
GitGud has joined #ruby
lordkryss has quit [Quit: Connection closed for inactivity]
dgutierrez1287 has joined #ruby
tubuliferous_ has quit [Ping timeout: 276 seconds]
fgo has quit [Ping timeout: 276 seconds]
drewo has quit [Quit: WeeChat 1.2]
symm- has quit [Ping timeout: 246 seconds]
nfk has quit [Quit: yawn]
fabrice31 has joined #ruby
DoubleMalt has quit [Ping timeout: 244 seconds]
wallerdev has quit [Quit: wallerdev]
DoubleMalt has joined #ruby
n008f4g_ has joined #ruby
acke has joined #ruby
eggoez has quit [Ping timeout: 248 seconds]
shoutsid has quit [Remote host closed the connection]
Grok has joined #ruby
msnyon has quit [Read error: Connection reset by peer]
danielpclark has quit [Ping timeout: 256 seconds]
wallerdev has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
blackmesa has quit [Quit: WeeChat 1.2]
robustus has quit [Ping timeout: 264 seconds]
acke has quit [Ping timeout: 272 seconds]
allomov has quit [Remote host closed the connection]
workmad3 has joined #ruby
vasilakisfil has quit [Ping timeout: 256 seconds]
Al3ks has joined #ruby
commondream has quit [Remote host closed the connection]
robustus has joined #ruby
ixti has quit [Ping timeout: 264 seconds]
zendrix has quit [Ping timeout: 246 seconds]
mandarinkin2 has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 264 seconds]
eggoez has joined #ruby
ryba has quit [Ping timeout: 272 seconds]
Rickmasta has joined #ruby
snockerton has quit [Quit: Leaving.]
bronson has quit [Remote host closed the connection]
danielpclark has joined #ruby
casadei has joined #ruby
gaucheph has joined #ruby
gaucheph has quit [Read error: Connection reset by peer]
pengin has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gambl0re has quit [Ping timeout: 256 seconds]
datanoise has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
shoutsid has joined #ruby
casadei has quit [Ping timeout: 246 seconds]
jonr22 has joined #ruby
arturmartins has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sinkensabe has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
arescorpio has joined #ruby
sinkensabe has quit [Ping timeout: 276 seconds]
lolmaus_ has quit [Ping timeout: 256 seconds]
Atomic_Work has joined #ruby
sfarley has joined #ruby
serivich has quit [Ping timeout: 248 seconds]
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
joneshf-laptop has quit [Read error: Connection reset by peer]
jpfuentes2 has joined #ruby
doctorly has joined #ruby
MatthewsFace has joined #ruby
blandflakes has joined #ruby
joneshf-laptop has joined #ruby
bruno- has quit [Ping timeout: 276 seconds]
<doctorly> I have been having a lot of problems trying to get things happening inside of specific slots while using Green Shoes. Has anyone had similar problems? Would it be worth switching over to standard shoes, or will I likely have the same problems?
baweaver has joined #ruby
CloCkWeRX has joined #ruby
swills has quit [Quit: leaving]
swills has joined #ruby
<doctorly> Also, has anyone used standard shoes and not had similar issues?
<zenspider> I dunno if anyone here has an answer to that... good luck
d10n-work has quit [Quit: Connection closed for inactivity]
<zenspider> If (and I don't know) there is a shoes channel, you'll prolly want to ask there
<zenspider> otherwise, I'd say file a bug so the maintainer can help directly
<doctorly> Has anyone used a gui toolkit that is easy?
<baweaver> _why is the maintainer, so that might be added fun.
<baweaver> not in ruby
<zenspider> uh, no.
jfarmer has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<baweaver> do you _need_ a gui?
<doctorly> baweaver: _why maintained standard, but it was handed off
arturmartins has quit [Quit: Leaving...]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<doctorly> Haha literally nobody is on any of their irc chans
<doctorly> Thanks for the help though guys, I am going to have to do something else I think
jenrzzz has quit [Ping timeout: 265 seconds]
<zenspider> Again, file a bug. you're likely not alone. if anything, it sounds like a doco issue
AndroidLoverInSF has joined #ruby
startupality has quit [Quit: startupality]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
jfarmer has joined #ruby
jfarmer has quit [Client Quit]
rbowlby_ has joined #ruby
Rickmasta has joined #ruby
husanu has quit [Remote host closed the connection]
Channel6 has joined #ruby
husanu has joined #ruby
commondream has joined #ruby
baweaver has quit [Remote host closed the connection]
shock_one has quit [Remote host closed the connection]
rbowlby has quit [Ping timeout: 246 seconds]
fgo has joined #ruby
Alina-malina has joined #ruby
jpfuentes2 has joined #ruby
commondream has quit [Remote host closed the connection]
dfockler has joined #ruby
jesterfraud_work has joined #ruby
lolmaus_ has joined #ruby
<jesterfraud_work> >> {'a': 'foo'}['a']
<ruboto> jesterfraud_work # => nil (https://eval.in/387881)
<jesterfraud_work> TIL
symm- has joined #ruby
<zenspider> what did you learn?
fgo has quit [Ping timeout: 252 seconds]
<jesterfraud_work> 'key
<jesterfraud_work> ...
<jesterfraud_work> {'key': :value} gets converted to {key: :value}
<jesterfraud_work> instead of using a string for the key like I expected
Xeago has joined #ruby
fgo has joined #ruby
nwhirschfeld has quit [Quit: No Ping reply in 210 seconds.]
n008f4g_ has quit [Ping timeout: 265 seconds]
dfockler has quit [Ping timeout: 248 seconds]
havenwood has joined #ruby
shellie_ has quit [Ping timeout: 256 seconds]
revoohc has joined #ruby
vdamewood has quit [Ping timeout: 246 seconds]
<sphex> jesterfraud_work: how about { 'key' => :value }?
RegulationD has joined #ruby
oo_ has quit [Remote host closed the connection]
shellie_ has joined #ruby
nwhirschfeld has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
inoic has joined #ruby
AndroidLoverInSF has quit [Quit: This computer has gone to sleep]
avahey has quit [Quit: Connection closed for inactivity]
<jesterfraud_work> sphex: works as expected
<jesterfraud_work> >> {'a' => 'foo'}['a']
<ruboto> jesterfraud_work # => "foo" (https://eval.in/387882)
mcclurmc has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 248 seconds]
Ox0dea has joined #ruby
aryaching has quit [Ping timeout: 252 seconds]
nwhirschfeld has quit [Ping timeout: 264 seconds]
wallerdev has quit [Quit: wallerdev]
kies has joined #ruby
<Ox0dea> >> {'this syntax enables non-"word" symbols': 1}
<ruboto> Ox0dea # => {:"this syntax enables non-\"word\" symbols"=>1} (https://eval.in/387883)
<Ox0dea> jesterfraud_work: It works as expected if you don't expect Ruby to be JavaScript.
<toretore> {'key': v} is analogous to :'symbol'
oo_ has joined #ruby
gccostabr has quit [Quit: ZZZzzz…]
mcclurmc has joined #ruby
<jesterfraud_work> as I just discovered
nwhirschfeld has joined #ruby
Muhannad has quit [Ping timeout: 248 seconds]
tkuchiki has joined #ruby
<Ox0dea> >> {?x => 1}
<ruboto> Ox0dea # => {"x"=>1} (https://eval.in/387884)
<Ox0dea> >> {?x: 1}
<ruboto> Ox0dea # => /tmp/execpad-5aea1969ef05/source-5aea1969ef05:2: syntax error, unexpected ':', expecting => ...check link for more (https://eval.in/387885)
bronson has joined #ruby
<Ox0dea> That seems like an oversight.
nahtnam has joined #ruby
nwhirschfeld has quit [Client Quit]
rbowlby_ has quit [Remote host closed the connection]
wallerdev has joined #ruby
Palmer11 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Palmer11 has quit [Client Quit]
Aswebb_ has joined #ruby
Palmer11 has joined #ruby
nwhirschfeld has joined #ruby
mcclurmc has quit [Ping timeout: 246 seconds]
doctorly has quit [Quit: leaving]
bronson has quit [Ping timeout: 264 seconds]
kies has quit [Ping timeout: 264 seconds]
fgo has quit [Ping timeout: 244 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
renderful has joined #ruby
sinkensabe has joined #ruby
Aswebb_ has quit [Ping timeout: 272 seconds]
danielpclark has quit [Ping timeout: 264 seconds]
<havenwood> >> {"#{?x}": :"#{?y}"}
<ruboto> havenwood # => {:x=>:y} (https://eval.in/387886)
sfarley has quit [Remote host closed the connection]
segfalt has joined #ruby
<havenwood> >> :?x
<ruboto> havenwood # => /tmp/execpad-123d2405e085/source-123d2405e085:2: syntax error, unexpected tCHAR, expecting tSTRING_C ...check link for more (https://eval.in/387887)
<havenwood> Ox0dea: Just doesn't work at all with the character literal.
<havenwood> Ox0dea: mm
nwhirschfeld has quit [Quit: No Ping reply in 180 seconds.]
sfarley has joined #ruby
renderful has quit [Ping timeout: 248 seconds]
sinkensabe has quit [Ping timeout: 272 seconds]
nwhirschfeld has joined #ruby
mcclurmc has joined #ruby
segfalt has quit [Ping timeout: 264 seconds]
frem has quit [Quit: Connection closed for inactivity]
jschoolcraft has quit [Quit: peace]
havenwood has quit [Ping timeout: 276 seconds]
hahuang65 has quit [Ping timeout: 264 seconds]
tkuchiki_ has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
bruno- has joined #ruby
casadei has joined #ruby
ZoanthusR has quit [Quit: Linkinus - http://linkinus.com]
nwhirschfeld has quit [Client Quit]
mcclurmc has quit [Ping timeout: 265 seconds]
Agoldfish has quit [Quit: G'Bye]
bkxd has joined #ruby
choke has joined #ruby
nwhirschfeld has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
danielpclark has joined #ruby
iamninja has joined #ruby
jenrzzz has joined #ruby
bruno- has quit [Ping timeout: 276 seconds]
tubuliferous_ has joined #ruby
vipaca has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doublemalt_ has joined #ruby
Grok has left #ruby [#ruby]
wallerdev has quit [Quit: wallerdev]
datanoise has joined #ruby
kies has joined #ruby
wallerdev has joined #ruby
DoubleMalt has quit [Ping timeout: 246 seconds]
wallerdev has quit [Client Quit]
rbowlby has joined #ruby
tubuliferous_ has quit [Ping timeout: 250 seconds]
astrobunny has quit [Ping timeout: 252 seconds]
CloCkWeRX has quit [Read error: No route to host]
husanu has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
revoohc has quit [Quit: revoohc]
bradgrif1in has joined #ruby
husanu has joined #ruby
fabrice31 has joined #ruby
oo_ has quit [Remote host closed the connection]
Al3ks has quit [Remote host closed the connection]
bf4 has joined #ruby
oo_ has joined #ruby
havenwood has joined #ruby
eggoez has quit [Ping timeout: 248 seconds]
fabrice31 has quit [Ping timeout: 272 seconds]
danielpclark_ has joined #ruby
danielpclark has left #ruby ["Leaving"]
danielpclark_ has quit [Client Quit]
danielpclark has joined #ruby
danielpclark has quit [Client Quit]
danielpclark has joined #ruby
michael_mbp has quit [Excess Flood]
workmad3 has joined #ruby
bradgrif1in has quit [Quit: leaving]
michael_mbp has joined #ruby
eggoez has joined #ruby
aryaching has joined #ruby
sevenseacat has joined #ruby
konsolebox has joined #ruby
workmad3 has quit [Ping timeout: 272 seconds]
j4cknewt has quit [Remote host closed the connection]
fgo has joined #ruby
RobertBirnie has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
choke has joined #ruby
pontiki has joined #ruby
mrsolow has quit [Ping timeout: 265 seconds]
mansel_ has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
revath has quit [Ping timeout: 265 seconds]
mansel has quit [Ping timeout: 265 seconds]
mrsolow has joined #ruby
average has joined #ruby
<average> does anyone have an invitation for https://lobste.rs ?
c0ncealedx64 has joined #ruby
shazaum_ has joined #ruby
nb_bez___ has quit [Quit: Connection closed for inactivity]
<sevenseacat> that site still exists?
shazaum_ has quit [Remote host closed the connection]
<average> sevenseacat: apparently so
<average> sevenseacat: you have an invitation ?
<sevenseacat> dunno, havent looked at it in years
wallerdev has joined #ruby
bradgriffin has joined #ruby
RobertBirnie has quit [Ping timeout: 256 seconds]
c0ncealed has quit [Ping timeout: 265 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Deele has quit [Ping timeout: 256 seconds]
casadei has quit [Ping timeout: 265 seconds]
scottstamp has quit [Ping timeout: 265 seconds]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
blandflakes has joined #ruby
casadei has joined #ruby
fgo_ has joined #ruby
hahuang65 has joined #ruby
RobertBirnie has joined #ruby
fgo has quit [Ping timeout: 255 seconds]
<Ox0dea> average: Have you tried asking in /r/lobsters?
eggoez has quit [Ping timeout: 252 seconds]
ledestin has joined #ruby
ruby-lang595 has joined #ruby
<ruby-lang595> hola
<average> Ox0dea: no but..
<average> Ox0dea: i dunno
<Ox0dea> Go for it.
fgo has joined #ruby
scottstamp has joined #ruby
bf4 has quit [Ping timeout: 250 seconds]
<ruby-lang595> alchemy_cms
<average> Ox0dea: i'd like an invitation though if you can give me one
jonr22 has quit []
<ruby-lang595> has anyone ever heard of alchemy cms
<pontiki> i'm afraid to ask...
swgillespie has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
fgo_ has quit [Ping timeout: 256 seconds]
jpfuentes2 has joined #ruby
<havenwood> ruby-lang595: Have questions about alchemy_cms?
bkxd has quit [Ping timeout: 256 seconds]
sdwrage_ has quit [Quit: Leaving]
<havenwood> ruby-lang595: Since it's a Rails app your question might be best in the #RubyOnRails channel.
ruby-lang595 has left #ruby [#ruby]
average has left #ruby [#ruby]
mfranzwa has quit [Quit: mfranzwa]
[k- has joined #ruby
nwhirschfeld has quit [Ping timeout: 252 seconds]
duderonomy has joined #ruby
startupality has joined #ruby
bf4 has joined #ruby
JDiPierro has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
eggoez has joined #ruby
nwhirschfeld has joined #ruby
swills has quit [Quit: leaving]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rikai has quit [Quit: No Ping reply in 210 seconds.]
darkf has joined #ruby
rikai has joined #ruby
oo_ has quit [Remote host closed the connection]
cmisenas has joined #ruby
pontiki has quit [Quit: <poit>]
havenn has joined #ruby
nateberkope has quit [Quit: Leaving...]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
ddarkpassenger has joined #ruby
sfarley has quit [Remote host closed the connection]
oo_ has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
michael_mbp has quit [Excess Flood]
vikaton has joined #ruby
krowv has quit [Quit: Leaving]
charliesome has quit [Quit: zzz]
scx_ has joined #ruby
ddarkpassenger has quit [Client Quit]
ndrei has joined #ruby
michael_mbp has joined #ruby
c0ncealedx64 has quit [Quit: WeeChat 1.2]
c0ncealed has joined #ruby
scx has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby
braincras has quit [Quit: bye bye]
ddarkpassenger has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
startupality has quit [Quit: startupality]
Yiota has joined #ruby
chinmay_dd has joined #ruby
sfarley has joined #ruby
braincrash has joined #ruby
sfarley has quit [Remote host closed the connection]
urbanmonk has joined #ruby
chinmay_dd has quit [Ping timeout: 276 seconds]
nickfausnight has quit [Quit: Connection closed for inactivity]
j4cknewt has joined #ruby
danielpclark has quit [Ping timeout: 246 seconds]
chris_8086 has joined #ruby
guest123_ has joined #ruby
<guest123_> is this the proper place for a rails question?
<Ox0dea> ?rails guest123_
<ruboto> guest123_, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
scripore has quit [Quit: This computer has gone to sleep]
arooni-mobile has joined #ruby
phutchins has quit [Ping timeout: 256 seconds]
guest123_ has left #ruby [#ruby]
bf4 has quit [Quit: leaving]
j4cknewt has quit [Ping timeout: 248 seconds]
Aswebb_ has joined #ruby
towski_ has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
speakingcode has joined #ruby
Aswebb_ has quit [Ping timeout: 252 seconds]
arutemu has joined #ruby
sargas has joined #ruby
sarkyniin has quit [Ping timeout: 256 seconds]
scripore has joined #ruby
oo_ has quit [Remote host closed the connection]
t0rrieri has joined #ruby
crdpink has joined #ruby
danielpclark has joined #ruby
crdpink2 has quit [Ping timeout: 248 seconds]
wldcordeiro has joined #ruby
auzty has joined #ruby
Adran is now known as ChairmanZero
ChairmanZero is now known as Adran
gix has quit [Ping timeout: 252 seconds]
oo_ has joined #ruby
arutemu has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
aryaching has quit [Ping timeout: 272 seconds]
gix has joined #ruby
cmisenas has quit [Quit: cmisenas]
sinkensabe has joined #ruby
michael_mbp has quit [Excess Flood]
psyprus has quit [Ping timeout: 248 seconds]
psyprus has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
tubuliferous_ has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
CloCkWeRX has joined #ruby
scripore has joined #ruby
michael_mbp has joined #ruby
sinkensabe has quit [Ping timeout: 250 seconds]
fabrice31 has joined #ruby
tubuliferous_ has quit [Ping timeout: 264 seconds]
inoic has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oo_ has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
KC9YDN is now known as Comandante
Comandante is now known as Ethan
Ethan is now known as KC9YDN
revath has joined #ruby
shadoi has quit [Quit: Leaving.]
gianlucadv has joined #ruby
oo_ has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
kies has quit [Ping timeout: 252 seconds]
Soda has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
revath has quit [Ping timeout: 246 seconds]
freerobby has quit [Quit: Leaving.]
oo_ has quit [Ping timeout: 244 seconds]
<shevy> we can define methods like: class Foo; def self.bar and also module Foo; def self.bar <--- how do we call these methods in general? "class method" just does sound wrong for when it is a method on a module
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
keen___________3 has joined #ruby
<[k-> module class methods? :>
keen___________2 has quit [Ping timeout: 265 seconds]
RobertBirnie has joined #ruby
<shevy> grrr
<Ox0dea> >> Module.instance_method(:module_function)
<ruboto> Ox0dea # => #<UnboundMethod: Module#module_function> (https://eval.in/387890)
arooni-mobile has quit [Ping timeout: 248 seconds]
dgutierrez1287 has joined #ruby
<Ox0dea> Ruby calls them "module functions", so why not go with that?
workmad3 has joined #ruby
<Ox0dea> If you're referring to defining a method directly on a given object, those are called singleton methods.
ddarkpassenger has quit [Quit: Textual IRC Client: www.textualapp.com]
<Radar> module met... *has read the question again*
baweaver has joined #ruby
revath has joined #ruby
RobertBirnie has quit [Ping timeout: 250 seconds]
<shevy> a module function from a class
dgutierrez1287 has quit [Ping timeout: 252 seconds]
<Ox0dea> >> Module.class
<ruboto> Ox0dea # => Class (https://eval.in/387892)
RobertBirnie has joined #ruby
<Ox0dea> shevy: Why not?
<shevy> that sounds so wrong on every level
workmad3 has quit [Ping timeout: 264 seconds]
<Ox0dea> Then you don't understand Ruby's object model.
<Ox0dea> And yet you've published 137 gems.
<shevy> let's start: is a module the same as a class?
<Ox0dea> No.
baweaver_ has joined #ruby
<shevy> is a function the same as a method?
<[k-> a class is a module technically
<Ox0dea> Ruby does not have functions.
<shevy> so what is a module_function
<Ox0dea> A misnomer for a singleton method.
<shevy> lol
<sevenseacat> who's published 137 gems?
<sevenseacat> o.O
RegulationD has joined #ruby
eggoez has quit [Ping timeout: 248 seconds]
<shevy> so, anyone else other than Ox0dea have a suggestion how to call class methods on modules?
<[k-> class methods on modules
<shevy> yeah that's what I was coming up with as well :)
urbanmonk has left #ruby [#ruby]
baweaver_ has quit [Ping timeout: 248 seconds]
<[k-> :>
<shevy> but I wonder from where that term originated
yfeldblum has quit [Remote host closed the connection]
<shevy> take the old "principle of least surprise" - I think that came heavily through the pickaxe rather than from matz http://www.artima.com/intv/rubyP.html
<shevy> Yukihiro Matsumoto: "Actually, I didn't make the claim that Ruby follows the principle of least surprise"
<shevy> or wording such as File.exists? versus File.exist?
<havenn> shevy: See the first paragraph in the module docs: http://ruby-doc.org/core/Module.html
<Ox0dea> >> ObjectSpace.each_object(Module).group_by(&:class).map { |c, a| [c, a.size] }
<ruboto> Ox0dea # => [[Class, 275], [Module, 22]] (https://eval.in/387894)
RegulationD has quit [Ping timeout: 255 seconds]
krz has joined #ruby
<Ox0dea> The most meaningful distinction between classes and modules is instantiation.
<shevy> so few modules :(
choke has joined #ruby
<[k-> Haskell has a nifty function called `words` which is the same as `string.split` in Ruby
theery has joined #ruby
tkuchiki has quit [Remote host closed the connection]
revath has quit [Ping timeout: 264 seconds]
<shevy> havenn hmm
commondream has joined #ruby
<shevy> I see one interesting definition at least; class_variable_get(:@@foo)
<[k-> module methods it is!
<shevy> [k- not sure, look:
<shevy> >> module Foo; @@foo = 99; end; Foo.class_variable_get(:@@foo)
<ruboto> shevy # => 99 (https://eval.in/387895)
<shevy> we just obtained a class variable!
<Ox0dea> >> Module.class
<shevy> from a module
<ruboto> Ox0dea # => Class (https://eval.in/387896)
<Ox0dea> You're not paying attention.
<shevy> yeah I read the word module
<shevy> and you tell me it is a class
kies has joined #ruby
<[k-> that's because Ruby hierarchy is complex
<Ox0dea> >> Object.class.is_a?(Object)
<ruboto> Ox0dea # => true (https://eval.in/387897)
<Ox0dea> Object is a class, classes are objects.
sargas has quit [Quit: This computer has gone to sleep]
<[k-> :o
<shevy> did you just do
<shevy> Foo.is_a? Foo
commondream has quit [Ping timeout: 265 seconds]
<[k-> wait, I thought that was new when I've seen it before
<Ox0dea> It all hangs together really nicely, but it does take some exposure to really grok the circular bedrock of Ruby's object model.
levifig has quit [Quit: Farewell]
eggoez has joined #ruby
<havenn> >> [Class.is_a?(Module), Class.is_a?(Object), Module.is_a?(Class), Module.is_a?(Object), Object.is_a?(Class), Object.is_a?(Module)].all?
<ruboto> havenn # => true (https://eval.in/387901)
havenn is now known as havenwood
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> >> Module.new.ancestors
<ruboto> Ox0dea # => [#<Module:0x4176839c>] (https://eval.in/387903)
<Ox0dea> ^ Confusing.
commondream has joined #ruby
<shevy> we created a module object!
<Ox0dea> >> [Module.new.is_a?(Object), Module.new.ancestors.include?(Object)]
<ruboto> Ox0dea # => [true, false] (https://eval.in/387906)
<[k-> 122251 <[k-> >> class Class; self.ancestors; end
<[k-> 122253 <ruboto> [k- # => [Class, Module, Object, Kernel, BasicObject] (https://eval.in/387905)
<[k-> 122334 <[k-> >> class Class; class << self; self.ancestors; end; end
<[k-> 122336 <ruboto> [k- # => [#<Class:Class>, #<Class:Module>, #<Class:Object>, #<Class:BasicObject>, Class, Module, Object, Kern ...check link for more (https://eval.in/387907)
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Very informative.
<Ox0dea> We have, for instance, learned that [k- doesn't like his timestamps to be legible.
<shevy> [k- I see that you logged your conversation with ruboto there :)
<[k-> my timestamp is enormous!
<[k-> it is 6 digits long!
<shevy> reaching back to the start of the universe
<Ox0dea> >> 122251.bit_length
<ruboto> Ox0dea # => 17 (https://eval.in/387908)
choke has joined #ruby
<[k-> t
<[k-> oh, I did not set the client to display "long" timestamps
<[k-> it is set to short by default :>
MatthewsFace has quit [Remote host closed the connection]
<shevy> short is beautiful
oo_ has joined #ruby
nickfausnight has joined #ruby
<Ox0dea> >> Time.now.to_i.to_s(36)
<ruboto> Ox0dea # => "nqjb6q" (https://eval.in/387912)
bronson has joined #ruby
framling has joined #ruby
peter_paule has joined #ruby
<Ox0dea> You could theoretically represent all 86_400 seconds of the day with a different Unicode character.
<[k-> >> Time.new("nqjb6q".to_i(36))
<ruboto> [k- # => 1435293026-01-01 00:00:00 +0000 (https://eval.in/387914)
<Ox0dea> Well, s/character/codepoint/, as only ~28k of them have been mapped to an actual character.
jfarmer has joined #ruby
<[k-> well that wner awfully wrong
<[k-> went*
<Ox0dea> >> Time.at "nqjb6q".to_i(36)
<ruboto> Ox0dea # => 2015-06-26 04:30:26 +0000 (https://eval.in/387916)
bronson has quit [Ping timeout: 265 seconds]
astrobunny has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-> :)
Rickmasta has joined #ruby
commondream has quit [Remote host closed the connection]
sinkensabe has joined #ruby
gianlucadv has quit [Remote host closed the connection]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
hanmac has quit [Ping timeout: 246 seconds]
arooni-mobile has joined #ruby
peter_paule has quit [Ping timeout: 246 seconds]
Channel6 has quit [Quit: Leaving]
levifig has joined #ruby
<shevy> what are you guys doing
sinkensabe has quit [Ping timeout: 248 seconds]
arescorpio has quit [Quit: Leaving.]
<jfarmer> whoa, the cops, hide everything
sinkensabe has joined #ruby
<shevy> someone has experience how to proceed :)
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jfarmer> not me, I'm innocent
<jfarmer> blame Ox0dea
theery has quit [Remote host closed the connection]
<shevy> yeah
<shevy> he looks like a gangster already with that nick alone
choke has joined #ruby
Xeago has joined #ruby
<sevenseacat> lol
choke has quit [Client Quit]
<jfarmer> I have 100% had to do that to fix a bug before.
theery has joined #ruby
<shevy> actually there could be worse bug finding ways than that
arutemu has joined #ruby
t0rrieri has quit [Quit: Be back later ...]
t0rrieri has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
hanmac has joined #ruby
t0rrieri has quit [Ping timeout: 250 seconds]
revath has joined #ruby
arutemu has quit [Ping timeout: 272 seconds]
scx_ is now known as scx
Pisuke has joined #ruby
MyMind has quit [Ping timeout: 255 seconds]
<jfarmer> Yeah
<jfarmer> In my case, the bug was a website of mine that was getting flagged as virus-ridden by Clam AV. There happened to be a particular byte sequence in the outputted HTML that matched some fingerprint.
<jfarmer> Found it exactly by deleting half the output, seeing if it still matched, etc.
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_ht has joined #ruby
Aswebb_ has joined #ruby
theery has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
theery has joined #ruby
<[k-> damn...should have shortened the URL
Aswebb_ has quit [Ping timeout: 248 seconds]
jfarmer has quit [Quit: Textual IRC Client: www.textualapp.com]
renderful has joined #ruby
yfeldblum has joined #ruby
x44x45x41x4E has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
renderful has quit [Ping timeout: 248 seconds]
choke has joined #ruby
x44x45x41x4E has quit [Ping timeout: 256 seconds]
danielpclark has quit [Ping timeout: 255 seconds]
tkuchiki has joined #ruby
bruno- has joined #ruby
s2013 has joined #ruby
ruv has quit [Ping timeout: 248 seconds]
tubuliferous_ has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
yayfoxes has joined #ruby
kies has quit [Ping timeout: 264 seconds]
Helheim has quit [Remote host closed the connection]
fabrice31 has joined #ruby
AndroidLoverInSF has joined #ruby
Helheim has joined #ruby
Yiota has joined #ruby
Yiota has quit [Client Quit]
bronson has joined #ruby
tubuliferous_ has quit [Ping timeout: 264 seconds]
Deele has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
ruv has joined #ruby
danielpclark has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
khebbie has joined #ruby
arutemu has joined #ruby
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
poguez_ has quit [Quit: Connection closed for inactivity]
kp666 has joined #ruby
jenrzzz has joined #ruby
<flughafen> morning
kp666 has quit [Client Quit]
chris_8086 has quit [Remote host closed the connection]
<[k-> morning
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
framling has quit [Ping timeout: 272 seconds]
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
x44x45x41x4E has joined #ruby
chinmay_dd has joined #ruby
bkxd has joined #ruby
AndroidLoverInSF has quit [Quit: This computer has gone to sleep]
krz has quit [Read error: Connection reset by peer]
arutemu has left #ruby [#ruby]
<Ox0dea> Anyone for golf?
workmad3 has joined #ruby
<flughafen> Ox0dea: is it par 1?
revath has quit [Ping timeout: 248 seconds]
chinmay_dd has quit [Remote host closed the connection]
<Ox0dea> >> p
<ruboto> Ox0dea # => nil (https://eval.in/387923)
chinmay_dd has joined #ruby
GPrime has joined #ruby
dreinull75 has quit [Remote host closed the connection]
astrobunny has quit [Remote host closed the connection]
<Ox0dea> There aren't too many terribly useful one-character Ruby programs.
dreinull75 has joined #ruby
<flughafen> >> o
<ruboto> flughafen # => undefined local variable or method `o' for main:Object (NameError) ...check link for more (https://eval.in/387926)
<flughafen> Ox0dea: i beat you by 1 character ahead
casadei has quit [Remote host closed the connection]
<Ox0dea> >> ;
<ruboto> Ox0dea # => nil (https://eval.in/387927)
<Ox0dea> >> ?;.ord - ?o.ord
<ruboto> Ox0dea # => -52 (https://eval.in/387928)
<Ox0dea> I beat you by 52. ^_^
husanu has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 276 seconds]
husanu has joined #ruby
<flughafen> !
<Ox0dea> There's probably also a multiplier for being a valid program.
<baweaver> learned not to play you in golf anymore Ox0dea
oo_ has quit [Remote host closed the connection]
<baweaver> :P
<Ox0dea> Shucks. I suppose I did show my hand that one time.
astrobunny has joined #ruby
<baweaver> Eh, I'll humor you, go
<Ox0dea> Hmm...
<Ox0dea> Deck of cards?
krz has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
MacDaddy has quit [Ping timeout: 248 seconds]
<Ox0dea> >> "'23456789TJQKA'.chars.product(%w[S H C D]).map(&:join)".size
<ruboto> Ox0dea # => 54 (https://eval.in/387929)
<Ox0dea> 54 is the number to beat.
theery has quit [Remote host closed the connection]
transiency has joined #ruby
tagrudev has joined #ruby
<[k-> :o
<baweaver> hm
<Radar> >> "'23456789TJQKA'.chars.product([S,H,D,C]).map(&:join)".size
<ruboto> Radar # => 52 (https://eval.in/387931)
<Radar> Your move.
aapole has joined #ruby
<Ox0dea> Radar: Your program isn't valid Ruby?
<Radar> Oh, except those aren't strings.
<Ox0dea> Oui.
eGGsha has joined #ruby
<Radar> Ox0dea: shhh it's late on a Friday afternoon :P
<flughafen> "'23456789TQKA'.chars.product([S,H,D,C]).map(&:join)".size
<[k-> lol
<flughafen> take that!
RegulationD has joined #ruby
<Radar> flughafen: same problem as what I had
<flughafen> >> "'23456789TQKA'.chars.product([S,H,D,C]).map(&:join)".size
<ruboto> flughafen # => 51 (https://eval.in/387932)
<shevy> flughafen!
<shevy> how is your status
<Radar> And you're missing J
<flughafen> >> "'23456789TQKA'.chars.product([S,H,D,C]).map(&:join)".size54
<ruboto> flughafen # => undefined method `size54' for "'23456789TQKA'.chars.product([S,H,D,C]).map(&:join)":String (NoMethod ...check link for more (https://eval.in/387933)
<shevy> it's too early in the morning to code flughafen
<baweaver> Well at least use symbols: '23456789TJQKA'.chars.product(%w[♥ ♦ ♣ ♠]).map(&:join)
<[k-> >> %("'23456789TJQKA'.chars.product([S,H,D,C]).map(&:join)").size
<baweaver> thinking on shortening
<shevy> [k- fail
<[k-> :(
<shevy> ruboto is a strict bot, he hates leading ' '
<flughafen> Ox0dea: you're off. there are only 52 cards in a deck.
Rickmasta has joined #ruby
<Ox0dea> flughafen: ...?
<Radar> flughafen: You're not reading it right.
<flughafen> oh wait,
<flughafen> i'm worng
<Radar> flughafen: .size is the length of the code
<flughafen> rong
<Ox0dea> Saints preserve us.
<flughafen> holy shit,
<flughafen> this is logged
<flughafen> right.
<Radar> flughafen: Yup
<Radar> In at least 2 places
flughafen is now known as notthatidiotflug
<shevy> Radar it's already afternoon? you guys from down under are way too fast compared to the rest of us in europe!
<Radar> shevy: Almost beer o'clock
<shevy> haha
<notthatidiotflug> it's alomst beer 8am here
<Ox0dea> notthatidiotflug: My nick column was so nice and narrow too.
<shevy> yeah notthatidiotflug
<notthatidiotflug> ha
notthatidiotflug is now known as flughafen
<flughafen> i just mess everything up!
nobitanobi has quit [Remote host closed the connection]
<[k-> >> %("'23456789TJQKA'.chars.product([S,H,D,C]).map(&:join)").size
<ruboto> [k- # => 54 (https://eval.in/387937)
<Ox0dea> [k-: You're referencing nonexistent constants, mate.
<Radar> this is great :D
codecop has joined #ruby
<baweaver> almost like that happened before
<[k-> I don't have any clue what the game is about
RegulationD has quit [Ping timeout: 244 seconds]
<Ox0dea> Your code should actually produce a deck of cards.
<Radar> [k-: Write the code to produce the same output but in fewer characters.
<Ox0dea> I was simply showing my first approach and its length.
<[k-> o
Or1on has quit [Quit: gone]
<baweaver> yeah, I can't find anything that'll trump that
<Ox0dea> baweaver: I'm trying to do something very clever with #gsub and \B.
<baweaver> was thinking zip, but it ends up being permutations
<Ox0dea> I think there must be a sub-50 solution.
<Radar> Ox0dea: You'll find something obscure for this in about 3 days. It's just how you do things.
rubie has quit [Remote host closed the connection]
<Ox0dea> You're not likely to be wrong in that regard. :)
acke has joined #ruby
endash has joined #ruby
<[k-> '2'..'9'.to_a << 'T bleh
<[k-> too lazy, I'm on mobile :D
<flughafen> >> '2'..'9'.to_a << 'T'
revath has joined #ruby
<ruboto> flughafen # => undefined method `to_a' for "9":String (NoMethodError) ...check link for more (https://eval.in/387940)
<flughafen> champion!
<[k-> aww brackets
<Ox0dea> >> [*?2..?9]
<flughafen> i generated the most output from rubuto ;)
<ruboto> Ox0dea # => ["2", "3", "4", "5", "6", "7", "8", "9"] (https://eval.in/387941)
<[k-> shorter!
revath has left #ruby [#ruby]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<baweaver> "'23456789TJQKA'.gsub(/./){|c|%w[♥ ♦ ♣ ♠].zip [c].cycle}".size
endash has quit [Ping timeout: 265 seconds]
<baweaver> >> "'23456789TJQKA'.gsub(/./){|c|%w[♥ ♦ ♣ ♠].zip [c].cycle}".size
<ruboto> baweaver # => 55 (https://eval.in/387943)
<baweaver> almost but no
<baweaver> >> "'23456789TJQKA'.gsub(/./){|c|%w[♥ ♦ ♣ ♠].zip [c]*4}".size
<ruboto> baweaver # => 51 (https://eval.in/387945)
<baweaver> Ox0dea: Not quite :(
<flughafen> >> [*?2..?13].gsub(/./){|c|%w[♥ ♦ ♣ ♠].zip [c]*4}
<ruboto> flughafen # => /tmp/execpad-dd018d13af17/source-dd018d13af17:2: syntax error, unexpected '?' ...check link for more (https://eval.in/387947)
slumos is now known as slumos[away]
slumos[away] is now known as slumos
_blizzy_ has joined #ruby
SolarSailor has joined #ruby
<Ox0dea> baweaver: The array should consist of elements like "2♥", "A♠", etc.
<baweaver> drat
A205B064 has quit [Ping timeout: 264 seconds]
olistik has joined #ruby
<[k-> >> "#{[2..9]}TJQKA"
<ruboto> [k- # => "[2..9]TJQKA" (https://eval.in/387949)
<[k-> oh.
<flughafen> >> "'23456789TJQKA'.gsub".size
<ruboto> flughafen # => 20 (https://eval.in/387950)
<Ox0dea> >> %{'23456789TJQKA'.gsub(/./){"#$~♠#$~♥#$~♣#$~♦"}.scan(/../)"}.size
<ruboto> Ox0dea # => 45 (https://eval.in/387952)
riotjones has joined #ruby
<Ox0dea> I'm a dirty, rotten cheater.
Versality has joined #ruby
<flughafen> >> "x=[2..9];"#{x}TJQKA".gsub'.size
<ruboto> flughafen # => "x=[2..9];" (https://eval.in/387953)
<flughafen> >> 'x=[2..9];"#{x}TJQKA".gsub'.size
<ruboto> flughafen # => 25 (https://eval.in/387954)
<flughafen> ha
<flughafen> stupid
<flughafen> maybe one of these days i'll learn ruby
<yayfoxes> can you guys teach me programming?
oo_ has joined #ruby
<flughafen> yayfoxes: i can
<yayfoxes> I want to open a file and read every line of it
<yayfoxes> and if it's a binary file do nothing
<baweaver> yayfoxes: what have you tried?
<Ox0dea> yayfoxes: You'll have to define "binary file".
<yayfoxes> baweaver: did it in Java
AlphaAtom has joined #ruby
<baweaver> Ox0dea: best I can find is $& for a few more characters, but still no shorter
<baweaver> yayfoxes: Have you tried it in ruby?
gauke has joined #ruby
<yayfoxes> baweaver: not yet
<baweaver> might be a good first step in #ruby
j4cknewt has joined #ruby
AndroidLoverInSF has joined #ruby
<Ox0dea> baweaver: $~ and $& are equivalent for this particular case.
havenwood has quit [Ping timeout: 244 seconds]
<yayfoxes> so, how do you open a file in Ruby? Thought it was simple
<_blizzy_> this bug
<_blizzy_> is getting on my nerves
<yayfoxes> is it File::open("/etc/fstab")?
<_blizzy_> File.open("file.txt","r")
<alem0lars> >> puts "Moin"
<ruboto> alem0lars # => Moin ...check link for more (https://eval.in/387956)
<_blizzy_> r means read.
<yayfoxes> ok, but then how do I um...work with that file after opening it?
<_blizzy_> data = File.open("file.txt","r"0
<_blizzy_> *)
<_blizzy_> do something with data
<yayfoxes> wow!
<Radar> _blizzy_: which bug would that be/
wallerdev has quit [Quit: wallerdev]
<_blizzy_> Radar, the @team one, which I still haven't fixed.
<Ox0dea> >> File.read($0)
<ruboto> Ox0dea # => "p begin\n File.read($0)\nrescue Exception\n puts \"\#{$!} (\#{$!.class})\"\n $stdout.flush\n ra ...check link for more (https://eval.in/387957)
<Radar> _blizzy_: Do you have a way for me to reproduce the problem yet?
<yayfoxes> _blizzy_: blizzy: so I write this new text file concatenate.rb
<[k-> have you tried refactoring :p
<_blizzy_> I still am refactoring
<_blizzy_> Radar, not yet.
<_blizzy_> I think I found a fix however.
shoutsid has quit [Ping timeout: 252 seconds]
<yayfoxes> how do I read command line arguments in a manner akin to GNU getopt?
<yayfoxes> I want concatenate -s, concatenate -n, -E, -T, blah blah blah
lemur has joined #ruby
<shevy> yayfoxes get_opt_long perhaps
<Ox0dea> yayfoxes: require 'optparse'
<Ox0dea> Or handle ARGV manually.
<shevy> I like how you suggest the second way Ox0dea; I take it you are not perfectly happy with optparse :D
<Ox0dea> I use Thor.
<shevy> hehehe
<flughafen> i used to have a swedish gf, and her dad's name was thor
<shevy> a cool guy this Thor Wauki
arooni-mobile has quit [Remote host closed the connection]
<flughafen> heh.
baweaver has quit [Ping timeout: 248 seconds]
* flughafen hasn't played magic for .... 20 years?
ndrei has joined #ruby
<flughafen> i thinnk?
<flughafen> 18-20 or so
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alicanyilmaz has joined #ruby
<yayfoxes> is this how you print out a whole file? puts File.open("/etc/fstab","r")?
<apeiros> moin flughafen
<flughafen> hey apeiros
<_blizzy_> yayfoxes, try it out.
<apeiros> yayfoxes: puts File.read(path)
<yayfoxes> ah
<apeiros> open only opens the file (hence it's called "open")
<yayfoxes> ok, another q, how do you do loops in ruby?
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> yayfoxes: I suggest you get a book. there's even some for free online.
<yayfoxes> I want to read a single character at a time
<yayfoxes> apeiros: Why's Poignant Guide to Ruby or what?
<apeiros> yes, that's one.
<apeiros> pickaxe is another one freely available
<shevy> yayfoxes loop { puts 'hi yayfoxes'; sleep 2; break if rand(5) == 0 }
solars has joined #ruby
Xeago has joined #ruby
<shevy> single character: should be via getch / STDIN.getch / or possibly use io-console; you may have to require it first before .getch works or so, require 'io/console'
<shevy> This one is also cool: row, col = STDIN.winsize
SolarSailor has quit [Ping timeout: 272 seconds]
dudedudeman has quit [Ping timeout: 264 seconds]
<_blizzy_> Radar, it would be hard to recreate the error.
<_blizzy_> unless you actually ran the bot itself.
<sevenseacat> its now been a day and a half.
sandstrom has joined #ruby
fantazo has joined #ruby
<[k-> your code again, please?
<[k-> I shall try my best to be a compiler
gauke has quit [Ping timeout: 264 seconds]
Xeago has quit [Ping timeout: 246 seconds]
AndroidLoverInSF has quit [Ping timeout: 276 seconds]
<_blizzy_> sevenseacat, yep.
olistik has quit [Remote host closed the connection]
<_blizzy_> this is one hell of a bug.
<sevenseacat> its likely not.
<_blizzy_> then it must be something I'm overlooking.
olistik has joined #ruby
<[k-> sometimes, people get tired of looking for bugs
<sevenseacat> likely so.
<[k-> they just do a full rewrite
<sevenseacat> have you considered testing your code?
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
pandaant has joined #ruby
<jesterfraud_work> is there a way to mock an object with expectations, but provide equality logic?
Atomic_Work has quit [Ping timeout: 250 seconds]
AndroidLoverInSF has joined #ruby
<sevenseacat> see one of the problems with writing such a big slab of code like that is that it is indeed impossible to test anything
<jesterfraud_work> I'm trying to expect an action mailer (deliver later) action, but the reference I build the expectation with for the objects passed in doesn't match the reference that actually happens, despite them being the 'same object' in terms of ID
<apeiros> _blizzy_: weren't you the one who wondered why long methods are bad?
<_blizzy_> apeiros, yes.
<apeiros> _blizzy_: long methods being hard to debug would be one major reason
<_blizzy_> apeiros, oh.
<apeiros> and them being hard to test too
lxsameer has joined #ruby
<Ox0dea> _blizzy_: Doesn't that make sense?
<_blizzy_> sevenseacat, well I've been 'refactoring' for the past day.
<apeiros> smaller methods which focus on a single thing can relatively easy be tested
<sevenseacat> you cant test your code because it's so tied up to the web service
<sevenseacat> your idea of refactoring is very different than mine
<_blizzy_> Ox0dea, yes.
<Ox0dea> _blizzy_: Are you particularly attached to your code at this point?
<_blizzy_> Ox0dea, yes. :/
olistik has quit [Ping timeout: 256 seconds]
<Ox0dea> Why?
micmus has joined #ruby
<_blizzy_> because I've worked hard on it. It took me a week to get to this point.
<Ox0dea> Why does that give the code worth?
<_blizzy_> because time and effort.
<sevenseacat> sunk cost fallacy
* [k- imagines _blizzy_ looking at his code in the future, not a tear dropped
hectortrope has joined #ruby
<_mh_> moin
<[k-> morning
iamdoo2 has joined #ruby
<Ox0dea> _blizzy_: Isn't it great that we can learn from the experiences of others?
<_blizzy_> Ox0dea, yeah.
commondream has joined #ruby
* sevenseacat mumbles something about killing your darlings
alicanyilmaz has quit [Quit: alicanyilmaz]
arturaz has joined #ruby
<Ox0dea> Only that their siblings may be ever better.
bayed has joined #ruby
<[k-> everyone here agrees that your code needs 'serious' refactoring :/
<[k-> do you want/need help with that?
doublemalt_ has quit [Ping timeout: 244 seconds]
<_blizzy_> I've been refactoring for the past day though. :/
<Ox0dea> It should be junked and begun anew once the prorammer has better learnt his craft.
<_blizzy_> I'm not restarting this project.
<Ox0dea> You spell your doom.
<_blizzy_> ok. c:
<[k-> _blizzy_ you can by all means continue. when you complete the project, however, we wish you would try to rewrite it differently
<lemur> Y'know a lot of programmers want to burn some of their old creations with fire right?
<_blizzy_> [k-, I'm rewriting it atm.
<[k-> I wish I could burn some
<_blizzy_> but not from scratch. I'm changing things around, making it more 'ruby'
<[k-> so embarrassing >.<
<_mh_> I'd rather say I've not yet met one that doesn't want to kill some of their own abominations eventually ;)
<_mh_> esp. if they have to keep maintaining them.
<sevenseacat> _blizzy_: but you're not doing that
<_blizzy_> sevenseacat, I am.
<lemur> _mh_: mainly because they end up in production
<sevenseacat> Ruby is an object-oriented language - you are not making things more object oriented
<shevy> _blizzy_ what helped me is to try to have things as small and minimal as possible
<sevenseacat> you're pulling out helper methods that rely on global state
<[k-> I think you need one of Sandi Metz videos
<shevy> _blizzy_ like building with lego bricks
<lemur> sevenseacat: how far back was the link to it?
commondream has quit [Ping timeout: 265 seconds]
<sevenseacat> oh sometime yesterday
<lemur> ...dang nick
<_mh_> lemur: best teacher to coding standards though... wondering half a day 'who wrote this **** piece of code' and then 'fuck, that's me'
<sevenseacat> _blizzy_: can you give us an updated link to your code?
<shevy> lemur I know you are a beaver in disguise!
lemur is now known as baweaver
<shevy> :D
<Ox0dea> Very sneaky.
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bigkevmcd has joined #ruby
<[k-> (let me find the one that she did refactoring)
<_blizzy_> she
<baweaver> secondary nick
<baweaver> lemur was my original forum alias
<Ox0dea> _blizzy_: Sandi Metz is female.
<_blizzy_> Ox0dea, oh.
<shevy> _mh_ oh yeah that's how I end up with some comments... I need to explain to my future self why I went that specific way in code, so I can avoid a "wtf was I thinking back then" moment later in time
<_blizzy_> well, it's on github. https://github.com/NotBlizzard/blizzybotrb
<Ox0dea> > englishize
<_blizzy_> yeah IDK why I added that.
fabrice31 has joined #ruby
<_blizzy_> I should remove it.
que__ has joined #ruby
<_mh_> shevy: I suppose that can help, but most of the time, in a few years, stuff you write today you'll consider 'bad' or 'outdated' or 'wth was I thinking'
<[k-> found it
<sevenseacat> the first thing I would do is move all of the websocket stuff out into its own class - nearly every single one of your methods deals with formatting data either received by or sent to a websocket
<baweaver> lib folders help too
<_blizzy_> sevenseacat, ok, that I can do.
<sevenseacat> that would be a real refactoring
<shevy> \o/ you are catifying the code now _blizzy_
<_blizzy_> shevy, is that good or bad.
Xeago has joined #ruby
<shevy> it's good. cats are good
<_blizzy_> oh.
<shevy> monkeys are bad, hence the term monkeypatching!
<_mh_> patching monkeys should be illegal
<shevy> yeah
<Ox0dea> String#flip should be in core, though. :)
<shevy> I remember matz showed a picture of a duck typing
terlar has joined #ruby
<baweaver> I might make a Pokemon system in Ruby later for jollies.
<sevenseacat> and then that makes your code easier to test, because in tests you can simply swap out the websocket class with a different class with stubbed implementations
<_mh_> Ox0dea: agreed.
<Ox0dea> baweaver: I have considered it on several occasions.
<baweaver> I actually made the pokegem :D
eGGsha has joined #ruby
<Ox0dea> That you did.
<[k-> flip?
<danielpclark> For those in the earlier convo...
<sevenseacat> none of this pokemon stuff. i want to build an app that plays triple triad
<danielpclark> '23456789TJQKA'.flat_map{|c|([c]*4).zip %w'♥ ♦ ♣ ♠'}.scan /../
stan has joined #ruby
<Ox0dea> danielpclark: String#flat_map is not real.
RazorX_ has quit [Ping timeout: 256 seconds]
<danielpclark> Hmm.. it's working for me... let me check source location
<baweaver> >> class String def flat_map() raise 'lol' end end; 'foo'.flat_map
<ruboto> baweaver # => /tmp/execpad-35403d3a57d3/source-35403d3a57d3:2: syntax error, unexpected keyword_def, expecting '<' ...check link for more (https://eval.in/387972)
roolo has joined #ruby
<baweaver> >> class String; def flat_map() raise 'lol' end end; 'foo'.flat_map
<ruboto> baweaver # => lol (RuntimeError) ...check link for more (https://eval.in/387973)
<baweaver> picky devil
<_blizzy_> flat_map is real. c:
Xeago has quit [Read error: Connection reset by peer]
<_blizzy_> but not for string.
<[k-> no its not
* sevenseacat goes back to futzing with elasticsearch
<[k-> not for strings
<baweaver> is now
* baweaver submits to core
ndrei has quit [Ping timeout: 244 seconds]
<danielpclark> Ah! I see it works from my gem MightyString
<[k-> >> "foo". flat_map
<ruboto> [k- # => undefined method `flat_map' for "foo":String (NoMethodError) ...check link for more (https://eval.in/387974)
arturmartins has joined #ruby
dgutierrez1287 has joined #ruby
<danielpclark> it is a method on string for me. works quite well with the gem ^_^
RazorX has joined #ruby
<[k-> ah then you need to account for the length of the gem
Xeago has joined #ruby
<danielpclark> That's what I get for testing within my Rails project
<Ox0dea> danielpclark: ruboto does not let you reject its reality and substitute your own.
<shevy> lol... mighty string... what a name :)
<danielpclark> %'23456789TJQKA'.flat_map{|c|([c]*4).zip %w'♥ ♦ ♣ ♠'}.scan /../
<Ox0dea> baweaver: I've vaguely fantasized about programmatically turning Eevee's database into a complete system by the magic of metaprogramming.
<danielpclark> There, now it's an Array
<baweaver> that's bloody unintuitive
<Ox0dea> danielpclark: No, it's not.
skade has joined #ruby
<baweaver> Ox0dea: PM?
<Ox0dea> Oui.
<[k-> >> %'a'
<ruboto> [k- # => "a" (https://eval.in/387975)
<danielpclark> %'23456789TJQKA' is an Array
<[k-> no its not!
<_blizzy_> so, if you was the owner of my project, what would you do next
<danielpclark> ooh
<_blizzy_> other than rewriting it
spider-mario has joined #ruby
<danielpclark> grr, let me switch to IRB
<[k-> I would forget about it
<_blizzy_> hmm.
<sevenseacat> you ripped out the websocket stuff already?
<[k-> this never happened before! :>
* [k- goes on with my life
User458764 has joined #ruby
tvw has joined #ruby
<_blizzy_> no. I should rip out the ws stuff? what do you mean by that?
lavros has joined #ruby
rubie has joined #ruby
skade has quit [Client Quit]
<_mh_> _blizzy_: the change sevenseacat suggested about 15 mins ago?
<_blizzy_> _mh_, sorry then. may you reexplain it then please.
dgutierrez1287 has quit [Ping timeout: 246 seconds]
<sevenseacat> you said you could do it but now you have no idea what i meant?
<_blizzy_> I forget easily.
<sevenseacat> good. scroll up and re-read then.
<_mh_> 06:52 < sevenseacat> the first thing I would do is move all of the websocket stuff out into its own class - nearly every single one of your methods deals with formatting data either received by or sent to a websocket
Jackneill has joined #ruby
unshadow has joined #ruby
<apeiros> _blizzy_: if you forget easily, then taken notes
<_blizzy_> ok.
<sevenseacat> once that's done, I think it would be easier to see what your app actually does, because atm I don't know what it does.
<_blizzy_> I'm making a class called Chat
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang65 has quit [Ping timeout: 256 seconds]
<yayfoxes> ok can somebody please help me go through and rate books? Learn to Program, by Chris Pine isn't bad, so skip that book
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sevenseacat> if you name books that people here have read, I'm sure they can give you their opinions.
<yayfoxes> I love Ruby seems to be another good book, at first glance
husanu has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<sevenseacat> read and/or write
<sevenseacat> *wrote
<danielpclark> After looking at the source for the method I replicated the results. Here it is.
husanu has joined #ruby
<danielpclark> '23456789TJQKA'.chars.flat_map{|c|([c]*4).zip %w'♥ ♦ ♣ ♠'}.join.scan /../
rubie has quit [Ping timeout: 265 seconds]
<Ox0dea> danielpclark: And now it's massive.
<baweaver> well, bedtime for me. 'night all.
krz has quit [Read error: Connection reset by peer]
<danielpclark> map works just as well as flat_map in this case... flat_map is not needed
<[k-> >> %"'23456789TJQKA'.chars.flat_map{|c|([c]*4).zip %w'♥ ♦ ♣ ♠'}.join.scan /../".size
<ruboto> [k- # => 73 (https://eval.in/387978)
lkba_ has joined #ruby
jack_rabbit has quit [Quit: Leaving]
<yayfoxes> ok, got any good books I can read?
<yayfoxes> I'm reading I Love Ruby, my opinion is in a sec
<_blizzy_> I'm still confused. you say put websocket related stuff in there. so battle related websocket stuff? or just stuff in general.
jesterfraud_work has quit [Ping timeout: 246 seconds]
<danielpclark> Thought the problem was not getting a count of 52 cards... guess I misunderstood
<_blizzy_> *websocket stuff in general.
baweaver has quit [Remote host closed the connection]
<Ox0dea> danielpclark: Golf is about making as short a solution as possible.
<[k-> I'm going to cut my hair soon ;-;
<_blizzy_> aw.
<sevenseacat> _blizzy_: all of the code to deal with translating readable stuff into the format to be sent over the websocket, and anything to deal with interpreting what the websocket receives into meaningful data
lkba has quit [Ping timeout: 256 seconds]
<_blizzy_> sevenseacat, ok.
<danielpclark> Is an Array of results okay for the golf challenge?
<danielpclark> ('23456789TJQKA'*4).chars.zip %w'♥ ♦ ♣ ♠'*52
Aswebb_ has joined #ruby
<Ox0dea> danielpclark: That's an array of arrays.
<sevenseacat> _blizzy_: https://github.com/NotBlizzard/blizzybotrb/blob/master/battle-helpers.rb#L286 almost this entire method deals with websocket junk, and there's even a nice typo bug hidden in there that I'm not sure affects anything
<danielpclark> That's why I asked
<Ox0dea> You'd need a map(&:join) to complete the task, but that's essentially the par I posted to kick things off.
<sevenseacat> _blizzy_: megaed vs magaed, whatever they mean
<_blizzy_> sevenseacat, megaed, thanks.
<yayfoxes> sevenseacat: I Love Ruby is a good book; it explains everything, but there's no exercises
<sevenseacat> i havent read that book
<sevenseacat> and yeah I think exercises in a language book are important, not so much in a framework book
<yayfoxes> so erm...what book has exercises and ideally explains everything?
ValicekB has quit [Ping timeout: 256 seconds]
bruno- has joined #ruby
<sevenseacat> I don't know. i didnt read any books specifically about teaching ruby
<Ox0dea> danielpclark: You'd only need to multiply the array of suits by 13, for what that's worth.
oo_ has quit [Remote host closed the connection]
<yayfoxes> can you recommend any books in any other language?
revath has joined #ruby
revath has left #ruby [#ruby]
<sevenseacat> even the well grounded rubyist doesnt appear to have exercises
<sevenseacat> i liked programming elixir, it had exercises.
<danielpclark> you're right
<yayfoxes> link?
<sevenseacat> is that relevant in a ruby channel?
<shevy> oh a drinking cat, with a powerful elixir
toretore has quit [Quit: This computer has gone to sleep]
<yayfoxes> sevenseacat: Elixir seems boring, I wanna study Haskell
tubuliferous_ has joined #ruby
<shevy> :\
<sevenseacat> go do that then
<yayfoxes> network oriented is not what I want, which is why it's boring to me
<sevenseacat> i liked learn you a haskell for great good. i dont remember if it had exercises or not.
<shevy> the schroedinger cat is a dead-or-alive monad-in-a-box. it follows the maybe-alive pattern
oo_ has joined #ruby
zeroDivisible has quit [Ping timeout: 250 seconds]
<yayfoxes> sevenseacat: ok, bye ruby
bruno- has quit [Ping timeout: 264 seconds]
<sevenseacat> see ya dood.
yayfoxes has left #ruby ["WeeChat 1.0.1"]
browsestoics has joined #ruby
krz has joined #ruby
Iskarlar has joined #ruby
lsmola has joined #ruby
dchoi has joined #ruby
tubuliferous_ has quit [Ping timeout: 252 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
browsestoics has quit [Client Quit]
towski_ has joined #ruby
alex88 has joined #ruby
AlphaAtom has joined #ruby
KillerFox has quit [Ping timeout: 264 seconds]
Bertg has joined #ruby
AlphaAtom has quit [Client Quit]
hotpancakes has joined #ruby
allomov has joined #ruby
<_blizzy_> am I going in the right direction, sevenseacat? https://gist.github.com/NotBlizzard/7673e1cad47e85bf0813
<sevenseacat> uh.... I don't know what direction you're going in.
<_blizzy_> the right direction hopefully.
<_blizzy_> I mean.
<_blizzy_> the direction you want me to go in.
<_blizzy_> about ripping out the ws stuff
<_blizzy_> and putting it into one class.
iamdoo2 has quit [Remote host closed the connection]
<sevenseacat> not quite what I meant
<_blizzy_> oh.
<_blizzy_> ._. I can't win
towski_ has quit [Ping timeout: 272 seconds]
<sevenseacat> I meant building a websocket adapter for your code, not just moving all of your existing methods into a new class.
<Ox0dea> > using a compass to find enlightenment
<sevenseacat> _blizzy_: how hard with your code would it be to print output to a console, instead of sending it over a websocket?
<sevenseacat> printing nice output to a console
<sevenseacat> not the same text you're sending over the websocket
<_blizzy_> so a parser?
shoutsid has joined #ruby
<sevenseacat> sort of
dchoi has quit []
dchoi has joined #ruby
datanoise has quit [Ping timeout: 252 seconds]
<sevenseacat> if the format of the input you were receiving from your websocket changed, how much of your code would you have to change?
<ljarvis> moin
<sevenseacat> likely a lot, right?
hotpancakes has quit []
<_blizzy_> yes.
<_blizzy_> OK I get it now
<_blizzy_> :)
<sevenseacat> if that was all encapsulated in one place, your adapter class, you'd only have to change it there.
<sevenseacat> or if you wanted to print nice messages to a console, you could swap the adapter for one that printed messages like "you did a mega attack on Foobar!" (i have no idea if thats an actual output)
white_bear has joined #ruby
<Ox0dea> _blizzy_: What do you have against Hoopa and Volcanion?
arturmartins has quit [Quit: Leaving...]
<_blizzy_> Ox0dea, um, nothing.
<_blizzy_> why?
<Ox0dea> Then why aren't they in data/pokemon.txt?
<_blizzy_> oh.
que__ has quit [Quit: Page closed]
<_blizzy_> I didn't add them yet. I used a generator to generate the pkmn list.
<_blizzy_> since typing out 721 names would take a while.
arount has joined #ruby
<Ox0dea> Have you thought about how you're going to handle Flabébé?
arturmartins has joined #ruby
<_blizzy_> not yet.
arount has left #ruby [#ruby]
<sevenseacat> lol
Iskarlar has quit [Ping timeout: 252 seconds]
<maloik> Ox0dea: made me lol :D
Xeago has quit [Read error: Connection reset by peer]
<sevenseacat> Ox0dea: you really are a font of obscure knowledge.
ndrei has joined #ruby
<_blizzy_> I knew someone in here understood what I was talking about.
<_blizzy_> :)
workmad3 has joined #ruby
Iskarlar has joined #ruby
dchoi has quit [Remote host closed the connection]
dchoi has joined #ruby
dchoi has quit [Client Quit]
symm- has quit [Ping timeout: 276 seconds]
dchoi has joined #ruby
vondruch has joined #ruby
dchoi has quit [Client Quit]
dchoi has joined #ruby
Iskarlar has quit [Client Quit]
danielpclark has quit [Ping timeout: 272 seconds]
dchoi has quit [Client Quit]
dchoi has joined #ruby
dchoi has quit [Client Quit]
arup_r has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
shock_one has joined #ruby
ruu has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
Pumukel has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
Iskarlar has joined #ruby
sandstrom has joined #ruby
arup_r_ has joined #ruby
aapole has quit [Ping timeout: 264 seconds]
ryba has joined #ruby
ghostpl has joined #ruby
k3asd` has joined #ruby
arup_r has quit [Ping timeout: 265 seconds]
User458764 has joined #ruby
<apeiros> `render text: "OK"` --> Completed 200 OK … (views 17ms) - where the hell does that spend 17ms? :D
bosma is now known as yolofxtato
yolofxtato is now known as bosma
arup_r_ has quit [Client Quit]
arup_r has joined #ruby
<Silex> apeiros: production?
<ljarvis> apeiros: rails?
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Iskarlar has joined #ruby
anne-marie_ has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
Helheim has quit [Remote host closed the connection]
<shevy> apeiros: chocolate?
TheHodge has joined #ruby
<adaedra> apeiros: happiness?
elia has joined #ruby
Helheim has joined #ruby
danielpclark has joined #ruby
<[k-> apeiros: hell
<[k-> oh I forgot the ?
<[k-> :/
<[k-> s/ll/ll?
<adaedra> tsoin tsoin tsooooooin
Chemist has quit [Ping timeout: 256 seconds]
msgodf has joined #ruby
araujo has joined #ruby
bkxd has joined #ruby
<maloik> oh hello
nso95 has joined #ruby
KillerFox has joined #ruby
GPrime has quit [Quit: Textual IRC Client: www.textualapp.com]
avril14th has joined #ruby
ruu has quit [Read error: Connection reset by peer]
towski_ has joined #ruby
ruu has joined #ruby
rdark has joined #ruby
<_blizzy_> ok, sevenseacat :) https://github.com/NotBlizzard/blizzybotrb
mikecmpbll has joined #ruby
ghostpl has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Juanchito has joined #ruby
djbkd has joined #ruby
<sevenseacat> _blizzy_: another side effect of having such big slabs of code is that you run into indentation issues and dont even realize it
<_blizzy_> sevenseacat, oh.
<sevenseacat> make sure you use two spaces for indentation.
mister_solo has joined #ruby
shredding has joined #ruby
senayar has quit [Remote host closed the connection]
<sevenseacat> also, your rearrangements havent addressed any of the questions i posed earlier
<sevenseacat> because you're just moving code around, not refactoring it
nickfausnight has quit [Quit: Connection closed for inactivity]
Scroff has joined #ruby
c0m0 has joined #ruby
<_blizzy_> I have
<_blizzy_> I put all the websocket stuff in one class now
djbkd has quit [Ping timeout: 248 seconds]
<_blizzy_> so I can easily change websocket modules if I have to.
zeroDivisible has joined #ruby
doertedev has joined #ruby
tvw has quit []
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sevenseacat> I'm also fairly certain you're not actually running any of this code you're writing
<sevenseacat> because there are some huge glaring typos in it
<_blizzy_> I am running it
arturmartins has quit [Quit: Leaving...]
bkxd has quit [Ping timeout: 256 seconds]
<_blizzy_> it connects to said websocket
<_blizzy_> I've fixed the typos.
<sevenseacat> which ones?
joonty has joined #ruby
<_blizzy_> the ones you posted.
bkxd has joined #ruby
<sevenseacat> i posted indentation issues, not typos
<sevenseacat> you're not setting any of your instance variables anywhere.
<sevenseacat> hence, running the code will cause a lot of problems.
<_blizzy_> I've also fixed the indentation issues.
olistik has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
ndrei has joined #ruby
<apeiros> Silex: na, dev
ghostpl has joined #ruby
rbowlby has quit [Remote host closed the connection]
<apeiros> [k-: probably :D
<apeiros> ljarvis: yes, rails
<sevenseacat> I keep finding more and more issues just with this BattleParser class
<ddfreyne> yorickpeterse: There's no point in adding gem checksums to the ruby-lint gem repository if you’re not signing your Git commits
<sevenseacat> there's no possible way it can work. for anything.
<ddfreyne> yorickpeterse: Anyone could commit in your name.
<_blizzy_> well, it runs.
<_blizzy_> it just crashes when a battle happens.
<[k-> that is why you should use nice variable names
<sevenseacat> if by run you mean it loads without error, then sure
eGGsha has joined #ruby
<sevenseacat> but it wont work. for anything.
<_blizzy_> ok.
<[k-> @variables default to nil
<_blizzy_> thanks for allt the help so far :)
<[k-> so it still runs
<sevenseacat> you're not setting any of the instance variables, for a start.
shock_one has quit [Remote host closed the connection]
<sevenseacat> so all of the methods you're calling on them, will crash.
towski_ has quit [Remote host closed the connection]
<_blizzy_> I'm not setting them in initialize?
<sevenseacat> you dont have an initialize method.
<_blizzy_> oh. I typoed
<sevenseacat> hence i said glaring typos.
<_blizzy_> you could of pointed them out. c:
<sevenseacat> so I think you're wasting my time now.
<sevenseacat> you said the code worked.
<_blizzy_> but I'm trying.
rbowlby has joined #ruby
<_blizzy_> yes, the code runs.
<_blizzy_> without errors.
towski_ has joined #ruby
<_blizzy_> I'm trying my best to let you help me.
<sevenseacat> except for the part where it crashes
lordkryss has joined #ruby
<_blizzy_> ok but I'm trying.
<_blizzy_> everyone makes mistakes.
<[k-> that is not how you test if a program is correct...
towski_ has quit [Remote host closed the connection]
<Ox0dea> Isn't it, though?
towski_ has joined #ruby
<[k-> only syntactical wise
<[k-> maybe if it was Haskell, sure
Bounga has joined #ruby
<sevenseacat> yeah you're trying alright
<[k-> but not ruby
krz has quit [Read error: Connection reset by peer]
towski_ has quit [Remote host closed the connection]
<Ox0dea> I thought trying duper hard made the code at least 2x gooder.
<_blizzy_> I give up.
Iskarlar has quit [Read error: No route to host]
<[k-> good!
Iskarlar_ has joined #ruby
<[k-> now you can start from scratch!
<_blizzy_> I'm not
<[k-> yay!
Rickmasta has joined #ruby
<[k-> :(
vikaton has quit [Quit: Connection closed for inactivity]
<_blizzy_> I mean I give up with trying to get help from here.
<[k-> that's mean :(
<sevenseacat> so you really did just waste my time. thanks!
<_blizzy_> but I haven't so far even heard a "you're trying! good job" or "you're getting there"
<_blizzy_> all I hear is complaint after complaint.
<ljarvis> _blizzy_: you can't be angry with people in here, lots of people have tried very hard to help but it's been incredibly difficult
<sevenseacat> because you're not getting there
<_blizzy_> but I am.
<sevenseacat> no you're not.
<_blizzy_> ljarvis, I am trying.
* [k- pats sevenseacat
<_blizzy_> IMO I am.
Xeago has joined #ruby
<[k-> then there is no use asking for help
<[k-> since you got where you want
<_blizzy_> I've made great progress. I've been 'refactoring', making my code more OOP.
krz has joined #ruby
<ljarvis> _blizzy_: You've been asked a few times to delete lots of code and create a very minimal example but i've seen no evidence that you've tried that
<yorickpeterse> morning
<sevenseacat> criticism of your code != complaint
<[k-> morning
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<_blizzy_> ljarvis, because there are other ways of doing things.
<sevenseacat> oh christ.
<Silex> apeiros: well, give it a try with production
<ljarvis> eh
<[k-> _blizzy_ please
<ljarvis> well that's me out then
<Silex> apeiros: dev being slow is not really a surprise as it reloads almost everything all the time
<[k-> _blizzy_ I recommend you watch the video now
<apeiros> Silex: well, it says in *views* it takes 17ms
<sevenseacat> you're running out of people to help you because you insist, just like this, that you already know better
<apeiros> and that's just a plain render text
<apeiros> there's nothing to reload
<apeiros> nothing to process
<_blizzy_> I don't know better.
<Silex> apeiros: are you sure of that?
ndrei has quit [Ping timeout: 244 seconds]
<apeiros> Silex: errr, yes?
<sevenseacat> then when people asked you to make a minimal example, why did you point blank refuse?
<apeiros> unless it lies about what it measures…
towski_ has joined #ruby
kalx has joined #ruby
<Silex> I can imagines tons of things to load to render text
<_blizzy_> I don't point black refuse.
<sevenseacat> because 'there are other ways to do things'
kalx has left #ruby [#ruby]
<apeiros> Silex: do tell?
<ljarvis> Silex: the metric is view loading...
<_blizzy_> because you really can't make a minimal example. the minimal example would be going to the website
<_blizzy_> making an account
<_blizzy_> connecting the bot
<Ox0dea> Pfft.
<_blizzy_> and then battling.
<sevenseacat> you really can. its called separation of concerns.
<ljarvis> that shouldn't differ with plain text rendering
Iskarlar_ has quit [Client Quit]
<Silex> apeiros: e.g reload all the renderers, even to finally only use the one that renders text
<sevenseacat> you have no separation of concerns at the moment. everything is tied up together.
<Ox0dea> _blizzy_: That is, in fact, a maximal example.
<maciejczyzewski> hi folks!
<sevenseacat> hence we're trying to get you to split them out into minimal examples/.
<_blizzy_> sevenseacat, I'm splitting it
<apeiros> Silex: renderers are not part of the reload cycle in rails
<_blizzy_> just like you said to.
Zai00 has joined #ruby
<_blizzy_> I'm splitting it into a seperate web socket class
<apeiros> haml, slim, erb are libs, they get loaded once
<_blizzy_> so if I change websocket modules, I easily can.
Xeago has quit [Remote host closed the connection]
Iskarlar has joined #ruby
<Silex> apeiros: trace it then? see where it spends time
workmad3 has joined #ruby
<apeiros> Silex: eh, not wasting time on this
<ljarvis> apeiros: it's 17ms just give up
<Silex> apeiros: well you already are atm :)
<apeiros> it just caught my eye
<ljarvis> :D
<Silex> apeiros: as I said, try in production
<Ox0dea> sevenseacat: Thank you for trying.
<sevenseacat> o/
<_blizzy_> yeah, thanks for all the help, sevenseacat
<_blizzy_> you really got me far. :) really, thanks.
<_blizzy_> no sarcasm.
<apeiros> Silex: not running this locally in production. far too much config to change.
marr has joined #ruby
<apeiros> and I'm not sure I'll remember to check the logs once it runs on production :)
<_blizzy_> well, time to continue this project.
roolo has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
<Silex> apeiros: what? what kind of setup do you have where switching to production takes more than 15 seconds?
nutha has joined #ruby
<ljarvis> apeiros: obs you should be using node
serivich has joined #ruby
sulky has joined #ruby
lavros has quit [Ping timeout: 272 seconds]
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
lessless has joined #ruby
<_blizzy_> node isn't that bad
towski_ has quit [Remote host closed the connection]
<_blizzy_> Silex, did you know that there's a php framework named after you? :)
datanoise has joined #ruby
MatthewsFace has joined #ruby
<adaedra> <_blizzy_> node isn't that bad
lavros has joined #ruby
<_blizzy_> well it's not.
<adaedra> different people, different tastes :°
<_blizzy_> imo it's not.
<sevenseacat> lawl
<_blizzy_> what's funny. c:
<adaedra> "imo", we're getting there.
<_blizzy_> ok.
lkba has joined #ruby
lva has joined #ruby
<adaedra> :)
<_blizzy_> :)
<ljarvis> aaaaaaaa
<ljarvis> god dammit
<maloik> bbbbbbbbbb
<ljarvis> maloik: nou
<_blizzy_> c?
<maloik> oh, not that game :(
<Silex> _blizzy_: yes
<adaedra> Who give the d?
<_blizzy_> heh.
lkba_ has quit [Ping timeout: 250 seconds]
<Silex> _blizzy_: all of a sudden I was ungooglable
<_blizzy_> lol.
<adaedra> ljarvis: what happen?
<_blizzy_> you're still googlable.
<ljarvis> adaedra: terminal crapped itself
<adaedra> the command is reset, not aaaaaaa
jenrzzz has quit [Ping timeout: 272 seconds]
withnale_ has joined #ruby
oo_ has quit [Remote host closed the connection]
gagrio|MRG is now known as gagrio
<jhass> would be a good alias though
<adaedra> alias merde=reset
<[k-> I think every programmer should learn java
<adaedra> I think not
<[k-> then they will know why everyone loves ruby
<sevenseacat> adaedra: lol
<_blizzy_> I find Java ok.
<Silex> apeiros: Rendered text template (0.0ms)
<Silex> in development
<Silex> (fyi)
<sevenseacat> you find everything okay
<sevenseacat> except ruby
<[k-> there is a saying that you can't find happiness if you don't experience hardships
<adaedra> :D
<_blizzy_> no I like ruby.
<adaedra> you find it ok?
<_blizzy_> no.
<ljarvis> java is awesome. haters
<_blizzy_> it's my favorite language.
<[k-> ljarvis: nou
<Silex> all languages sucks for one reason or another
<_blizzy_> yep.
<adaedra> ^
<sevenseacat> except php. *runs like hell*
<ljarvis> except my pet language
<_blizzy_> lol.
<_blizzy_> I'm ok with PHP.
* [k- shoots sevenseacat
<adaedra> sevenseacat: indeed. it sucks for all the reasons.
jenrzzz has joined #ruby
<_blizzy_> it's also one of my favorite languages.
<sevenseacat> adaedra: precisely :P
<_mh_> php...
* sevenseacat resists the urge to recommend _blizzy_ write the bot in one of those other languages
* _mh_ goes back to hiding in a corner somewhere till php passes.
<adaedra> _blizzy_: I liked PHP, until I had to work with it.
<_blizzy_> sevenseacat, I already have
<_blizzy_> in every other language I know.
<sevenseacat> none of them were OO languages?
<ljarvis> _blizzy_: what languages?
<[k-> obviously you did not grasp oop
<_blizzy_> Scala, Java, C#, Go, Ruby, Python, Node
<ljarvis> lol
<sevenseacat> link? :D
<[k-> sevenseacat: you're too fast :(
<apeiros> Silex: an app which connects to a couple of services in production
ndrei has joined #ruby
<adaedra> [k-: that's what she said
towski_ has joined #ruby
<apeiros> Silex: so you'd have to go through all config files and ensure it doesn't do that when you only want to run it locally in prod
<[k-> but... they are all oo!
<sevenseacat> [k-: yeah I hear that a lot ;_;
<[k-> except scala
<[k-> but Scala is functional
vudew_ has quit [Ping timeout: 276 seconds]
<ljarvis> scala is hybrid really
<ljarvis> it has oop
towski_ has quit [Remote host closed the connection]
<[k-> but I like to think it is functional
<_blizzy_> which one you want first
<_blizzy_> :)
<Ox0dea> _blizzy_: Scala.
<[k-> I think I do not want to see them
<_blizzy_> ok.
allomov has quit [Remote host closed the connection]
<jhass> apeiros: check rake middleware for odd things?
<[k-> I'm clicking anyway
Igorshp has joined #ruby
<sevenseacat> that doesnt do the same things
<_blizzy_> yeah, but they're both bots.
<ljarvis> :D
<_blizzy_> one is just more functional than the other.
<[k-> oh. my. god.
<sevenseacat> um
<ljarvis> herp derp
<Ox0dea> He's, like, accidentally trolling.
<_blizzy_> I'm not
<sevenseacat> thats like saying i made two web apps, one is a hello world, the other is facebook
<sevenseacat> but theyre both web apps, right
<adaedra> :D
<ljarvis> right!
<_blizzy_> but they are both bots.
<adaedra> left!
<apeiros> jhass: naaa, as said, not going to waste time on this
<_blizzy_> they bot can run and do commands.
<[k-> MY EYES ARE CRYIG
<ljarvis> hello mrs zuckerburg
<shevy> cryig eyes
* adaedra gives [k- acid
<Silex> apeiros: oh, you have configs that are "production ready" in your repo
<Silex> that sounds dangerous
<adaedra> this should help your eyes, [k-
<apeiros> while 17ms is crazy for what it does, it's not warranting any time spent on it.
<[k-> thx
sandstrom has quit [Quit: My computer has gone to sleep.]
sulky has quit [Ping timeout: 246 seconds]
<Silex> apeiros: as I showed you, it takes 0ms by me
<Silex> so probably something with your config/version/whatever
<apeiros> Silex: yepp, and that's what I'd expect
<jhass> oh anyway
<ljarvis> _blizzy_: what about the c# one
<jhass> ?rails apeiros
<ruboto> apeiros, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<jhass> scnr
<apeiros> aaahaha
<ljarvis> ^ :D
<apeiros> yeeees
<apeiros> or OT
<ljarvis> shots fired
<flughafen> ?ot jhass
<ruboto> jhass, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
serivich has quit [Ping timeout: 265 seconds]
<jhass> ok!
<ljarvis> lots of friendly fire going on
<[k-> this actually looks readable
<[k-> well done, c#!
<_blizzy_> because it's C#
<_blizzy_> the scala one is readable also
<adaedra> so you see sharp?
<_blizzy_> I wear glasses
* adaedra runs
<_blizzy_> so no.
sandstrom has joined #ruby
<[k-> the Scala one is not readable
<_blizzy_> how is it not?
serivich has joined #ruby
<shevy> it's ugly
<_blizzy_> I bet if I post it in the scala channel
<_blizzy_> people will say it is
<shevy> they are ugly too
<[k-> lol
<_blizzy_> ok this shows the ruby community
<_blizzy_> in a nutshell.
<[k-> shevy, tsk tsk
<sevenseacat> again with the community accusations
arturmartins has joined #ruby
<Ox0dea> Gotta offload that incompetence somewhere.
<apeiros> _blizzy_: what I see is a community which shows tremendous patience with you
<apeiros> _blizzy_: and you're paying that patience back by accusing them. how rude.
<_blizzy_> I never said anything bad
oo_ has joined #ruby
<_blizzy_> I said this shows the ruby community
<_blizzy_> you can take that as good or bad
danielpclark has quit [Remote host closed the connection]
<adaedra> …
<apeiros> _blizzy_: oh stop bullshitting us.
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> that's insulting.
<_blizzy_> but is it true?
<shevy> it is true that the ruby community is awesome
<sevenseacat> apeiros is the most levelheaded person here. this is interesting.
ndrei has quit [Ping timeout: 255 seconds]
<apeiros> if you can't support what you just said, you apologize. you don't weasel out.
<_blizzy_> I'm not weaseling out
<ljarvis> right, enough of this shit. If you want to discuss Ruby or have a question to follow up on your code then go ahead, otherwise go to #ruby-offtopic
<_blizzy_> I never said the community is bad.
<Ox0dea> On the Internet, nobody knows you're a weasel.
<[k-> _blizzy_: you are making everyone unhappy :(
<_blizzy_> ^
<_blizzy_> block
<shevy> I am not unhappy!
<_blizzy_> ok well this is off topic so I'll go back to talking ruby
<sevenseacat> see ya, have fun in #ruby-offtopic
ndrei has joined #ruby
<[k-> ?unhappy shevy
<ruboto> shevy, I don't know anything about unhappy
<_blizzy_> lol.
<apeiros> _blizzy_: agreed regarding OT
<[k-> ?happy shevy
<ruboto> shevy, I don't know anything about happy
<[k-> ^
<[k-> no happiness here
<Ox0dea> v
<shevy> the bot still confuses me
<apeiros> sevenseacat: thx @ levelheaded :D
<sevenseacat> ruboto has no emotionals
<Ox0dea> >> @emotion
<ruboto> Ox0dea # => nil (https://eval.in/388009)
<shevy> good point
<_blizzy_> >> @emotion = 'happy'; @emotion
<ruboto> _blizzy_ # => "happy" (https://eval.in/388010)
<_blizzy_> :)
<Ox0dea> _blizzy_: Please don't declare instance variables at the top level.
<sevenseacat> XD
<Ox0dea> It's not good encapsulation.
<flughafen> lol
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis> Ox0dea: please dont
<_blizzy_> sure thing, Ox0dea
<shevy> people are never happy with poor _blizzy_ :(
<sevenseacat> I genuinely bust out laughing then
<adaedra> what is happening here
<adaedra> did someone set us up the bomb?
<_blizzy_> >> emotion = "happy"; happy
<ruboto> _blizzy_ # => undefined local variable or method `happy' for main:Object (NameError) ...check link for more (https://eval.in/388011)
<shevy> adaedra we are talking about ruby :>
<_blizzy_> oh duh
<_blizzy_> oh well, lol.
<[k-> >> -> (h) { p h }.('happy')
<ruboto> [k- # => "happy" ...check link for more (https://eval.in/388012)
<shevy> that feels so wrong
<[k-> kek
<shevy> actually now that we have ->, can we also have <- ?
<sevenseacat> your f..... wait I'm being nice arent I
commondream has joined #ruby
* sevenseacat puts on good-girl hat
<shevy> no, wear the cat hat
<sevenseacat> shevy: the good-girl hat has cat ears on it
<Ox0dea> sevenseacat: You've really demonstrated remarkable patience during this episode.
<shevy> yah but girls are evil, cats are not!
<sevenseacat> Ox0dea: i am not known for being a patient person, so thank you.
datanoise has quit [Ping timeout: 264 seconds]
<_blizzy_> sorry, sevenseacat.
krz has quit [Read error: Connection reset by peer]
<sevenseacat> girls arent evil ;_;
<Ox0dea> shevy: What should <- do?
<_blizzy_> sorry to everyone else also.
renderful has joined #ruby
<sevenseacat> boys have cooties! so there
<shevy> Ox0dea good question... it should somehow relate to ->
postmodern has quit [Quit: Leaving]
<Ox0dea> Well, what is the opposite of a lambda?
<sevenseacat> makes output variables?
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gagrio is now known as gagrio|bomgar|BJ
<_blizzy_> adbmal?
<sevenseacat> -> (in) { out = stuff; } (out) <-
<shevy> a monad!
<anne-marie_> hello there ! i need some help with active record on a sinatra web app. Any one here familiar with this gem ?
lsmola has quit [Ping timeout: 252 seconds]
<Ox0dea> sevenseacat: The < part would need a receiver, and the argument would have to have a unary minus method.
arturmartins has quit [Quit: Leaving...]
<jhass> ?anyone anne-marie_
<ruboto> anne-marie_, Just ask your question, if anyone has or can, they will respond.
<sevenseacat> >> 0<-1
<ruboto> sevenseacat # => false (https://eval.in/388014)
<ljarvis> ?ask anne-marie_
<ruboto> anne-marie_, Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<ljarvis> oops
<jhass> lag
<shevy> jhass type faster!
<anne-marie_> ok :)
<Ox0dea> >> class Hash; alias < merge; alias -@ invert end; {a: 1} <- {b: 2}
<ruboto> Ox0dea # => {:a=>1, 2=>:b} (https://eval.in/388015)
annette has joined #ruby
<ljarvis> my brain seriously messed up parsing `alias < merge` on the first pass for some reason
<anne-marie_> well, my problem is that when i run the task $rake db:create the .env is not loaded. I've created my own rake tasks and don't have problems. I don't have problems too with the pg gem.
<ljarvis> anne-marie_: .env is a file?
<anne-marie_> the $rake db:create create a database with the wrong owner.
<anne-marie_> yes .env is a file and i use the 'dotenv' gem
oo_ has quit [Remote host closed the connection]
renderful has quit [Ping timeout: 255 seconds]
<ljarvis> anne-marie_: and you load dotenv in your rakefile?
<_blizzy_> to everyone, sorry about saying "this shows the ruby community"
<yorickpeterse> que?
oo_ has joined #ruby
annette has left #ruby [#ruby]
<anne-marie_> my Rakefile looks like this https://gist.github.com/annemarie35/6d1badc2b3dd42685490
jenrzzz has quit [Ping timeout: 246 seconds]
AlexRussia has quit [Quit: WeeChat 1.2-dev]
codecop has joined #ruby
einarj has joined #ruby
n008f4g_ has joined #ruby
Igorshp has quit [Read error: Connection reset by peer]
sandstrom has quit [Quit: My computer has gone to sleep.]
wldcordeiro has quit [Ping timeout: 248 seconds]
<_blizzy_> dear #ruby: SOrry that we all got off on the wrong foot. I dearly am sorry for what I said. I hope we can start off on the right foot, or, if you like, the left foot.
<ljarvis> anne-marie_: so, what env variable is not being set? the database name?
<_blizzy_> *Sorry
senayar has quit [Remote host closed the connection]
sandstrom has joined #ruby
konsolebox has quit [Ping timeout: 264 seconds]
eGGsha has joined #ruby
<apeiros> _blizzy_: appreciated
<anne-marie_> ljarvis> ENV['DATABASE_USER_NAME'] & ENV['DATABASE_PASSWORD'] the database name is written in the database.yml
eGGsha is now known as eGGshke
towski_ has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
towski_ has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 265 seconds]
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
tubuliferous_ has joined #ruby
<_blizzy_> apeiros, ok, thanks. :)
GitGud has quit [Read error: Connection reset by peer]
<_blizzy_> again sorry everyone.
<ljarvis> anne-marie_: but, your database setup is reading from database.yml which isn't being written to with the new env variables
krz has joined #ruby
avril14th has quit [Remote host closed the connection]
OrbitalKitten has joined #ruby
senayar has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Scrofff has joined #ruby
eGGshke is now known as eGGsha
Igorshp has joined #ruby
tubuliferous_ has quit [Ping timeout: 244 seconds]
husanu4 has joined #ruby
User458764 has joined #ruby
AlexRussia has joined #ruby
sulky has joined #ruby
<anne-marie_> ljarvis: that's the point... Maybe i just will write the username in the database.yml ^^ like in this example https://github.com/simplonco/simplonline/blob/dev/config/database.yml i don't if it's a good practice
Scroff has quit [Ping timeout: 252 seconds]
Igorshp has quit [Read error: No route to host]
roolo has joined #ruby
msgodf has quit [Ping timeout: 264 seconds]
Igorshp has joined #ruby
aapole has joined #ruby
<ljarvis> anne-marie_: The username is fine, the password you don't really want to check into version control unless it's private (and even then you need to be careful)
Zai00 has quit [Quit: Zai00]
arutemu has joined #ruby
Dopagod has joined #ruby
Zai00 has joined #ruby
husanu4 has quit [Remote host closed the connection]
tvw has joined #ruby
nso95 has quit [Quit: nso95]
khebbie has joined #ruby
GnuYawk has quit [Ping timeout: 246 seconds]
sdothum has joined #ruby
<anne-marie_> ljarvis: ok, thanks ! i have in mind since 4 days that the username must to be hidden for security reason (i'm a ruby newbie) ^^
allomov has joined #ruby
commondream has quit [Ping timeout: 252 seconds]
allomov has quit [Read error: Connection reset by peer]
towski_ has joined #ruby
allomov has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
towski_ has quit [Remote host closed the connection]
husanu3 has joined #ruby
ghostpl has quit [Remote host closed the connection]
sandstrom has joined #ruby
giuseppesolinas has joined #ruby
iateadonut has joined #ruby
dgutierrez1287 has joined #ruby
<Ox0dea> jhass: Have you defined lots of aliases?
multi_io has quit [Ping timeout: 264 seconds]
<jhass> mmh, no
langlands has joined #ruby
<jhass> maybe 5 I frequently use
Igorshp has quit []
<Ox0dea> $ shuf -n1 <(alias)
ghostpl has joined #ruby
<jhass> just 14 in my .zshrc with a couple being nocorrect/noglob stuff
Dopagod has quit [Ping timeout: 252 seconds]
multi_io has joined #ruby
<iateadonut> how can i use an iteration of a loop as a key name in a hash?
<iateadonut> file.split.uniq.each { |word| words = {:word=>1} }
husanu3 has quit [Killed (marienz (Drones are not welcome on freenode.))]
<iateadonut> i want to use the output |word| as :word
sulky has quit [Ping timeout: 264 seconds]
dgutierrez1287 has quit [Ping timeout: 244 seconds]
User458764 has joined #ruby
<Ox0dea> iateadonut: You probably don't. Do you know that Hashes can have default values?
<Ox0dea> >> foo = Hash.new(1); foo[:a] += 1; [foo[:a], foo[:b]]
<ruboto> Ox0dea # => [2, 1] (https://eval.in/388042)
langlands has quit [Ping timeout: 255 seconds]
<iateadonut> i'm trying to break down a paragraph and count the number of occurrences of each word.
agent_white has joined #ruby
<iateadonut> so i was going to have a hash like this: words = { :word1=>1 , :word2=>3, ... }
<jhass> iateadonut: don't use symbol keys there, simply use the word as key (as string)
<agent_white> Good moreve folks!
<jhass> and Hash.new(0)
<[k-> you probably do not want symbols here...
<iateadonut> ok. thanks for your patience.
<jhass> counts = Hash.new(0); file.split.uniq.each {|word| counts[word] += 1 }
<agent_white> word1: 1
RegulationD has joined #ruby
<ljarvis> ehm
<ljarvis> .uniq + counting
<ljarvis> isn't going to work out so well
<iateadonut> ha ha
<jhass> right, mindlessly copied their example, my bad
<iateadonut> yes, you're right.
<[k-> I missed that :p
<Ox0dea> >> 'this test is a test'.split.reduce(Hash.new(0)) { |h, w| h[w] += 1; h }
<ruboto> Ox0dea # => {"this"=>1, "test"=>2, "is"=>1, "a"=>1} (https://eval.in/388047)
<ljarvis> Ox0dea: each_with_object
<Ox0dea> Yeah.
<ljarvis> reduce with ; is smell for me
<Ox0dea> So wordy, though.
oo_ has quit [Remote host closed the connection]
<ljarvis> psh
auzty has quit [Quit: Leaving]
<[k-> I like reduce <3
<Ox0dea> I just wish it were called #fold.
<[k-> there is inject...
<mikecmpbll> was minitest taken out of the stdlib in ruby 2.2?
<ljarvis> mikecmpbll: no
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<mikecmpbll> ack, i thought not. i can't find it in the docs
<[k-> submit a alias request!
<iateadonut> what is that extra h at the end?
<ljarvis> ^ see
<iateadonut> h[w] += 1; h } - what does that last h do?
<ljarvis> :D
invite has joined #ruby
<[k-> that is the accumulator
User458764 has joined #ruby
<ljarvis> iateadonut: reduce/inject expect the accumulator to be returned by the block
<[k-> reduce will use the return value of the block
<ljarvis> iateadonut: each_with_object(Hash.new(0)) { |i, h| h[i] += 1 } might make more sense
RegulationD has quit [Ping timeout: 248 seconds]
<[k-> reduce returns the final object, each does not!
<ljarvis> it's a style choice, really. Imo enforcing the return value to the non-expression in a reduce is a code smell and why each_with_object was created
<mikecmpbll> i think it was taken out of stdlib and just bundled with ruby as a gem
<Ox0dea> mikecmpbll: Yes, that's correct.
<ljarvis> mikecmpbll: right, that'd make sense
<mikecmpbll> Ox0dea: ok sweet, cheers.
husanu has quit [Remote host closed the connection]
avril14th has joined #ruby
olistik has quit [Remote host closed the connection]
lolmaus has joined #ruby
lolmaus_ has quit [Ping timeout: 256 seconds]
<shevy> one day the whole of ruby shall become gemified
c-c has left #ruby ["ta!"]
<mikecmpbll> :)
<shevy> just like debian does
<shevy> by removing mkmf by default :D
<[k-> hash.update({ "#{word}", 1 }) { |k, oldv, newv| oldv+newv }
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> [k-: Interpolation for giggles?
<iateadonut> how can i destroy a hash that is already there?
<Ox0dea> iateadonut: Define "destroy".
<ljarvis> iateadonut: destroy in what sense?
<shevy> iateadonut hash = Hash.new; hash = nil
<mikecmpbll> obliterate
ringarin has joined #ruby
<shevy> annihilate!
<iateadonut> thanks.
<[k-> hash.update({ "#{word}" => 1 }) { |k, oldv, newv| oldv+newv }
<apeiros> `kill -9 #$$`
<shevy> lol
<mikecmpbll> lol
<[k-> eliminate
<apeiros> hash will be gone with that. absolutely certain.
<iateadonut> apeiros, that's one way
<Ox0dea> ObjectSpace.each_object(Hash) { |h| h.replace({}) }
<iateadonut> a bit excessive IMHO
<apeiros> hash.clear # empty the array
<shevy> lol that comment is awesome
dionysus69 has joined #ruby
<shevy> you did this on purpose!
<chris2> since when does #@ and #$ work?!?!
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> chris2: before you and I started ruby ;-)
<Ox0dea> chris2: Instance, class, and global variables can be interpolated without brackets.
<shevy> chris2 started when he was 8
<chris2> wow. TIL
<apeiros> s/array/hash/ (though, works for array too)
ruu has quit [Remote host closed the connection]
<Ox0dea> >> "#$$"
<ruboto> Ox0dea # => "22310" (https://eval.in/388051)
<shevy> huh...
<shevy> >> "#$$"
<ruboto> shevy # => "22315" (https://eval.in/388052)
<apeiros> hash = nil # reassign the variable - will not modify the hash, if you have it referenced elsewhere, it'll still be there
<iateadonut> i'm coming here from php. this is really different.
<shevy> iateadonut I see
<apeiros> iateadonut: I don't think it's different, no
<iateadonut> well, how can i do this with an existing hash?
<Ox0dea> Do hwhat?
<apeiros> except for that one case where in php I think you can pass in references to the variable itself
<shevy> iateadonut there are methods such as .update() but you don't really need to worry about terminating any object really
<iateadonut> yeah, i realized what i was doing wrong.
doublemalt_ has joined #ruby
<iateadonut> as far as terminating the object.
<apeiros> iateadonut: how about you show us what you want to do? you know, like with code. because we answered your question and you seem to be still unclear…
<mikecmpbll> manual gc
tkuchiki has quit [Remote host closed the connection]
<apeiros> oh… destroy in the GC sense
<Ox0dea> mikecmpbll: Is there such a thing?
<shevy> you can have fun with the garbage collector like GC.enable or GC.start to some degree, but I have not really had a use case for it myself
* mikecmpbll just guessing
tkuchiki has joined #ruby
<iateadonut> this works: file.split.each_with_object(Hash.new(0)) { |word, words| words[word] += 1; word }
<mikecmpbll> Ox0dea: no clue, i would guess it's possible? my ruby-fu is weak
<apeiros> but that's indeed the same as in php
<shevy> iateadonut \o/
<shevy> but shorter!
<apeiros> iateadonut: php too will GC when nothing references the object anymore. ruby does the same.
<iateadonut> but what if i already have the hash 'words' and i want to run the script to update that hash?
<Ox0dea> mikecmpbll: I was only poking fun; manually collecting garbage tends to be called memory management.
<[k-> 'this test is a test'.split.reduce(Hash.new(0)) { |hash,word| hash.update({ "#{word}" => 1 }) { |k, oldv, newv| oldv+newv }
<[k-> }
<shevy> iateadonut well .update?
_blizzy_ has quit [Ping timeout: 248 seconds]
<[k-> did I do it?
* apeiros lunch time, cya folks
<shevy> may be easiest to try it in irb first
<iateadonut> i'm working in irb
<iateadonut> thanks
<shevy> ok
<chris2> apeiros: its in 1.0 even. wow.
<jhass> iateadonut: then you pass the existing hash to each_with_object
<iateadonut> jhass, this does not seem to work: file.split.each_with_object( words ) { |word, words| words[word] += 1; word }
<iateadonut> words being the hash that already exists
choke has joined #ruby
oo_ has joined #ruby
Karpah has joined #ruby
Iskarlar has joined #ruby
<jhass> iateadonut: "doesn't work" is an empty statement. Detail your expectations and the actual result
tkuchiki has quit [Remote host closed the connection]
sevenseacat has quit [Ping timeout: 264 seconds]
tkuchiki has joined #ruby
<iateadonut> i would think that words would be passed into the loop the same as before. instead i get an error: undefined method `[]' for nil:NilClass
<iateadonut> irb(main):072:0> words
<iateadonut> => nil
<[k-> turrdurrr no code smell
gagrio|bomgar|BJ is now known as gagrio
<ljarvis> please do not use the code [k- just pasted
Karpah is now known as sevenseacat
<[k-> hahaha
<jhass> iateadonut: words is not an existing hash, it's nil
mandarinkin has joined #ruby
<Ox0dea> [k-: You should learn about Object#tap, mate. :)
<[k-> :o!
* [k- tries it right away
CloCkWeRX has quit [Ping timeout: 252 seconds]
<Ox0dea> >> 'this test is a test'.split.reduce(Hash.new(0)) { |h, w| h.tap { |h| h[w] += 1 } }
<ruboto> Ox0dea # => {"this"=>1, "test"=>2, "is"=>1, "a"=>1} (https://eval.in/388086)
<Ox0dea> It's really no better than explicitly returning the accumulator, but it satisfies Rubocop.
<ljarvis> :|
<ljarvis> and each_with_object was wordy
oo_ has quit [Remote host closed the connection]
<iateadonut> brb
oo_ has joined #ruby
shock_one has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<[k-> oh you did it
<[k-> it was a pain to do it in mobile
Muhannad has joined #ruby
soulcake has quit [Quit: Quack.]
shock_one has quit [Remote host closed the connection]
<Ox0dea> I would imagine so.
<Ox0dea> Which keyboard do you use that makes that even remotely tolerable?
soulcake has joined #ruby
Muhannad has quit [Max SendQ exceeded]
<[k-> Google keyboard
<[k-> it's good for general typing
<[k-> but not programming
aapole has quit [Ping timeout: 272 seconds]
<[k-> :p
psy__ has quit [Ping timeout: 256 seconds]
Muhannad has joined #ruby
OrbitalKitten has joined #ruby
<adaedra> who programs on mobile
<Darkwater> Ox0dea, [k-: hacker's keyboard
<Darkwater> similar to stock (ics) keyboard, but for hackers :v
<[k-> elitists
<shevy> adaedra rockstar programmers!
<shevy> and [k-
<shevy> :-)
<Darkwater> I at least use ssh on my phone
<Darkwater> and sometimes I want to show off, or do a little bit of zsh on the go
<shevy> I sing into my phone and have it produce code
<shevy> out came php
sandstrom has quit [Quit: My computer has gone to sleep.]
<Darkwater> you must be a terrible singer
<Darkwater> im sorry
<shevy> ;(
troulouliou_dev has joined #ruby
elia has quit [Ping timeout: 252 seconds]
<[k-> hahahah
Muhannad has quit [Max SendQ exceeded]
<[k-> I can't have 5 rows!
Muhannad has joined #ruby
psy__ has joined #ruby
<shevy> use 6
<Ox0dea> He was referring to Hacker's Keyboard.
<[k-> I can't have > 4
<Darkwater> then set it to 4
endash has joined #ruby
Muhannad has quit [Max SendQ exceeded]
<jhass> or use minuum which has a single :P
Muhannad has joined #ruby
msgodf has joined #ruby
Muhannad has quit [Max SendQ exceeded]
chinmay_dd has joined #ruby
phutchins has joined #ruby
Muhannad has joined #ruby
endash has quit [Ping timeout: 256 seconds]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
konsolebox has joined #ruby
CloCkWeRX has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Muhannad has quit [Max SendQ exceeded]
OrbitalKitten has joined #ruby
Muhannad has joined #ruby
<[k-> phone.dying.good.bye
oo_ has quit [Remote host closed the connection]
startupality has joined #ruby
Al3ks has joined #ruby
oo_ has joined #ruby
<Darkwater> o/
<Darkwater> rip
stamina has joined #ruby
<konsolebox> i haven't noticed this much, but if i cast a return on a File.open block, would the opened file be closed or not?
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Muhannad has quit [Max SendQ exceeded]
phutchins has quit [Ping timeout: 246 seconds]
fabrice31 has quit [Read error: Connection reset by peer]
negev has joined #ruby
Muhannad has joined #ruby
fabrice31 has joined #ruby
<negev> hi, i've built a small rack application and for some reason all POST requests get redirected to GET. this is what i'm doing to run rackup: http://pastebin.com/Jjgu9XZ3 WebApp.call() is never called with a POST request, it's always redirected first.
<ruboto> negev, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/3eb6ed55afb6e0bf90f3
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
giuseppesolinas has quit [Quit: This computer has gone to sleep]
msgodf has quit [Remote host closed the connection]
Muhannad has quit [Max SendQ exceeded]
<Ox0dea> konsolebox: "Cast a return"?
astrobunny has quit [Remote host closed the connection]
Muhannad has joined #ruby
<konsolebox> Ox0dea: if i "execute" a "return" e.g. "return false" inside the block
denver has joined #ruby
<negev> nm fixed it
negev has quit [Client Quit]
<jhass> konsolebox: yes
<Ox0dea> >> def foo; begin; return false; ensure; @ret = :ok; end end; foo; @ret
<ruboto> Ox0dea # => :ok (https://eval.in/388098)
<Ox0dea> konsolebox: ^
commondream has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> Yes, ensure clauses are executed "no matter what".
<konsolebox> so "ensure" blocks return calls as well? i was thinking it's only for exceptions
chinmay_dd has quit [Remote host closed the connection]
<Ox0dea> Nope.
Muhannad has quit [Max SendQ exceeded]
<iateadonut> any o'reilly books you'd recommend i read to get started?
Muhannad has joined #ruby
<konsolebox> Ox0dea: if that's the case thank you,. that's what i needed to know
<iateadonut> i'm trying 'crash course' right now, but the exercise they gave me at the end of chapter 1 i couldn't figure out with just the book.
<iateadonut> and i still don't understand the solution y'all gave.
astrobun_ has joined #ruby
eGGsha has joined #ruby
Rickmasta has joined #ruby
shoutsid has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 256 seconds]
<shevy> just take baby steps in ruby
shoutsid has joined #ruby
<shevy> eventually it'll go "click" in the brain and it all falls together in a consistent and logical manner
<Ox0dea> For the most part. :)
olistik has joined #ruby
Muhannad has quit [Max SendQ exceeded]
chinmay_dd has joined #ruby
Muhannad has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
shoutsid has quit [Client Quit]
chinmay_dd has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
patrickanth0ny has joined #ruby
Muhannad has quit [Max SendQ exceeded]
GPrime has joined #ruby
mdw has joined #ruby
Muhannad has joined #ruby
Iskarlar has joined #ruby
rbowlby has quit [Remote host closed the connection]
shoutsid has joined #ruby
<shevy> yeah
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chinmay_dd has joined #ruby
Muhannad has quit [Max SendQ exceeded]
Muhannad has joined #ruby
j4cknewt has quit [Remote host closed the connection]
<iateadonut> fair enough. upward and onward then.
Iskarlar has quit [Client Quit]
<agent_white> Buddy o' mine from #learnprogramming is writing a gameboy emulator... in haskell. I have no idea wuts goin on.
<iateadonut> (i'll get the ruby cookbook after i'm finished with the rails crash course)
<agent_white> Let me know if you are interested in joining the mumble chat. I'd rather hear from experienced dewds than folks like mahself.
<agent_white> :P
gix has quit [Ping timeout: 256 seconds]
Zai00 has quit [Quit: Zai00]
atomical has joined #ruby
khebbie has joined #ruby
Muhannad has quit [Max SendQ exceeded]
Muhannad has joined #ruby
<shevy> iateadonut it's just like riding on a bicycle, the more code you write, the easier it'll all become; I also came from PHP btw, I even liked PHP more than perl strangely enough
Iskarlar has joined #ruby
withnale_ has quit [Ping timeout: 256 seconds]
Ox0dea has quit [Quit: WeeChat 1.3-dev]
<Darkwater> you saying that broke my brain
Muhannad has quit [Max SendQ exceeded]
lkba_ has joined #ruby
gix has joined #ruby
Muhannad has joined #ruby
bruno- has joined #ruby
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<iateadonut> shevy, i've really liked laravel, and have found out that it borrowed most it's functionality from rails
<iateadonut> so i'm learning ruby - making myself more well-rounded
<agent_white> Well-chiseled"
Muhannad has quit [Max SendQ exceeded]
<agent_white> Rubies are not round, but... ya know...
Muhannad has joined #ruby
<shevy> well rails is a bit different from ruby, in that you may see patterns used that may not be that common outside of rails
<shevy> I don't remember making use of things like :has_many and similar things much at all
lkba has quit [Ping timeout: 264 seconds]
<[k-> no one ever said ew perl
<[k-> all they said was ewwwwww java
<iateadonut> the model relationships were all borrowed in laravel eloquent
rubie has joined #ruby
<[k-> and phone
<[k-> php*
bruno- has quit [Ping timeout: 252 seconds]
senayar has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
zotherstupidguy has quit [Ping timeout: 252 seconds]
senayar has joined #ruby
_blizzy_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<iateadonut> there are basically no competing frameworks in ruby, right? everyone uses rails?
tkuchiki has joined #ruby
<jhass> haha no
Bertg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> sinatra is quite popular for smaller stuff
<iateadonut> crap
<jhass> and many new entries
scripore has joined #ruby
mdw has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
bruno- has joined #ruby
<Darkwater> for big mvc stuff there's rails, for smaller stuff there's sinatra
<Darkwater> I use both appropiately
senayar has quit [Ping timeout: 256 seconds]
<sevenseacat> then theres other newer options like lotus
<sevenseacat> but rails and sinatra are the big two
oo_ has quit [Remote host closed the connection]
ruu has joined #ruby
<ljarvis> lotus is awesome
<sevenseacat> so I've heard
bronson has quit [Remote host closed the connection]
rodferso1 has joined #ruby
<iateadonut> "Just like Jedi Knights build their own lightsabers, I think web developers should build their own personal websites" - "Rails Crash Course"
oo_ has joined #ruby
terlar has quit [Ping timeout: 276 seconds]
<adaedra> \o/
OrbitalKitten has joined #ruby
commondream has quit [Ping timeout: 246 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra> lotus looks interesting
ReD-BoY_ has joined #ruby
ruu has quit [Ping timeout: 248 seconds]
stamina has quit [Quit: WeeChat 1.2]
moeSeth has joined #ruby
tubuliferous_ has joined #ruby
ringarin has quit [Ping timeout: 264 seconds]
bosma has quit [Ping timeout: 248 seconds]
sandstrom has joined #ruby
wildroman2 has joined #ruby
tubuliferous_ has quit [Ping timeout: 272 seconds]
<mikecmpbll> it doesn't look much different to rails
oo_ has quit [Remote host closed the connection]
hiall has joined #ruby
bertro has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mikecmpbll> i like that though, not trying to be different for the sake of it.
<apeiros> chris2: I think that's one of the things it copied from perl
<apeiros> at least I seem to remember that interpolation there worked somewhat similar
<apeiros> damn, almost 20y since I did perl :-S
<adaedra> ahah, you're old
<apeiros> I existed before time, not sure "old" applies :-p
<mikecmpbll> omnipotent!
<bertro> ruby is written in c/perl/ruby for the most part right?
<apeiros> sadly, that's not a property of the apeiron :(
<mikecmpbll> pah.
kies has joined #ruby
<apeiros> bertro: MRI is implemented in C
skade has joined #ruby
<apeiros> and the core libs for MRI are implemented in C too. the stdlib is written in ruby & C
tkuchiki has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
<bertro> and perl serves the purpose of gluing some bits together?
<apeiros> if there's any perl in ruby's source, then I'd assume in build scripts
michael_mbp has joined #ruby
startupality has quit [Quit: startupality]
Xzanron has joined #ruby
<mikecmpbll> i don't see any perl ..
<apeiros> I see some perl
<apeiros> in benchmark and sample
<bertro> i had some pass me by
<apeiros> so no, no perl used in building ruby either.
tkuchiki_ has quit [Ping timeout: 256 seconds]
<mikecmpbll> ah, just wasn't in top 10
ghostpl has quit [Ping timeout: 264 seconds]
rodferso1 is now known as rodfersou
<bertro> could we generalize that besides c and ruby other languages if used aren't used with some serious purpose in mind (the modules could be written in whatever else)
<apeiros> bertro: we can simply say that MRI is written in C.
<apeiros> and if you consider stdlib, then there's also ruby.
DaniG2k has joined #ruby
Bertg has joined #ruby
nofxx has quit [Ping timeout: 264 seconds]
nfk has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoviola has joined #ruby
_blizzy_ has quit [Ping timeout: 248 seconds]
yfeldblum has quit [Ping timeout: 248 seconds]
ndrei has joined #ruby
CloCkWeRX has left #ruby [#ruby]
RegulationD has joined #ruby
astrobun_ has quit [Remote host closed the connection]
hoov has joined #ruby
Versality has quit [Quit: Be back later ...]
sgambino has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
chussenot has quit [Quit: chussenot]
astrobunny has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
phutchins has joined #ruby
<shevy> huh weird... I thought there exists a File.empty? method ...
<shevy> apparently it is File.zero? hmmm
<shevy> apeiros are you familiar with all html5 tags btw? :)
lkba_ has quit [Remote host closed the connection]
<shevy> first time I am seeing <figure> and <figcaption>, wondering whether ruby-cgi should support these too
<apeiros> no, I only know a couple of them yet
ndrei has joined #ruby
lxsameer has quit [Quit: Leaving]
Iskarlar has joined #ruby
SubjectiveBias has quit [Ping timeout: 272 seconds]
senayar has joined #ruby
senayar has joined #ruby
maciejczyzewski has quit [Quit: leaving]
DaniG2k has quit [Ping timeout: 276 seconds]
konsolebox has quit [Remote host closed the connection]
jenrzzz has joined #ruby
otisZart has joined #ruby
<bertro> what motivated the creation of ruby?
<sevenseacat> matz wanted something that made programmers happy.
<flughafen> lsd make programmers happy
ldnunes has joined #ruby
<sevenseacat> lol
<adaedra> Lucy in the sky with diamonds ♪
Versality has joined #ruby
<bertro> hehe
<sevenseacat> nice!
<bertro> maybe to move the main criterion to ~programmer eficacy~
<bertro> as a philosophical shift of paradigm
<bertro> or?
<chris2> apeiros: perl didnt need # at all, tho :)
jenrzzz has quit [Ping timeout: 246 seconds]
bronson has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
<apeiros> chris2: I know. but didn't it have another sigil?
<shevy> bertro there is a great talk from matz about it
<shevy> but it's in japanese english
<chris2> no, just "$foo @bar"
annette has joined #ruby
<[k-> Programmer efficiency? Java is at the bottom of that
<apeiros> chris2: damn, I really don't remember.
<sevenseacat> lolwat
charliesome has joined #ruby
ruu has joined #ruby
<bertro> [k-: java is aimed for manager efficacy lol :D
<shevy> bertro it is a 1 hour video, but only the first ~45 minutes are about the past when matz started out; you will also see pics from when he was younger, he looked like a mini-samurai when he was young: https://www.youtube.com/watch?v=bqWBB8-iEac
<bertro> hehe
<bertro> thank you
<bertro> i'll check it out
<shevy> he explained that "programmer happiness" was not initially an integral part of ruby, as a term, when he started it
terlar has joined #ruby
<shevy> the first design happened on paper :)
bronson has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
ruu has quit [Ping timeout: 248 seconds]
shock_one has joined #ruby
bradgriffin has quit [Quit: Changing server]
eGGsha has quit [Ping timeout: 252 seconds]
kp666 has quit [Ping timeout: 248 seconds]
patrick_star has quit [Quit: Leaving]
OrbitalKitten has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
bradgriffin has joined #ruby
sulky has joined #ruby
sulky has quit [Read error: Connection reset by peer]
neanderslob has quit [Read error: Connection reset by peer]
sinkensabe has quit [Remote host closed the connection]
<mikecmpbll> everytime i have to do something with minitest that i think is going to be difficult, it's pathetically easy <3
arup_r has quit [Remote host closed the connection]
sinkensabe has joined #ruby
roolo_ has joined #ruby
jas02 has joined #ruby
<shevy> try to cook chicken with minitest
<mikecmpbll> shevy: hmm, i'm sure it's possible :D
<shevy> minichicken
<mikecmpbll> haha
krz has joined #ruby
nveselinov has quit [Quit: Connection closed for inactivity]
avril14th has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 252 seconds]
roolo has quit [Ping timeout: 252 seconds]
arup_r has joined #ruby
sankaber has joined #ruby
nateberkopec has joined #ruby
chussenot has joined #ruby
aapole has joined #ruby
otisZart has quit [Read error: Connection reset by peer]
x44x45x41x4E has quit [Ping timeout: 248 seconds]
kstuart has quit [Read error: Connection reset by peer]
kstuart has joined #ruby
jschoolcraft has joined #ruby
Al3ks has quit [Remote host closed the connection]
rodferso1 has joined #ruby
mister_solo has quit [Ping timeout: 272 seconds]
shredding has quit [Ping timeout: 255 seconds]
eGGsha has joined #ruby
eGGsha has quit [Client Quit]
jenrzzz has joined #ruby
maasha has joined #ruby
rodfersou has quit [Ping timeout: 246 seconds]
<ytti> can someone recommend invoicing website for small business?
anne-marie_ has quit [Read error: Connection reset by peer]
<maasha> Anyone have experience executing a ruby script through qsub from within the ruby script?
Papierkorb has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
<jhass> Qsub submits batch jobs to the Sun Grid Engine queuing system.
<jhass> que?
<adaedra> ¿Que?
Zai00 has joined #ruby
<maasha> jhass: yup, but qsub is ugly. I want it abstracted away to you call a ruby script with a few arguments and behind the scene this ruby script is run through qsub.
<maasha> s/to/so
<[k-> Get a shell script then...
<jhass> alias ?
<maasha> And I dont want to maintain multiple scripts to run a command.
<jhass> well I guess you could check ARGV and submit and call exit in one case and don't in the other
<shevy> maasha the way I solve such usually; I have one main .rb file, with methods, which will call different classes that do the specific job at hand. that way I can avoid having to use shell scripts, every action is registered somewhere (usually through said method call, towards a class)
aspiers has joined #ruby
<maasha> shevy: can you show a demo?
<jhass> but meh
<shevy> maasha hmm let me think of a good example... a moment
TheHodge has quit [Quit: Connection closed for inactivity]
chussenot has quit [Quit: chussenot]
<maloik> Does anyone here run an app that uses elasticsearch with the possibility to search across different models? I'm wondering if you could explain briefly how it's all set up (different indexes? nested objects? elasticsearch-ruby and custom code or another gem?), and if you have any tips on where to get started other than ES docs and the gem's docs
Xeago has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
<shevy> maasha ok this is contrived, and not an ideal example but you get the general idea http://pastie.org/10260134 - that method just merges together different exam-results, into a new .pdf file; from the commandline I would invoke it via "prepare_exams"
k3asd` has quit [Ping timeout: 244 seconds]
rodferso1 is now known as rodfersou
<shevy> (there was only one .pdf file in the respective directory at hand, hence the .first)
Al3ks has joined #ruby
<shevy> that's by the way one reason why I end up with so many aliases, every task gets registered :)
senayar has quit [Remote host closed the connection]
maciejczyzewski has joined #ruby
<[k-> you have a typo
Xzanron has quit [Ping timeout: 264 seconds]
sinkensabe has joined #ruby
<adaedra> yaeh, you haev a tyop
<[k-> also, .store_at store_here isn't idiomatic
<maasha> shevy: and how does the .run method work?
<maciejczyzewski> what's new? folks ;)
<[k-> should be store_at this_dir instead
<shevy> that is also a reason why I don't seem to need rake at all, I just call the respective actions from the commandline
<jhass> maciejczyzewski: you
<shevy> maasha ah that is just my general way to invoke my classes, it's nothing special. you could do things differently, the main point is that I don't necessarily need to have individual shell files (or .rb files), I just re-use general classes in ruby; in this case, it's really nothing more than using ghostscript
<shevy> though I'd love to know how to do this in prawn, haven't tried yet
sinkensabe has quit [Remote host closed the connection]
<[k-> you should get auto aliasing like what gems with cli do
<maciejczyzewski> jhass: aaawwww... in ruby world
<shevy> auto aliasing?
<[k-> or not auto aliasing
astrobunny has quit [Remote host closed the connection]
<jhass> maciejczyzewski: I guess the answer stays the same ;P
<shevy> what happens when conflict-names exist?
<[k-> their executables are linked and searched for!
n008f4g_ has quit [Ping timeout: 252 seconds]
bradgriffin has quit [Quit: leaving]
Xeago has joined #ruby
aapole has quit [Ping timeout: 264 seconds]
<maasha> shevy: right, thanks
<shevy> ah, I don't have that many bin/name.rb or bin/name specific files for ruby projects, usually only one central main bin/ file to use a given project
astrobunny has joined #ruby
<shevy> maasha anyway, you wrote "dont want to maintain multiple scripts to run a command" and that was the reason I suggested the above; you can register methods in a .rb file, and just call that; the method delegates to any class or other .rb file at hand, which then goes to solve the problem at hand that you may have
<shevy> you can call a specific method in a .rb file via "-e"; I use a general method call for that, "rinvoke"
<shevy> which is essentially just a ruby -r blablabla.rb -e NAME_OF_METHOD_HERE (the last part I can type on bash, or use that specific alias at hand)
chouhoulis has joined #ruby
<agent_white> Ooo...
<agent_white> That's pinky-up fancy.
wildroman2 has quit [Remote host closed the connection]
<[k-> you can also get a list of commands using `self.class.instance_methods - Object.instance_methods`!
griffindy has joined #ruby
Xeago has quit [Remote host closed the connection]
<[k-> "commands" as in methods :/
sulky has joined #ruby
meph has joined #ruby
scripore has joined #ruby
Ox0dea has joined #ruby
Xeago has joined #ruby
<shevy> cool I just checked if prawn can merge .pdf files
TheHodge has joined #ruby
<shevy> I found a clumsy old script from 2012; not sure if it works but it might work https://gist.github.com/shevegen/3afb736add4e1148d41a
solars has quit [Quit: WeeChat 0.4.2]
<Ox0dea> I genuinely believe Float#times should exist, irrespective of its non-deterministicism.
invite has quit [Ping timeout: 248 seconds]
<agent_white> Commands as in spoken by Thor garnished in white robes contruing plants to abolish the Kraken.
eGGsha has joined #ruby
tubuliferous_ has joined #ruby
<agent_white> s/plants/plans/ ... though my bonzai tree could be a worthy opponent.
* agent_white checks watch, falls asleep standing
<Ox0dea> agent_white: And "contruing"?
Xzanron has joined #ruby
maciejczyzewski has quit [Ping timeout: 250 seconds]
<agent_white> Ox0dea: Exactly!
<agent_white> Ox0dea: ... my fingers are not working at this hour, apparently. :(
<agent_white> Rather my mind.
chussenot has joined #ruby
senayar has joined #ruby
sinkensabe has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Beoran__ has joined #ruby
<[k-> construing?
tubuliferous_ has quit [Ping timeout: 264 seconds]
kies has quit [Ping timeout: 264 seconds]
atom3 has quit [Ping timeout: 275 seconds]
swills has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<shevy> agent_white dudes in white robes construct plants? is that why you are an agent... of botany?
sinkensabe has joined #ruby
<[k-> dun dun duuuuuuun
atom3 has joined #ruby
commondream has joined #ruby
soulcake has quit [Ping timeout: 276 seconds]
<[k-> identity exposed!
soulcake has joined #ruby
<agent_white> shevy: I wish. I think I killed my bonzai tree :(
Beoran_ has quit [Ping timeout: 265 seconds]
transiency has quit [Ping timeout: 252 seconds]
<diegoviola> curl: (51) SSL: no alternative certificate subject name matches target host name 'demo360.neoassist.com'
t_ has joined #ruby
<diegoviola> I'm getting this when I'm trying to curl some json file
<diegoviola> any ideas?
<diegoviola> I get this from ruby too
havenwood has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
DaniG2k has joined #ruby
<yorickpeterse> looks like a broken SSL certificate
<diegoviola> yorickpeterse: I don't get that when trying to access the file from firefox
ruu has joined #ruby
theery has joined #ruby
Iskarlar has joined #ruby
BTRE has quit [Quit: Leaving]
scripore has joined #ruby
commondream has quit [Ping timeout: 255 seconds]
RegulationD has joined #ruby
tlarevo has joined #ruby
<jhass> diegoviola: maybe your FF uses a proxy that changes how the host reacts or is resolved?
<jhass> anyway, unreachable from here so can't debug
<diegoviola> jhass: I'm not using any proxy on firefox
invite has joined #ruby
Ox0dea has left #ruby ["WeeChat 1.3-dev"]
tlarevo has quit [Client Quit]
<yorickpeterse> diegoviola: different browsers can use different certificate chains
<jhass> it's not a signature validation error
<diegoviola> right
<yorickpeterse> of which some might consider this certificate valid while others might not
<jhass> it's a subject mismatch
theery has quit [Remote host closed the connection]
<yorickpeterse> oh hm
<jhass> diegoviola: maybe your curl (or rather your openssl) is ancient and doesn't do SNI?
thelastinuit has joined #ruby
ruu has quit [Ping timeout: 252 seconds]
x44x45x41x4E has joined #ruby
<jhass> wat
<jhass> that it responds at all to a TLS session on port 80 is...
<diegoviola> jhass: I doubt that's the case, the ancient comment
<diegoviola> this was working yesterday, they messed something up
<jhass> you're the only one who can verify
<jhass> but wth port 80?
<diegoviola> I have no idea about that
RegulationD has quit [Ping timeout: 265 seconds]
<diegoviola> it's a web server that responds with json data, normally that would be on port 80, no? or what are you referring to?
<jhass> no it wouldn't
<jhass> http default port is 80
<jhass> https default port is 443
<diegoviola> you're right
davedev24_ has quit [Remote host closed the connection]
<diegoviola> I get the same cert error when I hit it with :443
hiall has quit [Ping timeout: 252 seconds]
<diegoviola> I'll bother my coworkers about it
hiall has joined #ruby
pandaant has quit [Remote host closed the connection]
NeverDie has joined #ruby
<diegoviola> ty
riotjones has quit [Remote host closed the connection]
revoohc has joined #ruby
riotjones has joined #ruby
B1n4r10 has joined #ruby
xKraty has joined #ruby
Xiti` has joined #ruby
Soda has joined #ruby
codecop has quit [Remote host closed the connection]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xiti has quit [Ping timeout: 252 seconds]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubuliferous_ has joined #ruby
santana has joined #ruby
Iskarlar has joined #ruby
startupality has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
Al3ks has quit [Remote host closed the connection]
sphex has quit [Ping timeout: 252 seconds]
sphex has joined #ruby
chinmay_dd has joined #ruby
solars has joined #ruby
jlast has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
michael_mbp has quit [Excess Flood]
Oldenborg has joined #ruby
cpruitt has joined #ruby
jenrzzz has joined #ruby
serivich has quit [Ping timeout: 248 seconds]
michael_mbp has joined #ruby
fabrice31 has joined #ruby
wildroman2 has joined #ruby
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
Miphix has joined #ruby
towski_ has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
fabrice31 has quit [Remote host closed the connection]
santana has quit [Ping timeout: 256 seconds]
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
fabrice31 has joined #ruby
malconis has joined #ruby
centrx has joined #ruby
Voker57 has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
ohgm has joined #ruby
ledestin_ has joined #ruby
towski_ has quit [Ping timeout: 252 seconds]
ledestin has quit [Read error: Connection reset by peer]
gagrio_ has joined #ruby
jzigmund has joined #ruby
speakingcode has quit [Ping timeout: 246 seconds]
jzigmund_ has quit [Read error: Connection reset by peer]
rubie has joined #ruby
msnyon has joined #ruby
Xeago has quit [Remote host closed the connection]
gagrio has quit [Read error: Connection reset by peer]
sandstro_ has joined #ruby
acke has quit [Ping timeout: 246 seconds]
moeSeth has quit [Quit: Connection closed for inactivity]
Xeago has joined #ruby
diegoviola is now known as dviola
vondruch has quit [Ping timeout: 276 seconds]
wildroman2 has quit [Remote host closed the connection]
gagrio_ has quit [Ping timeout: 246 seconds]
jzigmund has quit [Ping timeout: 244 seconds]
hector__ has joined #ruby
sandstrom has quit [Ping timeout: 255 seconds]
rubie has quit [Ping timeout: 265 seconds]
jerius has joined #ruby
jzigmund has joined #ruby
* flughafen is leaving, havve a good one
acke has joined #ruby
<shevy> flughafen stay in Berlin man, it needs you!
<flughafen> scotland needs planes too
Xeago has quit [Ping timeout: 252 seconds]
Voker57 has quit [Ping timeout: 248 seconds]
Rickmasta has joined #ruby
<agent_white> And whoever was in Greece shevy spoke of... bring us falafels.
<agent_white> Plz.
<[k-> but your a airport
dblessing has joined #ruby
ziprar has quit [Ping timeout: 255 seconds]
t0rrieri has joined #ruby
blue_deref has joined #ruby
Tau has joined #ruby
djellemah_ has joined #ruby
lolmaus has quit [Remote host closed the connection]
t0rrieri has quit [Client Quit]
lolmaus has joined #ruby
vondruch has joined #ruby
djellemah has quit [Disconnected by services]
djellemah_ is now known as djellemah
senayar has quit [Remote host closed the connection]
<shevy> flughafen scotland needs more ruby
<shevy> I never saw a ruby coding scot
serivich has joined #ruby
kallisti5 has quit [Quit: leaving]
<Tau> how many ' ' spaces should i use in ruby programs?
ItSANgo has joined #ruby
<Tau> i have been using four spaces as i usually use with python.
endash has joined #ruby
<[k-> 2
<agent_white> Tau: 2 space indentation is the coding standard for Ruby.
hinbody has joined #ruby
<Tau> i see.
<Tau> i honestly prefer four..
<Tau> it lets the code look better.
<Tau> to me.
<ljarvis> Tau: then use 4
<agent_white> Well... as long as you don't use tabs we can be friends.
commondream has joined #ruby
<Tau> agent_white heh. okay.
devdazed has joined #ruby
<agent_white> ;)
mary5030 has joined #ruby
Oldenborg has quit [Remote host closed the connection]
arup_r has quit []
mary5030 has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
gagrio_ has joined #ruby
mary5030 has joined #ruby
senayar has joined #ruby
ohgm has quit [Quit: Leaving]
startupality has quit [Read error: Connection reset by peer]
<[k-> shevy, adaedra requests for your presence in #ruby-offtopic
<adaedra> no I didn't
startupality has joined #ruby
<[k-> lies
<shevy> do we have to get married if I go there
<[k-> if you want
<shevy> also they play unicode hangman there and I can not read it :(
andywojo has joined #ruby
<[k-> <adaedra> [k-: shevy, I know it's you
<adaedra> wut
<agent_white> shevy: BATCH dun yew play run-round wif me.
<shevy> hahaha
* agent_white snaps fingers, wobbles head
<[k-> he can't see the blanks :(
<shevy> [k- has become a brother to me, despite the weird nick
bronson has joined #ruby
<agent_white> [k-: EY GURRRL
<[k-> :>
datanoise has joined #ruby
<shevy> I am stuck in reviewing some code.. my own ruby code... old code ... which is boring. someone cheer me up
astrobunny has quit [Remote host closed the connection]
skyrocker has joined #ruby
<andywojo> Anyone know what the right approach would be to write a method that creates a key=>val pair out of commands that have close (enough) collumns like df -m
<[k-> shevy, switch to DejaVu!
Voker57 has joined #ruby
<havenwood> shevy: It's Friday!
skyrocker has left #ruby [#ruby]
Xeago has joined #ruby
stan_ has joined #ruby
stan_ is now known as Guest13534
<andywojo> I could split by white space, and then loop through the array to determine where the header is placed, and then figure out where the value is
dfockler has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
<agent_white> havenwood: Is it 5 o'clock yet?!
<dviola> It's funny and weird at the same time how my boss screams "HE USES LINUX!" to the other developers
<dviola> referring to me
<havenwood> agent_white: Soon enough I can taste it, but yeah closer to the AM 5 here.
ruu has joined #ruby
<[k-> it's GNU/Linux and not Linux!
<adaedra> andywojo: like that? ["/dev/disk0s2", "190683", "42317", "148116", "23%", "10897194", "37917756", "22%", "/"]
<agent_white> havenwood: nearly 8am here. Did I break the rules? /me burps and stumbles
<dviola> [k-: lol
<adaedra> ah wait, this is single line
<iateadonut> shevy, see how much you've grown since you wrote that pile of crap!
<havenwood> agent_white: It's 5 o'clock somewhere!
<andywojo> but with the headers. Basically I'm writing a script a script to parse df -m from both AIX and Linux.. the free column is in $3 on AIX and $4 on Linux
<[k-> it's 10pm here!
scripore has quit [Quit: This computer has gone to sleep]
<[k-> it's GNU/Linux and not Linux!
<andywojo> but they are both the free space, if I just had a bobo method to parse any header => value from a string that'd be awesome
bronson has quit [Ping timeout: 255 seconds]
RegulationD has joined #ruby
<andywojo> Eff RMS :)
<iateadonut> yeah. he should say, "His set of POSIX-compliant tools use the linux kernel!"
<[k-> they wrote a bot on reddit
<[k-> but it got banned
<adaedra> andywojo: better? {"Filesystem"=>"/dev/disk0s2", "1M-blocks"=>"190683", "Used"=>"42317", "Available"=>"148116", "Capacity"=>"23%", "iused"=>"10897193", "ifree"=>"37917757", "%iused"=>"22%", "Mounted"=>"/", "on"=>nil}
axl_ has joined #ruby
<[k-> hehehe, it corrected Linux
<andywojo> that's perfect!
<adaedra> meh, mounted on got split
<agent_white> havenwood: Amen! /me adds whiskey to his coffee
datanoise has quit [Ping timeout: 244 seconds]
<adaedra> andywojo: hope you don't get columns with space in their name
<andywojo> Nah that's fine, I can handle that
<andywojo> Just kinda wasn't sure what direction to go on doing it
khebbie has joined #ruby
<adaedra> andywojo: read the first line, split in pieces to get an array of column. Then, for each line, do the same, use Array#zip and Array#to_h to get the Hash
dfockler has quit [Ping timeout: 255 seconds]
<andywojo> thanks!
<iateadonut> singapore! that's a great city-state!
<[k-> yes!
<andywojo> Learn something new every day, never used .zip before.
poguez_ has joined #ruby
<iateadonut> I'd say it's the best in the world, but I can't think of anything to compare it to
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra> andywojo: :)
maasha has quit [Ping timeout: 246 seconds]
<[k-> I think Ruby inherited zip from functional languages
<iateadonut> Jane Jacobs compared it to Seoul and Taipei, though.
ruu has quit [Ping timeout: 250 seconds]
allomov has quit [Remote host closed the connection]
ledestin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest13534 is now known as StanAlanMcM
Iskarlar has joined #ruby
annette has quit [Quit: annette]
RegulationD has quit [Ping timeout: 276 seconds]
coderhs has joined #ruby
tagrudev has quit [Remote host closed the connection]
mistnim has joined #ruby
coderhs has quit [Client Quit]
pengin has joined #ruby
<mistnim> can I somehow use python libraries in ruby?
<apeiros> mistnim: short answer: no
<adaedra> long answer: nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
<jhass> mistnim: long answer: you can shell out to python. But don't, seek native alternatives
<adaedra> :p
<jhass> meh
Xeago has quit [Remote host closed the connection]
rbowlby has joined #ruby
<apeiros> well, my long answer would be: isn't there a ruby implementation in python? and/or other way round?
<andywojo> I used a native alternative it was a gem that allowed you to use python code .. it was horrible
<apeiros> also python on jvm - if it exists - might be a way to get there
<havenwood> Jython
<apeiros> iow, there might be ways. but it's almost certainly pain.
<apeiros> hence - short answer: no.
StanAlanMcM has quit [Ping timeout: 256 seconds]
shock_one has quit [Remote host closed the connection]
<havenwood> Topaz in RPython
shock_one has joined #ruby
Xeago has joined #ruby
<havenwood> I've ported a little bit of Python to Ruby but never run any in Ruby.
<[k-> RuPy hasnt come up with a solution yet? :>
ducklobster has joined #ruby
<havenwood> Didn't _why have something fun along those lines?
rocknrollmarc has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bougyman> it's pretty easy to plug ipython in to ruby
<bougyman> ipython is what I'd recommend, for this.
<havenwood> ffi
<bougyman> saw a great talk at rubyconf from a guy who used ipython to get numpy/scipy functionality in ruby
<agent_white> havenwood: Unholy?
<havenwood> agent_white: aye, that's it!
<agent_white> :D
<havenwood> bougyman: nice
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gwendall has joined #ruby
charliesome has quit [Quit: zzz]
tvw has quit [Remote host closed the connection]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arturaz has quit [Ping timeout: 248 seconds]
shock_one has quit [Ping timeout: 252 seconds]
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
rbennacer has joined #ruby
malconis has joined #ruby
freerobby has joined #ruby
pengin has quit [Remote host closed the connection]
crazydiamond has quit [Remote host closed the connection]
findaway has joined #ruby
Iskarlar has joined #ruby
Yiota has joined #ruby
_blizzy_ has joined #ruby
rocknrol_ has joined #ruby
rjno has joined #ruby
dopie has joined #ruby
Pumukel has quit [Ping timeout: 246 seconds]
<dviola> why some people still insist we format our code in 80x24?
rocknrol_ has quit [Client Quit]
ixti has joined #ruby
<[k-> you mean 80cols?
<dviola> y
<[k-> so it is easy to read at a glance ^^
<adaedra> ^
Channel6 has joined #ruby
<[k-> I don't follow that tho
<mozzarella> 120 columns is better
<adaedra> I prefer navigating in a code file up to bottom only, not having to add left to right
<dviola> most terminal emulators default to this size
<dviola> 80x24
<adaedra> yup
<dviola> if you echo $COLUMNS and $LINES you can see it
<jhass> I'm in the 120 camp too
<mozzarella> you can fit two of them on a 1920x* display and one of them on a 1024x* display
jpfuentes2 has joined #ruby
<adaedra> mozzarella: depends on the font size :p
<mozzarella> 80 was good for old terminals
<jhass> although that's pretty much my hard break, my ruby stays below 70 for a long time
<mozzarella> but now it's just too small
<adaedra> meh
<dviola> mozzarella: termite defaults to 80, and termite is new
<mozzarella> I mean physical terminals, machines
<mozzarella> not emulators
<dviola> ok
<[k-> they don't want to piss off people!
<dviola> I don't think I ever used a real terminal then
<dviola> physical terminals
<dviola> what were they like?
<dviola> nice
<dviola> no, I never used anything like this
<[k-> I need to comb my hair more often
<dviola> mozzarella: that terminal uses 80 columns?
<agent_white> Yessur.
<dviola> I see
<[k-> is that sexy or what
rbowlby has quit [Remote host closed the connection]
vipaca has joined #ruby
<adaedra> no, but Stallman is http://rms.sexy
<[k-> o....k
juanpaucar has joined #ruby
konsolebox has joined #ruby
xKraty has quit [Remote host closed the connection]
<adaedra>
<agent_white> box
senayar has quit [Remote host closed the connection]
mfranzwa has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
<agent_white> Poor RMS, unaware velcro is not open-source.
<agent_white> DEM REEBAWKS
theery has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
senayar has joined #ruby
_blizzy_ has joined #ruby
theery has quit [Remote host closed the connection]
micmus has quit [Ping timeout: 256 seconds]
<mozzarella> I wouldn't be able to concentrate, using my computer everywhere like he does
<mozzarella> I need to be in my own room
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andywojo has quit [Ping timeout: 265 seconds]
<[k-> Zen
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sandstro_ has quit [Remote host closed the connection]
allomov has joined #ruby
Iskarlar has joined #ruby
<dviola> adaedra: that looks like cool-retro-term
<wnd> I know this comes a bit late, but I prefer 80 columns because imo short lines make code easier to read - and to a degree help to keep the code easy to read
<[k-> that much is true
fmcgeough has joined #ruby
<[k-> but nothing is ever late in irc!
OrbitalKitten has joined #ruby
<adaedra> dviola: oooh
downwithbender has joined #ruby
Bertg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bf4 has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
sandstrom has joined #ruby
bf4 has quit [Client Quit]
downwithbender has quit [Client Quit]
serivich has quit [Ping timeout: 255 seconds]
bf4 has joined #ruby
decoponio has joined #ruby
hoov has quit [Ping timeout: 264 seconds]
<wnd> 80 cols didn't bother me (much) even with 8 col tabulators and c code
chussenot has quit [Quit: chussenot]
<dviola> wnd: it doesn't bother me at all also
<[k-> eww tabs
datanoise has joined #ruby
serivich has joined #ruby
OrbitalKitten has quit [Ping timeout: 264 seconds]
peter_paule has joined #ruby
<dviola> I wonder how to break down long strings and make it fit into 80 columns
<dviola> in JS
<dviola> sorry this might be offtopic now
<wnd> I still get shivers when I think of that production java code from ten years back. it was badly indented with two spaces, and much of the time nested more than ten levels deep. supposedly complex logic behind the if caluses and other structured, but really, it was just horrible code.
Bertg has joined #ruby
d10n-work has joined #ruby
<adaedra> ?ot dviola
<ruboto> dviola, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
nonparfumee has joined #ruby
doublemalt_ has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
phat4life has quit [Ping timeout: 248 seconds]
micmus has joined #ruby
t0rrieri has joined #ruby
phat4life has joined #ruby
nickfausnight has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k-> divola, Ruby has \
<centrx> dviola, Use jQuery
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dviola> centrx: I already use that
andywojo has joined #ruby
<centrx> But do you use it to the Extreme?
enebo has joined #ruby
crazydiamond has joined #ruby
<dviola> what does that even means?
<centrx> Do you use it, To the Max?
<dviola> I don't know what you are talking about
<adaedra> jQuery
bkxd has quit [Ping timeout: 250 seconds]
<dviola> what about it?
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<centrx> How do you use it?
casadei has joined #ruby
<[k-> do you use it concisely and idiomatically?
gambl0re has joined #ruby
<dviola> I don't know what you mean
schy has joined #ruby
<dviola> I'm not a big JS person
chussenot has joined #ruby
<dviola> I wish we had another way to manipulate the DOM other than with JS
<[k-> you can do it with dart
dudedudeman has joined #ruby
<bougyman> this is still offtopic
<[k-> or c++, when webassembly arrives
<[k-> oh don't be so strict
peter_paule has quit [Ping timeout: 256 seconds]
dudedudeman has quit [Changing host]
dudedudeman has joined #ruby
andywojo has quit [Ping timeout: 272 seconds]
<dviola> sorry about offtopic
<[k-> you can write in Ruby(?) too using opal
Muhannad has quit [Ping timeout: 246 seconds]
_joliv has joined #ruby
andywojo has joined #ruby
shock_one has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
alex88 has quit []
arutemu has quit [Read error: Connection reset by peer]
kies has joined #ruby
<shevy> iateadonut it's actually not a total pile of crap, it has solid elements; it just is that it has not been thoroughly tested. I really need to test a lot more than I used to
<shevy> it's like half-crap
ruu has joined #ruby
Indian has joined #ruby
<Indian> what is the difference between self and @
<jhass> Indian: self returns the object, @ is the prefix for instance variables, it's still part of their name though
startupality has quit [Read error: Connection reset by peer]
<adaedra> @ is a prefix for instance variable, alone it does nothing
troulouliou_dev has quit [Remote host closed the connection]
startupality has joined #ruby
<Indian> I see sometimes self.x and @x
n008f4g_ has joined #ruby
<Indian> both refering to instance variables
<sevenseacat> the former does not refer to an instance variable
<jhass> self.x calls the method x which is in your case probably defined as def x; @x; end;
<[k-> or attr_reader :x or attr_accessor :x
<havenwood> Indian: `@x` avoids the method call and makes it clear that nothing beyond getting the instance variable is going on.
RegulationD has joined #ruby
<[k-> we prefer @x
<Indian> ok thanks
<_joliv> Hey, can anyone point me to good resources for debugging a segfault in Ruby? We've been having them in a couple of projects for a while and I'm still trying to find the cause
<jhass> [k-: attr_reader does pretty much exactly generate that code
<sevenseacat> we dont prefer @x over using the attr methods, no
troulouliou_dev has joined #ruby
<[k-> no, it is optimised jhass
terlar has quit [Ping timeout: 265 seconds]
chouhoulis has joined #ruby
OrbitalKitten has joined #ruby
<centrx> It's not that big of a deal
ruu has quit [Ping timeout: 264 seconds]
<centrx> However, a grudge match can be scheduled
terlar has joined #ruby
<[k-> sevenseacat what do you mean?
scripore has joined #ruby
<sevenseacat> [k-: its called information encapsulation
<[k-> you mean private self.x?
<sevenseacat> err, no
<adaedra> is Encapsulation in this channel just so we can tab-complete this complex word?
<Encapsulation> they talk about encapsulation so mch
<Encapsulation> in here
<sevenseacat> lol
<adaedra> :)
<Encapsulation> =D
davedev24_ has joined #ruby
<sevenseacat> i love when textual randomly highlights words that match people's names
<adaedra> ^
kies has quit [Ping timeout: 248 seconds]
<jhass> hey Encapsulation how are your friends super and forgot doing?
rbennacer has quit [Remote host closed the connection]
Yiota has joined #ruby
<sevenseacat> g gets highlighted a lot
OrbitalKitten has quit [Client Quit]
<havenwood> ha
<Encapsulation> xD
<adaedra> The g spot, everyone aims for it
<sevenseacat> oh hello
B1n4r10 has joined #ruby
<[k-> I still don't get what do you mean tho
<sevenseacat> and y'all miss it D:
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Jiks has joined #ruby
<Jiks> Hello
<havenwood> Jiks: hi
<Jiks> Just trying out irssi!
<adaedra> It doesn't work
volty has joined #ruby
<Jiks> IRC is such a great tool right!
rbennacer has joined #ruby
<Jiks> Why not?
<adaedra> We can't see what you're writing!
<adaedra> See, I can't read "IRC is such a great tool right!"
<Jiks> I wish to be in commandline if I can.
<adaedra> :p
<Jiks> Oh really? :(
<wasamasa> much oldschool
Aswebb_ has quit []
<jhass> adaedra: you're such a welcoming part of the community
Indian has quit [Ping timeout: 272 seconds]
<jhass> Jiks: think about it, how did adaedra copy paste that
<Jiks> jhass: I was simply pulling her leg ;)
Indian has joined #ruby
Indian has quit [Changing host]
Indian has joined #ruby
<Jiks> Anyways, thanks for the support :)
<adaedra> jhass: :(
rubie has joined #ruby
<adaedra> “her” :|
<Jiks> Anyone here tried mruby?
<Jiks> adaedra: ;)
<havenwood> Jiks: yup
<sevenseacat> presumptions of gender are always fun
<adaedra> Jiks: :)
<shevy> cats are neutral gender
<[k-> Jiks?
<Jiks> I heard of a project in a newsletter; its related to Postgres: https://github.com/franckverrot/holycorn
pithagora has joined #ruby
<shevy> Jiks there are some C-gurus here who used it; IceDragon for instance
<Jiks> Can anyone tell me what its supposed to do?
<shevy> and I think a few more, don't remember their nicks right now
<shevy> I mean mruby
<pithagora> hi all. how can i get the maximum IP from such an array https://gist.github.com/vbrinza/d8b4a20cd65d516d4bdc ?
senayar has quit [Remote host closed the connection]
<shevy> no idea about "holycorn" (what name is that ... is that the offspring of "holycown"... if cows eat corn that is...)
<jhass> pithagora: map to IPAddr and .max I guess
fabrice31 has quit [Remote host closed the connection]
<Jiks> :p
<[k-> there's such a thing as max for ips?
<Jiks> Anyone using irssi here?
<shevy> I wanted to write 'cow' :(
<adaedra> mooo
<shevy> adaedra yeah thank you for the acustic help :)
<[k-> ?ot everyone
<ruboto> everyone, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<pithagora> i need to increment by 1 the last ip and use it
<jhass> ips.map {|ip| IPAddr.new(ip) }.max #=> #<IPAddr: IPv4:192.168.99.100/255.255.255.255>
<shevy> [k- holycorn is totally ruby, haven't you guessed from the name alone?
<ytti> IPAddr is hella expensive :(
<[k-> no
<shevy> we also have uni-corn... the single corn gem
OrbitalKitten has joined #ruby
<[k-> unicorn!
<havenwood> Jiks: The name seems derived from multicorn in python.
jahrichie has joined #ruby
acke has quit [Remote host closed the connection]
<shevy> what... there really exists a project called "multicorn"??
<adaedra> why not?
<[k-> if ipaddr is expensive, you could add all the numbers together to derive a max
jahrichie has quit [Client Quit]
<adaedra> !
<shevy> ohhh... postgre http://multicorn.org/
<havenwood> Jiks: So like Postgres has a JSON foreign data wrapper now, etc, this lets you add Ruby Objects.
<shevy> python, not ruby :(
<bougyman> multicorn is pretty popular.
<Jiks> havenwood: But can you explain what is a FDW?
<shevy> [k- btw look at the logo on that site :D
<[k-> isn't that forward?
<bougyman> in PG a foreign data wrapper allows you to access different data sources.
<[k-> which site? I haven't been clicking
sinkensabe has quit [Remote host closed the connection]
<bougyman> imap, ldap, other postgres, mysql, hadoop, anything.
<shevy> http://multicorn.org/ it's a mutant unicorn
<Jiks> Is it like a conceptual table, that is linked with a Ruby script? So that upon executing queries it computes the value.
<havenwood> Jiks: a standard way that pg handles remote access to data - like file wrappers, db wrappers, etc
<bougyman> it's a way to use postgres as a federated database.
<[k-> multihorn*
Tau has quit [Remote host closed the connection]
<Jiks> Okay, I think I got excited for the wrong reason seeing the project ;)
OrbitalKitten has quit [Client Quit]
<havenwood> Jiks: search for PostgreSQL Foreign Data Wrappers
<Jiks> Thanks guys!
<bougyman> havenwood: JSON is not a foreign data wrapper.
<bougyman> it's a first class type in postgres.
<bougyman> as is jsonb
DaniG2k has quit [Quit: leaving]
<bougyman> (in newer postgres)
<havenwood> right, that added it
<Jiks> I tried, but didn't quite get what they said.
<havenwood> they*
<havenwood> bougyman: Just thought it was a nice example because JavaScript Object Notation.
<Jiks> It seems it has to do with abstracting federated DBs, right?
<bougyman> yes.
<bougyman> it is postgres' method of federation.
eggoez has quit [Ping timeout: 256 seconds]
senayar has joined #ruby
<Jiks> Yup! Thanks!
<Jiks> Hey, anyone here tried Crystal?
<havenwood> ?crystal
<ruboto> I don't know anything about crystal
<ljarvis> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
<havenwood> Jiks: Yup!
<havenwood> Jiks: There are several crystalline entities here.
<Jiks> havenwood: what do you feel?
<havenwood> (Is that what you call a crystal programmer?)
<Jiks> ruboto: Well, thats my question.
<jhass> havenwood: I think haven't decided yet :P
<Jiks> havenwood: how stable do you think it is now?
<jhass> I like the sound of crystalist though :P
<Jiks> Is it anywhere near to 1.0?
maciejczyzewski has joined #ruby
<[k-> someone called it crystallite
<pithagora> @jhass thanks it works
<havenwood> Jiks: It's quite natural syntax for a Rubyist. The standard library is modern and useful. It's fast and easy to deploy.
<[k-> chrysalis...
OrbitalKitten has joined #ruby
<jhass> Jiks: personal hobby project stable, ymmv on internal tool stable, I wouldn't call it consumer product stable
renderful has joined #ruby
<havenwood> jhass: I like: crystalline entity :P
<Jiks> I think they named the packing format something else?
gambl0re has quit [Ping timeout: 264 seconds]
<havenwood> jhass: crystalist is pretty good
<Jiks> Think calling them crystals would have been cute ;)
<jhass> Jiks: we'll probably call the manager shards and the libraries shard
<Jiks> What does it mean?
<havenwood> shards will install the crack shard
<havenwood> for example
<jhass> *cough* cake
<jhass> you meant cake
sargas has joined #ruby
<havenwood> ah, cake, yes
segfalt has joined #ruby
gambl0re has joined #ruby
<havenwood> shards will install the cake shard
<Jiks> Something silly; but I just discovered a way to run in my old shared server.
s2013 has joined #ruby
<shevy> [k- hey is crystal offtopic here?
<Jiks> Which practically only supported PHP.
kloeri has joined #ruby
* [k- takes a moment to consider
<shevy> Jiks noooo come to ruby man :(
<shevy> don't let the snakes take over the world
<[k-> well if jhass permits it...
<Jiks> I just did a exec call in PHP page and called a Ruby script. It worked well :)
<havenwood> shevy: #crystal-lang
<shevy> are you kidding... do they have a -lang really?
<havenwood> shevy: Compiler originally written in Ruby.
<shevy> even #ruby got rid of it!
volty_ has joined #ruby
<jhass> [k-: granted I'm biased
OrbitalKitten has quit [Client Quit]
<shevy> lemme join
volty has quit [Ping timeout: 246 seconds]
<shevy> omg you are right
<shevy> nobody on #crystal
<Jiks> shevy: I hate PHP; just wanted some way to run Ruby there.
<havenwood> shevy: squatters
<shevy> Jiks I still use a variant of ruby .cgi :)))
<centrx> shevy, Yeah #crystal is about meth
<Jiks> shevy: I am curious; how does CGI thingy work?
<havenwood> shevy: I think Ruby-inspired languages with shared syntax and docs are fairly relevant.
<Jiks> Like PHP they are separate files?
<Jiks> havenwood: Elixir seems to show real progress
sargas has quit [Client Quit]
rcvalle has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> Jiks yeah; there exists some cgi-error thing to display the line of error, similar to how php files work
<shevy> rather than the generic "Internal Server Error"
<shevy> from the kuwatalabs japanese dude
eggoez has joined #ruby
bf4 has quit [Ping timeout: 246 seconds]
<shevy> I adapted it to show the error in bright red :P
JoshL has joined #ruby
<havenwood> Jiks: Aye, lovely to have Rubyists creating languages! <3
chouhoulis has quit [Remote host closed the connection]
<shevy> the default ruby-cgi still lacks actionable things like URL mappers, like in sinatra: create/book/cthulhu
<Jiks> havenwood: yay!
chouhoulis has joined #ruby
platzhirsch has joined #ruby
<Jiks> I am looking at Opal, Crystal, mRuby and Elixir for future
<shevy> \o/
<havenwood> Jiks: +1
renderfu_ has joined #ruby
<shevy> matz is working on mruby so it has to become the future one day anyway :)
davedev2_ has joined #ruby
<Jiks> Just wish Rubymotion was open source
<shevy> until then we can scan at https://github.com/ruby/ruby/blob/trunk/ChangeLog for new stuff
<jhass> matz wants to replace lua though, not ruby
<ljarvis> ^
<shevy> whoa... 90 contributors
lessless has joined #ruby
<shevy> well, lua is damn tiny
renderful has quit [Ping timeout: 252 seconds]
davedev24_ has quit [Ping timeout: 246 seconds]
<Jiks> jhass: Yes. Each of the those projects are to replace particular verticals.
<shevy> hmm lemme check mruby size
<Jiks> Elixir: Clojure/Scala
<Jiks> Opal: JS
<Jiks> Crystal: C
<shevy> aha
<Jiks> RubyMotion: ObjectiveC/Java
<shevy> I removed doc/ then repackaged -> mruby-master.tar.xz 274K
<Jiks> mRuby: lua
rbennacer has quit [Remote host closed the connection]
nertzy has joined #ruby
<shevy> lua-5.3.1.tar.xz is at 221K
<Jiks> ScriRuby: Python
<shevy> so that's very similar actually
rbennacer has joined #ruby
chinmay_dd has joined #ruby
<adaedra> shevy: the xz'd source code means no-thing
<Jiks> Each of this project is brilliantly positioned to power the weakness of the language.
snockerton has joined #ruby
<shevy> adaedra what does this mean
platzhirsch has quit [Ping timeout: 256 seconds]
bruno- has joined #ruby
sandstrom has joined #ruby
<shevy> weird...
<shevy> bin/mirb is 1.4 MB in size... can that be?
volty_ has quit [Ping timeout: 246 seconds]
volty__ has joined #ruby
chussenot has quit [Quit: chussenot]
<havenwood> On the TechEmpower benchmarks ngx_mruby makes the strongest showing of the bunch. Good stuff: https://github.com/matsumoto-r/ngx_mruby#readme
<jhass> I think crystal will probably steal more marketshare from Go than from C though
<havenwood> https://www.techempower.com/benchmarks/#section=data-r10&hw=peak&test=json
pithagora has quit [Quit: Leaving]
<shevy> why will it steal more from Go?
Respek has joined #ruby
<jhass> similar usecases
hotpancakes has joined #ruby
<Jiks> jhass: Na! Go's popularity is in concurrency
<Jiks> Elixir is the right counter for Go
darkf has quit [Quit: Leaving]
<jhass> and currently Crystal's basically copying Go's concurrency ;)
solars has quit [Ping timeout: 264 seconds]
<havenwood> Jiks: See Crystal's channels.
<Jiks> jhass: wow, then I didn't know!
<Jiks> I was feeling jealous of Go's light weight channels.
<shevy> hmm I thought Google wants Go to succeed
<havenwood> Jiks: Nobody is going to argue against Erlang/OTP for concurrency and distributed programming. But Crystal mirrors Go.
<havenwood> At least I think nobody. >.> Probably somebody!
<shevy> there is always somebody using something
<Jiks> havenwood: Can only say, I can't wait for Crystal to be a strong contender.
phutchins has quit [Ping timeout: 252 seconds]
<jhass> Jiks: well, time to build up the ecosystem so it can happen ;)
<Jiks> I think I am in so love with the syntax and language semantics that I can't think of switching to another language.
rbennacer has quit [Remote host closed the connection]
<Jiks> jhass: What about a simple API framework? Like Grape?
rbennacer has joined #ruby
Iskarlar has joined #ruby
terlar has quit [Ping timeout: 252 seconds]
<jhass> whatever drives you really, though webframeworks is probably what we have the most of :P
OrbitalKitten has joined #ruby
juanpaucar has quit [Remote host closed the connection]
<jhass> just saying it's still easy to become a Crystal hero ;P
nfk has quit [Quit: yawn]
Xzanron has quit [Ping timeout: 252 seconds]
Iskarlar has quit [Client Quit]
msnyon_ has joined #ruby
<shevy> you people are so junkies
<shevy> LSD, meth, crystal - nothing is sacred
<shevy> until you start to smoke cats
OrbitalKitten has quit [Client Quit]
<Jiks> jhass I know, I understood ;) .. But not that knowlegible :(
<adaedra> shevy: stop arguing and give me a coke.
<jhass> Jiks: BS, I learned crystal by writing Ruby and working through the compiler errors ;P
dfockler has joined #ruby
msnyon has quit [Ping timeout: 256 seconds]
<Jiks> jhass: thats probably because you know your way around
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> :D
leafybasil has joined #ruby
mesamoo has quit [Quit: Konversation terminated!]
zenguy_pc has quit [Read error: Connection reset by peer]
<havenwood> jhass: It seems the most likely explanation is... you used magic.
msnyon_ has quit [Ping timeout: 246 seconds]
<[k-> dundundun!
psy__ has quit [Remote host closed the connection]
leafybasil has quit [Client Quit]
<jhass> DeBot is full of magic, yes!
MatthewsFace has quit [Remote host closed the connection]
atom3 has quit [Ping timeout: 276 seconds]
<havenwood> ?ruboto
<ruboto> I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
umgrosscol has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
platzhirsch has joined #ruby
<[k-> ?ot ruboto
<ruboto> ruboto, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<shevy> lol
<shevy> ruboto is off-topic - who would have known
msnyon has joined #ruby
<[k-> that's basically Ruby...
atom3 has joined #ruby
<jhass> see
chussenot has joined #ruby
<centrx> Yeah what is the difference
<centrx> Why don't they just make a compiler for Ruby
maciejczyzewski has quit [Ping timeout: 244 seconds]
icebourg has joined #ruby
<shevy> in javascript?
<[k-> infraruby vs crystal, go!
StanAlanMcM has joined #ruby
kyle__ has quit [Quit: leaving]
<jhass> centrx: crystal actually started that way but you can't achieve all of Ruby's features without embedding a runtime, which they decided against and instead continued to make their own language
<yorickpeterse> people actually use infraruby?
<yorickpeterse> plus crystal is FOSS, done
<yorickpeterse> no further argument needed
griffindy has joined #ruby
negev has joined #ruby
ta has quit [Remote host closed the connection]
Rollabunna has joined #ruby
<sphex> hey, does ruby have a "strict" UTF-8 mode? that is, can it throw exceptions when attempting to decode/encode invalid UTF-8?
<jhass> doesn't it already?
acke has joined #ruby
<[k-> that's weird, what is {:sym, :sym}? a tuple?
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<StanAlanMcM> Hello! I am in a class to learn Ruby. We have been going over minitest this week. Many of us are having a hard time understanding mock. We've googled for "ruby minitest mock examples/tutorials" and haven't found anything we understand. I am looking for a tutorial that has an example class and walks us through using mock to do various tests. If anyone has a suggestion I much appreciate it. :) Thank you.
konsolebox has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
Yiota has joined #ruby
<sphex> jhass: I thought it didn't. maybe I should check better. it does just pass through the surrogate pair codepoints though. and codepoints > 0x10FFFF are encoded oddly and decoded as separate multiple characters somehow.
acke has quit [Remote host closed the connection]
<jhass> ?code
<ruboto> We can't help you without your code, please post it to https://gist.github.com
enebo has joined #ruby
<sphex> jhass: maybe the low-level UTF-8 encoding errors trigger exceptions though
sevenseacat has quit [Quit: Me dun like you no more.]
rockngo has joined #ruby
rockngo has quit [Remote host closed the connection]
<jhass> [k-: maybe we should head to #crystal-lang for that level of talk, but yes ;)
Yiota has quit [Client Quit]
<[k-> so you did learn crystal...
<StanAlanMcM> slash_nick: Thank you!
rocknrollmarc has quit [Quit: User abort with 5 Ctrl-C's]
<[k-> now the code cannot be run under mri
<slash_nick> StanAlanMcM: no problem... have fun!
<jhass> sphex: well yes, you'll need to do operations that actually depend on the encoding
ruu has joined #ruby
charliesome has joined #ruby
<jhass> sphex: note that \x only reads the next two digits
senayar has quit [Remote host closed the connection]
segfalt has quit [Quit: segfalt]
<jhass> \x10\xFF\xFF
rocknrollmarc has joined #ruby
<jhass> >> "\x10\xFF\xFF"
<ruboto> jhass # => "\u0010\xFF\xFF" (https://eval.in/388184)
<jhass> >> "\x10\xFF\xFF".match /foo/
<ruboto> jhass # => invalid byte sequence in UTF-8 (ArgumentError) ...check link for more (https://eval.in/388185)
<sphex> jhass: yeah, I'm testing with e.g. [0x110000].pack 'U'
symbol has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandstrom has quit [Quit: My computer has gone to sleep.]
<sphex> jhass: ah ok.. interesting.
shock_one has quit [Remote host closed the connection]
griffindy has joined #ruby
Iskarlar has joined #ruby
davedev24_ has joined #ruby
shock_one has joined #ruby
dblessing has quit [Remote host closed the connection]
psy_ has joined #ruby
senayar has joined #ruby
<jhass> you can also ask ruby
<jhass> >> [0x110000].pack("U").valid_encoding?
<ruboto> jhass # => false (https://eval.in/388186)
<sphex> jhass: the thing I want to avoid is that invalid UTF-8 read from whatever source get concatenated with other strings and end up in a file, and make the whole file invalid.
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ruby
<sphex> jhass: ah ok. so I guess I should do that as soon as possible (ideally right after reading) to avoid contaminating other strings.
zenguy_pc has joined #ruby
ruu has quit [Ping timeout: 264 seconds]
dorei has joined #ruby
<havenwood> StanAlanMcM: Mmm, that's a good question. I'm on a call but if you hang around a bit I'll gist some examples if someone doesn't beat me to it.
aapole has joined #ruby
joonty has quit [Quit: joonty]
davedev2_ has quit [Ping timeout: 248 seconds]
acke has joined #ruby
scripore has quit [Read error: Connection reset by peer]
shock_one has quit [Ping timeout: 256 seconds]
acke has quit [Client Quit]
OrbitalKitten has joined #ruby
<[k-> jhass: does crystal have then like in Ruby?
<jhass> no
chouhoulis has quit [Remote host closed the connection]
<[k-> why ever not
symbol has quit [Quit: WeeChat 1.1]
_blizzy_ has quit [Ping timeout: 248 seconds]
hotpancakes has quit []
shoutsid has quit [Ping timeout: 246 seconds]
rbennacer has quit [Remote host closed the connection]
<ljarvis> [k-: if you want to discuss crystal please go to #crystal-lang
<[k-> mmk
olistik has quit []
dopie has quit [Quit: This computer has gone to sleep]
towski_ has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
rbennacer has joined #ruby
endash has quit [Quit: endash]
<StanAlanMcM> havenwood: Thank you. I'm in class for the rest of the day. "lab time" I'll be patiently waiting! :D
rbennacer has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 252 seconds]
negev has quit [Quit: leaving]
mistnim has quit [Remote host closed the connection]
andywojo has quit [Ping timeout: 256 seconds]
<slash_nick> havenwood: i sent him to https://github.com/rthbound/konamio/blob/master/test/konamio/sequence/requisition_test.rb ; but i'm sure he'd be interested in more examples (hell i wouldn't mind checking out your examples myself)
rbennacer has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cpruitt has quit [Quit: cpruitt]
dopie has joined #ruby
zendrix has joined #ruby
serivich has quit [Ping timeout: 246 seconds]
zendrix has quit [Remote host closed the connection]
rbennacer has quit [Ping timeout: 252 seconds]
theery has joined #ruby
k3asd` has joined #ruby
zendrix has joined #ruby
shock_one has joined #ruby
Zai00 has quit [Quit: Zai00]
psy_ has quit [Read error: Connection reset by peer]
Zai00 has joined #ruby
Agoldfish has joined #ruby
<StanAlanMcM> This is the code we are learning to test against. https://github.com/mcmillanator/1.4-ATM-Classes/tree/dev
senayar has quit []
phutchins has joined #ruby
psy_ has joined #ruby
cmisenas has joined #ruby
andywojo has joined #ruby
RobertBirnie has joined #ruby
rocknrollmarc has quit [Quit: User abort with 5 Ctrl-C's]
andywojo has quit [Client Quit]
rodfersou is now known as rodfersou|lunch
rocknrollmarc has joined #ruby
rbennacer has joined #ruby
commondr_ has joined #ruby
momomomomo has joined #ruby
findaway has quit [Ping timeout: 250 seconds]
<StanAlanMcM> argh. My instructor is requiring me to take a 20 minute break. lolz. I'll be afk, but computer on and will read any input from you. :) Thank you very much for the help.
ibash has joined #ruby
pdoherty has joined #ruby
ibash has quit [Remote host closed the connection]
ibash has joined #ruby
<ibash> hi
<[k-> hello
<ibash> I think I found an inconsistency between my gemfile and gemfile.lock (that is, there's a gem listed in gemfile.lock that is not in the gemfile). Are there any tools to verify this?
<ibash> if not can someone point me to a spec of the gemfile.lock format
commondream has quit [Ping timeout: 252 seconds]
segfalt has joined #ruby
RobertBirnie has quit [Ping timeout: 244 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx> ibash, The Gemfile.lock is generated from the Gemfile. And the Gemfile can be changed without generating the Gemfile.lock
<jhass> ibash: the lock lists all dependencies, though the part below DEPENDENCIES should only list what's in the Gemfile
k3asd` has quit [Ping timeout: 272 seconds]
<ibash> centrx: yep
RobertBirnie has joined #ruby
sfarley has joined #ruby
<ibash> jhass: Okay -- I think a dependency was installed an added to gemfile.lock without adding it to gemfile
<ibash> any easy ways to check that particular case for all dependencies?
<jhass> ibash: likely just a dependency of one that's listed
<jhass> "that particular case"?
serivich has joined #ruby
[H]unt3r has joined #ruby
<ibash> so if I go to an app and manually do `gem install "foo"`
<jhass> bundle outdated lists the restrictions from the Gemfile in recent versions
<ibash> when the gemfile.lock is generate, would it have foo?
OrbitalKitten has joined #ruby
<jhass> no
<ibash> even if it's not in the Gemfile?
<jhass> no
<jhass> and bundle exec whatever would not be able to load foo
<ibash> huh
<jhass> unless it also happens to be a dependency of a dependency listed in the Gemfile
<ibash> okay
<ibash> what's throwing me off is that it looks like this is a top-level dependency in the gemfile.lock, but it's not in the list of dependencies
<ibash> nor is it in the gemfile
baweaver has joined #ruby
<ibash> how could that happen?
<ibash> jhass: ^
sfarley_ has joined #ruby
bronson has joined #ruby
atom3 has quit [Remote host closed the connection]
<jhass> I said it three times already
finisherr has joined #ruby
<jhass> it's likely just a dependency of a dependency
atom3 has joined #ruby
sfarley has quit [Ping timeout: 244 seconds]
<jhass> if you want a concrete explanation post your Gemfile & lock to gist
<ibash> okay, thanks!
c0m0 has quit [Ping timeout: 255 seconds]
nobitanobi has joined #ruby
ndrei has joined #ruby
benlieb_ has joined #ruby
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> slash_nick: Ah, yeah your link has great examples! :)
shock_one has quit []
serivich has quit [Ping timeout: 265 seconds]
RegulationD has quit [Remote host closed the connection]
<Senjai> Good morning ruby
<havenwood> Senjai: g'mornin
axl_ has quit [Quit: axl_]
<Senjai> I've never used minitest that lightly
<Senjai> pretty neat
momomomomo has quit [Ping timeout: 256 seconds]
BTRE has joined #ruby
momomomomo has joined #ruby
mfranzwa has quit [Quit: mfranzwa]
atom3 has quit [Ping timeout: 276 seconds]
Xeago has joined #ruby
nfk has joined #ruby
atom3 has joined #ruby
white_bear has quit [Quit: leaving]
roger_rabbit has quit [Ping timeout: 276 seconds]
theery has quit []
lordkryss has quit [Quit: Connection closed for inactivity]
bricker has joined #ruby
pengin has joined #ruby
konsolebox has joined #ruby
startupality has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 256 seconds]
startupality has joined #ruby
volty has joined #ruby
volty__ has quit [Ping timeout: 248 seconds]
konsolebox has quit [Read error: Connection reset by peer]
bnizzle has joined #ruby
cmisenas has quit [Quit: cmisenas]
<havenwood> Senjai: It's not hard to make assertions available from main as well: https://gist.github.com/havenwood/23f8dab52adbe7ea3060
bnizzle1 has quit [Ping timeout: 256 seconds]
<slash_nick> thanks Senjai havenwood
ibash has quit [Read error: Connection reset by peer]
Bertg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<slash_nick> oh... Senjai was talkin to havenwood :)
mfranzwa has joined #ruby
<Senjai> havenwood: That is actually awesome
<Senjai> not even joking
<Senjai> For one off scripts
<Senjai> that's super helpful
<Senjai> Not having to write a class etc
Bertg has joined #ruby
enebo has quit [Quit: enebo]
<havenwood> Senjai: I have it in my .pryrc file. :)
Xzanron has joined #ruby
<Senjai> havenwood: Can I steal your pryrc
Xzanron has quit [Read error: Connection reset by peer]
chinmay_dd has quit [Remote host closed the connection]
<havenwood> Senjai: Hem, I also use a simple prompt and disable paging. Not much else enabled at the moment. Trying out the did_you_mean gem.
<shevy> first the pryrc, then the babies
<havenwood> Pry.config.prompt = Pry::SIMPLE_PROMPT
<havenwood> Pry.pager = false
<havenwood> Senjai: ^ and the top part of that Gist.
<Senjai> No paging hey?
<havenwood> Senjai: If you want to use the local variable `cat` from the top level >.> then: Pry.commands.rename_command '%cat', 'cat'
ta has joined #ruby
<havenwood> Senjai: I like to do data munging in Pry and I don't like waiting minutes for the screen to fly by.
nonparfumee has joined #ruby
<Senjai> Nice
michael_mbp has quit [Excess Flood]
Indian has quit [Ping timeout: 246 seconds]
rbennacer has quit [Remote host closed the connection]
gagrio_ has quit [Ping timeout: 256 seconds]
Lucky___ has joined #ruby
zenguy_pc has quit [Quit: Leaving]
zenguy_pc has joined #ruby
borodin has joined #ruby
n008f4g_ has quit [Ping timeout: 252 seconds]
JoshL_ has joined #ruby
Indian has joined #ruby
ta has quit [Ping timeout: 252 seconds]
michael_mbp has joined #ruby
JoshL has quit [Read error: No route to host]
icarus has joined #ruby
ruu has joined #ruby
jenrzzz has joined #ruby
mfranzwa has quit [Quit: mfranzwa]
bigkevmcd has quit [Quit: it's the weekend!]
j4cknewt has joined #ruby
gwendall has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
j4cknewt has quit [Remote host closed the connection]
enebo has joined #ruby
podman has joined #ruby
iateadonut has left #ruby [#ruby]
baweaver has joined #ruby
ruu has quit [Ping timeout: 252 seconds]
snockerton has quit [Quit: Leaving.]
einarj has quit [Remote host closed the connection]
konsolebox has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
Xeago has quit [Remote host closed the connection]
<dudedudeman> hey guys, minitest question. Can I pull off string interpolation on an assertion?
<dudedudeman> assert last_response.body.include?('todos'), but instead pass in a #{@todos} or something like that
snockerton has joined #ruby
finisherr has quit [Quit: finisherr]
nathanstitt has joined #ruby
hiall has quit [Quit: hiall]
<jhass> dudedudeman: no need for interpolation, just .include?(@todos)
zeroDivisible has quit [Ping timeout: 256 seconds]
<jhass> dudedudeman: forget the assert, think you're writing an if
konsolebox has quit [Read error: Connection reset by peer]
Bertg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Senjai> I love right now
nutha has quit [Ping timeout: 245 seconds]
x44x45x41x4E has quit [Remote host closed the connection]
snockerton has quit [Client Quit]
<dudedudeman> i do too!
<dudedudeman> why do we love now? lol
Xeago has joined #ruby
<dudedudeman> and jhass, thank you. as per usual, i was over complicating this
finisherr has joined #ruby
Scrofff has quit [Ping timeout: 256 seconds]
<shevy> dudedudeman!
<dudedudeman> shevy: !
<shevy> you don't over-complicate - you just try to bring it down to the level of the dude
<jhass> dudedudeman: because supreme court perhaps?
timonv has joined #ruby
<dudedudeman> jhass: i wondered teh same, but didn't know Senjai's country of origin
<Senjai> It's like
<Senjai> the downtime, between epics
nateberkopec has joined #ruby
charliesome has quit [Quit: zzz]
<dudedudeman> this is a fun error: TypeError: no implicit conversion of Todo::ActiveRecord_Relation
roolo_ has quit [Remote host closed the connection]
hiall has joined #ruby
<jhass> make it explicit, .to_s or whatever is appropriate
hiall has quit [Client Quit]
baweaver has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
<dudedudeman> this is the test i'm throwing at my view: https://gist.github.com/anonymous/b05c6e09ea582068dfb2
silas has joined #ruby
<_joliv> `Todo::ActiveRecord_Relation` is a class specific to the relation that Rails creates for you afaik
silas is now known as Guest69221
schy has left #ruby ["WeeChat 1.2"]
nobitanobi has quit [Remote host closed the connection]
Guest69221 has left #ruby [#ruby]
hector__ has quit [Quit: Leaving]
zipace has joined #ruby
nobitanobi has joined #ruby
Zai00 has quit [Quit: Zai00]
dseitz has joined #ruby
symm- has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
volty has quit [Quit: Konversation terminated!]
rippa has joined #ruby
<dudedudeman> sinatra, baby
danman has joined #ruby
bubbys has quit [Ping timeout: 256 seconds]
danman has quit [Client Quit]
blaines has joined #ruby
t0rrieri has quit [Quit: Be back later ...]
j4cknewt has joined #ruby
startupality has quit [Read error: Connection reset by peer]
mfranzwa has joined #ruby
chussenot has quit [Quit: chussenot]
bubbys has joined #ruby
lokulin has quit [Ping timeout: 264 seconds]
startupality has joined #ruby
<jhass> dudedudeman: well, your view transforms it to a string, the items in @todos are gone in the response
dblessing has joined #ruby
Jiks has quit [Quit: leaving]
<jhass> you can expect a body of a todo or a title to be in it
troulouliou_dev has quit [Remote host closed the connection]
User458764 has joined #ruby
nonparfumee has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-> erb looks disgusting
ndrei has quit [Ping timeout: 256 seconds]
<[k-> haish..
konsolebox has joined #ruby
<[k-> have you seen voltz?
<dudedudeman> erb is beautiful
<dudedudeman> and volt is sweet
<[k-> volt*
<[k-> erb has horrible syntax
snockerton has joined #ruby
<dudedudeman> to you, yes
rbowlby has joined #ruby
<dfockler> erb is like php templating
rbowlby has quit [Read error: Connection reset by peer]
aphprentice has joined #ruby
<[k-> it looks worse than php even tho its Ruby...
<dfockler> something like haml encourages better logic separation
<[k-> I'm just kidding
konsolebox has quit [Client Quit]
<[k-> php is worser than anything
<bakednotfried> php is the best language for the web
<dudedudeman> !!
GitGud has joined #ruby
<[k-> whatever you like, whatever you like...
towski_ has quit [Remote host closed the connection]
GPrime has quit [Quit: Textual IRC Client: www.textualapp.com]
platzhirsch has left #ruby [#ruby]
<Senjai> [k-: erb's syntax is just fine. Using it with html can get messy. But ERB in regular text files is a-ok
nobitanobi has quit [Remote host closed the connection]
<Senjai> I dont know how you improve on <% %>
Rodya_ has joined #ruby
fantazo has quit [Quit: Verlassend]
nobitanobi has joined #ruby
<[k-> I judge based on what I see :(
aapole has quit [Remote host closed the connection]
<Senjai> Well
<Senjai> Anyone can write crappy code.
<Senjai> Doesnt mean its impossible to write good code
<dfockler> let's all use << >> pointy handlebars
Iskarlar has joined #ruby
<Senjai> dfockler: http://junk.pics/whatno.gif
<dfockler> haha
<shevy> I also think that erb is ugly
<StanAlanMcM> havenwood, that's hilarious! Thank you.
<Senjai> I dont think it is. Again, I think you guys are talking about html.erb
<dfockler> although I like @ compared to php's $ everywhere
TinkerTyper has quit [Ping timeout: 246 seconds]
<dfockler> those are some expensive variables
timonv has quit [Read error: Connection reset by peer]
rodfersou|lunch is now known as rodfersou
<havenwood> StanAlanMcM: You're welcome.
Miphix has quit [Quit: Leaving]
RegulationD has joined #ruby
<ght> Question: How do you convert a standard MySql updated_at or create_at timestamp into a Ruby Date or DateTime object?
<ght> created*
Chemist has joined #ruby
horsecowdog has joined #ruby
<[k-> how does it look like :o
<[k-> the time stamp I mean
snockerton has quit [Quit: Leaving.]
<Senjai> >> "2015-06-03 15:20:59 UTC".to_date
<ruboto> Senjai # => undefined method `to_date' for "2015-06-03 15:20:59 UTC":String (NoMethodError) ...check link for more (https://eval.in/388217)
momomomomo has quit [Ping timeout: 246 seconds]
<Senjai> >> Date.new "2015-06-03 15:20:59 UTC"
<ruboto> Senjai # => uninitialized constant Date (NameError) ...check link for more (https://eval.in/388219)
<Senjai> hmm
<Senjai> Too much time in active support land
TinkerTyper has joined #ruby
<Senjai> >> require 'date';Date.new "2015-06-03 15:20:59 UTC"
<ruboto> Senjai # => comparison of String with 0 failed (ArgumentError) ...check link for more (https://eval.in/388221)
charliesome has joined #ruby
Iskarlar has quit [Client Quit]
ruu has joined #ruby
<Senjai> >> require 'date';Date.parse "2015-06-03 15:20:59 UTC"
<ruboto> Senjai # => #<Date: 2015-06-03 ((2457177j,0s,0n),+0s,2299161j)> (https://eval.in/388223)
<Senjai> ght: ^
<Senjai> U dud et
<Senjai> I did it*
coderhs has joined #ruby
sarkyniin has joined #ruby
coderhs has quit [Remote host closed the connection]
stan has quit [Ping timeout: 246 seconds]
RegulationD has quit [Ping timeout: 246 seconds]
frem has joined #ruby
RegulationD has joined #ruby
mary5030 has quit [Remote host closed the connection]
rjno has quit []
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Jackneill has quit [Quit: Leaving]
roger_rabbit has joined #ruby
Jackneill has joined #ruby
<dviola> I'm trying to hit some json api with Net::HTTP but it claims the SSL is invalid but it works when I curl -k or --insecure, is there such a parameter for Net::HTTP?
Iskarlar has joined #ruby
rocknrollmarc has quit [Ping timeout: 265 seconds]
zendrix has quit [Remote host closed the connection]
Iskarlar has quit [Client Quit]
ruu has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
mfranzwa has quit [Quit: mfranzwa]
<Senjai> dviola: Is it using sslv3?
<jhass> dviola: improper solution
<Senjai> You generally never want to --insecure anything
<Senjai> dviola: what's the api?
<dviola> Senjai: I know but I asked the manager here and they say that "You're using Linux, you're going to have to use Windows, the admin won't fix your issue because you're getting this problem yourself"
agent_white has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dviola> Senjai: so he's a f*cking moron, and he thinks the problem is on my end, and it's not
<dviola> :p
<Senjai> dviola: I can't say its not on your end
<Senjai> dviola: And we talked about the complaining ;)
cmisenas has joined #ruby
Zenon has joined #ruby
<dviola> Senjai: sorry
<dviola> :-
<dviola> :-)
<Senjai> dviola: force tlsv1 and tlsv2 and try
<Senjai> I also dont know what API you're using, so I cant run ssl tests on it
whippythellama has joined #ruby
zendrix has joined #ruby
Tau has joined #ruby
<dviola> I forced -1 -2 and -3
<dviola> no workie
ta has joined #ruby
<dviola> works with -k and --insecure
startupality has quit [Quit: startupality]
mfranzwa has joined #ruby
<Senjai> dviola: openssl s_client -connect google.ca:443
<Senjai> where the servername and port are the creds for your api
workmad3 has quit [Ping timeout: 276 seconds]
<sphex> dviola: not sure I understood your issue, but maybe Net::HTTP#verify_mode ?
rbennacer has joined #ruby
Jarboe has joined #ruby
<Senjai> sphex: No
<dviola> Senjai: what will this do?
lokulin has joined #ruby
<Senjai> sphex: Using NO_VERIFY_PEER is terrible
<dviola> the s_client thing
<Senjai> dviola: I thought you've been using linux for over half your life :P
momomomomo has joined #ruby
<eam> dviola: it'll show you the certificate chain
<Senjai> dviola: It will attempt a handshake with the server and show you the certificate chain
<sphex> Senjai: but if their certificate is invalid, what else are you gonna do?
<eam> sphex: it's likely not invalid
<Senjai> if it succeeds, then the problem is with you
<sphex> oh ok
<dviola> Senjai: they're using no verify in other code
<eam> it sounds like the trust store on this org's windows systems differs from dviola's config on linux
chussenot has joined #ruby
wldcordeiro has joined #ruby
<eam> dviola: oh are they? then you need to, too
<Senjai> eam: Yeah, but I want to see his output for this
rbennacer has quit [Remote host closed the connection]
symm- has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
yfeldblum has joined #ruby
sarkyniin has quit [Ping timeout: 252 seconds]
<sphex> I guess if it were valid, then you'd have to get some root certificates into the global openssl configs and ruby would pick it up?
postmodern has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
momomomomo has quit [Client Quit]
nickfausnight has quit [Quit: Connection closed for inactivity]
ta has quit [Ping timeout: 252 seconds]
charliesome has quit [Quit: zzz]
symm- has joined #ruby
axl_ has joined #ruby
zendrix has quit [Remote host closed the connection]
sfarley_ has quit [Remote host closed the connection]
dopie has joined #ruby
jas02 has quit [Ping timeout: 250 seconds]
gwendall has joined #ruby
<postmodern> how hard is it to add custom resource types to Resolv? or should i just use net-dns?
zenguy_pc has quit [Read error: Connection reset by peer]
Zenon is now known as bartender
t_ has quit [Ping timeout: 244 seconds]
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
khebbie has joined #ruby
[k- has quit [Quit: AndroidIrc Disconnecting]
sfarley has joined #ruby
<sphex> hey, is it worth it attempting to make code work with ruby's $SAFE/tainting features, or will that cause too many problems with common libraries, etc? do the modern web frameworks support it?
ruu has joined #ruby
kirun has joined #ruby
n008f4g_ has quit [Ping timeout: 255 seconds]
vickleton has joined #ruby
vickleton has quit [Client Quit]
chussenot has quit [Quit: chussenot]
<dviola> Senjai: lol
<dviola> Senjai: using linux for half my life doesn't mean I know everything about it
vickleton has joined #ruby
gwendall has quit [Ping timeout: 265 seconds]
zendrix has joined #ruby
Voker57 has quit [Remote host closed the connection]
<dviola> and I don't think you can know everything about anything, things are always changing
<dviola> even when it comes to ruby, etc
Voker57 has joined #ruby
StanAlanMcM has quit [Ping timeout: 244 seconds]
bosma has joined #ruby
<dviola> thanks for the help anyway
snockerton has joined #ruby
<dviola> sorry about complaining ;)
toretore has joined #ruby
sfarley has quit [Remote host closed the connection]
djellemah has quit [Ping timeout: 264 seconds]
sfarley has joined #ruby
zenguy_pc has joined #ruby
<centrx> sphex, I don't think it's used much nowadays
DLSteve has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
Channel6 has quit [Quit: Leaving]
postmodern has quit [Quit: Leaving]
s2013 has joined #ruby
<sphex> centrx: ok. that's a shame, it always looked like a good idea. perl's tainting features never saw a lot of use either. :/
jenrzzz has joined #ruby
major_majors has quit [Quit: Reconnecting]
major_majors has joined #ruby
postmodern has joined #ruby
<dviola> Senjai: why is NO_VERIFY_PEER that terrible?
<jhass> dviola: because encryption with automatic key negotiation without authentication is completely pointless
t_ has joined #ruby
<jhass> that is unless you think earth is too cold and want to heat it up
<eam> it's not completely pointless
<sphex> jhass: "opportunistic encryption" is.. still that.
bartender has quit [Ping timeout: 244 seconds]
<eam> it's not opportunistic either, it's encrypted. period.
<sphex> most of the SMTP traffic ends up being protected with just opportunistic encryption too
<dviola> jhass: is NO_VERIFY_PEER the same as -k or --insecure in curl?
<eam> dviola: peer verification protects against attackers who might impersonate the peer you're talking to -- who would have to be able to inject traffic
bartender has joined #ruby
<eam> without it, you're only protected against people who can read, but not write to your connection channel
<eam> it's still valuable, but not as valuable
dopie has joined #ruby
<eam> (and let's be honest, the barrier to procuring a cert signed by a trusted authority is not that high)
zendrix has quit [Remote host closed the connection]
soulcake has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
<dviola> ok
soulcake has joined #ruby
<jhass> or to either side of the connection, like if someone hacked your host and replaced the cert you probably wouldn't notice with disabled verification
<dviola> I doubt anyone would want to attack me when I connect to this api, it's some company's internal thingy
shadoi has joined #ruby
<eam> jhass: yes, the entire channel. Though if they compromise the host they wouldn't need to replace the cert
<eam> they'd just use the signed cert they find
<eam> root on either end is automatic game over anyway
micmus has quit [Ping timeout: 265 seconds]
<eam> (eve and alice become the same person)
<Alayde_> Has the ruby community settled on a ruby version/gem manager yet? It seems rvm is somewhat frowned upon, but fortunately for me that's the only thing I'm used to.
<jhass> either I still think it's pointless, false sense of security even. you can't guarantee the channel will never be exposed and likely forget about the issue since "you already setup encryption"
<Alayde_> Or is it kind of like, 'use whatever makes you happy'?
<jhass> Alayde_: if it makes you happy it's fine
<jhass> ignore what comes now
<Alayde_> Lol! Fair enough
<eam> jhass: no doubt, if your channel goes over the internet it can be compromised
sarkyniin has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<dviola> ty
egrm has joined #ruby
Xeago has quit [Remote host closed the connection]
<egrm> hi everybody
Rodya_ has joined #ruby
egrm has quit [Client Quit]
ryba has quit [Ping timeout: 265 seconds]
<jhass> 12 seconds, had it worse
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
egrm has joined #ruby
symm- has quit [Ping timeout: 264 seconds]
<egrm> hi everybody
<jhass> hi
jpfuentes2 has joined #ruby
<egrm> what's up?
Rodya_ has joined #ruby
<havenwood> egrm: The Ruby sky.
<havenwood> egrm: Friday!
<egrm> nice
egrm has quit [Client Quit]
<jhass> java hangman in #ruby-offtopic ><
baweaver has joined #ruby
micmus has joined #ruby
noodles_ has joined #ruby
rubyguy has joined #ruby
<dviola> I wonder why I don't see that friday bot anymore
denver has quit [Remote host closed the connection]
Jackneill has quit [Quit: Leaving]
<dviola> maybe because I'm not in #jruby
noodles_ has quit [Client Quit]
rocknrollmarc has joined #ruby
<havenwood> dviola: Yup, you missed the very colorful Friday!!! from a minute ago.
<dviola> damn :(
Encapsulation has quit [Remote host closed the connection]
<dviola> I used to join like 40 channels when I had my weechat to auto join for me but I'm too lazy to configure that again
<havenwood> dviola: Less colorful recreation of what you missed: http://irclog.whitequark.org/jruby/2015-06-26#;tarcieri
<dviola> now I join 4 channels or so
Encapsulation has joined #ruby
shoutsid has joined #ruby
<dviola> havenwood: cool
rocknrollmarc has quit [Read error: Connection reset by peer]
baweaver has quit [Ping timeout: 246 seconds]
<Obfuscate> dviola: That's pretty lazy, since all you have to type is /autojoin --run
<dviola> if I could only find a way to backup my weechat config in my dotfiles repo that would be good, the thing is that I keep my password there too, so I don't know how to handle this
baweaver has joined #ruby
<dviola> Obfuscate: there's no /autojoin command in weechat?
Muhannad has joined #ruby
bricker has quit [Ping timeout: 256 seconds]
Voker57|2 has joined #ruby
khebbie_ has joined #ruby
<dviola> meh I'll configure that later
JoshL_ has quit []
rbowlby has joined #ruby
JoshL has joined #ruby
multi_io has quit [Ping timeout: 250 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
segfalt has quit [Quit: segfalt]
<sphex> hey.. what would be the most straightforward way to do something like python's decorators (on a method-by-method basis)? I know ruby has its own metaprogramming stuff, but they're too advanced for me for now..
findaway has joined #ruby
zendrix has joined #ruby
multi_io has joined #ruby
<shadoi> sphex: maybe give an example of what you want
momomomomo has joined #ruby
7JTAAEQTT has joined #ruby
OrbitalKitten has joined #ruby
StanAlanMcM has joined #ruby
khebbie has quit [Ping timeout: 276 seconds]
towski_ has joined #ruby
Voker57 has quit [Ping timeout: 256 seconds]
Rodya_ has quit [Remote host closed the connection]
Xoro has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
khebbie_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spider-mario has joined #ruby
peter_paule has joined #ruby
Al3ks has joined #ruby
Rarikon has joined #ruby
Xoro has joined #ruby
Rarikon has quit [Remote host closed the connection]
<sphex> shadoi: "wrap" a class method with a lambda. that is, have a function that gets passed the original method, and returns a lambda that replaces it (and it is then free to call the original method internally). the idea is that this can be done separately for each method (unlike subclassing). I guess if I knew the right way to inject an arbitrary lambda into a class definition, that could do it too.
finisherr has quit [Quit: finisherr]
B1n4r10 has joined #ruby
<shadoi> sphex: This will get you mostly there, you can also use the new lambda syntax http://mudge.name/2011/01/26/passing-blocks-in-ruby-without-block.html
Rodya_ has joined #ruby
peter_paule has quit [Ping timeout: 264 seconds]
mary5030 has joined #ruby
Xiti` has quit [Quit: Xiti`]
bf4 has joined #ruby
peter_paule has joined #ruby
ta has joined #ruby
j416 has quit [Quit: o/]
Palmer11_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
B1n4r10 has quit [Client Quit]
<dviola> Senjai: I've just entered the command you've suggested, openssl s_client -connect...
<dviola> Senjai: should I paste the output here?
B1n4r10 has joined #ruby
j416 has joined #ruby
Palmer11_ has quit [Remote host closed the connection]
bricker has joined #ruby
Palmer11_ has joined #ruby
vasilakisfil has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
invite has quit [Ping timeout: 252 seconds]
_blizzy_ has joined #ruby
baweaver has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 248 seconds]
Palmer11 has quit [Ping timeout: 252 seconds]
Palmer11_ is now known as Palmer11
<dviola> anyway, here it is ^
<sphex> shadoi: dammit.. it's complicated. :/ thanks for the links. I got the lambda/blocks bits mostly figured out. everything that has to do with modifiying classes really confuses.
Rodya_ has joined #ruby
<shadoi> sphex: it's not a language primitive feature because it's always been possible with Ruby
Voker57|2 has quit [Read error: Connection reset by peer]
bruno- has quit [Ping timeout: 248 seconds]
umgrosscol has quit [Quit: Quit]
<shadoi> IMO you don't need to do it with Ruby because blocks are able to do anything the language can do, rather than in python lambdas are only capable of a subset.
<sphex> yeah, I don't need anything exactly like decorators, but I just hoped for something simple that was decorator-ish. maybe I should just look into using "define_method" directly (some of the decorator implementation seem to use that).
Voker57 has joined #ruby
<shadoi> yeah it's pretty straightforward on the surface ;)
<shadoi> Just keep it simple
al2o3-cr has joined #ruby
<jhass> sphex: if you throw away all that useless abstraction and ways to solve it in your question and describe what you're actually doing, I'm sure we find an idiomatic solution
baweaver has joined #ruby
zendrix has quit [Remote host closed the connection]
doertedev has quit [Quit: Lost terminal]
<sphex> jhass: oh TBH I'm not solving much of anything quite yet. I'm slowly porting some perl and python code and trying to figure out the best way to do it.
hinbody has quit [Quit: leaving]
charliesome has quit [Read error: Connection reset by peer]
<sphex> and this channel is being *really* helpful, so thanks again
michael_mbp has quit [Excess Flood]
<toretore> the concept of decorators isn't really used in ruby - the problems they solve are solved differently
Rodya_ has quit [Remote host closed the connection]
<toretore> or not at all
CorrosiveOne has joined #ruby
charliesome has joined #ruby
kt2 has joined #ruby
gwendall has joined #ruby
kt2 has quit [Client Quit]
mfranzwa has quit [Quit: mfranzwa]
nwmcsween has joined #ruby
<sphex> toretore: alright
michael_mbp has joined #ruby
gregf has quit [Quit: WeeChat 1.1.1]
fmcgeough has quit [Quit: fmcgeough]
peter_paule has quit [Ping timeout: 248 seconds]
<toretore> >> class Foo; def logger(m); alias_method "#{m}_undecorated", m; define_method m, *a; puts "Calling #{m} with args: #{a.inspect}"; send("#{m}_undecorated"); end; end; def bar(*a); puts "Hello from bar"; end; logger :bar; end; Foo.new.bar
<ruboto> toretore # => /tmp/execpad-0ea459e9131d/source-0ea459e9131d:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/388244)
Rodya_ has joined #ruby
GnuYawk has joined #ruby
gwendall has quit [Ping timeout: 250 seconds]
<toretore> >> class Foo; def logger(m); alias_method "#{m}_undecorated", m; define_method m, *a { puts "Calling #{m} with args: #{a.inspect}"; send("#{m}_undecorated"); }; end; def bar(*a); puts "Hello from bar"; end; logger :bar; end; Foo.new.bar
<ruboto> toretore # => undefined method `logger' for Foo:Class (NoMethodError) ...check link for more (https://eval.in/388246)
<toretore> >> class Foo; def self.logger(m); alias_method "#{m}_undecorated", m; define_method m, *a { puts "Calling #{m} with args: #{a.inspect}"; send("#{m}_undecorated"); }; end; def bar(*a); puts "Hello from bar"; end; logger :bar; end; Foo.new.bar
<ruboto> toretore # => undefined method `a' for Foo:Class (NoMethodError) ...check link for more (https://eval.in/388247)
<toretore> you get the idea
<toretore> >> class Foo; def self.logger(m); alias_method "#{m}_undecorated", m; define_method(m){|*a| puts "Calling #{m} with args: #{a.inspect}"; send("#{m}_undecorated", *a); }; end; def bar(*a); puts "Hello from bar"; end; logger :bar; end; Foo.new.bar
<ruboto> toretore # => Calling bar with args: [] ...check link for more (https://eval.in/388248)
<toretore> there we go
<toretore> need more coffee
Papierkorb has joined #ruby
rdark has quit [Ping timeout: 256 seconds]
dopie has quit [Quit: This computer has gone to sleep]
pengin has quit [Remote host closed the connection]
<jhass> seriously
startupality has joined #ruby
mfranzwa has joined #ruby
<sphex> oh yeah... ok thanks for that. I guess I sorta see how decorating helpers could be moved to another module and run in the context of another class to decorate other methods (wrong terminology I'm sure). I'm prolly not going to end up doing that if it's not idiomatic with ruby, but it helps me to understand seeing how to do something like it.
<jhass> sphex: more common is to build methods that define other methods with the boilerplate
nickfausnight has joined #ruby
shadoi has quit [Quit: Leaving.]
<shevy> jhass we seem to be steady at or over 1050 here now on #ruby
<jhass> on weekdays, yeah
centrx has quit [Quit: Shutting down, Please wait...]
<sphex> jhass: and possible have the "user class" pass it a block that they can then call internally when invoked?
<jhass> sphex: for example, yeah
meph has quit [Quit: Leaving.]
<jhass> sphex: or you simply make it a runtime decorator with e.g. SimpleDelegator
chussenot has joined #ruby
<sphex> I sure missed them (multi-line) lambdas with some other language. I guess I gotta relearn how to use them.
gregf has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
Pwnna has left #ruby ["Leaving"]
simplyianm has quit [Remote host closed the connection]
Yiota has joined #ruby
<sphex> jhass: ok, lemme ri(1) that. thanks for the infos.
charliesome has joined #ruby
Xeago has joined #ruby
Muhannad has quit [Remote host closed the connection]
graft is now known as Guest3348
sfarley has quit [Remote host closed the connection]
serivich has joined #ruby
soxet has joined #ruby
gambl0re has quit [Ping timeout: 252 seconds]
marr has quit [Read error: Connection reset by peer]
bricker has quit [Ping timeout: 246 seconds]
jackjackdripper has joined #ruby
j4cknewt has quit [Remote host closed the connection]
shoutsid has quit [Read error: Connection reset by peer]
soxet has quit [Client Quit]
shoutsid has joined #ruby
soxet has joined #ruby
Musashi007 has joined #ruby
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zotherstupidguy has joined #ruby
shadoi has joined #ruby
soxet has left #ruby [#ruby]
MatthewsFace has joined #ruby
ruby-lang194 has joined #ruby
nathanstitt has quit [Quit: Laters]
soxet has joined #ruby
workmad3 has joined #ruby
j4cknewt has joined #ruby
<ruby-lang194> hi
momomomomo_ has joined #ruby
bricker has joined #ruby
ruby-lang452 has joined #ruby
<ruby-lang452> hi
momomomomo has quit [Ping timeout: 246 seconds]
momomomomo_ is now known as momomomomo
Xeago has quit [Remote host closed the connection]
<havenwood> hi
soxet has quit [Client Quit]
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruby-lang452 has quit [Client Quit]
soxet has joined #ruby
phutchins has quit [Ping timeout: 265 seconds]
ruby-lang194 has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 250 seconds]
Xiti has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
eggoez has quit [Ping timeout: 248 seconds]
mikecmpbll has joined #ruby
Xeago has joined #ruby
bnobu has joined #ruby
choke has joined #ruby
momomomomo has quit [Quit: momomomomo]
segfalt has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
MatthewsFace has joined #ruby
segfalt has quit [Client Quit]
yfeldblum has quit [Ping timeout: 248 seconds]
eggoez has joined #ruby
momomomomo has joined #ruby
bruno- has joined #ruby
dopie has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lavros has quit [Quit: leaving]
cvtsx1 has joined #ruby
pdoherty has quit [Quit: Leaving]
chouhoulis has joined #ruby
simplyianm has joined #ruby
Xeago has quit [Remote host closed the connection]
cvtsx has quit [Ping timeout: 246 seconds]
charliesome has quit [Quit: zzz]
maciejczyzewski has joined #ruby
lva has quit [Quit: Leaving...]
x1337807x has joined #ruby
cmisenas has quit [Quit: cmisenas]
vipaca has quit [Quit: Textual IRC Client: www.textualapp.com]
djbkd has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
maciejczyzewski has left #ruby [#ruby]
allomov has quit [Remote host closed the connection]
Xeago has joined #ruby
Alayde has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
zipace has quit [Read error: Connection reset by peer]
[spoiler] has quit [Quit: WeeChat 1.1]
Xeago has quit [Remote host closed the connection]
Alayde_ has quit [Ping timeout: 246 seconds]
djbkd has quit [Ping timeout: 248 seconds]
t0rrieri has joined #ruby
bertro has quit [Ping timeout: 256 seconds]
benlieb_ has quit [Quit: benlieb_]
bronson has quit [Remote host closed the connection]
Zai00 has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
nofxx has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nofxx has quit [Changing host]
nofxx has joined #ruby
gwendall has joined #ruby
_ixti_ has joined #ruby
zendrix has joined #ruby
yqt has joined #ruby
bf4 has quit [Ping timeout: 252 seconds]
kadoppe has quit [Ping timeout: 272 seconds]
ixti has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
charliesome has joined #ruby
kadoppe has joined #ruby
air_ has joined #ruby
startupality has quit [Quit: startupality]
<air_> hello
gwendall has quit [Ping timeout: 246 seconds]
<air_> how's ruby helpful in havking
<air_> havking
swgillespie has joined #ruby
<air_> hacking
choke has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
maciejczyzewski has joined #ruby
Xeago has joined #ruby
thelastinuit has quit [Quit: Textual IRC Client: www.textualapp.com]
zeroDivisible has joined #ruby
<miah> you can hack anything at ruby-lang.com
Pumukel has joined #ruby
<miah> anything at all. the only limit is yourself.
stryek_ has quit [Ping timeout: 252 seconds]
chussenot has quit [Quit: chussenot]
stryek has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dfockler> in case of a monarchy, rubies can help you have kings
vasilakisfil has quit [Ping timeout: 256 seconds]
nobitanobi has quit [Remote host closed the connection]
k3asd` has joined #ruby
Xeago has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
victortyau has joined #ruby
<air_> m saying regarding making of virus, pen testing
towski_ has quit [Remote host closed the connection]
<miah> try #metasploit
<air_> ya
benlieb_ has joined #ruby
Xeago has joined #ruby
tsvenson has quit [Ping timeout: 256 seconds]
<air_> dlocker ??
tsvenson has joined #ruby
dviola has quit [Quit: WeeChat 1.2]
RickHull has joined #ruby
Xeago has quit [Remote host closed the connection]
vdamewood has joined #ruby
Musashi007 has quit [Quit: Musashi007]
zotherstupidguy has quit [Ping timeout: 272 seconds]
_ht has quit [Quit: Konversation terminated!]
blue_deref has quit [Ping timeout: 246 seconds]
zotherstupidguy has joined #ruby
findaway has quit [Ping timeout: 246 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
allomov has joined #ruby
tsvenson has quit [Ping timeout: 255 seconds]
tsvenson has joined #ruby
s2013 has joined #ruby
hinbody has joined #ruby
momomomomo has quit [Quit: momomomomo]
s2013 has quit [Client Quit]
jfarmer has joined #ruby
charliesome has joined #ruby
air_ has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
finisherr has joined #ruby
platzhirsch has joined #ruby
Xeago has joined #ruby
Rodya_ has quit [Remote host closed the connection]
finisherr has quit [Client Quit]
marr has joined #ruby
giuseppesolinas has joined #ruby
Rodya_ has joined #ruby
momomomomo has joined #ruby
Pentan_p has joined #ruby
serivich has quit [Ping timeout: 248 seconds]
baweaver has quit [Remote host closed the connection]
nobitanobi has joined #ruby
Chemist has quit [Ping timeout: 246 seconds]
peter_paule has joined #ruby
<musty> metasploit, for virii?
Zai00 has quit [Quit: Zai00]
<musty> weird.
<_blizzy_> I like what github did for their logo.
lxsameer has joined #ruby
lxsameer has joined #ruby
fantazo has joined #ruby
<shevy> that rainbow thing?
symm- has joined #ruby
<_blizzy_> yes.
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<_blizzy_> shows that github is supporting lgbt.
<_blizzy_> :)
Yiota has joined #ruby
commondr_ has quit [Remote host closed the connection]
khebbie has joined #ruby
blue_deref has joined #ruby
zenguy_pc has quit [Read error: No route to host]
momomomomo has quit [Ping timeout: 250 seconds]
MatthewsFace has joined #ruby
<miah> considering their HQ is in San Francisco, it would be really dumb of them not to.
<miah> but honestly, the startup space tends to be horrible for LGBT people.
<ytti> it's non-optional opinion to have
Respek has quit [Quit: Textual IRC Client: www.textualapp.com]
momomomomo has joined #ruby
<ytti> to have survivable product
<eam> miah: relative to other industries?
platzhirsch has quit [Remote host closed the connection]
<miah> eam: eh, somewhat.
<ytti> (personally, i'm pro lbgt)
<jhass> ?ot
<ruboto> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<jhass> nonetheless ;)
<miah> i am the T in LGBT so.. ya.
<ytti> but i'm somewhat annoyed how technology and politics are being mixed
<miah> agree =)
<miah> well
<miah> agree with offtopic
<jhass> politics go over there please :)
<miah> indeed
commondream has joined #ruby
chussenot has joined #ruby
Al3ks has quit [Remote host closed the connection]
khebbie has quit [Client Quit]
Versality has quit [Quit: Be back later ...]
vasilakisfil has joined #ruby
allomov has quit [Remote host closed the connection]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
revoohc has quit [Quit: revoohc]
Xeago has quit [Remote host closed the connection]
allomov has joined #ruby
<_blizzy_> I'm the G in LGBT.
<_blizzy_> but that's another topic. when does ruby 2.2.3 come out.
<_blizzy_> what version are we at anyway.
<jhass> /topic
<_blizzy_> oh, thanks.
kdfjioe22 has joined #ruby
<mozzarella> I'm the V in LGBTV
<_blizzy_> sorry about yesterday also, jhass
<jhass> not sure 2.2.3 will happen, 2.3 is scheduled in december iirc
<sphex> he came out, why can't 2.2.3?
<_blizzy_> I hope we can start off on the right foot.
<_blizzy_> :)
<havenwood> Rainbows!
<_blizzy_> or left.
<adaedra> But what if...
kdfjioe22 has left #ruby [#ruby]
<miah> why do we need 2.2.3?
<miah> i dont want more CVE :(
<adaedra> we need 3.1.4
<_blizzy_> ^
<adaedra> then, 3.1.4.5
<adaedra> then, 3.1.4.1*
<adaedra> skipped a number there
<_blizzy_> then 3.1.4.1.5.9.2.6.5.3.5
<_blizzy_> keep going with the versions.
<sphex> just like TeX
peter_paule has quit [Ping timeout: 256 seconds]
<adaedra> Ugh, TeX.
<havenwood> I await the celebration when JRuby achieves *over* 9000.
<_blizzy_> never really played with JRuby
<_blizzy_> I'll stick to Java and Scala
<adaedra> XeTeX 3.14159265-2.6-0.99991 (TeX Live 2014)
charliesome has quit [Quit: zzz]
<havenwood> _blizzy_: Try a little Ruby in your Scala. ;)
<_blizzy_> havenwood, what.
<havenwood> _blizzy_: RedBridge
<_blizzy_> oh.
jderose has joined #ruby
Pentan_p has quit []
millerti has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<_blizzy_> I should touch up on my php, go, and java.
bartender has quit [Ping timeout: 246 seconds]
<_blizzy_> no ruby project ideas tho c:
<adaedra> Take over the world.
<adaedra> Sounds like a good ruby project.
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<_blizzy_> require 'world'; world.takeover
yfeldblum has joined #ruby
bartender has joined #ruby
Indian has quit [Ping timeout: 265 seconds]
zenguy_pc has joined #ruby
hck89 has joined #ruby
nobitanobi has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pengin has joined #ruby
<momomomomo> looool touch up on java
<momomomomo> I treat that as a JIT skill
<momomomomo> Fuck, need to write a ton of java this month? Quick, read Core Java
allomov has quit [Remote host closed the connection]
<momomomomo> takes like 3 days if you do it straight, doing ~25-50% of exercises
shadoi has quit [Quit: Leaving.]
<_blizzy_> well, java has jobs. plus I'm ok with java.
__butch__ has joined #ruby
<_blizzy_> which is why I said php also, and go just for fun.
<momomomomo> Ruby has jobs :P
jenrzzz has joined #ruby
<_blizzy_> yeah but ruby is my strongest language atm imo
<momomomomo> any language has jobs, just depends on what you want to do
<_blizzy_> I'd rather touch up on languages I'm not as strong with.
<momomomomo> troof
<eam> _blizzy_: write a ruby extension in another language
<maciejczyzewski> something really bad... 0.1 + 0.2 == 0.3 ruby says false???
chouhoulis has quit [Remote host closed the connection]
<ljarvis> maciejczyzewski: that's intentional
<eam> maciejczyzewski: they are in fact different
<ljarvis> don't compare floats
StanAlanMcM has quit [Quit: Leaving]
<jhass> maciejczyzewski: welcome to the joys of floating point arithmetic
<maciejczyzewski> omg
<momomomomo> if you want to compare decimals, use BigDecimal
doodleha_ has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
benlieb_ has quit [Quit: benlieb_]
<maciejczyzewski> i will read, thx
<eam> maciejczyzewski: computers use base 2, and while numbers like .1 are terminating decimals in base 10 they are not necessarily in base 2
<eam> changing the number base changes which fractional values can be represented with precision
<maciejczyzewski> in other langs it works correct ;)
Lucky___ has joined #ruby
<eam> maciejczyzewski: that's probably untrue
<maciejczyzewski> pffuu... python...
<eam> it's IEEE floats in all cases
<Aria> very few do this.
<maciejczyzewski> node/javascript works ok
<ljarvis> haha
<ljarvis> "javascript works ok"
<ljarvis> said noone ever
chussenot has quit [Quit: chussenot]
benlieb_ has joined #ruby
Versality has joined #ruby
endash has joined #ruby
GPrime has joined #ruby
<eam> maciejczyzewski: you are wrong btw, it is false in python
rocknrollmarc has joined #ruby
<Aria> > 0.2 + 0.1 == 0.3
<Aria> false
<Aria> (also node)
rocknrollmarc has quit [Remote host closed the connection]
<momomomomo> most sane languages will provide false
<Aria> Javascript works okay.
<_blizzy_> javascript works ok
<eam> it will be false in any language which implements IEEE floating point, including perl, python, ruby, C, C++
<Aria> (there, now someone's said it)
<eam> javascript doesn't have proper numerics
<momomomomo> are you shitting me?
<eam> it's actually broken in that it works
<Aria> Well, depending on how you define proper.
scripore has joined #ruby
<eam> Aria: defined by the IEEE flaoting point specification
bf4 has joined #ruby
shum has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
<eam> we have standards for that and it's built into our CPU :)
<Aria> Javascript has only one number type! \o/ ... it's IEEE double .... /m\
<_blizzy_> what about in php
<havenwood> maciejczyzewski: Try with Rationals instead of Floats: 0.2r + 0.1r == 0.3r
<eam> _blizzy_: php is just like everyone else (returns false)
towski_ has joined #ruby
<_blizzy_> eam, oh ok. thxs.
<havenwood> maciejczyzewski: If you want to compare Floats you'll want to check that they're within delta of each other or have a relative error less than epsilon.
<maciejczyzewski> havenwood: yeap
<havenwood> maciejczyzewski: And if you use Floats with money please tell me where so I can get rich.
<adaedra> :>
<maciejczyzewski> xd
<havenwood> Those pennies add up!
<adaedra> Money money money ♫
<jderose> Hey all, I'm having an odd issue trying to require aws-sdk --> https://gist.github.com/jcderose/f79c532ba5e12d96f52e
Versality has quit [Ping timeout: 256 seconds]
<_blizzy_> I'm trying to give atom a chance
<chrisseaton> maciejczyzewski: another way to think about it is that there are an uncountable number of real numbers, so of course your computer isn't going to be able to represent them all as it only has finite RAM
phutchins has joined #ruby
bf4 has quit [Ping timeout: 246 seconds]
zotherstupidguy has quit [Ping timeout: 256 seconds]
yardenbar has quit [Ping timeout: 244 seconds]
JoshL has quit []
zendrix has quit [Remote host closed the connection]
bartender has quit [Read error: Connection reset by peer]
bartender has joined #ruby
zendrix has joined #ruby
bartender has quit [Client Quit]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
scripore has quit [Quit: This computer has gone to sleep]
nahtnam has quit [Quit: Connection closed for inactivity]
findaway has joined #ruby
Al3ks has joined #ruby
simplyianm has quit [Ping timeout: 272 seconds]
zz_Outlastsheep is now known as Outlastsheep
ndrei has joined #ruby
charliesome has joined #ruby
ldnunes has quit [Quit: Leaving]
chipotle has quit [Quit: cheerio]
findaway has quit [Ping timeout: 272 seconds]
<_blizzy_> I think I'll add a plugin system to my bot
<_blizzy_> once I get battles working with ruby.
bnobu has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
simplyianm has joined #ruby
_joliv has quit [Ping timeout: 264 seconds]
peter_paule has joined #ruby
<jfarmer> jderose I assume you've run `bundle install`?
sp4rrow_ has joined #ruby
Yiota has joined #ruby
findaway has joined #ruby
Yiota has quit [Client Quit]
Yiota has joined #ruby
yardenbar has joined #ruby
momomomomo has quit [Quit: momomomomo]
x1337807x has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
<jderose> jfarmer yes and that didn't work. I should also mention I'm running this via test kitchen for a VM. I found an article that mentioned the Chef built-in ruby might have a different gem path than the VM's Ruby installation.
<jfarmer> jderose How are you running Chef?
<jfarmer> jderose Also, you can print out the library path
simplyianm has joined #ruby
ndrei has quit [Ping timeout: 276 seconds]
<jfarmer> It's the $LOAD_PATH variable, so you can actually check if it differs between Chef and (say) irb.
x1337807x has quit [Client Quit]
roolo has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
failshell has joined #ruby
vasilakisfil has quit [Ping timeout: 256 seconds]
<jderose> jfarmer shouldn't my Gemfile tell the recipe to look for the aws-sdk gem at rubygems.org?
finisherr has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Yiota has joined #ruby
GPrime has quit [Quit: Textual IRC Client: www.textualapp.com]
baweaver has joined #ruby
zotherstupidguy has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
<miah> if you're using chef omnibus, its all in /opt/chef/embedded
sinkensabe has joined #ruby
sdwrage2 has joined #ruby
<jderose> miah, I'm using chef omnibus
simplyianm has joined #ruby
ndrei has joined #ruby
shoutsid has quit [Remote host closed the connection]
<jfarmer> jderose That's not how Gemfiles work.
<jfarmer> jderose The "source" line only tells bundler where to download the gems from.
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
enebo has quit [Quit: enebo]
<jderose> Also, to answer your other question: I'm running Chef via test kitchen (which loads the Chef omnibus)
<miah> so, chef is getting installed automatically by test-kitchen in the environment being tested (a vm)
sinkensabe has quit [Remote host closed the connection]
<miah> bundler doesnt really come into play
<miah> unless you are using a custom deployment (and not chef omnibus)
gambl0re has joined #ruby
ledestin has joined #ruby
mfranzwa has quit [Quit: mfranzwa]
wildroman2 has joined #ruby
<miah> now, bundler may come into play _locally_ with your cookbook and test-kitchen. but probably not.
scripore has joined #ruby
<jfarmer> miah My first guess was that whatever was running the code wasn't using "bundle exec ..."
eggoez has quit [Ping timeout: 248 seconds]
<miah> but honestly, the best place for chef questions is #chef
baweaver has quit [Remote host closed the connection]
sinkensabe has joined #ruby
baweaver has joined #ruby
sdwrage_ has joined #ruby
<miah> there is no bundle exec with chef
<jderose> I'll check out #chef
peter_paule has quit [Ping timeout: 264 seconds]
<jfarmer> miah Fair enough.
<miah> unless you are running from a Gemfile, which _nobody_ does
<miah> (apart from me)
s2013 has joined #ruby
mfranzwa has joined #ruby
Pwnna has joined #ruby
finisherr has quit [Quit: finisherr]
<jderose> exit
jderose has left #ruby [#ruby]
Pwnna has left #ruby ["Leaving"]
<miah> try /part or /quit ;)
jackjackdripper1 has quit [Quit: Leaving.]
jderose has joined #ruby
jderose has left #ruby [#ruby]
raelon has joined #ruby
raelon has quit [Client Quit]
craysiii has joined #ruby
choke has joined #ruby
soxet has quit [Quit: Leaving]
A205B064 has joined #ruby
mfranzwa has quit [Quit: mfranzwa]
chipotle has joined #ruby
vasilakisfil has joined #ruby
mfranzwa has joined #ruby
dgutierrez1287 has joined #ruby
allomov has joined #ruby
wildroman2 has quit [Remote host closed the connection]
eggoez has joined #ruby
revoohc has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
ruv has quit [Remote host closed the connection]
craysiii has quit [Quit: craysiii]
FernandoBasso has joined #ruby
zendrix has quit [Remote host closed the connection]
simplyianm has joined #ruby
jackjackdripper has joined #ruby
zendrix has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
failshel_ has joined #ruby
hinbody has quit [Quit: leaving]
wildroman2 has quit [Ping timeout: 256 seconds]
gwendall has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zendrix has quit [Ping timeout: 264 seconds]
failshell has quit [Ping timeout: 250 seconds]
Al3ks has quit [Read error: Connection reset by peer]
failshell has joined #ruby
failshel_ has quit [Ping timeout: 265 seconds]
zendrix has joined #ruby
Zamyatin has joined #ruby
revoohc has quit [Quit: revoohc]
renderful has joined #ruby
jerius has quit [Quit: /quit]
gwendall has quit [Ping timeout: 265 seconds]
dopie has quit [Quit: This computer has gone to sleep]
robustus has quit [Ping timeout: 255 seconds]
aryaching has joined #ruby
renderfu_ has quit [Ping timeout: 252 seconds]
dopie has joined #ruby
craysiii has joined #ruby
sdwrage_ has left #ruby ["Leaving"]
robustus has joined #ruby
failshell has quit [Ping timeout: 256 seconds]
vdamewood has quit [Quit: Life beckons.]
chipotle has quit [Quit: cheerio]
lordkryss has joined #ruby
chipotle has joined #ruby
spider-mario has quit [Remote host closed the connection]
failshell has joined #ruby
choke has joined #ruby
decoponio has quit [Read error: Connection reset by peer]
devdazed has quit [Ping timeout: 246 seconds]
sinkensabe has quit [Remote host closed the connection]
decoponio has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
choke has quit [Client Quit]
bf4 has joined #ruby
wallerdev_ has joined #ruby
sinkensabe has joined #ruby
njs126 has quit [Ping timeout: 256 seconds]
victortyau has quit [Quit: Leaving]
simplyianm has joined #ruby
Azure has joined #ruby
agent_white has quit [Quit: until tonight]
pengin has quit [Remote host closed the connection]
santana has joined #ruby
choke has joined #ruby
senayar has joined #ruby
failshell has quit [Ping timeout: 252 seconds]
<musty> 6
endash has quit [Quit: endash]
bf4 has quit [Ping timeout: 272 seconds]
failshell has joined #ruby
uber has quit [Ping timeout: 244 seconds]
<jhass> 7
kobain has joined #ruby
ReD-BoY_ has quit [Read error: Connection reset by peer]
<adaedra> 10
simplyianm has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
rubie has quit [Remote host closed the connection]
Outlastsheep is now known as zz_Outlastsheep
dgutierrez1287 has quit [Remote host closed the connection]
simplyianm has joined #ruby
zotherstupidguy has quit [Ping timeout: 272 seconds]
<havenwood> 11
<jhass> 14
zotherstupidguy has joined #ruby
<Senjai> 2015
<havenwood> >> 6.upto(9).map { |n| n.to_s(8).to_i }
<ruboto> havenwood # => [6, 7, 10, 11] (https://eval.in/388281)
<havenwood> Squarefree numbers congruent to 2 or 3 mod 4. ;)
<havenwood> Hem, what's that in Ruby..
<jhass> http://oeis.org/A014689 a(n) = prime(n)-n, the number of nonprimes less than prime(n).
jenrzzz has quit [Ping timeout: 252 seconds]
axl_ has quit [Quit: axl_]
riotjone_ has joined #ruby
axl_ has joined #ruby
<jhass> Senjai broke it though
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
<jhass> "Numbers which cannot be written as a sum of squares > 1" too
rbennacer has quit [Ping timeout: 264 seconds]
failshell has quit [Ping timeout: 256 seconds]
santana has quit [Ping timeout: 250 seconds]
baweaver has quit [Remote host closed the connection]
<jhass> hrm, there are quite a few with 6,7,10,11,14
<jhass> but not a single one that has 2015 next
<havenwood> heh, yup
finisherr has joined #ruby
riotjones has quit [Ping timeout: 246 seconds]
k3asd` has quit [Ping timeout: 246 seconds]
aryaching has quit [Read error: Connection reset by peer]
failshell has joined #ruby
<sphex> classic Senjai
sp4rrow_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aryaching has joined #ruby
sp4rrow_ has joined #ruby
<jhass> there's one with 6,7,10,11,14,15,20
findaway has quit [Ping timeout: 265 seconds]
<jhass> Numbers n such that S(n) is a palindromic prime, where S(n) is the Kempner function A002034
[H]unt3r has quit []
rubie has joined #ruby
<adaedra> Stop breaking fun, Senjai!
<sphex> so I just noticed that ruby seems to have built-in bignum support. that's nice.
uber has joined #ruby
<sphex> not sure what I'm gonna do with them since I'm not numerate :/
PaulCapestany has quit [Ping timeout: 248 seconds]
<adaedra> >> 123456789123456789123456789.class
<ruboto> adaedra # => Bignum (https://eval.in/388288)
<adaedra> It's automatic and transparent, iirc
B1n4r10 has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
failshel_ has joined #ruby
failshell has quit [Ping timeout: 272 seconds]
<sphex> adaedra: oh yeah.. I see them turning from Fixnum to Bignum starting from 2**30.
<zenspider> yup yup.
<zenspider> 2 bits used to encode types into the pointers
<sphex> I guess ruby must be using Lisp-like tagged pointers.
<zenspider> exactly
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
<sphex> ah
micmus has quit [Quit: Leaving]
Ox0dea has joined #ruby
fantazo has quit [Quit: Verlassend]
<Ox0dea> >> (0..10).map { |id| ObjectSpace._id2ref(id) rescue :unused }
<ruboto> Ox0dea # => [false, 0, true, 1, nil, 2, :unused, 3, :unused, 4, :unused] (https://eval.in/388289)
<havenwood> >> require 'prime'; 6.upto(Float::INFINITY).lazy.select { |n| (n ** 3 - n + 1).prime? }.first 6
<ruboto> havenwood # => [6, 7, 10, 11, 14, 15] (https://eval.in/388290)
<Ox0dea> Huh, those are very different results than I see on my 64-bit machine.
<havenwood> Ox0dea: => [false, 0, 2.0, 1, :unused, 2, -2.0, 3, nil, 4, 2.0000000000000004]
musty has quit [Changing host]
musty has joined #ruby
<Ox0dea> Yep, those're mine.
doodleha_ has quit [Remote host closed the connection]
<musty> 13
al2o3-cr1 has joined #ruby
blackmesa has joined #ruby
jfarmer has quit [Quit: Textual IRC Client: www.textualapp.com]
pengin has joined #ruby
axl_ has quit [Quit: axl_]
al2o3-cr has quit [Ping timeout: 256 seconds]
axl_ has joined #ruby
<sphex> oh great.. I see ruby has a Rational class too. Too bad integer division doesn't yield a rational by default, then it would have been just like Scheme's numeric tower.
<zenspider> require "mathm"
<zenspider> oops. mathn
<havenwood> >> require 'mathn'; 1.0 + 2.0 == 3.0
<ruboto> havenwood # => true (https://eval.in/388291)
<sphex> nice!
<zenspider> and latest versions of ruby have an "r" suffix
swgillespie has joined #ruby
<zenspider> >> 2/3r
<ruboto> zenspider # => (2/3) (https://eval.in/388292)
<sphex> is this a global effect though? could be a bit dangerous for other code...
axl_ has quit [Client Quit]
<zenspider> >> require "mathn"; 2/3
<ruboto> zenspider # => (2/3) (https://eval.in/388293)
<zenspider> sphex: yup
<adaedra> neato
jenrzzz has joined #ruby
<zenspider> 2/3r is a better route to go
<sphex> yeah ok
<Ox0dea> >> [2 / 3, require('mathn'), 2 / 3]
<ruboto> Ox0dea # => [0, true, (2/3)] (https://eval.in/388294)
<Ox0dea> So not quite "global".
<zenspider> well, yes it is. as soon as your require it all math uses rationals
Zamyatin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zenspider> but even with "r" you're still potentially sending a rational down a code pipeline that doesn't expect it.
wildroman2 has quit [Ping timeout: 264 seconds]
nobitanobi has quit [Remote host closed the connection]
<hal_9000> i don’t think i even covered “r” in the book :-/
<sphex> ah right, an it'll stay a rational and "propagate" even if it represents an integer?
wildroman2 has joined #ruby
qhartman has joined #ruby
<zenspider> hal_9000: it's very new, no?
<zenspider> I thought 2.2+
failshel_ has quit [Ping timeout: 264 seconds]
<hal_9000> i think so yes
<sphex> works on 2.1.6 here
<hal_9000> oh ok
<zenspider> sphex: mmm... no, I think it _should_ downcast itself. oops. no, it doesn't.
<zenspider> >> 2/3r * 3/2r
<ruboto> zenspider # => (1/1) (https://eval.in/388295)
<hal_9000> anyway, it *could* have got into 3rd ed and maybe should have
<sphex> zenspider: without "mathn", I guess it shouldn't downcast since calculations could "derationalize" themselves in the middle of it.
<adaedra> >> 1/2r * 3
<ruboto> adaedra # => (3/2) (https://eval.in/388296)
<Ox0dea> 21>> 1r
<ruboto> Ox0dea # => (1/1) (https://eval.in/388297)
<Ox0dea> 21>> RUBY_VERSION
<ruboto> Ox0dea # => "2.1.3" (https://eval.in/388298)
<adaedra> it may be fine to have a rationnal leak
casadei has quit [Remote host closed the connection]
<zenspider> sphex: good point
lxsameer has quit [Quit: Leaving]
<hal_9000> sphex: are you feeling waspish?
<Ox0dea> >> 1ri
<ruboto> Ox0dea # => (0+(1/1)*i) (https://eval.in/388299)
<zenspider> ugh.
<Ox0dea> Does any other language support multiple numeric suffixes?
<zenspider> ruby_parser still doesn't handle these. :(
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
failshell has joined #ruby
aryaching has quit [Ping timeout: 264 seconds]
wildroman2 has quit [Read error: Connection reset by peer]
<sphex> zenspider: thanks for the infos
Sin90 has joined #ruby
<zenspider> no prob! that's what I'm here for
wildroman2 has joined #ruby
commondream has quit []
failshel_ has joined #ruby
<sphex> hal_9000: yeah... picked my nick from GEB
<hal_9000> a classic book, i need to reread it
<dfockler> elixir is kind of weird
failshel_ has quit [Read error: No route to host]
failshel_ has joined #ruby
freerobby has quit [Quit: Leaving.]
<hal_9000> dfockler - probably :) in what way?
roolo has quit [Remote host closed the connection]
<dfockler> it's like functional ruby
neanderslob has joined #ruby
horsecowdog has quit [Remote host closed the connection]
<hal_9000> sort of. i’m liking it, but the learning curve is a bit steep for me
<havenwood> Ox0dea: Try in Clojure: 36rOMGWTFBBQ #=> 69467462247446
<dfockler> I'm going through the Ètudes book
axilla has quit [Read error: Connection reset by peer]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
simplyianm has quit [Read error: Connection reset by peer]
<zenspider> havenwood: you can do that in smalltalk too
balazs has joined #ruby
<zenspider> >> "OMGWTFBBQ".to_i 36
<ruboto> zenspider # => 69467462247446 (https://eval.in/388306)
failshell has quit [Ping timeout: 255 seconds]
bf4 has joined #ruby
<zenspider> not quite the same ring to it
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dx7 has quit [Quit: Leaving...]
<dfockler> ringy enough for me
failshell has joined #ruby
<havenwood> >> Integer("OMGWTFBBQ", 36)
<ruboto> havenwood # => 69467462247446 (https://eval.in/388307)
rubie has quit [Remote host closed the connection]
simplyianm has joined #ruby
swgillespie has joined #ruby
bronson has quit [Remote host closed the connection]
<hal_9000> i like eating 3735928559.to_s(16)
<havenwood> zenspider: (string->number "OMGWTFBBQ" 36)
<craysiii> lol
rubie has joined #ruby
bruno- has quit [Quit: Lost terminal]
failshel_ has quit [Ping timeout: 276 seconds]
balazs has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
<_blizzy_> https://stackoverflow.com/ look at the logo
bf4 has quit [Ping timeout: 256 seconds]
bruno- has joined #ruby
<craysiii> colors are gud
<maciejczyzewski> new? like github... but only for today
<adaedra> yeah, lot of sites have a rainbow logo
<_blizzy_> this makes me like Github and SO more.
<maciejczyzewski> adaedra: yeap
last_staff has quit [Quit: off to catch some Zs]
<adaedra> I saw one on reddit
arescorpio has joined #ruby
<_blizzy_> yeah, makes me like Reddit more too. :) I'm gay, so this is a great day.
<adaedra> I hope it angers the anti- crowd.
phutchins has quit [Ping timeout: 265 seconds]
<_blizzy_> yeah.
<_blizzy_> feed me your tears.
<craysiii> like OMG im so bad
<craysiii> how can we treat people as PEOPLE
simplyianm has quit [Read error: Connection reset by peer]
<zenspider> remember to use minitest/pride folks
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<havenwood> \o/
<maciejczyzewski> zenspider: why?
renderful has quit [Remote host closed the connection]
simplyianm has joined #ruby
Palmer11 has quit [Quit: Palmer11]
balazs has joined #ruby
<adaedra> DeviantArt, too, and Twitter adds rainbow hearts next to #LoveWins
<Ox0dea> maciejczyzewski: Because fabulous runs?
mfranzwa has quit [Quit: mfranzwa]
<adaedra> Comments are so annoying tho -_-
blackmes1 has joined #ruby
sfarley has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Client Quit]
<maciejczyzewski> bye bye, folks
<zenspider> wait no
<zenspider> view that first
<maciejczyzewski> poland is going to sleep...
<maciejczyzewski> zenspider: ok, one minute
__butch__ has quit [Quit: Linkinus - http://linkinus.com]
blackmesa has quit [Ping timeout: 255 seconds]
<zenspider> it's short
dopie has quit [Quit: This computer has gone to sleep]
snockerton has quit [Quit: Leaving.]
dented42 has joined #ruby
gwendall has joined #ruby
balazs has quit [Ping timeout: 252 seconds]
jlast has joined #ruby
<maciejczyzewski> zenspider: ooowwww... fancy
<dfockler> if you're using rspec you can use the nyan cat formatter
jlast has quit [Remote host closed the connection]
<maciejczyzewski> zenspider: like your blog too ;)
<maciejczyzewski> bb
<adaedra> maciejczyzewski: you go into space?
<adaedra> -go
jlast has joined #ruby
Rodya_ has quit [Remote host closed the connection]
dented42 has quit [Max SendQ exceeded]
failshell has quit [Ping timeout: 256 seconds]
<maciejczyzewski> adaedra: using my magic spacecraft...
<maciejczyzewski> bb
maciejczyzewski has left #ruby [#ruby]
dented42 has joined #ruby
<zenspider> I think someone did nyan for minitest too
gwendall has quit [Ping timeout: 252 seconds]
scripore has joined #ruby
jlast has quit [Ping timeout: 276 seconds]
<zenspider> drbrain: ping
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Schmidt has quit [Ping timeout: 244 seconds]
<drbrain> pong
<zenspider> hey. just commented on that ticket
<zenspider> wrt security... that is
<zenspider> 1) do you have any idea what's wrong with my old cert? It just says "invalid".
<zenspider> 2) is there a way to update the old cert such that ALL of my gems aren't invalidated?
<zenspider> 3) if no and no, is there a way to generate a cert that either works with ssh-agent or is passphraseless so it doesn't bug me when I package and release?
whippythellama has quit [Quit: WeeChat 1.2]
MatthewsFace has quit [Read error: Connection reset by peer]
MatthewsFace has joined #ruby
Schmidt has joined #ruby
baweaver has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
<zenspider> anyone else who understands rubygems + security is welcome to jump in too.
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
zendrix has quit [Read error: Connection reset by peer]
zendrix has joined #ruby
GitGud has quit [Read error: Connection reset by peer]
baweaver has quit [Ping timeout: 252 seconds]
<drbrain> the old cert probably expired
noob__ has joined #ruby
<drbrain> openssl x509 -noout -text -in old_cert will say
<drbrain> (check dates)
<drbrain> you can strip the passphrase from the cert and RubyGems won't care
swgillespie has quit [Ping timeout: 256 seconds]
lolmaus has quit [Quit: Konversation terminated!]
<zenspider> hrm. no, still valid
<zenspider> Not Before: Sep 17 23:07:07 2014 GMT Not After : Sep 17 23:07:07 2015 GMT
<zenspider> tho the file format is slightly different
charliesome has quit [Quit: zzz]
<zenspider> the new one has Proc-Type and DEC-Info
<drbrain> I think those two entries are for the password on the .pem
<zenspider> clue on how to strip passphrase?
balazs has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<zenspider> ahhh... so if I nuke those lines it'll be clear of it?
nobitanobi has joined #ruby
<zenspider> that can't be right
<drbrain> try: openssl rsa -in privateKey.pem -out newPrivateKey.pem
charliesome has joined #ruby
<noob__> .
swills has quit [Quit: leaving]
<drbrain> the stupid thing about this security method is that you can't install from expired certs because there's no way to verify a certificate was properly signed way back when without a trusted third party
<zenspider> that stripped the passphrase
<zenspider> I can build and install with HighSecurity
<drbrain> so I think the other person in the ticket needs to trust your certificate
<finisherr> I’m getting a notification that I can’t re-push the same version and to try gem yank but I already yanked
Muhannad has joined #ruby
<finisherr> is it cached or something?
<drbrain> finisherr: you need to push a new version
<drbrain> if 1.2.3 was bad, yank, then push 1.2.4
<finisherr> Ok, thats fine
<finisherr> ok
<drbrain> otherwise people don't know if they have the good one or the bad one
<bricker> yank is for removing bad versions, but you can't ever push the same version twice
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<finisherr> yeah, good call
<finisherr> this will be 0.0.2
<finisherr> : )
noob__ has quit []
dfockler has quit []
noob has joined #ruby
balazs has quit [Ping timeout: 252 seconds]
GitGud has joined #ruby
<zenspider> drbrain: so, suggestions on what to do about publishing w/ a new cert? as soon as I sync that up it means all my gems are invalid
dgutierrez1287 has joined #ruby
PaulCapestany has joined #ruby
<noob> yo
<zenspider> I guess my cert is "invalid" (still not sure why?), but an install of the published minitest under Medium w/ the new certs out there flat out blow up. makes the gem look compromised
<finisherr> nice, my vagrant plugin works!
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phutchins has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
<drbrain> zenspider: since we don't have a central certificate registry or signing service you'll need to pre-distribute the new cert
<drbrain> or sign the new cert with the old one
<zenspider> mmmm. what does that mean? that the new one will refer to the old one too?
<drbrain> it will be "issued by" the old one, but when the old one eventually expires it can invalidate the new one too
<zenspider> that sounds like a screw
simplyianm has joined #ruby
<drbrain> yeah, to be effective all the certificates should be signed by a CA somewhere
<drbrain> the same way website certificates work
<drbrain> but I sure don't have the security chops to write such a thing
shinnya has joined #ruby
<zenspider> % rm -rf xxx; gem i -i xxx -P MediumSecurity minitest -N
<zenspider> trusted root certificate /CN=ryand-ruby/DC=zenspider/DC=com checksum does not match signing root certificate checksum
<zenspider> that's with the new one trusted
_blizzy_ has quit [Ping timeout: 248 seconds]
<zenspider> oh! wait. I must have been tired last night
<zenspider> if I --add the old cert, everything Just Works™.
<zenspider> (actually, drunk)
<drbrain> huh
<zenspider> it's the --add part that I think nobody understands
<drbrain> yep
<drbrain> so much manual labor
<zenspider> mmmm... `curl ... | gem cert --add -` doesn't work
serivich has joined #ruby
swgillespie has joined #ruby
finisherr has quit [Quit: finisherr]
vickleton has quit [Ping timeout: 246 seconds]
<drbrain> lib/rubygems/commands/cert_command.rb line 18 uses File.read which doesn't treat '-' specially
finisherr has joined #ruby
chipotle has quit [Quit: cheerio]
al2o3-cr2 has joined #ruby
sankaber has joined #ruby
<zenspider> so, other than having cacert.org as my SSL cert for my https not be in ppl's root chain, my shit is actually working
<zenspider> I'm not sure how to tell curl that cacert.org is OK for https
marr has quit [Ping timeout: 244 seconds]
finisherr has quit [Client Quit]
chipotle has joined #ruby
finisherr has joined #ruby
al2o3-cr1 has quit [Ping timeout: 252 seconds]
serivich has quit [Ping timeout: 244 seconds]
<drbrain> I think you add it to Keychain
<zenspider> curl doesn't use that, unfortunately
DLSteve has quit [Quit: Leaving]
pl1ght has quit [Ping timeout: 276 seconds]
pl1ght has joined #ruby
AndroidLoverInSF has quit [Quit: Leaving]
Casey has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_ixti_ has quit [Ping timeout: 248 seconds]
<miah> you can use curl --capath <CA certificate directory>
bf4 has joined #ruby
finisherr has quit [Quit: finisherr]
allomov has quit [Remote host closed the connection]
<zenspider> I just tried --cacert w/ the rootfile.... but I get curl: (51) SSL: certificate verification failed (result: 5)
finisherr has joined #ruby
<zenspider> man I hate security. terribly obfuscated. terribly documented. ugh ugh ugh
bronson has joined #ruby
<miah> if you want to just kick it.. use -k =)
dented42 has joined #ruby
<miah> -k == --insecure. it will use ssl. but it wont verify
<drbrain> /usr/bin/curl says it uses SecureTransport, which I would think meant Keychain but obviously doesn't work o_O
<zenspider> I'm trying to come up with a sequence that the security wonks will use w/o jumping down my throat
Soda has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
<miah> ah
bronson has joined #ruby
charliesome has quit [Quit: zzz]
<miah> odd that --cacert is giving you an error
<zenspider> drbrain: yeah. I found some stuff on SO that says the github blowup last year was digicert having a revoked cert in keychain. the fix was to remove it and then curl worked again.
<zenspider> miah: not sure I'm doing it right
wallerdev_ has quit [Quit: wallerdev_]
<zenspider> I'm the whitest hat ever
<miah> what is the full command you're trying?
<zenspider> curl -o cacert.root.crt https://www.cacert.org/certs/root.crt; curl --cacert cacert.root.crt https://www.zenspider.com/~ryan/gem-public_cert.pem
<zenspider> I definitely have cacert's root cert in my keychain and approved
bf4 has quit [Ping timeout: 244 seconds]
<zenspider> and just verified that my curl is /usr/bin/curl, so it _should_ use keychain
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
<miah> ok
<miah> so its failing on downloading the cert from cacert.org over https
<miah> kind of a chicken -> egg problem
<drbrain> 2. says --cacert doesn't work with Apple curl
MatthewsFace has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
finisherr has quit [Quit: finisherr]
charliesome has quit [Client Quit]
RegulationD has quit [Remote host closed the connection]
nobitanobi has quit [Ping timeout: 244 seconds]
<zenspider> miah: haha. *sigh*
icebourg has quit []
<zenspider> I just tried that `openssl s_client` thing against my server and it does say:
<zenspider> depth=1 /O=Root CA/OU=http://www.cacert.org/CN=CA Cert Signing Authority/emailAddress=support@cacert.org
<zenspider> verify error:num=19:self signed certificate in certificate chain
<zenspider> so, I guess that's probably the same thing
<miah> you basically have to -k the initial download of cacerts ca.crt; then you can use that on your next requrest
aphprentice has quit [Remote host closed the connection]