apeiros changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<senoralastair> BraddPitt: ahh. that looks like it's what I'm after
<senoralastair> shevy: is that Object#send you're talking about? I've just pulled up the docs on it. I've read about it briefly before, but have not yet had a chance to use & learn it
<shevy> senoralastair if there is an attr-method for it yes
<dorei> Aeyrix: how about using an ensure block ?
<shevy> >> class Foo; attr :foo; def initialize; @foo = 42; end; end; foo = Foo.new; foo.send :foo
<ruboto> shevy # => 42 (https://eval.in/415504)
<Aeyrix> dorei: I believe trying that caused the application to hang. I'll give it a shot.
startupality has quit [Quit: startupality]
<shevy> senoralastair note that in the last case, the foo.send :foo could become: foo.send your_variable_here.to_sym
<shevy> in your case what you had stored in the array = [ 'name', 'age' ]
<shevy> btw you can write it shorter as: array = %w( name age )
<senoralastair> shevy: ahhhh. that's really cool.
<shevy> you can also use .instance_variable_get() I think
<shevy> but I love .send
<senoralastair> shevy: Yeah, both options look like they'll fit the bill. I'll document both in my notes and I'm sure they'll both be really handy to know. I think I've come across 2 instances in the last 2 days where I could use one of these two. :-)
otisZart has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kallis has quit [Read error: Connection reset by peer]
<Burgestr_> Aeyrix: you found yourself a nice little problem there.
chipotle has joined #ruby
<Aeyrix> Burgestr_: yeah
<Burgestr_> Aeyrix: if I've read everything correct you cannot unlink the file in your response block at all, because the file is not really read before your block finishes.
<Aeyrix> ye
Burgestr_ is now known as Burgestrand
<shevy> senoralastair \o/ it may become much cooler lateron when you generate some methods dynamically
<drbrain> Burgestrand: I think only on windows
northfurr has joined #ruby
rehat has quit [Remote host closed the connection]
tcrypt has quit [Ping timeout: 245 seconds]
<Burgestrand> drbrain: I haven't seen anything platform-specific in either Sinatra::Base#send_file or Rack::File
<Aeyrix> It's not platform-specific.
<Aeyrix> This happens on Unix.
<Aeyrix> I run it on Debian, and test it on OS X.
bluOxigen has joined #ruby
<drbrain> Aeyrix: this should use Tempfile with a block to avoid leaving file descriptors around if there are exceptions
blueOxigen has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
<Burgestrand> To me it looks like Rack::File simply responds to #each, and opens the file once the underlying rack handler starts reading the response (which could happen at some arbitrary time later).
<drbrain> Aeyrix: yeah, use Tempfile with a block to get #42 to execute
<senoralastair> shevy: Yeah. I'm at the beginning of my ruby journey, but really enjoying how cool it is. Now that you've reminded me, I think it was in dynamic methods that I had read about send()
<drbrain> it calls #unlink for you in an ensure
<Aeyrix> drbrain: Rewrote
vdamewood has quit [Ping timeout: 250 seconds]
<shevy> senoralastair yeah, just keep things simple until you really got the simple parts all right, moving to more complex things will be much easier then
<shevy> typically for dynamic methods, one uses things such as self.instance_eval {} or .class_eval {}, and even more importantly so, define_method() {}
<drbrain> Aeyrix: I would write `Tempfile.open(…) do |temp_file| … send_file … end`, but adding the ensure is the same
<shevy> I don't use it in many of my projects... perhaps only ~4%
<Aeyrix> Huh
<Aeyrix> good point
coban2k has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 244 seconds]
Ropeney has joined #ruby
matugm has quit [Quit: Leaving]
<drbrain> too bad send_file doesn't accept an fd
NeverDie has quit [Ping timeout: 260 seconds]
yh_ has quit [Ping timeout: 260 seconds]
kies has joined #ruby
<Burgestrand> Aeyrix: keep in mind that Tempfile.open will only unlink the tempfile after ruby garbage collects the Tempfile object, which may or may not happen reasonably soon.
<Burgestrand> i.e. File.exist?(Tempfile.open("some-prefix") { |io| io.path }) # => true
northfurr has quit [Ping timeout: 246 seconds]
northfurr has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
NeverDie has joined #ruby
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
<Burgestrand> Aeyrix: there's http://www.rubydoc.info/github/rack/rack/Rack/TempfileReaper middleware available with Rack in case you want to make sure files are removed from the filesystem as soon as Rack are done with them.
dr3w has joined #ruby
mandarinkin has quit [Quit: Leaving]
<Aeyrix> Ah yeah, I forgot while I did that
<Burgestrand> drbrain: I still haven't found any windows-specific thing in here, would you happen to know where that code would reside? Is it inside Rack?
<Aeyrix> Burgestrand: Basically
<Aeyrix> I'm writing to a temp-file
<Aeyrix> on the fly
<Aeyrix> as you can see
<Aeyrix> which means I need to call @temp_file.close
<Aeyrix> in order to flush that to disk
<Aeyrix> BEFORE I send_file
<Burgestrand> Aeyrix: yeah, that's OK.
<Aeyrix> I can do that in-block?
<drbrain> Aeyrix: call @temp_file.flush
<drbrain> then close! in ensure
<Aeyrix> ...
<Aeyrix> >.flush
Musashi007 has joined #ruby
<Aeyrix> why don't I find this shit
northfurr has quit [Client Quit]
<drbrain> it's over on IO/File (because delegate)
<Aeyrix> yeah
<Aeyrix> drbrain: Still not clearing. :\
advorak has joined #ruby
<Aeyrix> updated
<Aeyrix> Ignore line 16, I used that to get the folder dir to check clearing on OS X
<Burgestrand> Aeyrix: this is because of what I just wrote, it won't unlink the file, it will only close it.
<drbrain> Aeyrix: as Burgestrand pointed out, you'll want to close! in an ensure after send_file
<Burgestrand> drbrain: … :(
<Aeyrix> Burgestrand: But terminating the process would call garbage collection, right?
sdwrage has joined #ruby
<Burgestrand> Aeyrix: terminating it cleanly, sure.
<drbrain> ↑ yes
<Aeyrix> Burgestrand: SIGQUIT, not SIGKILL
<Aeyrix> Burgestrand: It doesn't.
<Aeyrix> Those files are still there after being terminated.
<drbrain> (I prefer libraries that let me hand an fd over since I can unlink from the start)
<Aeyrix> Sorry, SIGINT, not SIGQUIT.
failshell has joined #ruby
<Aeyrix> Yep, confirmed still there.
<Aeyrix> :\
<Burgestrand> I feel like half of what I'm saying is gone out the window.
<Aeyrix> Your recommendation is the Reaper middleware then?
<Aeyrix> I was hoping I wouldn't need to fit forty parts together to get a simple file drop working with Sinatra tbh.
<Burgestrand> Aeyrix: from what I can read in the sinatra/rack source, it's the *only* solution because you're using send_file, unless you want to hand-roll it.
<Burgestrand> I'll verify it, give me a minute or two.
<Aeyrix> `after`?
B1n4r10 has quit [Ping timeout: 246 seconds]
[H]unt3r has quit [Quit: Leaving]
Inside has left #ruby ["Leaving"]
<drbrain> Tempfile.open(…) do |temp_file| begin … send_file … ensure temp_file.close! end end
<Aeyrix> drbrain: That was my original code.
<Aeyrix> It won't work because of the way Sinatra is delegating responses.
<drbrain> Sinatra can't skip an ensure
monoprotic has quit [Quit: bite me]
alfajor has joined #ruby
<darix> drbrain: wouldnt the block close tempfile anyway?
fella6s has quit [Read error: Connection reset by peer]
<Aeyrix> It closes it, but doesn't unlink it.
<Aeyrix> Unless you do temp_file.close(true)
<drbrain> darix: no, Burgestrand pointed out that it only unlinks during GC
<Aeyrix> ^
<drbrain> ↑
hashrocket has joined #ruby
<Aeyrix> But I confirmed that the GC isn't clearing these tempfiles.
<Aeyrix> w e i r d
baweaver_ has quit [Read error: Connection reset by peer]
<Burgestrand> Tempfile.open() {} will close the file, but won't unlink it. Once the object is garbage collected, the finalizer will unlink it. I'm not positive that it will be GCd on process exit.
<darix> drbrain: seems weird
<drbrain> darix: yeah, which is why it would be nice if you could hand send_file an opened IO
<Aeyrix> ^'
<Aeyrix> That's what I wanted to try instead.
<Aeyrix> It's a base64 encoded file unless it's text.
<Aeyrix> Then it's, well, just text.
<Aeyrix> Oh wait I changed that, it's always b64.
<drbrain> then you could Tempfile.open do |temp_file| temp_file.unlink; …; send_file temp_file end
allcentury has joined #ruby
<darix> lighty has x-send-tempfile
EllisTAA has quit [Quit: EllisTAA]
<darix> then you could leave it to the webserver
<Aeyrix> >lighty
<Aeyrix> >2015
<Aeyrix> People still use that in good conscience?
jenrzzz has joined #ruby
Lucky__ has joined #ruby
<darix> Aeyrix: we even still develop it!
<Aeyrix> lmao
<Aeyrix> Why?
<darix> because we can
<Aeyrix> Fair enough I guess.
hotpancakes has quit [Remote host closed the connection]
<darix> and lighty 2 has a few really nice features
<darix> like vhost map
bronson has joined #ruby
shakes has joined #ruby
yxhuvud has quit [Ping timeout: 244 seconds]
lampshades has joined #ruby
monoprotic has joined #ruby
hotpancakes has joined #ruby
oo_ has joined #ruby
<Burgestrand> Aeyrix: alright, I've verified it, at least on my machine (Mac OS), if you unlink the file *anywhere* in your response handler block, the downloaded file will be empty.
<Aeyrix> Yep.
hashrocket has quit [Ping timeout: 244 seconds]
<Burgestrand> Aeyrix: in short, you cannot unlink the file right then and there, you must use the Reaper.
omegamike has joined #ruby
kies has quit [Ping timeout: 250 seconds]
<darix> Burgestrand: is send_file using the x-sendfile feature ?
Rixius has quit [Ping timeout: 260 seconds]
michael_mbp has quit [Excess Flood]
nofxx has quit [Ping timeout: 245 seconds]
lampshad_ has joined #ruby
nofxx has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
lady_valenz has joined #ruby
<darix> X-Accel* in nginx
rehat has joined #ruby
Rixius has joined #ruby
<Burgestrand> Aeyrix: the Reaper sounds scarier than what it is. The rack specification says that if the response body responds to #close, it will be called. The reaper exploits this by sending a "fake" body, that delegates to the real body, except when #close is called on this fake body it will unlink all tempfiles it knows about. This happens once the client has downloaded the response.
<Burgestrand> darix: I haven't seen anything related to it in the quick view of the source I took just now. I recall there's a special middleware for using X-Sendfile though.
michael_mbp has joined #ruby
marr has quit [Ping timeout: 240 seconds]
<darix> Burgestrand: in that case the close might be called too early
snockerton has quit [Quit: Leaving.]
lampshades has quit [Ping timeout: 250 seconds]
<Burgestrand> Yeah, assuming the underlying webserver supports X-Sendfile, I wonder if #close is still called.
<darix> nginx seems not support x-send-tempfile
bricker has quit [Ping timeout: 252 seconds]
snockerton has joined #ruby
<Burgestrand> darix: here's the relevant code comment: https://github.com/rack/rack/blob/master/lib/rack/sendfile.rb#L8
lady_valenz has quit [Quit: The only meaningful thing we can offer one another is ❤ ❤ ❤ ❤ ❤ ❤]
yxhuvud has joined #ruby
phutchins1 has quit [Ping timeout: 240 seconds]
zanloy has quit [Ping timeout: 250 seconds]
<darix> just a quick shot suggestion
<darix> register a clean up job for the file into a sidekiq (or your favorite queue handler of choice) and cleanup like 5 minutes later?
omegamike has quit [Ping timeout: 255 seconds]
<Aeyrix> oh weird
deol has quit [Ping timeout: 265 seconds]
<Aeyrix> i just got it working out of memory
<Aeyrix> no temp files
<Burgestrand> Since it's a tempfile, it should be fairly safe with just best-effort since it'll be cleaned up by the OS eventually
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<darix> Burgestrand: as long as we dont get cleaned up too early
snockerton has quit [Ping timeout: 265 seconds]
<Aeyrix> It'll never be cleaned up too early.
<Aeyrix> But I actually just got it working without writing to disk at all.
<darix> and yes using x-sendfile is preferred over piping it through the fastcgi/http connection
<Aeyrix> lmao
<Burgestrand> \o/
<Aeyrix> darix: It's stored in redis.
<ght> ayyy lmao
<Aeyrix> In base64
<Aeyrix> because there's a file size limit
shakes has quit [Quit: Leaving]
<darix> Aeyrix: using nginx?
<Aeyrix> (i know, "dude storing files in the db lmao")
<Aeyrix> yes
<Aeyrix> nginx + puma
<Aeyrix> it's mostly for my shitty screenshots
<Aeyrix> tbh
<Aeyrix> darix: But that won't handle uploads + authentication
<darix> sure
einarj has quit [Remote host closed the connection]
<Aeyrix> well, i could do it all with nginx actually
<darix> but you can check redis before hitting the app for GET
<darix> ^^
<Aeyrix> fucking hell
<Aeyrix> DigitalOcean have changed their UI again
mleung has quit [Quit: mleung]
FernandoBasso has quit [Quit: May the force be with you.]
iamninja has quit [Ping timeout: 252 seconds]
<shevy> hehe
mleung has joined #ruby
zanloy has joined #ruby
linuxboy_ has quit [Remote host closed the connection]
jhack32 has quit [Ping timeout: 256 seconds]
Muhannad has joined #ruby
B1n4r10 has joined #ruby
mleung has quit [Client Quit]
<towski__> anyone here use carrierwave
bruno- has quit [Ping timeout: 246 seconds]
<towski__> I am have a dickens of a time getting carrierwave + fog to upload a simple file to s3
jackjackdripper has quit [Quit: Leaving.]
<towski__> in fact the first suggestion for an alternate gem will probably win
<towski__> chuck it i'll use Aws::S3::Client
<towski__> stunt asp libraries
hotpancakes has quit [Remote host closed the connection]
<Aeyrix> yo what was that wolf called in Norse mythology?
<Aeyrix> Fenrir
<Aeyrix> thanks
<Aeyrix> Well, and Skoll
<towski__> did you thank yourself
<Aeyrix> yeah fam
<Aeyrix> I also high fived myself and told me I owe me a coffee.
<towski__> the life of a programmer
<Aeyrix> Yee.
Muhannad has quit [Ping timeout: 246 seconds]
<shevy> I t hought it was Fenris
<Aeyrix> Fenrir.
<shevy> wikipedia disagrees with me :(
<Aeyrix> Fenrir and Skoll.
<shevy> skol isn't that a beer?
<Aeyrix> Yes.
<Burgestrand> towski__ an alternative to carrierwave is refile, but if all you need is a simple upload perhaps the aws-sdk is indeed a better fit. :)
failshell has quit []
phutchins1 has joined #ruby
dr3w has quit [Ping timeout: 245 seconds]
<towski__> I've already made more progress in 5 minutes with AWS than an hour with carrierwave
_lovehandle_ has joined #ruby
<towski__> some libraries just get down and dirty
Me has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Me is now known as Guest71757
<Aria> Hehe, I did MUD occasionally, shevy, but never FaerieMUD
ivanf has quit [Ping timeout: 240 seconds]
MatthewsFace has quit [Read error: Connection reset by peer]
MatthewsFace has joined #ruby
VeganGreg has quit [Ping timeout: 245 seconds]
oo_ has quit [Remote host closed the connection]
ivanf has joined #ruby
zendrix has quit [Ping timeout: 250 seconds]
qubitz has joined #ruby
<shevy> \o/
dr3w has joined #ruby
hotpancakes has joined #ruby
christiandsg has joined #ruby
mesamoo has quit [Quit: Konversation terminated!]
swgillespie has joined #ruby
maletor has quit []
devoldmx has joined #ruby
Musashi007 has quit [Quit: Musashi007]
Guest71757 is now known as VeganGreg
allcentury has quit [Ping timeout: 250 seconds]
michaeldeol has joined #ruby
Muhannad has joined #ruby
<shevy> hmm
devoldmx has quit [Ping timeout: 260 seconds]
<shevy> >> x = StringIO.new; x.instance_variables
<ruboto> shevy # => uninitialized constant StringIO (NameError) ...check link for more (https://eval.in/415505)
<shevy> >> require 'stringio';x = StringIO.new; x.instance_variables
<ruboto> shevy # => [] (https://eval.in/415506)
<shevy> ok no instance variables but...
<shevy> x.string works and stores stuff
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> how do they do that? do they have a variable called @string?
j4cknewt has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
christiandsg has quit [Remote host closed the connection]
yh_ has joined #ruby
lannonbr has joined #ruby
j4cknewt has joined #ruby
rehat has quit []
<Burgestrand> shevy: C
shred45 has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> hmm
<shevy> creepy
<shevy> ghost instance variables!
poguez_ has joined #ruby
NeverDie has quit [Max SendQ exceeded]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
alfajor has quit [Quit: Leaving]
swgillespie has joined #ruby
<drbrain> shevy: it's not even an instance variable, just a field in a C struct: https://github.com/ruby/ruby/blob/trunk/ext/stringio/stringio.c#L24
<shevy> cool
cibs has quit [Ping timeout: 272 seconds]
josh3 has quit [Ping timeout: 250 seconds]
TheHodge has quit [Quit: Connection closed for inactivity]
cibs has joined #ruby
towski__ has quit [Remote host closed the connection]
_lovehandle_ has quit [Ping timeout: 255 seconds]
advorak has quit [Quit: This computer has gone to sleep]
zanloy has quit [Ping timeout: 250 seconds]
qubitz has quit [Ping timeout: 246 seconds]
keyvan has quit [Quit: Connection closed for inactivity]
NeverDie has joined #ruby
olivierrr has joined #ruby
chipotle has quit [Quit: cheerio]
hotpancakes has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 260 seconds]
<shevy> stringio is pretty cool
tkuchiki has joined #ruby
NeverDie has quit [Max SendQ exceeded]
Vile` has quit [Ping timeout: 260 seconds]
<shevy> here you have output from puts
<shevy> and now you don't!
<shevy> it's like a toggle!
saddad has joined #ruby
pocketprotector has joined #ruby
symm- has joined #ruby
NeverDie has joined #ruby
oo_ has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 246 seconds]
Muhannad has quit [Read error: Connection reset by peer]
tokik has joined #ruby
NeverDie has quit [Max SendQ exceeded]
hotpancakes has joined #ruby
NeverDie has joined #ruby
tkuchiki has quit [Quit: Leaving...]
Vile` has joined #ruby
willywos has joined #ruby
tkuchiki has joined #ruby
NeverDie has quit [Max SendQ exceeded]
rbennacer has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
tokik has quit [Quit: leaving]
advorak has joined #ruby
NeverDie has joined #ruby
tokik has joined #ruby
galeido has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby
ValicekB has quit [Ping timeout: 256 seconds]
devbug has joined #ruby
willywos has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
ramfjord has joined #ruby
dorei has quit []
northfurr has joined #ruby
arooni-mobile has joined #ruby
reverse_1ight has quit [Quit: Lost terminal]
nirvdrum has quit [Ping timeout: 250 seconds]
bricker has joined #ruby
Musashi007 has quit [Quit: Musashi007]
devoldmx has joined #ruby
ValicekB has joined #ruby
j4cknewt has quit [Remote host closed the connection]
hotpancakes has joined #ruby
bruno- has joined #ruby
Vile` has quit [Ping timeout: 246 seconds]
tubuliferous_ has quit [Ping timeout: 246 seconds]
Burgestrand has quit []
devoldmx has quit [Ping timeout: 265 seconds]
cscheib has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 256 seconds]
Musashi007 has joined #ruby
bronson has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
auzty has joined #ruby
Musashi007 has quit [Client Quit]
einarj has joined #ruby
mleung has joined #ruby
mleung has quit [Client Quit]
bronson has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Ping timeout: 250 seconds]
cscheib has joined #ruby
B1n4r10 has quit [Quit: Textual IRC Client: www.textualapp.com]
B1n4r10 has joined #ruby
einarj has quit [Ping timeout: 260 seconds]
dr3w has quit [Ping timeout: 246 seconds]
jzigmund has quit [Ping timeout: 246 seconds]
northfurr has quit [Quit: northfurr]
Rickmasta has joined #ruby
dr3w has joined #ruby
omegamike has joined #ruby
Dopagod has quit [Ping timeout: 265 seconds]
silkfox has quit [Ping timeout: 244 seconds]
VeganGreg has quit [Quit: WeeChat 1.2]
oo_ has quit [Remote host closed the connection]
Me has joined #ruby
Me is now known as VeganGreg
_blizzy_ has quit [Ping timeout: 244 seconds]
omegamike has quit [Ping timeout: 250 seconds]
oo_ has joined #ruby
msnyon has quit [Ping timeout: 245 seconds]
tubuliferous_ has joined #ruby
nym has quit [Quit: Connection closed for inactivity]
michael_mbp has quit [Excess Flood]
dh64 has joined #ruby
govg has joined #ruby
willywos has joined #ruby
Quandl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michael_mbp has joined #ruby
blue_deref has joined #ruby
Quandl has joined #ruby
casadei has joined #ruby
rbennacer has quit [Remote host closed the connection]
autofsckk has joined #ruby
dr3w has quit [Ping timeout: 260 seconds]
willywos has quit [Ping timeout: 255 seconds]
dr3w has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
casadei has quit [Ping timeout: 256 seconds]
yfeldblum has joined #ruby
Seich has quit [Ping timeout: 244 seconds]
nullwarp has quit [Ping timeout: 244 seconds]
dented42 has joined #ruby
phutchins1 has quit [Ping timeout: 260 seconds]
arooni-mobile has quit [Remote host closed the connection]
kalzz has quit [Ping timeout: 246 seconds]
ramfjord has quit [Ping timeout: 256 seconds]
VeganGreg has left #ruby ["WeeChat 1.2"]
iamninja has joined #ruby
jordanm has quit [Ping timeout: 244 seconds]
postmodern has quit [Quit: Leaving]
nullwarp has joined #ruby
Seich has joined #ruby
josh3 has joined #ruby
Me1 has joined #ruby
govg has quit [Ping timeout: 264 seconds]
iamninja has quit [Ping timeout: 250 seconds]
kappy has joined #ruby
kalzz has joined #ruby
hotpancakes has joined #ruby
Me1 has quit [Client Quit]
AnoHito has quit [Quit: Leaving]
SuMo_D has joined #ruby
shinnya has quit [Ping timeout: 256 seconds]
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nofxx has quit [Ping timeout: 265 seconds]
dr3w has quit [Ping timeout: 240 seconds]
xaxisx_ has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
mleung has joined #ruby
nofxx has joined #ruby
mleung has quit [Client Quit]
saddad has quit [Ping timeout: 264 seconds]
xaxisx has quit [Ping timeout: 244 seconds]
choke has joined #ruby
baweaver has joined #ruby
braincra- has quit [Quit: bye bye]
charliesome has quit [Quit: zzz]
devbug has quit [Ping timeout: 244 seconds]
northfurr has joined #ruby
bricker has quit [Ping timeout: 255 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oo_ has quit [Remote host closed the connection]
dopie has joined #ruby
oo_ has joined #ruby
pawnbox has joined #ruby
charliesome has joined #ruby
shred45 has quit [Quit: WeeChat 1.2]
braincrash has joined #ruby
choke has quit [Ping timeout: 244 seconds]
blue_deref has quit [Quit: bbn]
Quandl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benlieb has joined #ruby
dented42 has joined #ruby
benlieb has quit [Client Quit]
bronson has joined #ruby
Me1 has joined #ruby
darkf has joined #ruby
ramfjord has joined #ruby
scripore has quit [Read error: Connection reset by peer]
dimasg has quit [Ping timeout: 255 seconds]
Me1 has quit [Client Quit]
n_blownapart has joined #ruby
scripore has joined #ruby
dented42 has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby
saddad has joined #ruby
Rinzlit1 has joined #ruby
postmodern has joined #ruby
jenrzzz has joined #ruby
mclee has quit [Ping timeout: 246 seconds]
Rinzlit has quit [Ping timeout: 246 seconds]
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
Me1 has joined #ruby
j4cknewt has joined #ruby
ctalr has quit [Ping timeout: 250 seconds]
NeverDie has quit [Max SendQ exceeded]
dimasg has joined #ruby
mclee has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
ctalr has joined #ruby
Blaguvest has quit []
rubie has joined #ruby
autofsckk has quit [Quit: leaving]
<rubie> hi all: is anyone good with regular expressions and willing to help out?
<rubie> i need everything after the first equal sign in a link like this: https://www.youtube.com/watch?v=WgcovIu3k9o&index=2&list=PL2E2889396A970B02
<rubie> "WgcovIu3k9o&index=2&list=PL2E2889396A970B02"
mary5030 has joined #ruby
baweaver has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
baweaver has joined #ruby
havenn has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby
oo_ has joined #ruby
advorak has quit [Quit: This computer has gone to sleep]
<Aeyrix> >no Ox
<Aeyrix> >no sevenseacat
<Aeyrix> what is today
<Aeyrix> why live
<ruboto> havenn # => "WgcovIu3k9o&index=2&list=PL2E2889396A970B02" (https://eval.in/415536)
NeverDie has joined #ruby
<havenn> rubie: partition('=').last
Me1 has quit [Quit: WeeChat 1.2]
<Aeyrix> what
sdothum has quit [Ping timeout: 256 seconds]
fedexo has joined #ruby
<rubie> havenn: im not sure i understand your solution
tmtwd has joined #ruby
avahey has joined #ruby
<havenn> rubie: The positive lookbehind Regexp or String#partition?
hotpancakes has joined #ruby
deepu has joined #ruby
diegoviola has quit [Quit: WeeChat 1.2]
<havenn> rubie: Or both?
<rubie> both hah
Me1 has joined #ruby
kies has joined #ruby
NeverDie has quit [Max SendQ exceeded]
<havenn> >> '12=34=56'.partition '='
<ruboto> havenn # => ["12", "=", "34=56"] (https://eval.in/415537)
<havenn> >> '12=34=56'.rpartition '='
<ruboto> havenn # => ["12=34", "=", "56"] (https://eval.in/415538)
<havenn> ruboto: ^
<havenn> rubie: ^
devoldmx has joined #ruby
<rubie> ahhh
<havenn> rubie: From Regexp docs: (?<=pat) - Positive lookbehind assertion: ensures that the preceding characters match pat, but doesn't include those characters in the matched text
<rubie> that should work thanks
tmtwd has quit [Remote host closed the connection]
NeverDie has joined #ruby
Me1 has quit [Client Quit]
<ruboto> havenn # => "WgcovIu3k9o&index=2&list=PL2E2889396A970B02" (https://eval.in/415539)
Me has joined #ruby
<havenn> rubie: Or capture group. ^
Me is now known as Guest99823
tubulife- has joined #ruby
<rubie> havenn: you're the worlds greatest
dimasg has quit [Ping timeout: 244 seconds]
hotpancakes has quit [Ping timeout: 260 seconds]
josh3 has quit [Ping timeout: 272 seconds]
<ruboto> havenn # => "WgcovIu3k9o&index=2&list=PL2E2889396A970B02" (https://eval.in/415540)
devoldmx has quit [Ping timeout: 240 seconds]
deepu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
NeverDie has quit [Max SendQ exceeded]
Guest99823 has quit [Client Quit]
josh3 has joined #ruby
Hal_9000_ has joined #ruby
tubulife- has quit [Ping timeout: 260 seconds]
<Hal_9000_> ANN: Hal Fulton and Johnny Winn are crowdfunding a book, _Elixir for the Functional Rubyist_
<Hal_9000_> Please feel free to support this project! htp://igg.me/at/elixir4rubyists
<ruboto> havenn # => "WgcovIu3k9o&index=2&list=PL2E2889396A970B02" (https://eval.in/415542)
NeverDie has joined #ruby
rehat has joined #ruby
<havenn> Hal_9000_: Front of your link got cut off.
<havenn> Hal_9000_: One of the t's rather.
<Hal_9000_> well, darn. left off a t? http://igg.me/at/elixir4rubyists
<Hal_9000_> yes, thanks
<havenn> Hal_9000_: <3 Elixir :)
josh3 has quit [Ping timeout: 255 seconds]
lxsameer has joined #ruby
lxsameer has joined #ruby
<rehat> Having trouble reading ruby docs. I am using a method open(some_url, 'wb') but I don't know where this 'wb' is? I think the method is from open-uri but I don't see that param in the docs
<Hal_9000_> i think that’s “write binary”?
<Hal_9000_> no, that doesn’t make sense
<rehat> well the url is a video file
<rehat> but I don't know how to find the list of modes I can use
<Hal_9000_> well, i think it is something like modes yes
<Hal_9000_> let me look
NeverDie has quit [Max SendQ exceeded]
hotpancakes has joined #ruby
baweaver_ has joined #ruby
ruby-lang122 has joined #ruby
<Hal_9000_> this may be the key phrase - look under Kernel - “Otherwise, the original #open is called.”
baweave__ has joined #ruby
shred45 has joined #ruby
devbug has joined #ruby
<ruby-lang122> Quick question, I am calling a method and I have a loop inside the method but it is not running, The method exits after one iteration. Is there some kinda rule that when you call a method it has to be called inside a loop? It should just loop inside itself until it's done I would think
<ruby-lang122> Where would I post the code so you could look at it?
<Radar> ruby-lang122: Show us the code please.
<Radar> ?gist
<ruboto> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
gix has quit [Ping timeout: 264 seconds]
<ruby-lang122> do you need the entire code or just the method that I'm trying to loop?
fedexo has quit [Ping timeout: 244 seconds]
baweaver_ has quit [Ping timeout: 246 seconds]
<havenn> ruby-lang122: You explicitly `return` early.
gix has joined #ruby
jtdoncas has quit [Ping timeout: 246 seconds]
<ruby-lang122> but only if they enter "n'
<havenn> ruby-lang122: Are you wanting to map to the new values? You're using #each not #map.
hotpancakes has quit [Ping timeout: 260 seconds]
<havenn> ruby-lang122: There are other returns.
<ruby-lang122> I'm just using each of the element's in the array to name the next card that's drawed
<havenn> ruby-lang122: Take out the early returns and it won't return early.
RegulationD has joined #ruby
<ruby-lang122> but I need them, they have purpose. This code runs perfect if it's inside the exsiting method but I took it out to clean things up and put it in it's own method
SuMo_D has quit [Quit: Off into this... Real world place...]
coban2k has joined #ruby
BTRE has quit [Quit: Leaving]
mary5030 has quit [Remote host closed the connection]
olivierrr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenn> ruby-lang122: Hard to say from what you've shown.
mary5030 has joined #ruby
havenn is now known as havenwood
RegulationD has quit [Ping timeout: 260 seconds]
baweave__ is now known as baweaver_
Torrieri has quit [Quit: Be back later ...]
baweaver has quit [Disconnected by services]
baweaver_ is now known as baweaver
baweaver_ has joined #ruby
<ruby-lang122> I understand, But just to clear thing's up, The method should run until 1 of 3 are met, 1. They bust (go over 21) 2. Their total is equal to 21 and 3. They enter "n" to exit
<ruby-lang122> Also I can take all of the code directly out of that method and place it back inside the method that is calling it and it works perfect. It's the fact that i put it inside it's own method and calling it that is messing things up
<rehat> Trying to understand this script https://gist.github.com/rehat/99b74b1e62cc91a8aa20 is the open on line 1 and 4 using open-uri and the open on line 3 is just a File open?
tmtwd has joined #ruby
psy_ has quit [Remote host closed the connection]
fantazo has joined #ruby
omegamike has joined #ruby
lannonbr has quit [Quit: WeeChat 1.2]
Aeyrix_ has joined #ruby
hj2007 has quit [Quit: This computer has gone to sleep]
<ruby-lang122> do you have the open-uri gem installed?
<rehat> yeah
arescorpio has joined #ruby
sameerynho has joined #ruby
Aeyrix has quit [Quit: ZNC - http://znc.in]
Aeyrix_ is now known as Aeyrix
<rehat> just trying to understand how to read that and know which class open is being called
psy_ has joined #ruby
omegamike has quit [Ping timeout: 246 seconds]
psy_ has quit [Max SendQ exceeded]
lxsameer has quit [Ping timeout: 250 seconds]
<ruby-lang122> so as long as you have require 'open-uri' in your controller or where ever you're using this then 'open' should work as an http request
psy_ has joined #ruby
einarj has joined #ruby
pawnbox has quit [Remote host closed the connection]
fowl has left #ruby [#ruby]
NeverDie has joined #ruby
astrobun_ has joined #ruby
chuy has quit [Ping timeout: 256 seconds]
nahtnam has joined #ruby
einarj has quit [Ping timeout: 265 seconds]
saddad has quit [Ping timeout: 244 seconds]
j4cknewt has quit [Remote host closed the connection]
n_blownapart has quit [Quit: Leaving]
chuy has joined #ruby
casadei has joined #ruby
ruby-lang122 has quit [Ping timeout: 246 seconds]
lxsameer_ has joined #ruby
ledestin has joined #ruby
sameerynho has quit [Ping timeout: 252 seconds]
casadei has quit [Ping timeout: 245 seconds]
rubie has quit [Remote host closed the connection]
RobertBirnie has quit [Ping timeout: 260 seconds]
qiukun has joined #ruby
RobertBirnie has joined #ruby
sameerynho has joined #ruby
dimasg has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
lxsameer_ has quit [Ping timeout: 240 seconds]
baweaver has quit [Read error: Connection reset by peer]
bricker has joined #ruby
tmtwd has quit [Remote host closed the connection]
dseitz has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
dimasg has quit [Ping timeout: 272 seconds]
NeverDie has quit [Max SendQ exceeded]
Channel6 has joined #ruby
iamninja has joined #ruby
n_blownapart has joined #ruby
solars has joined #ruby
Meow-J has joined #ruby
j4cknewt has joined #ruby
NeverDie has joined #ruby
pawnbox has joined #ruby
mary5030 has quit [Remote host closed the connection]
radgeRayden has joined #ruby
iamninja has quit [Ping timeout: 250 seconds]
weemsledeux has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
hotpancakes has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
NeverDie has quit [Max SendQ exceeded]
modern has quit [Read error: Connection reset by peer]
casadei has joined #ruby
hololeap has joined #ruby
northfurr has quit [Quit: northfurr]
hotpancakes has quit [Ping timeout: 265 seconds]
northfurr has joined #ruby
maxiu has quit [Remote host closed the connection]
modern has joined #ruby
modern has joined #ruby
AlexRussia has joined #ruby
casadei has quit [Ping timeout: 250 seconds]
jtdoncas has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
n_blownapart has quit [Quit: Leaving]
kidoz has quit [Quit: Ухожу я от вас]
northfurr has quit [Quit: northfurr]
NeverDie has joined #ruby
yardenbar has joined #ruby
jtdoncas has quit [Ping timeout: 265 seconds]
dopie has joined #ruby
dhjondoh has joined #ruby
Azure has quit [Ping timeout: 256 seconds]
NeverDie has quit [Max SendQ exceeded]
sbhatore has quit [Read error: Connection reset by peer]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
riotjones has joined #ruby
riotjones has quit [Read error: No route to host]
riotjones has joined #ruby
sbhatore has joined #ruby
sameerynho has quit [Ping timeout: 244 seconds]
sameerynho has joined #ruby
davedev24 has quit []
railswebdev has quit [Ping timeout: 246 seconds]
hakunin has quit [Remote host closed the connection]
coban2k has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 246 seconds]
Feyn has joined #ruby
coban2k has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
techsethi has joined #ruby
jacyzon has joined #ruby
arescorpio has quit [Quit: Leaving.]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
NeverDie has joined #ruby
tubulife- has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
chrissonar has joined #ruby
tubulife- has quit [Ping timeout: 272 seconds]
aganov has joined #ruby
khebbie has joined #ruby
AnoHito has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
ezio_ has joined #ruby
khebbie has quit [Remote host closed the connection]
devoldmx has joined #ruby
khebbie has joined #ruby
Timba-as has joined #ruby
jenrzzz has joined #ruby
vdamewood has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
vdamewood has quit [Max SendQ exceeded]
howdoico1 has joined #ruby
ezio_ has left #ruby [#ruby]
danieli has quit [Quit: *does an epic backflip into nowhere*]
TomyLobo has joined #ruby
hotpancakes has joined #ruby
ferhaty has joined #ruby
vdamewood has joined #ruby
tubuliferous_ has quit [Ping timeout: 260 seconds]
hotpancakes has quit [Ping timeout: 256 seconds]
_ht has joined #ruby
coban2k has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
qiukun has quit [Remote host closed the connection]
Guest63985 is now known as adam12
pabs has quit [Ping timeout: 252 seconds]
qiukun has joined #ruby
ddv has quit [Changing host]
ddv has joined #ruby
lxsameer_ has joined #ruby
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TTilus has quit [Ping timeout: 264 seconds]
ItSAN____ has quit [Quit: Leaving...]
TvL2386 has joined #ruby
pabs has joined #ruby
yardenbar has quit [Quit: Leaving]
riotjones has joined #ruby
roolo has quit [Remote host closed the connection]
fantazo has quit [Quit: Verlassend]
roolo has joined #ruby
hotpancakes has joined #ruby
sameerynho has quit [Ping timeout: 252 seconds]
oo_ has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
oo_ has joined #ruby
TvL2386 has quit [Ping timeout: 252 seconds]
hotpancakes has quit [Ping timeout: 265 seconds]
Alayde has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
codecop has joined #ruby
hololeap has quit [Ping timeout: 264 seconds]
dhjondoh has quit [Quit: dhjondoh]
sdwrage has quit [Quit: This computer has gone to sleep]
advorak has joined #ruby
eGGsha has joined #ruby
yfeldblum has joined #ruby
howdoi has joined #ruby
avahey has quit [Quit: Connection closed for inactivity]
TTilus has joined #ruby
bruno- has quit [Ping timeout: 245 seconds]
einarj has joined #ruby
banister has joined #ruby
tubuliferous_ has joined #ruby
<miah> hi
frem has quit [Quit: Connection closed for inactivity]
sdwrage has joined #ruby
ItSANgo has joined #ruby
xcesariox has joined #ruby
<ironcamel> is rubygems down?
<ironcamel> i'm getting: Unable to download data from https://rubygems.org/ - Errno::EHOSTUNREACH: No route to host - connect(2) for "api.rubygems.org" port 443 (https://api.rubygems.org/specs.4.8.gz)
<miah> looks fine
jackjackdripper has joined #ruby
<ironcamel> when i gem install bundler
einarj has quit [Ping timeout: 240 seconds]
<ironcamel> hmmm
<miah> gem update works for me too
ndrei has quit [Ping timeout: 272 seconds]
TvL2386 has joined #ruby
jackjackdripper has quit [Client Quit]
<ironcamel> gem update gives me the same error :/
<miah> seems like your network is fubar in some way
ta has quit [Remote host closed the connection]
dhjondoh has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
troulouliou_div2 has joined #ruby
danieli has joined #ruby
rehat has quit [Remote host closed the connection]
leat has joined #ruby
krz has joined #ruby
<Radar> ironcamel: how did you install Ruby?
<Radar> Is it possible to return the parent+child in these ElasticSearch queries? https://gist.github.com/radar/9f0c2c2c5c3e1d620207 For instance, I want to see both the info for "Bont Vaypor Road Cycling Shoe" as well as the variant that matched the query.
Igor2__ has joined #ruby
rubie has joined #ruby
<Radar> I can of course make two queries (one for product and one for variant) but I was hoping someone knew the way to do only one query.
kies has quit [Ping timeout: 240 seconds]
TomyLobo has quit [Ping timeout: 260 seconds]
sbhatore has quit [Read error: Connection reset by peer]
leat has quit [Ping timeout: 246 seconds]
sinkensabe has joined #ruby
sbhatore has joined #ruby
skade has joined #ruby
weemsledeux has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: zzz]
iamninja has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
charliesome has joined #ruby
charliesome has quit [Client Quit]
krz has quit [Quit: WeeChat 1.2]
k3asd` has joined #ruby
charliesome has joined #ruby
<ironcamel> Radar: i'm using rvm. everything all of a sudden started working now
<Radar> MAGIC
<ironcamel> i probably was having a network hiccup
<baweaver_> it fears Radar, and rightly so
iamninja has quit [Ping timeout: 265 seconds]
baweaver_ is now known as baweaver
hotpancakes has joined #ruby
davedev24 has joined #ruby
skade has joined #ruby
Philipp__ has joined #ruby
vdamewood has quit [Quit: Life beckons.]
greenarrow has joined #ruby
maletor has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
Cust0sLim3n has quit [Ping timeout: 240 seconds]
psy_ has quit [Remote host closed the connection]
niemcu has joined #ruby
leat has joined #ruby
oo_ has quit [Remote host closed the connection]
niemcu has quit [Client Quit]
RegulationD has joined #ruby
rubie has quit [Remote host closed the connection]
roolo has quit [Remote host closed the connection]
TvL2386 has quit [Ping timeout: 252 seconds]
rubie has joined #ruby
roolo has joined #ruby
<Ropeney> radar: Was that ES stuff before for spree?
charliesome_ has joined #ruby
charliesome_ has quit [Client Quit]
charliesome_ has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
duncannz has quit [Max SendQ exceeded]
charliesome has quit [Quit: zzz]
charliesome_ has quit [Client Quit]
charliesome has joined #ruby
ta has joined #ruby
djbkd has joined #ruby
duncannz has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
Cust0sLim3n has joined #ruby
krz has joined #ruby
dcarmich has joined #ruby
<certainty> moin hackers :)
tubuliferous_ has quit [Ping timeout: 246 seconds]
Juanchito has joined #ruby
eGGsha has joined #ruby
triangles has quit [Ping timeout: 264 seconds]
oo_ has joined #ruby
baweaver has quit [Remote host closed the connection]
ecksit has joined #ruby
TvL2386 has joined #ruby
<miah> moin
<miah> almost bed time for me though =)
robbyoconnor has quit [Remote host closed the connection]
ndrei has joined #ruby
bronson has quit [Remote host closed the connection]
jtdoncas has joined #ruby
tubuliferous_ has joined #ruby
sameerynho has joined #ruby
robbyoconnor has joined #ruby
lxsameer_ has quit [Ping timeout: 244 seconds]
oo__ has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
tubuliferous_ has quit [Ping timeout: 264 seconds]
hotpancakes has joined #ruby
Iskarlar has joined #ruby
DoubleMalt has joined #ruby
arup_r has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
kp666 has quit [Remote host closed the connection]
baweaver has joined #ruby
Iskarlar has quit [Max SendQ exceeded]
robbyoconnor has joined #ruby
jtdoncas has quit [Ping timeout: 240 seconds]
<arup_r> Hi. I am using whenevr gem to run some rake tasks every 1 hour. But it is not running in the server.. Any idea what is wrong here ? https://gist.github.com/aruprakshit/f5c9238d939a2b756b91
Iskarlar has joined #ruby
bricker has quit [Ping timeout: 246 seconds]
<adaedra> Bonjour
akjf has joined #ruby
<akjf> hello
ndrei has quit [Ping timeout: 250 seconds]
davedev24 has quit [Ping timeout: 255 seconds]
hotpancakes has quit [Ping timeout: 246 seconds]
<advorak> https://gist.github.com/advorak/99d8067df501626c05d8 - on line 13-15, when I click an a.clickable_run_number link, the first click doesn't register (it registers an error "data = undefined") and the second and subsequent times I click a.clickable_run_number it works. Maybe I need a good night's sleep in order to troubleshoot this, but any suggestions are appreciated :-)
baweaver has quit [Remote host closed the connection]
<akjf> can anyone define method in elegent way?
Tempesta has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
<ljarvis> advorak: this is the Ruby channel
<advorak> oops :-)
<advorak> thanks.
<advorak> sorry .. wrong tab :-)
<adaedra> akjf: what do you mean
<advorak> that's definitely confirmation i should sleep :-)
* adaedra throws advorak a pillow
<advorak> thanks, adaedra ! :-)
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<arup_r> and me ? :)
<hanmac> ping shevy
<adaedra> arup_r: sorry, that was my last one
<akjf> define method in appropirate way?
<adaedra> def method(param, param2)
<adaedra> end
Oka has quit [Quit: さようなら]
<arup_r> any way.. I am also in the incorrect channel posted it seems
<adaedra> that's how you define a method, akjf
<adaedra> If you have a problem, state it clearly
<ljarvis> arup_r: I don't personally think this has anything to do with Ruby or whenever
<ljarvis> arup_r: whenevr just writes your cron, if they're not running it's because of something else
thiagovsk has joined #ruby
<arup_r> Yes.. I am trying to figure out what is the reason..
anisha has joined #ruby
AlphaAtom has joined #ruby
DoubleMalt has quit [Ping timeout: 260 seconds]
poguez_ has quit [Quit: Connection closed for inactivity]
postmodern has quit [Quit: Leaving]
ndrei has joined #ruby
stardiviner has joined #ruby
Violentr has joined #ruby
baroquebobcat has joined #ruby
mikecmpbll has joined #ruby
devoldmx has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
sameerynho has quit [Quit: Leaving]
sameerynho has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
shred45 has quit [Ping timeout: 240 seconds]
jacyzon has quit [Quit: Connection closed for inactivity]
Tempesta has joined #ruby
yh_ has quit [Ping timeout: 250 seconds]
devoldmx has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
omegamike has joined #ruby
ecksit has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
advorak has quit [Quit: This computer has gone to sleep]
maletor has quit [Quit: Computer has gone to sleep.]
jenrzzz has joined #ruby
tomphp_ has joined #ruby
symm- has quit [Ping timeout: 245 seconds]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baroquebobcat has quit [Quit: baroquebobcat]
eGGsha has joined #ruby
mikecmpbll has joined #ruby
hotpancakes has joined #ruby
Violentr has quit [Ping timeout: 240 seconds]
jackjackdripper has joined #ruby
jackjackdripper has quit [Client Quit]
eGGsha has quit [Client Quit]
eGGsha has joined #ruby
<Igor2__> [spoiler]: ping
conor_ has joined #ruby
omegamike has quit [Ping timeout: 255 seconds]
<[spoiler]> Igor2__: yo :)
theRoUS has quit [Ping timeout: 255 seconds]
hotpancakes has quit [Ping timeout: 255 seconds]
<Igor2__> hi
<Igor2__> this morning I spent some time experimenting with mruby
<Igor2__> it was a gerat idea, tahnks again!
ferhaty has quit []
<Igor2__> took like half an hour to hack up a workign prototype of the main featuers i'll need
<Igor2__> getting the function name in the dispatcher is not clean, tho:
<Igor2__> there's a self object on the argument list of the c function
troulouliou_div2 has quit [Quit: Leaving]
<Igor2__> but that points to the object that initiated the call, so it's the caller's object, not the callee's
<Igor2__> I didn't find any clean way to extract callee info
<Igor2__> but I've found a hackish path through the mrb state to a stack where i could extrac my symbol ID
troulouliou_div2 has joined #ruby
<[spoiler]> the self is the receiver of the method (function) call
<Igor2__> so it would work, although it's a bit ugly at that part
<Igor2__> yeah, it's called recv in vm.c
<Igor2__> (i have no idea what a receiver is, i'm not an OOP guy)
joonty has joined #ruby
<[spoiler]> object.method() object receives a method call (function call) method
<apeiros> Igor2__: in my_array.first(4), my_array is the receiver (you call the method on that object)
<Igor2__> for the reference, this is my current test code: http://igor2.repo.hu/tmp/mruby/
<[spoiler]> ok sorry for the weird naming, let me reiterate
<[spoiler]> foo.bar() object foo receives a method call (function call) bar
<Igor2__> clear now, thanks
<Igor2__> i've grepped the API for callee but didn't find anything
<[spoiler]> in C, that is like passing a pointer in the first aparameter (which is what mruby API does, except that it's the second parameter since the first one is the mrb state)
<Igor2__> checked vm.c but i think it doesn't pass on any argument that gives me the callee name/ID cleanly
<[spoiler]> Igor2__: actually, there's nothing that will pass that information *but* let me test something real quick
<[spoiler]> Ah I don't have mruby installed at work, drat. Gimme a few minutes then to download it
<Igor2__> ok, thanks in advance
bodgix has joined #ruby
ferhaty has joined #ruby
leafybas_ has quit [Remote host closed the connection]
rdark has joined #ruby
mandarinkin has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
clocKwize has joined #ruby
shredding has joined #ruby
clocKwize has quit [Max SendQ exceeded]
devbug has quit [Read error: Connection reset by peer]
akjf has quit [Ping timeout: 246 seconds]
tomphp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has quit [Ping timeout: 265 seconds]
<[spoiler]> ok just to see ifi got it right, you need the name of the current method being called, or the method which called the method?
<[spoiler]> if I*
tkuchiki has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
code1o6 has quit [Read error: Connection reset by peer]
ruby-lang447 has joined #ruby
code1o6 has joined #ruby
<ruby-lang447> How would you change two duplicate item's in an array into to separate values, here is an example https://gist.github.com/anonymous/6f863d3f24d847a46e29
tomphp_ has joined #ruby
<ruby-lang447> This way assigns both the same value obviously, but how would I change one and then change the other one
<Igor2__> [spoiler]: the name of the method being called
<Igor2__> so i register ruby symbol foo and foo2, both calling cfunc() and in cfunc() i want to see if it was foo or foo2 that mtriggered the call
<[spoiler]> Igor2__: in that case, you can use `mrb_value mrb_f_method(mrb_state *mrb, mrb_value self)`
stardiviner1 has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
<Igor2__> thanx, will try
Thermatix has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Max SendQ exceeded]
einarj has joined #ruby
Iskarlar has quit [Quit: Textual IRC Client: www.textualapp.com]
<[spoiler]> Igor2__: vim +16 mrbgems/mruby-kernel-ext/src/kernel.c # inside mruby-1.1.0
bronson has joined #ruby
Macaveli has joined #ruby
<ruby-lang447> How would you change two duplicate item's in an array into to separate values, here is an example https://gist.github.com/anonymous/6f863d3f24d847a46e29 this way save's both with the same value obviously, how can I change each one?
<[spoiler]> ruby-lang447: I am not sure what you want to do
nuttermb has joined #ruby
<Igor2__> hmm, is this a public call?
<[spoiler]> Do you want the result to be [1, 11]?
stardiviner has quit [Ping timeout: 264 seconds]
<Igor2__> can't seem to find it in any of the system installed headers
<ruby-lang447> I would like to change one "A" to 1 and one "A" to 11 or both to 11 or both to 1
charliesome has joined #ruby
<[spoiler]> Igor2__: Huh? It's part of the Kernel module (Kerbel#__method__)
Iskarlar has joined #ruby
<[spoiler]> so it'll likely be inside mrbgems
marr has joined #ruby
<ruby-lang447> basically the user has two choices 1 or 11 and they get to pick which value to use for the "A"'s
<[spoiler]> ruby-lang447: ah. Just move your gets inside the map block
<[spoiler]> and your puts, probably
<[spoiler]> and put them inside the if body, too
<shredding> My ubuntu crashes once in a while with Aug 10 21:54:03 tools kernel: [63481.188427] schedule[11674]: segfault at 7ffef72980e0 ip 00007f3296ed2e2f sp 00007ffef72980e0 error 6 in libruby-2.2.so.2.2.0[7f3296d3b000+263000]
einarj has quit [Ping timeout: 246 seconds]
<apeiros> shredding: update to ruby 2.2.2
<shredding> what's this libruby-2.2.so.2.2.0?
<apeiros> that's ruby
cheeti has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
Thermatix has quit [Ping timeout: 255 seconds]
<shredding> apeiros: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux-gnu]
bumbar_ has joined #ruby
<shredding> I have that ruby.
<Igor2__> on debian i have mruby 1.0.0
apfeluser has joined #ruby
<[spoiler]> Igor2__: did you install it from the repo?
<Igor2__> in 1.0.0, it's a static function
<Igor2__> from debian testing
startupality has joined #ruby
<[spoiler]> yes it should be a function
<Igor2__> i mean it's a static function so i won't be able to call it from my project
<[spoiler]> later it should be deined as a method: ` mrb_define_method(mrb, krn, "__method__", mrb_f_method, MRB_ARGS_NONE());`
<shredding> apeiros: How would i update that? I thought it's the latest (the server got setup a few days ago)
<[spoiler]> Why not? :o
<apeiros> 2.2.2 is the latest. but libruby-2.2.so.2.2.0 sounds like it was 2.2.0. wondering whether they use the ABI version number there.
<apeiros> but can't find the .dylibs or .bundle's rvm creates. so can't compare.
<Igor2__> [spoiler]: if that "Why not? :o" was for me: well, i'm not developing mruby, i'm developing an application that's using mruby through the public API, so i can't call any hidden internal stuff (and a static function is a hidden internal)
sdwrage has joined #ruby
<shredding> apeiros: "ruby2.2 is already the newest version."
<[spoiler]> Igor2__: oh okay
<shredding> i don't use rvm.
<Igor2__> I think my current hack sort of works
<[spoiler]> then do `mrb_load_string(mrb, "__method__");`
<Igor2__> hmm, checking
sideshowcoder has joined #ruby
<Igor2__> i get empty string for that
startupality has quit [Read error: Connection reset by peer]
<[spoiler]> Igor2__: it should return a symbol
<Igor2__> and the symbol ID i got differs from the function symbols i registered
<[spoiler]> bizarre; what did you get?
<Igor2__> i got a symbol, 361
<Igor2__> foo and foo2 are 622 and 623
<Igor2__> i guess 361 is the caller's ID
<[spoiler]> symbols are all integers, you need to resolve it
<Igor2__> clear
pawnbox has joined #ruby
<Igor2__> but i'd expect i'd see the same value
<mikecmpbll> /join #reactjs
<Igor2__> i mean the same ID for the same sym
<mikecmpbll> fail.
<greenarrow> l0l
<mikecmpbll> rouge spaces :'(
<mikecmpbll> rogue*
<greenarrow> 9am
<yorickpeterse> morning
casadei has joined #ruby
<Igor2__> <interrupt, brb>
ta has quit [Remote host closed the connection]
<TTilus> mikecmpbll: i've got them, only trailing are rouge though ;)
pawnbox has quit [Remote host closed the connection]
<mikecmpbll> :)
<[spoiler]> Igor2__: (for later) can you put up the mrb specific code so I can take a look at it? I have a few ideas, but I won't be sure until I can see what's happening
zitar has joined #ruby
ndrei has quit [Remote host closed the connection]
AlexRussia has quit [Ping timeout: 256 seconds]
pawnbox has joined #ruby
<TTilus> mikecmpbll: right there http://www.tilus.net/tero/tmp/rouge-spaces.png
<[spoiler]> hi, yorickpeterse <3></3>
casadei has quit [Ping timeout: 265 seconds]
ndrei has joined #ruby
<TTilus> humhum, back to work
<mikecmpbll> TTilus: :D
* yorickpeterse slaps [spoiler] around with a crushing student debt
<Igor2__> [spoiler]: the minimal, gpmi-independent test project is http://igor2.repo.hu/tmp/mruby/
devoldmx has joined #ruby
eGGsha has joined #ruby
<Igor2__> I have to go AFK for some time now, soldering a serial link onto an embedded board, brb
pawnbox has quit [Remote host closed the connection]
irctc311 has joined #ruby
ta has joined #ruby
nobitanobi has joined #ruby
<nobitanobi> morning
<bodgix> Does anyone know of something like http://search.cpan.org/~mschilli/YAML-Logic-0.03/Logic.pm for ruby? I'm looking for a library / DSL to express logical conditions in config files
ishahnaz has joined #ruby
djbkd has quit [Quit: My people need me...]
yardenbar has joined #ruby
ruby-lang447 has quit [Ping timeout: 246 seconds]
radgeRayden has quit [Ping timeout: 265 seconds]
gregf_ has quit [Ping timeout: 265 seconds]
_blizzy_ has joined #ruby
xcesariox has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
iamninja has joined #ruby
<hanmac> bodgix not that i know, but it looks interesting and more or less easy to build in ruby ... the only problem would be the usage of eval should avoided if possible
gregf_ has joined #ruby
hmnhf has joined #ruby
<bodgix> hanmac: that's exactly my concern. I wouldn't want to eval a user-supplied config
stan has joined #ruby
pawnbox has joined #ruby
<irctc311> hello i had cocoa pods installed and something was going wrong so i totally uninstalled it. anyway i was wondering what i should do if all my ruby is installed in the folder where Applications, Desktop folders are on Mac
<shevy> I wanna sneak in a rm
<irctc311> should i install cocoapods there too? if so how can i
quimrstorres has joined #ruby
Coldblackice has quit [Read error: Connection reset by peer]
_blizzy_ has quit [Read error: Connection reset by peer]
<Radar> Ropeney: No, it's for my own thing
quimrstorres has quit [Remote host closed the connection]
iamninja has quit [Ping timeout: 244 seconds]
zitar has quit [Quit: Leaving]
hotpancakes has joined #ruby
arup_r has quit [Remote host closed the connection]
yh has joined #ruby
_blizzy_ has joined #ruby
iamninja has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
Coldblackice has joined #ruby
quimrstorres has joined #ruby
MarcWeber has joined #ruby
coban2k has joined #ruby
stardiviner1 has quit [Ping timeout: 260 seconds]
<MarcWeber> Is tehre a simple dag (directed acyclic graph) library supporting multiple roots which already can create a simple text tree representation ?
nofxx has quit [Ping timeout: 256 seconds]
hotpancakes has quit [Ping timeout: 240 seconds]
Cust0sLim3n has quit [Ping timeout: 272 seconds]
stardiviner1 has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
<TTilus> bodgix: tried https://github.com/rubysolo/dentaku ?
conor_ has quit [Remote host closed the connection]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bodgix> TTilus: I haven't tried it but it looks like what I'm looking for
Trynemjoel has joined #ruby
<bodgix> TTilus: many thanks. I'll see if I can use it in my problem but looks promising
<TTilus> bodgix: there's also https://github.com/cucumber/bool
coban2k has quit [Ping timeout: 244 seconds]
cheeti has quit [Quit: Page closed]
<irctc311> anyone can help me?
<shevy> not me, I don't use mac
<TTilus> bodgix: the later looks more credible
<nobitanobi> I'm using HTTParty to do POST requests - Right now I am catching HTTParty::Error, but I am concerned on other types of errors that can happen during the http connection, such as layer 4 errors. Anybody knows which exception classes should I be looking for here?
<TTilus> bodgix: no, wait! the other way round (looked at wrong project)
rubie has joined #ruby
<bodgix> TTilus: cucumber/bool seems more difficult to install. I think it a C library with ruby bindings
tubuliferous_ has joined #ruby
<irctc311> hello i had cocoa pods installed and something was going wrong so i totally uninstalled it. anyway i was wondering what i should do if all my ruby is installed in the folder where Applications, Desktop folders are on Mac
zitar has joined #ruby
zitar has quit [Max SendQ exceeded]
zitar has joined #ruby
conor_ has joined #ruby
j4cknewt has quit [Remote host closed the connection]
tubuliferous_ has quit [Ping timeout: 256 seconds]
irctc311 has quit [Quit: Page closed]
yh has quit [Ping timeout: 264 seconds]
Kalov has joined #ruby
zitar has quit [Quit: Leaving]
slackbotgz has joined #ruby
leafybasil has joined #ruby
rdark has quit [Quit: leaving]
rdark has joined #ruby
pawnbox has quit [Read error: No route to host]
djbkd has joined #ruby
einarj has joined #ruby
youngbaks has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
matcouto has joined #ruby
hoolio_ has joined #ruby
symm- has joined #ruby
astrobun_ has quit [Remote host closed the connection]
<hoolio_> hey guys, i was wondering if i could get a hand with something. im really new too ruby :)
TheHodge has joined #ruby
AlexRussia has joined #ruby
<jhass> ?ask hoolio_
<ruboto> hoolio_, Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
einarj has quit [Ping timeout: 245 seconds]
<mandarinkin> does string class have "shift" method ?
sectionme has joined #ruby
<jhass> ?try mandarinkin
<ruboto> mandarinkin, Why don't you try it and see for yourself?
<hoolio_> http://pastebin.com/G3bN2evH its saying somethign about an unexpected identifier :)
<ruboto> hoolio_, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/ff018abb92dddd36ff86
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<mandarinkin> or similar
<shevy> >>> "abc".shift
<ruboto> shevy # => /tmp/execpad-30595ab21d94/source-30595ab21d94:2: syntax error, unexpected '>' ...check link for more (https://eval.in/415660)
Pupeno has joined #ruby
<shevy> oops I failed
zenguy_pc has quit [Read error: Connection reset by peer]
<shevy> mandarinkin String does not have .shift() method by default
<jhass> hoolio_: let's read the error message together
<mandarinkin> i googled
<jhass> so first, what's the exact error message
<hoolio_> the error is : ex3-1.rb:3: syntax error, unexpected tIDENTIFIER, expecting end-of-input puts 43 x 7
zenguy_pc has joined #ruby
<jhass> hoolio_: so, which character in that expression would you think could be the cause for that?
yh_ has joined #ruby
<mandarinkin> i want find simpe way transform string from '1234567' to '123567' without 4
<hoolio_> maybe the x ?
<jhass> hoolio_: exactly!
<jhass> multiplication is *, x is just a variable or method name
<hoolio_> oh ok , so x isnt the multiplication symbol ?
<hoolio_> ohhh, i feel like a douche hahah
<jhass> mandarinkin: .delete("4") ?
<shevy> yeah it is not
<adaedra> no, it's a x
<adaedra> :v
Motoservo has quit [Ping timeout: 265 seconds]
<jhass> hoolio_: and that's what ruby means with identifier, variable or method name
joonty has quit [Quit: joonty]
<mandarinkin> jhass, i want move substring
khebbie has quit [Remote host closed the connection]
BTRE has joined #ruby
<jhass> mandarinkin: provide an example that shows that then?
<hoolio_> well thank you guys ^.^
<jhass> ?guys hoolio_
<ruboto> hoolio_, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
<mandarinkin> '5678' move to left on 2 position , resalt should be '125678'
<jhass> ?fake mandarinkin
<ruboto> mandarinkin, Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
startupality has joined #ruby
<Igor2__> [spoiler]: haha, this is nice, the __method__ in mrb_load_string is always "__printstr__"
<[spoiler]> yeah
<[spoiler]> it makes sense though
<[spoiler]> lol
startupality has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
startupality has joined #ruby
<Igor2__> (resolving the ID i found in mrb state ->c->ci->mid brings up the right function name,tho)
arup_r has joined #ruby
Vile` has joined #ruby
<mandarinkin> ruboto, i have string ss='22221111000' i want delete from string ss[2..3] and get new string '221111000'
<ljarvis> ss[2..3] = ''
djbkd has joined #ruby
<[spoiler]> this should work
<jhass> ?ruboto mandarinkin
<ruboto> mandarinkin, I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
<[spoiler]> Sorry I also got distracted a bit at wok
<[spoiler]> wok
<[spoiler]> asdfghjkl; work"
<[spoiler]> omg I can't even get punctuation right
sameerynho has quit [Ping timeout: 246 seconds]
joonty has joined #ruby
<jhass> mandarinkin: "#{s[0..1]}#{s[3..-1]}"
<Igor2__> working at a wok restaurant? lol
ta has quit [Remote host closed the connection]
<[spoiler]> No :)
<[spoiler]> But I wouldn't mind. I love wok food
Motoservo has joined #ruby
<yorickpeterse> you'll think otherwise when you smell it 9 hours a day
<yorickpeterse> or when standing in the heat 9 hours a day
<yorickpeterse> if not longer
<[spoiler]> yorickpeterse: point taken
ta has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mandarinkin> jhass, ss[2..3] = '' is good
sheldonh has joined #ruby
<sheldonh> is there something i can do to get rdoc to automatically include a list of contained classes in the documentation of a module?
omegamike has joined #ruby
curses has joined #ruby
SOLDIERz has joined #ruby
<sheldonh> or alternatively, a way to get the module to stop showing up in the "Classes and modules" list. # :nodoc: doesn't exclude the module name from that list
startupality has quit [Quit: startupality]
startupality has joined #ruby
omegamike has quit [Ping timeout: 244 seconds]
ta has quit [Remote host closed the connection]
<Igor2__> [spoiler]: cool, this works, thanks!
jenrzzz has joined #ruby
sepp2k has joined #ruby
bruno- has joined #ruby
symm- has quit [Quit: Leaving...]
<[spoiler]> Igor2__: woo! :)
<[spoiler]> Igor2__: no problem
<[spoiler]> Igor2__: I wrote it from the top of my head, so there might be a shorter approach or a macro
thang has quit [Ping timeout: 264 seconds]
djbkd has quit [Remote host closed the connection]
noethics has quit [Quit: Leaving]
thang has joined #ruby
<Igor2__> actually I don't need anything short, rather something that won't break as versions change
sameerynho has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
<[spoiler]> Igor2__: btw, there's #mruby but it is a bit dead (or was). It was me and one other person who were answering questions in there
<Igor2__> your solution looks much more stable than my other one depending on struct internal
<Igor2__> i see
<[spoiler]> and most of the time we were answering eachother's questions LOL
<[spoiler]> or trying to figure stuff out
ta has joined #ruby
<Igor2__> cool
<Igor2__> I think the rest will be easy
bruno- has quit [Ping timeout: 265 seconds]
<Igor2__> maybe i won't even have further questions
<[spoiler]> It's always better to use the API, yeah
shibly has joined #ruby
startupality has quit [Quit: startupality]
sdwrage has quit [Quit: This computer has gone to sleep]
<Igor2__> i just need to extend the example with some args and return alues and stuff
shibly has quit [Client Quit]
<Igor2__> btw, i like the api of mruby
k3asd` has quit [Ping timeout: 250 seconds]
<Igor2__> in some aspects it's very similar to my libmawk API
<Igor2__> (and it will really work with multiple script instances)
<[spoiler]> Igor2__: for args, I warmly recommend using mrb_get_args()
<Igor2__> thanks
nfk has joined #ruby
<[spoiler]> if they'e being called from ruby
<Igor2__> i think i will keep the old module too, maybe rename it to ruby18
<[spoiler]> allows much more control and safety
skade has quit [Quit: Computer has gone to sleep.]
Darkwater has joined #ruby
<[spoiler]> mruby needs better documentation; I started working on it for myself, but the project kinda got pushed aside and so did the documentation I was writingm, but I see someone people have started addings really good docs
<Igor2__> to be honest i can't really judge
<Igor2__> i'm not into ruby that much to read detailed docs
<Igor2__> i'm sort of a turist
<Igor2__> want something simple and go into just enough details to get it solved
<Igor2__> in mruby, there are some example code for simple things in doc/
<Igor2__> that helped a lot
<Igor2__> and the header is nice too
Pisuke has quit [Read error: Connection reset by peer]
ta has quit [Remote host closed the connection]
<Igor2__> if you want to get ruby easy for turists like me, a set of smallish examples, one per feature is probably the best way
chipotle has joined #ruby
<Igor2__> now OTL, brb
Pisuke has joined #ruby
devoldmx has joined #ruby
DoubleMalt has joined #ruby
Chau has joined #ruby
symm- has joined #ruby
ndrei has joined #ruby
khebbie has joined #ruby
closer has quit [Ping timeout: 272 seconds]
hoolio_ has quit [Ping timeout: 246 seconds]
sameerynho has quit [Ping timeout: 246 seconds]
tonios57 has joined #ruby
otisZart has joined #ruby
devoldmx has quit [Ping timeout: 255 seconds]
quimrstorres has quit [Remote host closed the connection]
oo__ has quit [Remote host closed the connection]
closer has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
symm- has quit [Quit: Leaving...]
einarj has joined #ruby
dionysus69 has joined #ruby
dumdedum has joined #ruby
kraljev11 has joined #ruby
pafin has joined #ruby
conor_ has quit [Remote host closed the connection]
iamninja has quit [Ping timeout: 255 seconds]
anisha has quit [Quit: Leaving]
[k- has joined #ruby
pawnbox has quit [Remote host closed the connection]
Rickmasta has joined #ruby
techsethi has quit [Ping timeout: 244 seconds]
conor_ has joined #ruby
olivierrr has joined #ruby
olivierrr has quit [Client Quit]
sameerynho has joined #ruby
alex88 has joined #ruby
techsethi has joined #ruby
Rickmasta has quit [Ping timeout: 260 seconds]
hotpancakes has joined #ruby
blackmesa has joined #ruby
oo_ has joined #ruby
<mandarinkin> whats the best way to do something like ss[2,3,4]='*'
<mandarinkin> ss is string
pawnbox has joined #ruby
<ljarvis> mandarinkin: you need to do it separately
casadei has joined #ruby
<mandarinkin> so [2,3,4].each{|ind| ss[ind]='*'}
Rinzlit1 has quit [Read error: Connection reset by peer]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
pafin has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
ferhaty has quit []
pawnbox has quit [Ping timeout: 244 seconds]
casadei has quit [Ping timeout: 256 seconds]
<[spoiler]> mandarinkin: what is the desired result?
<[spoiler]> >> ss = "hello world"; ss[6..10] = '*'; ss
<ruboto> [spoiler] # => "hello *" (https://eval.in/415706)
shredding has quit [Ping timeout: 260 seconds]
<[spoiler]> >> ss = "hello world"; ss[6..10] = '*'; ss # mandarinkin
<ruboto> [spoiler] # => "hello *" (https://eval.in/415707)
<[k-> you could just point :/
<[spoiler]> [k- huh?
sdothum has joined #ruby
<mandarinkin> i have array of indexes and want assign char
otisZart has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
skade has joined #ruby
<ljarvis> mandarinkin: yes what you did is fine
<[spoiler]> then yeah, iterate over the indexes, and use them to reassing the character like you did
mhib has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Motoservo has quit [Ping timeout: 250 seconds]
Macaveli has joined #ruby
Trynemjoel has quit [Ping timeout: 250 seconds]
_blizzy_ has quit [Ping timeout: 244 seconds]
Trynemjoel has joined #ruby
stef204 has joined #ruby
ta has joined #ruby
duncannz has quit [Ping timeout: 265 seconds]
ishahnaz has quit []
Trynemjoel has quit [Ping timeout: 245 seconds]
suchness has joined #ruby
quimrstorres has joined #ruby
Trynemjoel has joined #ruby
tubuliferous_ has joined #ruby
rodfersou has joined #ruby
ta has quit [Remote host closed the connection]
jbw has quit [Ping timeout: 255 seconds]
bruno- has joined #ruby
Iskarlar has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
kraljev11 has quit [Ping timeout: 260 seconds]
nemesit|znc has joined #ruby
cornerma1 has joined #ruby
tubuliferous_ has quit [Ping timeout: 272 seconds]
krz has quit [Ping timeout: 240 seconds]
basmoura has joined #ruby
joelataylor has joined #ruby
cornerman has quit [Ping timeout: 246 seconds]
hotpancakes has joined #ruby
mrtg9970 has joined #ruby
cornerma1 is now known as cornerman
symm- has joined #ruby
mrtg9970 has quit [Quit: Leaving]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
flou has joined #ruby
senoralastair has quit [Remote host closed the connection]
bruno-_ has joined #ruby
Rickmasta has joined #ruby
ta has joined #ruby
hotpancakes has quit [Ping timeout: 250 seconds]
dented42 has joined #ruby
ferhaty has joined #ruby
ndrei has quit [Remote host closed the connection]
mrtg9970 has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
ndrei has joined #ruby
tkuchiki has quit [Ping timeout: 244 seconds]
txdv has quit [Ping timeout: 240 seconds]
basmoura has quit [Remote host closed the connection]
quimrstorres has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
terlar has quit [Ping timeout: 250 seconds]
CamonZ has joined #ruby
Quandl has joined #ruby
<suchness> k
<adaedra> l
Chau has quit [Ping timeout: 244 seconds]
iamninja has joined #ruby
<apeiros> shush, alphabet is now owned by google. stop infringing!
jbw has joined #ruby
<adaedra> π
Askilada has joined #ruby
howdoico1 has quit [Ping timeout: 245 seconds]
ta has joined #ruby
dimasg has joined #ruby
<hanmac> apeiros: like in the sesame-street like "G stays for Google"? ;P
<nobitanobi> haha
Me has joined #ruby
Me is now known as Guest93193
conor_ has quit [Remote host closed the connection]
conor_ has joined #ruby
joelataylor has quit [Quit: Be back later ...]
leat has quit [Ping timeout: 250 seconds]
Guest93193 is now known as VeganGreg
<suchness> oops
scripore has joined #ruby
<Igor2__> kernel oops
c7n has joined #ruby
ta has quit [Remote host closed the connection]
ldnunes has joined #ruby
greenarrow has quit [Quit: 500]
Quandl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oo_ has quit [Remote host closed the connection]
Chau has joined #ruby
ta has joined #ruby
chipotle has quit [Quit: cheerio]
oo_ has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
greenarrow has joined #ruby
<[spoiler]> Kernel#oops!
<[spoiler]> Documentation: formats fs the script is on, prints "oops!" and reboots
<VeganGreg> I'd be curious to know whether the people in this channel are mostly professional developers or amateurs
sdothum has joined #ruby
joejohn1919 has joined #ruby
<sheldonh> probably lots of both
oo_ has quit [Ping timeout: 264 seconds]
<apeiros> VeganGreg: you'd be curious? so you aren't?
* apeiros is a professional pedant
carlosoliveira has joined #ruby
ta has quit [Remote host closed the connection]
<VeganGreg> apeiros: :-)
<Igor2__> >VeganGreg> I'm both
<suchness> I would wager that most of the people here regularly are the professional type.
<yorickpeterse> I'm 12
<suchness> VeganGreg: I am the lead developer of a financial investment company.
<Igor2__> VeganGreg: lately I do embedded programming and electronics for living, do programming, electronics and mech engineering for hobby
olivierrr has joined #ruby
Askilada has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
<VeganGreg> I'm an amateur, but am looking to jump into development soon
samu has left #ruby [#ruby]
conor_ has quit [Remote host closed the connection]
<suchness> VeganGreg: Well, as you can see we have 12 year olds, professionals, and amateurs here.
<nuttermb> lol
<adaedra> I'm a meat popsicle
joonty has quit [Quit: joonty]
<suchness> VeganGreg: And one meat popsicle.
<nuttermb> woops
nuttermb is now known as thermatix
conor_ has joined #ruby
<thermatix> wrong username >_<
<VeganGreg> suchness: I imagined that it would be a mix---I just was interested to see if one group was significantly more represented
<apeiros> I'm nobody
<adaedra> ?nobody
<ruboto> apeiros is nobody
<adaedra> verified.
<[k-> do a poll!
<apeiros> we're very diverse
<suchness> VeganGreg: Couldn't speak to that. I can say that for any given question, providing the right person has the time, it can be answered.
<[k-> you have to wait a year for all 1000+ people here to answer
ta has joined #ruby
Askilada has joined #ruby
joejohn1919 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<adaedra> we need everybody
<adaedra> ?everybody
<ruboto> I don't know anything about everybody
<adaedra> meh
<VeganGreg> [k- : or perhaps some people who are in here a lot whould be able to say with some confidence
<yorickpeterse> nobody is really good at moderating this channel
<yorickpeterse> (I swear if nobody gets that reference...)
hotpancakes has joined #ruby
quimrstorres has joined #ruby
<adaedra> joke &the_joke;
scripore has quit [Quit: This computer has gone to sleep]
<yorickpeterse> VeganGreg: either way, I suppose I have to officially label myself as a professional too
<yorickpeterse> at least my title being "Developer" would indicate so
<bougyman> y/21
<[k-> he works on rubinius
<[k-> good enough for me
<yorickpeterse> bougyman: que?
<VeganGreg> Is it generally acceptable to be in an irc channel like #ruby at the office when you're working as a developer?
allcentury has joined #ruby
<yorickpeterse> VeganGreg: varies from place to place
<yorickpeterse> some places are fine with it as long as you're productive
Trynemjoel has quit [Read error: Connection reset by peer]
<yorickpeterse> some others have a zero-tolerance policy
<[k-> get off Reddit!
Trynemjoel has joined #ruby
basmoura has joined #ruby
<[k-> shevy: you too
<yorickpeterse> I don't even have Reddit open atm :<
<ytti> if someone thinks people can be productive 8 back-to-back, they are confused
<ytti> 8h
<[k-> s/confused/misguided
codecop has quit [Remote host closed the connection]
<workmad3> s/misguided/wrong
ta has quit [Remote host closed the connection]
<[k-> so harsh
but3k4 has joined #ruby
auzty has quit [Quit: Leaving]
<suchness> I wouldn't mind any of my developers being on IRC.
hotpancakes has quit [Ping timeout: 272 seconds]
<suchness> Or reddit.
basmoura_ has joined #ruby
<suchness> I like people to be get their work done, how they get there is their own prerogative.
user1138 has quit [Read error: Connection reset by peer]
<bougyman> hrm. I encourage my teams to be on irc (freenode).
<yorickpeterse> I usually get the most done at 23:00 when I'm about to fall asleep
<yorickpeterse> which is really annoying
Quandl has joined #ruby
gamename has quit [Remote host closed the connection]
ta has joined #ruby
ishahnaz has joined #ruby
gamename has joined #ruby
devoldmx has joined #ruby
basmoura has quit [Ping timeout: 260 seconds]
skade has joined #ruby
[k-_ has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lampshad_ has quit [Remote host closed the connection]
suchness has quit []
linuxboytoo has quit [Remote host closed the connection]
suchness has joined #ruby
cantaberry has joined #ruby
rdark has quit [Quit: leaving]
linuxboytoo has joined #ruby
gamename has quit [Ping timeout: 245 seconds]
yh_ has quit [Ping timeout: 264 seconds]
devoldmx has quit [Ping timeout: 260 seconds]
dimasg has quit [Ping timeout: 260 seconds]
blueOxigen has joined #ruby
Rixius has quit [Ping timeout: 252 seconds]
khebbie has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 256 seconds]
mrtg9970 has quit [Remote host closed the connection]
khebbie has joined #ruby
dwithers is now known as pl1ght
Rixius has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
linuxboytoo has quit [Ping timeout: 252 seconds]
joonty has joined #ruby
unver has joined #ruby
v0n has quit [Ping timeout: 245 seconds]
lannonbr has joined #ruby
linuxboytoo has joined #ruby
scripore has joined #ruby
skade has joined #ruby
omegamike has joined #ruby
arturhoo has joined #ruby
<apeiros> VeganGreg: our company takes so much from OSS, I find it easily justifiable to spend time here on company time to help people.
<apeiros> it's a way to give back
<workmad3> apeiros: I got (virtual) cheers for starting to contribute some bug-fixes back upstream for an OSS library we're using @ work!
<hanmac> for all who does care: there is a new RPGMaker http://www.rpgmakerweb.com/products/programs/rpg-maker-mv but i dont know 100% yet if in the new one ruby does got replaced with javascript or if it still does have ruby
tkuchiki has joined #ruby
<apeiros> "MV's screen resolution is now 816x624 pixels." o0
<apeiros> for realsies?
v0n has joined #ruby
<apeiros> that's like 1/30 of my screen…
<hanmac> hm its more than before ;P (and its designed to work in mobile devices too)
<workmad3> hanmac: I wonder if opal will work in it :D
<hanmac> hm i do not care about that one and i am still developing on my own one (or more concret on one of the dependencies of it)
<apeiros> well, it's 1/2 of my iphone's screen size…
tkuchiki has quit [Remote host closed the connection]
startupality has joined #ruby
xaxisx_ has quit [Quit: Leaving]
krz has joined #ruby
tkuchiki has joined #ruby
<hanmac> still working on my rwx thing (a binding for wxwidgets) ... trying to make it fail proof ... (that it doesnt crash / segfault) unnecessary what the user does input
<yorickpeterse> heh, wx
yh_ has joined #ruby
khebbie has quit [Remote host closed the connection]
sdwrage has joined #ruby
rbennacer has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
xcesariox has joined #ruby
<hanmac> yorickpeterse: yeah, you seems to know about it?
jokke has joined #ruby
<jokke> hi
<jokke> is it possible to write a threadpool with _real_ processes as workers?
tkuchiki has quit [Remote host closed the connection]
<yorickpeterse> hanmac: I've dabbled with it in the past
<jhass> wouldn't that be a process pool then?
<yorickpeterse> ^
<yorickpeterse> that's called a process pool :P
<jokke> oh
<jokke> ok
<jokke> sorry :D
<jokke> so a process pool
youngbaks has quit [Quit: WeeChat 1.2]
<jhass> but sure, just use some sort of IPC instead of Queue or whatever to distribute the workloads
<jokke> ah ipc
<jokke> mmh
joonty has quit [Quit: joonty]
<yorickpeterse> Hm, surprised concurrent-ruby doesn't have a process pool
<apeiros> somebody probably already wrote one
martinium has quit [Read error: Connection reset by peer]
<jokke> the gem Parallel can't do this, right?
<yorickpeterse> jhass: you can't share a Queue between processes
<apeiros> and if not, I suggest to take a look at https://github.com/apeiros/fork - it provides forks as objects, including IPC
yh_ has quit [Ping timeout: 246 seconds]
allcentury has quit [Ping timeout: 260 seconds]
<jhass> yorickpeterse: that's what I said, read again ;)
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ropeney has joined #ruby
<yorickpeterse> oh heh
<jokke> i guess it can't be helped
<yorickpeterse> I read "or Queue"
<darix> you could probably borrow a lot of code from things like unicorn/rainbow for it
prestorium has joined #ruby
<jokke> since the workload comes from a lazy enumerator and the items yielded contain a lot of data
<jokke> (which is why i made the iterator lazy)
<jokke> or enumerator
<yorickpeterse> jokke: can you not just use a thread pool?
joelataylor has joined #ruby
<jokke> yorickpeterse: i'm doing image processing
<jokke> ooh
<yorickpeterse> you can still do that using threads
<jokke> but they spawn own processe
<jokke> s
<yorickpeterse> That shouldn't be a problem
<jokke> yeah
<jokke> except that i'm doing a shasum in pure ruby..
<yorickpeterse> you can still do that using threads
michael_mbp has quit [Excess Flood]
<jokke> i sure can, but it won't be multiprocessed, right?
<jokke> (is that a word?)
<yorickpeterse> The workers themselves would be multi-threaded, but they can still spawn processes for whatever they need
banister has joined #ruby
<jokke> yorickpeterse: sure, but they don't spawn a process for getting the shasum
<jokke> and shasums are pretty expensive to compute
<jokke> especially for big files
<jokke> threads can only work concurrently when they're waiting for io or so
<jhass> which you will do a lot when reading big files
joonty has joined #ruby
<yorickpeterse> jokke: bullshit
<yorickpeterse> On MRI there's the GIL yes, but it's not bound by just IO
paulcsmith has joined #ruby
<yorickpeterse> And there's also Rubinius/JRuby
<jokke> yeah
<jokke> i'm not switching over to jruby for this :D
paulcsmith has quit [Client Quit]
michael_mbp has joined #ruby
<yorickpeterse> MRI can interrupt threads whenever C code calls certain functions (rb_thread_check_ints() IIRC), not just when it does something with IO
<yorickpeterse> Granted it requires code to explicitly opt-in
<yorickpeterse> jokke: if you're dealing with C and what not, try Rubinius
terlar has joined #ruby
<yorickpeterse> But even on MRI nothing prevents you from mixing threads and processes
Azure has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
conor_ has quit [Remote host closed the connection]
phutchins1 has joined #ruby
arup_r has quit [Remote host closed the connection]
Philipp__ has quit [Ping timeout: 250 seconds]
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Philipp__ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dimasg has joined #ruby
Feyn has quit [Ping timeout: 250 seconds]
linuxboytoo has quit [Remote host closed the connection]
linuxboytoo has joined #ruby
bmurt has joined #ruby
VeganGreg has quit [Ping timeout: 240 seconds]
joonty has quit [Quit: joonty]
tubuliferous_ has joined #ruby
vt102 has quit [Ping timeout: 255 seconds]
jeremy04 has joined #ruby
linuxboytoo has quit [Ping timeout: 256 seconds]
olivierrr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rodferso1 has joined #ruby
khebbie has joined #ruby
pawnbox has quit [Remote host closed the connection]
blackmesa has joined #ruby
<jokke> if i want to create a thread safe enumerator is it enough to synchronize a mutex around yielder << item ?
hotpancakes has joined #ruby
tkuchiki has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jokke> so that multiple threads can use enumerator.next
<jokke> probably not..
vt102 has joined #ruby
Iskarlar has joined #ruby
vt102 has quit [Remote host closed the connection]
c7n has quit [Ping timeout: 246 seconds]
tubuliferous_ has quit [Ping timeout: 255 seconds]
rodfersou has quit [Ping timeout: 256 seconds]
matcouto has joined #ruby
pawnbox has joined #ruby
jeremy04 has quit [Ping timeout: 264 seconds]
senayar has joined #ruby
senayar has joined #ruby
phutchins1 has quit [Quit: WeeChat 1.1.1]
VeganGreg has joined #ruby
tkuchiki has quit [Remote host closed the connection]
victortyau has joined #ruby
davedev24 has joined #ruby
sgambino has joined #ruby
<yorickpeterse> gist it
scripore has joined #ruby
hotpancakes has quit [Ping timeout: 255 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
linuxboytoo has joined #ruby
techsethi has quit [Quit: techsethi]
OrbitalKitten has joined #ruby
hotpancakes has joined #ruby
fmcgeough has joined #ruby
sectionme has quit [Ping timeout: 260 seconds]
iamninja has quit [Read error: Connection reset by peer]
malconis has joined #ruby
tkuchiki has joined #ruby
malconis has quit [Client Quit]
shredding has joined #ruby
<yorickpeterse> http://downloads.yorickpeterse.com/images/pick_ruby.png here's how to pick your Rubies
<yorickpeterse> A slightly biased flowchart by Dr. Y. Peterse
Ropeney has joined #ruby
<yorickpeterse> I hate how Graphviz doesn't let you add spacing around labels
symm- has joined #ruby
iamninja has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
<ljarvis> you can
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Chau has quit [Quit: Leaving]
<yorickpeterse> oh I should probably dump this as SVG
<yorickpeterse> ljarvis: oh?
<ljarvis> yorickpeterse: pretty sure there's a margin attribute you can use for the node, what lib are you using? I remember having to do this ages ago
dEPy has joined #ruby
<yorickpeterse> just graphviz directly
<yorickpeterse> That is, /usr/bin/dot basically
jenrzzz has joined #ruby
<livcd> how should i call functions X,Y,Z,W on each element in ARRAY ? Can anyone post an example of map with composed functions ?
<yorickpeterse> livcd: what have you tried?
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sdothum has quit [Read error: Connection reset by peer]
yh has joined #ruby
timanema has joined #ruby
<livcd> yorickpeterse: iterating through array and calling the functions
jzigmund has joined #ruby
rbennacer has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
sdothum has joined #ruby
ta has joined #ruby
khebbie has quit [Remote host closed the connection]
ferhaty has quit []
jenrzzz has quit [Ping timeout: 260 seconds]
whippythellama has joined #ruby
linuxboytoo has quit [Remote host closed the connection]
conor_ has joined #ruby
<jhass> ?code livcd
<ruboto> livcd, We can't help you without your code, please post it to https://gist.github.com
lucianosousa has joined #ruby
<jhass> ?fake livcd
<ruboto> livcd, Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
Iskarlar has joined #ruby
casadei has joined #ruby
<apeiros> yorickpeterse: sadist? not masochist?
<livcd> jhass: i have no code i am just asking
ponga has joined #ruby
<jhass> why would you ask if you have no real problem?
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<livcd> i am curious
sdothum has quit [Read error: Connection reset by peer]
<jhass> then my answer is that it'll become obvious once you actually encounter a real need for it
jerius has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
skade has quit [Quit: Computer has gone to sleep.]
sdothum has joined #ruby
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
casadei has quit [Ping timeout: 250 seconds]
skade has joined #ruby
sameerynho has quit [Quit: Leaving]
jbw has quit [Ping timeout: 250 seconds]
allcentury has joined #ruby
ferhaty has joined #ruby
danieli has quit [Quit: *does an epic backflip into nowhere*]
jeremy04 has joined #ruby
flou has quit [Quit: Textual IRC Client: www.textualapp.com]
mrtg9970 has joined #ruby
phutchins has joined #ruby
Zggb has joined #ruby
joonty has joined #ruby
bronson has joined #ruby
dblessing has joined #ruby
ujjain has quit [Read error: Connection reset by peer]
jbw has joined #ruby
dented42 has joined #ruby
Quandl has quit [Quit: Textual IRC Client: www.textualapp.com]
Quandl has joined #ruby
sbhatore has quit [Read error: Connection reset by peer]
bronson has quit [Ping timeout: 255 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Quandl is now known as Yiota
Yiota is now known as Quandl
dhjondoh has quit [Remote host closed the connection]
User458764 has joined #ruby
sdothum has joined #ruby
sbhatore has joined #ruby
jeremy04 has quit [Read error: Connection reset by peer]
jeremy04_ has joined #ruby
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
quimrstorres has quit [Remote host closed the connection]
<yorickpeterse> apeiros: hmmm, maybe both
<yorickpeterse> also I should add Opal to it
tmtwd has joined #ruby
kies has joined #ruby
arturhoo has quit [Quit: arturhoo]
devdazed has joined #ruby
gamename has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
gamename has quit [Remote host closed the connection]
gamename has joined #ruby
hj2007 has joined #ruby
mistnim has joined #ruby
gamename has quit [Remote host closed the connection]
Kallis has joined #ruby
govg has joined #ruby
gamename has joined #ruby
Kallis has quit [Max SendQ exceeded]
<mistnim> can you explain why when returning a private variable from a class method there is no = function?
<yorickpeterse> what?
<apeiros> mistnim: there's no such thing as a "private variable"
<apeiros> hence - please explain what you mean, best with a code example.
malconis has joined #ruby
<mistnim> apeiros: I mean a variable like @variable
gamename has quit [Remote host closed the connection]
<apeiros> (also = is not a function, assignment is syntax)
hj2007 has quit [Client Quit]
<apeiros> mistnim: ok, that's called instance variable.
gamename has joined #ruby
<apeiros> so you return an instance variable from a class method, and what's your problem now?
<mistnim> apeiros: you can't use =
<apeiros> I can
<apeiros> show me what you do and why you say you can't.
gamename has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<mistnim> ok
gamename has joined #ruby
presto has joined #ruby
olivierrr has joined #ruby
prestorium has quit [Ping timeout: 260 seconds]
<apeiros> >> class X; @ivar = 123; def self.ivar; @ivar; end; end; value = X.ivar; value
<ruboto> apeiros # => 123 (https://eval.in/415842)
<apeiros> ^ that's how I understood your problem so far btw.
<jokke> what's wrong with this enumerator method? https://p.jreinert.com/OA4Xr/ruby
momomomomo has joined #ruby
<apeiros> jokke: you tell us?
<apeiros> jokke: or is this a riddle?
<jokke> well, the block is never run
blackmesa has quit [Ping timeout: 240 seconds]
dopamean_ has quit [Ping timeout: 256 seconds]
symm- has quit [Quit: Leaving...]
Hal_9000_ has quit [Quit: Hal_9000_]
<jokke> i'm calling it like this: iterator = AttachmentsIterator.new(args[:tenant] => { args[:app] => [args[:version]] }) iterator.each do |attachment| ...
hj2007 has joined #ruby
_blizzy_ has joined #ruby
sdothum has joined #ruby
<apeiros> jokke: you don't call yielder.yield ?
<jokke> yes i do
<apeiros> not in the code you pasted
michael_mbp has quit [Excess Flood]
<jokke> it's a very nested enumerator
<apeiros> and if you're hiding code, we can't help you.
arturhoo has joined #ruby
<jokke> the point is
danieli has joined #ruby
<apeiros> mistnim: ok, assigning to an ivar does not create methods along with it
<jokke> ok
<jokke> wait
<apeiros> mistnim: you want `class C; attr_accessor :a`
<jokke> none of those puts are run
<apeiros> mistnim: `attr_accessor :a` essentially defines two methods for you: `def a=(value); @a = value; end` and `def a; return @a; end`
<jokke> except for the "setting iteration plan" one
Kallis has joined #ruby
Azure has quit [Ping timeout: 260 seconds]
Kallis has quit [Max SendQ exceeded]
sshuff|gone is now known as sshuff
michael_mbp has joined #ruby
<apeiros> jokke: so debug your call chain
joonty has quit [Quit: joonty]
<apeiros> figure out why it never hits yielder <<
vt102 has joined #ruby
<jokke> yeah i tried
<jokke> with the puts at least
<jokke> but none are called
gamename has quit []
<jokke> i wonder why..
<apeiros> can't do that as all I have is your code and nothing to reproduce (though, I'd be out of that anyway, too much)
<mistnim> apeiros: ok, but why can't you use normal assignment syntax to it?
<apeiros> mistnim: because `c.a=` is not assignment. it's a method call.
govg has quit [Ping timeout: 252 seconds]
<adaedra> c.a = foo is the same as c.a=(foo)
<apeiros> mistnim: the normal assignment is `@a =`, and in order to use that, you have to be in the context of the object to which the ivar belongs. e.g. in an instance method.
joonty has joined #ruby
<apeiros> mistnim: in other words: you can't write or read instance variables from outside without going through a method call.
_blizzy_ has quit [Ping timeout: 244 seconds]
Azure has joined #ruby
<mistnim> apeiros: ok ok, but I don't get why you wouldn't allow that
<adaedra> because it's internal
<adaedra> you don't want bad objects outside of yours to access your internals
<adaedra> But there's attr_reader, attr_writer and attr_accessor to write quickly accessors
<apeiros> mistnim: the concept is called "encapsulation"
<apeiros> internal state must be explicitly made public, otherwise it remains internal.
hj2007 has quit [Quit: This computer has gone to sleep]
<apeiros> it's a design decision
<apeiros> JS e.g. does it the opposite way
<jokke> ah
<jokke> i see
<apeiros> the result of this decision is that it forces you, the programmer, to plan what you reveal and what not.
<jokke> or do i...
<jokke> m(
<apeiros> as a user, you can always bypass those limits, though. see instance_variable_get, _set
<apeiros> also see instance_eval and _exec
saintcajetan has quit [Quit: Connection closed for inactivity]
quimrstorres has joined #ruby
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
casadei has joined #ruby
hotpancakes has joined #ruby
govg has joined #ruby
<jokke> Class.new { def each; Enumerator.new { |y| y << 'hello }; end }.new.each { |foo| puts(foo) }
<adaedra> that's cheating!
<jokke> this doesn't work
dEPy has quit [Quit: (null)]
<jokke> it returns an enumerator
mrtg9970 has quit [Remote host closed the connection]
rbennacer has joined #ruby
<mistnim> apeirons: ok I guess I understand, thanks
ddubs has quit [Quit: Page closed]
segy has quit [Quit: ZNC - http://znc.in]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<apeiros> ?tabnick MisterRusty
<ruboto> MisterRusty, pro-tip - use tab completion for nicks. avoids typos in nicks.
<apeiros> whoops
<apeiros> tabfail :D
<apeiros> ?tabnick mistnim
<ruboto> mistnim, pro-tip - use tab completion for nicks. avoids typos in nicks.
<adaedra> :D
hj2007 has joined #ruby
<apeiros> damn you limechat, why do you autocomplete so bad?!
<adaedra> ah ah
casadei has quit [Client Quit]
sdothum has joined #ruby
<apeiros> way to kill the point of suggesting people to use tabcomplete :D
<mistnim> ahah
hj2007 has quit [Client Quit]
joonty has quit [Quit: joonty]
cpruitt has joined #ruby
hotpancakes has quit [Ping timeout: 260 seconds]
silkfox has joined #ruby
juanpaucar has joined #ruby
joonty has joined #ruby
dionysus69 has quit [Quit: dionysus69]
ta has quit [Remote host closed the connection]
qubitz has joined #ruby
Askilada has quit [Ping timeout: 256 seconds]
ferhaty has quit []
devoldmx has joined #ruby
segy has joined #ruby
dimasg has quit [Ping timeout: 245 seconds]
kies has quit [Ping timeout: 260 seconds]
x0c0d3 has joined #ruby
jenrzzz has joined #ruby
deepu has joined #ruby
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
govg has quit [Ping timeout: 246 seconds]
sross_work|2 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
devoldmx has quit [Ping timeout: 255 seconds]
Zeroe has joined #ruby
riotjones has quit [Remote host closed the connection]
RegulationD has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
jpfuentes2 has joined #ruby
dented42 has joined #ruby
stardiviner1 has quit [Quit: WeeChat 1.2]
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
khebbie has joined #ruby
umgrosscol has joined #ruby
dopie has joined #ruby
<hal_9000> Announcement repeated for later timezones… :)
wprice has quit [Quit: wprice]
sanguisdex has joined #ruby
<hal_9000> ANN: Johnny Winn and Hal Fulton are crowdfunding a book, _Elixir for the Functional Rubyist_.
<hal_9000> Feel free to support this project! http://igg.me/at/elixir4rubyists
dopamean_ has joined #ruby
<mistnim> ok so you use a attr_reader because you don't want your ivar to be changed externally, but isn't it pointless when there are some ivar methods, like map!, that can actually change its value?
sarkyniin has joined #ruby
mago0 has quit [Ping timeout: 252 seconds]
haylon has joined #ruby
<adaedra> attr_reader is just a quick way of creating accessors
<adaedra> 'ivar methods' means nothing
Porfa has joined #ruby
<adaedra> access and modification to internal state (ivars) is done by methods on the object
jordanm has joined #ruby
Porfa has quit [Read error: Connection reset by peer]
dopamean_ has quit [Client Quit]
hinbody has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
dopamean_ has joined #ruby
dopamean_ has quit [Client Quit]
dopamean_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
msnyon has joined #ruby
Torrieri has joined #ruby
centrx has joined #ruby
dcarmich has quit [Quit: Textual IRC Client: www.textualapp.com]
f4cl3y has joined #ruby
f4cl3y has joined #ruby
coban2k has joined #ruby
shock_one has joined #ruby
<apeiros> mistnim: map! does not change an ivar. it changes an object.
<apeiros> the concepts of object and variables are quite different.
silkfox has quit [Ping timeout: 245 seconds]
skade has joined #ruby
haxrbyte has joined #ruby
linuxboytoo has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> and to answer your question: no, the existence of mutating methods does not make it pointless.
terlar has quit [Quit: WeeChat 1.2]
freerobby has joined #ruby
stan has quit [Ping timeout: 246 seconds]
mago0 has joined #ruby
x0c0d3 has quit [Quit: Leaving]
freerobby has quit [Client Quit]
Iskarlar has joined #ruby
railsraider has joined #ruby
<shock_one> mistnim: you use attr_reader for the same old reasons: to abstract away internal access to a variable or to have a public getter.
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has quit [Quit: Computer has gone to sleep.]
_lovehandle_ has joined #ruby
terlar has joined #ruby
Philipp__ has quit [Ping timeout: 246 seconds]
tmtwd has quit [Ping timeout: 245 seconds]
Zeroe_ has joined #ruby
Philipp__ has joined #ruby
<mistnim> well, ok I have studied some basic c++ before ruby, and I am accustomed to the idea that when using only a getter, whatever you do with what you get won't influence the object state
Rutix has joined #ruby
Rutix has joined #ruby
tubuliferous_ has joined #ruby
JoshL has joined #ruby
Zeroe has quit [Ping timeout: 256 seconds]
baroquebobcat has joined #ruby
havenwood has joined #ruby
Philipp__ has quit [Remote host closed the connection]
Porfa has joined #ruby
khebbie has quit [Remote host closed the connection]
Philipp__ has joined #ruby
blackmesa has joined #ruby
Quandl has quit [Read error: Connection reset by peer]
<Porfa> hello! I'm in need of a newbie tutorial on mechanize, i just really need to submit a form, I've learned yesterday how to navigate throughout the stuff i wanna go and mess with, but now i can't submit it, I'm missing something really simple I'm sure ( https://gist.github.com/anonymous/d200b616c9c1670d2e9c ) that's my gist.
codecop has joined #ruby
<Porfa> would that work?
<Porfa> i was doing this more intensively a month ago, but something happened and i had to leave :(
ta has joined #ruby
sheldonh has quit [Quit: Leaving]
tubuliferous_ has quit [Ping timeout: 246 seconds]
linuxboytoo has quit [Remote host closed the connection]
c0m0 has joined #ruby
Chau has joined #ruby
linuxboytoo has joined #ruby
<c0m0> can use delf self.mymethod for declare a method inside my class?
RegulationD has joined #ruby
<c0m0> sorry def self.mymethod
coban2k has quit [Remote host closed the connection]
<[k-_> c0m0: what do you mean by "inside my class"
<[k-_> c0m0: how do you want to call the method?
<Igor2__> i like mrb_get_arg() so much that I'll probably implement something similar in libmawk
<c0m0> I have a class Animal, I will show the code
haxrbyte has quit [Quit: Leaving...]
scripore has joined #ruby
blue_deref has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
linuxboytoo has quit [Ping timeout: 240 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruboto> c0m0, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/fed97629658cb6d0d8e6
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<[k-_> c0m0: what you want is def check_name
<[k-_> c0m0: you are almost there!, pretty good, i'll say
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Chau has quit [Ping timeout: 256 seconds]
aganov has quit [Remote host closed the connection]
blue_deref has quit [Client Quit]
<shevy> c0m0 yes a class method
<shevy> then you can avoid .new
vaedd has joined #ruby
rubie has quit [Remote host closed the connection]
<c0m0> shevy: can you show as avoid new
sinkensabe has quit [Remote host closed the connection]
<[k-_> shevy: -____-
chouhoul_ has joined #ruby
<shevy> c0m0 well you already showed the code above yourself :) def self.mymethod
baroquebobcat has quit [Quit: baroquebobcat]
linuxboytoo has joined #ruby
<shevy> >> class Monkey; def self.dance; puts 'The monkey dances.'; end; end; Monkey.dance
<ruboto> shevy # => The monkey dances. ...check link for more (https://eval.in/415888)
_lovehandle_ has quit [Read error: Connection reset by peer]
_lovehandle_ has joined #ruby
weemsledeux has joined #ruby
dtzitz has joined #ruby
<[k-_> at least this is stateless
ryuu has joined #ruby
josh3 has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 265 seconds]
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
mary5030 has joined #ruby
saddad has joined #ruby
rippa has joined #ruby
mary5030 has quit [Remote host closed the connection]
chouhoul_ has quit [Ping timeout: 256 seconds]
rubie has joined #ruby
mary5030 has joined #ruby
hobodave has joined #ruby
<c0m0> but I don't use new methos, How can pass the parameters to the class initialize ?
railsraider has quit [Quit: railsraider]
curses has quit [Quit: leaving]
Lucky__ has joined #ruby
startupality has quit [Quit: startupality]
<livcd> what's the most tricky / advanced feature or paradigm for ruby ?
<shevy> c0m0 initialize is called via .new, after an intrinsic call to .allocate I think
hmnhf has quit [Ping timeout: 245 seconds]
<thermatix> I'm getting a version problem that doesn't make much sense to me
<thermatix> I'm getting: Unable to activate react.rb-0.3.0, because opal-0.8.0 conflicts with opal (~> 0.6.0), sprockets-3.2.0 conflicts with sprockets (< 3.0.0, >= 2.2.3)
theRoUS has joined #ruby
theRoUS has joined #ruby
startupality has joined #ruby
<shevy> c0m0 so when you wish to call initialize then you must use .new; you can instantiate a new object inside: def self.foo; Foo.new; end
<centrx> livcd, it's all easy with Ruby!
<adaedra> you have requirements which have incompatible requirements, thermatix
<thermatix> which doesn't make sense becuase I'm using opal "0.6.3" and sprockets "2.12.4"
<shevy> thermatix that is indeed a weird error
<thermatix> because*
<shevy> opal conflicts with opal, who would have thought
<thermatix> LOL
bmurt has quit [Read error: Connection reset by peer]
<adaedra> opal 0.8.0 conflicts with opal ~> 0.6.0
<adaedra> it's logical
icebourg has joined #ruby
<havenwood> what's depending on that old Opal?
<thermatix> but I'm not using opal 0.8.0
bmurt has joined #ruby
<thermatix> I'm using "0.6.0"
<thermatix> I'm using "0.6.3"*
<havenwood> then what's depending on the new Opal?
<thermatix> I don't know
linuxboytoo has quit [Remote host closed the connection]
<shevy> some gem must have registered that dependency
<adaedra> 0.6.3 corresponds to ~> 0.6.0
<thermatix> but I'm not
<thermatix> umm how can I find what's depending on a certain gem?
<adaedra> thermatix: try bundle update
linuxboytoo has joined #ruby
icebourg has quit [Client Quit]
<adaedra> rubygems.org has all dependencies
<thermatix> that didn't work sadly :(
Quandl has joined #ruby
rubie has quit [Remote host closed the connection]
Quandl is now known as Yiota
<havenwood> thermatix: gem dependency opal --reverse-dependencies
Yiota is now known as Quandl
lessless has joined #ruby
<yorickpeterse> havenwood: that only shows what's installed locally
ta has quit [Remote host closed the connection]
<thermatix> which is fine
<havenwood> yorickpeterse: Was hoping the offender might be installed.
<shevy> the evil offender
icebourg has joined #ruby
<thermatix> lol
olivierrr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Philipp__ has quit [Read error: Connection reset by peer]
<havenwood> yorickpeterse: I also haven't had coffee so it's a miracle if I'm coherent. Fixing that! :D
lannonbr has quit [Quit: WeeChat 1.2]
sivan1525 has joined #ruby
<thermatix> ok, so
startupality has quit [Client Quit]
<thermatix> react.rb is depending on opal-activesupport-0.1.0 which depends on opal-0.8.0
<shevy> I don't know what gem it is either, sprockets has no direct opal dependency, react neither
Quandl has quit [Read error: Connection reset by peer]
ponga has quit [Ping timeout: 244 seconds]
Guest85414______ has quit [Ping timeout: 244 seconds]
ss_much has quit [Ping timeout: 244 seconds]
alekst_ has quit [Ping timeout: 244 seconds]
daxroc has quit [Ping timeout: 244 seconds]
nickfausnight has quit [Ping timeout: 244 seconds]
culturelabs has quit [Ping timeout: 244 seconds]
alxndr has quit [Ping timeout: 244 seconds]
akitada has quit [Ping timeout: 244 seconds]
kapowaz has quit [Ping timeout: 244 seconds]
skarn has quit [Ping timeout: 244 seconds]
<shevy> huh hmm
<thermatix> react.rb
<shevy> what or where does react.rb belong to?
olivierrr has joined #ruby
tkuchiki_ has joined #ruby
<thermatix> but if I change opal to version 0.8.0
tkuchiki has quit [Ping timeout: 244 seconds]
duoi has quit [Ping timeout: 244 seconds]
sphex has quit [Ping timeout: 244 seconds]
rflot has quit [Ping timeout: 244 seconds]
bove has quit [Ping timeout: 244 seconds]
<thermatix> sprockets then breaks
<sivan1525> Hii I need help with getting output of float in the following format. example: 10.0000 instead of 10.0
<shevy> sivan1525 for display purposes you can require those trailing 0, see the sprintf formatting rules
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> &ri String#% sivan1525
<shevy> >> '%.6f' % '3.0'
<ruboto> shevy # => "3.000000" (https://eval.in/415893)
<thermatix> so I up sprockets from 2.12.4 to ~> 3.1 and
nux443 has joined #ruby
<sivan1525> if I use sprintf it gives output in string where as I need the output in float
jenrzzz has joined #ruby
podman has joined #ruby
<shevy> >> 10.0000
<ruboto> shevy # => 10.0 (https://eval.in/415894)
<adaedra> 10.0000 and 10.o are the same float
<shevy> see sivan1525 the 0 get chopped away
scripore has quit [Quit: This computer has gone to sleep]
<adaedra> 10.0*
<thermatix> then react.rb wants ~> 0.6 and ~> 0.8 is too high
<sivan1525> as the test cases require it to be in float rather than string
alxndr has joined #ruby
<shevy> yes it is a float
daxroc has joined #ruby
juanpaucar has quit [Remote host closed the connection]
<thermatix> sooo vicious circle :P
<havenwood> yorickpeterse: An nice! Just saw your lovely API link. :)
ss_much has joined #ruby
<shevy> thermatix react.rb belongs to which gem?
sphex has joined #ruby
<sivan1525> Yes the 0's get chopped
hahuang61 has quit [Ping timeout: 256 seconds]
ponga has joined #ruby
nickfausnight has joined #ruby
jbw has quit [Ping timeout: 255 seconds]
<adaedra> it's default float representation as string
keen_ has joined #ruby
culturelabs has joined #ruby
alekst_ has joined #ruby
<adaedra> but internally, 10.0, 10.000000 and 10.00000000000000000000000000000000000000000000000000000000000000000000000000000 are the same
trwyth has joined #ruby
rubie has joined #ruby
<thermatix> right
<shevy> It has a runtime dependenciey on opal ~> 0.6.0
<shevy> now havenwood knows who the offender is, he can unwrap his surgical toolset soon
chouhoulis has joined #ruby
<sivan1525> The requirement is such that I need it in this form 10.000000 rather than 10.0
<adaedra> sivan1525: where do you want it in this form?
<thermatix> which installs active support 0.1.0
akitada has joined #ruby
RobertBirnie has joined #ruby
<shevy> sivan1525 but look at the above example, ruby will keep it as 10.0 rather than 10.000; your only option is to compare formatted-strings then if you need more than one 0
kapowaz has joined #ruby
duoi has joined #ruby
duoi has quit [Changing host]
duoi has joined #ruby
rflot has joined #ruby
trwyth has quit [Client Quit]
<sivan1525> there was a programming contest on hackerearth which needed in the 10.000 form
trwyth has joined #ruby
basmoura_ has quit [Remote host closed the connection]
<thermatix> so I set opal to 0.6.0 annnd sprockets is now too high, so I downgrade sprockets to "2.12.4"
Zeroe has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
Guest85414______ has joined #ruby
<thermatix> and then when I run my ruby code
<adaedra> sivan1525: to *display* in this form, right?
<sivan1525> there was a programming contest on hackerearth which needed in the 10.000 form as they had written test case fot it in that way and I had no control over it
<thermatix> I get Unable to activate react.rb-0.3.0, because opal-0.8.0 conflicts with opal (~> 0.6.0), sprockets-3.2.0 conflicts with sprockets (< 3.0.0, >= 2.2.3)
basmoura has joined #ruby
jgpawletko has joined #ruby
<shevy> yeah, the -> dependency does not allow a version difference
<shevy> sorry
<shevy> the ~> one
<thermatix> so what do I do?
bove has joined #ruby
tmtwd has joined #ruby
<thermatix> react.rb wants a lower one but one of it's dependenies wants a higher one
<adaedra> you file an issue to the developper.
skarn has joined #ruby
<thermatix> which developer?
<shevy> yeah I see, the sprocket dependencies is also hardlocked in react.rb
<sivan1525> please check the output as required here https://goo.gl/bFhD9T
afs has joined #ruby
<adaedra> of react.rb, thermatix
<shevy> that requires a login :(
<adaedra> sivan1525: requires login.
Zeroe_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> can you paste the code or requirement on a pastie site?
<adaedra> sivan1525: if it's an /output/ required, you can format to a string then display.
hotpancakes has joined #ruby
pyon-nanon has quit [Ping timeout: 246 seconds]
<shevy> thermatix if everything fails, you could modify the .gemspec file to get rid of the hard lock dependency, but this may not work :D
dr3w has joined #ruby
<thermatix> it's github hasn't been touched in 2 months :(
<Porfa> can anyone hep me out submitting a form in ruby + mechanize ? I'm reading a a lot of stuff, but i need some questions answered i can't in google… for i.e., do i need to emulate a browser for me to submit a simple form, on a open site like.. google? do i need to send the data in specific formatation or i just need to change the forms values as i please and submit?
angrywombat has joined #ruby
<shevy> thermatix 2 months is semi-ok, there are projects with +5 years no modifications!
<thermatix> and it has numerous issues and PR's as well
startupality has joined #ruby
kevrom has joined #ruby
<angrywombat> hey guys, i'm having trouble with running ruby in zsh
<sivan1525> here is the pastie link http://pastie.org/10346524
<shevy> the above is why I don't specify hardlocked dependencies in my gems btw, I tell people to always upgrade
<havenwood> angrywombat: In what sense?
<angrywombat> keeps saying 'no command ruby found' or something but i know it's installed
<thermatix> you mean use uncertain versioning?
juanpaucar has joined #ruby
<havenwood> angrywombat: Is it in a location in your PATH/
deepu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ta has joined #ruby
<angrywombat> let me look
<thermatix> @angrywombat
<thermatix> what happens when you type ruby -v
<shevy> hey that text does not even mention the word float sivan1525 :D
startupality has quit [Client Quit]
<shevy> "For each test case, print the required answer rounded to exactly 4 decimal digits."
<shevy> so just use a method that can ensure that requirement
<angrywombat> thermatix: ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
<sivan1525> yes but if I use sprintf it not accepting : )
<dtzitz> ARF
_lovehandle_ has quit [Quit: Lost terminal]
<havenwood> angrywombat: command -v ruby
<angrywombat> /usr/local/bin/ruby
hotpancakes has quit [Ping timeout: 246 seconds]
<angrywombat> havenwood: ^
scripore has joined #ruby
<thermatix> is /usr/local/bin/ in your path?
<sivan1525> It says "For each test case, print the required answer rounded to exactly 4 decimal digits."
<angrywombat> thermatix: yes
<shevy> >> '%.4f' % "10.0"
<ruboto> shevy # => "10.0000" (https://eval.in/415895)
<havenwood> angrywombat: echo $PATH
<thermatix> but when you type ruby some_file.rb, it erros with "no command ruby found"?
<thermatix> errors*
<angrywombat> havenwood: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-sun/bin
<sivan1525> here is the output file link https://goo.gl/GCYvSS
<angrywombat> yeah
<angrywombat> thermatix: ^
<thermatix> that is odd
<havenwood> angrywombat: Sanity check you're still correct that `ruby -v` actually results in: zsh: command not found: ruby
tmtwd has quit [Ping timeout: 265 seconds]
<angrywombat> oh wait, i just have too many panes open
<thermatix> he said it responds with ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
<angrywombat> i am ssh'd in the multiple boxes
Oka has joined #ruby
<angrywombat> no wonder!
<havenwood> Usually turning it off and turning it back on again works.
<thermatix> LOL
<angrywombat> thanks guys
<havenwood> de nada
<thermatix> glad to help
ctalr has quit [Ping timeout: 250 seconds]
dtzitz has left #ruby [#ruby]
basmoura_ has joined #ruby
solars has quit [Ping timeout: 244 seconds]
jbw has joined #ruby
pdoherty has joined #ruby
mistnim has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
phutchins1 has joined #ruby
hakunin has joined #ruby
railsraider has joined #ruby
ctalr has joined #ruby
<phutchins1> Anyone by chance know why to_a is not working on BSON::ObjectId for me here? http://pastebin.com/paRVP8ZW
<ruboto> phutchins1, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/0a06db319dc6b61b0f1b
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<phutchins1> well thanks ruboto!
silkfox has joined #ruby
<adaedra> ?justabot
<ruboto> I'm just a bot. You don't need to address me.
sbhatore has quit [Read error: Connection reset by peer]
<phutchins1> :)
<shevy> well this object does not respond to .to_a
dorei has joined #ruby
basmoura has quit [Ping timeout: 252 seconds]
<phutchins1> I see it responding to to_a elsewhere, and it was working before i updated a few things...
<phutchins1> trying to figure if its a jruby thing, or that i'm using the mongo BSON or what
<phutchins1> I've tried using require 'bson'
EagleDelta has joined #ruby
<shevy> the docu there has no reference to a .to_a method, there is a .hash method if that helps
<jhass> phutchins1: where do you see it respond to to_a?
<jhass> and what would that return anyhow?
kevrom has left #ruby ["WeeChat 1.2"]
sbhatore has joined #ruby
terlar has quit [Ping timeout: 260 seconds]
lucianosousa has quit [Quit: lucianosousa]
B1n4r10 has joined #ruby
<shevy> I guess they removed it
<phutchins1> jhass: it returns an array that I can then pack and unpack binary
<thermatix> wooo
<thermatix> fixed
<jhass> phutchins1: 1.2.0 seems really old
<jhass> which version do you actually use?
<shevy> nono
<shevy> this is funny jhass
<sivan1525> @shevy , can you point me out to get the output in required format https://goo.gl/GCYvSS . Thanks in advance :)
<shevy> oh wait yes, 1.2.0
<shevy> 1.12.3 was released June 4, 2015
<jhass> http://api.mongodb.org/ruby/current/ the current version doesn't even ship with BSON anymore
<phutchins1> ah wow
<shevy> 3.2.1 was released July 30, 2015 (44 KB)
<shevy> pretty weird versioning scheme
<adaedra> shevy: why?
<shevy> sivan1525 and how do you store this internally?
<jhass> phutchins1: figure out what versions you have and want to support
<shevy> adaedra you release two version numbers a few days apart; one 1.x.x, the other 3.x.x
<adaedra> shevy: different release lines, when you keep updating old versions
<adaedra> rather common
terlar has joined #ruby
<shevy> adaedra this is why ruby 1.8.x should have been immortal!
araujo has quit [Quit: Leaving]
* adaedra slaps shevy around a bit with a large trout
<phutchins1> jhass: I'm requiring mongo 2.0.0
<jhass> phutchins1: the current mongo version is 2.0.6, which depends on BSON 3.x
mrtg9970 has joined #ruby
<jhass> *bson
rcvalle has joined #ruby
<phutchins1> ah that would do it...
<sivan1525> shevy, Don't know about that but other users had written the same program in ruby and their programs are passing so I am confused here
rdark has joined #ruby
<phutchins1> jhass: now i just gotta figure out what to_a on an objectid did :)
<jhass> phutchins1: or rather http://www.rubydoc.info/gems/bson/3.0.0/BSON/ObjectId for the minimum requirement
<phutchins1> jhass: gotcha.
<shevy> sivan1525 I am sure they use a method that ensures the right amount of decimal values. if you have stored things properly internally, you can format it in any way; there is no way ruby internally has a 10.000 though, it would always be a 10.0 if it is a float, so all of them must do a conversion
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> I'd guess #to_bson or something
Cache_Money has joined #ruby
tmtwd has joined #ruby
<phutchins1> jhass: yeah i'm on bson 3.2.1 now... ah, taking a look
saddad has quit [Ping timeout: 244 seconds]
VeganGreg has quit [Quit: WeeChat 1.2]
sarkyniin has quit [Remote host closed the connection]
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
senayar has quit [Ping timeout: 250 seconds]
prestorium has joined #ruby
Guest85 has joined #ruby
Iskarlar has joined #ruby
<sivan1525> shevy , okay will check into making a seperate method for displaying that, thanks for looking out :)
robh71 has joined #ruby
presto has quit [Ping timeout: 256 seconds]
jerematic has joined #ruby
Pisuke has quit [Read error: Connection reset by peer]
mrtg9970 has quit [Remote host closed the connection]
nobitanobi has quit [Remote host closed the connection]
Pisuke has joined #ruby
riffraff has joined #ruby
nobitanobi has joined #ruby
blackmesa has joined #ruby
josh3 has quit [Ping timeout: 246 seconds]
hmnhf has joined #ruby
<sivan1525> shevy I found the answer here http://stackoverflow.com/a/17584846
<livcd> what's the most tricky / advanced feature or paradigm for ruby ?
<adaedra> ...
jerematic has quit [Remote host closed the connection]
<adaedra> sivan1525: that's what we told you first
araujo has joined #ruby
<unver> livcd: probably objects
Vile` has quit [Ping timeout: 246 seconds]
da3mian has joined #ruby
<shevy> hehe
roolo has quit [Read error: Connection reset by peer]
<sivan1525> adaedra - sorry for misunderstanding I was using p for getting output instead of puts
<livcd> hah
hmnhf has quit [Client Quit]
hmnhf has joined #ruby
<shevy> ...
josh3 has joined #ruby
roolo has joined #ruby
Vile` has joined #ruby
<dorei> >>('Α'..'Ω').size
hotpancakes has joined #ruby
<ruboto> dorei # => nil (https://eval.in/415911)
<dorei> >>('Α'..'Ω').to_a.size
TinkerTyper has quit [Quit: ZNC restarting...]
<ruboto> dorei # => 17 (https://eval.in/415912)
<dorei> why is this happening?
<yorickpeterse> >> ('Α'..'Ω')
nobitanobi has quit [Ping timeout: 264 seconds]
<ruboto> yorickpeterse # => "Α".."Ω" (https://eval.in/415913)
<yorickpeterse> err
<yorickpeterse> >> ('Α'..'Ω').to_a
<centrx> Why me!?
<ruboto> yorickpeterse # => ["Α", "Β", "Γ", "Δ", "Ε", "Ζ", "Η", "Θ", "Ι", "Κ", "Λ", "Μ", "Ν", "Ξ", "Ο", "Π", "Ρ"] (https://eval.in/415914)
<yorickpeterse> because of that
<phutchins1> jhass: can you by chance tell off hand what it's doing here? https://gist.github.com/anonymous/79e91f0fc4acba859de8
<dorei> yorickpeterse: is that a bug?
nirvdrum has joined #ruby
chrishough has joined #ruby
<phutchins1> maybe converting to binary string
hpoydar has joined #ruby
deepu has joined #ruby
djstorm has joined #ruby
<slash_nick> whoa
<yorickpeterse> dorei: probably not
<[k-_> there are 24 letters in the greek alphabet?
<phutchins1> well not binary or hex
<dorei> [k-: yeap
blackmesa has quit [Ping timeout: 272 seconds]
hotpancakes has quit [Read error: Connection reset by peer]
<yorickpeterse> The reasoning is probably that this relies on Unicode codepoints
pyon has joined #ruby
<yorickpeterse> and the codepoint of Ρ is 329
<dorei> yorickpeterse: shouldn't ('A'..'Ω').size return 17 too?
hotpancakes has joined #ruby
<yorickpeterse> But that of Σ is 931
<yorickpeterse> so it falls out of the range
big|bad|wolf has joined #ruby
<dorei> the most strange behaviour is this
<[k-_> >> ('α'..'ω').to_a.size
<ruboto> [k-_ # => 25 (https://eval.in/415915)
<yorickpeterse> dorei: No
<[k-_> 25 :O
<jhass> >> "55a2ff4cea9b00cb23789e22".each_char.each_slice(2).map {|b| b.join.to_i(16) } # phutchins1
<yorickpeterse> Enumerator#size does not return a dynamic size
<ruboto> jhass # => [85, 162, 255, 76, 234, 155, 0, 203, 35, 120, 158, 34] (https://eval.in/415916)
<dorei> >> ('Α'..'Ω').include?('Τ')
<ruboto> dorei # => false (https://eval.in/415917)
<yorickpeterse> it simply returns a pre-determined size
<yorickpeterse> use #count instead
<dorei> >> ('Α'..'Ω').cover?('Τ')
<ruboto> dorei # => true (https://eval.in/415918)
<yorickpeterse> >> ('Α'..'Ω').count
<ruboto> yorickpeterse # => 17 (https://eval.in/415919)
<[k-_> what is this madness
<jhass> phutchins1: interpreting each two characters as a byte in hexadecimal
<dorei> [k-: there's a variant in 'σ', it's written 'σ' in the middle of a word, while it's written 'ς' in the end of a word
<phutchins1> ahhhhhh
jeremy04_ has quit [Remote host closed the connection]
<phutchins1> jhass: you rock.
<BraddPitt> w 5
<dorei> yorickpeterse: thanx about the insight in the subtle difference between #count and #size :)
<yorickpeterse> dorei: tl;dr a character range only works reliably for ASCII characters
chinmay_dd has joined #ruby
Meow-J has quit [Quit: Connection closed for inactivity]
sivan1525 has quit [Quit: Page closed]
eGGsha has joined #ruby
NeverDie has joined #ruby
B1n4r10 has quit [Read error: Connection reset by peer]
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
saddad has joined #ruby
pyon has quit [Ping timeout: 244 seconds]
hmnhf has quit [Quit: Konversation terminated!]
yh has quit [Ping timeout: 250 seconds]
angrywombat has left #ruby ["WeeChat 1.2"]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krz has quit [Ping timeout: 244 seconds]
hmnhf has joined #ruby
leat has joined #ruby
senayar has joined #ruby
lannonbr has joined #ruby
galeido has joined #ruby
blackmesa has joined #ruby
shredding has quit [Ping timeout: 250 seconds]
diego_ar has joined #ruby
coban2k has joined #ruby
juanpaucar has quit [Remote host closed the connection]
<atmosx> hello
rehat has joined #ruby
railsraider has quit [Quit: railsraider]
diego_ar is now known as dperalta
bnizzle has quit [Quit: Leaving.]
bnizzle has joined #ruby
hotpancakes has quit [Ping timeout: 250 seconds]
dperalta_ has joined #ruby
<tuor> hi, I have finished the first version of my "mini gem". It's just one thing and it's based on an other one. So this is the code: https://gist.github.com/anonymous/1573a0036fa6605c3e54
greenarrow has quit [Quit: 500]
hotpancakes has joined #ruby
railsraider has joined #ruby
hololeap has joined #ruby
afs has quit [Quit: Ex-Chat]
dperalta_ is now known as diego_ar
<tuor> it's my first ruby programm. My first (more the 10 line) programm. I know bash but that's it. So pleas tell me what you would do better or so. thx. :)
diego_ar is now known as dperalta_
zitar has joined #ruby
trwyth has quit [Quit: trwyth]
<ljarvis> tuor: your question is incredibly vague. Is there a part of your code you'd like help on? or do you actually want someone to review all of it?
techsethi has joined #ruby
bnizzle has quit [Client Quit]
dperalta has quit [Disconnected by services]
dperalta_ is now known as dperalta
bnizzle has joined #ruby
<tuor> it's working. So review^^ I mean if someone has time. Or just review "fast". Or just how the syntax is.
towski_ has joined #ruby
<atmosx> dorei: how's life :-)
<tuor> It's about how to write ruby in global.
malconis_ has joined #ruby
malconis_ has quit [Remote host closed the connection]
<tuor> ljarvis, <-
<ljarvis> tuor: ok, I think your initialize argument spanning multiple lines is a bit ugly
senayar has quit []
malconis_ has joined #ruby
malconis has quit [Ping timeout: 260 seconds]
terlar has quit [Read error: No route to host]
zitar has quit [Client Quit]
bnizzle has left #ruby [#ruby]
devoldmx has joined #ruby
<shevy> it makes it more readable
<ljarvis> tuor: also, in general, constants are UPPER_CASE
bnizzle has joined #ruby
<shevy> line 51 seems off
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quimrstorres has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 256 seconds]
chrissonar has quit [Remote host closed the connection]
<ljarvis> "it makes it more readable" => "line 51 seems off" -- lol
<[k-_> SCREAMING_UPPER_SNAKE_CASE
<shevy> yeah
<yorickpeterse> METAL_SNAKE_CASE
<shevy> it's on the same indent level as the end
<[k-_> another "admin" username as default :s
<ljarvis> it's on the same line as the method definition
egtann has joined #ruby
but3k4 has quit [Ping timeout: 260 seconds]
<ljarvis> tuor: def initialize(options = DEFAULT_OPTIONS)
Lildirt has quit [Quit: Leb wohl, meine Freunde. Ich wünsche Ihnen das beste von Tagen.]
duderonomy has joined #ruby
<atmosx> tuor: I wouldn't use instance variabels in teh code, I'd use attr_reader to depend on behavior not ata
<tuor> ljarvis, ah ok. I'll change the constant name and this to.
railsraider has quit [Quit: railsraider]
Lildirt has joined #ruby
<ljarvis> yeah using readers is better imo too
mleung has joined #ruby
<ljarvis> imported_templates should be a Set
[Butch] has joined #ruby
<[k-_> when calling super alone, ruby will pass all arguments to the "super method"
but3k4 has joined #ruby
<ljarvis> list_dependencies uses list = [] and each, you could use map instead
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-_> so if you are passing all arguments to super, might as well not list them twice
devoldmx has quit [Ping timeout: 264 seconds]
<phutchins1> jhass: yep, that did the trick. your help is much appreciated!
chinmay_dd has quit [Read error: Connection reset by peer]
khebbie has joined #ruby
dling` is now known as dling
TomyLobo has joined #ruby
hahuang61 has joined #ruby
hanmac has quit [Ping timeout: 246 seconds]
yh has joined #ruby
dfockler has joined #ruby
riotjones has joined #ruby
arta82 has joined #ruby
<atmosx> I would also change the 'unless' to 'if' here: https://gist.github.com/anonymous/1573a0036fa6605c3e54#file-zabbixsync-rb-L103 since it's an unless/else it could easily be done in if/else (easier to read, but also kinda irrelevant if the current version works)
khebbie has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
<[k-_> use .empty? instead of == []
skysploit has joined #ruby
josh3 has quit [Ping timeout: 244 seconds]
<ljarvis> also, move all that code outside of the file read block
<ljarvis> file open block*
arta82 has quit [Max SendQ exceeded]
quimrstorres has joined #ruby
<ljarvis> also, you check that it exists, then write to it if it doesn't
rbennacer has quit [Remote host closed the connection]
<[k-_> extra space
<ljarvis> that's confusing
<tuor> ok. I'll read one after other.^^
<ljarvis> if it doesn't exist, just skip reading it
zendrix has joined #ruby
bnizzle has quit [Quit: Leaving.]
<Diabolik> if an instance variable is a hash, how do i access the values within it?
<Diabolik> if i do
<Diabolik> raise @booking_details[:appointment_information][:time]
<Diabolik> i get
<atmosx> tuor: I would also implement a logger to 'log' everything that is happening and use some Exception Handling to catch possible errors in a more 'graceful way' (if the code was made to be used by others in production env)
<mikecmpbll> lol, deluge.
bnizzle has joined #ruby
<Diabolik> undefined method `[]' for nil:NilClass
bodgix has quit [Quit: Leaving.]
<tuor> shevy, what do you meen with: "line 51 seems off"
banister has joined #ruby
<ljarvis> Diabolik: that's because @booking_details or the value at :appointment_information is nil
<mikecmpbll> tuor: use the json style hash syntax for symbolic keys, too. it's way cooler.
bodgix has joined #ruby
mondo has joined #ruby
<[k-_> or 'w+'
<Diabolik> ljarvis within the hash the value is appointment_information: {time: DateTime.now + 30.minutes}}
<tuor> [k-_, thats the normal username when you install. So if you want to test then it works. When you use it, you give your own stuff to .new()
tjohnson has joined #ruby
<ljarvis> Diabolik: then your ivar isn't set when you try and access it
<Diabolik> the line before sets it :(
<atmosx> tuor: you know, people pay for the kind of thing we're doing at your code right now :-P
riotjones has quit [Ping timeout: 246 seconds]
<mondo> What's the easiest way to make a simple HTTP GET request in Ruby? Without a 3rd party library do I have to use net:http?
rdark has quit [Quit: leaving]
<[k-_> tuor: i do not keep state, i do not know what you refer to
<ljarvis> mondo: net/http or open-uri
<ljarvis> mondo: both are in stdlib
<atmosx> mondo: open-uri
benlieb has joined #ruby
bricker has joined #ruby
<mondo> open-uri will do, thanks!
<tuor> atmosx, I don't understand why not using variables. ( I wouldn't use instance variabels in teh code, I'd use attr_reader to depend on behavior not ata)
<[k-_> tuor: L154 spelling mistake
<[k-_> tuor: L158 spelling mistake
ramfjord has joined #ruby
<yorickpeterse> dat indent
<atmosx> tuor: because your code will be harder to maintain in the future. Any changes to that instance variable will instantly reflect to the entire program.
Coldblackice has quit [Ping timeout: 264 seconds]
<[k-_> all in all, i do not like it
<ljarvis> yorickpeterse: yes that's the worst part of it..
<atmosx> [k-_: that's evil.
<tuor> atmosx, ah ok.
<yorickpeterse> ljarvis: haha
<[k-_> atmosx: im not reading the whole chat, what do you mean
<yorickpeterse> granted if I use block form everywhere it's probably a tad easier on the eyes
<yorickpeterse> but first, train home!
pyon has joined #ruby
akosednar has joined #ruby
<ljarvis> choo choo
<atmosx> tuor: judging by your code, I think you're kinda ready to read this book http://www.poodr.com it will help a lot.
<atmosx> [k-_: nadah, it was a joke about the 'I do not like it' part.
pyon has quit [Read error: Connection reset by peer]
banister has quit [Read error: Connection reset by peer]
pyon has joined #ruby
railsraider has joined #ruby
ledestin has joined #ruby
yardenbar has quit [Quit: Leaving]
kies has joined #ruby
tomme has joined #ruby
tomme has left #ruby [#ruby]
dumdedum has quit [Quit: foo]
darkf has quit [Quit: Leaving]
hanmac has joined #ruby
tubuliferous_ has joined #ruby
NeverDie has quit [Ping timeout: 272 seconds]
Alayde has joined #ruby
dperalta has quit [Remote host closed the connection]
<shevy> Any potential pitfalls I should keep in mind when subclassing from StringIO? I am about to make some changes to an existing project in an upcoming rewrite, the main class will be the one that then subclasses from StringIO
ruby-lang528 has joined #ruby
tchebb has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruby-lang528 has quit [Client Quit]
thermatix has quit [Ping timeout: 255 seconds]
tubuliferous_ has quit [Ping timeout: 240 seconds]
* tuor will slowly go over all you wrote and thx for so much answers! Tuor will later post the changed code.
renderful has joined #ruby
finisherr has joined #ruby
pietr0 has joined #ruby
swgillespie has joined #ruby
alex88 has quit []
Zeroe has quit [Quit: Zeroe]
viki_ has quit [Ping timeout: 256 seconds]
pyon has quit [Ping timeout: 272 seconds]
mikecmpbll has quit [Ping timeout: 244 seconds]
Pisuke has quit [Read error: Connection reset by peer]
Pisuke has joined #ruby
momomomomo has quit [Quit: momomomomo]
ferhaty has joined #ruby
Synthbread has quit [Read error: Connection reset by peer]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
josh3 has joined #ruby
jenrzzz has joined #ruby
railsraider has quit [Quit: railsraider]
freerobby has joined #ruby
jpfuentes2 has joined #ruby
pyon has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chabil has joined #ruby
bronson has joined #ruby
hashrocket has joined #ruby
<TomyLobo> raise 'hell'
hotpancakes has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
dumdedum has joined #ruby
malconis_ has quit [Remote host closed the connection]
tomphp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has joined #ruby
c0m0 has quit [Ping timeout: 240 seconds]
thermatix has joined #ruby
michaeldeol has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
<lagweezle> rescue ?
basmoura_ has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 245 seconds]
basmoura has joined #ruby
dr3w has quit [Remote host closed the connection]
dr3w has joined #ruby
<suchness> rescue FunError
<suchness> ensure
<suchness> Bordom.new
<suchness> end
pyon has quit [Ping timeout: 260 seconds]
niiamon has joined #ruby
nuttermb has joined #ruby
<shevy> Bordom hmm
<suchness> also rescue spelling error
niiamon has quit [Remote host closed the connection]
<lagweezle> BorDOM?
NeverDie has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
<TomyLobo> go to the root of the BorDOM
jeremy04 has joined #ruby
<TomyLobo> and delete it
hotpancakes has joined #ruby
unver has quit [Ping timeout: 264 seconds]
last_staff has joined #ruby
thermatix has quit [Ping timeout: 255 seconds]
saddad has quit [Ping timeout: 246 seconds]
j4cknewt has joined #ruby
weemsledeux has quit [Read error: Connection reset by peer]
hmnhf has quit [Ping timeout: 250 seconds]
Guest32 has joined #ruby
rakm has joined #ruby
hmnhf has joined #ruby
Violentr has joined #ruby
<suchness> -> DOM
skade has joined #ruby
Guest32 has quit [Read error: Connection reset by peer]
skade has quit [Client Quit]
big|bad|wolf has quit []
juanpaucar has joined #ruby
rbennacer has joined #ruby
unver has joined #ruby
hj2007 has joined #ruby
quimrstorres has quit [Remote host closed the connection]
yh has quit [Ping timeout: 265 seconds]
hmnhf has quit [Read error: Connection reset by peer]
hmnhf has joined #ruby
khebbie has joined #ruby
blue_deref has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
advorak has joined #ruby
jstacks has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
Timba-as has quit [Quit: Be back later ...]
fantazo has joined #ruby
eGGsha has quit [Quit: Textual IRC Client: www.textualapp.com]
lannonbr has quit [Ping timeout: 260 seconds]
JoshL has quit [Read error: Connection reset by peer]
quimrstorres has joined #ruby
JoshL has joined #ruby
mikecmpbll has joined #ruby
Torrieri has quit [Quit: Be back later ...]
scripore has joined #ruby
hj2007 has quit [Quit: This computer has gone to sleep]
<tuor> OK. I think i have done the changes. The code still works. :): https://gist.github.com/anonymous/2e0ad8ed1fb72e97913a
hobodave has joined #ruby
ishahnaz has quit []
hmnhf has quit [Quit: Konversation terminated!]
lucianosousa has joined #ruby
michaeldeol has quit [Ping timeout: 250 seconds]
<shevy> you are the best tuor \o/
chouhoulis has joined #ruby
<[k-_> L39-L40 leave a blank line
hmnhf has joined #ruby
<tuor> atmosx, a logger & error handling will be a bigger task, can't do it in 5 min. So I'll do it in future. (it's on my list now)
<atmosx> tuor: yeah :-)
psy_ has joined #ruby
Trynemjoel has quit [Ping timeout: 250 seconds]
<havenwood> tuor: The traditional convention for constants in Ruby is SCREAMING_SNAKE_CASE (or some use CamelCase), so I'd suggest `DEFAULT_RULES` instead of `Rules_default`.
<tuor> mikecmpbll, "18:14:54 use the json style hash syntax for symbolic keys" I don't understand what you meen.
hmnhf has quit [Client Quit]
<mikecmpbll> tuor: { :foo => "bar" } is equivalent to { foo: "bar" }
hj2007 has joined #ruby
hmnhf has joined #ruby
<havenwood> tuor: Putting `DEFAULT_` in front seems to read better and would group the defaults a bit.
<mikecmpbll> the latter syntax was added as an alternative in ruby 1.9.3
Guest85 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oxpom has joined #ruby
<mikecmpbll> it's more succinct for hashes where the keys are symbols.
Guest85 has joined #ruby
platzhirsch has joined #ruby
<tuor> atmosx, yes I know that people pay for checking code and I'm very grateful.
Trynemjoel has joined #ruby
<[k-_> this is free if you use rubocop
<[k-_> that heinous thing
dented42 has quit [Ping timeout: 244 seconds]
<tuor> atmosx, "judging by your code, I think you're kinda ready to read this book...": I have a book about ruby basics. I'll have to read (and train) this one first. But Then I'll see (I have it in a bookmark)
EllisTAA has joined #ruby
[k-_ has quit [Quit: Lingo: www.lingoirc.com]
dented42 has joined #ruby
<EllisTAA> can someone tell me why when i try to see if this string contains something using a regex i get nil? https://gist.github.com/ellismarte/e7d5ed2fb71ea202ed40
olivierrr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lagweezle> [k-: heinous? Whyfor? (joking?)
doodleha_ has joined #ruby
<shevy> how do you invoke that code EllisTAA
Xiti has quit [Ping timeout: 240 seconds]
Porfa has quit [Quit: Porfa]
<EllisTAA> shevy: i have some test code
ferhaty has quit [Ping timeout: 260 seconds]
<tuor> [k-, line is added, I'll google robucop.
tvw has joined #ruby
christiandsg has joined #ruby
dented42_ has joined #ruby
olivierrr has joined #ruby
da3mian has quit [Ping timeout: 256 seconds]
michaeldeol has joined #ruby
Guest85 has quit [Ping timeout: 264 seconds]
maletor has joined #ruby
<atmosx> tuor: poodr is awesome and it's not strictly about ruby code, it's about design, which is another level of abstraction. The good thing is that uses ruby code so it's hands-on for ruby codes.
<atmosx> s/codes/programmers
Jackneill has joined #ruby
leafybasil has quit [Remote host closed the connection]
<shevy> EllisTAA that code is sorta confusing to me :D
<tuor> havenwood, just forgott about this one, but why DEFAULT_RULES and not RULES_DEFAULT? I meen I just like to write names like this. So is it important which way?
<tuor> atmosx, ah ok.
leafybasil has joined #ruby
tmtwd has joined #ruby
Zeroe has joined #ruby
<shevy> EllisTAA where do you get nil btw? I get: 0 1 1 1 1 - btw I think break() may return nil
hobodave has quit [Quit: Computer has gone to sleep.]
<tuor> mikecmpbll, ah ok.
<shevy> or puts... either of them
<havenwood> tuor: It isn't important to the computer. What are the rules default? What are the default rules?
spider-mario has joined #ruby
<EllisTAA> shevy: i got nil in irb
<havenwood> tuor: Which sounds right to you?
<EllisTAA> it keeps saying i am missing a parenthses
michaeldeol has quit [Client Quit]
<tuor> havenwood, I know that the computer doesn't care. and: RULES_DEFAULT ^^
dented42 has quit [Ping timeout: 265 seconds]
michaeldeol has joined #ruby
<havenwood> tuor: So the rules default for how you say thing is order reverse?
quimrstorres has quit [Remote host closed the connection]
<shevy> EllisTAA I put your code in a .rb file and it ran without error
<havenwood> tuor: :P
michaeldeol has quit [Client Quit]
<EllisTAA> shevy: yeah but it isn’t working, when i ask does this string have this incompatible expression, it returns nil
<tuor> havenwood, no, but it's just about rules and there are the default ones. So the name begins with rules and default is just an aditional information about which rules. ;)
<EllisTAA> in irb this "[)" =~ /'['/ returns SyntaxError: (irb):55: premature end of char-class: /'['/
<tuor> But I see it's not realy logic for other people.
<tuor> I'll think of changing it.
<EllisTAA> and this also returns nil "[)" =~ /'\[\'/
michaeldeol has joined #ruby
leafybasil has quit [Ping timeout: 255 seconds]
<tuor> So Thx all of you for your help! :)
finisherr has quit [Quit: finisherr]
leafybasil has joined #ruby
Burgestrand has joined #ruby
finisherr has joined #ruby
msnyon has quit [Ping timeout: 240 seconds]
Trynemjoel has quit [Ping timeout: 245 seconds]
leafybasil has quit [Remote host closed the connection]
ht__ has joined #ruby
<shevy> EllisTAA I can not reproduce that, it works in my irb just fine as well
jhack has joined #ruby
jhack has joined #ruby
<shevy> the code you showed does not have: "[)" =~ /'['/
jstacks has quit [Quit: Leaving...]
finisherr has quit [Client Quit]
<shevy> [ is a special character in a regex
shock_one has quit []
<[spoiler]> EllisTAA: you need to escape the `[`
khebbie has quit [Remote host closed the connection]
lannonbr has joined #ruby
shock_one has joined #ruby
<[spoiler]> and there's no `'` character in "[)" so of course it will return nil, you're looking for "['"
tubuliferous_ has joined #ruby
dr3w has quit [Ping timeout: 260 seconds]
<shock_one> What do you think? Do you suffer from this as much as I do? https://github.com/pry/pry/pull/1458
<[spoiler]> EllisTAA: use "[)" =~ /\[\)/
Trynemjoel has joined #ruby
<EllisTAA> shevy: this should print 0 for the last element of expressions, but it isn’t https://gist.github.com/ellismarte/e7d5ed2fb71ea202ed40#file-regeex-rb-L9
<EllisTAA> oh ok
<[spoiler]> shock_one: it would be most useful; does it only work on expressions, though?
<shock_one> [spoiler]: is there something else?
postmodern has joined #ruby
<shock_one> Oh, you probably mean statements or declarations, right? It will work with them.
Jackneill has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 265 seconds]
hj2007 has quit [Quit: This computer has gone to sleep]
<[spoiler]> i checked the commit and yeah it should work with those too
sectionme has joined #ruby
<[spoiler]> much good
christiandsg has quit [Remote host closed the connection]
a346 has joined #ruby
RegulationD has quit [Remote host closed the connection]
josh3 has quit [Ping timeout: 265 seconds]
bootstrappm has joined #ruby
conor_ has quit [Remote host closed the connection]
choke has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
<TomyLobo> is there an original or sound to this?
<[spoiler]> TomyLobo: ^
<[spoiler]> warning: it might get stuck in your head
Violentr has quit [Ping timeout: 244 seconds]
<TomyLobo> oh god, weebl even made this
bodgix has quit [Quit: Leaving.]
omegamike has quit [Remote host closed the connection]
<mondo> Anyone that uses Sublime text, is there a way to fix this issue where "#{myvar}" doesn't tab complete? so I type "#{my and hit tab, but it doesn't complete the variable name even though it's showing the autocomplete drop down
Jackneill has joined #ruby
failshell has joined #ruby
zendrix has quit []
<[spoiler]> mondo: I switched to atom, because of issues like that in sublime
<[spoiler]> mondo: v2 or v3? I think there's a way to fix it by downloading a better language pack
<mondo> v3, 3083 is what im on
dumdedum has quit [Quit: foo]
troulouliou_div2 has quit [Ping timeout: 250 seconds]
josh3 has joined #ruby
<[spoiler]> best bet would be to look for something to replace the default ruby highlighter
<[spoiler]> which adds features
failshell has quit [Client Quit]
timanema has quit [Quit: leaving]
allcentury has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
jhack has quit [Remote host closed the connection]
trwyth has joined #ruby
<BraddPitt> I'm loving Atom (recently switched)
dfockler has quit [Remote host closed the connection]
platzhirsch has left #ruby [#ruby]
<EllisTAA> if anyone can help me out, i’d appreciate it https://gist.github.com/ellismarte/e7d5ed2fb71ea202ed40#file-regeex-rb-L19-L20
hobodave has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
snockerton has joined #ruby
baweaver has quit [Ping timeout: 255 seconds]
Igor2__ has quit [Quit: Leaving]
rubie has quit [Remote host closed the connection]
RegulationD has joined #ruby
hj2007 has joined #ruby
dr3w has joined #ruby
sectionme has quit [Ping timeout: 264 seconds]
dfockler has joined #ruby
poguez_ has joined #ruby
jackjackdripper has joined #ruby
rubie has joined #ruby
northfurr has joined #ruby
choke has joined #ruby
martinium has joined #ruby
northfurr has quit [Client Quit]
advorak has quit [Quit: This computer has gone to sleep]
<BraddPitt> what is your input, EllisTAA ?
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
jackjackdripper has quit [Client Quit]
dopie has quit [Quit: This computer has gone to sleep]
jackjackdripper has joined #ruby
dseitz has joined #ruby
dopie has joined #ruby
Zggb has quit [Quit: Connection closed for inactivity]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
allcentury has joined #ruby
<shevy> "There's loads of documentation, examples and frameworks it works with, such as Wordpress, Pandas, Ruby on Rails, and Django."
<shevy> even Pandas are coding now!
egtann has quit [Remote host closed the connection]
egtann has joined #ruby
michaeldeol has joined #ruby
<BraddPitt> well EllisTAA it doesnt match either incompatible regex nor is its length % 2 == 1
<BraddPitt> what is Pandas again
<BraddPitt> I remember hearing it frmo someone on our data science team
juanpaucar has quit [Remote host closed the connection]
<EllisTAA> the last expression contains [)
choke has quit [Read error: Connection reset by peer]
choke_ has joined #ruby
Gribo has joined #ruby
advorak has joined #ruby
pafin has joined #ruby
<BraddPitt> ah, I get this capture; http://rubular.com/r/I0qgJNkCsp
<drbrain> EllisTAA: you shouldn't depend on expression being available after the block
jhack has joined #ruby
jhack has joined #ruby
podman has joined #ruby
<drbrain> EllisTAA: also, do you mean /#{exp}/?
riffraff has quit [Quit: Leaving]
<EllisTAA> i tried that
c_nick has joined #ruby
<drbrain> right now you're matching /exp/ so nothing will match
<drbrain> literally, exp
<BraddPitt> yeah
treehug88 has joined #ruby
<BraddPitt> drbrain is correct
<c_nick> i have ruby x64 and ruby x86 installed. x64 has bundler 1.7.4 while x86 has 1.6.3 when i try to build the project using pik use x86 bundler crashes saying fatal error in bundler please reinstall makes no sense to me
devoldmx has joined #ruby
bricker has quit [Ping timeout: 264 seconds]
suchness has quit [Ping timeout: 244 seconds]
<EllisTAA> balls. Hired.com’s test is hard ><
<drbrain> EllisTAA: your current code is checking whether the length of each item in check_braces is odd or even
<EllisTAA> drbrain, should it check to see if contains the incompatible expression before it checks the length
hmnhf_ has joined #ruby
<BraddPitt> Hired didnt give me a test
finisherr has joined #ruby
<drbrain> you want to use /#{exp}/ then
hmnhf has quit [Ping timeout: 260 seconds]
northfurr has joined #ruby
northfurr has quit [Client Quit]
<EllisTAA> i tried that and i tried /“#{exp}”/
leat has quit [Ping timeout: 244 seconds]
arturhoo_ has joined #ruby
<EllisTAA> thanks for your help
arturhoo has quit [Ping timeout: 246 seconds]
arturhoo_ is now known as arturhoo
devoldmx has quit [Ping timeout: 260 seconds]
arturhoo has quit [Remote host closed the connection]
choke_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
choke has joined #ruby
blackmesa has joined #ruby
ramfjord has joined #ruby
Xiti has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dr3w has quit [Ping timeout: 256 seconds]
michaeldeol has joined #ruby
bodgix has joined #ruby
kies has quit [Ping timeout: 265 seconds]
<drbrain> EllisTAA: since you have two tasks, make two methods
<drbrain> one to check if its incompatible
<EllisTAA> drbrain: ah man that’s a good idea
<[spoiler]> BraddPitt: I love Atom, but it does "choke" for and up to half a minute on big files, but once they're loaded it seems fine-ish
<drbrain> and get that working, then do the second task in a second method
<drbrain> then add a third method that calls each
NeverDie has quit [Max SendQ exceeded]
Burgestrand has quit []
<EllisTAA> drbrain: failing in high pressure situations is cool, i won’t make those mistakes again
<BraddPitt> yeah [spoiler] sadly thats still an issue
hpoydar has quit []
blackmesa has quit [Ping timeout: 272 seconds]
<[spoiler]> BraddPitt: it was *much* worse the first time I tried it, I don't mind the few seconds, I quickly do something else in the meantime
Burgestrand has joined #ruby
finisherr has quit [Quit: finisherr]
NeverDie has joined #ruby
leafybasil has joined #ruby
finisherr has joined #ruby
MissionCritical has quit [Ping timeout: 244 seconds]
baweaver has joined #ruby
jbw_ has joined #ruby
<BraddPitt> otherwise i really like it
sperant has joined #ruby
<c_nick> array1 - array 2 or should i literally go array1.each {delete(x)}
keen__ has joined #ruby
<[spoiler]> c_nick: you could use the first approach if you need to delete multiple elements
jbw has quit [Ping timeout: 250 seconds]
keen_ has quit [Ping timeout: 252 seconds]
<[spoiler]> also a delete_if block might be more apt if the logic is more complex
benlieb has quit [Quit: benlieb]
vaedd has quit [Quit: Connection closed for inactivity]
kies has joined #ruby
hmnhf_ has quit [Read error: Connection reset by peer]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nuttermb has quit [Ping timeout: 255 seconds]
thiagovsk has quit [Quit: Connection closed for inactivity]
trwyth has quit [Quit: trwyth]
<c_nick> [spoiler]: one or more.. internally its doing the same thing right?
michaeldeol has joined #ruby
<[spoiler]> c_nick: not really
<c_nick> just operator overloading ?
<c_nick> hmm
<[spoiler]> `a1 - a2` is basically `a1.delete_if {|e| a2.include? e }`
lucianosousa has quit [Quit: lucianosousa]
Mission-Critical has joined #ruby
<[spoiler]> but more optimised
<[spoiler]> delete_if can test for more complex stuff
finisherr has quit [Quit: finisherr]
michaeldeol has quit [Client Quit]
<[spoiler]> `a1.delete_if {|e| !e.valid? || e.useless! || e.marked_for_deletion? }` etc
dperalta has joined #ruby
Pavel_Fin has joined #ruby
advorak has quit [Ping timeout: 260 seconds]
yh has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<c_nick> hmm ok
<c_nick> cool thanks [spoiler]
finisherr has joined #ruby
DLSteve has joined #ruby
c_nick has left #ruby [#ruby]
dr3w has joined #ruby
bodgix_ has joined #ruby
pafin has quit [Ping timeout: 255 seconds]
finisherr has quit [Client Quit]
bodgix has left #ruby [#ruby]
finisherr has joined #ruby
bodgix_ is now known as bodgix
casadei has joined #ruby
Meow-J has joined #ruby
chinmay_dd has joined #ruby
finisherr has quit [Client Quit]
bodgix has quit [Quit: ZNC - http://znc.in]
finisherr has joined #ruby
tmtwd has joined #ruby
Mission-Critical is now known as MissionCritical
bodgix has joined #ruby
chabil has quit [Quit: WeeChat 1.2]
msnyon has joined #ruby
bodgix has quit [Client Quit]
bruno-_ has quit [Ping timeout: 240 seconds]
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dented42 has joined #ruby
dented42_ has quit [Read error: Connection reset by peer]
christiandsg has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
finisherr has quit [Client Quit]
bodgix has joined #ruby
thermatix has joined #ruby
baweaver has quit [Remote host closed the connection]
msnyon has quit [Ping timeout: 244 seconds]
benlieb has joined #ruby
nuttermb has joined #ruby
dented42 has quit [Ping timeout: 252 seconds]
_blizzy_ has joined #ruby
Burgestrand has quit []
christiandsg has quit [Ping timeout: 265 seconds]
bodgix has quit [Client Quit]
finisherr has joined #ruby
michaeldeol has joined #ruby
f4cl3y has quit [Ping timeout: 255 seconds]
n008f4g_ has joined #ruby
nahtnam has quit [Quit: Connection closed for inactivity]
thermatix has quit [Ping timeout: 255 seconds]
bodgix has joined #ruby
michaeldeol has quit [Client Quit]
finisherr has quit [Client Quit]
hotpancakes has quit [Remote host closed the connection]
NeverDie has quit [Read error: Connection reset by peer]
NeverDie has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
Burgestrand has joined #ruby
tonios57 has quit [Quit: Textual IRC Client: www.textualapp.com]
krz has joined #ruby
dr3w has quit [Ping timeout: 260 seconds]
_blizzy_ has joined #ruby
shock_one has quit [Remote host closed the connection]
finisherr has joined #ruby
bodgix has quit [Quit: ZNC - http://znc.in]
bodgix has joined #ruby
hotpancakes has joined #ruby
finisherr has quit [Client Quit]
finisherr has joined #ruby
finisherr has quit [Client Quit]
n_blownapart has joined #ruby
finisherr has joined #ruby
danman has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
choke has joined #ruby
flak has joined #ruby
scripore has joined #ruby
finisherr has quit [Client Quit]
blackmesa has joined #ruby
finisherr has joined #ruby
Alayde has quit [Ping timeout: 255 seconds]
techsethi has quit [Quit: techsethi]
rippa has quit [Ping timeout: 244 seconds]
tsou has quit [Remote host closed the connection]
rippa has joined #ruby
msnyon has joined #ruby
spider-mario has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
egtann has quit [Remote host closed the connection]
blue_deref has quit [Quit: bbn]
nahtnam has joined #ruby
egtann has joined #ruby
flak has quit [Ping timeout: 246 seconds]
ccbn has joined #ruby
finisherr has quit [Client Quit]
finisherr has joined #ruby
<nahtnam> Is there a cleaner way to do beging, rescue blocks instead of nesting them like: https://gist.github.com/nahtnam/c62e86ed11b5009a817c
Cache_Money has quit [Ping timeout: 255 seconds]
frem has joined #ruby
<nahtnam> *beginning
<BraddPitt> you can have multiple rescues for 1 begin, nahtnam
Pisuke has quit [Max SendQ exceeded]
<nahtnam> ?
<nahtnam> How would that help?
Scriptonaut has joined #ruby
benlieb has quit [Quit: benlieb]
<Scriptonaut> is there any syntax convention when denoting a cached value?
kadoppe has quit [Ping timeout: 250 seconds]
AlexRussia has quit [Ping timeout: 272 seconds]
<ccbn> nahtnam: but the second BRE block in a method and call that from the outer BRE
<Scriptonaut> I have a method: def open_tab, that will return the current tab name that is open in my app
<jhass> nahtnam: use more methods
<Scriptonaut> is there something like
rippa has quit [Client Quit]
<Scriptonaut> _open_tab = open_tab
EllisTAA has quit [Quit: EllisTAA]
rippa has joined #ruby
<Scriptonaut> to show that _open_tab is the cached value of open_tab
<jhass> def foo; bar; rescue XError; end; def bar;
<jhass> # ...; rescue YError; end
Pisuke has joined #ruby
qubitz has quit [Ping timeout: 260 seconds]
<nahtnam> cball: jhass Then that leads me to a second question. Is there something like javascripts `.then()`? So I can call one function, and if its successful, then run a second method?
kadoppe has joined #ruby
msnyon has quit [Ping timeout: 245 seconds]
<nahtnam> So each method would contain a BRE
<jhass> Scriptonaut: try to make the method a verb and the variable a noun. tab = open_tab
msnyon has joined #ruby
finisherr has quit [Client Quit]
chipotle has joined #ruby
<jhass> nahtnam: there's no asynchronous execution here, begin; code; raise; will_never_run; rescue; end;
hotpanca_ has joined #ruby
baweaver has joined #ruby
prestorium has quit [Ping timeout: 244 seconds]
<Scriptonaut> jhass: ya, the problem is open_tab is both a noun and a verb
<Scriptonaut> I went with tab like you said
lucianosousa has joined #ruby
<ccbn> nahtnam: , put the BRE in a method, use a Proc for the rescue block, and after the E in the BRE, use yield to pass an optional block. I think that would work
chouhoul_ has joined #ruby
<ccbn> If the raise condition fires, yield wont because the proc will exit from the enclosing method
chouhoulis has quit [Read error: Connection reset by peer]
<nahtnam> jhass: ??? To be more specific I have something like this: https://gist.github.com/nahtnam/763fd9cfdb9f289a7517
<nahtnam> Its really messy
<jhass> ?gist_usage nahtnam
<ruboto> nahtnam, To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
<nahtnam> Sorry, fixed
scripore has quit [Quit: This computer has gone to sleep]
shock_one has joined #ruby
baweaver has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 250 seconds]
<jhass> nahtnam: as already said, use methods
Cache_Money has joined #ruby
chouhoulis has joined #ruby
<jhass> nahtnam: also you shouldn't rely on exceptions for something like this, try to find a check that you can use in an if / else
<jhass> nahtnam: at least rescue the most specific exception(s) possible
<jhass> and you got a repeating pattern there, just extract it into a method really
<nahtnam> Yeah, will do. This is just a "first draft". The final code will be written in another language
<nahtnam> (compiled)
JoshL has quit []
youngbaks has joined #ruby
<jhass> ah yeah, you were the one preparing some work for the lawyers
<nahtnam> ?
deepu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<nahtnam> Oh
<nahtnam> For the record, this one doesnt have a captcha or a rate limiter
youngbaks has quit [Read error: Connection reset by peer]
DLSteve has quit [Quit: Leaving]
nfk has joined #ruby
nuttermb has quit [Ping timeout: 244 seconds]
C1V0 has joined #ruby
DLSteve has joined #ruby
chouhoul_ has quit [Ping timeout: 255 seconds]
startupality has joined #ruby
scripore has joined #ruby
<nahtnam> Would the method look like this? https://gist.github.com/nahtnam/13068e653ed038f268e6 If so then how do I call a different method after this? If there is an exception, I want the app to exit, so i only want the next method to execute if the first is a success
<lagweezle> open_tab being both noun and verb makes me think about 'sign up' and 'signup' and the uses of them driving me nuts with the code at work. :(
<jhass> nahtnam: just call exit
<nahtnam> jhass: in the rescue?
<jhass> nahtnam: and please rescue Selenium::NoSuchElement or whatever the specific exception was, open rescue's are horrible
<jhass> yes
<nahtnam> kk
<nahtnam> Will do
<nahtnam> Thanks
dr3w has joined #ruby
startupality has quit [Client Quit]
big|bad|wolf has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
maletor has joined #ruby
big|bad|wolf has quit [Max SendQ exceeded]
<nahtnam> One more question
<shevy> YOUR LAST QUESTION?
<nahtnam> NO
<shevy> ;P
finisherr has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
<nahtnam> Is there a way I can make a "rake application" where basically its just a bunch of ruby files and just have certain commands (rake or whatever) execute them?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<jhack> If i were to choose a random word from a text file i have, would it be something like this? -> File.open("text.txt", r) { |file| secret_word << file.rand }
<jhass> doesn't sound like you need any features from rake
<jhass> just ship a bunch of ruby scripts?
<jhass> ?try jhack
<ruboto> jhack, Why don't you try it and see for yourself?
<nahtnam> Well I want to compile them into a easy to use system
choke has quit [Read error: Connection reset by peer]
choke_ has joined #ruby
<jhass> nahtnam: it's too vague for any specific advice, sorry
<nahtnam> Hm, ok.
<jhass> "just do it" is the only sane answer to "I have some code and I want to run it"
spider-mario has joined #ruby
<shevy> jhack if you have it in form of an Array, you can use array.sample
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
<shevy> jhack for instance: random_word = File.readlines('text.txt').sample
<shevy> hey... jhack sounds almost like jhass
EllisTAA has joined #ruby
<nahtnam> Maybe thor is what im looking for?
frecciac9 has joined #ruby
<frecciac9> ciao
hotpanca_ has quit [Read error: Connection reset by peer]
<jhass> I prefer slop for a subcommand CLI parser
pyon has joined #ruby
<wasamasa> mhh
<slash_nick> shevy: alias_method :shuffle_pop, :sample
<slash_nick> shevy: shuffle_pop sounds so much cooler
<jhass> slash_nick: we all live in our own illusions I guess
Kallis has joined #ruby
chinmay_dd has left #ruby ["Leaving"]
<[spoiler]> jhass, nahtnam: not entirely correct
<slash_nick> jhass: haven't heard of slop... but thor i like for system wide tasks
<[spoiler]> jhass, nahtnam: the only sane answer is https://www.youtube.com/watch?v=-VsDk7SIXa8
<nahtnam> Lol
omegamike has joined #ruby
<jhack> shevy: Thanks
bruno- has joined #ruby
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
msnyon has quit [Ping timeout: 244 seconds]
finisherr has quit [Quit: finisherr]
<shevy> \o/
iceyec_ has joined #ruby
<shevy> slash_nick lol
<shevy> slash_nick I used to do .shuffle[0]
iceyec_ has quit [Client Quit]
<shevy> but I think .sample is slightly faster
<jhass> not only slightly
IceyEC has joined #ruby
finisherr has joined #ruby
djcp has quit [Quit: WeeChat 1.0.1]
hotpancakes has joined #ruby
finisherr has quit [Client Quit]
<slash_nick> shevy: yeah, i think i did something like that back before #sample came to exist
bruno- has quit [Ping timeout: 246 seconds]
frecciac9 has quit []
wldcordeiro_ has quit [Ping timeout: 244 seconds]
JoshL has joined #ruby
bricker has joined #ruby
lucianosousa has quit [Quit: lucianosousa]
<nahtnam> When I run rake my_task[1,2], I get an error saying: Don't know how to build task 'my_task' Code: https://gist.github.com/nahtnam/bc4788f1b48e0b329655
howdoi has quit [Quit: Connection closed for inactivity]
sepp2k has quit [Quit: Leaving.]
vdamewood has joined #ruby
Burgestrand has quit []
trwyth has joined #ruby
<nahtnam> No idea why it doesnt work
<jhass> nahtnam: directory creates a task to create the directory if it doesn't exist
<jhass> to load code use standard require
tynamite___ has joined #ruby
<jhass> check rake -aT
finisherr has joined #ruby
<nahtnam> rake lib #
<nahtnam> rake lib/tasks #
<tynamite___> Hi I'm using ruby 1.9.3 and when I enter ruby -e 'p Encoding.default_external' It says I'm using the CP850 encoding. How do I change it to UTF-8 ?
<jhass> tynamite___: best would be to take the chance to change your system locale to UTF-8
<nahtnam> jhass: So would I do require 'lib/tasks/asdf.rb'?
<jhass> also note that Ruby 1.9 is EOL, 2.0 will be soon enough, consider upgrading to Ruby 2.2
<tynamite___> I'm using Windows, but I get the same encoding on Heroku that doesn't use windows.
<tynamite___> How do I change the system locale for windows?
djcp has joined #ruby
<nahtnam> or is there a good way to auto import all rake tasks from a folder?
<jhass> nahtnam: require is relative to $LOAD_PATH and you don't need the .rb suffix explicitly, but yes
davedev24 has quit [Ping timeout: 250 seconds]
sperant has joined #ruby
finisherr has quit [Client Quit]
<havenwood> tynamite___: In Ruby 2.0 the default encoding was switched to UTF-8. Since Ruby 1.9 is past End-of-Life you should upgrade to 2.1+ anyways.
<tynamite___> Seeing as Stack Overflow couldn't solve my problem, I'll see if upgrading ruby solves anything. I'm using a portable setup so I don't have to install anything.
lucianosousa has joined #ruby
baweaver has joined #ruby
<nahtnam> jhass: `LoadError: cannot load such file -- lib/tasks/asdf` and `LoadError: cannot load such file -- lib/tasks/asdf.rb`
<jhass> nahtnam: yes, read what I said. It's relative to $LOAD_PATH
davedev24 has joined #ruby
<nahtnam> Ahhh
<nahtnam> Ok
<nahtnam> Its working now
<nahtnam> TY
rikkipitt has joined #ruby
jgpawletko has joined #ruby
Oog_ has joined #ruby
trwyth has quit [Quit: trwyth]
chabil has joined #ruby
jpfuentes2 has quit [Ping timeout: 252 seconds]
jpfuentes2 has joined #ruby
allcentury has quit [Ping timeout: 245 seconds]
benlieb has joined #ruby
finisherr has joined #ruby
juanpablo_ has joined #ruby
fantazo has quit [Quit: Verlassend]
roolo has quit [Remote host closed the connection]
neohunter has joined #ruby
coban2k has quit [Remote host closed the connection]
pyon_ has joined #ruby
<neohunter> Hi there!!
framling has quit [Remote host closed the connection]
<neohunter> is there a way to access an instance variable bassed on another variable? like php $($hello)
roolo has joined #ruby
finisherr has quit [Client Quit]
bruno- has joined #ruby
finisherr has joined #ruby
NeverDie has quit [Max SendQ exceeded]
<neohunter> I want to do something like args.each {|k,v| @k = v}
<bricker> neohunter: instance_variable_set, instance_variable_get
pyon has quit [Ping timeout: 244 seconds]
scripore has quit [Quit: This computer has gone to sleep]
<BraddPitt> or #send, as shevy pointed out last night
baweaver has quit [Remote host closed the connection]
pyon_ is now known as pyon
apfeluser has quit [Quit: Leaving]
dagda1_ has joined #ruby
NeverDie has joined #ruby
<jhass> neohunter: that desire is a very very strong indicator that you want to use a hash instead
<jhass> BraddPitt: #send only if you got an attr_reader for it, and then I prefer #public_send
<neohunter> jhass yes i want to use a hash to initilaize a class, but want to have each element of the hash as an instance variable
baweaver has joined #ruby
<jhass> neohunter: no you don't
<jhass> it's a code smell
Torrieri has joined #ruby
Torrieri has joined #ruby
scripore has joined #ruby
<eam> the hash could be derived from GET arguments!
<bricker> see: Rails
<jhass> o at least keep it explicit, not the right occasion for clever code
<jhass> *or
<BraddPitt> ^ i agree
<neohunter> its not a web application,
<BraddPitt> I don't think thats a good way to initialize an object in ruby since there is no explicit type declaration
baweaver has quit [Remote host closed the connection]
<BraddPitt> explicit assignment will make it easier to read and to debug
khebbie has joined #ruby
<BraddPitt> and if you have an extremely long list of arguments, then maybe think about refactoring
<neohunter> currently my method is like
<jhass> and protect against typos in the hash keys
<neohunter> initialize(name, email, firm, number_of_customer_meetings, number_of_topic_meetings)
<neohunter> so you suggest to keep it in that way?
<BraddPitt> yes
<jhass> yeah, 5 is still okayish
<BraddPitt> 5 instance vars is a fine amount imo
<BraddPitt> i think 7+ range is when you should consider a refactor
sepp2k has joined #ruby
<BraddPitt> w 4
<neohunter> ok, and how the refactor would be? allow a hash and.. check that keys are valid?
big|bad|wolf has joined #ruby
<jhass> you could make it keyword arguments if you want
ishahnaz has joined #ruby
djbkd has joined #ruby
devoldmx has joined #ruby
<neohunter> googling...
benlieb has quit [Quit: benlieb]
<neohunter> interesting i didint know about that
<BraddPitt> its just named arguments instead of positional ones
diegoviola has joined #ruby
<ccbn> neohunter: You can also use block initialization if it fits your use case better.
jeremy04 has quit [Remote host closed the connection]
<gambl0re> do i use validates confirmation: true on both password and password_confirmation or just one ?
dperalta has quit [Remote host closed the connection]
<neohunter> thanks to all!
finisherr has quit [Quit: finisherr]
khebbie has quit [Ping timeout: 264 seconds]
dperalta has joined #ruby
rikkipitt has quit [Quit: Leaving...]
djbkd has quit [Ping timeout: 250 seconds]
<jhass> !kick gambl0re do not crosspost without informing all sides about it
gambl0re was kicked from #ruby by ruboto [do not crosspost without informing all sides about it]
lwu has quit [Quit: This computer has gone to sleep]
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maletor has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
sperant has joined #ruby
codecop has quit [Remote host closed the connection]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
prestorium has joined #ruby
<tynamite___> I've upgraded to ruby 2.1.5 and the encoding is CP850. How do I change it to UTF-8?
pyon has quit [Ping timeout: 244 seconds]
dc_ has joined #ruby
devoldmx has quit [Ping timeout: 265 seconds]
tuxero has joined #ruby
<jhass> tynamite___: either explicitly open files with the right encoding (all methods take parameters for that), use Encoding.default_external=, invoke ruby with the -E parameter set accordingly or as said change your system encoding
_aeris_ has joined #ruby
Cust0sLim3n has joined #ruby
chipotle has quit [Quit: cheerio]
baweaver has joined #ruby
<tynamite___> But I have the wrong encoding on both Windows and Heroku.
<tynamite___> Can I change the ruby encoding on the command line?
<_aeris_> hello #ruby !
<jhass> tynamite___: yes, I just wrote that you can ...
<jhass> and how
<_aeris_> how I can force ruby to search for .so extension on a specific folder ?
yfeldblum has joined #ruby
<_aeris_> i use LD_LIBRARY_PATH, but works only with plain ruby, not with bundler :(
<jhass> ?xy
<ruboto> 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
<tynamite___> I typed in ruby -e Encoding.default_internal = Encoding:UTF_8 in the command line, and nothing happened.
<_aeris_> jhass > ok, this is the plain context :P
<_aeris_> i develop a tool to check TLS configuration, and for this, i need to patch both openssl lib and ruby extension
<jhass> tynamite___: those are a list of alternatives, you mixed two up
renderful has quit [Remote host closed the connection]
<_aeris_> but i don’t want to patch the ruby nor openssl system, because patch reintroduce weak ciphers for testing
renderful has joined #ruby
<jhass> _aeris_: mmh, I guess you can try require_relative
<tynamite___> I tried the external one instead and it doesn't work.
<tynamite___> I tried both the internal and external one.
renderful has quit [Remote host closed the connection]
<jhass> what exactly did you try
renderful has joined #ruby
<_aeris_> jhass > this is not only .rb, this is also the openssl.so ruby ext
<tynamite___> That answer.
<jhass> _aeris_: yeah, I understood that
christiandsg has joined #ruby
<tynamite___> It's a question for how to change the default encoding in ruby.
decoponio has quit [Quit: Leaving...]
<_aeris_> $ ls lib/
<_aeris_> libcrypto.so* libcrypto.so.1.0.0* libssl.so* libssl.so.1.0.0* openssl.so*
dc_ has quit [Ping timeout: 250 seconds]
<_aeris_> i have patched openssl lib and ext here
<jhass> _aeris_: you load ruby extensions via require too, and all require_relative does is compute an absolute path and call require
<_aeris_> LD_LIBRARY_PATH=lib strace -f bin/check_https.rb 2>&1 | grep openssl.so
<_aeris_> [pid 15103] open("/home/aeris/Workspace/imirhil.fr/sslcheck/lib/openssl.so", O_RDONLY|O_CLOEXEC) = 7
<_aeris_> but LD_LIBRARY_PATH=lib strace -f bundle exec bin/check_https.rb tpeweb.paybox.com 2>&1 | grep openssl.so
<_aeris_> [pid 15204] open("/home/aeris/.rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/x86_64-linux/openssl.so", O_RDONLY|O_CLOEXEC) = 8
scripore has quit [Quit: This computer has gone to sleep]
finisherr has joined #ruby
<jhass> _aeris_: the other thing to try is to modify $LOAD_PATH after require "bundler/setup"
AlphaAtom has joined #ruby
<jhass> $LOAD_PATH the Ruby global that is
choke_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<_aeris_> jhass > i try this, but seems the ext is loaded with ruby, so BEFORE any of my code
finisherr has quit [Client Quit]
dc_ has joined #ruby
<jhass> maybe try starting ruby with --disable-gems, load your extension, require "rubygems" and then load bundler
michaeldeol has joined #ruby
finisherr has joined #ruby
_blizzy_ has quit [Ping timeout: 244 seconds]
bruno- has quit [Ping timeout: 246 seconds]
choke has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
TheNet has joined #ruby
<TheNet> anyone have any idea what the last method here is supposed to do? https://github.com/bootstrap-ruby/bootstrap-navbar/blob/master/lib/bootstrap-navbar/helpers.rb#L46
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
AlphaAtom has quit [Client Quit]
<jhass> TheNet: nothing, probably a hook for subclasses
dc_ has quit [Read error: Connection reset by peer]
<jhass> or your own override somewhere
bronson has joined #ruby
dc_ has joined #ruby
baweaver has quit [Remote host closed the connection]
<jhass> right in the readme
finisherr has quit [Client Quit]
<TheNet> jhass: I should've checked that, thanks!
<tynamite___> When I use ruby -e Encoding.default_external = Encoding::UTF_8 The encoding doesn't change to UTF-8. Nothing happens.
finisherr has joined #ruby
<jhass> tynamite___: that's of course only for the current Ruby process, it doesn't change future invocations
<tynamite___> Hmm that's what stack overflow said to do. How do I change it for all invocations?
<jhass> do it in all invocations
<jhass> or read my previous answer
AlphaAtom has joined #ruby
devdazed has quit [Quit: Computer has gone to sleep.]
msnyon has joined #ruby
dperalta has quit []
devdazed has joined #ruby
railsraider has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
mleung has quit [Quit: mleung]
gambl0re has joined #ruby
dblessing has quit [Ping timeout: 260 seconds]
prestorium has quit [Ping timeout: 272 seconds]
lwu has joined #ruby
Alayde has joined #ruby
dc_ has quit [Read error: Connection reset by peer]
dc__ has joined #ruby
<shevy> was ruby more successful than smalltalk?
tomphp has joined #ruby
<eam> way yeah
startupality has joined #ruby
coban2k has joined #ruby
<infernix> with Socket I can use getifaddrs to retrieve interface ips etc. which class has route info (e.g. ip route)? i'm not finding it in Socket
timanema has joined #ruby
dc__ has quit [Ping timeout: 265 seconds]
j4cknewt has quit [Remote host closed the connection]
TvL2386 has quit [Quit: Ex-Chat]
pyon has joined #ruby
mleung has joined #ruby
baweaver has joined #ruby
<eam> infernix: probably none, try a gem
<tynamite___> jhass you told me to either use Encoding.default_external= or change my system encoding.
banister has joined #ruby
<tynamite___> But the wrong encoding is also on heroku, so I can only change it with ruby
<jhass> tynamite___: or -E or just specify it every time you open a file
sumark has quit [Remote host closed the connection]
hfp has joined #ruby
nisstyre has joined #ruby
sumark has joined #ruby
jpfuentes2 has joined #ruby
<tynamite___> I put Encoding.default_external = 'utf-8' Encoding.default_internal = Encoding::UTF_8 at the top of my ruby files and it didn't do anything.
rideh has joined #ruby
haylon has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
hahuang61 has quit [Ping timeout: 264 seconds]
mleung has quit [Quit: mleung]
<jhass> maybe your methodology of verifying your claim is plain wrong
hinbody has quit [Quit: leaving]
last_sta1 has joined #ruby
last_staff has quit [Ping timeout: 244 seconds]
rideh has quit [Client Quit]
<tynamite___> I say it doesn't do anything because when I put the £ symbol on an xhtml page, I get an exception saying that I cannot print a utf-8 character on a cp850 page.
mleung has joined #ruby
diegoviola has quit [Quit: WeeChat 1.2]
Motoservo has joined #ruby
n008f4g_ has quit [Ping timeout: 252 seconds]
<hfp> Hey all, I don't understand this code from POODR: https://github.com/skmetz/poodr/blob/master/chapter_8.rb#L423-L476. When you call `Bicycle.spares', it goes to Parts.spares but then where does it get `part` from on L447? I see from the doc that `select` should be applied to an Enumerable so `[1, 2, 3].select` is fine but if `select` is not sent as a message to anything then how does it know what it applies to?
<jhass> tynamite___: is it a Ruby exception? copy paste it
startupality has quit [Quit: startupality]
devdazed has quit [Quit: Computer has gone to sleep.]
TheNet has quit [Remote host closed the connection]
finisherr has quit [Ping timeout: 250 seconds]
<jhass> hfp: Enumerable is based on .each, Parts#each is a forward to @parts.each, Enumerable is included into Parts thus Enumerable#select is available as Parts#select
tvw has quit [Ping timeout: 256 seconds]
<elaptics> hfp: it's the parts held in spares
startupality has joined #ruby
devdazed has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
nisstyre has quit [Changing host]
nisstyre has joined #ruby
centrx has joined #ruby
<hfp> jhass: Right, but why isn't it written as self.select?
<jhass> that's the same
neohunter has quit [Quit: Textual IRC Client: www.textualapp.com]
<hfp> Ah, the self is implied?
<jhass> yes, it's identical for all you need to care about atm
<hfp> ok
dblessing has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
northfurr has joined #ruby
<hfp> And L439: `def_delegators :@parts, :size, :each` means that whenever you call size and each on @parts, it will forward this to each thing in @parts? So it's a bit like reverse inheritance?
<hfp> whereas it goes down the inheritance chain instead of up?
northfurr has quit [Client Quit]
felltir has joined #ruby
cornerma1 has joined #ruby
prettiestPony11 has joined #ruby
unver has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kalov has quit []
tomphp has joined #ruby
fundies has joined #ruby
<fundies> can someone help me with omniauth-twitter? I''m getting 401 Authorization Required
tmtwd has quit [Quit: Leaving]
JoshL has quit []
cornerman has quit [Ping timeout: 252 seconds]
cornerma1 is now known as cornerman
IceyEC has quit [Remote host closed the connection]
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bmurt has quit []
pyon has quit [Ping timeout: 260 seconds]
roolo_ has joined #ruby
blue_deref has joined #ruby
hippyphysicist has joined #ruby
j4cknewt has joined #ruby
roolo has quit [Ping timeout: 260 seconds]
shinnya has joined #ruby
Symbiosisz2 has joined #ruby
umgrosscol has quit [Remote host closed the connection]
neohunter has joined #ruby
<neohunter> I've this.. module Aaa; class A end; end; module Aaa; class B end; end;
Oog_ has quit []
<jhass> hfp: it's called delegation, it's a form of composition, not inheritance
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
<neohunter> I'm tring to instanciate class B from class A, but it says undefined constant
BTRE has quit [Quit: Leaving]
<fundies> anyone use omniauth twitter?
hippyphysicist has quit [Quit: Leaving]
mhib has quit [Remote host closed the connection]
<BraddPitt> neohunter can you gist
<neohunter> I tried doing Aaa::B, ::Aaa::B and ::B
<jhass> neohunter: please provide a minimal example that actually reproduces your issue
<neohunter> yes hold on
<jhack> Can someone explain why this is giving me the wrong word length it's displaying?
<jhass> jhack: readlines includes the trailing newline
<BraddPitt> what do you mean jhack?
<BraddPitt> god i hate your two nicks, far too similar
<shevy> lol
<shevy> yeah
<shevy> two lost brothers once again united
<jhass> jhack: I recommend to be pedantic about proper indentation, your code is unnecessarily hard to read
<shevy> damn now jhass is talking to jhass BraddPitt
prestorium has joined #ruby
<BraddPitt> see
<BraddPitt> even shevy got confused
skysploit has quit []
noethics has joined #ruby
prestorium has quit [Client Quit]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
railsraider has quit [Quit: railsraider]
webopsx has joined #ruby
<tynamite___> I've fixed the problem now. Thank you for your help.
<jhack> jhass: would it be better if i opened the file then used .sample on it?
rodferso1 has quit [Quit: leaving]
blue_deref has quit [Quit: bbn]
<jhack> nvm taht wouldnt work
ldnunes has quit [Quit: Leaving]
<jhass> jhack: that won't work. It would be good to read the file only once, but that's not your issue
<jhass> jhack: understand your current issue before you make other changes
rbennacer has quit [Remote host closed the connection]
<jhass> jhack: look at the return value, of File.readlines(..) and .sample, use p not puts for debug prints
<jhass> use .inspect of you combine it with other output
<jhass> *if
AlphaAtom has joined #ruby
hahuang61 has joined #ruby
tynamite___ has left #ruby [#ruby]
dc_ has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
<jhass> fundies: might have better luck in #RubyOnRails
<jhack> jhass: .rjust would work ?
pyon has joined #ruby
<jhass> jhack: you're not trying to understand your problem
<jhack> jhass: I believe my problem is that it includes the \n after the word, which adds onto the length of the word
<jhack> jhass: after changing puts to p, thats what its showing me
<jhass> that's right
scripore has joined #ruby
<jhass> how do you come to .rjust now? how's that related?
<jhack> jhass: so .rjust would eliminate this \n and give me the right length
<jhass> &ri String#rjust
<jhack> jhass: i mean .rstrip
<jhass> well, yes that would work
<jhass> though I prefer .chomp for that case
<jhack> oh right, chomps as well
<jhass> jhack: but you should've just tried it prior asking and then ask if it's the best solution ;
<jhass> ;)
Alayde has quit [Quit: WeeChat 1.1.1]
<jhack> yeah my b
fmcgeough has quit [Quit: fmcgeough]
jamesaxl has joined #ruby
shock_one has quit [Remote host closed the connection]
bhorn1 is now known as bhorn1|away
shevy is now known as jhask
<jhask> ok guys let's rock
Alayde has joined #ruby
<jhass> ?guys jhask
<ruboto> jhask, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
<al2o3-cr> Wow, I thought a was seeing someone type to oneself for a minute then
<jhask> hey I did not say that, that was jhack
<jhass> you all need clients with better color coding
<jhask> al2o3-cr lol
<jhack> LOL
<jhack> hey, that was clearly jhask
<jhask> this is confusing me... and the heat is also making things worse
tuxero has quit [Quit: tuxero]
<jhack> jhask: no AC?!
<jhass> jhask: you're pink, jhack is green, can't fool me
<jhack> jw, how old are yall
<al2o3-cr> heh jhass blue jhack blue jhask green :)
<jhask> it takes me a few seconds to find out who of you two asked this :\
hahuang61 has quit [Ping timeout: 260 seconds]
* apeiros needs no colors for he can read
<jhask> there is no jhaks!
prettiestPony11 has quit [Quit: Textual IRC Client: www.textualapp.com]
<al2o3-cr> ah, so jhask is shevy LOL
jhass is now known as shevy
<shevy> no, I'm shevy
al2o3-cr is now known as jhass
<jhass> no i'm jhass
<jhask> what the
<jhask> who stole my nick
galeido has quit [Read error: Connection reset by peer]
jhass is now known as al2oe-cr
al2oe-cr is now known as al2o3-cr
<jhask> lol
<jhask> you can't get the al nick because it's so hard to type
<al2o3-cr> :D
jhask is now known as jhaks
<jhaks> ok let's all switch back again?
<jhack> starting the jha trend
<jhack> lets gettit
sperant has joined #ruby
jerius has quit [Quit: /quit]
ndrei has quit [Ping timeout: 260 seconds]
<shevy> nah, I keep this one and tell everybody to use UTF-8 and never built anything from source
Hal_9000_ has joined #ruby
Symbiosisz has quit [Remote host closed the connection]
Symbiosisz2 has quit [Remote host closed the connection]
<jhaks> :(
<jhaks> I don't know who is who anymore
<shevy> see, that's how sad you usually make me
ndrei has joined #ruby
<al2o3-cr> the gold old whowas :)
<TheMysticWyvern> How do programming languages work if the one writing it speaks a different language, like Japanese or German? Would they have their own syntax, or would an English person be able to read their programming?
AccordsLTN has quit []
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shevy is now known as jhass
<jhass> TheMysticWyvern: developers you want to work with will use english identifiers and comments
shock_one has joined #ruby
<jhass> those that don't... try to avoid them :P
<TheMysticWyvern> jhass: So, a Japanese person, for example, would actually use the Japanese word for "variable" in their programming instead of, well, "variable?"
<jhack> How do i access an array i have in a different class? Ex: i have class Computer, i want to access an array from the Computer class in my Player class
scripore has quit [Quit: This computer has gone to sleep]
<ryuu> who do i talk to to get the ?guys alias removed? it's ridiculous and actually offensive
<jhass> TheMysticWyvern: I just said the opposite
<Coraline> How is it offensive?
<Coraline> Actually, respond on #ruby-offtopic
doodleha_ has quit [Remote host closed the connection]
FernandoBasso has joined #ruby
<jhass> ryuu: ^ continuing the topic here will get you removed, please respect moving to #ruby-offtopic
baweaver has quit [Remote host closed the connection]
jbw_ has quit [Ping timeout: 265 seconds]
<jhass> jhack: that desire is a strong indicator that the array shouldn't live in the Computer class in the first place
pyon has quit [Ping timeout: 252 seconds]
<jhack> The computer class gets the sample from an external textfile and places it into the array though
pyon has joined #ruby
<jhass> there's no though in there
silkfox has quit [Ping timeout: 250 seconds]
<jhass> it doesn't invalidate the point at all
<rehat> is there a good way to remember to prefix or postfix a ':' for symbols? When I use then in a hash def it's postfix but if I try to grab the value from a hash using [] the colon is prefixed
shock_one has quit [Ping timeout: 246 seconds]
scripore has joined #ruby
<hfp> jhass, elaptics: Thanks for the explanation earlier
<jhass> rehat: prefix is the standard and normal way, hash literals are the only optional exception
freerobby has quit [Quit: Leaving.]
<jhass> rehat: that is :foo => bar still works in them too
radgeRayden has joined #ruby
<apeiros> jhass: also keyword args (symbols when passing, not symbols when defining)
<apeiros> that part has potential for confusion for newcomers
baweaver has joined #ruby
jhaks is now known as shevy
hotpancakes has quit [Remote host closed the connection]
<jhass> mmh, true, though are they really symbols? aren't they just syntax?
<shevy> TheMysticWyvern they use english names really
sdwrage has quit [Quit: Leaving]
<[spoiler]> jhass: they're just syntax
<hfp> TheMysticWyvern: The litterals and functions don't change, they are always in English. How you name your variables and your own functions depends on you and your team; you can very well give all your vars and functions German names but the ones from the Ruby language will always be in English. i.e. an Array will always be an Array no matter what locale your team is using
Rutix has quit []
radgeRayden_ has joined #ruby
<TheMysticWyvern> That's what I was wondering about. Thank you, everyone! :3
<[spoiler]> apeiros: hmm why would it confuse newcomers?
<jhass> you can, but you'd be a horrible person to do so
<hfp> Of interest, I remember Microsoft tried to localize the standard function names in Excel. It was a nightmare! Say you are proficient in Excel "programming" in English and you want to use a French version of Office... Well nothing works anymore because SUM() became SOMME()
mary5030 has quit [Remote host closed the connection]
<[spoiler]> apeiros: oh you mean because they'd expect to be able to do `:foo => 9001`?
<[spoiler]> in the definition
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
<shevy> hfp that's what I hated about openoffce/libreoffice excel - when I had the german language, the function names for excel were different
<apeiros> jhass: which ones?
<shevy> since that confused the hell outta me, I switched to english always
<apeiros> definition or passing?
<jhass> mmh, both actually
radgeRayden__ has joined #ruby
shock_one has joined #ruby
dr3w has quit [Ping timeout: 260 seconds]
radgeRayden has quit [Ping timeout: 246 seconds]
dr3w has joined #ruby
pyon has quit [Ping timeout: 250 seconds]
bumbar_ has quit [Ping timeout: 246 seconds]
<rehat> jhass: ok thanks
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
startupality has quit [Quit: startupality]
htmldrum has joined #ruby
radgeRayden_ has quit [Ping timeout: 246 seconds]
radgeRayden has joined #ruby
<neohunter> is possible to define a method with multiple arguments in 2 lines?
<neohunter> i mean the def(...) line
<jhass> ?try
<ruboto> Why don't you try it and see for yourself?
<[spoiler]> I am actually still unsure how I feel about kwargs. I find it a bit annoying that we can't do `def meth(a:1, b:2)` and call it as `meth(4,5) or `meth(4)`. I foten forget I need to call it as `meth(a:4)`
yqt has joined #ruby
<[spoiler]> often*
<jhass> yeah, python got that better, you can just use the names of regular args
djbkd has joined #ruby
NeverDie has joined #ruby
<jhass> crystal too does that for args with default values and I have some hope we'll get it for required args too
<[spoiler]> I mostly use the a=1, b=2 syntax
sperant has joined #ruby
<[spoiler]> jhass: see, that is nice
jbw has joined #ruby
baweaver has quit [Remote host closed the connection]
<[spoiler]> and I find it weird how, internally when you call those methods, it's a hash
radgeRayden_ has joined #ruby
monsieurp has quit [Remote host closed the connection]
radgeRayden__ has quit [Ping timeout: 246 seconds]
<[spoiler]> but at least we can do `foo(some_hash)` lol
baweaver has joined #ruby
<shevy> php-mruby
monsieurp has joined #ruby
Cache_Money has quit [Ping timeout: 250 seconds]
<[spoiler]> not even ruby can save php
<[spoiler]> sorry, php
<shevy> nothing can save php!
<al2o3-cr> WHAT!!!!
slawrence00 has joined #ruby
jmignault has joined #ruby
<[spoiler]> I actually added mroby into my pet language as part of my "getting familiarised with the mruby api" project
<[spoiler]> fuck this roby typo, it's getting on my nerves
sshuff is now known as sshuff|gone
wheresmyjetpack has joined #ruby
Timba-as has joined #ruby
Coldblackice has joined #ruby
radgeRayden has quit [Ping timeout: 265 seconds]
jbw has quit [Ping timeout: 246 seconds]
baweaver has quit [Ping timeout: 244 seconds]
chabil has quit [Quit: WeeChat 1.2]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
radgeRayden_ has quit [Ping timeout: 244 seconds]
lucianosousa has quit [Quit: lucianosousa]
michaeldeol has joined #ruby
NeverDie has quit [Max SendQ exceeded]
dr3w has quit [Remote host closed the connection]
radgeRayden_ has joined #ruby
ramfjord has quit [Read error: Connection reset by peer]
dr3w has joined #ruby
jmignault has quit [Client Quit]
jmignault has joined #ruby
<wasamasa> roby williams
<hfp> batman & roby
galeido has joined #ruby
mleung has quit [Quit: mleung]
hotpancakes has joined #ruby
ramfjord has joined #ruby
ccbn has quit [Quit: Page closed]
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
mleung has joined #ruby
ccbn has joined #ruby
dc_ has quit [Remote host closed the connection]
NeverDie has joined #ruby
dc_ has joined #ruby
victortyau has quit [Quit: Leaving]
vdamewood has quit [Quit: Life beckons.]
omegamike has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 245 seconds]
radgeRayden_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
cohiijay has joined #ruby
scripore has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
bmurt has joined #ruby
radgeRayden_ has joined #ruby
shock_one has quit [Remote host closed the connection]
ndrei has quit [Remote host closed the connection]
NeverDie has quit [Max SendQ exceeded]
qubitz has joined #ruby
nahtnam has quit [Quit: Connection closed for inactivity]
ndrei has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dc_ has quit [Ping timeout: 255 seconds]
devdazed has quit [Ping timeout: 252 seconds]
freerobby has joined #ruby
neohunter has quit [Read error: Connection reset by peer]
djstorm has quit [Ping timeout: 264 seconds]
hahuang61 has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
jenrzzz_ has quit [Ping timeout: 246 seconds]
Cache_Money has joined #ruby
braincrash has quit [Ping timeout: 240 seconds]
christiandsg has joined #ruby
shock_one has joined #ruby
ndrei has quit [Remote host closed the connection]
devoldmx has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
bruno- has joined #ruby
Zeroe has quit [Quit: Zeroe]
qubitz has quit [Ping timeout: 244 seconds]
ndrei has joined #ruby
josh3 has quit [Ping timeout: 272 seconds]
thermatix has joined #ruby
jamesaxl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Zeroe has joined #ruby
Guest25077 has joined #ruby
TheNet has joined #ruby
josh3 has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
devoldmx has quit [Ping timeout: 250 seconds]
NeverDie has joined #ruby
EagleDelta has quit [Remote host closed the connection]
shock_one has quit [Remote host closed the connection]
thermatix has quit [Ping timeout: 255 seconds]
whippythellama has quit [Quit: WeeChat 1.2]
ndrei has quit [Remote host closed the connection]
BTRE has joined #ruby
TheNet has quit [Remote host closed the connection]
dopie has quit [Quit: This computer has gone to sleep]
freerobby has quit [Read error: No route to host]
freerobby1 has joined #ruby
Hal_9000_ has quit [Quit: Hal_9000_]
dvabr has joined #ruby
baweaver has joined #ruby
Pupeno has quit [Remote host closed the connection]
ndrei has joined #ruby
hotpancakes has joined #ruby
lukas has left #ruby ["WeeChat 0.4.2"]
<dfockler> Roby!
<dfockler> a little late
jenrzzz has joined #ruby
braincrash has joined #ruby
centrx has quit [Quit: Act only according to that maxim whereby you can, at the same time, will that it should become a universal law.]
yqt has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
d10n-work has joined #ruby
basmoura has quit [Remote host closed the connection]
ndrei has quit [Remote host closed the connection]
Jackneill has quit [Read error: Connection reset by peer]
hashrocket has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: i've nodded off.]
msnyon has quit [Read error: Connection reset by peer]
Vile` has quit [Ping timeout: 246 seconds]
Scriptonaut has left #ruby [#ruby]
ndrei has joined #ruby
pdoherty has quit [Quit: Leaving]
<shevy> [spoiler] lol
<shevy> when the keyboard becomes the worst enemy
<shevy> it often makes for great bash.org worthy quotes :)
ruby-lang270 has joined #ruby
NeverDie has quit [Max SendQ exceeded]
Vile` has joined #ruby
egtann has quit []
<al2o3-cr> http://bash.org/?835030 (cracks me up all the time) heh
TomyLobo has quit [Ping timeout: 245 seconds]
<dfockler> hehe
darwingr has joined #ruby
[k- has quit [Quit: AndroidIrc Disconnecting]
ruby-lang270 has quit [Client Quit]
<[spoiler]> LOL, love that one
shock_one has joined #ruby
<shevy> lol
big|bad|wolf has quit []
omegamike has joined #ruby
BLuEGoD has quit [Remote host closed the connection]
<al2o3-cr> got some corkers on there
olivierrr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
omegamike has quit [Remote host closed the connection]
ndrei has quit [Remote host closed the connection]
<shevy> less fun, more code al2o3-cr!
olivierrr has joined #ruby
yqt has joined #ruby
olivierrr has quit [Client Quit]
big|bad|wolf has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
<Coraline> Is it possible to specify a git remote other than origin when executing rake release on a gem?
<Coraline> It tries to tag a release on origin
dopamean_ has quit [Ping timeout: 250 seconds]
<jhass> that's the bundler task?
<al2o3-cr> shevy: I've quit
ecksit has joined #ruby
omegamike has joined #ruby
ecksit has quit [Client Quit]
BLuEGoD has joined #ruby
luksaur has joined #ruby
<gambl0re> jhass..
NeverDie has joined #ruby
htmldrum has quit [Ping timeout: 240 seconds]
<jhass> Coraline: https://github.com/bundler/bundler/blob/master/lib/bundler/gem_helper.rb#L54 looks like it takes it as parameter
<jhass> gambl0re ...
<shevy> al2o3-cr :(
<al2o3-cr> No more code for me :(
Zeroe has quit [Quit: Zeroe]
michaeldeol has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maletor has joined #ruby
chichou has joined #ruby
bmurt has quit []
davedev24 has quit [Read error: Connection reset by peer]
Yzguy has joined #ruby
icebourg has quit []
<gambl0re> why you keep banning me...
Guest25077 has quit [Quit: Saindo]
dimasg has joined #ruby
davedev24 has joined #ruby
<jhass> gambl0re: no bans, only kicks
<jhass> gambl0re: and the why is in the kick message
<jhass> and I started to kick since you ignored the prior warning
ndrei has quit [Remote host closed the connection]
jpfuentes2 has quit [Ping timeout: 252 seconds]
<bootstrappm> "do not crosspost without informing all sides about it"
choke has joined #ruby
<gambl0re> you suck...
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> !ban gambl0re bye
<gambl0re> i didnt even do anything..
<apeiros> !ban gambl0re !T 1d bye
<Radar> lol
gambl0re was banned on #ruby by ChanServ [gambl0re!*@*]
gambl0re was kicked from #ruby by ChanServ [Banned: bye]
<apeiros> damn, every. single. time.
wldcordeiro_ has joined #ruby
<apeiros> so sad to say they were right. I suck. I really have to move my ass and do a release :<
<shadeslayer> question, I have code in a class that I want to execute when a var of that class goes out of scope
jpfuentes2 has joined #ruby
<bougyman> he genuinely seemed to need help, not a troll.
<shadeslayer> actually, let me paste code
a346 has quit [Quit: a346]
<jhass> &ri ObjectSpace.define_finalizer
blue_deref has joined #ruby
baweaver has quit [Remote host closed the connection]
<zenspider> gah. jury duty... what'd I miss?
<apeiros> shadeslayer: beware though, finalizers have no guaranteed time when they're run
<zenspider> usually when you're using finalizers, you're doing it wrong.
* apeiros wonders how he can change the 1d ban to a 1h ban
davedev2_ has joined #ruby
<apeiros> 1d was too much IMO
<shadeslayer> hm
<shadeslayer> apeiros: that looks close
<zenspider> shadeslayer: consider running your code in a block that cleans up after itself when the block in done running.
<shadeslayer> zenspider: I'm trying to abstract away a mount operation
davedev24 has quit [Ping timeout: 244 seconds]
<shadeslayer> zenspider: apeiros https://gist.github.com/bc9f3091d7e01a35ff84
TheNet has joined #ruby
Pupeno has joined #ruby
renderfu_ has joined #ruby
chichouw has joined #ruby
DLSteve has quit [Quit: Leaving]
<shadeslayer> where SOMETHING is run when a var of class type Mount goes out of scope
<zenspider> shadeslayer: exactly... so put mount and umount in the same method... yield in between, and put the umount in the ensure like you have
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zenspider> make it work exactly like Dir.chdir(path) { ... }
bmurt has joined #ruby
_blizzy_ has joined #ruby
<zenspider> shadeslayer: also, _all_ def's have an implicit begin, so you can do: def name; ... ensure; ... end
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michael_mbp has quit [Excess Flood]
<shadeslayer> zenspider: won't work, I mount multiple Dirs one after the other
<shadeslayer> so I'll have to use nested blocks
chichou has quit [Ping timeout: 256 seconds]
renderful has quit [Ping timeout: 256 seconds]
freerobby1 has quit [Quit: Leaving.]
renderful has joined #ruby
<shadeslayer> zenspider: trying to get rid of https://github.com/netrunner-arm/rpi2-image/blob/master/image.rb#L73
pyon has joined #ruby
davedev2_ has quit [Ping timeout: 246 seconds]
Pupeno has quit [Ping timeout: 246 seconds]
bodgix has quit [Ping timeout: 252 seconds]
<zenspider> shadeslayer: there's nothing wrong with nested blocks
<zenspider> but you can also write it in such a way that you pass in a splatted list of mounts
quimrstorres has joined #ruby
michael_mbp has joined #ruby
renderfu_ has quit [Ping timeout: 244 seconds]
sperant has joined #ruby
<zenspider> shadeslayer: eh. after looking at your code... I'd say your nesting argument is weak.
_blizzy_ has quit [Read error: Connection reset by peer]
shock_one has quit [Remote host closed the connection]
<shadeslayer> zenspider: oh? ok
<shadeslayer> so nests are fine there then?
chichouw has quit [Read error: Connection reset by peer]
michaeldeol has joined #ruby
EllisTAA has joined #ruby
htmldrum has joined #ruby
startupality has joined #ruby
<zenspider> shadeslayer: compare 3 versions: https://gist.github.com/2cc962f3f4fdf47f8914
<shadeslayer> zenspider: ok, I'll use nested blocks, but for the sake of education completedness, what method does one overload to execute things when something goes out of scope
juanpablo__ has joined #ruby
<shadeslayer> hmm
<shadeslayer> I see
<shadeslayer> ok
_blizzy_ has joined #ruby
juanpablo__ has quit [Client Quit]
n_blownapart has quit [Remote host closed the connection]
juanpablo__ has joined #ruby
big|bad|wolf has quit [Ping timeout: 264 seconds]
<zenspider> not sure I understand your question
juanpablo_ has quit [Ping timeout: 240 seconds]
casadei has quit [Remote host closed the connection]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<shadeslayer> zenspider: I'm looking for the opposite of the initialize method :)
<shadeslayer> the dtor in C++ speak :P
<zenspider> you use a finalizer like someone suggested... but it doesn't work the way C++'s destructors work. You'll never control when it triggers
<shadeslayer> right
<shadeslayer> that's what I can find on google as well :(
<shadeslayer> apparently only gets run GC
<shadeslayer> *on GC
<zenspider> yup
<zenspider> and not necessarily then
Meow-J has quit [Quit: Connection closed for inactivity]
Torrieri has quit [Quit: Be back later ...]
juanpablo__ has quit [Ping timeout: 250 seconds]
wldcordeiro_ has quit [Read error: Connection reset by peer]
quimrstorres has quit [Remote host closed the connection]
wldcordeiro_ has joined #ruby
bmurt has quit []
omegamike has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
jpfuentes2 has quit [Ping timeout: 260 seconds]
jpfuentes2 has joined #ruby
tkuchiki has joined #ruby
bmurt has joined #ruby
bodgix has joined #ruby
htmldrum has quit [Ping timeout: 244 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hashrocket has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jgpawletko has joined #ruby
<shadeslayer> zenspider: hm, now it tries to unmount the rootfs dir twice
htmldrum has joined #ruby
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sperant has joined #ruby
Timba-as has quit [Quit: Be back later ...]
bmurt has quit [Read error: Connection reset by peer]
<zenspider> shadeslayer: because you're using an instance variable
<shadeslayer> yeah
<shadeslayer> :D
<zenspider> so you're forgetting the first mount
<shadeslayer> zenspider: just firgured it out :P
<shadeslayer> *nod*
<shadeslayer> cheers! :)
<zenspider> ensure should be indented to the same level as def/end
olivierrr has joined #ruby
<zenspider> and everything else should be normal indentation
<zenspider> ie, outdent ensure
<shadeslayer> got it
<zenspider> also, your string is hardcoded to say boot partition
<shadeslayer> ah yeah, good catch
hotpancakes has quit [Remote host closed the connection]
bmurt has joined #ruby
casadei has joined #ruby
nirvdrum has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
rbennacer has joined #ruby
htmldrum has quit [Ping timeout: 252 seconds]
last_sta1 has quit [Ping timeout: 244 seconds]
CamonZ has quit [Quit: Textual IRC Client: www.textualapp.com]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dimasg has quit [Ping timeout: 252 seconds]
Timba-as has joined #ruby
danieli has quit [Quit: *does an epic backflip into nowhere*]
ItSANgo has quit [Quit: Leaving...]
bmurt has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
felltir has quit [Remote host closed the connection]
bmurt has joined #ruby
baweaver has quit [Remote host closed the connection]
amclain has joined #ruby
Kallis has quit [Read error: Connection reset by peer]
quimrstorres has joined #ruby
NeverDie has joined #ruby
dopamean_ has joined #ruby
einarj has quit [Remote host closed the connection]
arescorpio has joined #ruby
<hays> i had a script today at work that stopped working when i started accessing ARGV. specifically gets didn't seem to know to pull from stdin.. is this normal?
<zenspider> what does ARGV and gets have to do with each other?
havenwood is now known as havenn
zenspider is now known as zs
zs is now known as zenspider
<hays> i don't know
<hays> it just mysteriously started throwing an error
quimrstorres has quit [Remote host closed the connection]
<zenspider> hays: you just want to read from files passed on cmdline?
choke has joined #ruby
choke has quit [Client Quit]
htmldrum has joined #ruby
dimasg has joined #ruby
<hays> nah, my args were just parameter
<hays> parameters
<zenspider> so what was the error?
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rcvalle has quit [Quit: rcvalle]
<hays> let me see if i can reproduce it at home.. i was on a winbox
<zenspider> ri Kernel.gets: "Returns (and assigns to $_) the next line from the list of files in ARGV (or $*), or from standard input if no files are present on the command line."
pietr0 has quit [Quit: pietr0]
Rickmasta has joined #ruby
<zenspider> you can be explicit by using $stdin.gets
<zenspider> or you can be explict by using ARGF as an IO
Synthead has joined #ruby
Azure has joined #ruby
ishahnaz has quit []
sideshowcoder has quit [Quit: Connection closed for inactivity]
hashrocket has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has quit [Remote host closed the connection]
devdazed has joined #ruby
Renich has joined #ruby
michaeldeol has joined #ruby
hashrocket has joined #ruby
<hays> dang. can't reproduce at home
<hays> I had something like while gets.chomp != 'STOP'; puts 'Type STOP to exit';end
hotpancakes has joined #ruby
fundies has quit [Read error: Connection reset by peer]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hydrozen has joined #ruby
<hays> ah well
<hays> i'll try gain tomorrow with $stdin.gets.chomp
<zenspider> hays: and normally your ARGV was empty, but you started adding flags or something?
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hotpancakes has quit [Remote host closed the connection]
<hays> zenspider: yeah
hotpancakes has joined #ruby
sperant has joined #ruby
<zenspider> kk. either process all your flags up front and ensure ARGV is empty, or be explicit about where you're getting your input
<zenspider> run `ri Kernel.gets` for full doco
<hays> ahhhhhh
drewo has joined #ruby
linuxboy_ has joined #ruby
dr3w has quit [Read error: Connection reset by peer]
northfurr has joined #ruby
bmurt has quit []
coban2k has quit [Remote host closed the connection]
hashrocket has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
linuxboytoo has quit [Ping timeout: 244 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hotpancakes has quit [Read error: Connection reset by peer]
marr has quit [Ping timeout: 264 seconds]
cpruitt has quit [Quit: cpruitt]
hotpancakes has joined #ruby
RegulationD has quit [Remote host closed the connection]
dimasg has quit [Ping timeout: 246 seconds]
rbennacer has quit [Remote host closed the connection]
havenn is now known as havenwood
jhack has quit [Ping timeout: 265 seconds]
Alayde has quit [Ping timeout: 240 seconds]
Oka has quit [Read error: Connection reset by peer]
coban2k has joined #ruby
AccordLTN has joined #ruby
Oka has joined #ruby
dimasg has joined #ruby
rbennacer has joined #ruby
bodgix_ has joined #ruby
WillAmes has quit [Remote host closed the connection]
sperant has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
WillAmes has joined #ruby
hashrocket has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
northfurr has quit [Ping timeout: 244 seconds]
jpfuentes2 has quit [Read error: Connection reset by peer]
jpfuente_ has joined #ruby
Ropeney has joined #ruby
charliesome has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Shibo has joined #ruby
michaeldeol has joined #ruby
tkuchiki has joined #ruby
TheNet has quit [Remote host closed the connection]
dfockler has quit [Remote host closed the connection]
drewo has quit [Ping timeout: 246 seconds]
bodgix has quit [Quit: Leaving.]
bodgix_ is now known as bodgix
bodgix1 has joined #ruby
bodgix1 has quit [Client Quit]
yqt has quit [Ping timeout: 245 seconds]
Timba-as has quit [Quit: Lingo: www.lingoirc.com]
hashrocket has quit [Excess Flood]
<hays> is there a more 'natural' way to do this https://bpaste.net/show/8c577ac6882b
Gribo has quit [Ping timeout: 244 seconds]
christiandsg has joined #ruby