havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
jgt has quit [Ping timeout: 246 seconds]
Rickmasta has joined #ruby
zenguy_pc has quit [Remote host closed the connection]
Jet4Fire has quit [Ping timeout: 246 seconds]
zenguy_pc has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
nixmaniack has joined #ruby
christiandsg has quit [Remote host closed the connection]
supermarin has joined #ruby
toretore has quit [Ping timeout: 260 seconds]
norc has quit [Ping timeout: 252 seconds]
__fps__ has quit [Ping timeout: 260 seconds]
christiandsg has joined #ruby
nixmaniack has quit [Ping timeout: 246 seconds]
Yzguy has quit [Quit: Zzz...]
yfeldblum has quit [Ping timeout: 264 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
quazimodo has joined #ruby
underplank has joined #ruby
LiquidInsect has joined #ruby
<quazimodo> i need to write some data to rail's send_data method as CSV, i've tried looking around for a csv sanitizer but I didn't find one, i'm not sure if ruby's CSV class can be used to sanitize my string before saving it as csv headers, => def batch_headers
<quazimodo> data = @template.placeholders.map(&:value).join(',')
<quazimodo> name = /(.*)\..*/.match(@template.name)[1]
<quazimodo> send_data data, :filename => "#{name}.csv", type: :csv
<quazimodo> .... apologies, that was meant to be a gist link
tomdp has left #ruby ["Leaving"]
devoldmx has joined #ruby
tomdp has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JDiPierro has joined #ruby
Xeago has joined #ruby
akem has quit [Remote host closed the connection]
__fps__ has joined #ruby
jetpackjoe has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
kirun has quit [Quit: Client exiting]
Jet4Fire has joined #ruby
christiandsg has quit [Remote host closed the connection]
govg has quit [Ping timeout: 246 seconds]
last_staff has quit [Quit: last_staff]
lsv_ has quit [Read error: Connection reset by peer]
peterhil_ has quit [Ping timeout: 260 seconds]
lokulin has quit [Ping timeout: 260 seconds]
Jet4Fire has quit [Ping timeout: 245 seconds]
bronson has joined #ruby
tjad has quit [Quit: No Ping reply in 180 seconds.]
zeroDivisible has quit [Quit: WeeChat 1.3]
agentmeerkat has quit [Ping timeout: 246 seconds]
zeroDivisible has joined #ruby
tjad has joined #ruby
saneax is now known as saneax_AFK
Jet4Fire has joined #ruby
azgil has quit [Ping timeout: 246 seconds]
bronson has quit [Ping timeout: 245 seconds]
duckpuppy has quit [Ping timeout: 260 seconds]
lokulin has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Jet4Fire has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
akem has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has joined #ruby
JDiPierro has quit [Remote host closed the connection]
govg has joined #ruby
Jet4Fire has joined #ruby
<Ox0dea> I think it'd be neat if the `::` "operator" delegated to the receiver's definition of #const_get.
elton has quit [Remote host closed the connection]
fly5566 has joined #ruby
Jet4Fire has quit [Ping timeout: 245 seconds]
agentmeerkat has joined #ruby
cashnguns has quit [Ping timeout: 260 seconds]
tjad has quit [Quit: No Ping reply in 180 seconds.]
Gnut has quit [Ping timeout: 246 seconds]
InvGhostt has joined #ruby
tjad has joined #ruby
christiandsg has joined #ruby
<Ox0dea> Why doesn't it?
broadband has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Jet4Fire has joined #ruby
InvGhost has quit [Ping timeout: 260 seconds]
InvGhostt has quit [Ping timeout: 260 seconds]
speaking1ode has quit [Ping timeout: 246 seconds]
Unicorn| has quit [Quit: Connection closed for inactivity]
__fps__ has quit [Ping timeout: 260 seconds]
speaking1ode has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
supermarin has quit [Remote host closed the connection]
supermarin has joined #ruby
vikas027 has joined #ruby
jessemcgilallen has joined #ruby
Trieste has quit [Ping timeout: 264 seconds]
Rickmasta has joined #ruby
moty66_ has quit [Read error: Network is unreachable]
emptyflask has joined #ruby
__fps__ has joined #ruby
Trieste has joined #ruby
moty66 has joined #ruby
Jet4Fire has joined #ruby
jetpackjoe has joined #ruby
jetpackjoe has quit [Client Quit]
pdoherty has joined #ruby
armyriad has quit [Ping timeout: 246 seconds]
DanKnox is now known as DanKnox[away]
Jet4Fire has quit [Ping timeout: 246 seconds]
bb010g has joined #ruby
DanKnox[away] is now known as DanKnox
symm- has quit [Ping timeout: 246 seconds]
tjad has quit [Ping timeout: 260 seconds]
Jet4Fire has joined #ruby
nettoweb has joined #ruby
<xybre> Ox0dea: because :: also works on methods which are not consts
dorei has quit []
marr has quit [Ping timeout: 246 seconds]
duncannz has joined #ruby
christiandsg has quit [Remote host closed the connection]
kfrz has quit [Quit: Leaving.]
Jet4Fire has quit [Ping timeout: 260 seconds]
<dimik> wednesday = (Date.parse(date1)..Date.parse(date2)).select { |x| x.wednesday? }
<dimik> puts wednesday
<dimik> how can i clean this up of "-" in between %d-%m-%Y to just %d%m%Y
<Ox0dea> >> require 'date'; Date.today.strftime '%d%m%Y' # Dimik
<ruboto> Ox0dea # => "07122015" (https://eval.in/481118)
joneshf-laptop has quit [Ping timeout: 245 seconds]
arescorpio has joined #ruby
Jet4Fire has joined #ruby
dlitvak has joined #ruby
dlitvak has quit [Remote host closed the connection]
<dimik> yeah i tried that
<dimik> it's not working i guess cause there's a bunch of dates in my string
craysiii has joined #ruby
Jet4Fire has quit [Ping timeout: 245 seconds]
<Ox0dea> Dimik: Was that supposed to be a demonstration of your having "tried that"?
dlitvak has joined #ruby
christiandsg has joined #ruby
Arnvald has joined #ruby
centrx has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
<dimik> ohhh ok
<dimik> whatever man lol
duckpuppy has joined #ruby
nettoweb has quit [Ping timeout: 245 seconds]
Jet4Fire has joined #ruby
mary5030 has joined #ruby
craysiii has quit [Quit: Leaving.]
sarkis has quit [Ping timeout: 260 seconds]
Arnvald has quit [Ping timeout: 264 seconds]
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
linduxed has quit [Ping timeout: 246 seconds]
Jet4Fire has quit [Ping timeout: 260 seconds]
sarkis has joined #ruby
emptyflask has quit []
<Ox0dea> Dimik: I had to go all the way up to the attic to get it, but I am now in possession of a perfectly serviceable baby spoon; are you still hungry?
duckpuppy has quit [Ping timeout: 245 seconds]
devoldmx has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 246 seconds]
nettoweb has joined #ruby
nerium has joined #ruby
<dimik> lol.
Jet4Fire has joined #ruby
<nerium> Is there a way to speed up bundle install when you have gems that points to large repos?
krz has joined #ruby
<dimik> disable the docs
<nerium> Diabolik: Docs?
<nerium> Dimik: Å
<nerium> Dimik: Or did you talk to someone else?
<nerium> Dimik: The problem is that the repo is big, not the docs
djbkd has joined #ruby
<nerium> It’s 100mb+
<dimik> yeah just try it
<dimik> won't hurt
<dimik> saves a ton of time on ~1Ghz raspberry pi
<nerium> I disabled the docs 7 years ago, so that’s no the case
<dimik> oh ok
<jhass> it only downloads as fast as it downloads ...
jpfuentes2 has joined #ruby
<xybre> nerium: "large repos" on github?
<nerium> jhass: or it ignores the package until I tell it to update
Jet4Fire has quit [Ping timeout: 260 seconds]
<nerium> that would be the easiest solution
<jhass> a regular bundle install with the repo fetched shouldn't refetch it
rgb-one has joined #ruby
cashnguns has joined #ruby
<jhass> even a bundle update should only do a fetch in the cached clone
<nerium> jhass: still it freezes on this particular package for 1 min
crazydiamond has joined #ruby
<nerium> maybe it does something else
<jhass> strace?
<xybre> What "package"?
<rgb-one> nerium, are you having any issues with using bundler?
<nerium> rgb-one: nope
<rgb-one> Cool
supermarin has quit [Remote host closed the connection]
jpfuentes2 has quit [Ping timeout: 246 seconds]
joneshf-laptop has joined #ruby
<xybre> Uhg why is that repo so large when it's like a dozen files. Oh. The vendored crap. Joy.
<nerium> It’s 48MB, not 100 like i said before
<Ox0dea> Same OOM.
<nerium> but it only takes 15 sec to download using git, so there must be someting else that’s wrong
Jet4Fire has joined #ruby
elton has joined #ruby
elton has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
chouhoulis has joined #ruby
skcin7 has quit [Max SendQ exceeded]
Jet4Fire has quit [Ping timeout: 245 seconds]
skcin7 has joined #ruby
<xybre> Definitely --verbose/trace to see what's happening.
Yzguy has joined #ruby
mary5030 has joined #ruby
Jet4Fire has joined #ruby
mooe has quit [Quit: Connection closed for inactivity]
Cantaberry has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgt1 has quit [Ping timeout: 260 seconds]
christia_ has joined #ruby
christiandsg has quit [Read error: Connection reset by peer]
Jet4Fire has quit [Ping timeout: 260 seconds]
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
rgb-one has left #ruby [#ruby]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Coldblackice has quit [Ping timeout: 260 seconds]
Jet4Fire has joined #ruby
Coldblackice has joined #ruby
Arnvald has joined #ruby
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
framlinqp has joined #ruby
wildlander has quit [Quit: Saliendo]
framling has quit [Ping timeout: 245 seconds]
devoldmx has joined #ruby
Jet4Fire has quit [Ping timeout: 245 seconds]
zacts has joined #ruby
underplank has quit [Quit: underplank]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
SenpaiSilver_ has joined #ruby
SenpaiSilver has quit [Read error: Connection reset by peer]
yqt has quit [Ping timeout: 246 seconds]
jgt1 has joined #ruby
sdothum has joined #ruby
Jet4Fire has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
peterhil_ has joined #ruby
dlitvak has quit [Ping timeout: 260 seconds]
<grill_> yo. what's the best way to iterate through an array such that I am able to reset the current iterator position as needed?
<Radar> grill_: example plz
dlitvak has joined #ruby
Jet4Fire has quit [Ping timeout: 245 seconds]
<Ox0dea> grill_: Enumerable#next.
<grill_> in java, you can do for (int i = 0; blah blah; i++) { i = 0; blah blah; }
<Ox0dea> Oh, that.
myztic has joined #ruby
<Ox0dea> You're probably doing it wrong?
<Radar> ^
ledestin has joined #ruby
<grill_> can this be done or not?
<Radar> grill_: Explain why you want to do that, please.
<grill_> i want to do it because i'd like to see if it can be done
<Radar> Ox0dea: all yours
jessemcgilallen has quit [Quit: jessemcgilallen]
peterhil_ has quit [Ping timeout: 245 seconds]
* Ox0dea passes, thanks.
<grill_> sounds like it isn't possible
<Yzguy> I don't think you would use a for loop
<grill_> looks to be another flaw in ruby
Bellthoven has quit [Ping timeout: 260 seconds]
<Radar> grill_: If you're here to criticise Ruby, may I suggest that you don't?
<Arnvald> grill_: are you here just to bash the language?
<Radar> Arnvald: snap
<Arnvald> grill_: it can be done
<Arnvald> grill_: there's a method Enumerable#rewind
<Arnvald> you can iterate over a collection and then rewind enumerator to the beginning
<Arnvald> and start iterating again
<Arnvald> all inside the loop
<grill_> wonderful. little life hack here: pretend there's a flaw with a language whenever you're not getting anywhere with a question, and someone will inevitably pop in with a viable solution
<grill_> thanks :)
bronson has joined #ruby
<Ox0dea> grill_: But that wasn't an answer to your question.
<Ox0dea> So you really were just trolling/pretending to be retarded.
<Ox0dea> Oh, dammit. :<
<Ox0dea> I thought you asked about arbitrarily positioning the iterator.
Jet4Fire has joined #ruby
<Ox0dea> Still friends?
<Arnvald> grill_: it comes with a consequence, though, if you use it too often people will consider you a troll and start ignoring you
<Radar> ^
<grill_> true
<Radar> "RUBY SUXXORS"
<grill_> it's sorta a nuclear weapon
<Radar> (p.s. I can / will ban for that)
<grill_> but it's the worst when someone assumes you're not doing something the right way
Azure has joined #ruby
<Yzguy> I don't think that's the assumption, they are trying to understand your problem, and then come up with the best solution for you.
<Ox0dea> grill_: We're just trying to be the Henry Ford to your faster horse. <3
<Ox0dea> Also, I thought you wanted arbitrary positioning. :<
<grill_> i simply need to iterate through an array and reset the index for a specific algorithm
<Ox0dea> grill_: Iterate through the whole array?
<grill_> i do want arbitrary positioning, but this gets me closer to a reasonable solution
<Ox0dea> Aha!
mistym has joined #ruby
<Ox0dea> Why not just maintain an index if that's really what this algorithm calls for?
<grill_> yes. that's the other way to do it
bronson has quit [Ping timeout: 245 seconds]
Azure has quit [Client Quit]
duckpuppy has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
<Ox0dea> I bet there's another if you'd say what you're trying to implement.
mary5030 has quit [Remote host closed the connection]
<grill_> perhaps, but i'm trying to do this on my own for practice purposes
<Ox0dea> Whale, #rewind and repeated calls to #next will get you your faster horse. Godspeed.
Azure has joined #ruby
jgt1 has quit [Ping timeout: 260 seconds]
jhonglim has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
bigmac has joined #ruby
FooMunki has quit [Quit: FooMunki]
duckpuppy has quit [Ping timeout: 246 seconds]
Jet4Fire has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
Bellthoven has joined #ruby
dlitvak has quit [Remote host closed the connection]
CrazyEddy has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
jpfuentes2 has joined #ruby
kfrz has joined #ruby
Bellthoven has quit [Ping timeout: 246 seconds]
dlitvak has joined #ruby
colegatron has quit [Ping timeout: 245 seconds]
<Yzguy> pretty cool, use it to run your tests every time you change file
Jet4Fire has joined #ruby
jpfuentes2 has quit [Ping timeout: 260 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dlitvak has quit [Remote host closed the connection]
jhonglim has quit [Quit: jhonglim]
Jet4Fire has quit [Ping timeout: 260 seconds]
<slash_me> nerium: ^... sorry eregon_ . And anyway, I was scrolled up quite a ways so my mistake all around
dlitvak has joined #ruby
devbug has quit [Ping timeout: 260 seconds]
sucks has quit [Ping timeout: 246 seconds]
<Ox0dea> slash_me: Going for the leaderboard? :)
hotpancakes has quit [Remote host closed the connection]
<slash_me> Ox0dea: fingers crossed
Jet4Fire has joined #ruby
dlitvak has quit [Remote host closed the connection]
moeabdol has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
moeabdol has joined #ruby
lightstalker1 has joined #ruby
krzkrz has joined #ruby
<zacts> is
colegatron has joined #ruby
<Ox0dea> it
<slash_me> in
<Ox0dea> my
<zacts> sorry, typo :-P
<cryocaustik> pants?
<slash_me> you lose!
akem has quit [Ping timeout: 245 seconds]
Bellthoven has joined #ruby
lightstalker has quit [Ping timeout: 260 seconds]
krz has quit [Ping timeout: 260 seconds]
<bigmac> im reading about redis clustering... what does reshard mean in terms of clustering
* jhass looks
<jhass> nope, not #redis
Jet4Fire has quit [Ping timeout: 260 seconds]
<bigmac> oh, thought it was a ruby thing
sucks has joined #ruby
mooe has joined #ruby
<xybre> redis is a redis thing
rgrmatt has joined #ruby
DurstBurger has joined #ruby
<jhass> is this recursion?
<Ox0dea> recurse (v.): to cast a spell a second time.
Jet4Fire has joined #ruby
<grill_> is it possibe to make initialize return some value (e.g. true or false)?
<Ox0dea> Nope.
<grill_> maximum bummer
<Ox0dea> Are you sure?
doublemalt_ has quit [Ping timeout: 245 seconds]
<jhass> Ox0dea: don't take the bait
<Ox0dea> Oh, right.
<grill_> maybe. i have this class that i'd like to simply return some information on initialization
duckpuppy has joined #ruby
<grill_> i guess i can just use getters though
Arnvald has quit [Remote host closed the connection]
doublemalt_ has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
nateberkopec has quit [Quit: Leaving...]
DurstBurger has quit [Ping timeout: 260 seconds]
duckpuppy has quit [Ping timeout: 260 seconds]
<jhass> doesn't sound like it needs to be a class
govg has quit [Ping timeout: 245 seconds]
devbug has joined #ruby
hotpancakes has joined #ruby
krzkrzkrz has joined #ruby
krzkrz has quit [Read error: Connection reset by peer]
Jet4Fire has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
davedev2_ has quit []
ascarter has joined #ruby
hotpancakes has quit [Ping timeout: 260 seconds]
peterhil_ has joined #ruby
TheHackOps has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
govg has joined #ruby
<TheHackOps> Hi, I am just wondering, I have resque-web installed and I wish to use it to see the status of resque which I talk to through PHP
DanKnox is now known as DanKnox[away]
<TheHackOps> I have installed everything, but I have no idea how to start it so I can go to it in my browser
<TheHackOps> Would someone mind explaining how the whole RoR web stuff works
Bellthoven has quit [Ping timeout: 245 seconds]
<TheHackOps> https://github.com/resque/resque-web << Thats the app I am trying to run
hello9 has joined #ruby
peterhil_ has quit [Ping timeout: 245 seconds]
<Radar> TheHackOps: Did you follow https://github.com/resque/resque-web#starting?
<jhass> TheHackOps: create a config.ru with `require "resque_web"; run ResqueWeb::Engine.new` and run rackup or your favorite appserver (puma, unicorn, passenger, thin, whatever else)
<TheHackOps> I am about as new to RoR as a baby born an hour ago
djbkd has quit [Remote host closed the connection]
kfpratt has joined #ruby
kfpratt has quit [Remote host closed the connection]
<TheHackOps> Where do i create this config
<TheHackOps> I am so confused
djbkd has joined #ruby
Jet4Fire has joined #ruby
Bellthoven has joined #ruby
<jhass> TheHackOps: didn't sound like you're using Rails?
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<TheHackOps> jhass, No idea
<jhass> well, if you don't know then how shall I
<TheHackOps> All I know is I want to use this web portal
<Radar> TheHackOps: Did you create a new Rails app?
<TheHackOps> Nope
<jhass> if you do you're in the wrong channel, if not the answer is anywhere
<Radar> ?rails TheHackOps
<ruboto> TheHackOps, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<TheHackOps> Basiaclly I just installed Ruby
<jhass> Radar: my guess is currently 75% not using Rails
<TheHackOps> and now I am trying to get this web portal installed
<xybre> grill_: use a class method like Rails does: Foo.create is generally what I use.
<jhass> TheHackOps: how about you try my suggestion
skcin7 has quit [Ping timeout: 260 seconds]
<Radar> jhass: they don't know where to create the config
<jhass> Radar: I said "anywhere" above
<TheHackOps> jhass, Ok this might sound weird in the context of ruby but why am i creating a new project if I am trying to use an existing one?
djbkd has quit [Ping timeout: 245 seconds]
<TheHackOps> I am a PHP/C# dev in the webstack
<jhass> TheHackOps: I have a doubt, you say you just installed Ruby, how do you run Resque?
Jet4Fire has quit [Ping timeout: 260 seconds]
<TheHackOps> jhass, Not running yet
<TheHackOps> Trying to get something concrete I can look at
<Radar> TheHackOps: Because Resque-web is a Rails engine; it's a "mini-app" which needs to have a parent app to leech off.
<Radar> jhass is suggesting it MIGHT work if you create a config.ru file
<TheHackOps> I see
hello9 has quit [Ping timeout: 245 seconds]
<TheHackOps> Radar, So I should just create a new blank app
<jhass> TheHackOps: if you don't have your resque running yet, running resque-web will be completely useless
tomchapin has joined #ruby
<TheHackOps> and include it?
<Radar> config.ru should include just https://gist.github.com/radar/18cdf7d579fb51cabd60
<Radar> might work with rackup config.ru
<Radar> TheHackOps: yes, that's right
<TheHackOps> hmm
<jhass> TheHackOps: you say this is for a PHP app? are you sure there isn't a PHP based solution?
<jhass> why do you want to write your background jobs in Ruby?
bb010g has joined #ruby
<TheHackOps> jhass, I dont
<TheHackOps> And I am not
chandlerbing has joined #ruby
<TheHackOps> So, let me explain mroe
<jhass> then Resque doesn't do what you think it does
skcin7 has joined #ruby
<TheHackOps> I do
<TheHackOps> it does
<jhass> I don't see how
<TheHackOps> Resque is a job queue, it has a PHP client
<TheHackOps> resque-php
blackmesa has joined #ruby
<TheHackOps> Now, I dont know of a PHP web client so I am trying to use the Ruby one
<jhass> that also comes with a PHP based worker or what?
djbkd has joined #ruby
<TheHackOps> jhass, AFAIK resque-web is just a queue monitor
kfrz has quit [Quit: Leaving.]
<TheHackOps> First
Jet4Fire has joined #ruby
<jhass> oh well
djbkd has quit [Client Quit]
<jhass> should've copied Sidekiq instead
<TheHackOps> I am thinking about removing all this stuff from my server
<TheHackOps> Its all getting way to complex
<jhass> anyway, my suggestion which Radar repeated still applies then
rgrmatt has quit [Remote host closed the connection]
<xybre> jhass: since when has PHP done the sensible thing?
kfrz has joined #ruby
<jhass> xybre: since 200 years in the future, maybe
<TheHackOps> Lol
<TheHackOps> Ruby bashing on PHP
<TheHackOps> Seems legit
<jhass> what did you expect
krzkrzkrz has quit [Read error: Connection reset by peer]
<TheHackOps> meh this is not my place, I am a guest so I am not going to start shit talking
<Radar> TheHackOps: Did you try following our instructions yet?
<TheHackOps> No, they dont rly make sense to a noob like me
<TheHackOps> I am still strongly in the wrong mindset
<TheHackOps> for Ruby stuff
<TheHackOps> I think
krzkrzkrz has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Radar> Which part of "create a file with these contents" and "then run this command" is hard to follow?
<Radar> Command: rackup config.ru
<TheHackOps> Radar, The fact that I have no idea where to run it
<TheHackOps> Like
<TheHackOps> Wait that makes me sound retarded
<jhass> it doesn't matter
blackmesa has quit [Ping timeout: 246 seconds]
<Radar> TheHackOps: create a new file called "config.ru" literally anywhere
<TheHackOps> Ok
<Radar> then run the command "rackup config.ru" in that same directory
<Radar> There is no step 3
<Radar> only profit
<TheHackOps> Radar, Ok
<TheHackOps> I will
Jet4Fire has quit [Ping timeout: 246 seconds]
chandlerbing has quit [Quit: chandlerbing]
<TheHackOps> configuration /home/phantom/Resque-server/config.ru not found
<TheHackOps> when I run that
mary5030 has joined #ruby
<TheHackOps> Ah
<TheHackOps> I see what you mean
<Radar> great.
<TheHackOps> touch config.ru
<TheHackOps> I would assume its something like composer init
<TheHackOps> my bad
yeticry has quit [Ping timeout: 246 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kobain has quit [Ping timeout: 240 seconds]
yeticry has joined #ruby
sucks has quit [Ping timeout: 260 seconds]
sucks has joined #ruby
<TheHackOps> Radar, `to_app': missing run or map statement (RuntimeError)
hello9 has joined #ruby
<Radar> TheHackOps: I can't fucking believe it.
<Radar> Did you really just touch the file and not add anything to it?
<Radar> DESPITE being _repeatedly_ told to add contents to the file?
* Radar 's mouth is hanging open
<jhass> yeah, are you drunk or something?
mary5030 has quit [Ping timeout: 246 seconds]
Jet4Fire has joined #ruby
<TheHackOps> err no
<TheHackOps> You guys dont know how different this whole eco system is
<TheHackOps> to every other system
lele has quit [Ping timeout: 264 seconds]
<Radar> TheHackOps: I don't understand how creating a file in ruby and putting things in it is different to creating a file in PHP and putting things in it
<Radar> TheHackOps: Please explain to me the differences between these two actions.
<TheHackOps> Radar, You didnt even tell me what the file does
<TheHackOps> but
<Radar> omg
<TheHackOps> I assume its a composer.json like file
<TheHackOps> right?
<Radar> [14:51:55] <Radar>Contents: https://gist.github.com/radar/18cdf7d579fb51cabd60
<jhass> 04:37 <jhass> TheHackOps: create a config.ru with `require "resque_web"; run ResqueWeb::Engine.new` and run rackup
<jhass> it was the first thing I said
favadi has joined #ruby
<TheHackOps> In PHP there is no concept of subapps
<jhass> !mute TheHackOps
<jhass> ?logs
<ruboto> You can find a log of this channel at http://irclog.whitequark.org/ruby/
<Radar> Sigh.
<Radar> Looks like he needs to actually create a Rails app anyway because
<jhass> You have 30 minutes to reread our conversation and try to understand things
supermarin has joined #ruby
<Radar> "uninitialized constant FormErrorsHelper::ActionView (NameError)"
<Radar> ?rails TheHackOps
<ruboto> TheHackOps, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
lele has joined #ruby
<jhass> Radar: it's pretty sad that they make it that dependent on rails
Jet4Fire has quit [Ping timeout: 245 seconds]
<Radar> jhass: definitely
<Radar> jhass: Probably because they've assumed
<Radar> hooray for spawning another "Ruby is full of elitist jerks!" story
<xybre> They still haven't /join'd #rubyonrails either.
<Radar> mhm
<Radar> Must be working out how to do that.
<xybre> And yes we know how different the ecosystem is, most of us do things other than Ruby.
braincrash has quit [Quit: bye bye]
colegatron has joined #ruby
<jhass> !unmute TheHackOps
<grill_> what's the best way to take a string (e.g. "1 2 3 4"), pull out all the numbers, and place each in an array?
<jhass> &ri String#split
<`derpy> method `String#split`: Divides str into substrings based on a delimiter, returning an array of these su… • http://rubydoc.info/stdlib/core/String#split-instance_method
<grill_> rather, is there a one-liner op for it
hotpancakes has joined #ruby
rsc___ has quit [Quit: rsc___]
<grill_> that method would work unless someone screws up the input (e.g. "1,2,3,4" instead of "1 2 3 4"), correct?
Jet4Fire has joined #ruby
Rickmasta has joined #ruby
<jhass> ?try
<ruboto> Why don't you try it and see for yourself?
<grill_> sigh. what's that commandline ruby interpreter?
<jhass> irb
<jhass> but
<jhass> ?pry
<ruboto> Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
<sorbo_> pry++
<xybre> <3 pry
djbkd has joined #ruby
rsc___ has joined #ruby
fly5566 has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 246 seconds]
cryocaustik has quit [Quit: went to chop soup]
braincrash has joined #ruby
jbrhbr has joined #ruby
<grill_> <3 answer #2
Jet4Fire has quit [Ping timeout: 260 seconds]
<grill_> *comment #2
krzkrzkrz has quit [Ping timeout: 246 seconds]
sarkis has quit [Ping timeout: 264 seconds]
<diegoviola> pry is cool
<jhass> grill_: you can link to specific answers
<grill_> first comment on the question
kies has quit [Ping timeout: 260 seconds]
nixmaniack has joined #ruby
nixmaniack has joined #ruby
jgt1 has joined #ruby
chandlerbing has joined #ruby
hotpancakes has joined #ruby
sneakerhax has joined #ruby
DanKnox[away] is now known as DanKnox
DurstBurger has joined #ruby
framlinqp has quit [Ping timeout: 245 seconds]
hotpancakes has quit [Read error: Connection reset by peer]
Bellthoven has quit [Ping timeout: 245 seconds]
nixmaniack has quit [Remote host closed the connection]
nateberkopec has joined #ruby
DurstBurger has quit [Ping timeout: 245 seconds]
jbrhbr has quit [Quit: Leaving.]
nixmaniack has joined #ruby
Bellthoven has joined #ruby
hxegon has joined #ruby
crdpink has joined #ruby
sorbo_ has quit []
crdpink2 has quit [Ping timeout: 260 seconds]
vikas027 has quit [Read error: Connection reset by peer]
RegulationD has quit [Remote host closed the connection]
<hxegon> Anyone know how to make this display the joined list in erb? https://gist.github.com/anonymous/a2c97d11a3e4a659ebc3
WizJin has joined #ruby
<Radar> ?rails hxegon
<ruboto> hxegon, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<xybre> >> [1,2,3].join(",")
<ruboto> xybre # => "1,2,3" (https://eval.in/481157)
<jhass> hxegon: move the = to the first <%
<hxegon> Radar: not a rails question
Xeago has joined #ruby
<Radar> hxegon: Sorry. Typically ERB questions are Rails questions.
<hxegon> Radar: not in this case :)
<Radar> hxegon: you're a unique and beautiful snowflake
gix has quit [Ping timeout: 246 seconds]
<hxegon> jhass: still getting an error here
peterhil_ has joined #ruby
<hxegon> one sec
nateberkopec has quit [Ping timeout: 245 seconds]
stannard has quit [Remote host closed the connection]
lightstalker1 is now known as lightstalker
nofxx has quit [Ping timeout: 260 seconds]
tjad has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
htmldrum has joined #ruby
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
supermarin has quit [Remote host closed the connection]
paradisaeidae has joined #ruby
gix has joined #ruby
dlitvak has joined #ruby
supermarin has joined #ruby
peterhil_ has quit [Ping timeout: 260 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xcesariox has joined #ruby
nixmaniack has quit [Remote host closed the connection]
agent_white has joined #ruby
sucks has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nixmaniack has joined #ruby
bronson has joined #ruby
chandlerbing has quit []
howdoi has joined #ruby
dlitvak has quit [Ping timeout: 246 seconds]
<Ox0dea> >> //.method(:!~).owner # grill_
<ruboto> Ox0dea # => Kernel (https://eval.in/481164)
<Ox0dea> Regexp#!~ is still "not documented" under Regexp, but that "makes sense".
nixmaniack has quit [Ping timeout: 246 seconds]
bronson has quit [Ping timeout: 245 seconds]
supermarin has quit [Read error: Connection reset by peer]
elton has joined #ruby
supermar_ has joined #ruby
juddey has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rsc___ has quit [Quit: rsc___]
Rickmasta has joined #ruby
blackmesa has joined #ruby
rgrmatt has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
Xeago has quit [Remote host closed the connection]
jetpackjoe has joined #ruby
skweek has joined #ruby
Xeago has joined #ruby
jpfuentes2 has joined #ruby
rgrmatt has quit [Ping timeout: 260 seconds]
elton has quit [Remote host closed the connection]
elton has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
Yzguy has quit [Quit: Zzz...]
kies has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
jpfuentes2 has quit [Ping timeout: 245 seconds]
iateadonut has quit [Ping timeout: 260 seconds]
pyoor has quit [Ping timeout: 246 seconds]
iateadonut has joined #ruby
pyoor has joined #ruby
saneax_AFK is now known as saneax
Xeago has quit [Ping timeout: 260 seconds]
Bellthoven has quit [Ping timeout: 260 seconds]
wheresmyjetpack has joined #ruby
wheresmyjetpack has quit [Client Quit]
youch has joined #ruby
m3_del has quit [Remote host closed the connection]
grill_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
doublemalt_ has quit [Ping timeout: 245 seconds]
pdoherty has quit [Remote host closed the connection]
ascarter has joined #ruby
pdoherty has joined #ruby
grill_ has joined #ruby
skcin7 has quit [Ping timeout: 245 seconds]
DurstBurger has joined #ruby
darkf has joined #ruby
doublemalt_ has joined #ruby
skcin7 has joined #ruby
Bellthoven has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
skcin7 has quit [Max SendQ exceeded]
diegoviola has quit [Quit: WeeChat 1.3]
grill_ has quit [Ping timeout: 260 seconds]
DurstBurger has quit [Ping timeout: 245 seconds]
nateberkopec has joined #ruby
rsc___ has joined #ruby
astrobunny has joined #ruby
arescorpio has quit [Quit: Leaving.]
peterhil_ has joined #ruby
tildes has joined #ruby
nateberkopec has quit [Ping timeout: 260 seconds]
rsc___ has quit [Client Quit]
rsc___ has joined #ruby
grill_ has joined #ruby
ur5us has quit [Remote host closed the connection]
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Quit: Leaving...]
houhoulis has quit [Remote host closed the connection]
peterhil_ has quit [Ping timeout: 260 seconds]
stannard has joined #ruby
grill_ has quit [Ping timeout: 246 seconds]
berserk_ren has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stannard has quit [Ping timeout: 260 seconds]
Insti has quit [Ping timeout: 260 seconds]
Insti has joined #ruby
PaulCapestany has quit [Quit: .]
<droptone> Here's a question for you Ruby experts: I need to encrypt the contents of a directory via my Ruby app.
<droptone> Any thoughts on that? Should I just call an external application? My host OS is Centos 7.x
PaulCapestany has joined #ruby
PaulCapestany has quit [Client Quit]
CloCkWeRX has quit [Ping timeout: 260 seconds]
Trynemjoel has quit [Ping timeout: 264 seconds]
Mon_Ouie has joined #ruby
<xybre> droptone: what are you doing with the directory?
shinenelson has joined #ruby
berserk_ren has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
igor_ has joined #ruby
Trynemjoel has joined #ruby
igor_ is now known as hackmathics
favadi has joined #ruby
PaulCapestany has joined #ruby
<droptone> xybre: I need to A) check to see if a series of files in a directory are encrypted, if so, B) decrypt, C) write changes to them, then D) re-encrypt.
<droptone> Normally, on my home machine, I leverage a TrueCrypt container, but of course that's not applicable here.
<droptone> As far as what I'm doing, I'm storing sensitive content to them, hence the need for encryption.
jetpackjoe has joined #ruby
<xybre> So you only want them decrypted in memory, not on disk.
blackmesa has quit [Ping timeout: 245 seconds]
<droptone> Looks like ccrypt might be a proper solution, it leverages the Rijndael cypher.
christia_ has quit [Remote host closed the connection]
<xybre> Why not just mount your TrueCrypt container?
djbkd has quit [Quit: Leaving...]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
hxegon has quit [Ping timeout: 245 seconds]
<droptone> The guys in #linux are recommended using 7z to both encrypt and compress the files, that's good.
skweek has joined #ruby
<droptone> xybre: That container exists on my local machine, not on this remote host.
christiandsg has joined #ruby
grill_ has joined #ruby
CloCkWeRX has joined #ruby
<xybre> Yeah, I mean a specific truecrypt container for the files you're talking about.
WizJin has quit [Excess Flood]
Ox0dea has quit [Quit: WeeChat 1.4-dev]
Bellthoven has quit [Ping timeout: 260 seconds]
christiandsg has quit [Read error: Connection reset by peer]
Channel6 has joined #ruby
WizJin has joined #ruby
finisherr has quit [Quit: finisherr]
grill_ has quit [Ping timeout: 245 seconds]
krzkrzkrz has joined #ruby
nerium has quit [Quit: nerium]
djbkd has joined #ruby
<xybre> also this might be relevant: https://rubygems.org/gems/coy
lurch_ has joined #ruby
<droptone> xybre: Very nice, thank you.
supermar_ has quit [Remote host closed the connection]
nerium has joined #ruby
s00pcan has quit [Remote host closed the connection]
<droptone> Has this project been abaonded?
<xybre> Not sure
Wsewolod has quit [Ping timeout: 260 seconds]
christiandsg has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
hello9 has quit [Quit: Leaving]
Ox0dea has joined #ruby
Gnut has joined #ruby
paradisaeidae has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
grill_ has joined #ruby
finisherr has joined #ruby
bronson has joined #ruby
solocshaw has quit [Ping timeout: 260 seconds]
solocshaw has joined #ruby
grill_ has quit [Ping timeout: 260 seconds]
tildes has quit [Ping timeout: 245 seconds]
DurstBurger has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
christiandsg has quit [Remote host closed the connection]
hotpancakes has quit []
makenoise has joined #ruby
DurstBurger has quit [Ping timeout: 245 seconds]
jessemcgilallen has joined #ruby
nateberkopec has joined #ruby
grill_ has joined #ruby
DavidDudson has joined #ruby
makenoise has quit [Remote host closed the connection]
makenoise has joined #ruby
Bellthoven has joined #ruby
Arnvald has joined #ruby
grill_ has quit [Ping timeout: 260 seconds]
nateberkopec has quit [Ping timeout: 245 seconds]
peterhil_ has joined #ruby
toy has joined #ruby
timonv has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
graffix222 has quit [Ping timeout: 260 seconds]
krzkrzkrz has quit [Ping timeout: 264 seconds]
supermarin has joined #ruby
makenoise has quit [Remote host closed the connection]
peterhil_ has quit [Ping timeout: 245 seconds]
makenoise has joined #ruby
jetpackjoe has joined #ruby
ta has quit [Remote host closed the connection]
supermarin has quit [Remote host closed the connection]
jbrhbr has joined #ruby
jbrhbr has quit [Client Quit]
devbug has quit [Ping timeout: 246 seconds]
hackmathics has quit [Remote host closed the connection]
trautwein has joined #ruby
grill_ has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<droptone> What's the best method to run an external command within a Ruby script? %x, exec, or system?
makenoise has quit []
<Mon_Ouie> Those all serve completely different purposes
<apeiros> "best"?
<apeiros> ?best droptone
<ruboto> droptone, "Best" and "better" are subjective. Try to use a different term.
<droptone> "Most appropriate"
<droptone> It's all good, I got it.
<droptone> I'm using %x because it returns the result of the command.
<droptone> It appears exec() halts the existing process and replaces it
<apeiros> you realize that that wasn't any more telling? :)
<droptone> I'm good, thank you though.
grill_ has quit [Ping timeout: 260 seconds]
<droptone> I'll be more specific next time.
<apeiros> it's more for future question of yours
<droptone> Yes, I just hang out here a lot so sometimes I just freestyle it.
<apeiros> and I think ?best needs a rewording. merely changing the term usually won't help.
<droptone> I try to keep it to #ruby-offtopic but every so often it slips out here, and then I promptly regret it.
<droptone> In #ruby-offtopic I'm addicted to hangman.
<apeiros> !fact ed best "better" and "best" depend entirely on your context. Try to describe what quality would make one thing better than the other.
<ruboto> apeiros, I stand corrected that best is "better" and "best" depend entirely on your context. Try to describe what quality would make one thing better than the other.
<droptone> lol
<droptone> The bot stands corrected!
<Ox0dea> droptone: `foo` > %x(foo)
<Ox0dea> The former does the same but uses more conventional orthography.
rgrmatt has joined #ruby
xcesariox has quit [Read error: Connection reset by peer]
cornerma1 has joined #ruby
<droptone> Here's a specific question: The syntax of %x, is it simply %x(mkdir test)?
<droptone> I realize I can use Dir.mkdir, it's just an example.
rsc___ has quit [Quit: rsc___]
<Ox0dea> Yes?
<apeiros> yes
<droptone> I'm having trouble finding specific examples online.
<droptone> Thank you.
govg has quit [Ping timeout: 260 seconds]
<droptone> apeiros: Thank you.
<Ox0dea> But you can use all sorts of delimiters for percent strings.
<apeiros> `mkdir test` == %x(mkdir test) == %x/mkdir test/ == %x|mkdir test| # or whatever other delimiter
Mon_Ouie has quit [Ping timeout: 260 seconds]
<droptone> ahh, thank you.
<Ox0dea> Read: avoid %x.
tjad has quit [Ping timeout: 246 seconds]
auzty has joined #ruby
<apeiros> IMO you shouldn't use %x with variable substitution
<droptone> So, while %x would work, it's preferred to use another option, such as backticks?
hackmathics has joined #ruby
<Ox0dea> That's ultimately your prerogative, but you've been given sufficient material to make the right choice. :P
cornerman has quit [Ping timeout: 246 seconds]
nbdy has joined #ruby
cornerma1 is now known as cornerman
blackmesa has joined #ruby
jpfuentes2 has joined #ruby
christiandsg has joined #ruby
* xybre prefers %x(), partially because backticks are bad in *sh, cultivating good habits and all
<droptone> lol, heavens Ox0.
Mon_Ouie has joined #ruby
<droptone> xybre: Thank you.
Fridtjof has quit [Ping timeout: 264 seconds]
Channel6 has quit [Read error: Connection reset by peer]
krzkrzkrz has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
<apeiros> droptone: %x *is* backticks
nixmaniack has joined #ruby
Guest39588 is now known as awk
rgrmatt has quit [Ping timeout: 260 seconds]
tagrudev has joined #ruby
<droptone> Right, I understand that, but Ox0 said "Read: avoid %x()"
<xybre> They are equivilent in Ruby.
<droptone> So that implies that I should avoid using %x() specifically.
<apeiros> they aren't just equivalent. they're literally the same thing.
grill_ has joined #ruby
<apeiros> well, apart of the apparently different sigils.
<Ox0dea> %x literally invokes Kernel#`.
skweek has quit [Ping timeout: 245 seconds]
<Ox0dea> >> def `(*); 42; end; %x(1 2 3)
<ruboto> Ox0dea # => 42 (https://eval.in/481233)
<Ox0dea> Holy shit, Ruby.
Pupp3tm4st3r has joined #ruby
<xybre> And that's why we love it.
<Ox0dea> <3 <3 <3
<droptone> haha
nerium has quit [Quit: nerium]
jpfuentes2 has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
<xybre> I kinda wish there was a %X and a %x to match the %q and %Q syntax though.
<Ox0dea> droptone: For why I'm not the biggest fan of %x: http://idiosyncratic-ruby.com/15-207-ways-to-rome.html#percent-syntax-q
blackmesa has quit [Ping timeout: 245 seconds]
<apeiros> %x & ` compile to literally the same instruction sequence :)
<Ox0dea> droptone: All 66 can just as well be used for %x.
grill_ has quit [Ping timeout: 260 seconds]
Yzguy has joined #ruby
Yzguy has quit [Client Quit]
<Ox0dea> Ah, make that 67, since space (!) is valid for %x.
<droptone> Ox0: Thank you.
<xybre> They're still different to the compiler. %x does brcket matching, while backtick does not.
<Ox0dea> xybre: That's parsing, not compilation.
<xybre> >> %x{echo "{}"}
<ruboto> xybre # => (https://eval.in/481237)
KnownSyntax_ is now known as KnownSyntax
<xybre> Yes, parsing.
CrazyEddy has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<xybre> >> %x{echo {}}
<ruboto> xybre # => (https://eval.in/481238)
<Ox0dea> xybre: Please check the link.
<xybre> Ah can't do syscall, ah well.
nerium has joined #ruby
kfrz has quit [Quit: Leaving.]
solars has joined #ruby
codecop has joined #ruby
rsc___ has joined #ruby
grill_ has joined #ruby
hahuang61 has quit [Ping timeout: 264 seconds]
Gnut has quit [Ping timeout: 260 seconds]
devbug has joined #ruby
grill_ has quit [Ping timeout: 260 seconds]
ta has joined #ruby
WizJin has quit [Excess Flood]
jessemcgilallen has quit [Quit: jessemcgilallen]
CrazyEddy has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 260 seconds]
christiandsg has quit [Remote host closed the connection]
nerium has quit [Quit: nerium]
christiandsg has joined #ruby
jessemcgilallen has joined #ruby
devbug has quit [Ping timeout: 260 seconds]
jessemcgilallen has quit [Read error: Connection reset by peer]
tjad has joined #ruby
elton has quit [Read error: Connection reset by peer]
devbug has joined #ruby
Gnut has joined #ruby
elton has joined #ruby
WizJin has joined #ruby
bronson has quit [Remote host closed the connection]
DurstBurger has joined #ruby
CrazyEddy has joined #ruby
grill_ has joined #ruby
ta has quit [Remote host closed the connection]
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rsc___ has quit [Quit: rsc___]
davedev24 has joined #ruby
DurstBurger has quit [Ping timeout: 246 seconds]
davedev24 has quit [Client Quit]
bb010g has quit [Quit: Connection closed for inactivity]
grill_ has quit [Ping timeout: 260 seconds]
nateberkopec has joined #ruby
jetpackjoe has joined #ruby
EllisTAA has joined #ruby
<flughafen> morning guys
<blub> hi flughafen
<flughafen> huhu blub!
Lap64 has joined #ruby
<Lap64> hello all
<EllisTAA> when i try to scrape this website for links, it doesn’t return any of the imgs, i was thinking that maybe the imgs get loaded in after the page loads … could someone tell me if they think this is what’s happening http://grid.vsco.co/grid/3433
<Lap64> i have written a script which was find content for me using google api
<Lap64> its was running fine till few days back but now suddenly it stopped running and the error i am getting is Network is unreachable - connect(2) for "ajax.googleapis.com" port 80 (Curl::Err::HttpError)
<Lap64> what does this mean ?
<Lap64> can someone please help
<flughafen> shevy: i'm going to install opensuse leap, if i'm not back within 2 hours, make someting take off and search for me !
<Ox0dea> Lap64: It's likely they banned you by one means or another.
yardenbar has joined #ruby
nateberkopec has quit [Ping timeout: 245 seconds]
<Ox0dea> ellistaa: `curl http://grid.vsco.co/grid/3433 | grep img` is indeed silent.
vondruch has quit [Ping timeout: 245 seconds]
<EllisTAA> Ox0dea: meaning it is probably getting loaded after the page gets loaded?
<Lap64> Ox0dea, how t ocheck if i am banned ?
<Ox0dea> Lap64: Try from another IP address?
<Ox0dea> ellistaa: Yep.
Fridtjof has joined #ruby
Gnut has quit [Ping timeout: 246 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
<EllisTAA> Ox0dea: thanks
grill_ has joined #ruby
<Lap64> Ox0dea, there is no way to check from this server that ip is banned ?
<shevy> flughafen kk
Cantaberry has quit [Ping timeout: 260 seconds]
EllisTAA has quit [Quit: ellistaa]
<shevy> flughafen could be worse, could be flughafen-downed-via-bluescreen-of-death
<flughafen> haha.
<Ox0dea> Lap64: Unless you're using an API that was very recently discontinued, that error messages suffices to indicate that you've tripped some flag and been denied access.
<Ox0dea> *message
<Ox0dea> Lap64: That you're not expressing indignation at the mere suggestion indicates you might have some inkling as to why this might've happened. :P
<Lap64> Ox0dea, there might be two things
<Ox0dea> Lap64: Did you go Sahnic fast with your requests?
<Lap64> Ox0dea, 1. the API has changed some flags 2.I might have abused something and IP got blocked lols
poguez_ has joined #ruby
<Ox0dea> Lap64: Aye, I'd reckon on the latter.
<Lap64> Ox0dea, umm well it was working fine since ast 1 year and i was following the guidelines but still
<Lap64> you never know
<Lap64> bleh
<Ox0dea> I'm sure it's an automated thing, but that's not to say you violated some zero-tolerance policy either.
grill_ has quit [Ping timeout: 260 seconds]
<flughafen> l8r!
djbkd has quit [Remote host closed the connection]
<Ox0dea> flughafen: Do you actually use SUSE?
<flughafen> Ox0dea: yes... ?
<Ox0dea> Oh.
<flughafen> lol. why Ox0dea
<Ox0dea> Just wondering.
<Ox0dea> How come?
<flughafen> hehe. i work for SUSE Ox0dea
<Ox0dea> I see.
<Ox0dea> Just dogfooding, then?
DurstBurger has joined #ruby
<flughafen> haha, it's decent. I'd probably be on archlinux
christiandsg has quit [Remote host closed the connection]
<flughafen> but we'll see about leap, as it's uses a lot of sles stuff
Symbiosisz has quit [Ping timeout: 245 seconds]
jbrhbr has joined #ruby
ur5us has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nofxx has quit [Ping timeout: 260 seconds]
<flughafen> plus i think zypper is a great package management tool
Bellthoven has quit [Ping timeout: 245 seconds]
grill_ has joined #ruby
flughafen has quit [Remote host closed the connection]
sandstrom has joined #ruby
bigkevmcd has joined #ruby
sandstrom has quit [Client Quit]
<shevy> I hated suse
Macaveli has joined #ruby
ta has joined #ruby
<shevy> I approve that they rewrote yast in ruby though
Lap64 has quit [Quit: Leaving]
ta has quit [Remote host closed the connection]
ta has joined #ruby
grill_ has quit [Ping timeout: 260 seconds]
<shevy> huh
<shevy> so they deprecated autoload?
nixmaniack has quit [Remote host closed the connection]
<Ox0dea> Ish.
nixmaniack has joined #ruby
<shevy> "passing a pre-frozen string"
<shevy> we got the iceage coming
rsc___ has joined #ruby
blackmesa has joined #ruby
<shevy> "(and maybe autoload will be removed entirely by matz)"
<shevy> hmm
yfeldblum has joined #ruby
krzkrzkrz has quit [Read error: Connection reset by peer]
krzkrzkrz has joined #ruby
Bloomer has joined #ruby
jetpackjoe has joined #ruby
quazimodo has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 246 seconds]
jgt1 has quit [Ping timeout: 246 seconds]
zotherstupidguy has quit [Ping timeout: 260 seconds]
grill_ has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
TheBloke has quit [Read error: Connection reset by peer]
zotherstupidguy has joined #ruby
ohaibbq has quit [Quit: Leaving...]
grill_ has quit [Ping timeout: 260 seconds]
Bellthoven has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.3]
maloik has joined #ruby
aganov has joined #ruby
vondruch has joined #ruby
TheBloke has joined #ruby
moeabdol has quit [Ping timeout: 246 seconds]
jas02 has joined #ruby
SCHAAP137 has joined #ruby
symm- has joined #ruby
<Cork> anyone know how to catch stderr errors from Shell command execution?
sandstrom has joined #ruby
grill_ has joined #ruby
<shevy> result = `ls 2>&1` respectively the other shell redirections
vondruch has quit [Quit: Ex-Chat]
vondruch has joined #ruby
Bloomer has quit []
<Cork> and preferably i want to catch the problem not mix it into the normal text
devgiant has joined #ruby
Snowy has joined #ruby
devgiant has quit [Read error: Connection reset by peer]
<apeiros> Cork: use spawn
<apeiros> you can let it use different IOs for stdout and stderr
<Cork> apeiros: i need the functionality of Shell.install_system_commands (for code readability)
SenpaiSilver_ has quit [Quit: Leaving]
<Cork> this is going to be a series of calls
<apeiros> Cork: then read its docs. either it offers the feature or you can't.
dhjondoh has joined #ruby
bronson has joined #ruby
<Cork> the docs is close to none existent :/
<apeiros> well, then use the source, luke
grill_ has quit [Ping timeout: 260 seconds]
Bellthoven has quit [Ping timeout: 260 seconds]
<Cork> how is the source going to help me?
<apeiros> if you have to ask that, then it probably won't help you.
Hounddog has joined #ruby
devoldmx has quit [Remote host closed the connection]
<apeiros> in other words: consider it not possible to catch stderr output via Shell.install_system_commands.
dhjondoh has quit [Client Quit]
<Ox0dea> >> Regexp.union
<ruboto> Ox0dea # => /(?!)/ (https://eval.in/481292)
<Ox0dea> That output = my response.
<Ox0dea> Why not just //?
<apeiros> they don't match the same.
<apeiros> /(?!)/ essentially matches nothing
<apeiros> whereas // matches everything
mikecmpbll has joined #ruby
<apeiros> polar opposites, so to say :)
dhjondoh has joined #ruby
zast has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 245 seconds]
Bellthoven has joined #ruby
elton has quit []
vondruch has quit [Quit: Ex-Chat]
<Ox0dea> Well, I think it looks like a pirate with a hook for an eye swimming for shore.
blackms has joined #ruby
<apeiros> lolwut? :D
flughafen has joined #ruby
quazimodo has joined #ruby
<Ox0dea> It's right there, plain as day.
vondruch has joined #ruby
* apeiros looks out the window
<apeiros> that might actually be an apt description today…
<Ox0dea> Slashes for arms, parens for head, the ! is like a scar eye or something, and the ? is the hook.
<apeiros> (fog, foggy fog fog)
ap4y has quit [Remote host closed the connection]
<Ox0dea> apeiros: Heh, I was going to specify "non-European".
nateberkopec has joined #ruby
<Ox0dea> apeiros: I've been waiting for a "something = nothing" quip to arrive, but it ain't comin'. Explanation makes perfect sense, thanks.
<apeiros> I'm not equipped for quipping, so no quips for you today, sorry.
<flughafen> apeiros sounds broken without any quips
shout-user60 has quit [Quit: Bye!]
skade has joined #ruby
<shevy> apropos broken ... how's the flughafen in Berlin
<shevy> and did you install suse finally?
nateberkopec has quit [Ping timeout: 245 seconds]
jbrhbr has quit [Quit: Leaving.]
peterhil_ has joined #ruby
Bellthoven has quit [Ping timeout: 260 seconds]
joonty has joined #ruby
ZeeNoodley is now known as kspencer
Blaguvest has quit [Remote host closed the connection]
nettoweb has joined #ruby
marr has joined #ruby
brunto has joined #ruby
dimik has quit [Ping timeout: 246 seconds]
peterhil_ has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Symbiosisz has joined #ruby
Bellthoven has joined #ruby
<flughafen> yesh, i installed leap, but i'm still configuring, i'm switching from xmonad -> i3
quazimodo has quit [Read error: Connection reset by peer]
dhjondoh has quit [Remote host closed the connection]
dhjondoh has joined #ruby
Macaveli has joined #ruby
peterhil_ has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomyWork has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
jetpackjoe has joined #ruby
peterhil_ has quit [Ping timeout: 245 seconds]
mikecmpbll has joined #ruby
blackmesa has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> so crazy
<shevy> we are in the day and age of fat DEs!
Bellthoven has quit [Ping timeout: 260 seconds]
<blub> hi shevy
<shevy> yo blubster
<flughafen> blub blub blub
krzkrzkrz has quit [Ping timeout: 246 seconds]
mikecmpbll has quit [Client Quit]
krzkrzkrz has joined #ruby
quazimodo has joined #ruby
<apeiros> ?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 topics. Thanks!
Rumbles has joined #ruby
edwinvdgraaf has joined #ruby
jpfuentes2 has joined #ruby
krzkrzkrz has quit [Read error: Connection reset by peer]
krzkrzkrz has joined #ruby
<adaedra> Hello
mark4 has joined #ruby
ELLIOTTCABLE has quit [Read error: Connection reset by peer]
tesuji has joined #ruby
tvw has joined #ruby
jpfuentes2 has quit [Ping timeout: 260 seconds]
DurstBurger has quit [Ping timeout: 246 seconds]
ELLIOTTCABLE has joined #ruby
VaibhavRajput has joined #ruby
rsc___ has quit [Quit: rsc___]
VaibhavRajput has left #ruby [#ruby]
moty66 has quit [Quit: Sto andando via]
mikecmpbll has joined #ruby
meatchicken has joined #ruby
jgt1 has joined #ruby
Bloomer has joined #ruby
Bellthoven has joined #ruby
Edward__ has quit [Ping timeout: 246 seconds]
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lacrosse has quit [Ping timeout: 264 seconds]
Macaveli has joined #ruby
lacrosse has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
Macaveli has quit [Client Quit]
nettoweb has quit [Quit: Textual IRC Client: www.textualapp.com]
htmldrum has quit [Ping timeout: 246 seconds]
mistym has quit [Ping timeout: 264 seconds]
rsc___ has joined #ruby
mistym has joined #ruby
mistym has quit [Changing host]
mistym has joined #ruby
rsc___ has quit [Client Quit]
dhjondoh has quit [Remote host closed the connection]
dhjondoh has joined #ruby
DanKnox is now known as DanKnox[away]
blackmesa has joined #ruby
AlphaAtom has joined #ruby
ponga has joined #ruby
kaka is now known as M4l4
anisha has joined #ruby
bronson has joined #ruby
devoldmx has joined #ruby
Macaveli has joined #ruby
M4l4 has quit [Ping timeout: 246 seconds]
Bellthoven has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 245 seconds]
M4l4 has joined #ruby
futilegames has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
nateberkopec has joined #ruby
meatchicken has quit [Read error: Connection reset by peer]
dmolina has joined #ruby
Bellthoven has joined #ruby
quazimodo has quit [Ping timeout: 245 seconds]
FooMunki has joined #ruby
nateberkopec has quit [Ping timeout: 245 seconds]
mistym has quit [Ping timeout: 264 seconds]
mistym has joined #ruby
mistym has quit [Changing host]
mistym has joined #ruby
beast has joined #ruby
timonv has quit [Quit: WeeChat 1.3]
frog0909 has joined #ruby
timonv has joined #ruby
ur5us has quit [Remote host closed the connection]
frog0909_ has quit [Ping timeout: 246 seconds]
peterhil_ has joined #ruby
quazimodo has joined #ruby
Jet4Fire has joined #ruby
<Jet4Fire> hi guys
<apeiros> hi girl
bakedb has joined #ruby
<flughafen> hi Jet4Fire
<flughafen> is ee estonia?
<Jet4Fire> yep
auzty has quit [Ping timeout: 245 seconds]
<flughafen> sweet!
<gregf_> haha
hackmathics has quit [Remote host closed the connection]
<gregf_> oops . wrong chat :/
<adaedra> Because we're not funny?
puria has joined #ruby
VaibhavRajput has joined #ruby
vle__ has joined #ruby
vle__ has quit [Ping timeout: 252 seconds]
<apeiros> #serious-ruby
M4l4 has quit [Ping timeout: 246 seconds]
colegatron has quit [Ping timeout: 260 seconds]
pandaant has joined #ruby
vle has joined #ruby
VaibhavRajput has left #ruby [#ruby]
<shevy> anyone has a good use case for TracePoint ?
devbug has quit [Ping timeout: 264 seconds]
rsc___ has joined #ruby
M4l4 has joined #ruby
<apeiros> debugging?
dionysus69 has joined #ruby
mikecmpbll has quit [Ping timeout: 246 seconds]
vle has quit [Quit: leaving]
waka has joined #ruby
kfrz has joined #ruby
<shevy> dunno yet, just noticed it from this here: https://bugs.ruby-lang.org/issues/11777 TracePoint.new(:raise)
<shevy> at first I thought it had to do with set_trace_var
kfrz has quit [Client Quit]
armyriad has joined #ruby
dhjondoh has quit [Remote host closed the connection]
DanKnox[away] is now known as DanKnox
dhjondoh has joined #ruby
rodfersou has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
waka has quit [Remote host closed the connection]
dhjondoh has quit [Remote host closed the connection]
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
M4l4 has quit [Ping timeout: 246 seconds]
graffix222 has joined #ruby
baweaver has joined #ruby
dhjondoh has joined #ruby
sepp2k has joined #ruby
platzhirsch has joined #ruby
colegatron has joined #ruby
M4l4 has joined #ruby
<yorickpeterse> morning
<adaedra> hi yorick
<blub> hi yorickpeterse
baweaver has quit [Ping timeout: 246 seconds]
dhjondoh has quit [Remote host closed the connection]
dhjondoh has joined #ruby
monthy has joined #ruby
Snowy has quit []
DarkBushido has quit [Ping timeout: 260 seconds]
cschneid_ has quit [Ping timeout: 260 seconds]
user1138 has joined #ruby
GGMethos has quit [Ping timeout: 264 seconds]
danneu has quit [Ping timeout: 264 seconds]
user1138 has quit [Read error: Connection reset by peer]
rideh has quit [Ping timeout: 260 seconds]
huyderman has joined #ruby
user1138 has joined #ruby
user1138 has quit [Remote host closed the connection]
atomical_ has quit [Ping timeout: 260 seconds]
jas02 has quit [Quit: jas02]
rideh has joined #ruby
devoldmx has joined #ruby
hostess has quit [Quit: No Ping reply in 180 seconds.]
DarkBushido has joined #ruby
epochwolf has joined #ruby
Apocalypse has joined #ruby
torpig has quit [Ping timeout: 260 seconds]
devoldmx has quit [Ping timeout: 246 seconds]
root_murdoc has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
nateberkopec has joined #ruby
DarkBushido has quit [Ping timeout: 260 seconds]
torpig has joined #ruby
atomical has joined #ruby
Bloomer has quit []
dhjondoh has quit [Quit: dhjondoh]
epochwolf has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
root_murdoc has quit [Ping timeout: 260 seconds]
cschneid has joined #ruby
atomical has quit [Max SendQ exceeded]
nateberkopec has quit [Ping timeout: 260 seconds]
rideh has quit [Ping timeout: 260 seconds]
duncannz has quit [Ping timeout: 260 seconds]
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 260 seconds]
cschneid has quit [Ping timeout: 260 seconds]
epochwolf has joined #ruby
Ikri has quit [Read error: Network is unreachable]
hostess has joined #ruby
nfk|laptop has joined #ruby
rideh has joined #ruby
krzkrzkrz has quit [Ping timeout: 246 seconds]
monthy has quit [Killed (Sigyn (Spam is off topic on freenode.))]
chriscoffee has joined #ruby
Ikri has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
chriscoffee has quit [Max SendQ exceeded]
Bellthoven has quit []
M4l4 has quit [Ping timeout: 260 seconds]
M4l4 has joined #ruby
dhjondoh has joined #ruby
epochwolf has quit [Ping timeout: 260 seconds]
skade has quit [Quit: Computer has gone to sleep.]
ldnunes has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Jet4Fire has quit [Ping timeout: 245 seconds]
atomical has joined #ruby
rideh has quit [Ping timeout: 260 seconds]
rsc___ has quit [Quit: rsc___]
vikas027 has joined #ruby
Arnvald has quit [Remote host closed the connection]
rideh has joined #ruby
stamina has joined #ruby
DarkBushido has joined #ruby
AlphaAtom has joined #ruby
jpfuentes2 has joined #ruby
rsc___ has joined #ruby
DarkBushido has quit [Ping timeout: 260 seconds]
<vikas027> Hello Everyone, I am unable to use net-ldap gem with bind_as . Please help me to figure out what is wrong in this code http://pastebin.com/q8YSWtz6
<ruboto> vikas027, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/903ad3e4d2f6cd9a73bb
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
doublemalt_ has quit [Ping timeout: 260 seconds]
kaka_ has joined #ruby
GGMethos has joined #ruby
<apeiros> vikas027: lets start with your problem description - how do you figure "something is wrong"?
fabrice31 has joined #ruby
fabrice31 has quit [Remote host closed the connection]
<vikas027> apeiros: When I run this code, I get "Authentication FAILED." while I can login thru this user on the Windows machine
jpfuentes2 has quit [Ping timeout: 260 seconds]
AlphaAtom has quit [Ping timeout: 260 seconds]
dlitvak has joined #ruby
<apeiros> been a while - might be that your windows machine automatically adds the domain (as in "<domain>\username")
M4l4 has quit [Ping timeout: 246 seconds]
gigetoo has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby
nixmaniack has quit [Remote host closed the connection]
<vikas027> apeiros: Hmm... it shouldn't be since I tried to use username 'vikas.kumar@TEST.COM' while connecting thru a RDP session as well
DarkBushido has joined #ruby
spt0 has quit [Ping timeout: 260 seconds]
dhjondoh has quit [Remote host closed the connection]
<apeiros> do you only need to know whether password & username are valid?
kaka_ has quit [Ping timeout: 246 seconds]
dhjondoh has joined #ruby
<vikas027> apeiros: correct, that is my ultimate goal
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
toretore has joined #ruby
<apeiros> then you can use .bind instead of bind_as. I.e. my code here is just: def self.valid?; !!Net::LDAP.new(*options).bind
dlitvak has quit [Remote host closed the connection]
mistym has quit [Ping timeout: 260 seconds]
<apeiros> and options is roughly: {host: , port:, base:, auth: => {method:, username:, password: }}
<apeiros> no filter
<vikas027> apeiros: let me try that
<apeiros> and in username, I have "domain\\" prefixed
<vikas027> apeiros: thanks for the help
skade has joined #ruby
<apeiros> so I guess yours might even work, but it's missing the domain
joonty has quit [Quit: joonty]
dlitvak has joined #ruby
skade has quit [Client Quit]
araujo has quit [Quit: Leaving]
FooMunki has quit [Quit: FooMunki]
mistym has joined #ruby
mistym has quit [Changing host]
mistym has joined #ruby
dlitvak has quit [Remote host closed the connection]
atomical has quit [Max SendQ exceeded]
andikr has joined #ruby
atomical has joined #ruby
dlitvak has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
araujo has quit [Max SendQ exceeded]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
joonty has joined #ruby
svoop has joined #ruby
spk has quit [Ping timeout: 264 seconds]
spk has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
bronson has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jschmid1 has joined #ruby
arup_r has joined #ruby
jas02 has joined #ruby
DurstBurger has joined #ruby
<vikas027> apeiros: thanks a ton. All of the ldap.auth options are working fine here - https://dpaste.de/coMU
finisherr has quit [Quit: finisherr]
bronson has quit [Ping timeout: 245 seconds]
<arup_r> codeclimate giving error for the months method https://gist.github.com/aruprakshit/daa8b0e05a430685138a error as Assignment Branch Condition size for months is too high. [23.28/20]. How to refactor this ? little hints pease
<apeiros> arup_r: isn't that rails?
CloCkWeRX has quit [Ping timeout: 260 seconds]
<arup_r> No. Refactoring is not related to rails.. I can ask this channel too
* apeiros sobs
* adaedra pats apeiros
<apeiros> arup_r: yes. refactoring is totally related to the tools you have available.
<apeiros> arup_r: and rails/not rails is a *friggin huge* difference in tools available.
<adaedra> arup_r: Rails channel will be able to give you Rails solutions that can help you further in your refactoring.
<arup_r> ok.. moving.
vikas027 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arup_r> I still not convinced to think this question as Rails channel specific .. but I will listen you.. :)
<trautwein> c
nateberkopec has joined #ruby
DurstBurger has quit [Ping timeout: 246 seconds]
<shevy> d
stannard has joined #ruby
Peg-leg has joined #ruby
<apeiros> arup_r: I think you're lucky you don't have to i18n that. otherwise the score would be even higher.
gigetoo has joined #ruby
<trautwein> shevy, wrong window.. or the ruby debugger displays very strange things ;)
maesitos has joined #ruby
<arup_r> which part of the code making rubocop unhappy thinking .. :)
stannard has quit [Ping timeout: 246 seconds]
spt0 has joined #ruby
nateberkopec has quit [Ping timeout: 260 seconds]
norc has joined #ruby
<norc> Hi folks.
dhjondoh has quit [Remote host closed the connection]
dhjondoh has joined #ruby
stamina has quit [Ping timeout: 260 seconds]
<blub> hi big norc
maesitos is now known as holaadios
holaadios is now known as maesitos
blackmesa has joined #ruby
it_tard has joined #ruby
nfk|laptop has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 245 seconds]
poguez_ has quit [Quit: Connection closed for inactivity]
nerium has joined #ruby
CloCkWeRX has joined #ruby
dlitvak has quit [Ping timeout: 245 seconds]
dkam has joined #ruby
pandaant has quit [Remote host closed the connection]
dhjondoh has quit [Remote host closed the connection]
dlitvak has joined #ruby
dhjondoh has joined #ruby
Robert__ has joined #ruby
<dkam> How would I create an SSL Context which includes SNI? Looks like the C call is SSL_set_tlsext_host_name?
FooMunki has joined #ruby
hackmathics has joined #ruby
dlitvak has quit [Ping timeout: 246 seconds]
<shevy> arup_r EVERYTHING makes rubocop unhappy
dhjondoh has quit [Remote host closed the connection]
skade has joined #ruby
dhjondoh has joined #ruby
peterhil_ has quit [Ping timeout: 246 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
hackmathics has quit [Ping timeout: 246 seconds]
edwinvdgraaf has quit []
dlitvak has joined #ruby
<jhass> dkam: I would expect that to be a default by now
<jhass> are you sure it's failing because of that?
<dkam> jhass: I figured it out - you set socket.hostname = "blah.com" - that'll set the SSL context for SNI.
Jet4Fire has joined #ruby
hackmathics has joined #ruby
<jhass> cool
<dkam> jhass: Ha! Nice to meet you in chat, rather than github issues.
edwinvdgraaf has joined #ruby
<dkam> jhass: It wasn't failing - but without provided the context / SNI stuff, the webserver just serves up the default host's certificate.
Mon_Ouie has joined #ruby
<jhass> yeah I can imagine, I never tried it outside a HTTPS context I guess, which handles it transparently
rsc___ has quit [Quit: rsc___]
<jhass> Interesting, devdocs.io doesn't list Socket#hostname= or OpenSSL::Socket#hostname=
<dkam> It's OpenSSL::SSL::SSLSocket
<jhass> eh, yeah, OpenSSL::Socket is the crystal name :P
<jhass> but either way
jgt1 has quit [Ping timeout: 260 seconds]
peterhil_ has joined #ruby
Ropeney has joined #ruby
baweaver has joined #ruby
DoubleMalt has joined #ruby
<dkam> Man, that's some bad documentation. I found it in the source : https://github.com/ruby/openssl/blob/master/lib/openssl/ssl.rb
<shevy> this is not the documentation you are looking for! *jedi-hand-wave*
<jhass> wait
<jhass> >> class Foo; attr_accessor :foo; end; Foo.new.method(:foo=).source_location
<ruboto> jhass # => ["/tmp/execpad-4a70da31c156/source-4a70da31c156", 2] (https://eval.in/481478)
Ropeney has quit [Client Quit]
Mon_Ouie has quit [Ping timeout: 260 seconds]
hackmathics has quit [Remote host closed the connection]
agent_white has quit [Quit: leaving]
dhjondoh has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
puria has quit [Ping timeout: 246 seconds]
<jhass> >> require "openssl"; OpenSSL::SSL::SSLSocket.instance_method(:hostname=).source_location
<ruboto> jhass # => nil (https://eval.in/481483)
<jhass> ^ the heck? It's defined in Ruby
baweaver has quit [Ping timeout: 246 seconds]
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
sandstrom has joined #ruby
vdamewood has joined #ruby
Cantaberry has joined #ruby
dhjondoh has joined #ruby
lokulin has quit [Changing host]
lokulin has joined #ruby
Pupp3tm4st3r has quit [Quit: Leaving...]
danneu has joined #ruby
root_murdoc has joined #ruby
prestorium has joined #ruby
devoldmx has joined #ruby
sdothum has joined #ruby
puria has joined #ruby
peterhil_ has quit [Ping timeout: 260 seconds]
nerium has quit [Quit: nerium]
yfeldblum has quit [Ping timeout: 246 seconds]
karapetyan has joined #ruby
dkam has quit [Quit: Be back later ...]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shanemcd has quit [Remote host closed the connection]
jgt1 has joined #ruby
devoldmx has quit [Ping timeout: 246 seconds]
krzkrzkrz has joined #ruby
joonty has quit [Quit: joonty]
duckpuppy has joined #ruby
nateberkopec has joined #ruby
toy has quit [Read error: Connection reset by peer]
ruid has quit [Ping timeout: 245 seconds]
toy has joined #ruby
toretore has quit [Ping timeout: 260 seconds]
toretore has joined #ruby
dlitvak has quit [Ping timeout: 260 seconds]
nateberkopec has quit [Ping timeout: 246 seconds]
karapetyan has quit []
dlitvak has joined #ruby
AlphaAtom has joined #ruby
karapetyan has joined #ruby
last_staff has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
root_murdoc has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
linduxed has joined #ruby
howdoicomputer has quit [Ping timeout: 246 seconds]
puria has quit [Ping timeout: 245 seconds]
toy_ has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
dlitvak has quit [Ping timeout: 260 seconds]
toy has quit [Ping timeout: 260 seconds]
favadi has joined #ruby
puria has joined #ruby
favadi has quit [Client Quit]
sandstrom has quit [Quit: My computer has gone to sleep.]
skweek has joined #ruby
dlitvak has joined #ruby
joonty has joined #ruby
<shevy> *another-jedi-hand-wave*
skweek has quit [Client Quit]
rgrmatt has joined #ruby
jpfuentes2 has joined #ruby
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
dkam has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mooe has quit [Quit: Connection closed for inactivity]
speaking1ode has quit [Ping timeout: 245 seconds]
Lap64 has joined #ruby
jackcom has joined #ruby
rgrmatt has quit [Ping timeout: 246 seconds]
jackcom has left #ruby [#ruby]
Coldblackice has quit [Ping timeout: 246 seconds]
diegoviola has joined #ruby
jpfuentes2 has quit [Ping timeout: 245 seconds]
dkam has quit [Ping timeout: 246 seconds]
sandstrom has joined #ruby
speaking1ode has joined #ruby
tesuji has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
kaka has joined #ruby
tesuji has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xet7 has joined #ruby
CloCkWeRX has left #ruby [#ruby]
duckpuppy has quit [Ping timeout: 246 seconds]
Robert__ has quit [Ping timeout: 260 seconds]
peterhil_ has joined #ruby
aryaching has joined #ruby
<Zarthus> Is it possible to have Resolv::DNS get either an address or a CNAME? When I try to filter those three from each_resource with Resolv::DNS::Resource::IN::ANY the server denies my request ("Please stop asking for ANY") as HINFO (I assume this is a ruby bug and shouldn't really classify as "hardware info", but I haven't read the specification).
d0nn1e has quit [Ping timeout: 260 seconds]
<Zarthus> possibly a follow up question: If it is, is there a way to automatically resolve a CNAME to an IP address, or is it correct to recursively resolve this?
duckpuppy has joined #ruby
* jhass never used resolv, let's experiment a bit
<Zarthus> My initial thought was that this should use bitwase and/or, but that does not seem to be the case.
nateberkopec has joined #ruby
<Zarthus> e.g. each_resource('google.com', Resolv::DNS::Resource::IN::A | Resolv::DNS::Resource::IN::AAAA | Resolv::DNS::Resource::IN::CNAME - but that's a flat out syntax error.
dkam has joined #ruby
<jhass> I would expect that if you ask for A and get CNAME back, you have two situations, the server knows the target and returns it and it's available somehow, the server doesn't and you have to run another query
lxsameer has quit [Remote host closed the connection]
kaka_ has joined #ruby
<Zarthus> each_address (essentially Resolv::DNS::Resource::IN::A and Resolv::DNS::Resource::IN::AAAA) does not return CNAMEs
brendan- has quit [Quit: Textual IRC Client: www.textualapp.com]
sgambino has joined #ruby
d0nn1e has joined #ruby
GinoManWorks has joined #ruby
Rumbles has quit [Ping timeout: 246 seconds]
Macaveli has joined #ruby
kaka has quit [Ping timeout: 246 seconds]
skweek has joined #ruby
bronson has joined #ruby
davedev24 has joined #ruby
<Zarthus> as for why I would want to ensure it resolves to an IP address: I'm doing some extra validation with regards to IP ranges (e.g. "somehost.com must resolve to an IP address in 1.1.0.0/16")
<apeiros> syntax error?
skade has quit [Quit: Computer has gone to sleep.]
<apeiros> that doesn't mean it can't work. it just means you wrote something the wrong way. what precisely is the syntax error?
Rumbles has joined #ruby
<Zarthus> `resolve': undefined method `|' for Resolv::DNS::Resource::IN::A:Class (NoMethodError) with: each_resource(name, Resolv::DNS::Resource::IN::A | Resolv::DNS::Resource::IN::AAAA | Resolv::DNS::Resource::IN::CNAME) do |resource|
<Zarthus> you're right, it was a bit vaguely phrased by me
<apeiros> yeah, that's not a syntax error
<Zarthus> it was more or less a guess on my side to see if bitwise operators would work
mikecmpbll has joined #ruby
* apeiros digs up his code
<apeiros> pretty sure I did multiple lookups in one
ghoti has quit [Ping timeout: 260 seconds]
<Zarthus> yeah, that would be the approach I would take if I couldn't sort it out
dkam has quit [Ping timeout: 246 seconds]
<apeiros> hm, nope. I added a layer on top of getresources
<jhass> Zarthus: getaddresses as well as getresources resolve the CNAME here
<jhass> Zarthus: and fetch_resource provides unfiltered access to the response
bronson has quit [Ping timeout: 245 seconds]
<jhass> if you explicitly want to know whether a CNAME exist you can either guess from comparing the name in the response with what you requested or explicitly ask for CNAME, I guess
shanemcd has joined #ruby
banister has quit [Read error: Connection reset by peer]
<Zarthus> seems like getresources pretty much sends multiple requests
p0wn3d has joined #ruby
<jhass> fetch_resource even
<Zarthus> is fetch_resource a method made by you?
<jhass> no
ghoti has joined #ruby
<Zarthus> that site is a lot more informative than the ruby docs
<jhass> and that does requester.request(sender, tout) which from the look of it already resolves any CNAME chain
InvGhost has joined #ruby
dhjondoh has joined #ruby
nhhagen has joined #ruby
brendan- has joined #ruby
<Zarthus> yep, this worked. (and as of why I couldn't find fetch_resource: Google tends to bring me to outdated docs)
symm- has quit [Ping timeout: 246 seconds]
lurch_ has left #ruby [#ruby]
<puria> I get this error when installing ruby 2.2.3 using rbenv: http://pastebin.com/2cQBMdGD
<ruboto> puria, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
skakri has joined #ruby
dlitvak has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
<apeiros> given that rbenv is said to be the least popular ruby manager, we sure get a lot of questions about it…
<apeiros> soooo… either it isn't unpopular or it's unpopular because it raises so many questions?
<jhass> apeiros: or it just causes the most problems?
<yorickpeterse> omg but shims are so helpful
<apeiros> or that
* apeiros admits that he has no idea how any manager other than rvm works - and even with rvm only a faint idea
ixti has quit [Read error: Connection reset by peer]
<jhass> rvm & chruby have the same approach
<apeiros> env vars?
<arup_r> short question: How to get [[1,2], [ [3,4], [5,6]]] -> [[1,2], [3,4], [5,6]] ? [[1,2], [ [3,4], [5,6]].flatten(1) ] is wrong as per my intentation.. What other tool is there ? :)
<jhass> they're essentially a shell function which fixes up your $PATH and stuff to the Ruby, yeah
<apeiros> that is, user install and control all via env vars?
<apeiros> arup_r: those two look identical?
<apeiros> oh, your second one is fucked
<jhass> rbenv adds a static directory to your $PATH and provides wrappers which it rewrites (or who delegate?) to the currently active ruby
<apeiros> arup_r: properly create the array in the first place, I'd say
<puria> I get this error when I try to install ruby using rbenv: https://gist.github.com/anonymous/dbd0ebccc648e25a734b
<apeiros> arup_r: because I *bet* you used <</push where you should have used concat
<arup_r> hum.. need to use concat
<arup_r> thanks.. your bet is correct
blackmesa has quit [Ping timeout: 245 seconds]
* apeiros mumbles something about treating symptoms instead of causes…
dlitvak has joined #ruby
nixmaniack has quit [Remote host closed the connection]
shmoon has joined #ruby
<shmoon> hey needed some help with webrick ?
nixmaniack has joined #ruby
DanKnox is now known as DanKnox[away]
<shmoon> I run a small app on webrick on my web server but then I'm unabe to access it with http://ip:3000/ is it not supposed to work like that ?
<apeiros> if you start the server under port 3000 and listening on that interface, then yes, it's supposed to work like that
<apeiros> @ shmoon
<shmoon> but it doesnt apeiros , it doens't accept my connections
<shmoon> i tried port 80 too
<shmoon> is webrick not supposed to run for public clients on a remote webs erver (linode) ?
<apeiros> shmoon: well, *did you start it* under those properties?
<shmoon> yup, $ sudo ruby yo.rb -p 3000
<apeiros> shmoon: and for which interface does it listen? 0.0.0.0 is all interfaces… otherwise it's specific.
dkam has joined #ruby
dkam has quit [Remote host closed the connection]
<apeiros> i.e. if you start it bound to 127.0.0.1, it won't accept connections on your external ip
<jhass> well, :: is all interfaces too :P
<apeiros> jhass: oh, good point. should remember that. shorter to type :)
<jhass> localhost is shorter to type too! ::1 or [::1] in the worst case
DurstBurger has joined #ruby
dionysus69 has joined #ruby
<apeiros> localhost isn't all interfaces
<apeiros> or not necessarily. usually it's 127.0.0.1
<jhass> er, I should say loopback
<jhass> 127.0.0.1 == ::1
<apeiros> mhm, but 0.0.0.0 != 127.0.0.1
root_murdoc has joined #ruby
<jhass> no, 0.0.0.0 == ::
<apeiros> good. then we talk the same again now :)
teoric has joined #ruby
root_murdoc has quit [Client Quit]
goodcodeguy has joined #ruby
<jhass> even multicast is shorter, but I can never remember them
<shmoon> can i pass the interface when i start it ?
root_murdoc has joined #ruby
<jhass> ff02::1,2,3 or so
<jhass> shmoon: probably
<apeiros> shmoon: that depends on the code in your yo.rb
<apeiros> neither ruby nor webrick care about what arguments you pass to your script
<apeiros> only your script does.
<shmoon> $ sudo ruby yo.rb -p 3000 -o 0.0.0.0 - no luck :/
<apeiros> and since we don't know anything about your script - except for its name - how should we be able to tell?
<shmoon> my script is simple, http://pastie.org/10616111
<apeiros> aha… there we go.
<apeiros> I'd refer you to the sinatra docs then.
<bigmac> can you search for a value or key in a hash with regex?
<bigmac> "string123".scan(/string[0-9]{1,3}/)
<apeiros> pretty sure they tell how to
<bigmac> when i attempt this on a hash i get a regex error
nerium has joined #ruby
<apeiros> bigmac: Hash#each and all of Enumerable are your friends.
<bigmac> so i assume you cant
<ljarvis> bigmac: Enumerable#find
<apeiros> and no, you can't use .scan, as that's not a method on Hash.
cdg has joined #ruby
<bigmac> sorry, the scan was just for example
<jhass> bigmac: Hash#.each_key.grep(/.../)
<ljarvis> that's better
<ljarvis> (if you dont want the value in the same lookup)
<shmoon> apeiros: hmm, http://www.sinatrarb.com/intro.html says by default -o is 0.0.0.0
<apeiros> am I being extra difficult for not giving the solution directly?
<shmoon> not sure what am doing wrong
<shmoon> ok I'll look into it further, np
<shmoon> :)
<shmoon> it works on my localhost, just saying that on my remote server it doesn't
dhjondoh has quit [Quit: dhjondoh]
<apeiros> shmoon: when you start the script, what's printed?
<shmoon> apeiros: http://pastie.org/10616118
<shmoon> maye i have to set the environment
<apeiros> odd…
<apeiros> why doesn't it have a line like "Listening on …"?
AlphaAtom has joined #ruby
<shmoon> nope, no lucj with $ RACK_ENV=production ruby yo.rb -p 3000 -o 0.0.0.0 either
tjad has quit [Ping timeout: 260 seconds]
arup_r has quit [Remote host closed the connection]
<jhass> shmoon: so, do you have a packet filter?
<shmoon> it doesn't :S
p1k has joined #ruby
<jhass> ubuntu comes with ufw and fedora comes with firewalld for example
<shmoon> hm dunno much about pakcet filters
<adaedra> what is the output of `sudo iptables -L` ?
<jhass> time to change that!
<p1k> does anyone have an idea how to pass an array to exec params of Ruby-PG
<jhass> shmoon: it's a topic you should know when you provide a server to the internet
<p1k> none of the obvious things I can do in python seem to work - do I need to call a custom encoding method?
<jhass> p1k: what did you try and what's the error?
dlitvak has quit [Ping timeout: 260 seconds]
<shmoon> adaedra: http://pastie.org/10616126
<shmoon> are you talking about iptables/firewall only ?
<adaedra> So yeah, no packet filter
<p1k> jhass: I tried "... v.id IN $1", [[1,2,3]] and other such variations
dlitvak has joined #ruby
<adaedra> shmoon: there are multiple ways to manage Linux iptables. iptables (eh), firewalld, ufw, shorewall, ...
dopie has quit [Ping timeout: 260 seconds]
null__ has quit [Ping timeout: 264 seconds]
ghormoon has quit [Ping timeout: 264 seconds]
<jhass> p1k: that's only answering a quarter of my question (since it only answer half of the first part)
<p1k> jhass: yeah it's a very non-useful error =/ PG::SyntaxError: ERROR: syntax error at or near "$1"
sjohnsen has quit [Ping timeout: 264 seconds]
kp666 has joined #ruby
<jhass> ($1) perhaps?
<p1k> jhass: that works if you query for a single IN value, but [1,2] can't expand correctly into that =/
johnny56 has quit [Ping timeout: 264 seconds]
cookiez has quit [Ping timeout: 264 seconds]
saneax is now known as saneax_AFK
rsc___ has joined #ruby
TomPeed has joined #ruby
Xeago has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
halfdan has quit [Ping timeout: 264 seconds]
nixmaniack has quit [Read error: Connection reset by peer]
sjohnsen has joined #ruby
godzillaenlacasa has joined #ruby
nixmaniack has joined #ruby
ghormoon has joined #ruby
teoric has quit [Quit: WeeChat 1.3-dev]
sankaber has joined #ruby
halfdan has joined #ruby
Synthead has quit [Ping timeout: 265 seconds]
toy_ has quit [Quit: Leaving...]
tvw has quit [Ping timeout: 265 seconds]
sphex has quit [Ping timeout: 246 seconds]
null__ has joined #ruby
null__ has quit [Changing host]
null__ has joined #ruby
JDiPierro has joined #ruby
maesitos has quit [Remote host closed the connection]
<jhass> p1k: woah, looks like there's really no decent support for this, the solutions I find are all horrible (building an PG array literal as string)
platzhirsch has left #ruby [#ruby]
irk has joined #ruby
<bigmac> some one had suggested clandestined gem, for a cluster like hashing... but i dont see any examples for running a server and building the hash
<p1k> jhass: Yeah that's all I'm seeing also - but I just thought "there must be a normal way to do this"
<jhass> p1k: your safest bet is to generate something like ($1, $2, $3) I'd say
<p1k> like PG.encodeArrayParam or something :S
<jhass> p1k: IN (#{1.upto(array.size).map {|i| "$#{i}" }.join(", ")}) something like that, ugh
Azulinho has quit [Ping timeout: 245 seconds]
Some-body_ has joined #ruby
pandaant has joined #ruby
sphex has joined #ruby
<apeiros> yupp, expanding the $ vars is the way to go
Jardayn has joined #ruby
<apeiros> if your values from your IN clause are the result of another query -> use a subquery. much more performant.
brainslug has joined #ruby
<p1k> apeiros: no, single query, so really no encoding method - must string interpolate?
<apeiros> p1k: no, use jhass lass suggestion
<jhass> p1k: don't interpolate the values directly, generate bind params as I've shown
vifino has quit [Ping timeout: 246 seconds]
Some-body_ is now known as DarthGandalf
tsunamie has joined #ruby
<p1k> jhass: that's interpolating bind params, it's still a hack that the encoder should really handle -_-
ta has quit [Remote host closed the connection]
vifino has joined #ruby
<apeiros> you can use pgarray and use functions to expand that/use it in an IN
<apeiros> but can't tell you from the top of my head how. and it's not necessarily better.
arup_r has joined #ruby
<jhass> PG rewrites IN to = ANY(array[])
<apeiros> oh? source?
<jhass> random dude on the internet (stackoverflow), closed the tab
<p1k> i'm looking at rails, it seems to interpolate directly without using params
<p1k> but that might be for cross-compatibility across sql connectors also
<jhass> rails is still a source of bad ideas, I seee
dionysus69 has quit [Ping timeout: 260 seconds]
PhilK has quit [Ping timeout: 260 seconds]
<jhass> possibly
<jhass> but generating bind params makes you pretty much immune to SQLi from that part at least
boxrick1 has quit [Ping timeout: 245 seconds]
youch has quit [Ping timeout: 260 seconds]
<apeiros> surprising that AR still is. given how much time tenderlove spent on it
<apeiros> but I guess he won't go over each db driver :)
<apeiros> though, pg and ora driver do the same
<p1k> meh as of 4.23 they are still using pg_type_map_all_string for instantiating AR objects from rows
<apeiros> so maybe that's indeed not a driver-level fault
devoldmx has joined #ruby
<p1k> fixed in 5.0 I think, but there's definetly some cross-compatibility stuff they do which is very sub optimal
* apeiros has no 5.0 handy
nixmaniack has quit [Remote host closed the connection]
<shevy> jhass hah, I shall immortalize that epic quote about rails in my irc-quotes file!
akem has joined #ruby
nerium has quit [Quit: nerium]
* jhass magnetizes shevy's harddisk
devoldmx has quit [Ping timeout: 246 seconds]
favadi has joined #ruby
PhilK has joined #ruby
<diegoviola> DateTime.now.strftime("%Y%m%d%H%M%S")
<diegoviola> is there a shorthand for this
decoponio has joined #ruby
blackmesa has joined #ruby
Lap64 has quit [Quit: Leaving]
colegatron has quit [Quit: Leaving]
glowcoil has quit [Read error: Connection reset by peer]
favadi has quit [Client Quit]
blackms has quit [Quit: Leaving]
dionysus69 has joined #ruby
root_murdoc has quit [Ping timeout: 260 seconds]
<darix> that is pretty short imho
<diegoviola> yeah sure
<darix> but imho
<darix> DateTime.now.strftime("%Y-%m-%dT%H:%M:%S")
<darix> to make it a common date format which can be easily parsed
JDiPierro has quit [Remote host closed the connection]
<jhass> that one can be shorter, %FT%T
ESpiney has joined #ruby
hxegon has joined #ruby
<darix> hah ;)
<shevy> cool
<diegoviola> thanks
<diegoviola> my client asked me to use the format I just mention though
symm- has joined #ruby
<diegoviola> 20151127082853
Papierkorb has quit [Ping timeout: 245 seconds]
_stu_ has joined #ruby
<shevy> if only we could do DateTime['%FT%T'] ... or even a method... DateTime.whatever_the_name_for_the_common_format_is()
Azulinho has joined #ruby
<jhass> >> require "time"; Time.now.iso8601
<ruboto> jhass # => "2015-12-07T14:45:27+00:00" (https://eval.in/481629)
<norc> That at least also carries a timezone.
<darix> shevy: well you would still need to tell the DateTime which point in time you refer to
djcp has joined #ruby
<darix> norc: well i left out TZ as his original didnt care either. so i assume he normalized timezones on input ;)
JDiPierro has joined #ruby
lukeasrodgers has joined #ruby
Papierkorb has joined #ruby
<norc> darix: Heh. I have made it a habit to include TZ absolutely everywhere, since it makes dealing with cross timezone issues so much easier.
whippythellama has joined #ruby
<norc> Price for living in country with daylight saving time.
asmodlol has joined #ruby
Fredrich010 has quit [Read error: Connection reset by peer]
Fredrich010 has joined #ruby
<shevy> it saves time!
Azulinho has quit [Client Quit]
Shidash has quit [Ping timeout: 264 seconds]
kobain has joined #ruby
benlakey has quit [Ping timeout: 264 seconds]
glowcoil has joined #ruby
jevs_ has joined #ruby
benlakey has joined #ruby
elektronaut has quit [Ping timeout: 264 seconds]
jevs has quit [Ping timeout: 264 seconds]
jevs_ is now known as jevs
boxrick1 has joined #ruby
favadi has joined #ruby
roshanavand has joined #ruby
Fredrich010 has quit [Ping timeout: 240 seconds]
elektronaut has joined #ruby
hxegon has quit [Ping timeout: 245 seconds]
Rickmasta has quit [Ping timeout: 245 seconds]
dlitvak has quit [Ping timeout: 260 seconds]
Shidash has joined #ruby
dlitvak has joined #ruby
kitallis has quit [Ping timeout: 245 seconds]
Fredrich010 has joined #ruby
DanKnox[away] is now known as DanKnox
joonty has quit [Quit: joonty]
sankaber has quit [Remote host closed the connection]
cookiez has joined #ruby
leslie has quit [Ping timeout: 245 seconds]
sankaber has joined #ruby
The_Phoenix has joined #ruby
Rickmasta has joined #ruby
malconis has joined #ruby
kitallis has joined #ruby
leslie has joined #ruby
leslie has quit [Changing host]
leslie has joined #ruby
jpfuentes2 has joined #ruby
rsc___ has quit [Quit: rsc___]
m3_del has joined #ruby
tagrudev has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
stannard has joined #ruby
johnny56 has joined #ruby
chouhoulis has joined #ruby
IrishGringo has joined #ruby
joonty has joined #ruby
m3_del has quit [Remote host closed the connection]
stannard has quit [Remote host closed the connection]
hxegon has joined #ruby
stannard has joined #ruby
jpfuentes2 has quit [Ping timeout: 250 seconds]
babblebre has joined #ruby
devbug has joined #ruby
Tempesta has quit [Ping timeout: 260 seconds]
dlitvak has quit [Ping timeout: 256 seconds]
dlitvak has joined #ruby
dorei has joined #ruby
<dorei> hello
duckpuppy has quit [Ping timeout: 260 seconds]
astrobunny has quit [Remote host closed the connection]
<dorei> i want to produce unique filenames for urls, i've used Base64::encode64(url) but the output isnt that suitable for filename
devbug has quit [Ping timeout: 264 seconds]
cdg has quit [Remote host closed the connection]
duckpuppy has joined #ruby
futilegames has quit [Ping timeout: 245 seconds]
banister has joined #ruby
cdg has joined #ruby
ddubs has joined #ruby
mallu has joined #ruby
cdg has quit [Remote host closed the connection]
<toretore> dorei, md5, sha?
Synthead has joined #ruby
amoeba has joined #ruby
<adaedra> dorei: hexdigest.
Meliodas has joined #ruby
Authenticator has joined #ruby
cdg has joined #ruby
<adaedra> I guess a good idea would be to generate UUIDs for your files, tho.
shredding has joined #ruby
scottstamp has joined #ruby
<dorei> wouldnt it be an overkill to use a cryptohash?
ELLIOTTCABLE has quit [Ping timeout: 264 seconds]
Ishido has quit [Ping timeout: 260 seconds]
tesuji has quit [Ping timeout: 246 seconds]
<adaedra> md5 is pretty quick, especially for the small string you have.
ElSif has quit [Read error: Connection reset by peer]
malconis has quit [Remote host closed the connection]
malconis has joined #ruby
I has joined #ruby
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
ELLIOTTCABLE has joined #ruby
I is now known as Guest90673
zapata has quit [Ping timeout: 240 seconds]
ElSif has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
<darix> adaedra: while uuid based file names might be good. you would need to maintain a hash for url <=> filename no?
axl_ has joined #ruby
<adaedra> yes
mary5030 has joined #ruby
cdg has quit [Remote host closed the connection]
whippythellama has quit [Ping timeout: 240 seconds]
<dorei> in my specific case i only want to have url => filename, not both ways
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> if our filesystems would allow arbitrarily long filenames, you could just use the url itself as name :D
futilegames has joined #ruby
mary5030 has quit [Remote host closed the connection]
Ishido has joined #ruby
mkosaki has joined #ruby
norc has quit [Ping timeout: 252 seconds]
karapetyan has quit [Remote host closed the connection]
Cantaberry has quit [Ping timeout: 260 seconds]
speaking1ode has quit [Ping timeout: 246 seconds]
zapata has joined #ruby
cjbottaro has joined #ruby
<darix> apeiros: with a s|/|_|g
<darix> dorei: i would use sha256sum on the url and use that
tejasmanohar has quit [Ping timeout: 264 seconds]
nhhagen has quit [Remote host closed the connection]
<apeiros> darix: I'd use an encoding system. like % encoding.
<darix> i claim that hashing will probably be faster than url encode the url again ;)
dhollinger has joined #ruby
patdohere has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlphaAtom has joined #ruby
<apeiros> given that a couple of hashing algorithms have hardware support, you might even be right
whippythellama has joined #ruby
<apeiros> without, I'd say % encoding is faster
yardenbar has quit [Ping timeout: 260 seconds]
shredding has quit [Remote host closed the connection]
<apeiros> % encoding is a single loop with a single jmp
<apeiros> hard to beat that
tejasmanohar has joined #ruby
<dorei> maybe base64::encode64 and then removing that illegal character at the end would be faster
<apeiros> only thing which can be expensive is if you don't want to allocate url.bytesize*3 - if you allocate too little, then you may have to realloc.
<apeiros> darix: damn you! now I want to write a % encoder in C and see how it fares against openssl's md5/ssh256
moeabdol has joined #ruby
tenderlove has joined #ruby
sepp2k has quit [Quit: Leaving.]
patdohere has quit [Read error: Connection reset by peer]
hxegon has quit [Ping timeout: 240 seconds]
lubarch has joined #ruby
PlasmaStar has quit [Ping timeout: 264 seconds]
Krazypoloc has joined #ruby
* Krazypoloc pokes head in
arup_r has quit [Remote host closed the connection]
* adaedra grabs Krazypoloc and throw him•her in the channel
<adaedra> hi!
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dorei> Base64::strict_encode64 instead of Base64::encode64 did the trick :)
PlasmaStar has joined #ruby
<jhass> apeiros: write it in crystal :P
gregf has quit [Quit: WeeChat 1.3]
tildes has joined #ruby
<apeiros> jhass: you can translate it easily.
wldcordeiro has quit [Quit: WeeChat 1.3]
<apeiros> got to way a bit until I can go home and got nothing better to do, so I'll give it a shot :D
wldcordeiro has joined #ruby
stamina has joined #ruby
DexterLB has quit [Ping timeout: 260 seconds]
<adaedra> apeiros: so, never?
<apeiros> o0
RegulationD has joined #ruby
DexterLB has joined #ruby
skade has joined #ruby
<adaedra> You're always busy!
<yorickpeterse> I think that's called having a jeb
<adaedra> THEY TOOK OUR JEBS
wldcordeiro has quit [Read error: Connection reset by peer]
jpfuentes2 has joined #ruby
wldcordeiro has joined #ruby
gregf has joined #ruby
krzkrzkrz has quit [Ping timeout: 260 seconds]
atomical_ has joined #ruby
nixmaniack has quit [Remote host closed the connection]
asmodlol has quit [Ping timeout: 272 seconds]
IrishGringo has quit [Read error: Connection reset by peer]
jpfuentes2 has quit [Ping timeout: 240 seconds]
hxegon has joined #ruby
IrishGringo has joined #ruby
asmodlol has joined #ruby
duckpuppy has quit [Ping timeout: 256 seconds]
aganov has quit [Remote host closed the connection]
TheBloke- has joined #ruby
atomical has quit [Ping timeout: 260 seconds]
Snowy has joined #ruby
nbdy has quit [Quit: Textual IRC Client: www.textualapp.com]
TheBloke has quit [Read error: Connection reset by peer]
<yorickpeterse> DEY TUK ER JERBS
baweaver has joined #ruby
pdoherty has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
krzkrzkrz has joined #ruby
ethe has joined #ruby
huyderman has quit [Ping timeout: 246 seconds]
diegoviola has quit [Ping timeout: 264 seconds]
supermarin has joined #ruby
amit__ has joined #ruby
djstorm has joined #ruby
weemsledeux has joined #ruby
kriskropd has quit [Ping timeout: 260 seconds]
<amit__> dear folks I have two timestamp values that I want to find the time difference between them within a ruby code? any idea how can i achieve this. here is the paste bin with ruby code within logstash http://pastebin.com/SJStz5RF
<ruboto> amit__, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/83386642c2c258633af7
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
neonalpine has joined #ruby
asmodlol has quit [Ping timeout: 250 seconds]
mikecmpbll has quit [Ping timeout: 246 seconds]
<amit__> dear folks I have two timestamp values that I want to find the time difference between them within a ruby code? any idea how can i achieve this. here is the gist post with my ruby code within logstash https://gist.github.com/83386642c2c258633af7
ruby-lang801 has joined #ruby
<adaedra> No need to repeat it.
<adaedra> You can use ri:Time to manage times.
<`derpy> class `Time`: Time is an abstraction of dates and times. Time is stored internally as the numb… • http://rubydoc.info/stdlib/core/Time
asmodlol has joined #ruby
hxegon has quit [Ping timeout: 272 seconds]
Wsewolod has joined #ruby
<darix> amit__: if your time fields are strings then just DateTime.strptime(...) with the right format string
<darix> then you can compare them
<amit__> okay will not repeat it, all thank you for response, new to ruby: I am googling what ri:Time is , and yes my timestamp is a string field with content like: "November 7th 2015, 21:13:44.000"
<`derpy> class `Time`: Time is an abstraction of dates and times. Time is stored internally as the numb… • http://rubydoc.info/stdlib/core/Time
<adaedra> amit__: look at the link from `derpy!
astrobunny has joined #ruby
<adaedra> (ri: is just a call to the documentation)
skade has quit [Ping timeout: 250 seconds]
rcvalle has joined #ruby
<amit__> adaedra: okay reading the link from `derpy
Snowy has quit [Remote host closed the connection]
<adaedra> I should find a better way of handling this.
ruby-lang801 has quit [Client Quit]
ruby-lang837 has joined #ruby
skade has joined #ruby
skade has quit [Client Quit]
pdoherty has joined #ruby
colegatron has joined #ruby
duckpuppy has joined #ruby
spk has quit [Ping timeout: 260 seconds]
Gnut has joined #ruby
astrobunny has quit [Ping timeout: 272 seconds]
spk has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
orion has joined #ruby
hobodave has joined #ruby
<orion> Hi. In 2.1.0, how do I spawn a thread at the conclusion of a function without .joining it?
quazimodo has quit [Ping timeout: 260 seconds]
<orion> "Thread.new { ... }" is the very last line of a function, and it fails to run because I'm exiting scope.
ruby-lang837 has quit [Ping timeout: 252 seconds]
skade has joined #ruby
<orion> I'm wondering how to run a Thread and just have it go without having to worry about scope.
ruby-lang078 has joined #ruby
kp666 has quit [Read error: Connection reset by peer]
<jhass> ?code
<ruboto> We can't help you without your code, please post it to https://gist.github.com
<ruby-lang078> How to fix NameError: unknown option 'entry_of_telephone_or_email' Code: http://pastebin.com/2q2HBcph
<ruboto> ruby-lang078, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/6eed2ac2b02c4b3bd72f
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
kp666 has joined #ruby
devoldmx has joined #ruby
TomyWork has quit [Ping timeout: 246 seconds]
sucks has joined #ruby
Cantaberry has joined #ruby
jbrhbr has joined #ruby
<jhass> ruby-lang078: a cheap and not to clean workaround would be to make it an instance variable
Jet4Fire has quit [Ping timeout: 260 seconds]
<orion> I want that thread to just run.
<jhass> orion: so if blocking_poll is called it messes up the state needed for log_code?
<orion> log_code doesn't rely on state.
<jhass> then I don't get what error you're getting
synthroid has quit [Remote host closed the connection]
<orion> I'm not getting an error. The thread never runs at all.
<jhass> ah, well, I guess code gets reset
<orion> (Without t.join)
blackmesa has joined #ruby
<jhass> that's unlikely
SCHAAP137 has quit [Remote host closed the connection]
<jhass> set Thread.abort_on_exception = true at the start of your program
<orion> The thing is, I don't /want/ to have to call t.join
<jhass> I suspect you want to make a copy of code
arup_r has joined #ruby
<shevy> do not let your threads die and become a zombie!
<jhass> code_to_log = code; Thread.new { doorpi.log_code code_to_log }
asmodlol has quit [Ping timeout: 272 seconds]
anisha has quit [Quit: Leaving]
devoldmx has quit [Ping timeout: 256 seconds]
shredding has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
kobain has quit [Ping timeout: 240 seconds]
<orion> jhass: I suspect that the code never runs without join because at the conclusion of the loop I leave scope.
<orion> .join
arup_r has quit [Remote host closed the connection]
<orion> And 't' gets GCd.
<jhass> orion: I suspect your guess is wrong
<jhass> threads shouldn't be subject to GC rules
skade has joined #ruby
Ishido has quit [Ping timeout: 240 seconds]
<jhass> the underlying pthread anyway
ruby-lang078 has quit [Ping timeout: 252 seconds]
<jhass> tried my two suggestions yet?
karapetyan has joined #ruby
arup_r has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
<orion> jhass: Yes. In fact, after trying what you suggested, I replaced line 9 with "t = Thread.new { puts 'foo' }" and it still doesn't run.
skade has quit [Client Quit]
duckpuppy has quit [Ping timeout: 256 seconds]
it_tard has quit [Quit: yawn]
<jhass> cd
<jhass> ww
dimik has joined #ruby
moeabdol has quit [Ping timeout: 272 seconds]
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlphaAtom has joined #ruby
asmodlol has joined #ruby
<apeiros> adaedra: sure. but sometimes I have little time bubbles with nothing to do because like before I had to wait for somebody
edwinvdgraaf has quit [Ping timeout: 260 seconds]
Cantaberry has quit []
<jhass> orion: http://p.jhass.eu/15.rb this prints hi roughly every two seconds for me
<apeiros> anyway, that person came earlier than expected, so I managed to catch my train. but I was almost done, so here it is:
<apeiros> adaedra, darix, dorei, jhass: https://gist.github.com/apeiros/c2660dbfce7ee76e33d3
troulouliou_div2 has joined #ruby
<apeiros> cheap generated code :)
baweaver has quit [Remote host closed the connection]
<jhass> apeiros: in crystal you could've used a macro!
<apeiros> jhass: then go and use a macro!
<toretore> orion, what does "doesn't run" mean exactly?
nerium has joined #ruby
<orion> toretore: It means that the code within the block does not execute.
mary5030 has joined #ruby
Guest90673 has quit [Quit: Leaving]
asmodlol has quit [Ping timeout: 240 seconds]
dopie has joined #ruby
<toretore> oh
<amit__> dear folks: I am trying to convert this timestamp value into DateTime but not successful any help is appreciated: start="November 7th 2015, 16:35:31.000" end="November 8th 2015, 18:35:31.000" but DateTime.parse(start) results in => #<DateTime: 212313674131/86400,0,2299161> but not a time value ...any idea what is wrong?
ledestin has joined #ruby
<toretore> strptime
<jhass> amit__: "not a time value"? What do you expect?
<apeiros> >> start="November 7th 2015, 16:35:31.000"; DateTime.parse(start).iso8601
<ruboto> apeiros # => uninitialized constant DateTime (NameError) ...check link for more (https://eval.in/481716)
<apeiros> >> require 'date'; start="November 7th 2015, 16:35:31.000"; DateTime.parse(start).iso8601
<ruboto> apeiros # => "2015-11-07T16:35:31+00:00" (https://eval.in/481717)
<apeiros> amit__: ^ seems to have time just fine.
<amit__> jhass: start has a string and for me to be able to subtract to time i need them in a format the will work ..
<amit__> apeiros: let me try that
<apeiros> amit__: but note that ::parse should only be used if you *don't know* the format. if you know the format, use ::strptime
<jhass> that sentence didn't parse for me
<jhass> ?xy amit__
<ruboto> amit__, it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<apeiros> I think we have a problem of misunderstanding inspect output
[Butch] has joined #ruby
<apeiros> amit__: you realize that what you see in irb/pry is the result of obj.inspect, yes?
<apeiros> and that your result is of type DateTime, which means a date + time, which supports DateTime#- just fine too…
TheHodge has joined #ruby
andikr has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 256 seconds]
<amit__> I apologize, for my naive questions as I am getting used to ruby terminology. In short I have time stamp as start="November 7th 2015, 16:35:31.000" end="November 8th 2015, 18:35:31.000" and I want to find the elapsed time in hours or minutes between these two time values and i don't know how to do that yet in ruby.
kobain has joined #ruby
<apeiros> amit__: first step is to convert it into either a Time or a DateTime instance. you did that using DateTime.parse
<apeiros> amit__: and now you use DateTime#- to find the difference:
<jhass> >> require "time"; start_date = "November 7th 2015, 16:35:31.000"; end_date = "November 8th 2015, 18:35:31.000"; (Time.parse(end_date)- Time.parse(start_date)) / 60
<ruboto> jhass # => 1560.0 (https://eval.in/481723)
<apeiros> &ri DateTime#- @amit__
<`derpy> method `Date#-`: Returns the difference between the two dates if the other is a date object. If t… • http://rubydoc.info/stdlib/date/Date#--instance_method
* apeiros still thinks ::parse is the wrong tool, though. use strptime.
<jhass> agreed, I was just too lazy to type up the format string :P
<amit__> apeiros, jhass: that is helpful I guess you gave me the solution, let me try that and see if works for what i am trying in logstash ..thank you!!
rodfersou has quit [Quit: leaving]
<apeiros> hrm
<apeiros> there's no constant which notes the max length of ruby strings…
mary5030 has joined #ruby
<jhass> is there one?
mark4 has quit [Quit: Leaving.]
<amit__> apeiros: what is the consequence of using ::parse instead of ::strptime when I already know the format?
Mon_Ouie has joined #ruby
brunto has quit [Ping timeout: 260 seconds]
saneax_AFK is now known as saneax
skade has joined #ruby
<apeiros> amit__: the difference is that with .parse you pray and hope that ruby thinks the same about the format as you
<apeiros> with .strptime you a) get an error if the input does not fit the format, and b) it is using the correct format
Jackneill has joined #ruby
<adaedra> May be a bit faster, as there's no detection?
rodfersou has joined #ruby
<apeiros> that probably too
Cantaberry has joined #ruby
<amit__> apeiros: fair enough, I will learn how to use ::strptime thank you for your insight.
supermarin has quit [Remote host closed the connection]
<apeiros> and strptime is now implemented in C, fairly fast.
<amit__> i see :)
ta has joined #ruby
devyn has joined #ruby
<apeiros> ok, I guess maximum string length in ruby is LONG_MAX
maloik_ has joined #ruby
asmodlol has joined #ruby
Ishido has joined #ruby
<apeiros> hm
maloik has quit [Ping timeout: 245 seconds]
<apeiros> havenwood: does rvm use your precompiled ruby by any chance?
moeabdol has joined #ruby
<apeiros> require 'rbconfig'; RbConfig::CONFIG["configure_args"] # => " '--prefix=/Users/haven/.rvm/rubies/ruby-2.2.3'…
devyn has quit [Ping timeout: 240 seconds]
<shevy> >> RbConfig::CONFIG["configure_args"]
<ruboto> shevy # => " '--prefix=/execpad/interpreters/ruby-2.2.0' '--disable-install-doc'" (https://eval.in/481733)
<shevy> apeiros! you did a require!!!
<apeiros> shevy: that's special because…?
<shevy> it works without :)
<apeiros> yeah, I'm ancient. it didn't work without in olden times…
hobodave_ has joined #ruby
<darix> apeiros: tbh ... sha256 is fast enough. ;)
<apeiros> I noticed because of "LDFLAGS"=>"-L. -L/Users/haven/.sm/pkg/active/lib
<shevy> hehe
<apeiros> darix: nothing is ever fast enough!
<apeiros> I'm 3 times faster than fast enough!!!!!!!!1!elf!
<adaedra> No, but there are things that are too fast.
devyn has joined #ruby
<darix> apeiros: that's only because you are bending space and time. ;)
ruby-lang866 has joined #ruby
synthroid has joined #ruby
nerium has quit [Quit: nerium]
ruby-lang352 has joined #ruby
<ruby-lang866> hello ruby
jas02 has quit [Quit: jas02]
<ruby-lang352> hu
<ruby-lang866> hu hu hu
orion has left #ruby [#ruby]
shredding has quit [Ping timeout: 250 seconds]
underplank has joined #ruby
hobodave has quit [Ping timeout: 240 seconds]
joonty has quit [Quit: joonty]
<shevy> are you two the same
supermarin has joined #ruby
<apeiros> darix: that's not against the rules! (if you bend those too…)
moeabdol has quit [Ping timeout: 272 seconds]
<ruby-lang866> hu me not same
SCHAAP137 has joined #ruby
ruby-lang866 has quit [Client Quit]
devbug has joined #ruby
devyn has quit [Ping timeout: 244 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
krzkrzkrz has quit [Read error: Connection reset by peer]
devyn has joined #ruby
jbrhbr has quit [Quit: Leaving.]
skade has quit [Read error: Connection reset by peer]
banister has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
akem has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
ruby-lang352 has quit [Ping timeout: 252 seconds]
saneax is now known as saneax_AFK
nixmaniack has joined #ruby
nixmaniack has joined #ruby
akem has joined #ruby
kp666 has quit [Quit: Leaving]
baweaver has joined #ruby
devbug has quit [Ping timeout: 256 seconds]
pietr0 has joined #ruby
c355E3B has joined #ruby
supermarin has quit [Remote host closed the connection]
govg has joined #ruby
saddad has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
underplank has quit [Quit: underplank]
futilegames has quit [Quit: futilegames]
underplank has joined #ruby
supermarin has joined #ruby
djbkd has joined #ruby
mostlybadfly has joined #ruby
supermarin has quit [Remote host closed the connection]
axl_ has quit [Ping timeout: 240 seconds]
skade has joined #ruby
cdg has joined #ruby
ta has quit [Remote host closed the connection]
devbug has joined #ruby
djbkd has quit [Ping timeout: 256 seconds]
B1n4r10 has joined #ruby
nerium has joined #ruby
snockerton has joined #ruby
DoubleMalt has quit [Ping timeout: 246 seconds]
centrx has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
bronson has joined #ruby
nibbo has joined #ruby
joliss has joined #ruby
axl_ has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
karapetyan has quit [Remote host closed the connection]
centrx has quit [Remote host closed the connection]
cats has joined #ruby
Macaveli has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 244 seconds]
Macaveli has quit [Client Quit]
ogpastaling has joined #ruby
yalue has joined #ruby
nixmaniack has quit [Ping timeout: 256 seconds]
TDJACR has quit [Ping timeout: 260 seconds]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
nixmaniack has joined #ruby
sepp2k has joined #ruby
RegulationD has quit [Remote host closed the connection]
Rumbles has quit [Ping timeout: 260 seconds]
saneax_AFK is now known as saneax
moeabdol has quit [Quit: WeeChat 1.3]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
mary5030_ has joined #ruby
eljimmy has joined #ruby
kirun has joined #ruby
supermarin has joined #ruby
supermarin has quit [Remote host closed the connection]
supermarin has joined #ruby
yokel has quit [Ping timeout: 246 seconds]
yokel has joined #ruby
jpfuentes2 has joined #ruby
jgt1 has quit [Ping timeout: 260 seconds]
supermarin has quit [Remote host closed the connection]
bronson has joined #ruby
supermarin has joined #ruby
jbrhbr has joined #ruby
opitka has quit [Quit: Leaving]
nixmaniack has quit [Ping timeout: 250 seconds]
dmolina has quit [Ping timeout: 245 seconds]
duckpuppy has joined #ruby
Encapsulation has joined #ruby
TDJACR has joined #ruby
jpfuentes2 has quit [Ping timeout: 272 seconds]
zast has joined #ruby
nixmaniack has joined #ruby
Caius has joined #ruby
j2p2test has joined #ruby
SenpaiSilver has joined #ruby
bap1313 has joined #ruby
pdoherty has quit [Ping timeout: 250 seconds]
<amit__> dear folks: i am a bit stuck here: end_date = "November 8th 2015, 18:35:31.000"; and here is equivalent parse DateTime command yd = DateTime._strptime(end_date,"%B %d?th? %Y, %H:%M:%S??offset??")
supermarin has quit []
karapetyan has joined #ruby
<amit__> what i am missing is how to capture 8(th) the th in the 8th and the offset time after the seconds?
jpfuentes2 has joined #ruby
christiandsg has joined #ruby
Snowy has joined #ruby
nixmaniack has quit [Ping timeout: 256 seconds]
nixmaniack has joined #ruby
pdoherty has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
colleenmcguckin has joined #ruby
howdoicomputer has joined #ruby
Snowy has quit [Remote host closed the connection]
berserk_ren has joined #ruby
baweaver has joined #ruby
dotix has joined #ruby
dotix has quit [Changing host]
dotix has joined #ruby
yardenbar has joined #ruby
allcentury has joined #ruby
<apeiros> fascinating. there doesn't seem to be a format which includes the ordinal suffix.
<allcentury> ! 1 + 1
<allcentury> how do I execute ruby in here [again] ?
baweaver has quit [Remote host closed the connection]
n1x has joined #ruby
zarubin has joined #ruby
nixmaniack has quit [Ping timeout: 250 seconds]
<apeiros> >> 1+1 # but don't use it for experiments
<ruboto> apeiros # => 2 (https://eval.in/481749)
Snowy has joined #ruby
berserk_ren has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
Snowy has quit [Client Quit]
<allcentury> I won't, can anyone explain to me why #match returns duplicate MatchData results, as an example:
<allcentury> >> str = "mystring123"; matches = str.match(/(mystring)/); puts matches; matches[0] == matches[1]
<ruboto> allcentury # => mystring ...check link for more (https://eval.in/481751)
<apeiros> amit__: ok, the solutions with ordinals are sufficiently ugly that I'd say go with DateTime.parse
jessemcgilallen has joined #ruby
<apeiros> allcentury: your full match is identical to your first capturing group
<apeiros> and matches[0] returns the full match, matches[1] returns the first capturing group
<apeiros> &ri MatchData#[] @allcentury
<`derpy> method `MatchData#[]`: Match Reference -- MatchData acts as an array, and may be accessed using the nor… • http://rubydoc.info/stdlib/core/MatchData#%5B%5D-instance_method
barhum2013 has joined #ruby
linduxed has quit [Quit: WeeChat 1.3]
<apeiros> allcentury: in general it's a *capital* idea to just go and read the docs when stuff does not behave the way you expected it.
<allcentury> ooOOoooo
<allcentury> thanks apeiros that makes sense
yardenbar has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
n1x has quit [Remote host closed the connection]
<apeiros> the remaining question of course is why on earth you have a capturing group which spans the full expression.
kriskropd has joined #ruby
jgt1 has joined #ruby
sucks has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
sucks has joined #ruby
sucks has quit [Read error: Connection reset by peer]
sucks has joined #ruby
zarubin has quit [Remote host closed the connection]
zarubin has joined #ruby
podman has joined #ruby
baweaver has joined #ruby
hardlin3r has joined #ruby
<hardlin3r> hello
<hardlin3r> where is rails channel?
<apeiros> hardlin3r: seriously?
<drbrain> ?ror
<ruboto> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<apeiros> #ror, #rails, #rubyonrails - and it's mentioned on rubyonrails.org
<hardlin3r> apeiros, thx
spider-mario has joined #ruby
* apeiros redirects the thanks to drbrain, I suppose…
<hardlin3r> drbrain, yo
* apeiros now wonders whether #ruby_on_rails also redirects…
zarubin has quit [Ping timeout: 240 seconds]
brunto has joined #ruby
EthanAllen has joined #ruby
<EthanAllen> what is the best way to convince people at work to bring your dog?
IrishGringo has quit [Ping timeout: 250 seconds]
Hounddog has quit [Read error: Connection reset by peer]
supermarin has joined #ruby
<j2p2test> work from home
ogpastaling has quit [Remote host closed the connection]
IrishGringo has joined #ruby
belak has quit [Quit: ZNC - http://znc.in]
hahuang65 has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
<EthanAllen> I would like to bring Nigger to work with me. I feel bad that he stays home every day.
<drbrain> !ban EthanAllen !P
EthanAllen was kicked from #ruby by ChanServ [User is banned from this channel]
moeabdol has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
dlitvak has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby
nixmaniack has joined #ruby
belak has joined #ruby
<mfqr> Confused !P for :P.
dhollinger has quit [Ping timeout: 240 seconds]
<drbrain> similar sentiment
myztic has quit [Quit: leaving]
pyoor has quit [Remote host closed the connection]
<apeiros> stupid troll is stupid.
devoldmx has joined #ruby
<hardlin3r> is ruby dying?
<apeiros> are you a troll?
<shevy> haha
<hardlin3r> no
<hardlin3r> just asking
<hardlin3r> im newbie
<apeiros> ok. no. ruby isn't dying. happy now?
dlitvak has joined #ruby
<hardlin3r> should i trust you?
<apeiros> I dunno, should I trust you not being a troll?
<hardlin3r> i dunno, how can i prove you?
lemur has joined #ruby
baweaver has quit [Ping timeout: 256 seconds]
lemur has quit [Remote host closed the connection]
<hardlin3r> i know "autovivification" word
peterhil_ has quit [Ping timeout: 246 seconds]
<hardlin3r> but it doesnt prove that im not a troll
arup_r has quit []
timonv has quit [Ping timeout: 260 seconds]
<apeiros> hardlin3r: define what "a language is dying" means, find numbers for those metrics, figure out yourself. you can't trust anybody in here. we're all biased.
devoldmx has quit [Ping timeout: 256 seconds]
Meow-J has quit [Quit: Connection closed for inactivity]
<apeiros> (but then again - why'd you trust those "sources" for your numbers in the internet…)
<hardlin3r> you are right, i cant trust anybody
jas02 has joined #ruby
<apeiros> which then bears the question: why did you ask in the first place? an answer you can't trust is meaningless…
jbrhbr has quit [Quit: Leaving.]
hobodave_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
belak has quit [Quit: ZNC - http://znc.in]
nixmaniack has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
<drbrain> we're all dying slowly, and so will all we've built
<drbrain> so all languages are dying
dman777_alter has joined #ruby
edwinvdgraaf has joined #ruby
RegulationD has joined #ruby
qhartman has joined #ruby
anisha has joined #ruby
yardenbar has joined #ruby
yalue has quit [Quit: return 0;]
<amit__> apeiros: that is interesting that it does not include "ordinal suffix" interesting term. Can you please help me make sense if this is right? start_date = "November 7th 2015, 16:35:31.000"; end_date = "November 8th 2015, 18:35:31.000"; (DateTime.parse(end_date)- DateTime.parse(start_date)) / 60
<amit__> apeiros: result of that is => Rational(13, 720) which I cannot make sense out of
babblebre has joined #ruby
<dman777_alter> can you do a assignment with a or operation? foo = bob[apple] or foobar
myztic has joined #ruby
hobodave has joined #ruby
karapetyan has joined #ruby
<toretore> >> bar = false; baz = true; foo = bar or baz; foo
<ruboto> toretore # => false (https://eval.in/481797)
<dman777_alter> toretore: thanks
duckpuppy has quit [Ping timeout: 250 seconds]
<toretore> >> bar = false; baz = true; foo = bar || baz; foo
<ruboto> toretore # => true (https://eval.in/481798)
<toretore> answer: use ||
<dman777_alter> +1
yqt has joined #ruby
<Mon_Ouie> amit__: DateTime#- works in terms of days. You are dividing an amount of days by 60.
Peg-leg has quit [Quit: Leaving.]
codelurker has joined #ruby
nofxx has quit [Ping timeout: 256 seconds]
pyoor has joined #ruby
<toretore> just use Time
<pyoor> Hi all. Is there any built-in methods for getting the cpu usage of a process under windows?
karapetyan has quit [Remote host closed the connection]
<pyoor> /method/module/
dorei has quit []
<amit__> Mon_Ouie: (Time.parse(end_date)- Time.parse(start_date)) then yields me => 93600.0 what is this number?
karapetyan has joined #ruby
<amit__> Mon_Ouie: never mind that was Time vs DateTime
<Mon_Ouie> Time#- with a Time argument returns the difference in seconds
<Mon_Ouie> Date#- and DateTime#- return difference in days
<amit__> Mon_Ouie: DateTime# yields me Rational(13, 12) which basically means it is 13 hours ahead of UTC right?
fantazo has joined #ruby
dmolina has joined #ruby
dmolina has quit [Client Quit]
aryaching has quit [Read error: Connection reset by peer]
<Mon_Ouie> 13/12 days = 26/24 days, which is 1 day and 2 hours
<j2p2test> pyoor: nothing built in but this looks promising - https://github.com/schneems/get_process_mem
s00pcan has joined #ruby
<amit__> Mon_Ouie: hmm mystery solved that makes sense now thank you!!
aryaching has joined #ruby
saddad has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
stamina has quit [Quit: WeeChat 1.3]
myztic has quit [Ping timeout: 256 seconds]
shanemcd has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 250 seconds]
fmcgeough has joined #ruby
shanemcd has joined #ruby
DenSchub has quit [Read error: Connection reset by peer]
myztic has joined #ruby
freerobby has quit [Client Quit]
aryaching has quit [Read error: Connection reset by peer]
codelurker has quit [Quit: Leaving]
nixmaniack has joined #ruby
DenSchub has joined #ruby
pandaant has quit [Remote host closed the connection]
dhollinger has joined #ruby
freerobby has joined #ruby
howdoicomputer has quit [Ping timeout: 272 seconds]
nixmaniack has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 264 seconds]
dlitvak has joined #ruby
beast_ has joined #ruby
beast has quit [Ping timeout: 245 seconds]
stannard has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
stannard has joined #ruby
karapetyan has quit [Remote host closed the connection]
duckpuppy has joined #ruby
malconis has quit [Ping timeout: 250 seconds]
jbrhbr has joined #ruby
belak has joined #ruby
karapetyan has joined #ruby
malconis has joined #ruby
karapetyan has quit [Remote host closed the connection]
beast_ has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
lapide_viridi has joined #ruby
thiagofm has joined #ruby
blackmesa has joined #ruby
Ad-ever has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
beast_ has joined #ruby
baweaver has joined #ruby
nhhagen has joined #ruby
<Ad-ever> ) F r ; { g i 3 h / [ K f ` E / K ~ * ? b J + W | O k 7 r - o B o O : Q f $ ` | A n [
<Ad-ever> Z l P v ( T @ {
<Ad-ever> I > w V u , g D n 9 g e R T # ) \ V 3 L w Z t & C E i y G Y N y v D g * q k 3 i 9 0 % v
<Ad-ever> o I ; Z P ! * Y |
<havenwood> !mute Ad-ever
<Ad-ever> y Q D L g $ n N L W N A j O T @ ^ ] / ( ; = w _ a ~ ^ < H , _ U 3 @ ~ ] w @ n Y ` ] :
Ad-ever has left #ruby [#ruby]
Adever has joined #ruby
dionysus69 has quit [Remote host closed the connection]
<Adever> i think this excited...... GENITAL WARTS! maybe. it is sacd. i think this a game - NFL just this a joke
<Adever> you do you and he who's 23 and is gettingle one partied forbin shit. what does the korn blair witch end old. no then your peace. Raise you so each for preside of 23 and the walk I talking dealing a guy donkey it? i have carpet. if i want pho. Why you run off? he's just invitation. Hi. o god. 23 year olds them like your peace. its too as pressure during with woman right noodle you're talking a
<Adever> gambler
<Adever> I won't think and is over $380 miles from spot in human off a French of random rap on the for married
<havenwood> !mute Adever
<Adever> good girl. by the basektball album. its ok. 1187songs, 12hrs downloading them sucked to kickin my teeth. spit is been has born
<adaedra> I turn my eyes away for a second and this happens
dionysus69 has joined #ruby
shanemcd has quit [Remote host closed the connection]
barhum2013 has quit [Quit: barhum2013]
saneax is now known as saneax_AFK
troulouliou_div2 has quit [Ping timeout: 260 seconds]
bap1313 has quit [Quit: Leaving]
barhum2013 has joined #ruby
brunto has quit [Ping timeout: 256 seconds]
shanemcd has joined #ruby
Adever has quit [Remote host closed the connection]
barhum2013 has quit [Client Quit]
baweaver has quit [Ping timeout: 240 seconds]
<drbrain> if only we could forever be free
houhoulis has joined #ruby
<adaedra> Notice: If you're backloging right now and quick to click links, be very careful.
<drbrain> don't click anything from synflood.at
blackmesa has quit [Ping timeout: 272 seconds]
nixmaniack has joined #ruby
<eam> I mean, it's just hello.jpg right
<eam> probably the most famous image on the internet
<eam> (I didn't click, I'm assuming from the url)
<adaedra> Doesn't mean everyone knows it.
<Mon_Ouie> I would be wary of urls that contain the word "goatse"
<adaedra> And we still aren't unable to unsee.
<adaedra> But that was more for people like me who sometimes click and read the link afterwards
<eam> there are kids old enough to program ruby who weren't yet born when goatse was taken down
<eam> kinda crazy
beast_ has quit [Ping timeout: 256 seconds]
<zotherstupidguy> how i can run code after `system command` is finished?
koneko has joined #ruby
<eam> zotherstupidguy: just put it on the next line. system() returns
yardenbar has quit [Ping timeout: 256 seconds]
<zotherstupidguy> i am not using system() i am using ` `
zeroDivisible has joined #ruby
<eam> ok, well, same answer. both system() and backticks block while the subprocess runs
jessemcgilallen has quit [Read error: Connection reset by peer]
saneax_AFK is now known as saneax
lapide_viridi has quit [Quit: Leaving]
zast has quit [Remote host closed the connection]
<zotherstupidguy> eam it is not working for me!
<eam> zotherstupidguy: care to share code so we can dig in together?
djbkd_ has joined #ruby
<zotherstupidguy> yup
duckpuppy has quit [Ping timeout: 240 seconds]
amclain has joined #ruby
<Ox0dea> Wow, it looks like they plan to go ahead and make Strings frozen by default for 2.3.
<Ox0dea> +'foo' for mutable ones. :<
<jbrhbr> works for me ;)
<toretore> i don't get it.. mutable strings aren't really a big source of problems
duckpuppy has joined #ruby
DoubleMalt has joined #ruby
<Ox0dea> Mutability in general is, to be fair.
<zotherstupidguy> actually `echo 'waait'` doesnt work for me :)
<toretore> zotherstupidguy, gist all your code, then explain what "doesn't work" means exactly
<Ox0dea> zotherstupidguy: Why are you happy about that?
<eam> zotherstupidguy: we need code along with a description of what you see it doing, and what you expect it to do (what does "work" mean?)
<adaedra> Yep, got bitten by it recentrly.
djbkd_ has quit [Ping timeout: 250 seconds]
<shevy> zotherstupidguy can be a long command, it returns until it is finished
<shevy> zotherstupidguy I have that via running long `./configure` things such as for ffmpeg
<jhass> >> require "openssl"; OpenSSL::SSL::SSLSocket.instance_method(:hostname=).source_location # Ox0dea want to solve this puzzle for me?
<ruboto> jhass # => nil (https://eval.in/481838)
<Ox0dea> jhass: It's defined in C?
<shevy> zotherstupidguy, returns # => "wait\n" for me
<toretore> zotherstupidguy, are you expecting it to print "wait" to YOUR stdout?
<eam> jhass: works for me, does eval.in perhaps not have ExtConfig::HAVE_TLSEXT_HOST_NAME?
<eam> >> ExtConfig::HAVE_TLSEXT_HOST_NAME
<ruboto> eam # => uninitialized constant ExtConfig (NameError) ...check link for more (https://eval.in/481839)
<Ox0dea> jhass: Aye, works here as well.
<jhass> eam: I get it locally too
<zotherstupidguy> toretore yes!?
<eam> jhass: I do not!
jessemcgilallen has joined #ruby
<toretore> zotherstupidguy, #` ⇒ String: Returns the standard output of running cmd in a subshell
<eam> jhass: mmmm, I get nil on linux
baweaver has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
<toretore> that is, stdout is different, and whatever it written to it is the return value of the statement
jackjackdripper has joined #ruby
<toretore> puts(`echo hello`)
<zotherstupidguy> toretore what the ri of of #` ?
<jhass> eam: so they override it in C on just linux or something? ugh
<toretore> zotherstupidguy, Kernel
<Ox0dea> jhass: I don't get `nil` and I'm on Arch.
<zotherstupidguy> toretore thanks
karapetyan has quit [Remote host closed the connection]
<Ox0dea> I think it might be to do with your slightly unorthodox setup?
<jhass> Ox0dea: wat
ap4y has joined #ruby
Gnut has quit [Ping timeout: 240 seconds]
<jhass> shouldn't be even active for that pry
shanemcd has quit [Remote host closed the connection]
<jhass> let's run a few more experiments
DoubleMalt has quit [Ping timeout: 240 seconds]
rakm has joined #ruby
<Ox0dea> ~ $ uname -a && ruby -e 'require "openssl"; p OpenSSL::SSL::SSLSocket.instance_method(:hostname=).source_location'
<Ox0dea> Linux 0x0 4.3.0-1-ARCH #1 SMP PREEMPT Mon Nov 2 16:52:35 CET 2015 x86_64 GNU/Linux
<Ox0dea> ["/home/dea/.rubies/ruby-trunk/lib/ruby/2.3.0/openssl/ssl.rb", 256]
<eam> I don't see ExtConfig anywhere
<jhass> Ox0dea: heh, so you do use a custom ruby and not the package
<Ox0dea> Oh, sorry.
<jhass> I only have packaged rubies
Gnut has joined #ruby
<Ox0dea> Yeah, `nil` on 2.2.3.
Cohedrin has joined #ruby
<Ox0dea> Upgrade? :P
baweaver has quit [Ping timeout: 250 seconds]
<jhass> I'd built a package and I bet it would get nil again :P
<jhass> all my rubies return nil
dionysus69 has quit [Ping timeout: 250 seconds]
ta has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
<jhass> maybe they changed it for 2.3? didn't look yet
<eam> my rvm'd rubies on centos return nil, my rvm'd rubies on osx return values
nixmaniack has joined #ruby
<shevy> hah
christiandsg has quit [Remote host closed the connection]
ur5us has joined #ruby
<jhass> so I guess it's openssl version or something?
yardenbar has joined #ruby
KensoDev has joined #ruby
NeverDie_ has joined #ruby
nhhagen has quit [Ping timeout: 256 seconds]
<jhass> https://github.com/ruby/ruby/blob/ruby_2_2/ext/openssl/lib/openssl/ssl.rb#L220 it's not there in 2.2 ... eam how do your OS X rubies < 2.3 return a value at all?
NeverDie has quit [Ping timeout: 245 seconds]
<drbrain> have_macro("SSL_set_tlsext_host_name", ['openssl/ssl.h']) && $defs.push("-DHAVE_SSL_SET_TLSEXT_HOST_NAME")
tomchapin has joined #ruby
<jhass> drbrain: yes, but not present in the 2.2 branch?
dotix has quit [Ping timeout: 256 seconds]
<drbrain> doesn't seem to be
<jhass> method exists though, I wondered why its #source_location is nil while it's defined in Ruby
<jhass> didn't look at the 2.2 branch there yet
roshanavand has joined #ruby
<jhass> now eam says #source_location returns a value for him on OS X regardless of Ruby version?
<drbrain> extconf.rb has the check in 2.2.3
<Ox0dea> It's gotta be that you've got a C method, no?
<drbrain> ↑ yes…
<jhass> and in 2.3 they override the C definition or moved it?
<Ox0dea> Must've?
joliss has quit [Quit: Connection closed for inactivity]
duckpuppy has quit [Ping timeout: 240 seconds]
christiandsg has joined #ruby
minimalism has quit [Quit: leaving]
saddad has joined #ruby
<drbrain> In 2.3 the definition was moved to ruby
colleenmcguckin has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 250 seconds]
colleenmcguckin has joined #ruby
sh4d0wD has joined #ruby
cwong_on_irc has joined #ruby
thiagofm has quit [Ping timeout: 240 seconds]
shanemcd has joined #ruby
towski_ has joined #ruby
aryaching has joined #ruby
skweek has quit [Ping timeout: 245 seconds]
towski_ has quit [Client Quit]
B1n4r10 has quit [Ping timeout: 256 seconds]
ascarter has joined #ruby
duckpuppy has joined #ruby
blackmesa has joined #ruby
KensoDev_ has joined #ruby
djbkd has quit [Remote host closed the connection]
KensoDev has quit [Ping timeout: 250 seconds]
yardenbar has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
Regulati_ has joined #ruby
stannard has quit [Remote host closed the connection]
hardlin3r has quit [Read error: Connection reset by peer]
DanKnox is now known as DanKnox[away]
kfpratt has joined #ruby
dlitvak has quit [Ping timeout: 256 seconds]
thiagofm has joined #ruby
berserk_ren has joined #ruby
RegulationD has quit [Ping timeout: 272 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
myztic has quit [Ping timeout: 272 seconds]
kadoppe has quit [Ping timeout: 260 seconds]
n1x has joined #ruby
yfeldblum has joined #ruby
DoubleMalt has joined #ruby
iamnix has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
n1x has quit [Read error: Connection reset by peer]
nixmaniack has quit [Ping timeout: 250 seconds]
DoubleMalt has joined #ruby
kadoppe has joined #ruby
shanemcd has quit [Remote host closed the connection]
fantazo has quit [Ping timeout: 256 seconds]
dlitvak has joined #ruby
sucks has quit [Ping timeout: 272 seconds]
shanemcd has joined #ruby
rodfersou has quit [Quit: leaving]
hahuang65 has quit [Ping timeout: 250 seconds]
speaking1ode has joined #ruby
thiagofm has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
dionysus69 has quit [Client Quit]
ldnunes has quit [Quit: Leaving]
speaking1ode has quit [Ping timeout: 256 seconds]
stannard has joined #ruby
<Ox0dea> xybre Ox0dea: because :: also works on methods which are not consts
speaking1ode has joined #ruby
<Ox0dea> Fair, but then why couldn't `.` be an "operator" that delegates to #public_send?
teoric has joined #ruby
imperator has joined #ruby
teoric has quit [Client Quit]
<Cork> Anyone know how to handle stderr and stdin with Shell?
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Cork: Haven't you already been advised to use a better tool?
<Cork> no, i've been told to read the source...
shanemcd has quit [Remote host closed the connection]
anisha has quit [Quit: Leaving]
gusrub has joined #ruby
thiagofm has joined #ruby
sandstrom has joined #ruby
berserk_ren has quit [Ping timeout: 256 seconds]
renderf__ has quit [Ping timeout: 260 seconds]
ruby-lang171 has joined #ruby
<ruby-lang171> hello
<ruby-lang171> anyone here
<havenwood> ruby-lang171: hi
<ruby-lang171> i have a question about IT
<havenwood> ruby-lang171: Ruby-related?
<ruby-lang171> is it possible to make the same wage as someone with a diploma
devbug has quit [Ping timeout: 250 seconds]
<ruby-lang171> career question
<ruby-lang171> hm
<ruby-lang171> should i ask a questino there
<shevy> we love questinos
<shevy> also padrinos
<havenwood> ruby-lang171: Or there's the #ruby-offtopic as well.
<havenwood> channel*
<ruby-lang171> ok
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
speaking1ode has quit [Quit: leaving]
drbernardi has joined #ruby
Azulinho has joined #ruby
nixmaniack has joined #ruby
joonty has joined #ruby
drbernardi has quit [Client Quit]
duckpuppy has quit [Ping timeout: 256 seconds]
yardenbar has joined #ruby
drbernardi has joined #ruby
underplank has quit [Quit: underplank]
decoponio has quit [Quit: Leaving...]
devoldmx has joined #ruby
shanemcd has joined #ruby
sucks has joined #ruby
mary5030_ has quit [Remote host closed the connection]
Azulinho has quit [Ping timeout: 240 seconds]
brunto has joined #ruby
shanemcd has quit [Remote host closed the connection]
berserk_ren has joined #ruby
devoldmx has quit [Ping timeout: 272 seconds]
nixmaniack has quit [Read error: Connection reset by peer]
iateadonut has quit [Ping timeout: 246 seconds]
ruby-lang171 has left #ruby [#ruby]
jetpackjoe has joined #ruby
Ox0dea has quit [Read error: Connection reset by peer]
nixmaniack has joined #ruby
shanemcd has joined #ruby
shanemcd has quit [Remote host closed the connection]
n_blownapart has joined #ruby
Encapsulation has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
nettoweb has joined #ruby
atomical has joined #ruby
ruby-lang359 has joined #ruby
<ruby-lang359> hello
<ruby-lang359> what is the offtopic channel again
<adaedra> hi
<adaedra> ?offtopic
<ruboto> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
dfockler has joined #ruby
tomchapin has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical_ has quit [Ping timeout: 240 seconds]
gusrub has quit [Remote host closed the connection]
jetpackjoe has joined #ruby
OrbitalKitten has joined #ruby
weemsledeux has joined #ruby
drbernardi has quit [Read error: Connection reset by peer]
underplank has joined #ruby
svoop has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nateberkopec has quit [Quit: Leaving...]
berserk_ren has quit [Quit: =^.^=]
shanemcd has joined #ruby
berserk_ren has joined #ruby
bronson has quit [Remote host closed the connection]
axl__ has joined #ruby
axl_ has quit [Ping timeout: 272 seconds]
axl__ is now known as axl_
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skweek has joined #ruby
n1x has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
babblebre has quit [Quit: Connection closed for inactivity]
baweaver has joined #ruby
Gnut_ has joined #ruby
dlitvak_ has joined #ruby
bronson has joined #ruby
supermar_ has joined #ruby
Gnut has quit [Ping timeout: 272 seconds]
supermar_ has quit [Read error: Connection reset by peer]
supermar_ has joined #ruby
dlitvak has quit [Ping timeout: 272 seconds]
gusrub has joined #ruby
djbkd has joined #ruby
s00pcan has quit [Ping timeout: 240 seconds]
mallu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
supermarin has quit [Ping timeout: 256 seconds]
p0wn3d has quit [Ping timeout: 260 seconds]
skweek has quit [Ping timeout: 264 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
supermar_ has quit [Ping timeout: 250 seconds]
aryaching has quit [Ping timeout: 256 seconds]
n1x has quit [Read error: Connection reset by peer]
prestorium has quit [Quit: Leaving]
nixmaniack has joined #ruby
lubarch has quit [Ping timeout: 240 seconds]
nixmaniack has quit [Read error: Connection reset by peer]
s00pcan has joined #ruby
nixmaniack has joined #ruby
synthroid has quit []
hahuang65 has joined #ruby
supermarin has joined #ruby
radgeRayden_ has joined #ruby
unreal_ has quit [Ping timeout: 260 seconds]
gusrub has quit [Remote host closed the connection]
tildes has joined #ruby
minimalism has joined #ruby
n_blownapart has quit []
radgeRayden has quit [Ping timeout: 245 seconds]
unreal has joined #ruby
vikas027 has joined #ruby
shanemcd has quit [Remote host closed the connection]
<shevy> hmm... perl is weird to configure from sources: sh Configure -des -Dprefix=/usr -Dvendorprefix=/usr ... via python or ruby, I can use the default ./configure --prefix=/usr
shanemcd has joined #ruby
<adaedra> ?offtopic 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!
jessemcgilallen has quit [Quit: jessemcgilallen]
yardenbar has quit [Ping timeout: 256 seconds]
pyoor has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 244 seconds]
supermarin has quit [Remote host closed the connection]
<shevy> ?spam adaedra
<ruboto> adaedra, I don't know anything about spam
supermarin has joined #ruby
<adaedra> Problem?
pdoherty has quit [Remote host closed the connection]
n1x has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
skweek has joined #ruby
ascarter has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
hadees has joined #ruby
yardenbar has joined #ruby
allcentury has quit [Ping timeout: 272 seconds]
quazimodo has joined #ruby
<hadees> How do you pipe in the contents of a file to a rake task? I want to write a rake task that'll run on heroku but use local data so I was thinking of something like heroku run rake foobar < test.csv
<adaedra> And that doesn't work?
<adaedra> Ah wait, `heroku` is a command to run things remotely, isn't it?
prestorium has joined #ruby
<hadees> adaedra: yeah so it needs to get piped in
<hadees> it doesn't even work locally or rather I can't figure out how to read in the file line by line
<adaedra> The file is on your local computer or distant one?
<hadees> adaedra: local
jbrhbr has quit [Quit: Leaving.]
<imperator> import ?
<hadees> adaedra: it also isn't actually a csv file, it's a weird formated file with json on each line
<hadees> i justed used csv as an example since I figured it would be easier to understand
<adaedra> I don't know heroku, you'll have to look at the heroku command if you can do that
ikeie has joined #ruby
<hadees> adaedra: how would you do it locally?
<hadees> it should work the same
<adaedra> rake foobar < test.csv
freerobby has quit [Read error: Connection reset by peer]
<adaedra> !mute ikeie
<adaedra> let me just take care of that
<adaedra> and don't open links
<hadees> adaedra: what command would read the file in like that in ruby?
quazimodo has quit [Ping timeout: 250 seconds]
<adaedra> !ban ikeie !P Spam
ikeie was banned on #ruby by ChanServ [ikeie!*@*]
ikeie was kicked from #ruby by ChanServ [Banned: Spam]
<hadees> adaedra: is there a way to make it look like a file object?
<adaedra> !unmute ikeie
atomical_ has joined #ruby
<adaedra> hadees: you'd have to have the file on distant machine.
<adaedra> I think the heroko command just runs the file remotely, it won't redirect the input
<adaedra> But I can only make suppositions
<hadees> maybe, i though it would pipe it through
roshanavand has joined #ruby
atomical has quit [Ping timeout: 272 seconds]
<hadees> adaedra: it looks like heroku should support it, what would the ruby look like
<hadees> for it locally?
solenoids has quit [Ping timeout: 260 seconds]
SleepySensei has joined #ruby
akem has quit [Remote host closed the connection]
<hadees> adaedra: ARGF?
<adaedra> hadees: the problem is the transmission of the file to the remote.
ur5us has quit []
<adaedra> Do you have just one file to make it read?
<adaedra> You could use DATA
atomical has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
waka has joined #ruby
<hadees> adaedra: yeah just one file
<adaedra> So yeah, putting it in DATA should be ok for running
freerobby has joined #ruby
<hadees> oh, at the bottom
<hadees> hmm maybe
ap4y has quit [Ping timeout: 256 seconds]
djbkd_ has joined #ruby
<adaedra> hadees: mmh, https://github.com/heroku/heroku/issues/256 makes me think it should be working, i don't know
<adaedra> I can't help you much more here
timonv has quit [Ping timeout: 244 seconds]
dfockler has quit [Ping timeout: 256 seconds]
atomica__ has joined #ruby
<hadees> adaedra: well what I really wanted to make sure is my ruby was right
someonesusernmae has joined #ruby
<hadees> that didn't work locally
atomical_ has quit [Ping timeout: 250 seconds]
<adaedra> hadees: this won't work with <, you have to use $stdin or ARGF
pdoherty has joined #ruby
<hadees> doh, i thought I was using ARGF
<hadees> that might be the issue
<adaedra> You're using ARGV, which gives you the argument of the command line
<hadees> yeah i just noticed that
<hadees> doh
edwinvdgraaf has quit [Remote host closed the connection]
<hadees> adaedra: I still can't get ARGF to work
atomical has quit [Ping timeout: 250 seconds]
<adaedra> code?
edwinvdgraaf has joined #ruby
djbkd_ has quit [Ping timeout: 256 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dorei has joined #ruby
OrbitalKitten has joined #ruby
n1x has quit [Read error: Connection reset by peer]
eljimmy has quit [Quit: Leaving]
juddey has joined #ruby
felixal has joined #ruby
nixmaniack has joined #ruby
dlitvak has joined #ruby
<adaedra> hadees: try with $stdin
<adaedra> Seems ARGF is tainted by rake arguments
Channel6 has joined #ruby
InvGhost has quit [Ping timeout: 246 seconds]
<hadees> adaedra: wooo it works!
dlitvak_ has quit [Ping timeout: 272 seconds]
<hadees> adaedra: thanks!
IrishGringo has joined #ruby
naftilos76 has joined #ruby
houhoulis has quit [Remote host closed the connection]
tildes has quit [Ping timeout: 256 seconds]
FooMunki has quit [Quit: FooMunki]
<eam> >> buf = [*?a..?z].join; p=0; size=6; loop { chunk = buf.slice(p, size); puts chunk; break if chunk.length != size; p += size }
<ruboto> eam # => abcdef ...check link for more (https://eval.in/481897)
<eam> is that a good way to step through a byte buffer in fixed length units? could I write that better?
B1n4r10 has joined #ruby
barhum2013 has joined #ruby
supermarin has quit [Remote host closed the connection]
helpa has joined #ruby
svoop has joined #ruby
B1n4r10 has quit [Ping timeout: 240 seconds]
imperator has left #ruby ["Leaving"]
ur5us has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
prestorium has quit [Quit: Leaving]
ethe has quit [Quit: Textual IRC Client: www.textualapp.com]
supermarin has joined #ruby
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
skweek has quit [Ping timeout: 256 seconds]
asmodlol has quit [Ping timeout: 272 seconds]
naftilos76 has quit [Ping timeout: 250 seconds]
barhum2013 has quit [Quit: barhum2013]
christi__ has joined #ruby
sankaber has quit [Write error: Connection reset by peer]
svoop has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has joined #ruby
asmodlol has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
saneax is now known as saneax_AFK
prestorium has joined #ruby
codecop has quit [Remote host closed the connection]
platzhirsch has joined #ruby
prestorium has quit [Remote host closed the connection]
InvGhost has joined #ruby
SCHAAP137 has quit [Ping timeout: 244 seconds]
SleepySensei has quit [Ping timeout: 250 seconds]
astrostl has joined #ruby
asmodlol has quit [Ping timeout: 256 seconds]
Aerillith has joined #ruby
sankaber has joined #ruby
colegatron has quit [Ping timeout: 256 seconds]
supermarin has quit [Remote host closed the connection]
asmodlol has joined #ruby
htmldrum has joined #ruby
iamnix has quit [Ping timeout: 244 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
Bellthoven has joined #ruby
last_staff has quit [Quit: last_staff]
<ramfjord> sup rubyists - I'm trying to convert database loader script/framework I've been working on to using unix pipes to link together the code that iterates over the data source to the code that inserts the data to the DB
christi__ has quit [Read error: Connection reset by peer]
nixmaniack has quit [Read error: Connection reset by peer]
<ramfjord> I've used marshal for serialization in the past, and like it because it's fast and contains all the metadata I could need
<ramfjord> but because it's a binary format, it doesn't have newlines
asmodlol has quit [Ping timeout: 250 seconds]
<ramfjord> I can't process chunks of it at a time
<ramfjord> any recommendations for some other format? Should I just use JSON?
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
asmodlol has joined #ruby
matrixise has joined #ruby
matrixise has quit [Client Quit]
JDiPierro has quit [Remote host closed the connection]
B1n4r10 has joined #ruby
<c355E3B> ramfjord, message pack or proto buf work?
jeips has joined #ruby
amit__ has quit [Ping timeout: 252 seconds]
<ramfjord> c355E3B: I don't want to have to specify the format up front - for a lot of these the structure is inferred from the layout in the database
<ramfjord> only overridden for what differences there are b/n source and db table
christiandsg has joined #ruby
<c355E3B> messge pack may work if you dont want to use json then
joonty has quit [Quit: joonty]
alexherbo2 has quit [Quit: WeeChat 1.3]
<ramfjord> well, it definitely has IO/streaming unpacking, which is my main requirement
<ramfjord> thanks for the suggestion, I
<ramfjord> 'll take a look
Anderson69s has joined #ruby
nettoweb has quit [Remote host closed the connection]
finisherr has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zeroDivisible has quit [Quit: WeeChat 1.3]
alexherbo2 has joined #ruby
alexherbo2 has quit [Client Quit]
zeroDivisible has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hxegon has joined #ruby
SCHAAP137 has joined #ruby
nettoweb has joined #ruby
<hxegon> hey all. Is there a better way to implement multiple ducktype interfaces like this?: https://gist.github.com/anonymous/b32533f1e6f67d78e8bc
shanemcd has quit [Remote host closed the connection]
berserk_ren has quit [Ping timeout: 250 seconds]
I has joined #ruby
shanemcd has joined #ruby
shanemcd has quit [Remote host closed the connection]
I is now known as Guest73452
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Channel6 has quit [Ping timeout: 272 seconds]
dlitvak has quit [Remote host closed the connection]
supermarin has joined #ruby
<ramfjord> hxegon: can you provide a little more context? Do you want everything with a #read or #to_a method to have a #csv_to_hash method that uses that?
colegatron has joined #ruby
dlitvak has joined #ruby
<ramfjord> if so, then using a mixin module will likely be the solution
prestorium has joined #ruby
<ramfjord> then instead of re-implementing the method, you would ``include CsvToHash``
<hxegon> ramfjord: good idea, but I'm just talking about a way to do either #read or if that fails with NoMethodError, use #to_a
underplank has quit [Quit: underplank]
underplank has joined #ruby
tvw has joined #ruby
KensoDev_ has quit [Remote host closed the connection]
<hxegon> that example works, but it feels like a more idiomatic way should exist
christi__ has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
christiandsg has quit [Ping timeout: 265 seconds]
<ramfjord> hmmm, you could check if csv.respond_to? :read
<ramfjord> eslif csv.respond_to? :to_a
dman777_alter has quit [Quit: Lost terminal]
<hxegon> ramfjord: always forget about that
<hxegon> >> ''.respond_to?(:nope) ? ''.nope : ''.to_s
<ruboto> hxegon # => "" (https://eval.in/481913)
dlitvak has quit [Ping timeout: 240 seconds]
fmcgeough has quit [Quit: fmcgeough]
lemur has joined #ruby
<hxegon> still seems like their should be a better way... :/ guess it will do for now though. Thanks ramfjord
christi__ has quit [Ping timeout: 265 seconds]
astrostl has quit [Quit: Textual IRC Client: www.textualapp.com]
spt0 has quit [Ping timeout: 260 seconds]
underplank has quit [Quit: underplank]
jackjackdripper has quit [Quit: Leaving.]
<ramfjord> hxegon: I think the idiomatic way would probably be to define a #csv_to_hash separately on the different base classes that you're using
jackjackdripper has joined #ruby
IrishGringo has quit [Ping timeout: 250 seconds]
<ramfjord> which I guess would require monkeypatching if you're passing in raw IO objects :/
<ramfjord> though iirc IO#read returns a string, so I'm guessing you're not?
lemur has quit [Ping timeout: 250 seconds]
<hxegon> CSV.read returns Array of Arrays, as does CSV::Table#to_a
jbrhbr has joined #ruby
<hxegon> picking up someone elses code that blindly #split(',') on string input.
saddad has quit [Quit: WeeChat 1.4-dev]
Rumbles has joined #ruby
mary5030 has joined #ruby
<ramfjord> haha, I've definitely been there
howdoicomputer has joined #ruby
prestorium has quit [Quit: Leaving]
<ramfjord> I've never ended up using CSV::Table though
juddey has quit [Remote host closed the connection]
juddey has joined #ruby
<ramfjord> well, I've always used some kind of headers, so I've expected and Array of Hash format
<hxegon> ramfjord: It's kind of frustrating to use, but way better than any alternative when you need to operate on columns/rows based on headers
alexherbo2 has joined #ruby
akem has joined #ruby
<hxegon> Would it be to bad if I aliased CSV::Table#read to #to_a?
Guest73452 has quit [Quit: Leaving]
tomchapin has joined #ruby
tvw has quit [Remote host closed the connection]
underplank has joined #ruby
<hxegon> Actually I'm just going to do that. It's consistent with the way CSV works.
nateberkopec has quit [Quit: Leaving...]
skade has joined #ruby
Rumbles has quit [Ping timeout: 272 seconds]
<ramfjord> makes sense
dwqeqw has joined #ruby
<ramfjord> could also do csv = csv.to_csv if csv.respond_to?(:to_csv) at the beginning
<ramfjord> or something like that
asmodlol has quit [Ping timeout: 272 seconds]
<ramfjord> but to_a seems like one of those cases where it would be hard to come up with an alternative meaning in the CSV context
<ramfjord> so monkey patching doesn't seem too evil
dwqeqw has left #ruby [#ruby]
yfeldblum has joined #ruby
devoldmx has joined #ruby
asmodlol has joined #ruby
underplank has quit [Quit: underplank]
underplank has joined #ruby
Coldblackice has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
devoldmx has quit [Ping timeout: 250 seconds]
[Butch] has quit [Quit: I'm out . . .]
neonalpine has quit []
yardenbar has quit [Ping timeout: 240 seconds]
Anderson69s has quit [Quit: Time to EAT, SLEEP OR WHATEVER BYE!!!!!]
rolfb has joined #ruby
Musashi007 has joined #ruby
jas02 has quit [Quit: jas02]
vF3hNGxc47h8 has joined #ruby
snockerton has quit [Quit: Leaving.]
<eam> is this functional? http://ruby-doc.org/core-1.9.3/GC/Profiler.html I'm getting 0.0 from GC::Profiler.total_time and I'm fairly certain I'm exercising the gc
unreal_ has joined #ruby
<drbrain> >> GC::Profiler.enable; 1_000_000.times { "a".dup.dup.dup.dup }; p GC::Profiler.total_time
<ruboto> drbrain # => (https://eval.in/481919)
howdoicomputer has quit [Ping timeout: 240 seconds]
<drbrain> heh, oops
<drbrain> >> GC::Profiler.enable; 100_000.times { "a".dup.dup.dup.dup }; GC::Profiler.total_time
<ruboto> drbrain # => 0.02089049499999984 (https://eval.in/481920)
<drbrain> eam: ↑
rolfb has quit [Quit: Linkinus - http://linkinus.com]
<drbrain> and my computer is 3x faster than ruboto
unreal has quit [Ping timeout: 250 seconds]
stannard has quit [Remote host closed the connection]
iamnix has joined #ruby
<dorei> >> require 'uri' ; URI::regexp.to_s.size
phillips1012 has joined #ruby
<ruboto> dorei # => 1459 (https://eval.in/481921)
vF3hNGxc47h8 has quit [Ping timeout: 272 seconds]
<eam> yeah hm, that does work - I guess I must just not be hitting the gc at all
allcentury has joined #ruby
pandaant has joined #ruby
arooni has joined #ruby
<drbrain> eam: see also ObjectSpace.count_objects
freerobby1 has joined #ruby
<eam> I'm trying to debug why this: https://gist.github.com/eam/db9b3e7cd3b42743455b gets slow as it runs. I'm seeing what looks like a linear slowdown as the position advances through the large buf
jbrhbr has quit [Quit: Leaving.]
<eam> there's no gc activity at all it seems
JDiPierro has joined #ruby
JDiPierro has quit [Remote host closed the connection]
ap4y has joined #ruby
<eam> if I save the value of "pos" and restart the operation with pos = <saved value> the speed of each loop iteration is just as slow
<eam> is slice() O(n) WRT the string size of the source?
<eam> that's very surprising
freerobby has quit [Read error: Connection reset by peer]
DanKnox[away] is now known as DanKnox
<eam> 20MB into the file and each slice() operation is taking over 100ms
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
InvGhost has quit [Ping timeout: 264 seconds]
KensoDev has joined #ruby
devbug has joined #ruby
edwinvdg_ has joined #ruby
<drbrain> if you have a UTF-8 string, yes slice becomes O(n)
<eam> ooooooh shoot, is it encoding that's biting me?
<eam> well that's silly
<drbrain> yeah, because a character isn't represented by a fixed number of bytes
<eam> yeah gotcha, I just didn't expect slice to do character ops
<eam> looooool, the entire operation finishes near instantly now that I've switched read for binread
<eam> thanks :)
TheHackOps has quit [Disconnected by services]
koneko has quit [Quit: cu]
NotTheFBI has joined #ruby
<eam> about 13k iterations in time it was taking to do *one* iteration with character semantics
<eam> which makes sense when the n=55M
Jackneill has quit [Ping timeout: 240 seconds]
edwinvdgraaf has quit [Ping timeout: 256 seconds]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Azure has quit [Quit: Oops.]
shanemcd has joined #ruby
underplank has quit [Quit: underplank]
<drbrain> heh
dhollinger has quit [Quit: WeeChat 1.3]
zeroDivisible has quit [Quit: WeeChat 1.3]
underplank has joined #ruby
zeroDivisible has joined #ruby
shanemcd has quit [Ping timeout: 256 seconds]
solocshaw has quit [Ping timeout: 260 seconds]
shanemcd has joined #ruby
iamnix_ has joined #ruby
jbrhbr has joined #ruby
iamnix has quit [Ping timeout: 272 seconds]
kirun has quit [Quit: Client exiting]
cajone has left #ruby [#ruby]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Ping timeout: 250 seconds]
atomica__ has quit [Read error: Connection reset by peer]
atomical has joined #ruby
pandaant has quit [Remote host closed the connection]
m3_del has joined #ruby
howdoicomputer has joined #ruby
m3_del has quit [Remote host closed the connection]
Ropeney has joined #ruby
atomical_ has joined #ruby
phillips1012 has quit [Quit: WeeChat 1.2]
floatingpoint has joined #ruby
FooMunki has joined #ruby
chouhoulis has quit [Remote host closed the connection]
phillips1012 has joined #ruby
<floatingpoint> any thoughts as to why dir.glob("/some/dir/**/*") do |path| .... would hang?
<adaedra> big list of files?
<floatingpoint> yes
jessemcgilallen has joined #ruby
houhoulis has joined #ruby
<floatingpoint> 20 - 30k
brunto has quit [Ping timeout: 256 seconds]
<apeiros> then that. also across filesystems? possibly mounted?
<floatingpoint> yes across mounted fs
<apeiros> s/mounted/remote/, sorry
<eam> floatingpoint: look up 'strace' it will give you a good hint of where time is being spent
<floatingpoint> ok
<adaedra> floatingpoint: is `find /some/dir` long too?
diegoviola has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atomical has quit [Ping timeout: 256 seconds]
<floatingpoint> yeah. it's gotta be the NSF mount
<floatingpoint> thanks
skade has joined #ruby
lacuna has joined #ruby
<eam> Not Fast Storage
<floatingpoint> yeah. this is going to take a while
allcentury has quit [Ping timeout: 250 seconds]
mary5030 has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
lxsameer has quit [Quit: Leaving]
whippythellama has quit [Quit: WeeChat 1.3]
mahk has joined #ruby
jbrhbr has quit [Quit: Leaving.]
axl_ has quit [Quit: axl_]
jimmybomb has joined #ruby
hakunin has joined #ruby
roshanavand has quit [Remote host closed the connection]
<jimmybomb> hey guys, im building a web api, is it okay for one api controller to use multiple services ?, eg ProductController has ProductService and CoffeeService and use them both? or is ths considered as a smell? (is it ok for controller to have some business logic?)
ESpiney has quit [Read error: Connection reset by peer]
<toretore> ?rails jimmybomb
<ruboto> jimmybomb, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<toretore> (answer is probably yes, it's ok)
_stu_ has quit [Quit: _stu_]
nhhagen has joined #ruby
jbrhbr has joined #ruby
<jimmybomb> ok thanks
tomchapin has joined #ruby
djbkd_ has joined #ruby
ascarter has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
nateberkopec has joined #ruby
davedev2_ has joined #ruby
<jimmybomb> /msg NickServ VERIFY REGISTER jimmybomb pybzjabeggkr
platzhirsch has left #ruby [#ruby]
davedev24 has quit [Ping timeout: 264 seconds]
<jbrhbr> woops.
<adaedra> shame.
<jimmybomb> woops lol
<jbrhbr> time to change that :)
<jimmybomb> its fine i already registered
djbkd_ has quit [Ping timeout: 256 seconds]
christiandsg has joined #ruby
NeverDie has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
NeverDie_ has quit [Ping timeout: 240 seconds]
__fps__ has quit [Quit: Leaving]
asmodlol has quit [Quit: Leaving]
TheBloke- has quit [Read error: Connection reset by peer]
<hxegon> hunter7
<adaedra> ********
<hxegon> all I see is ************
facereghelp has joined #ruby
<facereghelp> howdy folks.
Coldblackice has quit [Read error: Connection reset by peer]
TheBloke has joined #ruby
<facereghelp> need some help with some software im trying to figure out/write up.
<facereghelp> i like to write up a facial recognition program, but not in a traditional sense.
<jbrhbr> i also tend to prefer non-traditional faces
<facereghelp> normally, you feed in an image to the program, and it will tell you, this person is X. this person is Y. rather than identify people's face, I want the program to lock that person's face into an instance.
Tempesta has joined #ruby
<facereghelp> that way, if this person's face ever shows up again, it'll throw an error saying something like this face is already here.
shellie_ has joined #ruby
<facereghelp> any ideas/suggestions?
<jbrhbr> ignoring the fact that it's not clear to me what this has to do with ruby, why don't you just resolve it downstream?
<facereghelp> what do you mean?
<jbrhbr> your recognition system outputs the recognized faces no matter what, and your conflict resolution system consumes this info and manages conflicts
mary5030_ has joined #ruby
Unicorn| has joined #ruby
Coldblackice has joined #ruby
<facereghelp> I'm afraid I don't understand
Spami has joined #ruby
<baweaver> This isn't something that can or should be done in ruby
<baweaver> I would suggest asking in a Java or C++ channel
<jbrhbr> facereghelp: i'm saying you have two simpler problems, not one weird problem
exadeci has joined #ruby
<jbrhbr> you can solve them separately
bronson has quit [Remote host closed the connection]
spider-mario has quit [Read error: Connection reset by peer]
TomPeed has joined #ruby
underplank has quit [Quit: underplank]
CloCkWeRX has joined #ruby
bronson has joined #ruby
wildlander has joined #ruby
wildlander has quit [Max SendQ exceeded]
nhhagen has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wildlander has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
mary5030_ has quit [Remote host closed the connection]
kobain has quit [Read error: Connection timed out]
cmoneylulz has joined #ruby
gigetoo has quit [Ping timeout: 246 seconds]
gigetoo has joined #ruby
andromedian has joined #ruby
mary5030 has joined #ruby
<andromedian> <%= 'results__grid-details-empty' if property.address.blank? %> why this statement works even though the text is on the left of if?
baweaver has joined #ruby
cdg has quit [Remote host closed the connection]
Cantaberry has quit [Ping timeout: 260 seconds]
iamnix_ has quit [Quit: Quit.]
<jbrhbr> 'expr1 if expr2' is just valid ruby which evaluates expr1 only if expr2 is true
<andromedian> jbrhbr, thanks for answering is there a link to read more on that?
<Caius> andromedian: because `:return_me if true` is a valid ruby statement, that returns `:return_me`
<ramfjord> similar to the perl idiomatic `expr1 && expr2`
<Caius> Ugh, was scrolled up and didn't see the replies.
<andromedian> Thanks everyone for answering
SCHAAP137 has quit [Remote host closed the connection]
mahk has quit [Quit: Quitting]
thiagofm has quit [Ping timeout: 264 seconds]
underplank has joined #ruby
jgt2 has joined #ruby
D9 has joined #ruby
facereghelp has quit [Quit: Page closed]
kobain has joined #ruby
jetpackjoe has joined #ruby