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/
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<texasmade> I'm missing something minor here and it's bugging me. I'm getting two numbers and storing them each in a variable (x, y), but when i sum = x+y and puts #{sum} it gives me the number mashed together
zendrix has quit []
<texasmade> example 1 + 3 = 13
<Ox0dea> texasmade: You're using strings.
<Ox0dea> >> [1 + 3, '1' + '3']
<texasmade> derp
deepu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<ruboto> Ox0dea # => [4, "13"] (https://eval.in/407016)
<texasmade> I miss small details when i don't get enough sleep. Thanks
<Ox0dea> Sure thing.
casadei_ has quit [Remote host closed the connection]
casadei_ has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
scripore has joined #ruby
mary5030 has quit [Ping timeout: 244 seconds]
pauly_oc has quit [Ping timeout: 240 seconds]
<hays> what is a sensible pattern for handling a pair of persistent TCP connections? do I need threads for this?
<eam> hays: no, an alternative to threads is multiplexed i/o
<hays> hmm
Alayde has joined #ruby
<eam> (threads are fine, but so are alternatives)
nobitanobi has quit [Remote host closed the connection]
willywos has joined #ruby
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Synthead has quit [Quit: Leaving]
pietr0 has quit [Ping timeout: 264 seconds]
ecksit has joined #ruby
RobertBirnie has quit [Ping timeout: 260 seconds]
Contigi has joined #ruby
benlieb has quit [Quit: benlieb]
willywos has quit [Quit: leaving]
senayar has quit [Remote host closed the connection]
sevenseacat has joined #ruby
nobitanobi has joined #ruby
dopie has joined #ruby
t_ has quit [Remote host closed the connection]
gheegh has joined #ruby
senayar has joined #ruby
gambl0re has quit [Ping timeout: 246 seconds]
swgillespie has joined #ruby
t_ has joined #ruby
mary5030 has joined #ruby
Vile` has quit [Ping timeout: 250 seconds]
f4cl3y has quit [Ping timeout: 240 seconds]
<gheegh> hey all. given I'm using a gem (Legato) that has basically class-method-based configuration.. how do I modify that without producng another class? https://gist.github.com/wflanagan/8a34fe2d592df1ade45f
A124 has quit [Remote host closed the connection]
iwaffles has quit [Quit: iwaffles]
Vile` has joined #ruby
polpak has quit [Quit: leaving]
neoseeker has joined #ruby
paulcsmith has quit [Quit: Lingo: www.lingoirc.com]
benlovell has joined #ruby
Contigi has quit [Quit: Leaving]
n008f4g_ has quit [Ping timeout: 265 seconds]
freerobby has joined #ruby
benlovell has quit [Ping timeout: 272 seconds]
eminencehc has quit [Remote host closed the connection]
arescorpio has joined #ruby
<Ox0dea> gheegh: It's not clear what you intend to do.
<xcyclist> Sorry it took so long.
<Ox0dea> $ irb -rubygems
<Ox0dea> xcyclist: What happens if you run that?
mleung has joined #ruby
<gheegh> basically.. i want to change the items that are in the "metrics" and dimensions.. without defining an additional class.. say, for example, i want to change the dimentions from "goal_previous_step_1" to "goal_previous_step_2".. if this is static, i have to define a new model.. i have to believe there's a way i can "ocnfigure" thte class to avoid it.
<xcyclist> irb is not available.
kies^ has joined #ruby
senayar has quit [Remote host closed the connection]
<xcyclist> I just made http://pastie.org/10315483
<xcyclist> This is in cygwin on windows 10.
<Ox0dea> xcyclist: Did you use RubyInstaller?
dseitz has joined #ruby
<xcyclist> No. I just install cygwin.
oo_ has joined #ruby
garbgargh has joined #ruby
Asher has quit [Quit: Leaving.]
<xcyclist> Python works fine.
<Ox0dea> xcyclist: Windows + Ruby is painful, and I've only heard of RubyInstaller easing that pain to any considerable degree.
garbgargh has quit [Client Quit]
baweaver has joined #ruby
<Ox0dea> gheegh: #metrics and #dimensions are just methods here.
<Ox0dea> You should be able to invoke them dynamically with #send.
<gheegh> ok.. interesting.. i'll try it.
<gheegh> didn't think of that. .thought it would be harder than that.
rcvalle has quit [Quit: rcvalle]
Asher has joined #ruby
<xcyclist> Ok. I'll just not use Ruby then.
michaeldeol has joined #ruby
Yzguy has joined #ruby
benlovell has joined #ruby
charliesome has joined #ruby
<sevenseacat> cygwin causes nothing but grief.
<Ox0dea> s/cyg//
CloCkWeRX has joined #ruby
CloCkWeRX has left #ruby [#ruby]
_djbkd has quit [Quit: My people need me...]
<sevenseacat> like, I used to think I was awesome, using it for all my uni assignments so I didn't have to learn unix, but then all the code I wrote completely broke when run there
baweaver has quit [Remote host closed the connection]
<sevenseacat> soooo much fun
jeramyRR has joined #ruby
Alayde has quit [Ping timeout: 246 seconds]
benlovell has quit [Ping timeout: 240 seconds]
chipotle has joined #ruby
senayar has joined #ruby
s00pcan has joined #ruby
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iwaffles has joined #ruby
juanpablo____ has joined #ruby
iateadonut has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
allcentury has joined #ruby
<shevy> tis be not a unix cat!
shock_one has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
yaw has joined #ruby
tabakhase__ is now known as tabakhase
tabakhase has joined #ruby
tabakhase has quit [Changing host]
yaw has left #ruby [#ruby]
Gadgetoid has quit [Ping timeout: 252 seconds]
dbussink has quit [Ping timeout: 252 seconds]
sankaber has joined #ruby
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rmoriz has quit [Ping timeout: 252 seconds]
nobitanobi has quit [Remote host closed the connection]
user1138 has quit [Ping timeout: 255 seconds]
nobitanobi has joined #ruby
juanpablo____ has quit [Ping timeout: 244 seconds]
dented42 has joined #ruby
dbussink has joined #ruby
keen__________32 has quit [Ping timeout: 240 seconds]
rmoriz has joined #ruby
nobitanobi has quit [Remote host closed the connection]
sankaber has quit [Client Quit]
Gadgetoid has joined #ruby
nklv has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> $ cat $(cat)
shock_one has quit [Ping timeout: 265 seconds]
keen__________32 has joined #ruby
laurentide has joined #ruby
minmax has joined #ruby
Azure has quit [Ping timeout: 244 seconds]
NeverDie has joined #ruby
Papierkorb has quit [Ping timeout: 244 seconds]
Papierkorb_ has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Jester13 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
radgeRayden has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
texasmade has quit [Ping timeout: 264 seconds]
pkrueger has quit [Quit: Leaving]
xcyclist has quit [Ping timeout: 246 seconds]
Azure has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
jenrzzz_ has quit [Ping timeout: 240 seconds]
rcvalle has joined #ruby
neoseeker has quit [Remote host closed the connection]
neoseeker has joined #ruby
Yzguy has quit [Quit: Zzz...]
webopsx has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
The_Phoenix has joined #ruby
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 244 seconds]
eminencehc has joined #ruby
tuxtgz has quit [Ping timeout: 255 seconds]
_blizzy_ has quit [Ping timeout: 244 seconds]
Vile` has quit [Remote host closed the connection]
The_Phoenix has quit [Ping timeout: 244 seconds]
dfockler has joined #ruby
pauly_oc has joined #ruby
Vile` has joined #ruby
yqt has quit [Ping timeout: 256 seconds]
bricker has quit [Ping timeout: 244 seconds]
Westerbly_ has joined #ruby
icharlie has joined #ruby
dfockler has quit [Ping timeout: 244 seconds]
webopsx has joined #ruby
radgeRayden has quit [Ping timeout: 265 seconds]
werelivinginthef has joined #ruby
senayar has quit []
lwu_ has joined #ruby
user1138 has joined #ruby
webopsx has quit [Client Quit]
werelivi_ has joined #ruby
Yzguy has joined #ruby
aaeron has joined #ruby
auzty has joined #ruby
ddarkpassenger has quit [Quit: Textual IRC Client: www.textualapp.com]
<aaeron> Hi Ox0dea: I used multipart post to upload a file. I am not sure how to do a regular set_form_data post using this. Hence I decided to use RestClient. My concern is that how does it upload the file. Does it put everything in memory or does it do a streaming post
<aaeron> There documentation does not provide enough information
neoseeker has quit [Remote host closed the connection]
<tabakhase> when installing my gem as --dev it correctly gets bundler and rake - but fails on installing spec
<Coraline> aaeron: is this for a Rails app?
<tabakhase> "rspec requires rspec-core (~> 3.3.0)" and fails like that ignoring whatever stack of versions i specify
werelivinginthef has quit [Ping timeout: 244 seconds]
<aaeron> Coraline: nope
kenndel has joined #ruby
RobertBirnie has joined #ruby
<Coraline> tabakhase: how are you specifying rpsec in your gem spec?
Yzguy has quit [Client Quit]
<Coraline> aaeron: sorry, I'm not familiar enough with RestClient to answer that.
<Coraline> aaeron: you could browse the source?
<aaeron> Oh. np Coraline
<aaeron> Okay I can try that
<tabakhase> Coraline first i had a "spec.add_development_dependency 'rspec'" - but that gave me a 0.9.2 at some point :D - so im struggeling to say "+3" i think
<tabakhase> '~> 3.3.0' would seem legit, but fails with sayd error
kies^ has quit [Ping timeout: 240 seconds]
<Ox0dea> That seems to indicate that it's at least capable of streaming.
<Coraline> tabakhase: try specifying the gem version
<tabakhase> funFact now, when i run the install of my bundler in my repo it can install rspec correctly (using rspec-core 3.3.2)
rcvalle has quit [Quit: rcvalle]
<aaeron> Ox0dea. thanks.
<Ox0dea> Sure thing.
Papierkorb_ has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
<aaeron> But I am not sure if that is the default use
<Ox0dea> How do you mean?
<Ox0dea> You're doing a POST, no?
<aaeron> Yes
<tabakhase> EOL is "spec.add_development_dependency "rspec", "~> 3.0"" works fine with bundler, but fails with checking spec-core using "gem instal --dev"
<aaeron> Oh I was thinking if we are suppose to specify stream somewhere
arescorpio has quit [Read error: Connection reset by peer]
<aaeron> Like in this
<aaeron> RestClient.post( url,
<aaeron> {
<aaeron> :transfer => {
<aaeron> :path => '/foo/bar',
<aaeron> :owner => 'that_guy',
<aaeron> :group => 'those_guys'
<aaeron> },
<aaeron> :upload => {
<aaeron> :file => File.new(path, 'rb')
<aaeron> }
<aaeron> })
<Ox0dea> This guy.
auzty has quit [Ping timeout: 264 seconds]
<aaeron> They hav e this
<aaeron> •manually handle the response (e.g. to operate on it as a stream rather than reading it all into memory)
<aaeron> In their readme
<Ox0dea> Right, you'll need to set up a block to handle the streamed response if that's what you intend to do.
<aaeron> Okay
kies^ has joined #ruby
<Ox0dea> aaeron: RestClient.post eventually calls #net_http_do_request, to clarify.
jeramyRR has quit [Quit: Peace out!]
<aaeron> that helps
<aaeron> Thanks Ox0dea
<Radar> aaeron: no spam plzkthx
<Coraline> tabakhase do you mean bundle install?
joneshf-laptop has quit [Remote host closed the connection]
<tabakhase> Coraline jep
<aaeron> Radar: I meant no spam
<Radar> gg
<Emmanuel_Chanel> Hello! Someone knows some good file uploader CGI software in open source or so?
braincrash has joined #ruby
<Ox0dea> > 2015 cgi
<Coraline> tabakhase: take a look inside your Gemfile.lock and see if rspec-core is there
joneshf-laptop has joined #ruby
dorei has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
tkuchiki has joined #ruby
<tabakhase> Coraline in the .gem tar that i try to install Gemfile.lock is not present -- in my repo (what is a exact clone of this VM) i have rspec-core (3.3.2) -- "bundle install" also sucessfully installs 3.3.2 on the test machine
<tabakhase> just the "gem install --dev" method does not find it
bendiken has joined #ruby
braincras has quit [Ping timeout: 246 seconds]
chills42 has joined #ruby
davedev24 has quit []
<tabakhase> i also tryed listing all the dependencies for the rspec package, no success ether
swgillespie has joined #ruby
markholmes has joined #ruby
sarkyniin has quit [Quit: Quit]
workmad3 has quit [Ping timeout: 240 seconds]
kenndel has quit [Quit: Leaving]
towski_ has quit [Remote host closed the connection]
auzty has joined #ruby
chills42 has quit [Remote host closed the connection]
<tabakhase> wrote that rspec issue down to compare http://nopaste.linux-dev.org/?664269 Coraline
nobitanobi has joined #ruby
iwaffles has quit [Quit: iwaffles]
_star_ has quit [Quit: Page closed]
mleung has quit [Quit: mleung]
tsou has quit [Ping timeout: 246 seconds]
<Coraline> tabakhase: sorry, I don't know what's happening
arescorpio has joined #ruby
allcentury has quit [Ping timeout: 252 seconds]
wallerdev has quit [Ping timeout: 260 seconds]
Jester13 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
christiandsg has joined #ruby
<tabakhase> its werido, a manual gem install rspec succeds with all the latest versions just fine
bruno- has joined #ruby
Stratege has quit [Ping timeout: 244 seconds]
markholmes has quit [Read error: Connection reset by peer]
markholm_ has joined #ruby
omegamike has joined #ruby
<tabakhase> what should my version string look like to say "any 3"? i belive i dont understand what ~> does here exacly...
<shevy> do you guys recommend for methods such as this: def foo; return 42; end to omit the return statement?
GriffinHeart has joined #ruby
<tabakhase> and after manually installing rspec also instally my gem as --dev is successfull
<RickHull> i do. I like explicit returns only for abnormal control flow
<Ox0dea> shevy: `return` is virtually a code smell.
<eam> I also like explicit returns
<Ox0dea> eam: You misread RickHull.
HoppingMadMan has joined #ruby
bronson has quit [Remote host closed the connection]
<eam> well, I know he only likes them conditionally
<eam> my appreciation outstrips his
markholm_ has quit [Client Quit]
mdavid613 has quit [Quit: Leaving.]
railswebdev has quit [Quit: Textual IRC Client: www.textualapp.com]
adaedra has quit [Ping timeout: 256 seconds]
thang has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 244 seconds]
Guest90444 has quit [Ping timeout: 246 seconds]
brandon has joined #ruby
tsujp has joined #ruby
brandon is now known as Guest70360
thang has joined #ruby
adaedra has joined #ruby
kies^ has quit [Ping timeout: 264 seconds]
Mendenhall has joined #ruby
omegamike has quit [Ping timeout: 255 seconds]
weemsledeux has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
user1138 has quit [Ping timeout: 255 seconds]
<shevy> one day I should write a shevy's ruby styleguide
jcoe has joined #ruby
tuxtgz has joined #ruby
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cache_Money has joined #ruby
xcesariox has joined #ruby
juanpablo____ has joined #ruby
J4D has joined #ruby
PanPan has quit [Read error: Connection reset by peer]
tuxtgz has quit [Ping timeout: 255 seconds]
xcesariox has quit [Remote host closed the connection]
tuxtgz has joined #ruby
GriffinHeart has joined #ruby
lwu_ has quit [Quit: This computer has gone to sleep]
juanpablo____ has quit [Ping timeout: 256 seconds]
jackjackdripper has quit [Quit: Leaving.]
lwu has joined #ruby
maletor has joined #ruby
<Ox0dea> shevy: You write some pretty crazy Ruby. :P
<dymk> It seems like there's no way to change the path of a gem based on the group the gem is in
<dymk> has anyone done that before?
lwu has quit [Client Quit]
<RickHull> dymk: in what context?
RegulationD has quit [Remote host closed the connection]
<Aeyrix> Ox0dea: Even, say
<Aeyrix> def test
<dymk> RickHull, lets say you've got `gem "my_priv_gem", path: "../../some_path"` that exists on development, but at a different path in prod
<Aeyrix> return unless <something>
<Aeyrix> ...
<Aeyrix> end
<dymk> RickHull, what I did was put two `gem my_private_gem` in different groups with different paths
<Ox0dea> Aeyrix: That's arguably "abnormal control flow", but it makes sense enough.
<dymk> however bundler complains about duplicate gems
J4D has quit [Quit: Textual IRC Client: www.textualapp.com]
<Aeyrix> Ox0dea: Preferred?
<Ox0dea> I do it?
<Aeyrix> Huh?
<Ox0dea> Yes, I think it's an exception to the rule.
<Aeyrix> ok
n_blownapart has joined #ruby
<Ox0dea> It helps combat rightward drift, if nothing else.
<RickHull> arguably still a smell. doesn't mean rotten. just an indicator that there is likely a more elegant way
<Aeyrix> RickHull: The alternative would most probably be wrapping it all in an `unless`.
sankaber has joined #ruby
<Ox0dea> Which is indeed not as "elegant".
<Aeyrix> I like your term: rightward drive. :^)
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<Aeyrix> drift *
<Ox0dea> Also known as "Hadouken code".
<Aeyrix> ififififififififififif
RegulationD has joined #ruby
Alayde has joined #ruby
<Ox0dea> Regarding `return unless`, there are points for and against having the unhappy path right at the top of a method.
PhantomSpank has quit [Read error: Connection reset by peer]
<Ox0dea> "Here's what could but probably won't go wrong; important shit to follow." > "Hm, looks good. Oh, wait, here's all the error handling."
<RickHull> i like the top. validate, then process
christiandsg has quit [Read error: Connection reset by peer]
christiandsg has joined #ruby
PhantomSpank has joined #ruby
ledestin has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
werelivinginthef has joined #ruby
mbeasley_ has joined #ruby
werelivi_ has quit [Ping timeout: 246 seconds]
christiandsg has quit [Read error: Connection reset by peer]
thiagovsk has joined #ruby
symm- has quit [Ping timeout: 265 seconds]
ramfjord has joined #ruby
psy_ has quit [Ping timeout: 255 seconds]
icebourg has joined #ruby
havenwood has joined #ruby
icharlie has quit [Remote host closed the connection]
MrSamuel has joined #ruby
christiandsg has joined #ruby
Musashi007 has joined #ruby
dseitz has joined #ruby
qiukun has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruby-lang871 has joined #ruby
Sypheren has joined #ruby
jcoe has joined #ruby
ddarkpassenger has joined #ruby
s2013 has joined #ruby
krz has joined #ruby
christiandsg has quit [Read error: Connection reset by peer]
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has quit [Ping timeout: 250 seconds]
christiandsg has joined #ruby
Sypheren has quit [Ping timeout: 250 seconds]
christiandsg has quit [Read error: Connection reset by peer]
nb_bez___ has quit [Quit: Connection closed for inactivity]
ruby-lang787 has quit [Ping timeout: 246 seconds]
werelivinginthef has quit [Remote host closed the connection]
Channel6 has joined #ruby
ReK2 has joined #ruby
ReK2 has quit [Changing host]
ReK2 has joined #ruby
bosma has joined #ruby
texasmade has joined #ruby
christiandsg has joined #ruby
n_blownapart has quit [Quit: Leaving]
mbeasley_ has quit [Ping timeout: 252 seconds]
benlovell has joined #ruby
RonRichie has joined #ruby
shock_one has joined #ruby
dudoom has joined #ruby
bosma has quit [Quit: Leaving]
Vile` has quit [Ping timeout: 265 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
havenn has joined #ruby
bronson has joined #ruby
bosma has joined #ruby
Mendenhall has quit [Ping timeout: 252 seconds]
GriffinHeart has quit [Remote host closed the connection]
Sypheren has joined #ruby
Vile` has joined #ruby
benlovell has quit [Ping timeout: 240 seconds]
shock_one has quit [Ping timeout: 256 seconds]
havenwood has quit [Ping timeout: 240 seconds]
maletor has quit [Ping timeout: 255 seconds]
shadoi has quit [Quit: Leaving.]
nobitanobi has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 244 seconds]
Channel6 has quit [Quit: Leaving]
bronson has quit [Ping timeout: 244 seconds]
chipotle has quit [Quit: cheerio]
tsujp has quit [Quit: tsujp is snoozing]
sdothum has quit [Read error: Connection reset by peer]
shum has joined #ruby
RonRichie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RonRichie has joined #ruby
shum has quit [Client Quit]
braincrash has quit [Quit: bye bye]
christiandsg has quit [Ping timeout: 265 seconds]
Sypheren has quit [Ping timeout: 244 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MrSamuel has quit [Quit: MrSamuel]
tuxtgz has quit [Ping timeout: 272 seconds]
darkf has joined #ruby
werelivinginthef has joined #ruby
maletor has joined #ruby
braincrash has joined #ruby
Feyn has joined #ruby
Feyn has quit [Client Quit]
shinnya has quit [Ping timeout: 264 seconds]
Feyn has joined #ruby
ghormoon has quit [Ping timeout: 255 seconds]
maletor_ has joined #ruby
msnyon has quit [Quit: Textual IRC Client: www.textualapp.com]
towski_ has joined #ruby
yfeldblum has quit [Remote host closed the connection]
MrSamuel has joined #ruby
tsujp has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
Sypheren has joined #ruby
xkickflip has quit [Ping timeout: 246 seconds]
werelivinginthef has quit [Ping timeout: 272 seconds]
maletor has quit [Ping timeout: 240 seconds]
RonRichie has quit [Quit: Textual IRC Client: www.textualapp.com]
xkickflip has joined #ruby
xkickflip has quit [Client Quit]
theery has joined #ruby
maletor_ has quit [Ping timeout: 250 seconds]
HoppingMadMan has quit [Quit: Leaving]
michael_mbp has quit [Excess Flood]
Fezzler has joined #ruby
RegulationD has joined #ruby
webopsx has joined #ruby
theery has quit [Remote host closed the connection]
baweaver has joined #ruby
s00pcan has quit [Ping timeout: 255 seconds]
dudoom has quit [Quit: Konversation terminated!]
Musashi007 has quit [Quit: Musashi007]
theery has joined #ruby
theery has quit [Remote host closed the connection]
theery has joined #ruby
theery has quit [Read error: Connection reset by peer]
mbeasley_ has joined #ruby
theery has joined #ruby
theery has quit [Read error: Connection reset by peer]
Sypheren has quit [Ping timeout: 265 seconds]
RegulationD has quit [Ping timeout: 244 seconds]
michael_mbp has joined #ruby
theery has joined #ruby
theery has quit [Remote host closed the connection]
theery has joined #ruby
workmad3 has joined #ruby
bendiken has quit []
Mendenhall has joined #ruby
Sypheren has joined #ruby
ruby-lang871 has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 244 seconds]
<Aeyrix> Ox0dea:
<Aeyrix> Finally got a Mac keyboard at work.
<Aeyrix> 1v1 me typeracer :^)
bronson has joined #ruby
MrSamuel has quit [Quit: MrSamuel]
oo_ has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
kies^ has joined #ruby
<Ox0dea> Uh-oh.
<Ox0dea> Aeyrix: Lemme prep.
<Aeyrix> later
<Aeyrix> gotta work now :P
<Ox0dea> Copy.
t_ has quit [Ping timeout: 240 seconds]
* sevenseacat gets popcorn
modern has quit []
Sypheren has quit [Ping timeout: 260 seconds]
<Aeyrix> Fuck I don't have my superhero cape here
willywos has joined #ruby
<Aeyrix> Looks like it'll have tow ait
<Aeyrix> I can't speedtype without my superhero cape
<Aeyrix> ;_:
GeissT has quit [Remote host closed the connection]
willywos has quit [Client Quit]
gix has quit [Ping timeout: 272 seconds]
GeissT has joined #ruby
Sypheren has joined #ruby
Sypheren has quit [Read error: Connection reset by peer]
nahtnam has quit [Quit: Connection closed for inactivity]
arescorpio has quit [Quit: Leaving.]
icharlie has joined #ruby
ecksit has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 264 seconds]
omegamike has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
gix has joined #ruby
astrobunny has joined #ruby
willywos has joined #ruby
krz has quit [Ping timeout: 246 seconds]
<Ox0dea> It is politely requested that you MacGyver a suitable facsimile.
omegamike has quit [Ping timeout: 264 seconds]
dseitz has joined #ruby
ghormoon has joined #ruby
<craysiii> is it time for speedracer again?
<craysiii> i mean typeracer***
<texasmade> if anybody has time, would you mind looking over this briefly code and telling me if it's clean enough to get the job done?
<Aeyrix> texasmade: Does it work?
Sypheren has joined #ruby
<texasmade> it all runs. just wanted a 2nd pair of eyes
baweaver has quit [Remote host closed the connection]
<Ox0dea> >> 'Foo'.capitalize! # texasmade
<ruboto> Ox0dea # => nil (https://eval.in/407083)
icharlie has quit [Remote host closed the connection]
<Ox0dea> A decent handful of "bang methods" do this, return nil if their operation would have made no change.
<Aeyrix> ya
davedev24 has joined #ruby
juanpablo____ has joined #ruby
<Ox0dea> >> ['foo'.downcase!, 'FOO'.upcase!]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruboto> Ox0dea # => [nil, nil] (https://eval.in/407085)
<Ox0dea> texasmade: It's actually what you want, once you know that's what they do.
duder has joined #ruby
Sypheren has quit [Ping timeout: 246 seconds]
<craysiii> is there a benefit to using Integer(gets.chomp) vs gets.chomp.to_i
charliesome has quit [Quit: zzz]
ecksit has joined #ruby
<sevenseacat> >> "FOO".downcase!
<ruboto> sevenseacat # => "foo" (https://eval.in/407086)
mary5030 has quit [Remote host closed the connection]
<sevenseacat> til.
<Ox0dea> craysiii: Kernel.Integer raises an ArgumentError on non-numeric input.
duder has quit [Client Quit]
mary5030 has joined #ruby
<Ox0dea> sevenseacat: It's done this way to faciliate using bang methods in conditionals.
<craysiii> >> Integer(:a)
<ruboto> craysiii # => can't convert Symbol into Integer (TypeError) ...check link for more (https://eval.in/407087)
<Ox0dea> >> Integer('foo') rescue $!
<ruboto> Ox0dea # => #<ArgumentError: invalid value for Integer(): "foo"> (https://eval.in/407088)
<craysiii> what does $! mean
<Ox0dea> For what it's worth, #chomp is superfluous for both Integer() and #to_i.
<Ox0dea> craysiii: It contains the most recent Exception.
<craysiii> thanks
juanpablo____ has quit [Ping timeout: 265 seconds]
<Ox0dea> Sure thing.
t_ has joined #ruby
destructure has quit [Quit: Lost terminal]
<Ox0dea> texasmade: Ruby's === is not like JavaScript's.
mary5030 has quit [Ping timeout: 246 seconds]
<texasmade> it all starts to make more sense the more I practice. I think a large part of it is that I still have other languages fresh in my mind since I've been cramming the past few weeks and just started to focus soley on ruby as of two days ago
scripore has quit [Quit: This computer has gone to sleep]
<craysiii> texas what wwere you studying before
<texasmade> I started with Python and Javascript.
<craysiii> ah. i love python, but im starting to love ruby more
willywos has quit [Quit: leaving]
<texasmade> I've decided to stick with Ruby until i get fairly decent and then try my hand at Java
<sevenseacat> loljava
<Aeyrix> Java's okay.
<sevenseacat> why would you subject yourself to that
<texasmade> I like Ruby the most so far.
<Aeyrix> I wrote Java for Bukkit / Minecraft stuff a few years back.
<craysiii> java bad. scala good
<texasmade> just for the experience
krz has joined #ruby
<texasmade> a friend said if i was going to move from ruby to another language then Java would be a good choice before going to C/C++
<sevenseacat> I tend to avoid experiences that I know will make me want to not program anymore
<Aeyrix> Why do you want to learn C / C++ though?
<Aeyrix> sevenseacat: tbh I enjoyed Java.
<Aeyrix> Granted the APIs I was working with were really quite nice, very well documented, and logically named.
<texasmade> I like having experience in multiple areas in case the need to know arises
jenrzzz has joined #ruby
<Aeyrix> Good choice.
ecksit has quit [Quit: Textual IRC Client: www.textualapp.com]
fantazo has quit [Ping timeout: 240 seconds]
scripore has joined #ruby
<tabakhase> so yay, appart from the "gem cant install rspec" issue ( http://nopaste.linux-dev.org/?664269 ) im fine now =)
<tabakhase> can build my gem, install it elsewhere with it pulling all the things and such + nicely wraped all that into a vagrant to dev/run locally
<craysiii> o.O
Mendenhall has quit [Ping timeout: 255 seconds]
RonRichie has joined #ruby
Sypheren has joined #ruby
werelivinginthef has joined #ruby
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
freerobby1 has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 255 seconds]
werelivinginthef has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
transiency has joined #ruby
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
nahtnam has joined #ruby
yfeldblum has joined #ruby
t_ has quit [Quit: Leaving]
scripore has quit [Quit: This computer has gone to sleep]
RonRichie has quit [Quit: Textual IRC Client: www.textualapp.com]
squireboy has joined #ruby
texasmade has quit [Ping timeout: 252 seconds]
Sypheren has quit [Ping timeout: 272 seconds]
Fezzler has quit [Ping timeout: 265 seconds]
squireboy is now known as Fezzler
aaeron has quit [Quit: Leaving.]
gwendall has quit [Remote host closed the connection]
Fezzler has quit [Quit: Leaving]
Fezzler has joined #ruby
michas has joined #ruby
Sypheren has joined #ruby
astrobun_ has joined #ruby
lee_ has joined #ruby
j4cknewt has quit [Remote host closed the connection]
qiukun has quit [Quit: qiukun]
Fezzler has quit [Client Quit]
leesharma has quit [Ping timeout: 244 seconds]
<michas> hi, is it possible to define assignment to an attribute like `def foo=(arg1,arg2)`? how do you assign afterwards? for example `object.foo=(1,2)` does not work.
sevenseacat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<craysiii> you could assign values to a hash and pass that to your method.
<Ox0dea> michas: You'll have to use #send. :(
jbw has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
<Ox0dea> Alternatively, consider not inflicting upon yourself so complex a setter. :P
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<craysiii> hm interesting, that send method is.
Saloaty has joined #ruby
<michas> Ox0dea, ok, so simply assigning will always call the method with a single argument and this kind of definition therefore does not make sense at all?
astrobunny has quit [Ping timeout: 272 seconds]
GriffinHeart has joined #ruby
deepu has joined #ruby
jbw has joined #ruby
Saloaty has left #ruby [#ruby]
keen__________32 has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
marsjaninzmarsa has quit [Quit: ZNC - http://znc.in]
marsjaninzmarsa has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
keen__________32 has joined #ruby
Sypheren has quit [Ping timeout: 244 seconds]
<Ox0dea> michas: foo=(1, 2) could be a call to method `foo=` with two arguments, or it could be assigning the result of the expression `(1, 2)` to the local variable `foo`; alas, the language does not disambiguate as you might wish in this case.
oo_ has quit [Ping timeout: 244 seconds]
<michas> ok, makes sense. thx
<Ox0dea> Sure thing.
Rickmasta has joined #ruby
<Ox0dea> Note well that you can still invoke the method with #send if you simply must.
yfeldblu_ has joined #ruby
lannonbr has quit [Quit: WeeChat 1.2]
oo_ has joined #ruby
icebourg has quit []
{756d6f} has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
havenwood has joined #ruby
DJSpies has quit [Ping timeout: 260 seconds]
nklv has quit [Quit: nklv]
kies^ has quit [Ping timeout: 260 seconds]
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ddarkpassenger has quit [Quit: Textual IRC Client: www.textualapp.com]
schaerli has joined #ruby
aphprentice has quit [Read error: Connection timed out]
Axy has joined #ruby
Axy has joined #ruby
astrobun_ has quit [Remote host closed the connection]
tsujp has quit [Quit: tsujp is snoozing]
Mia has quit [Ping timeout: 265 seconds]
sphex has quit [Read error: Connection reset by peer]
krz has quit [Ping timeout: 244 seconds]
triangles has quit [Read error: Connection reset by peer]
triangles has joined #ruby
s1kx_ has joined #ruby
freerobby1 has quit [Quit: Leaving.]
sphex has joined #ruby
s1kx has quit [Read error: Connection reset by peer]
brainslug has quit [Ping timeout: 244 seconds]
PlasmaStar has quit [Ping timeout: 244 seconds]
woodruffw has quit [Remote host closed the connection]
valetudo has joined #ruby
brainslug has joined #ruby
woodruffw has joined #ruby
PlasmaStar has joined #ruby
schaerli has quit [Remote host closed the connection]
Mendenhall has joined #ruby
vale_tudo has quit [Ping timeout: 255 seconds]
jackjackdripper has joined #ruby
riotjones has joined #ruby
iwaffles has joined #ruby
iwaffles has quit [Client Quit]
riotjones has quit [Read error: Connection reset by peer]
riotjones has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
Dopagod has quit [Remote host closed the connection]
lkba_ has joined #ruby
n_blownapart has joined #ruby
astrobunny has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
lkba has quit [Ping timeout: 240 seconds]
GriffinHeart has quit [Ping timeout: 256 seconds]
j4cknewt has joined #ruby
riotjones has quit [Ping timeout: 244 seconds]
Guest32 has joined #ruby
qiukun has joined #ruby
ips|malc has joined #ruby
GriffinHeart has joined #ruby
davedev24 has quit [Read error: Connection reset by peer]
davedev2_ has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
hahuang65 has joined #ruby
SOLDIERz has joined #ruby
sevenseacat has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
yardenbar has joined #ruby
GriffinHeart has joined #ruby
workmad3 has joined #ruby
hahuang65 has quit [Ping timeout: 246 seconds]
eggoez has joined #ruby
konsolebox has joined #ruby
blueOxigen has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
theery has quit [Remote host closed the connection]
theery has joined #ruby
aaeron has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
bluOxigen has quit [Ping timeout: 255 seconds]
Ox0dea has quit [Quit: WeeChat 1.2]
Ox0dea has joined #ruby
mollymorphic has quit [Remote host closed the connection]
platosha has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
platosha has joined #ruby
Musashi007 has joined #ruby
devdazed has joined #ruby
Musashi007 has quit [Client Quit]
aganov has joined #ruby
Musashi007 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
dented42 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mendenhall has quit [Ping timeout: 265 seconds]
<arup_r> I have set of packages.. Now when a user select start and end date, I would like to show the user the minimum price by doing all combination of packages. No package can be taken as a half package. Any idea how to approach it? I was trying something, but not seems a way to solve it. https://gist.github.com/aruprakshit/d3833e654ca04da8340d
webopsx has quit [Ping timeout: 252 seconds]
Contigi has joined #ruby
devdazed has quit [Quit: Computer has gone to sleep.]
tubuliferous_ has quit [Ping timeout: 244 seconds]
user1138 has joined #ruby
omegamike has joined #ruby
lee_ has quit [Ping timeout: 240 seconds]
MasterPiece has joined #ruby
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mbeasley_ has quit [Ping timeout: 240 seconds]
leesharma has joined #ruby
Alayde has quit [Ping timeout: 265 seconds]
omegamike has quit [Ping timeout: 246 seconds]
_blizzy_ has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
_blizzy_ has quit [Max SendQ exceeded]
jackjackdripper has joined #ruby
jackjackdripper has quit [Client Quit]
_blizzy_ has joined #ruby
shock_one has joined #ruby
tagrudev has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
bmcginty has quit [Ping timeout: 244 seconds]
mary5030 has joined #ruby
Averna has joined #ruby
_blizzy_ has joined #ruby
juanpablo____ has joined #ruby
psy_ has joined #ruby
andikr has joined #ruby
_cake has joined #ruby
mary5030 has quit [Remote host closed the connection]
_cake_ has joined #ruby
mary5030 has joined #ruby
juanpablo____ has quit [Ping timeout: 255 seconds]
_cake_ has left #ruby [#ruby]
RobertBirnie has joined #ruby
qiukun has quit [Quit: qiukun]
_cake has quit [Ping timeout: 246 seconds]
RobertBi_ has joined #ruby
<Ox0dea> shock_one: I've been thinking of how best to add Uberscore.no_conflict(:it).
{756d6f} has quit [Ping timeout: 264 seconds]
mary5030 has quit [Ping timeout: 260 seconds]
ferr has joined #ruby
<Ox0dea> The magic would have to happen right before the first _ is needed, which is tricky.
tkuchiki has quit [Remote host closed the connection]
atmosx has joined #ruby
atmosx has quit [Client Quit]
<shock_one> Ox0dea: should it undefine itself after usage or how is it no conflict?
havenwood has joined #ruby
atmosx has joined #ruby
<Ox0dea> shock_one: Ideally, Kernel._ shouldn't come into existence until it's actually used the first time.
bruno- has joined #ruby
timonv has joined #ruby
mercwithamouth has joined #ruby
RobertBirnie has quit [Ping timeout: 265 seconds]
<Ox0dea> Anything else is open to potential conflict.
ohaibbq has joined #ruby
Sypheren has joined #ruby
<Ox0dea> It'd be easy enough to just call it something else if either of the IRB or Pry constants exist, but that's not very general.
<shock_one> Ox0dea: what if we allowed to choose the name?
<Ox0dea> shock_one: Aye, I think Uberscore.no_conflict should take an argument that defaults to :it, but _ should just automagically work if and where appropriate.
code_[BNC] has quit [Ping timeout: 246 seconds]
sepp2k has joined #ruby
<shock_one> I don't get why there should be two names: it and _.
Musashi007 has quit [Quit: Musashi007]
<Ox0dea> Only one or the other should exist, depending on the environment.
<shock_one> brb
<Ox0dea> Non-_ in REPLs where _ already has a more useful definition, and non-_ if no_conflict has been explicitly requested.
mbeasley_ has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
Sypheren has quit [Ping timeout: 246 seconds]
_ht has joined #ruby
casadei_ has quit [Remote host closed the connection]
Sypheren has joined #ruby
riotjones has joined #ruby
Stratege has joined #ruby
craysiii has left #ruby [#ruby]
sargas has joined #ruby
riffraff has joined #ruby
acke has joined #ruby
Sypheren has quit [Ping timeout: 265 seconds]
allomov has joined #ruby
laurentide has quit [Quit: Leaving]
MasterPiece has quit [Remote host closed the connection]
<michas> I currently have a hash mapping one number to another and I want to persist it between different executions of the application. I probably want some very simple key-valu store. Any recomendation for that?
<Aeyrix> Hardcode it?
<michas> Aeyrix, no it will change during the run.
<Aeyrix> json
<Aeyrix> yaml
<Aeyrix> daybreak
{756d6f} has joined #ruby
tkuchiki has joined #ruby
j4cknewt has quit [Remote host closed the connection]
Sypheren has joined #ruby
j4cknewt has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
<michas> Aeyrix, daybreak looks good. did not know about this yet. thx.
<Aeyrix> No prob.
sinkensabe has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sargas has quit [Quit: This computer has gone to sleep]
timonv has quit [Ping timeout: 260 seconds]
fedexo has joined #ruby
j4cknewt has quit [Ping timeout: 246 seconds]
Sypheren has quit [Ping timeout: 246 seconds]
theery has quit [Remote host closed the connection]
safeforge has joined #ruby
sdwrage has joined #ruby
leesharma has quit [Ping timeout: 250 seconds]
<shock_one> Ox0dea: I'd make a constant UBERSCORE_GLOBAL_NAME or something, it would be much more straightforward. Or had another import, like here. https://github.com/hexorx/countries/blame/master/README.markdown#L21-L24
amclain has quit [Quit: Leaving]
astrobunny has quit [Remote host closed the connection]
Musashi007 has joined #ruby
sdwrage has quit [Client Quit]
astrobunny has joined #ruby
<shock_one> I like another import more. If the user chooses to import the second file, we don't create the method automatically, but she has to call the no_conflict method by herself.
yardenbar has quit [Ping timeout: 255 seconds]
tubuliferous_ has joined #ruby
aaeron has quit [Quit: Leaving.]
deepu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
chuckrock has joined #ruby
<Ox0dea> shock_one: Eh, _ and it are the only names really worth considering, I think, in which case `defined?(_) ? :it : :_` suffices.
<shock_one> Ox0dea: the thing is, the user never knows what to use.
<shock_one> Ox0dea: I'll propose it again: let's go with it and forget about the underscore.
tubuliferous_ has quit [Ping timeout: 255 seconds]
timonv has joined #ruby
howdoi_ has joined #ruby
roolo has joined #ruby
solars has joined #ruby
<Ox0dea> shock_one: I think the overline (¯) best lives up to the name "uberscore". :P
chuckrock has quit [Remote host closed the connection]
chuckrock has joined #ruby
<Ox0dea> >> '' << 0xAF # Bonus points for being in extended ASCII?
<ruboto> Ox0dea # => "¯" (https://eval.in/407175)
safeforge has quit [Remote host closed the connection]
qiukun has joined #ruby
dfockler has joined #ruby
<shock_one> Ox0dea: I'll just remind you that my keyboard isn't extended ASCII.
{756d6f} has quit [Ping timeout: 252 seconds]
GriffinHeart has quit [Remote host closed the connection]
rbowlby has quit [Remote host closed the connection]
craysiii has joined #ruby
dfockler has quit [Ping timeout: 240 seconds]
codecop has joined #ruby
Timba-as has joined #ruby
michael_mbp has quit [Excess Flood]
RonRichie has joined #ruby
safeforge has joined #ruby
michael_mbp has joined #ruby
troulouliou_div2 has joined #ruby
Timba-as has quit [Client Quit]
bayed has joined #ruby
xkickflip has joined #ruby
Philipp__ has joined #ruby
chuckrock has quit [K-Lined]
qiukun has quit [Quit: qiukun]
fabrice31 has joined #ruby
dumdedum has joined #ruby
Musashi007 has quit [Quit: Musashi007]
qiukun has joined #ruby
werelivinginthef has joined #ruby
oo_ has quit [Remote host closed the connection]
dtcristo has joined #ruby
mary5030 has joined #ruby
bigmac_ has quit [Ping timeout: 252 seconds]
strixd has joined #ruby
strixd has quit [Excess Flood]
strixd has joined #ruby
werelivinginthef has quit [Ping timeout: 265 seconds]
strixd has quit [Excess Flood]
<arup_r> Say i have [11,22,33,4,5,9,11] and I want to find the distance an element from first index. for example for 4 the distance is 3
oo_ has joined #ruby
<arup_r> how to do it.. I have done as
strixd has joined #ruby
<arup_r> >> [11,22,33,4,5,9,11].index(4)
nahtnam has quit [Quit: Connection closed for inactivity]
<ruboto> arup_r # => 3 (https://eval.in/407179)
strixd has quit [Excess Flood]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
<arup_r> I am trying to find the distance of first occurance ofcourse
<bnagy> >> [11,22,33,4,5,9,11].index(11)
<ruboto> bnagy # => 0 (https://eval.in/407180)
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
strixd has joined #ruby
<bnagy> if you want a general solution you can't use index
blue_deref has quit [Quit: bbn]
<arup_r> yes.. bnagy that's what I am going to ask..
<arup_r> how to do it genrally
workmad3 has joined #ruby
magnificrab has joined #ruby
krz has joined #ruby
magnificrab has left #ruby [#ruby]
krz is now known as Guest87399
fabrice31 has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 244 seconds]
<craysiii> what do you want the defined behavior to be when there are two elements in an array, of equal value in both the first and last position
fabrice31 has joined #ruby
jenrzzz has joined #ruby
stan has joined #ruby
dtcristo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GriffinHeart has joined #ruby
riffraff has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 244 seconds]
<arup_r> bnagy, any idea ?
<bnagy> arup_r: you didn't answer craysiii's question, so nobody knows
dtcristo has joined #ruby
Guest32 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rdark has joined #ruby
<arup_r> ok.. I thought it is his question.. didn't follow him
<arup_r> sorry
n_blownapart has quit [Quit: Leaving]
michas has quit [Quit: Verlassend]
Timba-as has joined #ruby
tsujp has joined #ruby
havenwood has quit [Ping timeout: 240 seconds]
<bnagy> I suspect an xy problem here anyway
Timba-as has quit [Client Quit]
<craysiii> lol
<arup_r> no.. I am writing more specifically
robbyoconnor has quit [Read error: Connection reset by peer]
<arup_r> craysiii, then I would like to return the distance between each of them. For my example the output should be
<craysiii> what if there are more than 2? an arbitrary amount? should it take an average of the distances?
<craysiii> or maybe a list of distances.
robbyoconnor has joined #ruby
<arup_r> { 1 => 11, 6 => 11 }
<sevenseacat> or maybe it should just return 42 and change the array to make it always correct.
<arup_r> this is the output of as per my input
<arup_r> I just need to count how many elements before the `11`
<bnagy> >> [11,22,33,4,5,9,11].each_with_index.to_a.map(&:reverse).to_h
<arup_r> as first element is `11` in this case, it is `1`.
<ruboto> bnagy # => {0=>11, 1=>22, 2=>33, 3=>4, 4=>5, 5=>9, 6=>11} (https://eval.in/407181)
<sevenseacat> i have no idea how you get "1" then
<sevenseacat> there are no elements befor ethe first 11
<bnagy> looks useless to me
<arup_r> sorry it is `0`
<bnagy> ?example
<ruboto> I don't know anything about example
<bnagy> dammit :)
<craysiii> ?roboto
<ruboto> I don't know anything about roboto
<craysiii> spelled it wrong >.>
<arup_r> bnagy, [11,22,33,4,5,9,11] is example
<bnagy> why don't you explain what you're actually trying to do instead of give imprecise coding exercises
j4cknewt has joined #ruby
<arup_r> I am trying to solve a problem ... where this is one part
GeissT has quit [Quit: Bye!]
<sevenseacat> and that problem is?
qiukun has quit [Quit: qiukun]
rbowlby has joined #ruby
<craysiii> [11, 22, 33, 11, 4, 5, 9, 11] what would you want here
lala has left #ruby [#ruby]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<arup_r> ok
robbyoconnor has quit [Remote host closed the connection]
<arup_r> That's a actual problem
<arup_r> craysiii, { 0=>11, 3 => 11, 7 => 11}
<bnagy> arup_r: then my dumb solution above "works"
<arup_r> I have an intention of finding this out..
<arup_r> bnagy, no it wouldn't when the input date range will be too long..
j4cknewt has quit [Ping timeout: 246 seconds]
<zenspider> suuure looks like some sort of interview question
qiukun has joined #ruby
<arup_r> there can be many sundays.. and
livathinos has joined #ruby
<abdulrehman> morning
<arup_r> zenspider, no it is not.. It is my application problem.. I am trying to solve it
<arup_r> Better way
RobertBi_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider> poorly defined either way
Iskarlar has joined #ruby
<arup_r> may be
Musashi007 has joined #ruby
roolo has quit [Remote host closed the connection]
<bnagy> this looks like some kind of knapsack problem
<bnagy> although I don't really get your description
<zenspider> neither do I
fabrice31_ has joined #ruby
<bnagy> knapsack is np hard, although that's not a big deal if your domain is small
fabrice31_ has quit [Remote host closed the connection]
fabrice31_ has joined #ruby
<bnagy> if a heuristic is allowed I would probably just do some kind of greedy approach
<bnagy> but it won't always produce the best solution
allomov has quit [Remote host closed the connection]
<arup_r> thing is I have some predefined packages.. if user selects any predefined package then price is ready. If they choose their custom dates.. I'll try to find out the minimum price by doing all combination of packages and give them the minimum price
robbyoconnor has joined #ruby
<arup_r> Don't know if it makes sense or not
<craysiii> def distance(arr, num)
<craysiii> arr.each_with_index.to_a.map(&:reverse).to_h.select { |k,v| v == num }
<craysiii> end
<craysiii> dont know why my client sent that as three messages.
fabrice31 has quit [Ping timeout: 256 seconds]
serivich has joined #ruby
schaerli has joined #ruby
<craysiii> anyway arup_r that works as intended. thanks to bnagy
<arup_r> Ok.. I am writing it.. then I'll show you people.. if it can be improved
<arup_r> Let me write it first what I have in my mind
<arup_r> give me some 15 mins or so
<craysiii> bnagy know of any way to shorten that select block?
<bnagy> start from day 1 of the custom range, apply the longest package that fits, check any other ways to fill that range, then iterate
vdamewood has joined #ruby
n008f4g_ has joined #ruby
Westerbly_ has quit [Ping timeout: 244 seconds]
<arup_r> bnagy, humm doing that way
vdamewood has quit [Read error: Connection reset by peer]
neanderslob has quit [Read error: Connection reset by peer]
juanpablo____ has joined #ruby
vdamewood has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
<adaedra> Hi
ndrei has joined #ruby
<craysiii> hi
eminencehc has joined #ruby
vdamewood has quit [Read error: Connection reset by peer]
Guest32 has joined #ruby
robbyoconnor has joined #ruby
neanderslob has joined #ruby
ohaibbq has quit [Quit: Leaving...]
kraljev11 has joined #ruby
<bnagy> >> [11, 22, 33, 11, 4, 5, 9, 11].map.with_index {|n,i| [i,n] if n==11}.compact.to_h
<ruboto> bnagy # => {0=>11, 3=>11, 7=>11} (https://eval.in/407186)
juanpablo____ has quit [Ping timeout: 264 seconds]
<bnagy> craysiii: ^^ :`(
robin_ has joined #ruby
BeatzKilla has joined #ruby
<robin_> hi
eminencehc has quit [Ping timeout: 255 seconds]
robin_ has quit [Client Quit]
<craysiii> wow nice bnagy
<zenspider> you just want the indicies of the things that match 11?
<bnagy> no, it's not
<craysiii> why
ruurd has joined #ruby
<bnagy> zenspider: I don't know, I'm just golfing the given format, which is idx=>item
<zenspider> heh
calleerlandsson has joined #ruby
<bnagy> not even golfing otherwise I'd ternary :|
antgel has joined #ruby
Violentr has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
programmerq has quit [Read error: Connection reset by peer]
<arup_r> Array#take(n) is order of N right ?
c0m0 has joined #ruby
bakednotfried has joined #ruby
bakednotfried has joined #ruby
neanderslob has quit [Read error: Connection timed out]
vdamewood has joined #ruby
neanderslob has joined #ruby
<bnagy> *shrug*
<Ox0dea> arup_r: Not really. Ruby uses shared memory for #take.
{756d6f} has joined #ruby
senayar has joined #ruby
joonty has joined #ruby
<Ox0dea> >> [11, 22, 33, 11, 4, 5, 9, 11].each_with_index.with_object({}) { |(o, i), m| m[i] = o if o == 11 }
<ruboto> Ox0dea # => {0=>11, 3=>11, 7=>11} (https://eval.in/407191)
<arup_r> And #first ?
<Ox0dea> Do we need #each_with_index_and_object?
GriffinHeart has quit [Remote host closed the connection]
<Ox0dea> arup_r: #first is very hard to implement efficiently. It's probably O(n^3) in Ruby.
<craysiii> how do you enter multiline into ruboto
<bnagy> craysiii: ;
<zenspider> haha
<craysiii> Ox lol.
<arup_r> Ox0dea, ok.. then #take is better
davedev2_ has quit [Remote host closed the connection]
_blizzy_ has quit [Ping timeout: 244 seconds]
<bnagy> XD
<zenspider> Ox0dea: why are you fucking with him?
davedev24 has joined #ruby
<Ox0dea> arup_r: Sorry, I didn't realize you were asking about Array#first with an argument.
<Ox0dea> It also uses shared memory.
serivich has quit [Ping timeout: 244 seconds]
ruurd has quit [Quit: ZZZzzz…]
<craysiii> >> h = {}; [11, 22, 33, 11, 4, 5, 9, 11].each_with_index { |n, i| h.merge!(i => n) if n == 11}; puts h
<ruboto> craysiii # => {0=>11, 3=>11, 7=>11} ...check link for more (https://eval.in/407197)
ruurd has joined #ruby
<adaedra> what are you doing
GriffinHeart has joined #ruby
<craysiii> magic apparently
davedev24 has quit [Ping timeout: 250 seconds]
doertedev has joined #ruby
<Ox0dea> >> Foo = Class.new(Array); a = b = Foo.new [1, 2, 3]; [a.take(2).class, a.first(2).class] # arup_r
<ruboto> Ox0dea # => [Foo, Array] (https://eval.in/407198)
<Ox0dea> That's probably the only distinction worth concerning yourself with.
adrianpacala has joined #ruby
<DefV> Is there still no better way to do initilization values then this: def initialize(a, b); @a, @b = a, b; end ?
<zenspider> subclassing Array is _almost_ always a mistake
<Ox0dea> Demonstration purposes only.
<DefV> Maybe smth like coffeescript initialize: (@a, @b) ->
<zenspider> DefV: what's wrong with that? define "better"
<Ox0dea> DefV: That might be coming in Ruby 3.
<arup_r> Ox0dea, didn't get you.. Give me some mins..I am writing something..
<sevenseacat> i hope not.
<zenspider> I hope not too
TheHodge has joined #ruby
<DefV> why not, what's wrong with it in your opinion?
schaerli has quit [Remote host closed the connection]
<Ox0dea> It's not the same thing, but you should get a relevant vibe. :)
mikecmpbll has joined #ruby
<sevenseacat> For example, {x, y} is equivalent to: {x: x, y: y} <--- waaaaat
<craysiii> ya i dont know why i'd want that
* sevenseacat is over here nononononononononoing at that issue
<Ox0dea> I don't know why you'd *want* to have to type @foo = far, @bar = bar either, to be honest.
<Ox0dea> sevenseacat: Note well matz's outright rejection of the thing.
<sevenseacat> and sanity prevails.
<Ox0dea> > foo = far
ecksit has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<adaedra> That doesn't really tell why `def initialize(@a, @b)` whould be bad.
bmcginty has joined #ruby
<Ox0dea> (It's because parse.y is scary.)
<sevenseacat> `initialize` is not some sacred method, so you cant define special notation like that for it
<craysiii> what if you're given malformed input or want to validate before assignment
schaerli has joined #ruby
<sevenseacat> and if you want to apply it to all methods, you just want to blindly reassign instance variable methods?
<sevenseacat> -methods
texasmade has joined #ruby
<adaedra> craysiii: then you use the old style
<Ox0dea> Sanity 2 | 0 Madness
<abdulrehman> guys any idea how to formate/convert scientific exponential to float
<Ox0dea> DefV: Struct too heavy?
<zenspider> old-style hash in <=1.8 is my reason to reject that. ... also... horrible idea
<zenspider> gah. we need LESS syntax, not more.
<Ox0dea> abdulrehman: Kernel.Float or String#to_f should do.
<Ox0dea> ?guys abdulrehman
<ruboto> abdulrehman, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folk", "y'all" or "everyone" instead?
<bnagy> zenspider: that ship has sailed
<DefV> Ox0dea: not always possible to inherit from Struct
<sevenseacat> to be fair I still do not like ruby 1.9 hash syntax, i believe it should be consistent no matter what the key type.
<abdulrehman> Ox0dea: thanks I'll try that
<craysiii> >> "%f" % "1.0e-05"
<ruboto> craysiii # => "0.000010" (https://eval.in/407205)
<zenspider> bnagy: wish I were on it
<sevenseacat> from what I've seen, it's also a tad confusing for newbies also.
<bnagy> I am, mostly
<bnagy> I'm only using ruby as a bash script replacement now :`(
leafybasil has quit [Remote host closed the connection]
<Ox0dea> >> {'1': 2} # This is indeed confusing.
<ruboto> Ox0dea # => {:"1"=>2} (https://eval.in/407206)
<zenspider> format will auto-to_f ?
leafybasil has joined #ruby
<sevenseacat> people see {foo: :bar} and think that the symbols are foo: and :bar.
<sevenseacat> well, newbies anyway.
<Ox0dea> Which is kind of silly, though.
<sevenseacat> hashrockets remove all that ambiguity.
jsrn_ is now known as jsrn
<zenspider> AND are alignable
<abdulrehman> ruboto: sure my bad, sorry
Timba-as has joined #ruby
<Ox0dea> Did ruboto just pass the Turing test?
<adaedra> ?bot
<ruboto> I don't know anything about bot
<craysiii> ?anything
<ruboto> I don't know anything about anything
<adaedra> rah, I never remember which is it
Sypheren has joined #ruby
tvw has joined #ruby
senayar has quit [Remote host closed the connection]
Averna has quit [Quit: Ex-Chat]
leafybasil has quit [Ping timeout: 252 seconds]
senayar has joined #ruby
fedexo has quit [Ping timeout: 246 seconds]
timonv has quit [Ping timeout: 256 seconds]
allomov has joined #ruby
Sypheren has quit [Ping timeout: 264 seconds]
<shevy> ruboto is rather often assumed to be a genuine people by newcomers
ecksit has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Guest87399> hi
ramfjord has joined #ruby
Guest87399 has quit [Quit: WeeChat 1.2]
polyrob has quit [Ping timeout: 265 seconds]
krz has joined #ruby
<craysiii> i thought ruboto was a person when they said the guy thing to me as well
aevitas has joined #ruby
<adaedra> ?ruboto
<ruboto> I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
yeticry has quit [Quit: leaving]
<sevenseacat> mmm banhammers.
ndrei has quit [Ping timeout: 256 seconds]
<shevy> craysiii hehe I found that interesting, people look at the message that is put to them, but barely ever at the line with the ? above
Timba-as has quit [Quit: Be back later ...]
<Ox0dea> Highlights have a way of drawing one's attention, it seems.
<craysiii> yes exactly. upon further inspection i figured it out
PhantomSpank has quit []
<adaedra> because people will look at the hl message
tubuliferous_ has joined #ruby
<Ox0dea> OnePlus should've called their new phone The 3.
iloverubynoob has joined #ruby
pecopeco has joined #ruby
polyrob has joined #ruby
schaerli has quit [Remote host closed the connection]
khebbie has joined #ruby
anisha has joined #ruby
khebbie has quit [Client Quit]
<Ox0dea> In any case, they're doomed to committing semantic OBOEs for the foreseeable future.
devyn has quit [Ping timeout: 244 seconds]
<adaedra> They can't, as 3 is also a phone services provider.
<craysiii> damn companies taking up all the numbers
<adaedra> craysiii: or colors (I'm looking at you, Orange)
<Ox0dea> And Level 3.
pecopeco has left #ruby [#ruby]
tubuliferous_ has quit [Ping timeout: 250 seconds]
<craysiii> the should follow suit and skip to 11
<shevy> it's the end of the world
<craysiii> in line with microsoft and the like
<shevy> don't worry craysiii windows 42 will have all the answers
* adaedra slaps shevy
GriffinHeart has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 1.2]
ta has quit [Remote host closed the connection]
glenn_ has joined #ruby
<Ox0dea> shevy: And no questions.
krz has joined #ruby
Zai00 has joined #ruby
CustosLimen has quit [Ping timeout: 240 seconds]
<shevy> a world without questions ... :(
<craysiii> windows 42 auto configures your every liking. it has no need for questions
<craysiii> and the world does not revolve around windows anymore ;)
schaerli has joined #ruby
<shevy> is it year of the linux desktop already?
<Ox0dea> We mainstream yet?
<craysiii> just. one. more. year
<adaedra> ahah, year of the linux desktop.
bronson has quit [Remote host closed the connection]
<adaedra> we will have nuclear war before, at this speed.
<yorickpeterse> morning
<Ox0dea> yorickpeterse: Nice timing. We were just about to get sociopolitical.
<craysiii> lol
* sevenseacat takes off sjw hat
ruurd has quit [Quit: ZZZzzz…]
ruurd has joined #ruby
unshadow has joined #ruby
<Ox0dea> "I know not with what operating system World War III will be initiated..."
adrianpacala has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<craysiii> world war V will be run from a FORTRAN mainframe.
ta has joined #ruby
wpp has joined #ruby
<apeiros> world war V will be fought with bows and spears because wwiv destroyed everything
<craysiii> no we skip IV.
<unshadow> So, I'm trying to figure out what is happening here: https://github.com/ruby/ruby/blob/c8b3f1b470e343e7408ab5883f046b1056d94ccc/lib/webrick/httprequest.rb#L529 What is this size=4096 doing ? who is using it ? from what I'm seeing a few lines up this creates a IO.gets(LF, 4096) ... looking at the documents for IO.gets this seems like a missuse
<Ox0dea> Presuming there'll be a fifth world war is remarkably optimistic.
white_bear has joined #ruby
transiency has quit [Read error: Connection reset by peer]
adrianpacala has joined #ruby
shock_one has quit [Remote host closed the connection]
ruurd has quit [Quit: ZZZzzz…]
<shevy> tis not be very pretty code
<shevy> def _read_data
<shevy> pythonic!
<Ox0dea> unshadow: IO#gets will attempt to read a complete line; supplying it with an argument prevents it reading off into infinity.
shock_one has joined #ruby
busterarm has quit [Quit: WeeChat 1.1.1]
t_ has joined #ruby
<Ox0dea> 4096 is a pretty standard maximum buffer size.
busterarm has joined #ruby
busterarm is now known as Guest95688
<yorickpeterse> Ox0dea: wut
luyao has joined #ruby
<Ox0dea> Did I retarded?
<unshadow> Ox0dea: this was my feeling too, but, looking at the IO.gets dosuments, I dont see how this 4096 is playing
Guest95688 has quit [Client Quit]
bustrarm has joined #ruby
<Ox0dea> unshadow: #gets is a method on instances of IO, not IO itself.
dtcristo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CustosLimen has joined #ruby
riffraff has joined #ruby
thiagovsk has quit [Quit: Connection closed for inactivity]
GriffinHeart has joined #ruby
shock_one has quit [Read error: No route to host]
shock_one has joined #ruby
<Ox0dea> unshadow: Consider what would happen if a malicious entity just started firing data at your thing, careful to never include a line terminator.
bumbar_ has joined #ruby
bumbar_ has joined #ruby
<Ox0dea> In such a case, #gets would just keep reading and reading.
Hounddog has joined #ruby
dtcristo has joined #ruby
<Ox0dea> Giving it an argument (4096, in this case) tells #gets to stop after that many bytes have been read.
<unshadow> Ox0dea: I know, gets alone, will read untill it sees "\n", using gets("bla"), will make it read untill it reads the word "bla", looking at the documents, if I'll use a gets("\n", 4096) that means it will read "\n" or untill it sees 4096 ?
<Ox0dea> Yes, that's right.
Siyfion has joined #ruby
<unshadow> So here is my wierd issue, when using this, gets("\r\n". 4096) I get this error: comparison of Fixnum with nil failed
axl_ has joined #ruby
<Ox0dea> Is that period a typo?
<sevenseacat> thats a . there?
<unshadow> typo
<unshadow> it shoud be a ,
marr has joined #ruby
<Ox0dea> unshadow: Are you able to post code?
hanmac1 has joined #ruby
<Ox0dea> That call to #gets is certainly not the thing introducing the unexpected nil.
<Ox0dea> Well, shit, I suppose it could be if there's no data left to be read.
bustrarm is now known as busterarm
<luyao> i
<luyao> lsd
<Ox0dea> All things in moderation.
<adaedra> Hello Lucy
<unshadow> the socket is a SSLSocket
<luyao> q
luyao has quit [Quit: WeeChat 0.4.2]
<adaedra> ok
<craysiii> that was short.
dtcristo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bodgix has joined #ruby
<adaedra> This WeeChat is outdated.
<yorickpeterse> get a newer one
ruurd has joined #ruby
<adaedra> Tell that to luyao
<unshadow> Ox0dea: also, the error reads "comparison of Fixnum with nil failed" is that means it tries to compare 4096 to nil ?
<Ox0dea> unshadow: I wonder why you're not getting an error for passing a Regexp to #gets.
<unshadow> Ox0dea: Passing a regex to gets while it used with an SSLSocket is acceptable ;) (ruby hacks )
ruurd has quit [Quit: ZZZzzz…]
ruurd has joined #ruby
schaerli has quit [Remote host closed the connection]
<Ox0dea> unshadow: I'm reasonably sure it's to do with #gets returning nil on a non-read and you subsequently putting it in `http_response`.
<Ox0dea> I can't say where it ends up being compared with a Fixnum, of course.
<unshadow> Ox0dea: Well, that error is printed from line 9-10, so the error comes from this begin rescue block
ruurd has quit [Client Quit]
workmad3 has joined #ruby
<unshadow> Ox0dea: http_response is just a hash, it can accept nil vlaues so I dont think the issue if from there
<Ox0dea> Line numbers are largely meaningless in isolation.
timonv has joined #ruby
senayar has quit [Remote host closed the connection]
<unshadow> Ox0dea: I mean the error is printed by the rescue in like 9-10 :)
senayar has joined #ruby
Mendenhall has joined #ruby
n008f4g_ has quit [Ping timeout: 240 seconds]
<craysiii> would be nice to see the source code for IO#gets
<Ox0dea> unshadow: I thought we were trying to figure out where you were comparing nil with a Fixnum?
<Ox0dea> craysiii: It's in io.c?
tjbiddle has joined #ruby
<unshadow> Ox0dea: Yes, but I dont, thats the issue, the "compare" is coming from gets
<unshadow> at least this is my feeling
<craysiii> im feeling that way as well.
<sevenseacat> without an actual error message, I wouldn't feel any kind of inclination.
<unshadow> craysiii: this is the source code for gets http://ruby-doc.org/core-2.2.2/IO.html#method-i-gets
<kannan4k> folks, what is this line does? o.send "#{k}=", casted
<sevenseacat> kannan4k: look up the ruby method "send" and see
<kannan4k> sevenseacat: I am confused of this -> "#{k=}"
<sevenseacat> well thats not what you posted before
workmad3 has quit [Ping timeout: 256 seconds]
antgel has quit [Ping timeout: 256 seconds]
ruurd has joined #ruby
<Ox0dea> unshadow: You should check your link. :P
<sevenseacat> what is the value of k there?
code_ has joined #ruby
<kannan4k> k is a hash key "#{k}="
<sevenseacat> that doesnt answer the question
pyo_ has joined #ruby
Sypheren has joined #ruby
<Ox0dea> > I know about Object#send, but what is string interpolation?
<shevy> kannan4k it is as if you would call a method with that name, and the last character of the method is '=', so a setter like: object.foo = value
nsuke has joined #ruby
<craysiii> we must go deeper.
<craysiii> rb_io_getline
<unshadow> Ox0dea: craysiii : It seems the underlying call is to getline
<unshadow> yeha XD
<Ox0dea> craysiii: It goes way deeper than rb_io_getline().
<craysiii> ive never even looked at the source
Igorshp has joined #ruby
<craysiii> like i said im month 1
<craysiii> lol
<Ox0dea> Pfft.
<Ox0dea> Dig in, man.
<craysiii> lifes a garden :)
<Ox0dea> So's death, after a fashion.
<kannan4k> sevenseacat, shevy here is the method -> https://gist.github.com/kannan4k/62c0e455f83ba6016eaf
<shevy> I don't like this code at all :P
yeticry has joined #ruby
kraljev11 has quit [Quit: kraljev11]
<kannan4k> shevy: what's wrong :(
Sypheren has quit [Ping timeout: 256 seconds]
<shevy> it does not seem simple code
<ljarvis> moin
<kannan4k> shevy, k is a method or a variable?
<craysiii> variable
quimrstorres has joined #ruby
<Ox0dea> But variables can be used as methods, and methods can be used as variables!
<shevy> you can see where it is assigned kannan4k
<shevy> instance = hash.inject self.new(cache) do |o, p|
<shevy> k, v = p
* ljarvis grumbles
<craysiii> you mean like function pointers? lol
<adaedra> hi ljarvis
<ljarvis> o/
<Ox0dea> craysiii: Something along those lines, sure.
<shevy> and then lateron it is called via a .send call: o.send "#{k}=", casted
<craysiii> i forgot what its called in ruby.
<ljarvis> if i could have any feature in ruby it would be first-class functions
fabrice31 has joined #ruby
RonRichie has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> craysiii: Method and UnboundMethod, more or less.
* ljarvis doesn't hate parenthesis
<Ox0dea> ljarvis: Left or right?
<ljarvis> Ox0dea: I love them all
zeroDivisible has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<craysiii> oh Proc.
<craysiii> can be assigned to variable
lkba_ has quit [Ping timeout: 244 seconds]
<Ox0dea> As can be Methods and UnboundMethods, for what that's worth.
<ljarvis> any method can be assigned to a variable
<ljarvis> methods are objects too
<craysiii> a block can't be assigned though, because it's not an object :)
<ljarvis> what?
<craysiii> that's what ive read
<ljarvis> what do you mean by "a block"?
<craysiii> { }
<craysiii> do .. end
<ljarvis> that's a hash
fabrice31_ has quit [Ping timeout: 244 seconds]
<ljarvis> and of course a method block can be assigned
<Ox0dea> But then it's a Proc.
<craysiii> yes.
<ljarvis> so that means it's not assigned?
<Ox0dea> No, it means it's not a block.
timonv has quit [Ping timeout: 264 seconds]
<ljarvis> well that's pedantic
<Ox0dea> Then why do we have two names?
<ljarvis> this is Ruby, there's five names for everything
mikecmpbll has quit [Ping timeout: 244 seconds]
mikecmpb_ has joined #ruby
<ljarvis> sure semantics are different, but i wouldn't say you're not assigning that block to a variable, just because it's now a proc, it still works as expected from a logical sense
<Ox0dea> ljarvis: You sort of started that debate by and with yourself.
michael_mbp has quit [Excess Flood]
<ljarvis> "a block can't be assigned though" is what I debated
tennis has joined #ruby
<Ox0dea> In that case, I believe you must admit defeat.
ruurd has quit [Quit: ZZZzzz…]
<Ox0dea> It is indeed the case that a Ruby variable cannot contain a Ruby block.
mikecmpb_ has quit [Read error: Connection reset by peer]
ruurd has joined #ruby
<Ox0dea> Block != Proc, since we can pass n Procs to a method, but only at most one block.
<Ox0dea> They are simply (slightly) different things.
oo_ has quit [Ping timeout: 265 seconds]
<zenspider> ljarvis: this whole block vs proc are not equivalent debate? imho, you can ignore Ox0dea on this one
<Ox0dea> Get 'im, tiger.
mikecmpbll has joined #ruby
michael_mbp has joined #ruby
<yorickpeterse> Blocks and procs are identical
<yorickpeterse> blocks is just the name for the syntax of `foo do ... end`
Sypheren has joined #ruby
<yorickpeterse> and technically there's nothing stopping you from passing multiple Procs to a method
ruurd has quit [Client Quit]
<yorickpeterse> It's the syntax that doesn't allow multiple ones
<adaedra> That's what Ox0dea said?
schaerli has joined #ruby
<yorickpeterse> Ox0dea | Block != Proc, since we can pass n Procs to a method, but only at most one block.
vdamewood has quit [Remote host closed the connection]
oo_ has joined #ruby
ruurd has joined #ruby
gwendall has joined #ruby
<craysiii> can a block be passed as an argument or only yielded to?
<yorickpeterse> `foo do ... end` is nothing more than `foo(proc { ... })`
<zenspider> you can use the &syntax to reify the block to a var: def a_method(&block),
lkba has joined #ruby
<zenspider> then you can either block.call, block[], or iirc, still yield
<zenspider> prolly more :)
ruurd has quit [Client Quit]
f4cl3y has joined #ruby
Silox| has joined #ruby
<Ox0dea> .(), ::(), and ===().
<craysiii> o.o
Musashi007 has joined #ruby
Sypheren has quit [Ping timeout: 255 seconds]
<zenspider> :: just means . in that context
apfeluser has joined #ruby
<adaedra> >> def foo(&bar); yield; end; foo { puts ":D" }
<ruboto> adaedra # => :D ...check link for more (https://eval.in/407253)
glenn_ has quit [Quit: Konversation terminated!]
<Ox0dea> adaedra: The &bar is superfluous.
RegulationD has joined #ruby
<craysiii> ^
<adaedra> Ox0dea: I know, was just checking for zenspider "iirc"
<Ox0dea> adaedra: You... enjoy typing more than is necessary? :P
jenrzzz has quit [Ping timeout: 244 seconds]
<adaedra> no
<Ox0dea> zenspider: .() as an alias for #call is different from ., the method invocation "operator", for what that's worth.
<adaedra> It's not because it's possible that I do it
hanmac1 has left #ruby [#ruby]
ruurd has joined #ruby
juanpablo____ has joined #ruby
<craysiii> >> def foo(&bar); bar.(); end; foo { puts "bar" }
<ruboto> craysiii # => bar ...check link for more (https://eval.in/407254)
vdamewood has joined #ruby
<Ox0dea> Why are you people using #puts on ruboto?!
tjbiddle has quit [Quit: tjbiddle]
<craysiii> meh
bronson has joined #ruby
* craysiii scurries to bed
<adaedra> because it works
<zenspider> meh * 2
RegulationD has quit [Ping timeout: 240 seconds]
<Ox0dea> It's the "check link for more" bit that does it; we shouldn't force the machines to lie to us.
<craysiii> but theres a whole \n were missing
<craysiii> think of the children.
senayar has quit [Remote host closed the connection]
Kilo`byte has quit [Ping timeout: 256 seconds]
schaerli has quit [Remote host closed the connection]
senayar has joined #ruby
<shevy> one day the world may run out of \n
juanpablo____ has quit [Ping timeout: 265 seconds]
<yorickpeterse> Then we'll need \nv6
Musashi007 has quit [Quit: Musashi007]
dtcristo has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
tvw has quit []
rikkipitt has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
mdih has joined #ruby
Vile` has quit [Ping timeout: 246 seconds]
platzhirsch has joined #ruby
<mdih> hello, i understand that this is kinda off topic..but since openproject is based on ruby, ill just ask here hehe...do you guys know whats its irc channel? cant find it :(
<abdulrehman> welcome back adaedra
<adaedra> back? I'm always here.
codecop has quit [Remote host closed the connection]
<adaedra> :)
schaerli has joined #ruby
<yorickpeterse> mdih: https://community.openproject.org/projects/openproject/boards they have a forum, not sure if they have an IRC channel
banister has joined #ruby
Vile` has joined #ruby
aevitas has quit []
workmad3 has joined #ruby
quimrstorres has quit [Remote host closed the connection]
fabrice31 has quit [Remote host closed the connection]
<zenspider> how many times can we get "open" and "project" into a url?
<ljarvis> :D
GriffinHeart has quit [Remote host closed the connection]
fabrice31 has joined #ruby
<shevy> lol
<mdih> @yorickpeterse: thanks, yeah found the forum..and apparently no irc..thanx anyway hehe
Kilo`byte has joined #ruby
<shevy> it sure is one open project
oo_ has quit [Remote host closed the connection]
auzty has quit [Quit: Leaving]
<yorickpeterse> badum tsh
oo_ has joined #ruby
<yorickpeterse> ?rimshot
auzty has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
<Ox0dea> zenspider: Playing it safe, 4o + 7p should not exceed 2047.
quimrstorres has joined #ruby
quimrstorres has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
Ropeney has joined #ruby
<abdulrehman> adaedra: then I'm the one who returned hahahaha
<abdulrehman> welcome back me
dionysus69 has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
<adaedra> I see your access to IRC is still not blocked.
Musashi007 has joined #ruby
franckverrot has quit [Ping timeout: 250 seconds]
leafybasil has joined #ruby
zeroDivisible has quit [Ping timeout: 250 seconds]
<unshadow> craysiii: Ox0dea: well, I just opened an issue, hope someone at RubyCorp can help https://bugs.ruby-lang.org/issues/11400
zeroDivisible has joined #ruby
franckverrot has joined #ruby
<abdulrehman> hahaha not yet
<Ox0dea> unshadow: Hey, you got a double-ought!
<unshadow> Ox0dea: double-ought ?
Mendenhall has quit [Ping timeout: 244 seconds]
texasmade has quit [Ping timeout: 272 seconds]
nofxx has quit [Ping timeout: 256 seconds]
<Ox0dea> unshadow: A centurion.
Sypheren has joined #ruby
<Ox0dea> Why the misleading title?
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
<unshadow> Ox0dea: Oh, I'll re-write
schaerli has quit [Remote host closed the connection]
DLSteve_ has joined #ruby
<unshadow> Ox0dea: better ?
dtcristo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> unshadow: What happens if you remove the timeout block and/or storage into the Hash?
<unshadow> Ox0dea: Tried , nothing changes
schaerli has joined #ruby
fabrice31_ has joined #ruby
tvw has joined #ruby
<Ox0dea> It's immaterial to the problem, but why are you using hexadecimal notation for \r and \n?
<kannan4k> folks, one more question self.new() does what?
fabrice31_ has quit [Remote host closed the connection]
Sypheren has quit [Ping timeout: 246 seconds]
<unshadow> Ox0dea: no real reason
spider-mario has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
fabrice31 has joined #ruby
<ddv> kannan4k: what does Class.new do?
<unshadow> Ox0dea: I was thinking that maybe that would help in some "encoding" realted stuff
<Ox0dea> I see.
<kannan4k> ddv, no idea. I am new to Ruby :(
<yorickpeterse> kannan4k: it sends the "new" message to self
<yorickpeterse> if "self" here is a class (as in String.new) it will create a new instance of said class (unless overwritten)
felixr has joined #ruby
<kannan4k> yorickpeterse, so it will create an instance inside an instance?
<yorickpeterse> That depends on what "self" is here
<yorickpeterse> Do you have some example code?
<kannan4k> yeah, let me paste in gist
Trynemjoel has quit [Ping timeout: 256 seconds]
qiukun has quit [Ping timeout: 244 seconds]
Zai00 has quit [Quit: Zai00]
dtcristo has joined #ruby
qiukun has joined #ruby
Trynemjoel has joined #ruby
<yorickpeterse> Ah
<yorickpeterse> In that case "self.new" creates a new instance of "TSheets::Model"
<yorickpeterse> because the "from_raw" method is a class method
<yorickpeterse> (note the "def self.from_row")
wprice has quit [Quit: wprice]
<yorickpeterse> The "self." isn't needed though
<yorickpeterse> just "new(cache)" would've been fine as well
<kannan4k> oh from_raw is a class method?
Zai00 has joined #ruby
<yorickpeterse> Yes
<kannan4k> how can i differenciate bw the class method and an instance method?
<zenspider> kannan4k: ugh
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zenspider> generally the class method is "def self.xxx"
schaerli has quit [Remote host closed the connection]
<zenspider> douchier ways are "class << self; def xxx; ...; end; end"
<kannan4k> in python self will be used in the instance method
<zenspider> that code is bad. and probably relatively untested
<yorickpeterse> and what zenspider said
<yorickpeterse> "self" in Ruby just refers to the context/scope of sorts
<zenspider> you can also do "def ClassName.xxx", but almost nobody does (or should)
<kannan4k> zenspider, I have pasted a part of the big chunk of code
<yorickpeterse> and since basically everything is an instance of something that usually means it refers to an object of sorts
<zenspider> kannan4k: yes, you did.
tubuliferous_ has joined #ruby
<zenspider> bad
<workmad3> yorickpeterse: I'm not sure you can get a context where 'self' doesn't refer to an object
<kannan4k> zenspider, what's bad
lkba_ has joined #ruby
<yorickpeterse> workmad3: practically speaking probably not
Zai00 has quit [Client Quit]
<TheBrayn> I have a string like "begin\nitem1\nitem2\nbegin\n\item1\item2", how can I split it by the \n after begin?
<yorickpeterse> zenspider: there's a chance they didn't even write the code themselves
<yorickpeterse> especially considering they're apparently not sure what it does
<yorickpeterse> it being bad or not isn't really relevant to the question at hand
<yorickpeterse> TheBrayn: String#split
<Ox0dea> TheBrayn: With a second argument.
<yorickpeterse> &ri String#split
<zenspider> TheBrayn: The question is the answer
<workmad3> yorickpeterse: I guess you could probably write a C extension that grabbed a method from an object and then invoked it with self as NULL...
Musashi007 has quit [Quit: Musashi007]
lkba has quit [Ping timeout: 252 seconds]
<zenspider> don't really need a c-ext for that. that's what instance_eval does
<yorickpeterse> workmad3: yeah and probably segfault the shit out of it
<workmad3> zenspider: you can't get NULL inside ruby though... nil is still an object :)
<kannan4k> yorickpeterse, I am tring to understand the ruby code to know how it works
<yorickpeterse> kannan4k: I got that much
symm- has joined #ruby
tubuliferous_ has quit [Ping timeout: 265 seconds]
<Ox0dea> workmad3: Ruby uses the null pointer for false.
<zenspider> workmad3: well... NULL in C is 0, and that's false in ruby
<kannan4k> thank you so much for your answers yorickpeterse
<zenspider> >> false.object_id
<ruboto> zenspider # => 0 (https://eval.in/407278)
<Ox0dea> >> require 'fiddle'; Fiddle::Pointer.new(0).to_value
<ruboto> Ox0dea # => false (https://eval.in/407279)
Zai00 has joined #ruby
Zort0n has joined #ruby
<workmad3> Ox0dea: oh, I wasn't aware of that... so even if you used NULL in C, ruby would see it as an object...
<Ox0dea> That's right.
<Ox0dea> Well, it'd be context-dependent.
<yorickpeterse> kannan4k: np
fabrice31_ has joined #ruby
quimrstorres has joined #ruby
marius has joined #ruby
sankaber has joined #ruby
dtcristo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Hm, can self ever be nil outside of nil's singleton class?
quimrstorres has quit [Remote host closed the connection]
<TheBrayn> >> "begin\nitem1\nitem2\nbegin\n\item1\nitem2".split(/begin(\n)/)
<ruboto> TheBrayn # => ["", "\n", "item1\nitem2\n", "\n", "item1\nitem2"] (https://eval.in/407281)
<TheBrayn> hm, that's not working
<Ox0dea> This guy.
<yorickpeterse> >> "begin\nitem1\nitem2\nbegin\n\item1\nitem2".split("\n")
<ruboto> yorickpeterse # => ["begin", "item1", "item2", "begin", "item1", "item2"] (https://eval.in/407282)
<TheBrayn> and that's not what I want
<Ox0dea> "begin\nitem1\nitem2\nbegin\n\item1\nitem2".split(/\n/, 2) # TheBrayn
<Ox0dea> >> "begin\nitem1\nitem2\nbegin\n\item1\nitem2".split(/\n/, 2) # TheBrayn
<ruboto> Ox0dea # => ["begin", "item1\nitem2\nbegin\nitem1\nitem2"] (https://eval.in/407283)
symm- has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Ping timeout: 260 seconds]
<TheBrayn> and that only splits after the first begin
Sypheren has joined #ruby
<TheBrayn> maybe I should just split it by \n and then do the grouping some other way
<yorickpeterse> you can also just nuke everything leading up to the "begin\n"
Zai00 has quit [Quit: Zai00]
<Zort0n> Which result do you need?
PaulCapestany has quit [Read error: Connection reset by peer]
tennis has quit [Remote host closed the connection]
<Ox0dea> TheBrayn: There's a #chunk_while method in 2.3 that you could really use right about now.
<abdulrehman> adaedra: is there a way I can do this; DateTime.parse(someString).formate(YYYYMMDD)?
<abdulrehman> where somestring is a date
khebbie has joined #ruby
sankaber has quit [Ping timeout: 244 seconds]
<adaedra> &ri Date.strptime
Zai00 has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
<adaedra> Also, don't address to me directly, everyone is here to help!
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<adaedra> well, except ruboto
<arup_r> now I am thinking how to handle where these is more than one packages can be fit.. :/ https://gist.github.com/aruprakshit/d324aa6a107e223d76c7
<abdulrehman> lol ok
fabrice31 has joined #ruby
<abdulrehman> just thought to keep you on your toes :p
<yorickpeterse> &ri Date#strftime
hanmac has quit [Ping timeout: 240 seconds]
<yorickpeterse> for formatting
quimrstorres has joined #ruby
<workmad3> >> "begin\nitem1\nitem2\nbegin\n\item1\nitem2".split("\n").slice_before { |item| item == "begin" }.to_a
<ruboto> workmad3 # => [["begin", "item1", "item2"], ["begin", "item1", "item2"]] (https://eval.in/407289)
<workmad3> TheBrayn: ^ that close enough?
Sypheren has quit [Ping timeout: 246 seconds]
<abdulrehman> yorickpeterse: thanks, and done!! I knew of it, I was just using it wrong
<abdulrehman> adaedra: thanks, and I won't dress you any more buddy!! I'll dress ruboto :-p
Rickmasta has joined #ruby
<Ox0dea> abdulrehman: Please let people choose their own outfits.
<adaedra> o k
tsujp has quit [Quit: tsujp is snoozing]
<workmad3> adaedra: aww, you just lost your personal fashion assistant :(
<adaedra> :'(
khebbie has quit [Ping timeout: 240 seconds]
Zai00 has quit [Client Quit]
<Ox0dea> Fella's over there puttin' clothes on machines now.
<adaedra> I'll code a plugin to `derpy to do that.
<abdulrehman> hey, obama didn't give you guys care health options, why should I give you fashion options!!!
<Ox0dea> ?ot abdulrehman
<ruboto> abdulrehman, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<adaedra> we're not all guys, and not all americans.
schaerli has joined #ruby
Sypheren has joined #ruby
Zai00 has joined #ruby
<abdulrehman> ruboto: sorry, yah no more off topics, adaedra also yes I know, I was just kidding....
<adaedra> workmad3 is american, ask him.
tvw has quit [Remote host closed the connection]
<arup_r> abdulrehman, ruboto has no sense of humour,, don't call :)
tvw has joined #ruby
Zai00 has quit [Client Quit]
<workmad3> adaedra: I'm trying not to take offence at that...
felixr has quit [Quit: Konversation terminated!]
<adaedra> what
<workmad3> adaedra: calling me ... american... *shudder*
felixr has joined #ruby
<workmad3> :P
<adaedra> british, american, all the same
<adaedra> :P
dionysus69 has quit [Ping timeout: 255 seconds]
mathie has quit [Quit: Quitting...]
Trynemjoel has quit [Ping timeout: 256 seconds]
mathie has joined #ruby
<shevy> le french
<adaedra> le autrichien
<yorickpeterse> baguette
Trynemjoel has joined #ruby
Sypheren has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Remote host closed the connection]
rdark has quit [Ping timeout: 272 seconds]
<ljarvis> baguette fromage
<adaedra> I could also do a list of all French words I know
stamina has joined #ruby
<unshadow> Ox0dea: So, it seems the non-ssl version (the one without the Regexp support) wont return fixnum error
frem has quit [Quit: Connection closed for inactivity]
marius has quit [Read error: Connection reset by peer]
marius has joined #ruby
zeeraw has joined #ruby
anisha has quit [Ping timeout: 246 seconds]
<abdulrehman> arup_r: well, he works with ruby, I am sure he has some sense of humour hahaha
acke has quit [Read error: Connection reset by peer]
acke has joined #ruby
<adaedra> ?botsnack
<ruboto> nomnomnomnom
quimrstorres has quit [Remote host closed the connection]
<arup_r> bnagy, you there ?
quimrstorres has joined #ruby
fabrice31 has joined #ruby
fabrice31 has quit [Remote host closed the connection]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
rdark has joined #ruby
fabrice31 has joined #ruby
tvw has quit [Remote host closed the connection]
<bnagy> yes
tvw has joined #ruby
tvw has quit [Client Quit]
Trynemjoel has quit [Ping timeout: 256 seconds]
<arup_r> I wrote it for simple scenario.. Now not able to decide how to approach when I have a input date ranges where more than 1 same or different packge will exist...
zeeraw has joined #ruby
Trynemjoel has joined #ruby
tvw has joined #ruby
iloverubynoob has quit [Remote host closed the connection]
* bnagy shrugs
<bnagy> I can't read your code
<arup_r> i know it is too bad..
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<arup_r> if-else killed it
zeeraw has quit [Client Quit]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
oo_ has quit [Remote host closed the connection]
minmax has quit [Quit: WeeChat 0.4.3]
sdothum has joined #ruby
<bnagy> you can usually refactor if test blah else next as next unless test; blah
yardenbar has joined #ruby
anisha has joined #ruby
Vimz has quit [Ping timeout: 240 seconds]
<bnagy> but that's kind of a tiny part of a gigantic mural of code I don't like
Xiti has quit [Quit: Xiti]
qiukun has quit [Quit: qiukun]
<arup_r> Ok.. I'll refactor it.. But looking for the idea.. of how to get out the minimum from mix of packages.
zeeraw has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
pyo_ has quit []
I has joined #ruby
I is now known as Guest70063
Guest70063 is now known as despai
oo_ has joined #ruby
fabrice31_ has joined #ruby
werelivinginthef has joined #ruby
quimrstorres has quit [Ping timeout: 260 seconds]
quimrstorres has joined #ruby
fabrice31 has quit [Ping timeout: 246 seconds]
bigmac_ has joined #ruby
rodfersou has joined #ruby
yardenbar has quit [Ping timeout: 244 seconds]
werelivinginthef has quit [Ping timeout: 240 seconds]
despai has left #ruby ["Leaving"]
despai has joined #ruby
[k- has joined #ruby
safeforge has quit [Remote host closed the connection]
j4cknewt has joined #ruby
quimrsto_ has joined #ruby
<despai> hello guys. I'm having a weird problem when pushing an application to heroku. It works perfectly on local but when pushing it to heroku... Error: https://gist.github.com/DavidValin/5e8eb89215d317fea7ef Rakefile line 25: https://gist.github.com/DavidValin/45a1b6564ef03338a42a database.yml https://gist.github.com/DavidValin/84d963dc7d3ab884c95b I really don't see any syntax problem in the yml file. Does anyone, please, have an idea of what can be causing th
<despai> is issue?
<ddv> despai: do your editor support showing invisibles? turn it on and look
<ddv> does*
quimrstorres has quit [Ping timeout: 240 seconds]
<despai> Let's see
zeeraw has quit [Read error: Connection reset by peer]
<ddv> despai: remove trailing whitespace, convert tabs to spaces
allcentury has joined #ruby
chills42 has joined #ruby
juanpablo____ has joined #ruby
chills42 has quit [Remote host closed the connection]
chills42 has joined #ruby
<despai> no weird stuff there.. I'm reading that heroku overrides the databases.yml
ta has quit [Remote host closed the connection]
<despai> I knew that but I though I can also read it using YAML.load_file. Maybe thats the issue
<despai> will check
<despai> thanks ddv
sarkyniin has joined #ruby
jimms has joined #ruby
juanpablo____ has quit [Ping timeout: 244 seconds]
arup_r has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
strixd has quit [Quit: 500]
dorei has joined #ruby
DaniG2k has joined #ruby
<DaniG2k> hello all
<DaniG2k> when making a ruby gem, what's a good location to put config files (text or yaml or whatever)
aevitas has joined #ruby
<Radar> DaniG2k: config/
<jhass> DaniG2k: I'd say depends on what the gem is for
bruno- has joined #ruby
<DaniG2k> jhass: im making a small full-text search and just want to define where the index file will be
Papierkorb has joined #ruby
<jhass> so a CLI tool?
<DaniG2k> erm....could be, but it's meant to hook into Rails via Railties
rdark has quit [Quit: leaving]
rdark has joined #ruby
<jhass> then I'd go for in code configuration, SuperSearch.configure do |config| and have the user call that before using the gem
Igorshp has quit [Remote host closed the connection]
ynroot has joined #ruby
<jhass> in a rails app in a config/initializer typically
j4cknewt has quit [Read error: Connection reset by peer]
fgo has joined #ruby
marius is now known as nkts
mbeasley_ has quit [Quit: WeeChat 1.0.1]
<DaniG2k> jhass: ok...I have something like that now: https://github.com/DaniG2k/rankrb/blob/master/lib/rankrb.rb
Igorshp has joined #ruby
<DaniG2k> jhass: check the self.configure method :D
<DaniG2k> also, pay special attention to the self.❨╯°□°❩╯︵┻━┻ method
<jhass> shamelessly stolen from sidekiq
<jhass> but yeah, like that
<DaniG2k> hahaha
<DaniG2k> yesssssss
ynroot has quit [Client Quit]
Sypheren has joined #ruby
<jhass> and then have Configuration have good defaults or raise on missing values
dgutierrez1287 has joined #ruby
<DaniG2k> ok so, excuse the ignorance but if someone were to define the index file like that, I'd need to have some logic to create that file. I'm thinking that it might actually be best to just create the index file without prompting the user at all :S
ynroot has joined #ruby
<DaniG2k> yeah
<DaniG2k> Configuration should probably just have it by default
bruno- has quit [Ping timeout: 256 seconds]
TvL2386 has joined #ruby
<jhass> so you're actually asking what a good default location for the index file would be?
Muhannad has quit [Ping timeout: 240 seconds]
auzty has quit [Quit: Leaving]
<DaniG2k> basically all I want is for the index file to be found if it's already there or be created anew if it's not. I don't think prompting the user is actually a good idea now that I think of it
j4cknewt has joined #ruby
<DaniG2k> jhass: that was my initial idea yes. Probably just /config would be ok
<jhass> well, I'm not sure what your index file does but depending on how persistent it needs to be, in the context of a rails app I'd go for tmp/ or vendor/
Igorshp has quit [Ping timeout: 264 seconds]
<jhass> or even db/
<DaniG2k> jhass: good point
<jhass> (which is where eg sqlite DBs live iirc)
<DaniG2k> db/ is probably a good starting point
<DaniG2k> yeah
<DaniG2k> jhass: if I create a db directory....does it appear in the Rails app's same db directory? how would that work?
<DaniG2k> i mean, if I create a db directory within my gem.
<jhass> Rails.root should be available in a rails engine
strixd has joined #ruby
<DaniG2k> I'm making a gem not an Engine :\ not sure if that makes a difference.
<jhass> you blabbered something about a railtie, sounds quite a bit like an engine to me
<DaniG2k> hahah
ynroot has quit [Quit: Konversation terminated!]
Lucky___ has joined #ruby
<DaniG2k> I have this litte baby here, taht's all: https://github.com/DaniG2k/rankrb/blob/master/lib/rankrb/railtie.rb
nveselinov has joined #ruby
<DaniG2k> so if all one needs to make an engine is class Railtie < Rails::Railtie then yes, my gem's an engine :)
<workmad3> DaniG2k: you're about 99% of the way to making that into a gem that mounts as an engine if rails is present
anisha has quit [Ping timeout: 250 seconds]
<workmad3> DaniG2k: you'd just need to change Rails::Railtie to Rails::Engine
<DaniG2k> awesome
Sypheren has quit [Ping timeout: 256 seconds]
ldnunes has joined #ruby
<DaniG2k> wow
<DaniG2k> didn't know that
<DaniG2k> thanks
<workmad3> DaniG2k: you probably don't need that though... the configuration, generator setup, rake tasks & initializer hooks are all accessed through Railtie (which Engine inherits)
y0da has joined #ruby
but3k4 has quit [Read error: Connection reset by peer]
<DaniG2k> workmad3: ok
Cybergeek_ has quit [Quit: ZNC - http://znc.in]
<DaniG2k> I'll try doing things simply for now
d10n-work has joined #ruby
<DaniG2k> if I need the engine I'll use the rails plugin command :D
devyn has joined #ruby
Zai00 has joined #ruby
<workmad3> DaniG2k: looking @ what you're trying btw, I'd personally suggest that you pass in a path to an index file when creating an Index, and the Index will create the file if it doesn't exist... you can then use your Railtie to set up a default path based on Rails.root that allows users to override it, and then use a Rails initializer to create an index on rails app bootup
tkuchiki has quit [Remote host closed the connection]
pyo_ has joined #ruby
ips|malc has joined #ruby
Sypheren has joined #ruby
<DaniG2k> workmad3: I'd love to do that. Unfortunately I don't think I know how to :(
allomov has quit [Remote host closed the connection]
<jhass> also this starts to get very Rails specific, maybe head over to #RubyOnRails ;)
<DaniG2k> hahah yea
<jhass> DaniG2k: I don't think you tried yet, you can make that claim in half an hour
<workmad3> ^^ maybe an hour... you need to find and read the guide on rails initializers too ;)
<DaniG2k> jhass: I'm stuck on point #0: I created a db directory but git isn't picking it up
<DaniG2k> hahah
jimms has quit [Remote host closed the connection]
<DaniG2k> probably the gemspec file
bruno- has joined #ruby
<jhass> git doesn't commit empty directories since it only tracks files
<DaniG2k> ah that must be why
<jhass> and the db/ directory should be the one of your app
<jhass> not inside the gem
<jhass> where you probably can't even write to when installed
iloverubynoob has joined #ruby
<DaniG2k> ah that's the problem I've been having then
<DaniG2k> I created a file but it was looking within the installed gem
_blizzy_ has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
shortCircuit__ has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<TheBrayn> workmad3: thanks, that works great
<shortCircuit__> A closure can be made with lambda and proc .. But is there any way to use only methods and maybe blocks and make a closure
schaerli has quit [Remote host closed the connection]
<jhass> shortCircuit__: yes, blocks closure too
<jhass> methods don't
tubuliferous_ has joined #ruby
<jhass> but hint: you pass a block to define_method
fabrice31_ has quit [Remote host closed the connection]
<[k-> DaniG2k: we usually name the file .keep
anisha has joined #ruby
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shortCircuit__> I actually tried , def foo(a,&b); b.call(a); end .. ;D bt that's not closure .
chipotle has joined #ruby
<shortCircuit__> Ok checking
Sypheren has quit [Ping timeout: 264 seconds]
_blizzy_ has quit [Read error: Connection reset by peer]
stamina has quit [Quit: WeeChat 1.2]
<DaniG2k> [k-: yea?
schaerli has joined #ruby
<[k-> yeah.
_blizzy_ has joined #ruby
cornerma1 has joined #ruby
<jhass> shortCircuit__: just curious or have some real problem to solve?
tubuliferous_ has quit [Ping timeout: 244 seconds]
Feyn has quit [Ping timeout: 244 seconds]
<shortCircuit__> Curious
s00pcan has joined #ruby
<shortCircuit__> And also curious if lambda and proc are there then why would one do that :P
Papierkorb has quit [Read error: Connection reset by peer]
Papierkorb has joined #ruby
<jhass> hard to argue in the general
<jhass> each have their usecases
<yorickpeterse> a lambda is nothing but a proc with required arguments and having its own "return" context
<yorickpeterse> a proc is a closure, or as close as you can get
omegamike has joined #ruby
cornerman has quit [Ping timeout: 250 seconds]
cornerma1 is now known as cornerman
dimasg has joined #ruby
Silox| has quit [Quit: Connection closed for inactivity]
<jhass> [k-: I've seen .gitkeep to be more common
devyn has quit [Ping timeout: 244 seconds]
aevitas_ has joined #ruby
<livcd> yorickpeterse: what can you do with proc ? you can save a block with it and pass it around
<livcd> anything else ?
yfeldblu_ has quit [Ping timeout: 246 seconds]
<shortCircuit__> define_method(:foobar); do |block|; block.call(some_variable); end ?
adrianpacala has quit [Quit: Textual IRC Client: www.textualapp.com]
shpoont has joined #ruby
<[k-> jhass: let's follow yours then
omegamike has quit [Ping timeout: 240 seconds]
allcentury has quit [Quit: WeeChat 1.2]
<[k-> remember, i dont read much :P
ips|malc has joined #ruby
aevitas has quit [Ping timeout: 256 seconds]
shpoont has quit [Max SendQ exceeded]
<jhass> shortCircuit__: you're sure you understand what a closure is?
Igorshp has joined #ruby
<jhass> >> a = 5; define_method(:foo) { a * 3 }; b = foo; a = 10; [b, foo]
<ruboto> jhass # => [15, 30] (https://eval.in/407353)
<jhass> ^ don't ever do prod code depending on such behavior though
<shortCircuit__> Yeah, in JavaScript terms if an inner method has a reference to a free variable in its parent scope , then it creates a closure .. So if we call the parent method, until and unless the child is called the context retains all env props of its parent ..
<shortCircuit__> Something like that!!
j4cknewt has quit [Ping timeout: 244 seconds]
<[k-> time to use this for throwing people off!
shpoont has joined #ruby
<shortCircuit__> Free variable meaning one that isn't in the parameter list or a local variable
<yorickpeterse> livcd: blocks _are_ procs
[k-_ has joined #ruby
<jhass> shortCircuit__: not sure why you try to receive and pass parameters then :/
j4cknewt has joined #ruby
<shortCircuit__> Have to use yield?
mikecmpb_ has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
sinkensabe has quit [Remote host closed the connection]
j4cknewt has joined #ruby
<shortCircuit__> Ok
mikecmpbll has quit [Ping timeout: 240 seconds]
chills42 has quit [Remote host closed the connection]
juanpablo____ has joined #ruby
<shortCircuit__> like; def foo; bat=1; yield bat; end.
chills42 has joined #ruby
aevitas has joined #ruby
<workmad3> shortCircuit__: that passes an argument into the provided block
<shortCircuit__> Now foo{|a| a+5}
<shortCircuit__> Oh
<workmad3> shortCircuit__: a closure is more like; `def foo; bar = yield; puts bar; end; a = 20; foo { a }` <-- (take a guess as to what that will do before running it)
devyn has joined #ruby
aevitas_ has quit [Ping timeout: 250 seconds]
oo_ has quit [Remote host closed the connection]
juanpablo____ has quit [Ping timeout: 260 seconds]
Rickmasta has joined #ruby
shortCircuit__ has quit [Ping timeout: 250 seconds]
sinkensabe has joined #ruby
rideh has joined #ruby
ferr has quit [Quit: WeeChat 1.2]
Violentr has quit [Ping timeout: 260 seconds]
yardenbar has joined #ruby
dimasg has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
j4cknewt has quit [Ping timeout: 244 seconds]
mercwithamouth has quit [Ping timeout: 255 seconds]
vdamewood has quit [Ping timeout: 250 seconds]
shortCircuit__ has joined #ruby
felixr has quit [Quit: Konversation terminated!]
felixr has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
joneshf-laptop has quit [Ping timeout: 252 seconds]
Xiti has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
<Fraeon> I'm surprised nobody has come up with the idea of a malware that turns your computer part of a cloud that runs RoR apps
j4cknewt has joined #ruby
skyrocker has joined #ruby
skyrocker has left #ruby [#ruby]
dumdedum has quit [Quit: foo]
yardenbar has quit [Ping timeout: 252 seconds]
zeeraw has joined #ruby
centrx has joined #ruby
<centrx> Hi shevys
joneshf-laptop has joined #ruby
<shortCircuit__> workmad3 it should be 20 .. It's a closure because it can remember the value of bar when executed from outside like foo{a}
unshadow_ has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
bruno- has quit [Ping timeout: 255 seconds]
<workmad3> shortCircuit__: right answer, wrong explanation
dimasg has joined #ruby
<shortCircuit__> :(
ruurd has joined #ruby
zeeraw has quit []
astrobunny has quit [Remote host closed the connection]
iateadonut has quit [Quit: Leaving.]
centrx has quit [Remote host closed the connection]
unshadow has quit [Ping timeout: 240 seconds]
but3k4 has joined #ruby
centrx has joined #ruby
zeeraw has joined #ruby
sdwrage has joined #ruby
y0da has quit [Read error: Connection reset by peer]
acovrig has joined #ruby
iateadonut has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
unshadow_ has quit [Ping timeout: 244 seconds]
TheHodge has joined #ruby
unshadow has joined #ruby
manila90 has joined #ruby
sdwrage has quit [Client Quit]
Sypheren has joined #ruby
zeeraw has quit [Client Quit]
omegamike has joined #ruby
ruby-lang600 has joined #ruby
c0m0 has quit [Ping timeout: 260 seconds]
syath has joined #ruby
<manila90> hi, i am curious if anyone knows a clean way to save the second IP of a subnet to a string, I am now using the ipaddress gem, where I save the subnet 10.1.1.0/24 into a IPAddress
<manila90> irb(main):029:0> ip
<manila90> => #<IPAddress::IPv4:0x007fb423ae5810 @address="192.168.1.0", @prefix=24, @octets=[192, 168, 1, 0], @u32=3232235776>
<manila90> irb(main):030:0> ip.first.address
<manila90> => "192.168.1.1"
<manila90> is could mess with the last characters of the string to select the 192.168.1.2
<manila90> i could mess with the last characters of the string to select the 192.168.1.2
<manila90> but maybe there is a better way to select this from a function?
victortyau has joined #ruby
codecop has joined #ruby
Sypheren has quit [Ping timeout: 244 seconds]
schaerli has quit [Remote host closed the connection]
<manila90> https://github.com/bluemonk/ipaddress this documentation is not very helpful in this
yardenbar has joined #ruby
victortyau has quit [Max SendQ exceeded]
<workmad3> manila90: ip.to_a[2]
<manila90> cool!
<manila90> thanks
victortyau has joined #ruby
<workmad3> manila90: ip.to_enum.take(3).last
chills42 has quit [Remote host closed the connection]
sgambino has joined #ruby
schaerli has joined #ruby
<workmad3> (the to_enum should be lazy, afaict, so it won't create millions or billions of ipaddress objects if you have a larger subnet range)
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kully3xf has joined #ruby
<workmad3> yeah... when using "192.0.0.0/8" as the subnet, to_a starts to take a long time, but to_enum is still nice and snappy :)
ruby-lang600 has quit [Quit: Page closed]
<manila90> ah yes, indeed it is
<workmad3> manila90: so yeah... to_enum gives you an enumerator over all the addresses in the range
<workmad3> use as you see fit :)
unshadow_ has joined #ruby
<workmad3> (with large subnets, I'd highly recommend looking @ ruby's lazy enumerators and using ip.to_enum.lazy to work with the collection)
uri_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DroidBurgundy has joined #ruby
uri_ has joined #ruby
unshadow has quit [Ping timeout: 252 seconds]
Sypheren has joined #ruby
DaniG2k has quit [Ping timeout: 246 seconds]
<manila90> ty! good tip
dimasg has quit [Ping timeout: 260 seconds]
khebbie has joined #ruby
khebbie_ has joined #ruby
<manila90> irb(main):014:0> b.to_enum.take(10000).count
<manila90> => 10000
<manila90> irb(main):015:0> b.to_a.take(10000).count
<manila90> waiting ;-)
dgutierrez1287 has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
j4cknewt has joined #ruby
schaerli has quit [Remote host closed the connection]
chills42 has joined #ruby
Sypheren has quit [Ping timeout: 244 seconds]
IrishGringo has joined #ruby
c0m0 has joined #ruby
Yiota has joined #ruby
yardenbar has quit [Ping timeout: 246 seconds]
j4cknewt has quit [Ping timeout: 244 seconds]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
dabradley has quit [Ping timeout: 246 seconds]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
scripore has joined #ruby
manila90 has quit [Quit: Leaving]
j4cknewt has joined #ruby
manila90 has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
chinmay_dd has quit [Read error: Connection reset by peer]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
dumdedum has joined #ruby
c0m0 has quit [Ping timeout: 260 seconds]
sdwrage has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
scripore has quit [Client Quit]
polysics has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
Rickmasta has joined #ruby
serivich has joined #ruby
stantonnet has quit [Remote host closed the connection]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
riffraff has quit [Quit: Leaving]
j4cknewt has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
c0m0 has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
Pyrotecnix has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
quimrstorres has joined #ruby
quimrsto_ has quit [Ping timeout: 246 seconds]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
sevenseacat has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
werelivinginthef has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
quimrstorres has quit [Remote host closed the connection]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
yardenbar has joined #ruby
banister has joined #ruby
A124 has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
senayar has quit [Remote host closed the connection]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
aevitas has quit [Remote host closed the connection]
senayar has joined #ruby
umgrosscol has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
yaroslav has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
<shevy> long live ruby \o/
conta has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
werelivinginthef has quit [Ping timeout: 250 seconds]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
chinmay_dd has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
unshadow has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
<[k-_> shevy!
Jrz has joined #ruby
RegulationD has joined #ruby
Jrz has quit [Max SendQ exceeded]
<shevy> [k- \o/
quimrstorres has joined #ruby
unshadow_ has quit [Ping timeout: 246 seconds]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
dopie has quit [Ping timeout: 244 seconds]
bmurt has quit []
livathinos has quit []
RegulationD has quit [Ping timeout: 256 seconds]
acovrig has quit [Quit: acovrig]
dblessing has joined #ruby
yeticry has quit [Ping timeout: 252 seconds]
yeticry has joined #ruby
gwendall has quit []
nateberkopec has joined #ruby
codecop has quit [Remote host closed the connection]
alex88 has joined #ruby
charliesome has joined #ruby
yeticry has quit [Ping timeout: 272 seconds]
bruno- has joined #ruby
shevy has quit [Ping timeout: 252 seconds]
bruno- is now known as Guest20016
sash_ has quit [Remote host closed the connection]
sha89 has joined #ruby
duggiefresh has joined #ruby
yeticry has joined #ruby
davejlong has joined #ruby
whippythellama has joined #ruby
devdazed has joined #ruby
arup_r has joined #ruby
yardenbar has quit [Ping timeout: 255 seconds]
krz has quit [Ping timeout: 272 seconds]
nertzy has joined #ruby
Guest20016 has quit [Ping timeout: 240 seconds]
platzhirsch has quit [Quit: Leaving.]
aryaching has joined #ruby
yardenbar has joined #ruby
bigmac_ has quit [Ping timeout: 256 seconds]
DLSteve_ has quit [Quit: Textual IRC Client: www.textualapp.com]
platzhirsch has joined #ruby
zeeraw has joined #ruby
tubuliferous_ has joined #ruby
chinmay_dd has quit [Read error: Connection reset by peer]
yeticry has quit [Ping timeout: 240 seconds]
aryaching has quit [Read error: Connection reset by peer]
snockerton has joined #ruby
schaerli has joined #ruby
yeticry has joined #ruby
sha89 has quit []
Sypheren has joined #ruby
vyorkin has joined #ruby
DaniG2k has joined #ruby
<alex88> hi guys, with an hash resulting of a group_by so an hash of arrays of hashes, what's the shorter way to set the group_by hash values to the sum of a property of the hashes in the array?
charliesome has quit [Quit: zzz]
<adaedra> ?guys
<ruboto> You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folk", "y'all" or "everyone" instead?
nveselinov has quit [Quit: Connection closed for inactivity]
<adaedra> also, do you have an example of what you want?
symbol has joined #ruby
<alex88> shouldn't be "folks" instead of folk?
<alex88> anyway, let me gist
juanpablo____ has joined #ruby
<adaedra> jhass, apeiros: ^
aryaching has joined #ruby
<ljarvis> !fact ed guys You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
<ruboto> ljarvis, I stand corrected that guys is You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
shevy has joined #ruby
tubuliferous_ has quit [Ping timeout: 250 seconds]
Sypheren has quit [Ping timeout: 240 seconds]
Igorshp has quit [Remote host closed the connection]
<alex88> basically group by date and set the hash value of the corresponding date the sum of the `value` key of the hashes in the array corresponding to that date
<alex88> so a group_by date and sum the values
<adaedra> just the sum of values element as value in your root hash then?
krz has joined #ruby
<alex88> yeah
<ljarvis> values.inject(0) { |total, hash| total + hash[:value] }
n008f4g_ has joined #ruby
juanpablo____ has quit [Ping timeout: 272 seconds]
y0da has joined #ruby
but3k4 has quit [Read error: Connection reset by peer]
<alex88> so it will be an hash of values which are the sum of the value key in the array
vyorkin has quit [Quit: WeeChat 1.2]
theery has joined #ruby
<ljarvis> changes.each_with_object(Hash.new(0)) { |charge, all| all[Time.at(charge.create).to_date] += charge[:value] }
<ljarvis> or something
acovrig has joined #ruby
mary5030 has joined #ruby
serivichi has joined #ruby
Guest32 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
prefixed has joined #ruby
schaerli has quit [Remote host closed the connection]
tkuchiki has joined #ruby
<alex88> oh awesome! charges.each_with_object(Hash.new(0)) { |charge, all| all[Time.at(charge[:created]).to_date] += charge[:value] }
<alex88> ljarvis: thanks!
<ljarvis> np
prefixed has quit [Changing host]
prefixed has joined #ruby
banister has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby
Violentr has joined #ruby
Zai00 has quit [Ping timeout: 264 seconds]
chinmay_dd has joined #ruby
snophey has joined #ruby
willywos has joined #ruby
serivich has quit [Ping timeout: 255 seconds]
quimrstorres has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
scripore has joined #ruby
<adaedra> shevy: [k-_ is coding but not in Ruby!
uri_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-_> you tipper!
<shevy> adaedra damn haskell
christiandsg has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
malconis has joined #ruby
dfockler has joined #ruby
tagrudev has quit [Remote host closed the connection]
Zort0n has quit [Quit: Textual IRC Client: www.textualapp.com]
havenwood has joined #ruby
aganov has quit [Remote host closed the connection]
freerobby has joined #ruby
werelivinginthef has joined #ruby
Igorshp has joined #ruby
arup_r has quit [Quit: Leaving]
dfockler has quit [Ping timeout: 260 seconds]
Zai00 has joined #ruby
TvL2386 has quit [Ping timeout: 252 seconds]
bustrarm has joined #ruby
melter has joined #ruby
fabrice31 has joined #ruby
snophey has quit [Read error: Connection reset by peer]
chills42 has quit [Remote host closed the connection]
zeeraw has quit []
deepu has joined #ruby
busterarm has quit [Ping timeout: 260 seconds]
arturmartins has joined #ruby
maZtah is now known as ELCALOR
zeeraw has joined #ruby
JoshL has joined #ruby
juanpablo____ has joined #ruby
John63 has joined #ruby
Igorshp has quit [Remote host closed the connection]
<apeiros> !kick John63 no spam
John63 was kicked from #ruby by ruboto [no spam]
kokoleavia has joined #ruby
<ddv> looks like a shit game anyways, good job apeiros
Igorshp has joined #ruby
<TheBrayn> Any sequel users her? How can I use the pg_array method from here? http://sequel.jeremyevans.net/rdoc-plugins/files/lib/sequel/extensions/pg_array_rb.html the documentation mentions calling “Sequel.extension :core_extensions” but it does not say where to call it
serivichi has quit [Ping timeout: 244 seconds]
fractalis has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
scripore has quit [Quit: This computer has gone to sleep]
fabrice31 has quit [Read error: No route to host]
fabrice31 has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
<ljarvis> TheBrayn: call it to load the extension (i.e when your code loads, before you use it)
Igorshp has quit [Ping timeout: 240 seconds]
<ljarvis> i.e I would probably call it right before connecting to the DB
<TheBrayn> I have called it in my constructor but I still get an undefined method exception for pg_array
sdwrage has joined #ruby
<ljarvis> TheBrayn: maybe show your code? but a constructor sounds like a bad place to load it
<TheBrayn> sure, sec
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
y0da has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby
CustosLimen has quit [Ping timeout: 272 seconds]
but3k4 has joined #ruby
_blizzy_ has quit [Ping timeout: 265 seconds]
dopie has joined #ruby
hinbody has joined #ruby
khebbie_ has quit [Remote host closed the connection]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
podman has joined #ruby
<TheBrayn> updated it with the error message
paulcsmith has joined #ruby
dtzitz has joined #ruby
NeverDie has joined #ruby
<ljarvis> TheBrayn: you said "but I still get an undefined method exception for pg_array"
<ljarvis> but that's not the error?
<TheBrayn> right: configmanager_converter.rb:37:in `block (2 levels) in update_tables': undefined method `pg_array' for Sequel:Module (NoMethodError)
<ljarvis> ... that's not in the gist
<TheBrayn> yeah I copied the wrong line
momomomomo has quit [Ping timeout: 252 seconds]
<ljarvis> I'd ask in #sequel
kb3ien has joined #ruby
sinkensabe has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
kokoleavia has quit [Ping timeout: 246 seconds]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
<abdulrehman> guys/gals is there a way to embed ruby logic in a sql? so instead of using case statement use some if statement or unless statement to select one coloumn over the otehr i some conditions are met? or I am dead down to use sql?
<kb3ien> trying to change a string '{"foo" => "bar"}' into something safe for an html string. I tried to use tmp.gsub(/\"/,'%22'); or tmp.gsub(/"/,'%22'); but nothing changed
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis> ?code abdulrehman
<ruboto> abdulrehman, We can't help you without your code, please post it to https://gist.github.com
Violentr has quit [Ping timeout: 265 seconds]
<abdulrehman> cool one minuite
scripore has joined #ruby
Sypheren has joined #ruby
momomomomo has joined #ruby
chills42 has joined #ruby
safeforge has joined #ruby
<ljarvis> kb3ien: CGI.escapeHTML
rikkipitt has quit [Quit: Leaving...]
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CustosLimen has joined #ruby
christiandsg has quit [Read error: Connection reset by peer]
prefixed has quit [Remote host closed the connection]
rideh has quit [Quit: zap]
christiandsg has joined #ruby
momomomomo has quit [Client Quit]
<abdulrehman> ljarvis: along these lines, https://gist.github.com/AbdulR3hman/2468e54f266dd9b90b61
prefixed has joined #ruby
quimrstorres has joined #ruby
tjbiddle has joined #ruby
kies^ has joined #ruby
<ljarvis> abdulrehman: right, no; you need to use sql
<abdulrehman> the reason behing this, is that the statement is gonna be very long and I'd rather customise it using ruby but I think it wont be possible this might be sql cause it needs to be done on the server side
<ljarvis> abdulrehman: SQL is extremely powerful, you should embrace it in your toolset
codecop has joined #ruby
UukGoblin has joined #ruby
UukGoblin has left #ruby [#ruby]
<abdulrehman> ljarvis: I guess you are right, I try to avoid doing just because it looks ugly in the ruby code, I wish I can kinda sperate them in different places where the sql is in different place and the call (logic) of calling the sql is in the main function
rideh has joined #ruby
<abdulrehman> I guess I can use prepared statements and simply require them from different files
<ljarvis> abdulrehman: well you should use something like sequel to build your query so you don't have to hand write it
<ljarvis> which means you get to write more ruby-esque code
tjbiddle has quit [Client Quit]
<ljarvis> but I'm of the opinion that having SQL strings in your code is absolutely fine, though I am probably not in the majority
<abdulrehman> ljarvis: the problem is in the project I am working with I am using three different database, orcale sybase and sql server.
christiandsg has quit [Read error: Connection reset by peer]
<ljarvis> :|
<darix> ljarvis: it is much better to obfuscate them with some DSL which will probably be a ton of lines longer
<abdulrehman> ljarvis: I guess you are right
<darix> ^^
<ljarvis> darix: :)
bruno- has joined #ruby
DaniG2k_ has joined #ruby
<abdulrehman> koolio, thanks folks
charliesome has joined #ruby
danman has joined #ruby
sinkensabe has joined #ruby
tjbiddle has joined #ruby
Sypheren has quit [Ping timeout: 256 seconds]
lannonbr has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
DaniG2k has quit [Ping timeout: 246 seconds]
scripore has quit [Quit: This computer has gone to sleep]
tjbiddle has quit [Client Quit]
nzst has joined #ruby
lolmaus has joined #ruby
<nzst> Hello, How can I assert that variable is valid iso8601?
jobewan has joined #ruby
riotjones has quit [Remote host closed the connection]
<nzst> *contains
jobewan has quit [Read error: Connection reset by peer]
<ljarvis> ?context nzst
<ruboto> nzst, Please add more context to your question, what are you doing, why are you doing it, which libraries are involved. Post some code to gist if it clarifies your question.
kb3ien has left #ruby [#ruby]
christiandsg has joined #ruby
<nzst> I have an api with dates that have iso8601 formatting, I want to verify that this remains true in a functional test
Sypheren_ has joined #ruby
<ljarvis> a functional test which hits the API every time?
<nzst> yes
<ljarvis> that's a bad test
<nzst> it's my api
<ljarvis> this test is part of the api or part of something which consumes the api?
<ljarvis> i.e are you making a http request?
pauly_oc has quit [Ping timeout: 244 seconds]
bruno- has quit [Read error: Connection reset by peer]
scripore has joined #ruby
tennis has joined #ruby
<nzst> that's besides the point, how do I use ruby's built in minitest to validate iso8601 formatting?
fabrice31 has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
<ljarvis> lol
Igorshp has joined #ruby
bruno- has joined #ruby
sshuff|gone is now known as sshuff
fabrice31 has joined #ruby
lxsameer has quit [Quit: Leaving]
sinkensabe has joined #ruby
turb0 has joined #ruby
<adaedra> wat wat wat
lapide_viridi has joined #ruby
<ljarvis> nzst: assert_equal time_str, Time.parse(time_str).iso8601
Sypheren_ has quit [Ping timeout: 244 seconds]
jobewan has joined #ruby
<nzst> ljarvis: gratzi
arup_r has joined #ruby
turb0 has left #ruby [#ruby]
tennis has quit [Remote host closed the connection]
Sypheren has joined #ruby
tennis has joined #ruby
Ropeney has joined #ruby
acovrig has quit [Quit: acovrig]
scripore has quit [Client Quit]
tennis has quit [Remote host closed the connection]
tennis has joined #ruby
theery has quit [Read error: Connection reset by peer]
DaniG2k_ has quit [Read error: Connection reset by peer]
Ropeney has quit [Client Quit]
theery has joined #ruby
DaniG2k has joined #ruby
tjbiddle has joined #ruby
araujo has quit [Quit: Leaving]
RegulationD has joined #ruby
Sypheren has quit [Ping timeout: 265 seconds]
nisstyre has quit [Remote host closed the connection]
theery has quit [Remote host closed the connection]
decoponio has joined #ruby
dabradley has joined #ruby
tjbiddle has quit [Ping timeout: 244 seconds]
ninin has joined #ruby
leesharma has joined #ruby
JohnBat26 has joined #ruby
ninin has left #ruby [#ruby]
JoshL has quit []
symbol has quit [Ping timeout: 246 seconds]
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DaniG2k has quit [Quit: leaving]
JoshL has joined #ruby
theery has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
rippa has joined #ruby
<ljarvis> when you grep for a method call but some metaprogramming adds a million layers and you can't find it SIGH
shpoont has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
programmerq has joined #ruby
shpoont has joined #ruby
lolmaus_ has joined #ruby
paulcsmith has joined #ruby
michael_mbp has quit [Excess Flood]
zeeraw has quit []
michael_mbp has joined #ruby
<adaedra> metaprogramming is your friend
bruno- has quit [Read error: Connection reset by peer]
Sypheren has joined #ruby
<adaedra> a psycopath friend
sevenseacat has left #ruby ["Me dun like you no more."]
Rollabunna has joined #ruby
yardenbar has quit [Ping timeout: 252 seconds]
gheegh has quit [Ping timeout: 244 seconds]
<shevy> like adaedra :)
lolmaus has quit [Ping timeout: 244 seconds]
j4cknewt has joined #ruby
rideh has quit [Quit: zap]
<adaedra> hush you
<shevy> I once went crazy with method_missing and dynamically creating methods that were not existing, passing things up and down to different classes
<shevy> since that day I have become a sceptic!
Vile` has quit [Ping timeout: 244 seconds]
conta has quit [Quit: Leaving]
ta has joined #ruby
lapide_viridi has quit [Quit: Leaving]
<ccooke> shevy: there are definite ways in which that can go wrong
casadei_ has joined #ruby
Sypheren has quit [Ping timeout: 246 seconds]
acke has quit [Remote host closed the connection]
Vile` has joined #ruby
rideh has joined #ruby
<workmad3> shevy: I think anyone who's used metaprogramming in anger is skeptical of a lot of possible uses afterwards :) it's most definitely a double-edged sword
solars has quit [Ping timeout: 240 seconds]
shpoont has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
* ccooke uses a fair bit of metaprogramming, but mostly for purely personal code
sinkensabe has quit [Remote host closed the connection]
zeeraw has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
christiandsg has quit [Ping timeout: 265 seconds]
bruno- has joined #ruby
<workmad3> ccooke: I'll use it... but not generally as a first stage in coding, I'll get something working without metaprogramming and then use it if a metaprogramming solution looks simple, neat and readable
tkuchiki has quit [Remote host closed the connection]
<ccooke> *nod*
zeeraw has quit [Client Quit]
fabrice31_ has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
dgutierrez1287 has joined #ruby
<ccooke> I probably reach for it a little early - it's something that I look at when I write code for work, to avoid using it too much
fabrice31_ has quit [Remote host closed the connection]
pyo_ has quit []
rideh has quit [Client Quit]
<ccooke> but on the other hand, I love the ability to write useful DSLs in Ruby
paulcsmith has joined #ruby
<ccooke> (Although the system that uses a DSL define a config DSL is... probably pushing it)
j4cknewt has joined #ruby
fabrice31 has quit [Ping timeout: 244 seconds]
baroquebobcat has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
Lucky___ has joined #ruby
safeforge has quit [Remote host closed the connection]
bruno- has joined #ruby
Rollabun_ has joined #ruby
Sypheren has joined #ruby
dgutierrez1287 has quit [Ping timeout: 240 seconds]
jessu has quit [Quit: WeeChat 0.4.2]
milesforrest has quit [Ping timeout: 255 seconds]
shpoont has joined #ruby
tkuchiki has joined #ruby
zeeraw has joined #ruby
tuxtgz has joined #ruby
theery has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 246 seconds]
dtzitz has quit [Disconnected by services]
arturmartins has quit [Quit: Leaving...]
tuxtgz has quit [Client Quit]
zeeraw has quit [Client Quit]
Sypheren has quit [Ping timeout: 244 seconds]
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chills42 has quit [Remote host closed the connection]
crazydiamond has quit [Remote host closed the connection]
wpp has quit [Quit: ZZZzzz…]
khebbie has joined #ruby
Sypheren has joined #ruby
polly_wog has joined #ruby
polly_wog has quit [Client Quit]
fenjamin has joined #ruby
arturmartins has joined #ruby
allomov has joined #ruby
mollymorphic has joined #ruby
khebbie has quit [Ping timeout: 250 seconds]
shortCircuit__ has quit [Ping timeout: 265 seconds]
shevy has quit [Ping timeout: 252 seconds]
Sypheren has quit [Ping timeout: 265 seconds]
shpoont has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ReK2 has quit [Remote host closed the connection]
bruno- has quit [Read error: Connection reset by peer]
bruno-_ has joined #ruby
tubuliferous has joined #ruby
BeatzKilla has quit [Remote host closed the connection]
bruno-_ has quit [Read error: Connection reset by peer]
senayar has quit [Read error: Connection reset by peer]
senayar has joined #ruby
shpoont has joined #ruby
zeeraw has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
gion has joined #ruby
chills42 has joined #ruby
j4cknewt has joined #ruby
tubuliferous has quit [Ping timeout: 252 seconds]
hinbody has quit [Ping timeout: 244 seconds]
_blizzy_ has joined #ruby
danman has quit [Quit: danman]
bruno- has joined #ruby
eminencehc has joined #ruby
michaeldeol has joined #ruby
blue_deref has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
icebourg has joined #ruby
danman has joined #ruby
<fenjamin> hi, i am destructively modifying an array with the array, min_value, and value passed a parameters
<fenjamin> def pad!(array, min_value, value = nil)
yaroslav has quit [Quit: yaroslav]
CustosLimen has quit [Ping timeout: 244 seconds]
_blizzy_ has quit [Read error: Connection reset by peer]
<fenjamin> placing blocks and objects in the body of the method, what is the object?
bruno- has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
<ljarvis> fenjamin: I'm sorry, what?
<gion> I have an issue with escaping some command line parameters when using Open3
<ruboto> gion, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/59a48f495a99015f2515
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
araujo has quit [Max SendQ exceeded]
shevy has joined #ruby
<fenjamin> there is an rspec however I'm unsure if i call the array in the body or outside the body
krz has quit [Ping timeout: 256 seconds]
fenjamin_ has joined #ruby
araujo has joined #ruby
<ljarvis> ?code fenjamin
<ruboto> fenjamin, We can't help you without your code, please post it to https://gist.github.com
<ljarvis> gion: did you try adding quotes into the concat string?
araujo has quit [Max SendQ exceeded]
<fenjamin> write two methods `pad` and `pad!`. Each method accepts an array, a minimum size (non-negative integer) for the array, and an optional argument of what the array should be "padded" with (see the example with "apple" below).
<fenjamin> If the array's length is less than the minimum size, `pad` should return a new array padded with the pad value up to the minimum size.
<gion> yes, no avail, it escapes them, they appear as \"
ruurd has joined #ruby
_blizzy_ has joined #ruby
<fenjamin> one moment
j4cknewt has quit [Read error: Connection reset by peer]
araujo has joined #ruby
<fenjamin> get the gist?
<ljarvis> fenjamin: yes, so what do you need help with?
<ljarvis> nobody is writing the code for you
riotjones has joined #ruby
<ljarvis> gion: sorry I'm not sure, hopefully someone else can help
<apeiros> indeed, I'm not writing code for them
j4cknewt has joined #ruby
<fenjamin_> my question is using blocks and objects inside the method body
<ljarvis> what about it?
araujo has quit [Max SendQ exceeded]
bronson has joined #ruby
theery has joined #ruby
araujo has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
<fenjamin_> how does the block or object in the method body pass additional elements into the array?
<gion> ljarvis: thank you anyway - might go on `` approach and I escape manually
dgutierrez1287 has joined #ruby
mdavid613 has joined #ruby
<ljarvis> fenjamin: you should look at the documentation for Array.new and Array#push
darithorn has joined #ruby
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
davedev24 has joined #ruby
<ljarvis> maybe show us what you've tried too
<alex88> gion: how you know command has \"?
hinbody has joined #ruby
Cache_Money has joined #ruby
riotjones has quit [Ping timeout: 272 seconds]
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
<gion> alex88: I do not understand your question
<fenjamin_> this appears to be non-destructive - '
rehat has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
<alex88> gion: if you set -i to "\"concat:#{@input.join('|')}\"", does it work?
<alex88> the issue you have is to have quotes around the -i value
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
fenjamin_ has quit [Remote host closed the connection]
fenjamin has quit [Quit: 离开]
rcvalle has joined #ruby
weemsledeux has joined #ruby
dfockler has joined #ruby
<gion> alex88: does not work, already answered to ljarvis
ips|malc has joined #ruby
<alex88> gion: how you know it doesn't work?
<gion> alex88: ffmpeg receives a string that has escaped quotes in it
Sypheren has joined #ruby
<alex88> tried Open3.capture3(command.join(' '))?
<gion> alex88: instead of receiving " in ffmpeg I get \"
christiandsg has joined #ruby
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
christiandsg has quit [Remote host closed the connection]
bakednotfried has quit [Ping timeout: 260 seconds]
CustosLimen has joined #ruby
gambl0re has joined #ruby
tsvenson has quit [Ping timeout: 265 seconds]
<shevy> it is possible to use ffmpeg concat from ruby fine, I do this in some script
khebbie has joined #ruby
khebbie_ has joined #ruby
<gion> alex88: now I am even more confused -> this is the command ffmpeg -y -f mpegts -i "concat:chunks\1.ts|chunks\2.ts|chunks\3.ts" -c copy -bsf:a aac_adtstoasc -bsf:v h264_mp4toannexb path.mp4
<gion> alex88: and it works, but something happens when it meets the pipe charc
<gion> alex88: which is not a pipe, just a separator
sdothum has joined #ruby
<alex88> gion: the \\ has been escaped
<shevy> ffmpeg -i concat:foo.mp3\|bar.mp3 -acodec copy output.mp3
<shevy> is \1 valid there gion?
<alex88> try to use '-i', '"concat:' + @input.join('|') + '"'
<shevy> that chunks\1.ts part
mlangenberg has joined #ruby
<shevy> I am often lazy and try to have simple filenames before working on files
paulcsmith_ has joined #ruby
aevitas has joined #ruby
ruurd has joined #ruby
paulcsmith has quit [Read error: Connection reset by peer]
<adaedra> that's a good thing to do, have simple file names
JoshL has quit []
iwaffles has joined #ruby
<shevy> yay! adaedra is on my side
mercwithamouth has joined #ruby
<abdulrehman> good night peeps, thanks for the help again..... see you tomorrow ( adaedra if they don't block the channel by then hahaha)
zeeraw has quit []
JoshL has joined #ruby
zeeraw has joined #ruby
<adaedra> two hls?
<adaedra> this day is intense
mdih has quit [Ping timeout: 256 seconds]
<gion> alex88: just before calling capture3 I join and print the command: ffmpeg -y -f mpegts -i "concat:chunks\1.ts|chunks\2.ts|chunks\3.ts" -c copy -bsf:a aac_adtstoasc -bsf:v h264_mp4toannexb
snockerton has quit [Quit: Leaving.]
manila90 has quit [Remote host closed the connection]
<alex88> gion: the issue seems to be in chunks filename, you expect themt o be chunks\\1 not chunks\1
Sypheren has quit [Ping timeout: 264 seconds]
<gion> alex88: i think you are right, this is bloody windows
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
<alex88> it's just maybe string escaping since you're joining inside ""
allomov has quit [Remote host closed the connection]
<alex88> that's why I told you to try to use single quotes and concat with +
christiandsg has joined #ruby
snockerton has joined #ruby
Sypheren has joined #ruby
<gion> alex88: nope, it is not this, changed to fwd slashes and same behavior
lolmaus has joined #ruby
<gion> alex88: if i copy the command that puts outputs, and run it manually in the shell, all works, only when it goes through capture3 it fails
amclain has joined #ruby
fgo has quit [Quit: WeeChat 1.1.1]
deepu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<gion> alex88: ffmpeg -y -f mpegts -i "concat:chunks/1.ts|chunks/2.ts|chunks/3.ts" -c copy -bsf:a aac_adtstoasc -bsf:v h264_mp4toannexb output.mp4
Zai00 has quit [Quit: Zai00]
deepu has joined #ruby
<alex88> try to pass that string directly in capture3 to see if it runs
lolmaus_ has quit [Ping timeout: 244 seconds]
allomov has joined #ruby
skyrocker has joined #ruby
skyrocker has left #ruby [#ruby]
<gion> alex88: did it, passed as above or as array
acovrig has joined #ruby
lannonbr has quit [Quit: WeeChat 1.2]
<gion> alex88: something is discarded, i see only chunks/1.ts being used in the end
strixd has quit [Quit: 500]
joonty has quit [Quit: joonty]
paulcsmith_ has quit [Quit: Be back later ...]
rideh has joined #ruby
Mon_Ouie has joined #ruby
Alayde has joined #ruby
s00pcan has quit [Ping timeout: 250 seconds]
jackjackdripper has joined #ruby
pietr0 has joined #ruby
acovrig has quit [Ping timeout: 264 seconds]
CorySimmons has joined #ruby
CorySimmons has quit [Max SendQ exceeded]
bendiken has joined #ruby
Sypheren has quit [Ping timeout: 244 seconds]
CorySimmons has joined #ruby
RobertBirnie has joined #ruby
gambl0re has quit [Ping timeout: 244 seconds]
gambl0re has joined #ruby
hanmac has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<shevy> doesn't a / have to be escaped?
j4cknewt has quit [Read error: Connection reset by peer]
banister has joined #ruby
paulcsmith_ has joined #ruby
<shevy> and the | as well?
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
mercwithamouth has quit [Ping timeout: 256 seconds]
<[k-_> lots even
_blizzy_ has quit [Read error: Connection reset by peer]
<shevy> huh why do you do bio stuff in ruby?
fractalis has quit [Ping timeout: 260 seconds]
sarkyniin has quit [Read error: Connection reset by peer]
<[k-_> exercism?
<shevy> yeah the example there
sarkyniin has joined #ruby
<shevy> require_relative 'RNA/Nucleotides/nucleotide'
<[k-_> thats the task!
<shevy> aha
<adaedra> ?ot shevy
<ruboto> shevy, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
despai has quit [Quit: This computer has gone to sleep]
<hanmac> shevy did you see the trailer / poster for the new Fantastic Four Movie? HumanTorch is black now ... oO
polysics has quit [Remote host closed the connection]
paulcsmith_ has quit [Ping timeout: 244 seconds]
<shevy> not really, I kinda stopped following movie-things for some years now :(
<workmad3> hanmac: that trailer is really underwhelming, IMO
zeeraw has quit []
<gion> shev: fwd slash no, the pipe i don't know, the pipe is inside a string, so it shouldn't be touched
sarkyniin has quit [Read error: No route to host]
zeeraw has joined #ruby
sarkyniin has joined #ruby
<hanmac> workmad3: i only did see the poster yet, i am still confused how the brother of the blond chick is black now ... was he to long in the sun? maybe he did burnt himself and now is crispy like a roasted chicken ...
<workmad3> hanmac: they're no longer a family
hoelzro_ is now known as hoelzro
bruno- has quit [Read error: Connection reset by peer]
bricker has joined #ruby
bruno- has joined #ruby
benlieb has joined #ruby
senayar has quit []
j4cknewt has joined #ruby
<hanmac> workmad3: hm what do you say to the new (Peter)Pan movie? imo it looks interesting
pengin has joined #ruby
<workmad3> not seen much for that yet
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zeeraw has quit [Client Quit]
_blizzy_ has joined #ruby
MatthewsFace has joined #ruby
sanguisdex has quit [Remote host closed the connection]
gion has quit [Quit: Page closed]
paulcsmith_ has joined #ruby
Alina-malina has quit [Ping timeout: 246 seconds]
<banister> hanmac hollywood is just on a major "remake everything" buzz for the last 3-4 years, it's annoying
pengin_ has joined #ruby
<banister> they already remade spiderman about 5 times in the last few years
[Butch] has joined #ruby
<pipework> They're going for more fantastic four and stuff too.
christiandsg has quit [Remote host closed the connection]
<hanmac> banister: yeah ... i want to see some new heroes ... while Ant-man movie does look good, its not so new ... hmm for sample the BlueBeetle looks funny
<adaedra> more than four isn't four.
<pipework> I'd rather remake good superhero movies than make antman-like movies.
sanguisdex has joined #ruby
wprice has joined #ruby
tvw has quit [Ping timeout: 240 seconds]
nobitanobi has joined #ruby
<workmad3> hanmac: ant-man is pretty good... and marvel is doing a dr strange film either next year or the year after in the MCU... all the reboots are with the non-marvel studios that bought up marvel superheros :(
lannonbr has joined #ruby
chipotle has quit [Quit: cheerio]
Sypheren has joined #ruby
drew0 has joined #ruby
<workmad3> spiderman films are done by sony, iirc, and I think f4 is 20th century fox or universal...
pengin has quit [Ping timeout: 255 seconds]
bendiken has left #ruby [#ruby]
Miphix has joined #ruby
Siyfion has quit [Quit: Textual IRC Client: www.textualapp.com]
paulcsmith_ has quit [Ping timeout: 264 seconds]
white_bear has quit [Quit: leaving]
yqt has joined #ruby
mleung has joined #ruby
iloverubynoob has quit [Remote host closed the connection]
xxneolithicxx1 has joined #ruby
Zai00 has joined #ruby
Sypheren has quit [Ping timeout: 252 seconds]
[k-_ has quit [Quit: Lingo: www.lingoirc.com]
<hanmac> workmad3: i lolled so hard recently that in the Spiderman series, Spiderman got the powers of Dr Strange for the episode ;P he did call himself the "highest spider" or something like that ;P
<adaedra> It's the writers that were really high
sarkyniin has quit [Read error: No route to host]
pengin has joined #ruby
neanderslob has quit [Ping timeout: 244 seconds]
mercwithamouth has joined #ruby
aaeron has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
wprice has quit [Quit: wprice]
bruno- has quit [Read error: Connection reset by peer]
nzst has quit [Ping timeout: 240 seconds]
anisha has quit [Quit: Leaving]
pengin_ has quit [Ping timeout: 256 seconds]
[k- has quit [Ping timeout: 246 seconds]
Philipp__ has quit [Read error: Connection reset by peer]
Ilyas has joined #ruby
mikecmpb_ has quit [Ping timeout: 246 seconds]
paulcsmith_ has joined #ruby
neanderslob has joined #ruby
allomov has quit [Remote host closed the connection]
aphprentice has joined #ruby
bruno- has joined #ruby
c0m0 has quit [Ping timeout: 252 seconds]
<kapowaz> hey there. I'm trying to diagnose an issue with rbenv. Is this a decent place to ask, or is there a dedicated rbenv channel?
sarkyniin has joined #ruby
lolmaus_ has joined #ruby
<kapowaz> I'll ask anyway. Basically I'm getting the standard error: “You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.” whilst trying to `gem install` something, in spite of having rbenv installed.
<kapowaz> I ran the rbenv doctor script from https://gist.githubusercontent.com/mislav/4728286/raw/rbenv-doctor.sh and it suggests that the standard system ruby gems path is before my rbenv gems path in my $PATH
jaequery has joined #ruby
<kapowaz> but I can't see how come based on my .profile
j4cknewt has quit [Read error: Connection reset by peer]
<adaedra> what does which ruby and which gem outputs?
bronson has joined #ruby
<adaedra> `which ruby` and `which gem`*
<kapowaz> which ruby => /Users/bdarlow/.rbenv/shims/ruby
<kapowaz> which gem => /Users/bdarlow/.rbenv/shims/gem
<adaedra> looks ok
<adaedra> and which rbenv?
<adaedra> no wait, should be ok too, I'm doing things in reverse
j4cknewt has joined #ruby
<adaedra> that's `gem env` that should be interesting
KinderSpiel has joined #ruby
sepp2k has quit [Quit: Leaving.]
lolmaus has quit [Ping timeout: 244 seconds]
<KinderSpiel> Oye!
sarkyniin has quit [Ping timeout: 240 seconds]
<adaedra> Oyez oyez
<kapowaz> output from gem env is here: https://gist.github.com/anonymous/58f63f39b942615a20fa
zeeraw has joined #ruby
mdih has joined #ruby
<adaedra> o_O
segfalt has joined #ruby
<adaedra> er, what about rbenv version
djstorm has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
<KinderSpiel> adaedra oye oye
<adaedra> Looks like rbenv is using system ruby here
last_staff has joined #ruby
yeticry has quit [Ping timeout: 250 seconds]
<adaedra> kapowaz: ?
<KinderSpiel> adaedra you know something about clevertech?
Jackneill has joined #ruby
<adaedra> KinderSpiel: no
<KinderSpiel> :(
despai has joined #ruby
carlosoliveira has joined #ruby
Zai00 has quit [Quit: Zai00]
AckZ has joined #ruby
<KinderSpiel> has anyone applied to a job that made you log in with google?
blueOxigen has quit [Ping timeout: 240 seconds]
bluOxigen has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<KinderSpiel> #fascism
nsuke has quit [Remote host closed the connection]
khebbie has quit [Remote host closed the connection]
khebbie_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<AckZ> has anyone here ever used set_notice_receiver with the pg gem? i can't really get it to do anything
khebbie has joined #ruby
17WAABZFQ has joined #ruby
pullphinger has joined #ruby
<Antiarc> Keeper of the Trove is a weird-ass mod
<Antiarc> whoops, wrong channel
<adaedra> A weird-ass channel
<adaedra> Anyway, time to go
<adaedra> \o
<kapowaz> adaedra: irccloud is being weird.
tubuliferous has joined #ruby
blueOxigen has joined #ruby
<kapowaz> you were right though, because it's defaulting to system ruby, it's also defaulting to system gems location
<kapowaz> as soon as I changed rbenv to use a user-installed ruby version globally, it fixed the issue
<dfockler> AckZ: do you have code?
<adaedra> kapowaz: ah good.
<adaedra> just in time :)
bluOxigen has quit [Ping timeout: 255 seconds]
yeticry has joined #ruby
yfeldblum has joined #ruby
rbowlby has quit [Remote host closed the connection]
rbowlby has joined #ruby
davejlong has quit [Remote host closed the connection]
_djbkd has joined #ruby
zeeraw has quit []
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
rideh has quit [Quit: zap]
sshuff is now known as sshuff|gone
snockerton1 has joined #ruby
xxneolithicxx1 has quit [Quit: Leaving.]
nzst has joined #ruby
snockerton1 has quit [Client Quit]
banister has quit [Ping timeout: 272 seconds]
snockerton1 has joined #ruby
paulcsmith_ has quit [Read error: Connection reset by peer]
rideh has joined #ruby
snockerton has quit [Ping timeout: 255 seconds]
snockerton1 has left #ruby [#ruby]
paulcsmith_ has joined #ruby
afd has joined #ruby
charliesome has quit [Quit: zzz]
allomov has joined #ruby
Igorshp has quit [Remote host closed the connection]
ixti has joined #ruby
snockerton1 has joined #ruby
_blizzy_ has quit [Ping timeout: 265 seconds]
zeeraw has joined #ruby
apt-get_ has joined #ruby
ips|malc has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
17WAABZFQ has quit [Remote host closed the connection]
mlangenberg has quit [Quit: mlangenberg]
banister has joined #ruby
quimrstorres has quit [Read error: Connection reset by peer]
quimrstorres has joined #ruby
towski_ has quit [Ping timeout: 255 seconds]
iloverubynoob has joined #ruby
<craysiii> morning
fluchtreflex has quit [Quit: ZNC - http://znc.in]
mikecmpbll has joined #ruby
fluchtreflex has joined #ruby
fluchtreflex has quit [Changing host]
fluchtreflex has joined #ruby
IrishGringo_ has joined #ruby
polpak has joined #ruby
iloverubynoob has quit [Ping timeout: 256 seconds]
IrishGringo has quit [Ping timeout: 246 seconds]
acke has joined #ruby
fractalis has joined #ruby
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GnuYawk has joined #ruby
GnuYawk has joined #ruby
sepp2k has joined #ruby
Muhannad has joined #ruby
Alina-malina has joined #ruby
wallerdev has joined #ruby
<AckZ> dfockler: nm, i can make it work correctly from a simple script, but under rails it just doesn't do anything for some reason.. i'll see if I can come up with a rails example
shadoi has joined #ruby
yardenbar has joined #ruby
<dfockler> AckZ: ok
zeroDivisible has quit [Ping timeout: 244 seconds]
wallerdev has quit [Client Quit]
<craysiii> AckZ have you tried asking #rubyonrails
<craysiii> oh i see you there now :)
fantazo has joined #ruby
blue_deref has quit [Quit: bbn]
klingeldraht has joined #ruby
wallerdev has joined #ruby
towski_ has joined #ruby
zick has joined #ruby
Eiam has joined #ruby
kokoleavia has joined #ruby
{756d6f} has quit [Ping timeout: 256 seconds]
klingeldraht has quit [*.net *.split]
scripore has joined #ruby
zick has left #ruby ["Textual IRC Client: www.textualapp.com"]
msnyon has joined #ruby
kokoleavia has quit [Ping timeout: 255 seconds]
afd has quit [Ping timeout: 246 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
Synthead has joined #ruby
IrishGringo_ has quit [Ping timeout: 246 seconds]
despai has quit [Quit: This computer has gone to sleep]
klingeldraht has joined #ruby
ko_ has joined #ruby
moredhel has left #ruby ["Textual IRC Client: www.textualapp.com"]
IrishGringo has joined #ruby
I has joined #ruby
yardenbar has quit [Ping timeout: 264 seconds]
bayed has quit [Quit: Connection closed for inactivity]
I is now known as Guest35687
aevitas_ has joined #ruby
chills42 has quit [Remote host closed the connection]
renderful has joined #ruby
Yiota has quit [Ping timeout: 252 seconds]
wldcordeiro has joined #ruby
aaeron has quit [Quit: Leaving.]
aevitas has quit [Ping timeout: 244 seconds]
scripore has quit [Quit: This computer has gone to sleep]
troulouliou_div2 has quit [Quit: Leaving]
Igorshp has joined #ruby
Musashi007 has joined #ruby
Eiam has quit [Ping timeout: 256 seconds]
drew0 has quit [Remote host closed the connection]
chills42 has joined #ruby
ramfjord has joined #ruby
drewo has joined #ruby
towski_ has quit [Remote host closed the connection]
marr has quit [Ping timeout: 246 seconds]
rideh has quit [Quit: zap]
theery has quit [Remote host closed the connection]
Igorshp has quit [Remote host closed the connection]
j4cknewt has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
theery has joined #ruby
KinderSpiel has quit [Quit: Page closed]
arturmartins has quit [Quit: Leaving...]
<ko_> v
<craysiii> u
<shevy> t
felixrsmith has joined #ruby
felixr has quit [Ping timeout: 244 seconds]
eichenwald has joined #ruby
j4cknewt has joined #ruby
roolo has joined #ruby
Igorshp has quit [Ping timeout: 264 seconds]
Eiam has joined #ruby
aryaching has quit [Ping timeout: 246 seconds]
Narzew has joined #ruby
Muhannad has quit [Ping timeout: 252 seconds]
lwu has joined #ruby
<ko_> i l u ruby
lwu has quit [Max SendQ exceeded]
lwu has joined #ruby
lwu has quit [Max SendQ exceeded]
Eiam_ has joined #ruby
<shevy> is it weird if I do use something such as:
<shevy> module Foo; def self.new
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lwu has joined #ruby
lwu has quit [Max SendQ exceeded]
otisZart has quit [Read error: Connection reset by peer]
lwu has joined #ruby
lwu has quit [Max SendQ exceeded]
Saloaty has joined #ruby
<Narzew> Is that channel also for Shoes framework ? #shoes have only 7 users with me..
eichenwald has left #ruby ["WeeChat 1.0.1"]
lwu has joined #ruby
<shevy> you can try your luck, I don't think that many people use shoes though
<shevy> I used it back in the days when _why was in charge
lwu has quit [Max SendQ exceeded]
<Aria> Aww. Same.
lwu has joined #ruby
lwu has quit [Max SendQ exceeded]
banister has joined #ruby
lwu has joined #ruby
<Narzew> I have completed Shoes bases app but I need help packaging it into .exe (i get no of errors that haven't been on stack yet)
lwu has quit [Max SendQ exceeded]
iwaffles has quit [Quit: iwaffles]
ruurd has quit [Quit: ZZZzzz…]
iwaffles has joined #ruby
dseitz has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
darkf has quit [Quit: Leaving]
lwu has joined #ruby
lwu has quit [Max SendQ exceeded]
dumdedum has quit [Quit: foo]
_blizzy_ has joined #ruby
lwu has joined #ruby
quimrstorres has quit [Remote host closed the connection]
banister has quit [Client Quit]
pengin has quit [Remote host closed the connection]
khebbie has joined #ruby
khebbie_ has joined #ruby
aryaching has joined #ruby
mlangenberg has joined #ruby
yqt has quit [Ping timeout: 264 seconds]
<Synthead> can I define at_exit a second time to redefine it?
benlieb has quit [Quit: benlieb]
hinbody_ has joined #ruby
platzhirsch has left #ruby [#ruby]
<pipework> Synthead: try!
davejlong has joined #ruby
mlue has joined #ruby
hinbody has quit [Disconnected by services]
hinbody_ is now known as hinbody
<Synthead> pipework: This seems to subscribe both blocks when ctrl-c is hit http://pastie.org/10316857
pengin has joined #ruby
<Narzew> Can anyone recommend mi a GUI toolkit for Ruby that can be easily packaged to .exe and Linux binary programs ?
_blizzy_ has quit [Read error: Connection reset by peer]
Muhannad has joined #ruby
benlieb has joined #ruby
<craysiii> a quick google search turned up http://shoesrb.com/
aaeron has joined #ruby
Musashi007 has quit [Quit: Musashi007]
_blizzy_ has joined #ruby
f4cl3y has quit [Ping timeout: 246 seconds]
lkba_ has quit [Ping timeout: 260 seconds]
bodgix has quit [Quit: Leaving.]
davejlong has quit [Ping timeout: 255 seconds]
<shevy> Narzew not sure any such exists, after all ruby is interpreted not compiled
banister has joined #ruby
<shevy> there should be some one click installers
<pipework> shevy: That's not quite true.
<craysiii> from what ive read you can use something called rubinius
<shevy> you know of an .exe creator for ruby files then pipework?
<pipework> shevy: No, I meant the "after all ruby is interpreted not compiled" part.
sshuff|gone is now known as sshuff
bumbar_ has quit [Ping timeout: 244 seconds]
wallerdev has quit [Quit: wallerdev]
leafybasil has quit [Remote host closed the connection]
scripore has joined #ruby
Hounddog has quit [Remote host closed the connection]
<Narzew> hmm "shoes script.rb" works, but generated "script.shy" have errors with file options
<Narzew> and ocra ? Is the way to use it on Linux to compile program for win ?
quimrstorres has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
<shevy> Narzew people can just download a .gem even on windows
towski_ has joined #ruby
treehug88 has joined #ruby
tsvenson has joined #ruby
<craysiii> also check out traveling-ruby. though I guess you can't build with native extensions on windows.
Musashi007 has joined #ruby
Mon_Ouie has quit [Ping timeout: 244 seconds]
<Ox0dea> shevy: OCRA creates .exes.
<Narzew> if I use sudo gem install x is that gem installed only to root (and not to current user) ?
frem has joined #ruby
nkts has quit [Read error: Connection reset by peer]
_blizzy_ has joined #ruby
nkts has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<shevy> Ox0dea do you use OCRA?
Mon_Ouie has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
j4cknewt_ has joined #ruby
A_ron has joined #ruby
CorySimmons has quit [Quit: Bye!]
Mendenhall has joined #ruby
anisha has joined #ruby
axl_ has quit [Ping timeout: 245 seconds]
Rollabunna has joined #ruby
Rollabunna has quit [Remote host closed the connection]
Rollabunna has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lolmaus has joined #ruby
ramfjord has quit [Read error: Connection reset by peer]
Saloaty has left #ruby [#ruby]
sysanthrope has joined #ruby
Rollabun_ has quit [Ping timeout: 244 seconds]
ramfjord has joined #ruby
platosha has quit [Read error: Connection reset by peer]
<Ox0dea> shevy: I last used it in 2011 or so to put a (very thin) graphical layer over some scripts I'd written to automate some things.
<shevy> \o/
lolmaus_ has quit [Ping timeout: 244 seconds]
<shevy> Narzew finally someone who knows windows :)
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Zai00 has joined #ruby
<Ox0dea> The target audience weren't particularly tech-unsavvy, but they were all Windows users. :/
eminencehc has quit [Remote host closed the connection]
polysics has joined #ruby
platosha has joined #ruby
quimrstorres has quit [Remote host closed the connection]
iloverubynoob has joined #ruby
HoppingMadMan has joined #ruby
iateadonut has left #ruby [#ruby]
banister has joined #ruby
radgeRayden has joined #ruby
banister has quit [Client Quit]
Igorshp has joined #ruby
<mlangenberg> I am comparing ways to generate unique 64bit integers (long type). Would there be any difference between SecureRandom.random_number(2**63) and SecureRandom.random_bytes(16).unpack('q')[0].abs ?
{756d6f} has joined #ruby
<Ox0dea> mlangenberg: The latter is needlessly involved.
rideh has joined #ruby
beef-wellington has joined #ruby
weemsledeux has joined #ruby
<aaeron> Hey. I am using multipart-post to post a file. I am also posting only parameters to another API. multipart-post is not working for normal http post
polpak has quit [Quit: Lost terminal]
<mlangenberg> Ox0dea: lol okay, will go for the first one.
lwu has quit [Ping timeout: 252 seconds]
krz has joined #ruby
Nuru has joined #ruby
konsolebox has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
gizmore has joined #ruby
polysics has quit []
lwu has joined #ruby
dented42 has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
dfockler has quit [Remote host closed the connection]
Trynemjoel has quit [Ping timeout: 256 seconds]
_blizzy_ has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 256 seconds]
<Ox0dea> aaeron: Just use Net::HTTP::Post for non-multipart requests?
jackjackdripper has quit [Client Quit]
iloverubynoob has quit [Quit: Leaving...]
jackjackdripper has joined #ruby
rideh has quit [Quit: zap]
Trynemjoel has joined #ruby
<aaeron> I was wondering if there one library I could use for doing both
<Ox0dea> Well, Net::HTTP::Post is in the standard library, so it's not like you'd need to bring in another dependency.
_blizzy_ has joined #ruby
banister has joined #ruby
Skelz0r has quit [Ping timeout: 252 seconds]
dented42 has joined #ruby
<shevy> who is actually deciding when a new ruby release will happen? does matz do so or the core team together?
einarj has joined #ruby
<Ox0dea> matz assigns a release manager.
selva has left #ruby [#ruby]
kristian_on_linu has joined #ruby
<aaeron> Ox0dea: doing it
<aaeron> going with ur advice
<Ox0dea> Yay!
Muhannad has quit [Ping timeout: 256 seconds]
<havenwood> aaeron: Maybe take a look at Curb, Faraday and HTTPClient's multipart post support.
<havenwood> aaeron: Or yeah, do it manually with net/http
whiteline has quit [Remote host closed the connection]
<Ox0dea> aaeron: I'd imagine multipart-post doesn't violate LSP too badly, so switching between Post and Post::Multipart shouldn't be too painful.
<havenwood> aaeron: Mechanize and RestClient are Net::HTTP wrappers that add better multipart post support as well.
lkba has joined #ruby
_cball has quit [Quit: Leaving]
rideh has joined #ruby
Narzew has quit [Remote host closed the connection]
j4cknewt has joined #ruby
jenrzzz has joined #ruby
bruno- has joined #ruby
<havenwood> shevy: Ruby 2.3.0 on December 25, 2015.
j4cknewt_ has quit [Read error: Connection reset by peer]
eminencehc has joined #ruby
<shevy> damn that's still far away
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
HoppingMadMan has quit [Ping timeout: 246 seconds]
einarj has quit [Remote host closed the connection]
s00pcan has joined #ruby
towski_ has quit [Remote host closed the connection]
anisha has quit [Quit: Leaving]
HoppingMadMan has joined #ruby
Skelz0r has joined #ruby
moredhel has joined #ruby
whiteline has joined #ruby
kirun has joined #ruby
davejlong has joined #ruby
IrishGringo has quit [Ping timeout: 244 seconds]
_blizzy_ has quit [Read error: Connection reset by peer]
benlieb has quit [Quit: benlieb]
_blizzy_ has joined #ruby
drewo has quit [Ping timeout: 244 seconds]
polpak has joined #ruby
andikr has quit [Remote host closed the connection]
aevitas_ has quit [Remote host closed the connection]
baweaver has joined #ruby
nobitanobi has quit [Remote host closed the connection]
aevitas has joined #ruby
eregon_ is now known as eregon
towski_ has joined #ruby
Narzew has joined #ruby
Rutix`away has quit []
allomov has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 244 seconds]
last_staff has quit [Quit: last_staff]
mdavid613 has quit [Quit: Leaving.]
last_staff has joined #ruby
anisha has joined #ruby
benlieb has joined #ruby
xkickflip has quit [Quit: xkickflip]
jrochkind has joined #ruby
MatrixBridge has quit [Ping timeout: 250 seconds]
robbyoconnor has quit [Ping timeout: 255 seconds]
last_staff has quit [Client Quit]
<jrochkind> I'm wondering if it's save to share a OpenSSL::PKey::RSA obj accross threads, have it concurrently doing encrypt operations. And I'm thinking there's probably no way to know.
<jrochkind> safe
khebbie has quit [Remote host closed the connection]
khebbie_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
noethics has quit [Remote host closed the connection]
chinmay_dd has quit [Quit: See ya!]
M-_mis has quit [Read error: Connection reset by peer]
Rutix has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
MatrixBridge has joined #ruby
<Ox0dea> > Why just 1? Because Ruby itself isn't thread safe, we don't need to care about threads
<Ox0dea> jrochkind: That's a comment from ossl_bn.c.
baweaver has quit [Remote host closed the connection]
Narzew has quit [Remote host closed the connection]
<jrochkind> Ox0dea: nice catch. So that's probably an indicator that it _ain't_ thread-safe, although might be accidentally in MRI as per usual. Would you agree?
nobitanobi has joined #ruby
<Ox0dea> jrochkind: Well, you'll have to make of it what you will. There are plenty of attempts at thread safety in ext/openssl.
<jrochkind> Of course, the JRuby is probably a different implementation, that also may or may not be threadsafe too. Def seems safest to just avoid sharing an instance between threads, alas.
jackjackdripper has quit [Quit: Leaving.]
allomov has joined #ruby
jackjackdripper has joined #ruby
<jrochkind> makes the code either a lot more complicated or less efficient, but so it goes. I'm writing an object that may be used across threads. Instead of caching an OpenSSL::PKey::RSA in an iVar, I'll just go ahead and create one every time I need it, oh wells.
noethics has joined #ruby
<Ox0dea> jrochkind: Better redundant than owned, I reckon.
<jrochkind> yup
RonRichie has joined #ruby
<jrochkind> even if not owned, I don't want code that, say, messes up and doesn't produce a value that can be properly decrypted/verified either.
Timba-as has joined #ruby
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
fantazo has quit [Ping timeout: 256 seconds]
higuys has joined #ruby
gambl0re has quit [Ping timeout: 265 seconds]
<Ox0dea> There's lots of /* NO NEED TO DUP */ throughout the code, which would seem to indicate that duping does occur where necessary. Still, that OpenSSL::BN isn't thread-safe seems to put the whole thing on shaky foundations.
<Ox0dea> Alas, thread-safety is generally all-or-nothing.
<jrochkind> What's OpenSSL::BN, and how do you know it's not threadsafe, was there a widely known issue or something?
<Ox0dea> It's OpenSSL's implementation of Bignums.
shock_one has quit [Remote host closed the connection]
<Ox0dea> The code uses a single BN_CTX wherever Bignum operations are required.
Narzew has joined #ruby
Musashi007 has quit [Quit: Musashi007]
j4cknewt_ has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
gix has quit [Quit: Client exiting]
f4cl3y has joined #ruby
CustosLimen has quit [Ping timeout: 260 seconds]
mercwithamouth has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
<redondos> is it possible to add a bundle config to a Gemfile? (e.g. I want the Gemfile to reflect `bundle config build.nokogiri --use-system-libraries' without having to actually run that command)
<banister> humblebrag
decoponio has quit [Quit: Leaving...]
<jrochkind> redondos: hmm, good question.
JoshL has left #ruby [#ruby]
cball has joined #ruby
leafybasil has joined #ruby
<redondos> I've noticed what the command does is very simple:
<redondos> $GEM_HOME $ cat build_info/nokogiri-1.6.6.2.info
<redondos> --use-system-libraries
gix has joined #ruby
<redondos> but I don't want to have to maintain that file, I'd rather have bundle do that for me if possible
<jrochkind> redondos: I can't figure out if there is a way to do that. But can you pass the same thing for nokogiri in an ENV variable instead? If so, I wonder if simply setting ENV['whatever'] at the top of the gemfile would work, although it may not.
blaines has joined #ruby
Narzew has quit [Remote host closed the connection]
<redondos> I'll check
<jrochkind> redondos: also, not what you asked, but making sure you know you can `bundle config —global`, and it'll save it in your ~/.bundle/config, and use it every time.
<redondos> this is not for my workstation, but a production server (whether or not it's a good idea to build libraries on the box is a topic for another day)
blaines_ has joined #ruby
<redondos> i am trying to get my configuration management or deployment script to inject that so bundler does the Right Thing
<jrochkind> most of us do, with standard capistrano deploys, whether or not it's a good idea. :) There's no reason you _can't_ set a `bundle config —global` for the account that's doing the building on the production server — even have your deployment set it. Or if this one can be triggered in an ENV, which I seem to recall it can be, setting the ENV in an .rc on the proper account on the production server might make a lot of sense.
<redondos> I can just run the command from the deployment script I suppose... just not neat
leafybasil has quit [Ping timeout: 252 seconds]
<jrochkind> Looks like NOKOGIRI_USE_SYSTEM_LIBRARIES=1 . How do you feel about setting an ENV variable in the proper account on your production machine?
<redondos> that'll work!
blaines has quit [Ping timeout: 244 seconds]
<redondos> testing
<jrochkind> If that fits into your setup, I think that's actually better than hard-coding it into your Gemfile, as the setting is, after all, more server-specific than project-specific. Some servers have a usable LibXML some don't.
centrx has quit [Quit: 'Get out, you and all the people who follow you!' Then he went out from Pharaoh in hot anger.]
dfockler has joined #ruby
<redondos> that's very true
<redondos> thanks for the insight
<jrochkind> on the ohter hand, if I stuck it in a .bashrc or something, I'd probably forget what i did and never be able to figure out what was going on, ha.
kadoppe has quit [Ping timeout: 244 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<jrochkind> (fwiw, I saw a nokogiri ticket on trying to make it auto-discover whether to use system libraries or not, maybe some day that'll land)
shinnya has joined #ruby
<redondos> that worked beautifully, thanks again
michael_mbp has quit [Quit: ZNC - http://znc.sourceforge.net]
<redondos> I stuck it into my fabfile (shoot me, we got rid of capistrano here)
ZeeNoodleyGamer has quit [Quit: Aiyaiyai]
ramfjord has quit [Read error: Connection reset by peer]
drewo has joined #ruby
kadoppe has joined #ruby
CustosLimen has joined #ruby
ZeeNoodleyGamer has joined #ruby
ramfjord has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
Mendenhall has quit [Ping timeout: 246 seconds]
zz_Outlastsheep is now known as Outlastsheep
michael_mbp has joined #ruby
bruno- has quit [Ping timeout: 256 seconds]
whiteline has quit [Remote host closed the connection]
charliesome has joined #ruby
casadei_ has quit [Remote host closed the connection]
scripore has joined #ruby
texasmade has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
tkuchiki has joined #ruby
weemsledeux has joined #ruby
Muhannad has joined #ruby
dagda1_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dgutierrez1287 has joined #ruby
dagda1 has joined #ruby
blaines_ has quit [Ping timeout: 252 seconds]
Dreamer3 has quit [Read error: Connection reset by peer]
Dreamer3 has joined #ruby
Musashi007 has joined #ruby
tkuchiki has quit [Ping timeout: 250 seconds]
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
dgutierrez1287 has quit [Ping timeout: 240 seconds]
blaines has joined #ruby
svdb64 has joined #ruby
j4cknewt has joined #ruby
yqt has joined #ruby
bluOxigen has joined #ruby
Rollabun_ has joined #ruby
ruurd has joined #ruby
Rollabunna has quit [Read error: Connection reset by peer]
j4cknewt_ has quit [Read error: Connection reset by peer]
howdoi_ is now known as howdoi
curses has joined #ruby
mary5030 has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 240 seconds]
whiteline has joined #ruby
user1138 has quit [Remote host closed the connection]
higuys has quit []
user1138 has joined #ruby
shock_one has joined #ruby
gambl0re has joined #ruby
Voker57|2 has quit [Read error: Connection reset by peer]
dagda1 has quit [Read error: No route to host]
Mendenhall has joined #ruby
pyo_ has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
chouhoul_ has joined #ruby
swgillespie has joined #ruby
aevitas has quit []
hahuang65 has joined #ruby
gambl0re has quit [Ping timeout: 246 seconds]
j4cknewt has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 244 seconds]
ivanskie has joined #ruby
Papierkorb has quit [Ping timeout: 244 seconds]
Papierkorb has joined #ruby
triangles has quit [Read error: Connection reset by peer]
sdwrage has joined #ruby
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
Voker57 has joined #ruby
hololeap has joined #ruby
anisha has quit [Quit: Leaving]
dblessing has quit [Ping timeout: 246 seconds]
paulcsmith_ has quit [Quit: Be back later ...]
chills42 has quit [Remote host closed the connection]
r_baron has joined #ruby
dblessing has joined #ruby
Pupeno has quit [Remote host closed the connection]
paulcsmith_ has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
khebbie has joined #ruby
khebbie_ has joined #ruby
rideh has quit [Quit: zap]
xkickflip has joined #ruby
Musashi007 has quit [Quit: Musashi007]
rideh has joined #ruby
bruno- has joined #ruby
Anthony__ has joined #ruby
Pupeno has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
A_ron has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
renderful has quit []
pullphinger has quit []
deepu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
deepu has joined #ruby
platosha_ has joined #ruby
leesharma has quit [Ping timeout: 240 seconds]
deepu has quit [Client Quit]
deepu has joined #ruby
platosha has quit [Ping timeout: 255 seconds]
einarj has joined #ruby
ledestin has joined #ruby
_blizzy_ has quit [Ping timeout: 244 seconds]
Anthony__ is now known as _blizzy_
leesharma has joined #ruby
chipotle has joined #ruby
k3asd` has joined #ruby
xtsee has left #ruby [#ruby]
pyo_ has quit [Read error: Connection reset by peer]
pyo_ has joined #ruby
pyo_ has quit [Client Quit]
Pupeno has joined #ruby
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rideh has quit [Quit: zap]
rideh has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
shadoi has quit [Quit: Leaving.]
deepu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
deepu has joined #ruby
Outlastsheep is now known as zz_Outlastsheep
davejlong has quit []
mdavid613 has joined #ruby
Mendenhall has quit [Ping timeout: 252 seconds]
RonRichie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rollabunna has joined #ruby
Rollabunna has quit [Remote host closed the connection]
rideh has quit [Client Quit]
Rollabunna has joined #ruby
<shevy> does one of you happen to have an example for ruby readline completion to the second argument, not the first?
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Sypheren has joined #ruby
ttilley has joined #ruby
ttilley has quit [Changing host]
ttilley has joined #ruby
Rollabun_ has quit [Read error: Connection reset by peer]
<shevy> I need something like: "english cat<TAB>" and completion to occur on cat, but retain the leading keyword ("english" in this case)
deepu has quit [Client Quit]
gambl0re has joined #ruby
deepu has joined #ruby
paulcsmith_ has quit [Quit: Be back later ...]
pandaant has joined #ruby
mary5030 has joined #ruby
A_ron has joined #ruby
arup_r has quit [Quit: Leaving]
rideh has joined #ruby
gizmore has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
paulcsmith_ has joined #ruby
Musashi007 has joined #ruby
scpike_ has quit [Ping timeout: 246 seconds]
deepu has quit [Client Quit]
deepu has joined #ruby
rideh has quit [Ping timeout: 240 seconds]
scpike has joined #ruby
symm- has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
davedev24 has quit [Ping timeout: 255 seconds]
texasmade has quit [Ping timeout: 244 seconds]
RonRichie has joined #ruby
Sypheren has quit [Ping timeout: 244 seconds]
solars has joined #ruby
deepu has quit [Client Quit]
<Ox0dea> shevy: The existence of "english" should change the completion behavior, right?
deepu has joined #ruby
davedev24 has joined #ruby
<shevy> well, in regular shell scripts, one can use an array of completable-words rather easily
<shevy> for some reason I am not understanding how to do the same in ruby readline
paulcsmith_ has quit [Quit: Lingo: www.lingoirc.com]
ruurd has quit [Quit: ZZZzzz…]
dseitz has quit [Quit: bbl]
<shevy> This is how I do it in bash: https://goo.gl/uu3nSt
<shevy> the array is in: all_program
<shevy> erm, *all_programs
<shevy> and the completion-support is enabled through: complete -F name_of_the_function the_command_to_invoke it
Sypheren has joined #ruby
<shevy> somehow this is much easier to use than that weird Readline completion proc :\
syath has quit [Quit: WeeChat 1.2]
Sypheren has quit [Read error: Connection reset by peer]
ruurd has joined #ruby
guest1241234 has joined #ruby
<Ox0dea> It's really not that hard?
<Ox0dea> s/ha/wei/
sdwrage has joined #ruby
<shevy> I can't seem to get that to run
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dblessing has joined #ruby
<Ox0dea> shevy: Whoops! That should be start_with?(partial), not input.
Pupeno has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<Ox0dea> But it does still discard the first part. :/
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sdwrage has quit [Ping timeout: 246 seconds]
gambl0re has quit [Ping timeout: 256 seconds]
shadoi has joined #ruby
leafybasil has joined #ruby
Eiam has quit [Ping timeout: 244 seconds]
dblessing has quit [Ping timeout: 264 seconds]
<shevy> hmm
rdark has quit [Quit: leaving]
gambl0re has joined #ruby
symbol has joined #ruby
<Ox0dea> shevy: It's not great, but It Works: https://gist.github.com/0x0dea/46f35e5712550f649b33
<shevy> cool, thanks
<shevy> now let me try to understand how you did it...
mary5030 has quit [Ping timeout: 252 seconds]
NeverDie has joined #ruby
dblessing has joined #ruby
bricker has quit [Ping timeout: 244 seconds]
<Ox0dea> Prepended "subcommands" everywhere.
<Ox0dea> There is surely a better way.
<shevy> ah
<shevy> I think I understand
ivanskie has joined #ruby
aaeron has quit [Quit: Leaving.]
<shevy> well that is actually clever because it is very simple
towski_ has quit [Remote host closed the connection]
kully3xf has quit [Ping timeout: 240 seconds]
A_ron has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> We've been here. Simple != clever. It is, in fact, just about the dumbest way to do it.
sepp2k has quit [Read error: Connection reset by peer]
<Ox0dea> Then again, Readline doesn't seem to support anything but whole-line completion out of the box. :/
<Ox0dea> That is, if you set the break character to something other than whitespace, you complete on the whole line and must return whole lines.
mary5030 has joined #ruby
<Ox0dea> So maybe the prepended "subcommands" really is the best approach, but that's a tragedy more than a triumph.
<shevy> it works \o/
<shevy> and it is simple!
<Ox0dea> I'm making a note here.
codecop has quit [Remote host closed the connection]
mase-chatter has joined #ruby
Adran is now known as Madran
safeforge has joined #ruby
DroidBurgundy has quit []
nzst has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
pandaant has quit [Quit: Lost terminal]
ko_ has quit [Ping timeout: 246 seconds]
Guest35687 has quit [Quit: Leaving]
<prefixed> why is the "to lowercase" method called "downcase?" did the inventor of the method have down syndome or something?
* prefixed ducks
<craysiii> ouch thats kinda rude.
<Synthead> can I print an object via pry without calling a shell?
JimmyNeutron has quit [Read error: Connection reset by peer]
<prefixed> true
<jhass> Synthead: you mean without the pager?
<prefixed> realtalk though: terrible method name choice
<Synthead> jhass: is the pager the prompt?
<jhass> no, the think that let's you scroll in the output
<jhass> *thing
<craysiii> not really. #upcase, #downcase. makes sense to me
hahuang65 has quit [Ping timeout: 240 seconds]
<craysiii> if it was #uppercase, i could see #lowercase.
<jhass> prefixed: downcase is the action, lowercase is the result
r_baron has quit [Quit: Page closed]
<Synthead> jhass: pry does a great job at making objects look pretty. I want to just display it without getting a prompt if possible
<Synthead> jhass: yeah I love awesome print, but it doesn't display it the same way
<Ox0dea> Synthead: When did you realize you were a masochist?
deavidsedice has quit [Ping timeout: 244 seconds]
shadoi has quit [Quit: Leaving.]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sshuff is now known as sshuff|gone
<Ox0dea> prefixed: As jhass points out, #downcase makes sense as the name of a "message".
<jhass> (that took < 1 min of peeking into the source)
<Synthead> Ox0dea: awesome_print happens to print a wall-o-text for this specific object, heh
<Sou|cutter> using pry to print objects is funny
safeforge has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
<Synthead> Sou|cutter: :)
<Ox0dea> Synthead: How about pretty_print?
shadoi has joined #ruby
<Ox0dea> Invoking a REPL for its output format is... well, I'll refrain from saying anything untoward.
<Synthead> Ox0dea: hahaha, yeah. just being curious
Jarboe has joined #ruby
allomov has quit [Remote host closed the connection]
<Synthead> jhass: Pry::ColorPrinter.pp() is perfect :)
banister has joined #ruby
deavid has joined #ruby
<Ox0dea> Synthead: You should totally use Open3 to drive a Pry process.
khebbie_ has quit [Remote host closed the connection]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
einarj has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
einarj has joined #ruby
havenn has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
wprice has joined #ruby
sdwrage has joined #ruby
<jhass> ... using non-alphanumeric coding?
_ht has quit [Quit: Konversation terminated!]
hahuang65 has joined #ruby
aryaching has quit [Ping timeout: 252 seconds]
swgillespie has joined #ruby
Soda has joined #ruby
Igorshp has quit [Remote host closed the connection]
<Ox0dea> Who would do such a thing?
<jhass> mirror.png
havenn has quit [Read error: Connection reset by peer]
gambl0re has quit [Remote host closed the connection]
<bustrarm> that moment when you find out that the last week you struggled to get something working was caused by a bug in a minorly-related piece of code that didn't have a test-case for the error
bustrarm is now known as busterarm
towski_ has joined #ruby
<craysiii> busterarm why do you always change your name
<busterarm> hours of work spinning my wheels going nowhere. lol
<busterarm> nickserv does it
<busterarm> my client errored and reconnected 7 hours ago and my nick has protection on
<busterarm> I never bothered to regain
<craysiii> ah
omegamike has quit [Remote host closed the connection]
<jhass> busterarm: https://freenode.net/sasl/
Jackneill has quit [Ping timeout: 246 seconds]
<busterarm> 10:06:31 =!= | irc: reading data on socket: error -54 Error in the pull function.
<busterarm> i have sasl on
sshuff|gone is now known as sshuff
<jhass> uh, then you wouldn't have to regain
<busterarm> i dunno what to tell you
Mon_Ouie has quit [Quit: WeeChat 1.2]
<craysiii> i couldnt connect to freenode with ssl on
<busterarm> i'm using sasl. i don't have to identify on signin. It even signs me in as busterarm, just the nick is locked when my client disconnects
symm- has quit [Read error: Connection reset by peer]
<craysiii> oh i thought that was a typo.
<busterarm> doesn't happen all the time - just sometimes. It's probably a weechat issue
scripore has joined #ruby
deavid has quit [Ping timeout: 240 seconds]
gambl0re has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
symm- has joined #ruby
ruurd has joined #ruby
<craysiii> busterarm today in the mail i got a package from bloc. had a notebook and a hack the planet! sticker. pretty happy :)
<busterarm> lol
safeforge has joined #ruby
roolo has quit [Remote host closed the connection]
EllisTAA has joined #ruby
AustinMatherne has quit [Remote host closed the connection]
roolo has joined #ruby
<adaedra> craysiii: used a SSL port?
roolo has quit [Remote host closed the connection]
fabrice31 has joined #ruby
<craysiii> 443 right
<adaedra> that's HTTPS
gambl0re has quit [Remote host closed the connection]
<adaedra> I use 7000 iirc
<craysiii> oh
ldnunes has quit [Quit: Leaving]
gambl0re has joined #ruby
stopbyte has left #ruby ["Leaving."]
<adaedra> my memory was correct
<cout> as far as I can remember, my memory is never correct
Rickmasta has joined #ruby
deavid has joined #ruby
yaroslav has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
<jhass> mmh, 6697 over here
acke has quit [Quit: Leaving...]
<shevy> cout perhaps you merely forget the moments in time when your memory was correct
lkba_ has joined #ruby
deepu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
deepu has joined #ruby
marr has joined #ruby
dimasg has joined #ruby
Kilo`byte has quit [Ping timeout: 244 seconds]
bruno- has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
ruurd has quit [Quit: ZZZzzz…]
agent_white has joined #ruby
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
danman has quit [Quit: danman]
jcoe has joined #ruby
yaroslav has quit [Quit: yaroslav]
jgpawletko has quit [Quit: jgpawletko]
bruno- has quit [Ping timeout: 252 seconds]
bluOxigen has quit [Ping timeout: 265 seconds]
Kilo`byte has joined #ruby
shock_one has quit [Remote host closed the connection]
pocketprotector has quit [Ping timeout: 260 seconds]
Igorshp has joined #ruby
Igorshp has quit [Read error: Connection reset by peer]
quimrstorres has joined #ruby
doertedev has quit [Quit: Lost terminal]
pengin has quit [Remote host closed the connection]
Igorshp has joined #ruby
krz has quit [Ping timeout: 256 seconds]
shock_one has joined #ruby
jtdowney has quit [Remote host closed the connection]
nofxx has joined #ruby
umgrosscol has quit [Remote host closed the connection]
nofxx has quit [Changing host]
nofxx has joined #ruby
aaeron has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pengin has joined #ruby
duggiefresh has quit []
arooni-mobile has joined #ruby
devdazed has quit [Quit: Computer has gone to sleep.]
Igorshp has quit [Ping timeout: 265 seconds]
freerobby has quit [Quit: Leaving.]
werelivinginthef has quit [Remote host closed the connection]
shock_one has quit [Ping timeout: 256 seconds]
kokoleavia has joined #ruby
Pupeno has joined #ruby
DLSteve has quit [Quit: Leaving]
devdazed has joined #ruby
_blizzy_ has quit [Ping timeout: 244 seconds]
jtdowney has joined #ruby
Vile` has quit [Ping timeout: 246 seconds]
EllisTAA has quit [Quit: EllisTAA]
devdazed has quit [Client Quit]
platzhirsch has joined #ruby
platzhirsch has left #ruby [#ruby]
Vile` has joined #ruby
paulcsmith has joined #ruby
EllisTAA has joined #ruby
tennis has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
gamename has joined #ruby
pocketprotector has joined #ruby
Lucky___ has joined #ruby
Musashi007 has quit [Ping timeout: 265 seconds]
ruby-lang235 has joined #ruby
bigmac_ has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yosafbridge has quit [Ping timeout: 240 seconds]
gamename has quit [Ping timeout: 244 seconds]
mase-chatter has quit [Quit: Leaving]
mlangenberg has left #ruby [#ruby]
jgpawletko has joined #ruby
davedev24 has quit [Read error: Connection reset by peer]
davedev24 has joined #ruby
bigmac_ is now known as i8igmac
robbyoconnor has joined #ruby
yosafbridge has joined #ruby
jcoe has joined #ruby
sinkensabe has quit [Remote host closed the connection]
snath has joined #ruby
unshadow_ has joined #ruby
pengin has quit [Remote host closed the connection]
willywos has quit [Quit: Lost terminal]
snath has left #ruby [#ruby]
paulcsmith has quit [Quit: Be back later ...]
Cache_Money has quit [Quit: Cache_Money]
pengin has joined #ruby
solars has quit [Ping timeout: 265 seconds]
unshadow has quit [Ping timeout: 246 seconds]
sshuff is now known as sshuff|gone
HoppingMadMan has quit [Ping timeout: 246 seconds]
Kalov has quit []
zanloy has quit [Quit: Leaving]
pengin has quit [Remote host closed the connection]
Muhannad has quit [Ping timeout: 240 seconds]
PaulCapestany has joined #ruby
Musashi007 has joined #ruby
khebbie has joined #ruby
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
kokoleavia has quit [Ping timeout: 255 seconds]
gambl0re has quit [Remote host closed the connection]
Trynemjoel has quit [Ping timeout: 250 seconds]
pengin has joined #ruby
gheegh has joined #ruby
leesharma has quit [Ping timeout: 240 seconds]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gambl0re has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
polpak has quit [Ping timeout: 246 seconds]
eminencehc has quit [Remote host closed the connection]
polpak has joined #ruby
ruurd has joined #ruby
Trynemjoel has joined #ruby
<ruby-lang235> chat sleeping zzz
<Ox0dea> Zizzles.
leesharma has joined #ruby
khebbie has quit [Ping timeout: 244 seconds]
vyorkin has joined #ruby
jud has quit [Read error: Connection reset by peer]
jud has joined #ruby
hinbody has quit [Quit: leaving]
<vyorkin> want smth like Array#unshift but for Set
<Ox0dea> vyorkin: That's not a very reasonable operation.
wldcordeiro_ has joined #ruby
s00pcan has quit [Ping timeout: 265 seconds]
omegamike has joined #ruby
<adaedra> Sets are unordered, no?
beef-wellington has quit [Ping timeout: 244 seconds]
<vyorkin> omg, you're right :)
<dymk> adaedra: correct
<vyorkin> ok, I just need an array
freerobby has joined #ruby
<apeiros> ruby's sets are ordered, though
<vyorkin> the reason is that I need smth like "sized window"
<dymk> apeiros: wait what? Really?
<apeiros> given that they're backed by Hash, which is ordered too
ScriptGeek1 has joined #ruby
s00pcan has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> it's not part of the contract, though, so IMO don't rely on it
<vyorkin> from docs Set implements a collection of unordered values with no duplicates
<apeiros> also Array has plenty of set operations
curses has quit [Remote host closed the connection]
ScriptGeek has quit [Ping timeout: 244 seconds]
RonRichie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
snath has joined #ruby
ruby-lang235 has quit [Ping timeout: 246 seconds]
kies^ has quit [Ping timeout: 265 seconds]
danman has joined #ruby
ruby-lang498 has joined #ruby
omegamike has quit [Ping timeout: 246 seconds]
snath has left #ruby [#ruby]
dorei has quit []
<Ox0dea> vyorkin: Set's being ordered in Ruby 1.9+ is an implementation detail, but it's very unlikely to go away in any future version.
sotosoto has joined #ruby
HoppingMadMan has joined #ruby
<ruby-lang498> @rob_ are you around?
<rob_> ruby-lang498: ..hello?
ecksit has joined #ruby
Contigi has quit [Quit: Leaving]
freerobby has quit [Quit: Leaving.]
ruby-lang498 has left #ruby [#ruby]
jcoe has joined #ruby
sotosoto has quit [Quit: leaving]
sargas has joined #ruby
<vyorkin> 0x0dea: thanks, didn't know that
Channel6 has joined #ruby
Muhannad has joined #ruby
k3asd` has quit [Ping timeout: 264 seconds]
HoppingMadMan has quit [Max SendQ exceeded]
woodruffw has quit [Quit: And then he took off.]
woodruffw has joined #ruby
<vyorkin> 0x0dea: what do you think about smth like this: https://gist.github.com/vyorkin/971b25739790b3dfffca ?
<vyorkin> can I do better?
jobewan has quit [Quit: Leaving]
HoppingMadMan has joined #ruby
gambl0re has quit [Ping timeout: 252 seconds]
<Ox0dea> vyorkin: Well, it's certainly not the most performant approach.
Rollabunna has quit [Ping timeout: 250 seconds]
<Ox0dea> You're creating a new Array every single time.
sdwrage2 has joined #ruby
EllisTAA has joined #ruby
whiteline has quit [Remote host closed the connection]
<Ox0dea> Then again, Ruby uses shared memory for methods like #[], #first, and #take, so it's not terrible.
hahuang65 has quit [Ping timeout: 272 seconds]
<adaedra> thank god for shared memory
whiteline has joined #ruby
Rollabunna has joined #ruby
Muhannad has quit [Ping timeout: 256 seconds]
<lwu> anyone here
bruno- has joined #ruby
HoppingMadMan has quit [Max SendQ exceeded]
<adaedra> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
GPrime has joined #ruby
eminencehc has joined #ruby
<Ox0dea> vyorkin: Do you actually want elements pushed onto the front?
quimrstorres has quit [Remote host closed the connection]
whippythellama has quit [Quit: WeeChat 1.2]
<vyorkin> 0x0dea: yes, thats right, I want it to "slide"
bruno- has quit [Ping timeout: 264 seconds]
<craysiii> sounds like you want a queue
<Ox0dea> Right, but it can "slide" left or right.
<vyorkin> actually I'm going to use it to keep recent items
<adaedra> Meanwhile, I'll slide into my bed
<adaedra> o/
{756d6f} has quit [Ping timeout: 244 seconds]
<vyorkin> adaedra: good night :)
WHATDOYOUNEED has joined #ruby
<vyorkin> 0x0dea: I want it to slide right
Contigi has joined #ruby
spider-mario has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
Igorshp has joined #ruby
quimrstorres has joined #ruby
shock_one has joined #ruby
nawak has joined #ruby
gamename has joined #ruby
<Ox0dea> vyorkin: Such that most recent items are at the front, then, yes?
hololeap has joined #ruby
<vyorkin> 0x0dea: yeah, correct
Musashi007 has quit [Quit: Musashi007]
robbyoconnor has quit [Max SendQ exceeded]
<Ox0dea> vyorkin: I tried to get something clever going with the two-argument form of Array#[] and Comparable#<=>, but it ends up being overly intricate.
<vyorkin> 0x0dea: here is what i've got for now https://gist.github.com/vyorkin/2e9213b73043905ab110
robbyoconnor has joined #ruby
<Ox0dea> A #pop in the case of @source.size == @limit and then an #unshift is probably the cleanest approach.
icebourg has quit []
Igorshp has quit [Ping timeout: 256 seconds]
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
WHATDOYOUNEED has quit [Ping timeout: 246 seconds]
<vyorkin> 0x0dea: got it, thanks!
<Ox0dea> vyorkin: Happy to help.
<Ox0dea> No need to #dup before #take, for what that's worth.
_blizzy_ has joined #ruby
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shock_one has quit [Ping timeout: 240 seconds]
dimasg has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby
nawak has quit [Quit: leaving]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
quimrstorres has quit [Remote host closed the connection]
<vyorkin> 0x0dea: thanks again :)
_nowak_ has joined #ruby
HoppingMadMan has joined #ruby
<shevy> if I do: module Foo; end, Foo becomes available via a "Object.const_defined? :Foo" query. Who or what registers it there though? I notice that I can do Object::Foo but I am not sure why
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
dgutierrez1287 has joined #ruby
<Ox0dea> shevy: The interpreter does. Are you trying to hook constant definition?
bricker has joined #ruby
guest1241234 has quit [Quit: Connection closed for inactivity]
<shevy> no, I am trying to understand things. I had to change some queries earlier today, where I used Object.const_defined? towards a NamespaceBla.const_defined?, and I spread them out all over everywhere (it was old code)
<Ox0dea> Well, constant resolution starts at Object, so it makes sense that a module defined at the top level would be accessible from Object.
n008f4g_ has quit [Ping timeout: 244 seconds]
<Ox0dea> >> module A; module B end end; Object::B rescue $!
<ruboto> Ox0dea # => #<NameError: uninitialized constant B> (https://eval.in/407632)
<shevy> hmm
dudoom has joined #ruby
dudoom has quit [Client Quit]
EllisTAA has quit [Quit: EllisTAA]
hithisisde has joined #ruby
dgutierrez1287 has quit [Ping timeout: 240 seconds]
Musashi007 has quit [Quit: Musashi007]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GPrime has joined #ruby
_nowak_ has quit [Quit: leaving]
EllisTAA has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
EllisTAA has quit [Client Quit]
Musashi007 has joined #ruby
GPrime has quit [Client Quit]
weemsledeux has joined #ruby
RegulationD has quit [Remote host closed the connection]
EllisTAA has joined #ruby
nym has joined #ruby
apfeluser has quit [Quit: Leaving]
GPrime has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
hithisisde has quit [Ping timeout: 246 seconds]
robbyoconnor has quit [Max SendQ exceeded]
GPrime has quit [Client Quit]
swgillespie has joined #ruby
robbyoconnor has joined #ruby
dimasg has joined #ruby
_nawak_ has joined #ruby
carlosoliveira has quit [Quit: Connection closed for inactivity]
victortyau has quit [Ping timeout: 244 seconds]
ismaelga has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_nawak_ has quit [Client Quit]
shock_one has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
ruurd has quit [Quit: ZZZzzz…]
swgillespie has joined #ruby
sphex has quit [Read error: Connection reset by peer]
Kyuujitsu has joined #ruby
sphex has joined #ruby
fractalis has quit [Ping timeout: 250 seconds]
prefixed has quit [Ping timeout: 240 seconds]
sdwrage2 has quit [Ping timeout: 246 seconds]
charliesome has quit [Quit: zzz]
Kalov has joined #ruby
gamename has quit [Remote host closed the connection]
ruurd has joined #ruby
dudoom has joined #ruby
shock_one has quit [Ping timeout: 256 seconds]
dimasg has quit [Ping timeout: 250 seconds]
kirun has quit [Quit: Client exiting]
mleung_ has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
mleung has quit [Read error: Connection reset by peer]
mleung_ is now known as mleung
djstorm has quit [Ping timeout: 246 seconds]
snockerton1 has quit [Quit: Leaving.]
dudoom has quit [Client Quit]
mpistone has joined #ruby
<hays> so what's the deal with this :foo business
omegamike has joined #ruby
<dfockler> hays: you mean like symbols or foo itself?
Timba-as has quit [Quit: Lingo: www.lingoirc.com]
<hays> symbols
skade has joined #ruby
<dfockler> they're immutable strings
<workmad3> sort of
* dfockler waits for better rubyists to correct
texasmade has joined #ruby
<dfockler> to correct me
symbol has quit [Ping timeout: 246 seconds]
Ropeney has joined #ruby
<workmad3> dfockler: it's one of those annoying things... Symbols are a completely distinct type from strings, so 'immutable string' isn't really correct... they're also not usually implemented as strings in an interpreter... they can be converted to strings, but comparison-wise they're closer to integers... but 'immutable string' gets the idea across nicely as a first-stage approximation to people who've not encounte
<jhass> hays: any background we can relate to?
<workmad3> red them before
neoseeker has joined #ruby
eminencehc has quit [Remote host closed the connection]
juanpablo____ has quit [Quit: (null)]
juanpablo____ has joined #ruby
<hays> is it fair to say that a symbol is an object whose uniqueness is guaranteed?
omegamike has quit [Ping timeout: 252 seconds]
<hays> maybe thats the first question.. is a symbol an object
robbyoconnor has quit [Max SendQ exceeded]
<dfockler> everything is an object
<workmad3> hays: you can always check that ;)
<workmad3> >> :foo.class
<ruboto> workmad3 # => Symbol (https://eval.in/407637)
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robbyoconnor has joined #ruby
<workmad3> dfockler: (nearly) everything is an object
<dfockler> nearly
<hays> in python you can instantiate object() and you get something that is unique but doesn't do much else
michaeldeol has joined #ruby
<hays> in python you can instantiate object() and you get something that is unique but doesn't do much else
<hays> ack sorry about that
<workmad3> hays: you can do similar in ruby... Object.new
sdwrage has quit [Quit: This computer has gone to sleep]
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
swgillespie has joined #ruby
Kyuujitsu has quit [Quit: leaving]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<hays> so i guess symbols are not just Object.new
<hays> unless its just syntactic sugar for that
<workmad3> no, symbols are not Object.new
jaequery has joined #ruby
<hays> how do I see the methods for :foo
<workmad3> hays: same as with anything else... call .methods on it ;)
<workmad3> hays: also take a look at .object_id
<hays> :foo.methods hah
juanpablo____ has quit [Ping timeout: 250 seconds]
juanpablo_____ has joined #ruby
michaeldeol has quit [Client Quit]
Kyuujitsu has joined #ruby
<workmad3> hays: if you do that, you should notice that you'll always get the same object_id back for the same symbol
<dfockler> symbols are more like pointers, right?
<dfockler> named pointers
<theery> Any idea why the before filter in the parent class doesn't get executed when a route in the child class is hit? It gets executed if I move it into the child class: https://gist.github.com/macmartine/585fb3d6ab244ce605a7
<workmad3> dfockler: not really...
jgpawletko has joined #ruby
<theery> It's in a Sinatra app, fwiw
<dfockler> theery: you may need to call super
<hays> workmad3: that would be similar to Object.new
<polpak> dfockler: they are more like immutable strings
<workmad3> hays: no, Object.new.object_id will always be a different object
<dfockler> polpak: haha that's what I said before
Lamarus has joined #ruby
<theery> dfockler: I shouldn't have to put it in every child, though, theoretically. That's the point of inheritance.
<hays> workmad3: right, but foo= Object.new would have a unique object_id just like :foo
[H]unt3r has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hays> i suppose every object has a unique object id
mesamoo has joined #ruby
<workmad3> hays: right, but then you'd need to pass that particular object around in order to get the same object
<dfockler> theery: well the `before do` is just code in the class, it's not a part of the parent class
<polpak> hays: what are you trying to do?
<workmad3> hays: whilst with a symbol, you'd get the same object back if you used the same symbol in different parts of your program... which is part of what makes them useful
<hays> ahh
<dfockler> polpak: we were just talking about what symbols are
<Lamarus> Could someone help out with this issue. I have been trying to do a bundle install, and it keeps yelling about nokogiri and not installing correctly. So I try to install that one using `gem install` and get an error no matter what I do. I need help on this... http://laravel.io/bin/LkEGO
shadoi has quit [Quit: Leaving.]
<polpak> dfockler: oh. they are instances of the Symbol class
<polpak> dfockler: the end. ;p
<workmad3> hays: as you can create a hash with symbols as keys in one part of the app, pass that around and be able to access the hash with symbols everywhere else, with inexpensive lookups
<hays> polpak: understand symbols
juanpablo_____ has quit [Ping timeout: 240 seconds]
<workmad3> hays: which is one of the normal first uses for symbols, hash lookup keys :)
<hays> yeah, I was noticing them being used that way, as keys in a hash
michael_mbp has quit [Excess Flood]
<hays> any way to go from "foo" to :foo ?
<polpak> hays: they're an annoying side effect of the fact that ruby chose to implement strings as mutable (rather than immutable)
<workmad3> >> "foo".to_sym
<ruboto> workmad3 # => :foo (https://eval.in/407641)
jackjackdripper has joined #ruby
<hays> >> "hello, world"
<ruboto> hays # => "hello, world" (https://eval.in/407642)
riscky has joined #ruby
<hays> polpak: heh, yeah python has immutable strings
bruno- has joined #ruby
<polpak> hays: indeed
<hays> I was noticing that when I was seeing a lot of "foo" + bar + "baz" around in the Ruby world
<workmad3> polpak: it's more of a smalltalk legacy, tbh... I'd need to dig into a bit more history to dredge up why smalltalk went with symbols and strings though (but I think there was more to it than just "side effect of mutable strings")
Ropeney has joined #ruby
michael_mbp has joined #ruby
<hays> mutable strings aren't a bad thing though
<polpak> hays: you see that in python too
<polpak> hays: and yes they are ;p
<hays> polpak: yes but you also slap people in that case :)
<hays> I have to say im not a huge fan of "#{barf}"
jackjackdripper1 has quit [Ping timeout: 246 seconds]
<dfockler> it's just better to use an immutable string for certain things like enums
Pupeno_ has joined #ruby
<workmad3> dfockler: sure... if you have immutable strings and no enum or symbol type, you'd likely use them for that sort of situation :)
[H]unt3r has quit [Quit: Leaving]
deepu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
agent_white has quit [Quit: bebacklater]
drewo has quit [Ping timeout: 265 seconds]
bullcitydev has joined #ruby
Pupeno has quit [Ping timeout: 244 seconds]
<workmad3> hays: more generally, symbols get used a lot as names in ruby... method names are symbols, variable names are symbols, constant names are symbols
<dfockler> "#{barf}" is better than parsing through "%s hello %s" % (var1, var2)
<hays> is there a way to see what an object's parent class is?
weemsledeux has joined #ruby
<workmad3> hays: object.class
<Ox0dea> >> '%d + %d = %d' % [1, 2, 3] # dfockler
<ruboto> Ox0dea # => "1 + 2 = 3" (https://eval.in/407646)
<Ox0dea> Ruby has both. <3
<workmad3> hays: that'll give you the class of that object... if you want the superclass of that class, you'd then use object.class.superclass
<dfockler> Ox0dea: boom! :)
<hays> workmad3: does ruby have MI?
<workmad3> hays: no, single class inheritance, but multiple module inclusion
robbyoconnor has quit [Max SendQ exceeded]
<polpak> hays: you can also do foo.class.ancestors to get everybody
bruno- has quit [Ping timeout: 244 seconds]
shadoi has joined #ruby
robbyoconnor has joined #ruby
<polpak> dfockler: I disagree about the string formatting arguement, but I'm not going to debate the point
<hays> workmad3: wait a minute... method names are symbols?
matp has quit [Ping timeout: 244 seconds]
robbyoconnor has quit [Client Quit]
<Ox0dea> >> def foo; end # hays
<ruboto> Ox0dea # => :foo (https://eval.in/407647)
<workmad3> hays: if you do 'some_object.methods' you'll notice all the names are symbols ;)
dseitz has joined #ruby
<dfockler> polpak: like Ox0dea you can do either if you want
<polpak> dfockler: indeed
<workmad3> and yeah, ruby also now returns the method name as a symbol from 'def'
triangles has joined #ruby
darithorn has quit [Remote host closed the connection]
<hays> hmm ok but I don't define them that way.. I still do def foo
<Ox0dea> workmad3: Module#include/#extend is essentially multiple inheritance, no
<Ox0dea> +?
<workmad3> hays: you can also do 'define_method :foo do; <method body>; end'
<Ox0dea> workmad3: Then again, you could've used a String there.
<workmad3> Ox0dea: sure... but if you looked at all the symbols with ObjectSpace before and after the define_method, you'd notice a new symbol appear ;)
<polpak> hays: of course. but you can refer to them by the symbol to call them (via send or similar)
<Ox0dea> workmad3: Aye, fair enough.
<hays> what's the deal with do.. sometimes its around and sometimes its not
noethics has quit [Ping timeout: 256 seconds]
RonRichie has joined #ruby
<polpak> hays: it defines a block (like braces)
<Lamarus> Could someone help out with this issue. I have been trying to do a bundle install, and it keeps yelling about nokogiri and not installing correctly. So I try to install that one using `gem install` and get an error no matter what I do. I need help on this... http://laravel.io/bin/LkEGO
Ilyas has quit [Read error: Connection reset by peer]
pietr0 has quit [Quit: pietr0]
<workmad3> Ox0dea: and module include/extend is a sort of a form of multiple inheritance... it's implemented essentially as inheritance, but it doesn't interfere with superclass chains, and it's really closer to inserting a new superclass into the chain
Yzguy has joined #ruby
<Ox0dea> >> s = Symbol.all_symbols; define_method(:wtf) {}; Symbol.all_symbols - s # workmad3
<ruboto> Ox0dea # => [] (https://eval.in/407649)
<Ox0dea> What's going on there?
Cache_Money has joined #ruby
Lamarus has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
<workmad3> >> s = Symbol.all_symbols.dup; define_method(:wtf) {}; Symbol.all_symbols - s
<ruboto> workmad3 # => [] (https://eval.in/407650)
arescorpio has joined #ruby
<workmad3> hmm... weird, I get ':wtf' out locally for that
<Ox0dea> I don't.
Lamarus has joined #ruby
<workmad3> Ox0dea: oh, it's because it's all on one line
<workmad3> Ox0dea: the parser creates the symbol as soon as it parses the line
sargas has quit [Quit: This computer has gone to sleep]
pietr0 has joined #ruby
<Ox0dea> Ah, that does make sense.
matp has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
<hays> i bet symbols come from the fact that with smalltalk you could peek into the interpreter in weird ways
jackjackdripper has joined #ruby
<Ox0dea> hays: We can peek into Ruby in very weird ways too.
<Ox0dea> Poke, as well.
<hays> im pretty sure i remember smalltalk letting you like subclass its own parser
<ivanskie> is there an inflector to convert every word in a string to capitalized? .capitalize isn't doing it for me. .humanize only capitalizes first word.. (this is for company name, they are stored in db as all uppercase)
<Ox0dea> ivanskie: Why not just split.map(&:capitalize).join(' ')?
<ivanskie> ooh
Kyuujitsu has left #ruby [#ruby]
RonRichie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruurd> Lamarus why the special libxml2?
<ivanskie> awe undefined local variable or method `split' for #<#<Class:0x007fd0a0063308>:0x007fd09eb2cc28>
<workmad3> hays: ruby doesn't allow you quite that level of introspection into itself, but it lets you poke in and change a lot of internals
<ivanskie> oh nevermind
<Ox0dea> ivanskie: Well, you'll need to turn $thing into a String first.
<ivanskie> lol
<Ox0dea> Heh.
<ivanskie> < doing it wrong
<Lamarus> ruurd, I have tried with that and without.... same issue Tried it with based on a suggestion of using homebrew libxml2
benlieb has joined #ruby
wldcordeiro_ has quit [Read error: Connection reset by peer]
wldcordeiro_ has joined #ruby
<ruurd> did you try bundle config build.nokogiri --use-system-libraries
<ivanskie> ther we go. thanks Ox0dea
<Lamarus> yes
topdownjimmy has quit [Ping timeout: 256 seconds]
<ruurd> as per the comments?
<Lamarus> same issue
<Ox0dea> ivanskie: Happy to help. :)
<workmad3> hays: rubinius gives you a bit more introspective power too, as it implements a lot more of the ruby language inside ruby itself (it still has a C++ bootstrap which is hard to access inside ruby, iirc)
<Ox0dea> workmad3: Still no RubyVM::InstructionSequence#load, though. :(
<hays> ruby seems fun. it might be the object oriented language ive been looking for
<Ox0dea> hays: It is known.
<workmad3> right, I need to get to bed
<Ox0dea> Au revoir.
<workmad3> night all :)
topdownjimmy has joined #ruby
<Ox0dea> hays: I envy your fresh eyes and mind.
<polpak> hays: it's interesting, but personally I still prefer python
<Ox0dea> First getting into Ruby was a blast.
<polpak> hays: I just have to do this for work ;p
<Lamarus> ruurd, here is what I get when I do bundle install on my project that lead me to the nokogiri thing http://laravel.io/bin/0eqyM
<ruurd> Lamarus why stick to 2.2.1?
Kyuujitsu has joined #ruby
<hays> polpak: different tools for different things though... I do love me some python
<Lamarus> ruurd, what do you mean?
GPrime has joined #ruby
sargas has joined #ruby
<ruurd> why not update to ruby-2.2.2 ?
<hays> im using ruby for work also
mpistone has quit [Remote host closed the connection]
<Lamarus> i will if that helps
<hays> trying to hack together some scripts--aparently its the nome de plume of this company
<Lamarus> i just did `brew install ruby`
<Lamarus> and it gave me 2.2.1
bruno- has joined #ruby
GPrime has quit [Client Quit]
<hays> hrm. my ruby is 2.0.0p481
<polpak> hays: I think you mean lingua franca
Kyuujitsu has quit [Client Quit]
leesharma has quit [Ping timeout: 255 seconds]
<Lamarus> well, that is odd... `ruby -v` reports 2.2.1p85 but `brew install ruby` shows ruby-2.2.2 already installed
<hays> polpak: i do
shadoi has quit [Quit: Leaving.]
<Lamarus> how do I get rid of 2.2.1
<ruurd> when was the last time you ran brew update && brew upgrade --all
<Ox0dea> hays: For reference, "nom de plume" essentially translates to "pen name".
shadoi has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<Ox0dea> From when we wrote with quills.
<ruurd> Oh. Ahem.
<hays> Ox0dea: yeh i felt stupid once i hit enter
mikecmpbll has quit [Quit: i've nodded off.]
theery has quit [Remote host closed the connection]
<ruurd> what does which ruby tell you, Laramus?
<hays> but it had already come out
<polpak> hays: we've all had those moments :)
<polpak> hays: brains are funny things
workmad3 has quit [Ping timeout: 246 seconds]
<Lamarus> /Users/bretterer/.rvm/rubies/ruby-2.2.1/bin/ruby
Kyuujitsu has joined #ruby
<hays> sudo port install ruby22 for me :)
<ruurd> but that's not a brew install, that is an rvm install
natbo has joined #ruby
<hays> macports
<ruurd> rvm get head then rvm upgrade ruby-2.2.1
<Lamarus> well... that is my issue
<Lamarus> i want it to be a brew install... how do i get rid of rvm install
polpak has quit [Quit: leaving]
<Ox0dea> Lamarus: `rvm implode`, and never look back.
<hays> huh. os x ships with ruby
Xoro has quit [Read error: Connection reset by peer]
<Lamarus> Ox0dea that does not sound like a good idea
<hays> that's kinda surprising
<Lamarus> FYI, I am not a Ruby Dev.... have to use it for our blog
sdwrage has joined #ruby
riscky has quit [Quit: riscky]
<ruurd> Lamarus rvm ruby is better than a brew ruby really
<Lamarus> is it?
<ruurd> much easier to run different rubies alongside each other
wldcordeiro_ has quit [Ping timeout: 246 seconds]
<Lamarus> alright
<Lamarus> ill do that and remove brew
<Lamarus> ruby
<ruurd> and no problems wiht needing admin rights if you don't need them
<ruurd> just remove the ruby with brew
<Lamarus> running the upgrade ruby-2.2.1 ruby-2.2.2
<ruurd> brew uninstall ruby
HoppingMadMan has quit [Ping timeout: 244 seconds]
<Lamarus> ya, ill do that
<Lamarus> will this fix my issue?
<Lamarus> i hope
<hays> sudo port select --set ruby ruby22
<hays> everyone says brew is better--i just started with macports so i stick with it
benlieb has quit [Quit: benlieb]
RegulationD has joined #ruby
rcvalle has quit [Quit: rcvalle]
Xoro has joined #ruby
<Lamarus> well, ruby -v now shows ruby 2.0.0p481 ruurd
<Lamarus> there we go
<Lamarus> new shell needed to open
<Aeyrix> hays: it is
<Lamarus> lets see if this fixed it
nateberkopec has quit [Ping timeout: 240 seconds]
<ruurd> I'm running a test for you
gheegh has quit [Ping timeout: 246 seconds]
<Lamarus> Nope... now it fails on Installing json 1.8.1 with native extensions
Kyuujitsu has quit [Quit: leaving]
<ruurd> wait a sec
<hays> ooh ... loop. that's probably better than while true
<ruurd> you have rvm right?
<Ox0dea> hays: Indeed it is.
<ruurd> create a directory and create two files in it
<ruurd> .ruby-version and .ruby-gemset
<ruurd> put ruby-2.2.2 in the .ruby-version file
<ruurd> and the name of a gemset in the .ruby-gemset file
tjohnson has joined #ruby
<Lamarus> matter where the directory is?
<ruurd> then go out of the subdirectory and move into the subdirectory again
<ruurd> No
einarj has quit [Remote host closed the connection]
senttoyoubyus has joined #ruby
<Lamarus> what ist eh gemset? (again, not a ruby person)
<hays> how do I treat a function as a first class object? e.g. having a dict of functions
Yzguy has quit [Quit: Zzz...]
<ruurd> a gem is a sort of library you can load
<Lamarus> right.. but which gemset are you talking about
<Ox0dea> hays: The #method method. :)
RegulationD has quit [Ping timeout: 265 seconds]
<ruurd> and rvm calls a collection of gems you use for a project a gemset
<ruurd> make one up
<Ox0dea> hays: Alternatively, you could use Procs instead of methods.
<ruurd> call it testing for all I care
Mendenhall has joined #ruby
<Ox0dea> >> [1.method(:to_s), '2'.method(:to_i)].map(&:call) # hays
<ruboto> Ox0dea # => ["1", 2] (https://eval.in/407652)
<hays> Ox0dea: the method method?
<Ox0dea> hays: Aye, the #method method. See above.
<Lamarus> ruurd: ok let me change my comment... what does a gemset look like?
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruurd> just the name of the gemset
<Ox0dea> ruurd: Your intentions were good, but I think you're leading this person astray.
benlieb has joined #ruby
<Lamarus> got ya
<ruurd> oh you're really helping here
<Lamarus> ok, i went into the directory
<Lamarus> ruby-2.2.2 - #gemset created /Users/bretterer/.rvm/gems/ruby-2.2.2@testgemset
<Lamarus> ruby-2.2.2 - #generating testgemset wrappers - please wait
<ruurd> excellent
lannonbr has quit [Quit: WeeChat 1.2]
<ruurd> now execute ruby -v
<ruurd> it should tell you ruby-2.2.2
lannonbr has joined #ruby
Soda has quit [Remote host closed the connection]
<Lamarus> it does.. ruby 2.2.2p95
<ruurd> Good.
<Ox0dea> Lamarus: Now change directories and run `ruby -v` again.
<ruurd> now execute gem install nokogiri
jaequery has quit [Ping timeout: 265 seconds]
<hays> Ox0dea: so if I have def foo{1}
curses has joined #ruby
<hays> how do I access foo
<Ox0dea> hays: Then you have a synta error. :P
<Ox0dea> hays: method(:foo)
<Lamarus> Ox0dea: 2.2.2p95 still
<Lamarus> ruurd: running it now
<Lamarus> and it installed