apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
IceyEC has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
sectionme has joined #ruby
danman has quit [Quit: danman]
mklappstuhl has joined #ruby
devoldmx has joined #ruby
<pontiki> re-raised
<pontiki> so they will go to the next Exception handler in the stack
tylersmith has quit [Remote host closed the connection]
<Lewix> pontiki: I dont understand. what does propagates mean in that situation
Jdubs_ has quit [Remote host closed the connection]
snovak has quit [Read error: Operation timed out]
sectionme has quit [Ping timeout: 245 seconds]
tylersmith has joined #ruby
kvirani has joined #ruby
ssvo has quit [Ping timeout: 256 seconds]
<bnagy> >> begin;begin;1/0;rescue;p '1';raise $!;end;rescue;p '2';end
<eval-in> bnagy => "1" ... (https://eval.in/50547)
<pontiki> do you know what the word means generall, Lewix ?
<bnagy> lame output trimming
KobraKao has quit [Ping timeout: 245 seconds]
Stalkr_ has quit [Quit: Leaving...]
freezey has quit [Remote host closed the connection]
Jdubs has joined #ruby
BraddPitt has joined #ruby
|jemc| has joined #ruby
KobraKao has joined #ruby
Monie has joined #ruby
Guest32443 has quit [Quit: leaving]
tylersmith has quit [Ping timeout: 252 seconds]
sailias has joined #ruby
Monie has quit [Client Quit]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Lewix> pontiki: that's why im asking
<pontiki> "propogate", a verb, means to spread, disseminate, pass along
<pontiki> if you need more words, consult a dictionary
devoldmx has quit [Ping timeout: 248 seconds]
jefflyne1 has joined #ruby
mercwithamouth has joined #ruby
jb41 has quit [Quit: Lost terminal]
gwb3 has joined #ruby
tabolario has joined #ruby
fridim__ has joined #ruby
jefflyne has quit [Ping timeout: 246 seconds]
i8igmac has quit [Remote host closed the connection]
okinomo has joined #ruby
tgraham has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
justsee has joined #ruby
gwb3 has quit [Ping timeout: 245 seconds]
KobraKao has quit [Quit: Saindo]
ehc has quit [Quit: ehc]
i8igmac has joined #ruby
m00nlight has joined #ruby
bobdobbs has joined #ruby
jbrechtel has quit [Remote host closed the connection]
<bobdobbs> hey guys. I'm trying to get compass to work. I'm getting an error that I think comes from ruby. I'm not sure what to make of it: http://hastebin.com/soxowugawo.vbs
cj3kim has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
pwh has quit [Quit: pwh]
lukec has quit [Quit: lukec]
<|jemc|> it looks like it can't find the sass gem
<IceDragon> are you sure sass is installed?
<bobdobbs> absolutely
cj3kim has joined #ruby
<IceDragon> re-install it
<bobdobbs> ok
Popple has joined #ruby
<|jemc|> are you sure that compass is running with a version of ruby that has your sass gem installed?
<bobdobbs> oh wait... I just re-installed sass last night
quoin has joined #ruby
<|jemc|> I see you're using rbenv
<IceDragon> gem which sass
<bobdobbs> /home/mantis/.rbenv/shims/sass
bradhe has quit [Remote host closed the connection]
<IceDragon> I think we found our problem then
<bobdobbs> yeah?
cody-- has joined #ruby
<IceDragon> load up the irb and try require 'sass'
<bobdobbs> ok
maletor has quit [Quit: Computer has gone to sleep.]
enebo has quit [Quit: enebo]
cfi30 has joined #ruby
rgbdev has joined #ruby
KobraKao has joined #ruby
<bobdobbs> 'require "sass"' returns 'true
<IceDragon> :D well that works
* bobdobbs breaths sigh of relief
mansi has joined #ruby
<|jemc|> so, you're running compass as a binary as well?
<|jemc|> (I don't remember if it is one or not)
<bobdobbs> 'which compass' returns '/home/mantis/.rbenv/shims/compas'
danman has joined #ruby
DanKnox is now known as DanKnox_away
<|jemc|> how are you invoking compass, I should say
<bobdobbs> whoops..
axl_ has joined #ruby
Xeago has joined #ruby
<bobdobbs> from the command line, just as 'compass'
<|jemc|> rbenv which compass
kvirani has quit [Remote host closed the connection]
<bobdobbs> '/home/mantis/.rbenv/versions/1.9.3-p327/bin/compass'
<|jemc|> rbenv which sass
b00stfr3ak has quit [Ping timeout: 260 seconds]
<bobdobbs> /home/mantis/.rbenv/versions/1.9.3-p327/bin/sass
kvirani has joined #ruby
<bobdobbs> so far it looks like most of the balls are lining up
pwh has joined #ruby
<|jemc|> ls /home/mantis/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/ | grep sass
dodosan has joined #ruby
lfox has joined #ruby
axl_ has left #ruby [#ruby]
mary5030 has joined #ruby
<bobdobbs> ahhh. might be a problem here...
<bobdobbs> one sec, I'll pastebin the output
<IceDragon> :O
pwh has quit [Client Quit]
<bobdobbs> more then one sass
<bobdobbs> maybe that could cause the issue?
<bobdobbs> seems like I've got what looks like the latest stable, as well as the dev version
<bobdobbs> alpha version, I mean
<bobdobbs> I've got no idea what 'sass-rails' or 'sprockets-sass' are though.
mary5030 has quit [Remote host closed the connection]
<bobdobbs> hmmm... those two version of sass shouldn't really effect my ability to load compass though. At least not as far as I can tell.
devoldmx has joined #ruby
<bobdobbs> So, uh, what should my next step be?
mary5030 has joined #ruby
zeade has quit [Quit: Leaving.]
<IceDragon> manually load the file in question
pwh has joined #ruby
<IceDragon> require 'sass/script/node'
kvirani has quit [Ping timeout: 248 seconds]
benzocoumaran35 has joined #ruby
<bobdobbs> where do I put that line
<IceDragon> irb
<bobdobbs> ok
<IceDragon> try it in the irb
mansi has quit [Remote host closed the connection]
<IceDragon> Anyway I'm trying to install compass...
existensil has quit [Remote host closed the connection]
<|jemc|> wait, is it weird that his rbenv ruby version is 1.9.3-p327 and the inner path thinks it is 1.9.1?
devoldmx3 has joined #ruby
<bobdobbs> ahhhh... that gives me an error that looks a lot like the one I was getting before
JimmyNeutron has quit [Quit: Leaving]
mansi has joined #ruby
<|jemc|> ls ~/.rbenv/versions/1.9.2-p327/lib/ruby/gems/1.9.1/gems/**/lib/sass/script/node.rb
<IceDragon> |jemc| thats how gems are stored
tgraham is now known as tgraham|away
devoldmx has quit [Read error: Connection reset by peer]
anonymus_ has quit [Ping timeout: 256 seconds]
<bobdobbs> hmmm
<|jemc|> bobdobbs: your error there is not the same
<bobdobbs> ah, ok
<|jemc|> it wants you to have topelevel sass first
danman has quit [Quit: danman]
<|jemc|> but what is the output of the ls command I posted?
petey has joined #ruby
<bobdobbs> zsh: no matches found: /home/mantis/.rbenv/versions/1.9.2-p327/lib/ruby/gems/1.9.1/gems/**/lib/sass/script/node.rb
<|jemc|> I may have typed it wrong...
<|jemc|> oh, zsh may not glob in the same way as bash?
<IceDragon> ;-;
<|jemc|> anyway, I'd recommend uninstalling the sass gems you aren't using
<bobdobbs> ok
<|jemc|> so uninstall compass, uninstall all versions of sass, then reinstall compass
Guest69114 is now known as daveops
ehaliewicz has quit [Remote host closed the connection]
<|jemc|> using gem install and gem uninstall
<bobdobbs> brb, phone
ehaliewicz has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
Aryasam has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
<IceDragon> >,> well I just installed compass (I have no idea how to use these things..)
quoin has quit [Ping timeout: 248 seconds]
<pontiki> bash doesn't do ** like Dir does...
Flashmasterson has joined #ruby
<IceDragon> web dev confuses the hell out of me..
mansi has quit [Ping timeout: 240 seconds]
<bnagy> if in doubt, try rbenv rehash
<Flashmasterson> what is the command to update ruby?
<IceDragon> am I the only man on earth that doesn't understand JS and HTML!!!
<bnagy> and then walk around your desk anticlockwise
<pontiki> hardly, IceDragon
matiasevqz has quit [Read error: No route to host]
<IceDragon> Flashmasterson, depends on your system, you might just have to do it manually..
<bobdobbs> back
<Flashmasterson> IceDragon: maybe, it's mac 10.8
<bnagy> bobdobbs: rbenv rehash
<bobdobbs> IceDragon: I do webdev, and I find compass as confusing as fk
rupee has joined #ruby
<bobdobbs> bnagy: done
jonathanwallace has quit [Quit: WeeChat 0.4.1]
<bnagy> also I dunno where |jemc| is going with the ls thing, but find ~/.rbenv/versions/1.9.2-p327/lib/ruby/gems/1.9.1/gems/ -name node.rb
<xybre> Compass is a bit excessive imho, but its kind of neat.
<bnagy> should work on all sane *nix
ColKurtz has joined #ruby
<bobdobbs> IceDragon: one of the biggest problems with webdev at the moment is that package developers assume that you MUST be using ruby/compass
<IceDragon> ;(
saarinen has quit [Quit: saarinen]
<bobdobbs> inknowrite?!
<IceDragon> So now you have to learn html, css, js, ruby and sass. haml and few other languages
tgraham|away is now known as tgraham
<IceDragon> probably python and php...
<IceDragon> ;_;
<IceDragon> And here I though that developing for desktop was hard
<bobdobbs> Its kinda lame, cos there are all these cool packages that have compass as a dep. And they don't really need to depend on compass in the first place.
ixti has joined #ruby
m8 has quit [Quit: Sto andando via]
<bobdobbs> ... and you often don't find out until you are half-way through installing.
cj3kim has quit [Remote host closed the connection]
<bobdobbs> often the dep is undocumented.
<bobdobbs> IceDragon: webdev isn't much harder then other kinds. It's just that setting up environment has become needlessly complicated
<Flashmasterson> so what is the command for mac os 10.8 to update ruby to 2.0?
<bobdobbs> "Just attackclone the grit repo pushmerge, then rubygem the lymphnode js shawarma module – and presto!"
<IceDragon> You'll need to download and compile it yourself Flashmaterson
<IceDragon> *Flashmasterson
<pontiki> Flashmasterson: there are several ways to approach it
<IceDragon> O_O bobdobbs, that sounds terrifying
<pontiki> sadly, there is no one single way that workd for everyone
cj3kim has joined #ruby
<IceDragon> more terrifying than staring at a gcc compile line..
<bobdobbs> IceDragon: it is! That quote is from here: http://html9responsiveboilerstrapjs.com/
i_s has quit [Remote host closed the connection]
<IceDragon> :x This is a joke right
<IceDragon> Thats some crazy marketing..
<bobdobbs> IceDragon: yeah it is :)
<IceDragon> I'll probably look into it then
petey has quit [Remote host closed the connection]
<bobdobbs> But it's a pretty spot-on parody of modern webdev tool environment setup
<pontiki> ok, look
<pontiki> if you want easy
IceyEC has quit [Quit: IceyEC]
<pontiki> go write php
<bobdobbs> indeed
<pontiki> and limit yourself to simple html output
<IceDragon> Or, be like the old times and just write HTML by hand
<IceDragon> >.>
<pontiki> or that
<IceDragon> mush eazier
<pontiki> frontpage is for YOU
<bobdobbs> well hey, I'm trying to get compass working in order to help me get more efficient with authoring for wordpress
devoldmx3 has quit [Ping timeout: 246 seconds]
<bobdobbs> so these days, even php needs you to autocompile freeway buttmonkey merge svn commitshare javahunk
rupee has quit [Quit: Leaving]
<pontiki> authoring? do you mean theme design?
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<bobdobbs> yep
cody-- has quit [Quit: derp]
<IceDragon> ;-; All I ever wanted was to make a simple site where I could post links to my stuff for friends to view
<IceDragon> but noooooo
<bobdobbs> lolz :)
<pontiki> IceDragon: you really want to look at jekyll or octopress
<IceDragon> I ended up downloading rails + haml and all other nonsense..
<pontiki> step back from the precipice
<IceDragon> Then I discovered scriptogram
cj3kim has quit [Remote host closed the connection]
* bobdobbs pushes pontiki over the precipice
<IceDragon> and said "WTF AM I DOING!"
<pontiki> oh, hey, bobdobbs -- i know how to fly already
<bobdobbs> so, what do I try now? That find command didn't return anything
MrHacks has joined #ruby
<IceDragon> so yeah rails kinda killed it for me
* bobdobbs watches pontiki fly. curses in envy
<IceDragon> bobdobbs just reinstall sass and compass
<IceDragon> gem install sass compass
<pontiki> sorry, which find command, bobdobbs ? been kinda lost in the railsangst
dodosan has quit [Read error: Connection reset by peer]
benzocoumaran35 has quit [Ping timeout: 264 seconds]
* bobdobbs clears away angst
<bobdobbs> Oh, I think we were looking for the compass gem on my system.
<IceDragon> anyway I really need to finish my assembly thing ma bob
dodosan has joined #ruby
<bobdobbs> I'm re-installing those gems now
<MrHacks> J. R. Bob Dobbs? PRAISE BOB!
* bobdobbs grants discount to MrHacks
ldnunes_ has quit [Quit: Leaving]
<bobdobbs> MrHacks: one per customer. limted time to redeem
<IceDragon> Oh MrHacks hi I'm a dragon made of Ice methinks
MrZYX is now known as MrZYX|off
S0da has joined #ruby
<bobdobbs> ok, I've issued that command to re-install compass and sass. I'm still getting that error though
<pontiki> you're getting the error during the install?
<bobdobbs> Same error as before
<MrHacks> IceDragon: can you get me my slack back?
benzocoumaran35 has joined #ruby
<bobdobbs> oh no... not on the install.
<IceDragon> dunno
<IceDragon> Hmmm
Soda has quit [Ping timeout: 256 seconds]
iliketurtles has quit [Quit: zzzzz…..]
* bobdobbs gives MrHacks some slack
<IceDragon> O: Are you sure it isn't using the system ruby's gems instead of the rbenv
<IceDragon> compass that is
Targen has quit [Read error: Connection reset by peer]
<bobdobbs> pontiki: not on the install. On the command 'compass install bare...'
madhatter has quit [Read error: Operation timed out]
madhatter has joined #ruby
<bobdobbs> IceDragon: I'm pretty sure, yeah. I hunted out the system compass binary and removed it
<bobdobbs> 'which compass' returns: 'home/mantis/.rbenv/shims/compass'
Stalkr^ has quit [Quit: Leaving...]
<pontiki> well okay, stupid question time: is the version of compass you have compatible with the version of ruby?
<IceDragon> The gem may still be looking for the system sass..
bartocc has quit [Quit: bartocc]
* IceDragon runs 2.0.0
<bobdobbs> pontiki: good question. How do I find out?
<IceDragon> all praise Arch Linux
<IceDragon> try running "compass" without args
<MrHacks> meh
<Flashmasterson> i'm looking through hartle's rails tutorial to install ruby 2.0 but am having some trouble. will installing the latest version of rvm install ruby 2.0?
<bobdobbs> IceDragon: that returns the same error: cannot load such file -- sass/script/node
* IceDragon punches a hole in bobdobbs ruby
mansi has joined #ruby
* bobdobbs kicks bobdobbs ruby while it's down on the ground
ewnd9 has joined #ruby
<tgraham> Flashmasterson: rvm is a ruby version manager, once it is installed you can then use it to install ruby 2.0
<bobdobbs> I don't know ruby well enough to know whats going on. But it looks like compass can't find sass
narcan has joined #ruby
bartocc has joined #ruby
<bobdobbs> It's like living the java nightmare all over again
* bobdobbs shudders
<bnagy> did you paste the full error somewhere?
dodosan has quit [Read error: Connection reset by peer]
bartocc has quit [Client Quit]
<bnagy> like there should be a script / line number that raises that error
<IceDragon> bobdobbs: rbenv compass
sevenseacat has joined #ruby
<Flashmasterson> tgraham: ok
saarinen has joined #ruby
ewnd9 has quit [Remote host closed the connection]
<BraddPitt> what is the convention for multiple-word variable names?
dodosan has joined #ruby
<BraddPitt> fooBar
<BraddPitt> or foo_bar
<BraddPitt> ?
ewnd9 has joined #ruby
<bnagy> foo_bar
<bobdobbs> IceDragon: rbenv: no such command `compass'
<BraddPitt> ty
randomautomator has joined #ruby
fgo has joined #ruby
ner0x has quit [Quit: Leaving]
<IceDragon> ;-; I dunno anymore bobdobbs
<bobdobbs> hmmm.
<bobdobbs> me neither
<IceDragon> try installing sass on the system and rbenv
<IceDragon> ;_;
<Flashmasterson> tgraham: i installed rvm but now i see three options that don't seem to contain the ruby installation https://gist.github.com/Flashmasterson/6693681
snovak has joined #ruby
Ox6abe has quit [Remote host closed the connection]
<tgraham> Do the rvm reload, then you'll need to do an rvm install <ruby version you want here> to get things compiled.
Kricir has joined #ruby
dmiller has joined #ruby
ner0x has joined #ruby
<tgraham> bobdobbs: does sass --version and compass --version give sane results?
aryaching has joined #ruby
enriclluelles has joined #ruby
<bobdobbs> sass --version gives a sane result
<bobdobbs> compass --version just errors out.
<bobdobbs> I'll paste the error
tkuchiki has joined #ruby
JesseH has quit [Quit: github.com/jessehorne]
tylersmith has joined #ruby
<Flashmasterson> tgraham: ok, i actually have rvm installed, so the reload just said "RVM reloaded!"
sarlalian has quit [Read error: Operation timed out]
<tgraham> bobdobbs: what version of the compass gem did you get installed?
lyanchih has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<IceDragon> compass is a ruby file right!?
<tgraham> And did you install compass-sourcemaps gem?
<bobdobbs> not sure. I just did 'gem install compass'
<tgraham> Gem
<tgraham> gem list | grep compass
<IceDragon> no I mean the executable
<bobdobbs> tgraham: compass (0.12.2), compass-rails (1.0.3)
<bobdobbs>
<tgraham> Flashmasterson: you'll need to rvm install ruby-2.0.0-p247 or whatever version you want.
<bobdobbs> IceDragon: I think so. It is gem after all
<tgraham> And the sass version?
snovak has quit [Ping timeout: 245 seconds]
<IceDragon> whereis compass
vim_shim has joined #ruby
<Flashmasterson> tgraham: ok that did it, thanks a lot for the hlep
<tgraham> welcome
mansi has quit [Remote host closed the connection]
Aryasam has quit [Ping timeout: 245 seconds]
<bobdobbs> tgraham: no, I didn't install the compass-sourcemaps gem. I tried to do it just now, and got "could not find a valid gem..."
<bnagy> bobdobbs: can you start irb and require 'sass' and require 'sass/script/node' without errors?
mansi has joined #ruby
<tgraham> bobdobbs: what version on sass do you have installed?
brianpWins has quit [Quit: brianpWins]
danman has joined #ruby
brendan-_ has joined #ruby
<tgraham> You'll want one of the 3.3.0+ versions.
jefflyne1 has quit [Ping timeout: 246 seconds]
brendan-_ has left #ruby [#ruby]
<bnagy> cause given you couldn't find that file, it seems like it's unlikely to work
<bobdobbs> tgraham: Sass 3.3.0.alpha.255 (Bleeding Edge)
<tgraham> You may need to gem uninstall sass and then reinstall.
kaspergrubbe has joined #ruby
<bobdobbs> ok... doing that now
<tgraham> Then see if you can install compass-sourcemaps, gem install compass-sourcemaps -v 0.12.2.sourcemaps.57a186c --pre
<tgraham> The --pre is important ;)
<bobdobbs> ok, doing that now...
osvico has joined #ruby
<bobdobbs> what does compass-sourcemaps do?
<tgraham> Are you using Bundler to manage your gems for whatever it is you're working on?
<bobdobbs> nope. I've got on idea what bundler is.
<gazarsgo> if i have a def meth(*args) what type is *args ? is it always a hash ? meth(:param => 'value'), how do I access 'value' in the def ?
mansi has quit [Ping timeout: 245 seconds]
<IceDragon> gazarsgo: Array
niteowl has joined #ruby
Popple has quit [Quit: Computer has gone to sleep.]
<gazarsgo> so i can't index into it by key ?
<IceDragon> use ** for Hash (if you're running 2.0.0)
<bobdobbs> ok, I've re-installed sass and compass
<tgraham> compass-sourcemaps allows you to use source maps in sass using compass.
<bobdobbs> oh, the alpha version of sass has that built in!
Behi has joined #ruby
<bobdobbs> \o/
<IceDragon> or, just have def meth(args) # ruby will automagically handle the hash arguments
lukec has joined #ruby
<bobdobbs> now, if only the current chrome version support for sourcemaps wasn't broken...
<tgraham> Did you enable it in DevTools?
<bobdobbs> ok, I've re-installed sass, the alpha version of sass, and compass
<bobdobbs> tgraham: yes I did. But I've got a complication...
<bobdobbs> I'm working with chromium
thomasxie has joined #ruby
zarubin has quit [Ping timeout: 252 seconds]
<bobdobbs> the offical chrome line is that sourcemaps only works in canary, and canary isnt' available for linux
<tgraham> Ah, so no way to get on the dev channel release?
<bobdobbs> none
* bobdobbs wails, curses
<bobdobbs> In chromium you can turn on source maps. But they don't really work.
mmitchell has joined #ruby
<tgraham> Never used it.
dayepa1 has quit [Quit: dayepa1]
<bobdobbs> tgraham: early days for it. Looking forward to using it in the future
mansi has joined #ruby
<bobdobbs> ok, after re-installing those gems, I still get the same error when trying to use compass
<bobdobbs> `require': cannot load such file -- sass/script/node'
<IceDragon> yup compass is evil!
<bobdobbs> gaaaaaaah
<IceDragon> ;-;
<IceDragon> oh try require 'sass'
mansi has quit [Remote host closed the connection]
<bobdobbs> from irb?
<IceDragon> yeah
<|jemc|> banisterfiend, hanmac: did either of you guys have luck with using decorators in 2.1 as we were discussing on instance methods?
<bobdobbs> IceDragon: returns true
bradhe has joined #ruby
<|jemc|> s/discussing/discussing yesterday
<IceDragon> now try p Sass::VERSION
randomnick_ has quit [Quit: Leaving]
<|jemc|> I'm running into the problem I was worried about with method(:foo) not being defined from the class level of self
tacos1de has joined #ruby
<bobdobbs> IceDragon: "undefined local variable or method `sass' for main:Object"
<IceDragon> Huh
<IceDragon> D:
<IceDragon> p Sass::VERSION # << exactly
<bnagy> gotta type it exactly
<bobdobbs> IceDragon: But I do get a version number if I do 'sass --version' from zsh
<IceDragon> >.> just make sure they match up
stkowski has joined #ruby
<IceDragon> mine spits out "3.2.10 (Media Mark)"
<bobdobbs> IceDragon: Yep. I still get that error from irb
CalvinnHobbes has quit [Quit: leaving]
<bobdobbs> aw man. this is weird.
<IceDragon> very very odd
rgbdev has quit [Quit: rgbdev]
<bobdobbs> what is this telling me? Like, my shell can find sass, but irb can't
<tgraham> You've required sass and Sass::VERSION is still giving errors?
<bobdobbs> oh wait...
cj3kim has joined #ruby
<bobdobbs> maybe I didn't require it first that time around.
bradhe has quit [Read error: Connection reset by peer]
<bobdobbs> trying again now
<IceDragon> x:
Tearan has quit [Quit: Sleepy Badger....]
<IceDragon> require "sass"; p Sass::VERSION
jbrechtel has joined #ruby
<bobdobbs> ah, ok
<bobdobbs> returns: "3.3.0.alpha.255 (Bleeding Edge)"
<bnagy> now require 'sass/script/node'
<bobdobbs> 'load error...'
enriclluelles has quit [Remote host closed the connection]
ColKurtz has quit [Quit: Textual IRC Client: www.textualapp.com]
<bnagy> cool
<IceDragon> Looks like they removed it in 3.3.0 then
<bnagy> and the file doesn't appear to exist on disk
<IceDragon> :x
* bobdobbs scratches head
pwh has quit [Quit: pwh]
<bnagy> so your versions aren't compatible
<tgraham> They may have removed that in the latest alpha. You should uninstall sass again and install a specific version.
<IceDragon> I have an idea
<IceDragon> bobdobbs remove sass again
<bobdobbs> ok
<tgraham> Try 3.3.0.alpha.149
<tgraham> gem uninstall sass, gem install sass -v 3.3.0.alpha.149
<bobdobbs> ok
<bobdobbs> 'Could not find a valid gem 'sass' (= 3.3.0.alpha.14) in any repository'
<tgraham> If that doesn't work, grab the cat, torch the house and move to Canada.
<tgraham> 149
<tgraham> Not 14
* bobdobbs looks around for matches
<tgraham> copy pasta error me thinks
<IceDragon> bobdobbs try 3.2.10 then
<IceDragon> NO
* IceDragon take the matches
lfox has quit [Quit: ZZZzzz…]
<IceDragon> >.>
* bobdobbs pouts
* IceDragon scoots away
<bobdobbs> ok, that gem is installed
* IceDragon holds it up in a zelda like manner
* bobdobbs stops pouting
<tgraham> Yeah, burn the cat and keep the house. Good call.
<IceDragon> DUN DUN UN!
jbrechtel has quit [Ping timeout: 240 seconds]
* bobdobbs looks around for cat. thinks the neighbours one will do.
<IceDragon> HEY THATS MY CAT!!!
<tgraham> commence commencing
* IceDragon bawls while rolling
iliketurtles has joined #ruby
<bnagy> ok now try irb -r 'sass/script/node'
* IceDragon nods
<bobdobbs> gah! still erroring
<bobdobbs> might be different error though. One sec.
* bobdobbs torches IceDragon's cat
lfox has joined #ruby
benzocoumaran35 has quit [Ping timeout: 264 seconds]
<IceDragon> >,> actually I dont have any pets
<IceDragon> Only a laptop and several changes of clothes..
* bobdobbs wonders whose cat that was
d34th4ck3r has joined #ruby
<IceDragon> bad interpreter...
<IceDragon> O: I haven't seen that error in eons
* bobdobbs watches burning, shreiking fireball run around house. grabs waterbucket
<bobdobbs> what does it mean?
<bnagy> wtf
<IceDragon> the sass executable is broken
<bobdobbs> OH HEY!
tomsthumb has quit []
<bobdobbs> I'm getting a return from compass --version now!
<IceDragon> :)
hogeo has joined #ruby
* IceDragon wins!
<bobdobbs> ogm omg omg
kizzx2 has joined #ruby
* IceDragon now wants cookies
* bobdobbs buys IceDragon new cat, cookies
<bnagy> mmm cat cookies
<IceDragon> O:
* IceDragon looks at the cat shaped cookies
* IceDragon noms one
<IceDragon> >.> seems legit
<bobdobbs> just... don't ask about the ingredients
<IceDragon> you pass
<tgraham> w00t
<bobdobbs> \o/
* IceDragon takes bag and scurries off to dragon cave
<bobdobbs> ok... what exactly did I do to fix things?
pwh has joined #ruby
* bobdobbs looks at command history
okinomo has quit [Ping timeout: 245 seconds]
threesome has joined #ruby
<tgraham> Removed the latest version of sass that's busted, installed a compatible version that's not busted.
<bobdobbs> hmmmm
<tgraham> And I really think the cat sacrifice was the key.
<bnagy> you installed a version that still had a file that compass was looking for
benzocoumaran35 has joined #ruby
Bira has joined #ruby
danman_ has joined #ruby
lukec has quit [Quit: lukec]
<IceDragon> bottom line: compass now works!
danman_ has quit [Client Quit]
<IceDragon> but the sass executable is probably borked!
<bobdobbs> IceDragon: I think it's good. I'll test...
* bobdobbs crosses fingers, looks for another neighbours cat...
danman has quit [Ping timeout: 240 seconds]
<bobdobbs> hey sass is fine!
Voodoofish430 has quit [Quit: Leaving.]
<IceDragon> >_> well mine is borked
<bobdobbs> I think the neighbours cat is broken though
<IceDragon> AND IT WORKED FINE A FEW MINUTES AGO!
<IceDragon> ;_____;
<bricker`LA> Oh damn... `private def foo` ... that syntax is cool.
Davey has joined #ruby
<bobdobbs> IceDragon: welcome to the wonderful world of webdev!
<IceDragon> and now reinstalling sass..
<IceDragon> >,>
<IceDragon> why me..
<bobdobbs> well, hey, you have a head start over me...
<bobdobbs> you actually know something about ruby!
mikee_ has quit [Disconnected by services]
<IceDragon> Sometimes I really wonder.. (maybe I do have quite a bit of talen under my belt)
<MrHacks> Outside of using %{#{Q{cat #{file} | sed -r -n '#{sed_command}'}}} where sed_command="30,40p" what else can I use to select certain lines from a file as if it were sed?
lfox has quit [Quit: ZZZzzz…]
quoin has joined #ruby
Xeago has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Client Quit]
<tgraham> Do you know the line numbers you want or are you looking for specific words?
c0rn has quit [Quit: Computer has gone to sleep.]
quoin has quit [Ping timeout: 246 seconds]
kvirani has joined #ruby
crazymykl has quit [Read error: Connection reset by peer]
mikemac has joined #ruby
cfi30 has quit [Quit: WeeChat 0.4.1]
fgo has quit [Remote host closed the connection]
<bobdobbs> guys, thank you very much for the help. I don't have a clue about ruby, and you guys saved me much hair.
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
alekst has quit [Quit: Leaving...]
iliketurtles has quit [Quit: zzzzz…..]
JesseH has joined #ruby
dayepa has joined #ruby
JumpMast3r has joined #ruby
kvirani has quit [Remote host closed the connection]
kvirani has joined #ruby
taternuts has joined #ruby
cyberarm has quit [Quit: Bye]
amacgregor_ has joined #ruby
sectionme has joined #ruby
mansi has joined #ruby
aef has joined #ruby
amacgregor__ has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
kvirani has quit [Ping timeout: 248 seconds]
<|jemc|> banisterfiend, hanmac: ignore my earlier question, I've got it working correctly now
amacgregor has quit [Ping timeout: 268 seconds]
fgo has joined #ruby
<|jemc|> for any interested parties:
enebo has joined #ruby
<|jemc|> instance method decorators in ruby 2.1: http://fpaste.org/41997/73904138/
sarkis has quit [Quit: leaving]
<|jemc|> someone with a blog ought to do a blog post about it
amacgregor_ has quit [Ping timeout: 248 seconds]
bricker`LA has quit [Ping timeout: 240 seconds]
sectionme has quit [Ping timeout: 268 seconds]
petey has joined #ruby
MrHacks has quit [Quit: leaving]
gwb3 has joined #ruby
kofno has quit [Ping timeout: 245 seconds]
<pontiki> damn bloggers :(
<IceDragon> |jemc| is that more ruby magic dust?
Tearan has joined #ruby
<IceDragon> oh, wait no
<IceDragon> Its just 2.1s new way of handling method definitions.....
<IceDragon> false alarm
<|jemc|> 'def foo; end' returns :foo in 2.1
<IceDragon> yeah
<IceDragon> :D
<IceDragon> why not just return the actual method object..
<tgraham> Instantiate an object for no reason?
<IceDragon> or is that too much overhead?
<Flashmasterson> has anyone here learned rails by hartl's tutorial? having some issues
<|jemc|> Flashmasterson: try #rubyonrails for rails questions
<Flashmasterson> thanks
<|jemc|> IceDragon: I don't know if decorators were the actual motivation for returning the symbol
<IceDragon> I read a post on the reason for it
<|jemc|> but it certainly helps bring python-style decorating to ruby
<IceDragon> I just have no idea where it was...
<IceDragon> >_> Now what we need is more flexible libs in ruby to finally rid the world of Python!
<IceDragon> python has like... everything
d34th4ck3r has quit [Quit: d34th4ck3r]
freerobby has joined #ruby
<IceDragon> ;_; while ruby focuses on web
<|jemc|> yeah, I'm not a web developer
<IceDragon> my point
<|jemc|> so it took some convincing by a friend to make me try ruby
<IceDragon> Yeah, everytime I tell someone "I use ruby"
mansi has quit [Remote host closed the connection]
<IceDragon> They be like "Rails?"
<IceDragon> And my answer is always the same
<|jemc|> no matter how many times they told me "it's a general-purpose language!", I still thought the user base was all about rails
<IceDragon> NO, just ruby!
mansi has joined #ruby
<|jemc|> and to a certain extent it is, but I'm working to try to help change that
mlpinit has joined #ruby
Flashmasterson has left #ruby [#ruby]
<|jemc|> and I just fell in love with Procs/blocks and how they are implemented in ruby
<IceDragon> >.> Well I use ruby to make graphics, music and other bits and pieces here and there
jduan1981 has quit [Ping timeout: 260 seconds]
Ox6abe has joined #ruby
<IceDragon> so I guess it is general-purpose..
<|jemc|> yeah, it is, but the focus of the user base has a big effect on what libraries get developed
kofno has joined #ruby
<|jemc|> but more to the point, I've found it to be far more flexible and powerful at general purpose applications than python
aryaching has quit []
Apocalypse has quit [Ping timeout: 245 seconds]
fgo has quit [Remote host closed the connection]
<IceDragon> I still don't like Python
<pontiki> i do with more railsists didn't just write to rails
<|jemc|> I can deal with the occasional lack of relevant libraries because its much faster for me to write my own
<IceDragon> and nothing will convince me otherwise
<pontiki> i mean, rails has a lot of cool stuff
snovak has joined #ruby
<IceDragon> Well anything in rails can be had in ruby
<pontiki> but yeah, i write a fair number of gems to just *do* stuff, some of it gets into my rails apps
<IceDragon> Writing Extensions in ruby is so much fun :D
<IceDragon> And so easy
<pontiki> sure, the thing is learning what exactly to require
cutmail has joined #ruby
<IceDragon> I've started making gems
<pontiki> cool
<IceDragon> Though they just sit on my own computer
<IceDragon> since I never write tests..
<pontiki> i should probaly start looking at some higher-end gem management stuff
<IceDragon> tell me when you find something good! :D
mansi has quit [Ping timeout: 248 seconds]
ehaliewicz has quit [Remote host closed the connection]
brum has joined #ruby
<pontiki> the seattlerb-ers have a bunch of stuff
nari has joined #ruby
xjiujiu has joined #ruby
<IceDragon> Hmm, maybe I should learn a bit of python..
<IceDragon> And then port python libs to ruby
<IceDragon> O:
aryaching has joined #ruby
Apocalypse has joined #ruby
<|jemc|> I started learning ruby by trying to port a few of my favorite python libraries
<IceDragon> Then overthrow Python's rule and live as hero!
<pontiki> there's jeweler as well
<IceDragon> MUHAHAHAHAHAHA!
<pontiki> i haven't had a compelling reason to learn python yet
<pontiki> so it kind of sits out there while other neat things come up
snovak has quit [Ping timeout: 256 seconds]
<pontiki> like Cohen the Barbarian?
codezombie has quit [Ping timeout: 260 seconds]
<IceDragon> yeah
Domon has joined #ruby
<jrobeson> konnichiwa pontiki
<jrobeson> oh wait.. the timing is off :( it got late
<IceDragon> ... why did I just read that with a anime voice...
<IceDragon> :X
<IceDragon> like the annoying high pitched one..
macmartine has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
mmitchell has quit [Remote host closed the connection]
<jrobeson> i remember reading about ruby before rails even came out.. so i'm glad i never got into the ruby is rails mindset
<jrobeson> not sure when i wrote my first actual ruby app though
jojosiao has joined #ruby
mrsolo has joined #ruby
mrsolo has quit [Client Quit]
fourq has quit [Ping timeout: 256 seconds]
<pontiki> i took one lesson in Japanese, ages ago.
fgo has joined #ruby
<pontiki> bon soir, jrobeson
m00nlight has quit [Quit: Konversation terminated!]
<pontiki> i did learn ruby to learn rails (rails 1! OMG) but i sat down to learn ruby *first* and fell in love
chrisja has quit [Quit: leaving]
ixti has quit [Quit: WeeChat 0.4.1]
<jrobeson> i fell in love with sinatra
<pontiki> yeah, i totally love it
Apocalypse has quit [Ping timeout: 264 seconds]
<pontiki> and i've been poking around with SPAs in JavaScript, with Sinatra makes me so happy
soheil has quit [Remote host closed the connection]
Bira has quit [Remote host closed the connection]
<sevenseacat> i need to look more into sinatra
maroloccio has quit [Quit: WeeChat 0.4.0]
* sevenseacat has also been looking into SPAs
<pontiki> and this past week is was poking around with Frank
Apocalypse has joined #ruby
mlpinit has quit [Remote host closed the connection]
<jrobeson> grape looks pretty cool
<pontiki> not familiar?
mrsolo has joined #ruby
<pontiki> assuming you don't mean the sketch-like thing
<jrobeson> as-salam alaykum sevenseacat
<sevenseacat> arrr i dont speak arabic/hebrew (not sure which that is)
justsee has quit [Ping timeout: 256 seconds]
<jrobeson> it is in fact arabic
<sevenseacat> huzzah
Michael_ has joined #ruby
<pontiki> how very thor-like!
threesome has quit [Ping timeout: 245 seconds]
<pontiki> thanks jrobeson -- i'mma look deeper into that
filipe__ has joined #ruby
zeade has joined #ruby
Guest35787 has joined #ruby
dodosan has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
Guest35787 is now known as diegoviola
JumpMast3r has quit [Quit: JumpMast3r]
<jrobeson> here's a really useful arabic phrase
<jrobeson> (ḥawwāmtī mumtil'ah bi'anqalaysūn) حَوّامتي مُمْتِلئة بِأَنْقَلَيْسون
<jrobeson> my hovercraft is full of eels
<jrobeson> hehe
bradhe has joined #ruby
<|jemc|> ha
filipe has quit [Ping timeout: 245 seconds]
<jrobeson> arabic script is so beautiful..
DanKnox_away is now known as DanKnox
whunt has quit [Quit: Computer has gone to sleep.]
kaspergrubbe has quit [Read error: Connection reset by peer]
zeade has quit [Ping timeout: 245 seconds]
kaspergrubbe has joined #ruby
seanmccann has quit [Quit: Computer has gone to sleep.]
bradhe has quit [Ping timeout: 268 seconds]
quoin has joined #ruby
radpanda has quit []
varfoo has joined #ruby
<pontiki> My postilion has been struck by lightning.
<pontiki> (that's a real one!)
kaspergrubbe has quit [Ping timeout: 245 seconds]
TheMoonMaster has quit [Remote host closed the connection]
<jrobeson> pontiki, ?
<jrobeson> are you in a horse drawn coach?
m00nlight has joined #ruby
splittingred has joined #ruby
iliketurtles has joined #ruby
bobdobbs` has joined #ruby
Xeago has joined #ruby
bobdobbs has quit [Read error: Connection reset by peer]
<pontiki> no, no -- that's an actual phrase from an English-Hungarian phrasebook
<pontiki> it's sort of where they got the idea
St_Marx has joined #ruby
slyv has joined #ruby
slyv has quit [Max SendQ exceeded]
Michael_ has quit [Remote host closed the connection]
<pontiki> there were apparently a spate of bad translation phrase books
<jrobeson> i had not seen the word used any other way in the dictionrary or wikipedia
gwb3 has quit [Remote host closed the connection]
Cyrus has joined #ruby
Spami has joined #ruby
<pontiki> my hovercraft is full of eels?
bricker`LA has joined #ruby
<jrobeson> postilion ?
<pontiki> oh!
iliketurtles has quit [Client Quit]
<pontiki> right, that is an odd one -- which was sorta the point...
<jrobeson> oh.. phrase :) lol
<jrobeson> i thought you were really saing that happened.. and i thought you ahd some sort of different defintion for it :(
* jrobeson slaps forehead
Fire-Dragon-DoL has left #ruby [#ruby]
randomautomator has quit [Ping timeout: 260 seconds]
blarghmatey_ has joined #ruby
<pontiki> OH! no -- i was referring to the MP Dirty Hungarian Phrasebook sketch
<jrobeson> yes i got it now :(
kobain has quit [Ping timeout: 252 seconds]
dmiller has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
yuroyoro has joined #ruby
quoin has quit [Ping timeout: 264 seconds]
kobain has joined #ruby
yuroyoro has quit [Remote host closed the connection]
Spami has quit [Ping timeout: 256 seconds]
<jrobeson> i shouldn't start conversations that i can't follow :)
yuroyoro has joined #ruby
devoldmx has joined #ruby
yuroyoro has quit [Remote host closed the connection]
gwb3 has joined #ruby
macmartine has quit [Remote host closed the connection]
noop has joined #ruby
zeade has joined #ruby
zeade has quit [Client Quit]
lmadrigal has joined #ruby
jbrechtel has joined #ruby
DanKnox is now known as DanKnox_away
mrsolo has quit [Quit: This computer has gone to sleep]
tgraham is now known as tgraham|away
zz_michael_mbp is now known as michael_mbp
TheMoonMaster has joined #ruby
mansi has joined #ruby
<pontiki> my fault
<pontiki> i just riffed off
<pontiki> (like you do in improv)
meekrabr6r1 has joined #ruby
michael_mbp is now known as zz_michael_mbp
zz_tsykoduk has quit [Ping timeout: 252 seconds]
snovak has joined #ruby
<lmadrigal> does anyone know the channel for refinerycms?
brupeb has joined #ruby
mansi has quit [Ping timeout: 256 seconds]
ItSANgo has quit [Quit: Leaving...]
macmartine has joined #ruby
lmadrigal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
snovak has quit [Ping timeout: 245 seconds]
brupeb has quit [Remote host closed the connection]
mansi has joined #ruby
noop has quit [Ping timeout: 252 seconds]
i_s has joined #ruby
jbrechtel has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 256 seconds]
Xeago has quit [Read error: Connection reset by peer]
tgraham|away is now known as tgraham
einarj has joined #ruby
jbrechtel has joined #ruby
Behi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cody-- has joined #ruby
krz has joined #ruby
S0da has quit [Ping timeout: 245 seconds]
crackhead has joined #ruby
Behi has joined #ruby
Ox6abe has quit [Ping timeout: 248 seconds]
crackhead has left #ruby [#ruby]
cody-- has quit [Client Quit]
toah has joined #ruby
einarj has quit [Ping timeout: 240 seconds]
Ox6abe has joined #ruby
jbrechtel has quit [Remote host closed the connection]
meekrabr6r1 has quit [Quit: WeeChat 0.4.0]
Lewix has joined #ruby
GoldenGiant has joined #ruby
ewnd9 has quit [Ping timeout: 264 seconds]
pwh has quit [Quit: pwh]
ewnd9 has joined #ruby
okinomo has joined #ruby
pwh has joined #ruby
GoldenGiant has quit [Client Quit]
GoldenGiant has joined #ruby
BillCriswell has joined #ruby
Ox6abe has quit [Ping timeout: 245 seconds]
leehambley has quit [Ping timeout: 260 seconds]
leehambley has joined #ruby
sayan has joined #ruby
snovak has joined #ruby
Ox6abe has joined #ruby
GoldenGiant has quit [Client Quit]
sectionme has joined #ruby
GoldenGiant has joined #ruby
baggypants has joined #ruby
petey has quit [Remote host closed the connection]
cutmail has quit [Remote host closed the connection]
GoldenGiant has quit [Client Quit]
petey has joined #ruby
gazarsgo has quit [Quit: gazarsgo]
snovak has quit [Ping timeout: 246 seconds]
sectionme has quit [Ping timeout: 245 seconds]
Ox6abe_ has joined #ruby
Ox6abe has quit [Ping timeout: 240 seconds]
jbrechtel has joined #ruby
baggypants has quit [Quit: Textual IRC Client: www.textualapp.com]
toah_ has joined #ruby
toah has quit [Ping timeout: 264 seconds]
prophile has quit [Ping timeout: 245 seconds]
quoin has joined #ruby
tgraham has quit [Quit: Leaving...]
brum has quit [Remote host closed the connection]
Xeago has joined #ruby
prophile has joined #ruby
yacks has quit [Quit: Leaving]
gwb3 has quit [Remote host closed the connection]
KobraKao has quit [Read error: Operation timed out]
baroquebobcat has joined #ruby
leehambley has quit [Ping timeout: 245 seconds]
sailias has quit [Ping timeout: 252 seconds]
noop has joined #ruby
Ox6abe_ has quit [Ping timeout: 240 seconds]
leehambley has joined #ruby
Michael_ has joined #ruby
enebo has quit [Quit: enebo]
cj3kim has quit [Remote host closed the connection]
ItSANgo has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Remote host closed the connection]
toah_ has quit [Quit: 전 이만 갑니다.]
toah_ has joined #ruby
dhruvasagar has joined #ruby
Michael_ has quit [Ping timeout: 260 seconds]
saarinen has quit [Quit: saarinen]
rezzack has quit [Quit: Leaving.]
NealJ has quit [Quit: :c]
toah_ is now known as toah
quoin has quit [Ping timeout: 268 seconds]
zz_tsykoduk has joined #ruby
lyanchih has quit [Quit: lyanchih]
brum has joined #ruby
mikemac has quit [Ping timeout: 264 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
soba has joined #ruby
dweeb has joined #ruby
Ox6abe has joined #ruby
mikemac has joined #ruby
m00nlight has quit [Remote host closed the connection]
polaco is now known as polaco_zZz
petey has quit [Remote host closed the connection]
narcan has joined #ruby
dweeb has quit [Quit: Computer has gone to sleep.]
ananthakumaran has joined #ruby
mansi has joined #ruby
mayorga_ has quit [Ping timeout: 256 seconds]
gwb3 has joined #ruby
sayan has quit [Ping timeout: 246 seconds]
dweeb has joined #ruby
m00nlight has joined #ruby
mansi has quit [Ping timeout: 252 seconds]
iravan has joined #ruby
zeade has joined #ruby
ehaliewicz has joined #ruby
lukec has joined #ruby
idiocrash has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
matled- has joined #ruby
i_s has quit [Remote host closed the connection]
i_s has joined #ruby
apeiros has quit [Remote host closed the connection]
roflmaus has joined #ruby
havenwood has joined #ruby
ner0x has quit [Quit: Leaving]
apeiros has joined #ruby
graydot has joined #ruby
Boohbah has quit [Ping timeout: 240 seconds]
matled has quit [Ping timeout: 264 seconds]
matled- is now known as matled
lolmaus has quit [Ping timeout: 246 seconds]
wallerdev has quit [Read error: Connection reset by peer]
taternuts has quit []
james_woods has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby
Muz has quit [Ping timeout: 264 seconds]
ukd1 has quit [Remote host closed the connection]
nyuszika7h has quit [Ping timeout: 264 seconds]
Muz has joined #ruby
Sou|cutter has quit [Ping timeout: 264 seconds]
cj3kim has joined #ruby
i_s has quit [Ping timeout: 240 seconds]
T_T has quit [Remote host closed the connection]
splittingred has quit [Quit: splittingred]
Boohbah has joined #ruby
nyuszika7h has joined #ruby
hamakn_ has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
brum has quit [Remote host closed the connection]
graydot has quit [Quit: graydot]
chairabanta has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
james_woods has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 252 seconds]
yekta has joined #ruby
x1337807x has joined #ruby
snovak has joined #ruby
forced_request has quit [Read error: Connection reset by peer]
forced_request has joined #ruby
Sou|cutter has joined #ruby
thomasxie has quit [Read error: Connection reset by peer]
neo_ has joined #ruby
neo_ has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 245 seconds]
Davey has joined #ruby
noop has quit [Ping timeout: 245 seconds]
havenwood has quit [Remote host closed the connection]
Xeago has joined #ruby
jonahR has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
BizarreCake has joined #ruby
jaybe has joined #ruby
tgraham has joined #ruby
fridim__ has quit [Read error: Operation timed out]
<jaybe> hello. vexed here. i have what i believe to be an empty but set variable. i'm trying to test to see if it's empty to skip acting upon it. is there a way to print the raw contents of the variable similar to printf or the likes to see what's actually in it? further, i tried testing with a silly value and it still proceeds; e.g. if var.empty? || var.nil
antulik-afk is now known as antulik
chairabanta has quit [Quit: Leaving...]
<IceDragon> p
<IceDragon> or just call inspect on it
<IceDragon> anyway, gn folks
IceDragon has quit [Quit: Space~~~]
schaerli has joined #ruby
tgraham has quit [Ping timeout: 256 seconds]
Tearan has quit [Quit: Sleepy Badger....]
i_s has joined #ruby
stkowski has quit [Quit: stkowski]
lukec has quit [Quit: lukec]
mary5030 has quit [Remote host closed the connection]
amacgregor__ has quit [Read error: Connection reset by peer]
apeiros has quit [Remote host closed the connection]
maletor has joined #ruby
Xeago has joined #ruby
graydot has joined #ruby
leehambley has quit [Ping timeout: 245 seconds]
existensil has joined #ruby
brianpWins has joined #ruby
okinomo has quit [Ping timeout: 240 seconds]
VictorSK has joined #ruby
VictorSK_ has joined #ruby
leehambley has joined #ruby
i_s has quit [Ping timeout: 245 seconds]
cads has joined #ruby
sayan has joined #ruby
DanKnox_away is now known as DanKnox
idiocrash has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
VictorSK has quit [Client Quit]
aagdbl has joined #ruby
timonv has joined #ruby
mrsolo has joined #ruby
brum has joined #ruby
lyanchih has joined #ruby
VictorSK_ has quit [Remote host closed the connection]
browndawg has joined #ruby
kizzx2 has quit [Quit: Leaving.]
c0rn has joined #ruby
brum has quit [Ping timeout: 245 seconds]
<pontiki> jaybe: i did this thing... i made a debug filter, that basically calls up pry
codecop has joined #ruby
mansi has joined #ruby
_Minos_ has joined #ruby
<_Minos_> good evening people
dodosan has joined #ruby
c0rn has quit [Ping timeout: 248 seconds]
mercwithamouth has quit [Ping timeout: 240 seconds]
Kricir has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 260 seconds]
ananthakumaran has quit [Quit: Leaving.]
randomautomator has joined #ruby
Boohbah has quit [Ping timeout: 240 seconds]
Es0teric has joined #ruby
Boohbah has joined #ruby
vim_shim has quit [Ping timeout: 260 seconds]
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby
iliketurtles has joined #ruby
antulik is now known as antulik-afk
BillCriswell has quit [Remote host closed the connection]
sectionme has joined #ruby
kizzx2 has joined #ruby
<zeade> if anyone is familiar with virtus, do you have a good example of using a custom class as an attribute that also uses coercion?
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
<zeade> specifically i'm trying to use Money (https://github.com/RubyMoney/money) and allow strings, floats, etc to coerce themselves into a properly instantiated attribute
hamakn has quit [Read error: Connection reset by peer]
ukd1 has joined #ruby
tylersmith has quit [Ping timeout: 260 seconds]
darrik has quit [Read error: Operation timed out]
hamakn has joined #ruby
mercwithamouth has joined #ruby
<zeade> so far, not much luck
parzo has quit [Ping timeout: 256 seconds]
Spami has joined #ruby
sectionme has quit [Ping timeout: 240 seconds]
hamakn has quit [Read error: Connection reset by peer]
macmartine has quit [Read error: Connection reset by peer]
<bnagy> sorry, you're using words I have seen before but not in a way that appears to make sense for ruby
hamakn has joined #ruby
<bnagy> try without the jargon?
<sevenseacat> lol
macmartine has joined #ruby
apeiros has joined #ruby
yekta has quit [Quit: yekta]
toah has quit [Ping timeout: 256 seconds]
dweeb has quit [Quit: Computer has gone to sleep.]
<bnagy> or just show us the final code you wish you could write
gwb3 has quit [Remote host closed the connection]
framling has joined #ruby
robbyoconnor has joined #ruby
blarghmatey_ has quit [Read error: Operation timed out]
macmartine has quit [Remote host closed the connection]
Ox6abe has quit [Remote host closed the connection]
<bnagy> ohh I see virtus is some crazy thing and all the jargon comes from that
<zeade> bnagy: super great awesome rockstar ninja wizard. make more sense now?
maletor has quit [Quit: Computer has gone to sleep.]
dodosan has quit [Remote host closed the connection]
hamakn has quit [Read error: Connection reset by peer]
tagrudev has joined #ruby
i_s has joined #ruby
hamakn has joined #ruby
dodosan has joined #ruby
aagdbl has quit [Quit: Leaving.]
chairabanta has joined #ruby
pootler has quit [Ping timeout: 245 seconds]
snovak has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
ananthakumaran has joined #ruby
ananthakumaran1 has joined #ruby
zerun0 has quit [Ping timeout: 264 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
dodosan has quit [Ping timeout: 245 seconds]
zerun0 has joined #ruby
ukd1 has quit [Ping timeout: 245 seconds]
snovak has quit [Ping timeout: 240 seconds]
darrik has joined #ruby
Jdubs_ has joined #ruby
BraddBitt has joined #ruby
bradhe has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
BraddPitt has quit [Ping timeout: 245 seconds]
Jdubs has quit [Ping timeout: 240 seconds]
gcds has joined #ruby
Kricir has joined #ruby
braoru has joined #ruby
tgraham has joined #ruby
chairabanta has quit [Quit: Leaving...]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
brianpWins has quit [Quit: brianpWins]
bradhe has quit [Remote host closed the connection]
tgraham has quit [Ping timeout: 268 seconds]
iliketurtles has joined #ruby
iliketurtles has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 240 seconds]
pwh has quit [Quit: pwh]
timonv has quit [Remote host closed the connection]
gcds has quit [Ping timeout: 256 seconds]
brianpWins has joined #ruby
postmodern has quit [Quit: Leaving]
quoin has joined #ruby
parzo has joined #ruby
dodosan has joined #ruby
<_Minos_> Question for the IRC: What's the best beginning Ruby book out there?
kobain has quit []
<kizzx2> _Minos_: my personal fav was Agile Web Development with Rails
mva3212 has quit [Ping timeout: 260 seconds]
toah has joined #ruby
<_Minos_> kizzx2: I'll have to check that out
jbpros has joined #ruby
quoin has quit [Ping timeout: 245 seconds]
<jrobeson> _Minos_, but do you want to learn ruby itself? then that is likely not the best resource
<jrobeson> something non rails specific would be better
<_Minos_> jrobeson: yeah I'm trying to learn Ruby
brennanMKE has quit [Remote host closed the connection]
larissa has quit [Quit: Leaving]
<jrobeson> don't buy a rails book then
dodosan has quit [Remote host closed the connection]
<jrobeson> kizzx2, don't recommend a rails book to somebody trying to learn ruby
<_Minos_> I want to eventually learn Rails too
<kizzx2> jrobeson: Rails is a large(st?) practical application of Ruby
<jrobeson> not that i have any recommendations.. i didn't use a book
jbpros has quit [Client Quit]
<jrobeson> kizzx2, so? it also promotes bad development practices
<_Minos_> what did you use jrobeson?
<kizzx2> a rails book recommendation is better than none
<jrobeson> didn't use a book
<jrobeson> no it isn't
<jrobeson> there's books that are actually about programming ruby
<jrobeson> like the pickaxe book, but that might be not as useful for learning..
<kizzx2> jrobeson: no need to direct at me, nobody has absolute truth man take it easy
<jrobeson> nobody has absolute truth, but that doesn't make your recommdenation a good one
<kizzx2> whatever
<jrobeson> rails would do better if people learned ruby first
<kizzx2> _Minos_: i find learning it while doing actual Rails example from the book quite useful
<kizzx2> typical PHP style rant
<jrobeson> does the book actually teach you to use service objects? or just the rails/active record callbacks?
<_Minos_> i didnt mean to start a flame war :(
<jrobeson> there are actually good ways to write programs.. and that is the truth
<kizzx2> _Minos_: not your fault, really didnt see that coming either
aryaching has quit []
<jrobeson> wtf is a php style rant? that makes no sense considering php's bad reputation
<kizzx2> ok
aagdbl has joined #ruby
<jrobeson> if you want to learn rails later.. i would recommend rails 4 in action
<_Minos_> right now I'm using codeacademy and Eloquent Ruby, using the latter as a way to properly write Ruby
<jrobeson> and it is written by the people who actually write rails
<jrobeson> some of them i mean
<sevenseacat> AWDWR was a terrible, terrible book
<kizzx2> sevenseacat: why?
brum has joined #ruby
dzhulk has joined #ruby
<sevenseacat> because half of it flat out didnt work and it encouraged a lot of bad practices
okinomo has joined #ruby
<kizzx2> sebastianb: specifics?
<jrobeson> sevenseacat, do you have a good ruby book recomendations?
JumpMast3r has joined #ruby
<sevenseacat> for learning ruby? The Well-Grounded Rubyist is getting a 2.0 reboot
<kizzx2> its' a pretty _beginning_ good book IMO in that you create an actual app throughout the book instead of reading like a reference
<jrobeson> kizzx2, that doesn't make it a good book.. if it teaches you to write code badly
DaZ has quit [Ping timeout: 245 seconds]
<kizzx2> for example Well-Grounded Rubyist is not intended for beginners in think it mentioned in the preface
<jrobeson> like overusing rails callbacks and whatnot
ukd1 has joined #ruby
* sevenseacat gets copy of book out
<jrobeson> or writing models that are too fat
wallerdev has quit [Quit: wallerdev]
Aryasam has joined #ruby
r0bglees0n has joined #ruby
mva3212 has joined #ruby
<sevenseacat> 'optimized for a reader whos done some programming and maybe some ruby, and wants to learn about the ruby language'
Davey has joined #ruby
<kizzx2> *checks that i'm not in a C++ channel*
<sevenseacat> 'if this is your first foray into programming, be prepared to do a little extra homework'
brum has quit [Ping timeout: 264 seconds]
mercwithamouth has quit [Ping timeout: 268 seconds]
<kizzx2> really, reading a book like WGR as a beginner would be really boring for action oriented people
<jrobeson> _Minos_, have you coded before?
ayaz has joined #ruby
mansi has joined #ruby
<kizzx2> it's much better to do it after having some some real world app maybe Rails and then discover "oh so this can be done more correctly" to be able to actually absorb it
jojosiao has quit [Quit: Page closed]
<sevenseacat> so you want someone who has never seen ruby before to just start blindly coping and pasting rails code from a tutorial?
<sevenseacat> *copying
<_Minos_> jrobeson: yeah I've done a bit of Python and I'm currently learning C. I'm pretty proficient at bash and awk scripting
<kizzx2> how do you call this type of argument fallacy?
<jrobeson> kizzx2, you already used a fallacy on me.. with that php style rant crap
<jrobeson> you don't even know me
Kneferilis has quit [Quit: Leaving]
<kizzx2> gosh
<sevenseacat> if you want to learn rails and you have some background knowledge on ruby, we can recommend decent rails tutorial books
Kneferilis has joined #ruby
<sevenseacat> however, that wasnt the question asked
DaZ has joined #ruby
Kneferilis2 has joined #ruby
<jrobeson> guilt by assocation .. i think they call that..
<kizzx2> why get so worked up
<_Minos_> well, this simple question turned into a clusterfuck lol
<jrobeson> because you implied that a) that i code in a language lots of people find crappy b) and that php developers rant a lot
<kizzx2> well said
<sevenseacat> if you want a straight ruby book, i recommend TWGR. If you want a rails book, i recommend something like Rails 4 in Action
<sevenseacat> if you read AWDWR, don't come crying to us when things dont workj
niteowl has quit [Quit: Konversation terminated!]
<jrobeson> i just read the intro to well grounded rubyist.. sounds like it'd work well
<jrobeson> perhaps i should get a copy
<sevenseacat> jrobeson: grab the MEAP thats out with ruby 2
<sevenseacat> *ruby 2 compatibility
<_Minos_> What's TWGR?
<jrobeson> ah another MEAP
<jrobeson> the well grounded rubyist
<_Minos_> gotcha
<_Minos_> ordering on Amazon now lol
mansi has quit [Ping timeout: 245 seconds]
<jrobeson> _Minos_, see what sevenseacat just said
<sevenseacat> get the MEA... never mind then
<_Minos_> whats the MEAP?
<jrobeson> early access
parzo has quit [Ping timeout: 256 seconds]
<sevenseacat> manning early access program
<_Minos_> what do you guys think of Eloquent Ruby?
<sevenseacat> i thought it was really good
<sevenseacat> as was POODR (http://poodr.info/)
<_Minos_> that's what I'm reading now while going through Code Academy
Kricir has joined #ruby
<_Minos_> I'm gonna pick up POODR too
<jrobeson> then if you're looking for another companion.. i'd say the MEAP versino would actually be quite fitting
tonni has quit [Remote host closed the connection]
<jrobeson> of twgr
Macaveli has joined #ruby
<jrobeson> _Minos_, sorry i didn't have a recommendation straight up.. i don't think i've bought a technical book since apache 2.0 internals book :)
<jrobeson> pretty well learned everything else onlin
Roa has quit [Ping timeout: 256 seconds]
Roa has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
<_Minos_> I like books for being able to read them while on the train and while in the bathroom
pranny has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
<jrobeson> tech books get out of date to ofast for me to get a print copy
<jrobeson> i needa buy an ereader for that kinda thing
xjiujiu has joined #ruby
* sevenseacat hugs Kindle
zoee has joined #ruby
Kricir has quit [Ping timeout: 256 seconds]
persand has joined #ruby
tobago has joined #ruby
ukd1 has quit [Ping timeout: 245 seconds]
funburn has quit [Quit: funburn]
<_Minos_> eh, I have a Nexus 7, I just cant really get into the ereaders
<_Minos_> maybe I need a paperwhite
bricker`LA has quit [Remote host closed the connection]
<Buuyo> the old paperwhite was really good. contrast was a little weak. they've apparently fixed that. kinda jealous of the new one :p
<diegoviola> how do you folks handle pushy clients? the type of clients that ask the same questions over and over again, like "how's it going?" type of questions, i'm all for being transparent and being productive as much as i can, but those pushy questions can also become stressful when being asked every day/hour, so how do you handle it?
<jrobeson> yeah _Minos_ i wouldn't call a nexus 7 an ereader. you can barely use such a thing outside in any reasonable light
<diegoviola> sorry to ask that
<sevenseacat> considering upgrading my old kindle touch to one of the new paperwhites
<sevenseacat> diegoviola: already answered it.
<jrobeson> diegoviola, give them a deadline.. say you'll be done with X by friday
<Buuyo> bite-sized milestones :p
<jrobeson> or whatever day..
<diegoviola> ok sorry
<diegoviola> thanks
<jrobeson> oh.. also
<jrobeson> setup a trello or some sort of tracker
<jrobeson> with the milestones there
<jrobeson> then just point them there everytime :)
<sevenseacat> we use pivotal tracker for that purpose
<jrobeson> eventually they'll stop asking
i_s has quit [Remote host closed the connection]
<jrobeson> you would now wouldn't you sevenseacat ...
<Buuyo> it's troublesome that some clients won't look at the pm software even if you link it and will still pick up the phone every day. :(
tylersmith has joined #ruby
<jrobeson> ah i wouldn't answer the phone
ukd1 has joined #ruby
mm__ has joined #ruby
Xeago has quit [Remote host closed the connection]
<sevenseacat> clients dont get my phone number, they can call the office line which i have no connection to
<diegoviola> thanks, i'll look into a tracker i can use
mmm has quit [Ping timeout: 248 seconds]
<jrobeson> unless the server is down .. there is no phone answering
<jrobeson> or some emergency
Xeago has joined #ruby
<jrobeson> i call them, they don't call me :)
<Buuyo> that's a nice luxury. xD
<Buuyo> i can't complain too much tho. i dont touch clients often outside of developing user stories once or twice a week. :p
T_T has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
tylersmith has quit [Ping timeout: 260 seconds]
dodosan has joined #ruby
Xeago_ has joined #ruby
brum has joined #ruby
tonni has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
snovak has joined #ruby
parzo has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<jrobeson> ah.. nice info on the google context panel.. much better to describe the well grounded rubyist..
<jrobeson> The Well-Grounded Rubyist takes you from interested novice to proficient practitioner.
<jrobeson> quite concise :)
Aryasam has quit [Quit: Bye]
tatsuya_o has joined #ruby
robert__ has joined #ruby
robert__ has joined #ruby
Akuma has quit [Ping timeout: 245 seconds]
brum has quit [Ping timeout: 246 seconds]
Dreamer3 has quit [Ping timeout: 245 seconds]
snovak has quit [Ping timeout: 246 seconds]
gwb3 has joined #ruby
<Buuyo> how is trello compared to confluence btw?
<_Minos_> we use attask for internal PM management
robert_ has quit [Ping timeout: 245 seconds]
<_Minos_> at-task, sorry
<jrobeson> Buuyo, i have no idea, but confuence is likely far more complex
<jrobeson> trell is quite simple.. make a card, give it a label.. drag and drop between columns
<_Minos_> its decent, for what it does. Keeps the higher ups off my ass about how far along I am with developing the internal wiki and security stuff
<jrobeson> cards can have comments
tonni has quit [Ping timeout: 240 seconds]
<jrobeson> and checklists
<_Minos_> Trello is what I use at home to keep track of the myriad things I'm learning/doing
<Buuyo> cards like the parts of xp cubes right?
<jrobeson> i have no idea
<_Minos_> I put the internal IPs and stuff in it, all that
<jrobeson> i've never worked with a team of programmers before
<jrobeson> i mean except on open source projects
<jrobeson> i meant like professionally.. where one has certain deadlines one has to hit .. and a bigger organizational overhead
dodosan has quit [Ping timeout: 245 seconds]
<jrobeson> i generally only deal with bug trackers with milestons and priorities.. that's about the extent of it
<Buuyo> sometimes it feels like a lot of it is training wheels. all those CRC cards & cubes and what not. :( would like to take the training wheels off some time.
<jrobeson> Buuyo, https://trello.com/b/nC8QJJoZ/trello-development .. here's the board the team uses to develop trello itself.. to give you an idea on how one might do it
relix has joined #ruby
gwb3 has quit [Ping timeout: 245 seconds]
kil0byte has joined #ruby
<Buuyo> ah. those cards are nice and simple. :)
soc42 has joined #ruby
<jrobeson> it's said that that's the only tracker they use for making trello
noop has joined #ruby
<jrobeson> althoguh they likely have a private board (or more) for other stuff
<sevenseacat> trello is also awesome on mobile devices
<Buuyo> sometimes heh. the price is right too
<Buuyo> s/sometimes heh. //. remnants from other channels. :(
tgraham has joined #ruby
sectionme has joined #ruby
<jrobeson> i need trello with web notifications :(
<jrobeson> hmm.. need a web based email client with them too.. evolution is suck :(
<Buuyo> oh dear. :p
<jrobeson> too bad it has such great integration with gnome :(
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
<Buuyo> my phone makes a special dingle when I get an email from my notifier addresses. they're mostly SNS stuff.
<jrobeson> i'm just talking about desktop notifications
<jrobeson> the stuff on my android phone does notificadtions well enough
<jrobeson> for trell, mail, and most other things
tgraham has quit [Ping timeout: 245 seconds]
Macaveli has quit [Quit: Computer has gone to sleep.]
toah has quit [Ping timeout: 245 seconds]
jbpros has joined #ruby
tonni has joined #ruby
<Buuyo> I just don't distinguish my notifications any more. if my phone is shouting hey listen, I look down and see the notification, whether it's pm software, email, or the app server pool going haywire. :p
quoin has joined #ruby
|jemc| has quit [Ping timeout: 246 seconds]
marcgg_ has quit [Ping timeout: 240 seconds]
ukd1_ has joined #ruby
haxrbyte has joined #ruby
freerobby has quit [Quit: Leaving.]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
mzdravkov has joined #ruby
T_T has quit [Remote host closed the connection]
abk has joined #ruby
quoin has quit [Ping timeout: 256 seconds]
ukd1 has quit [Ping timeout: 240 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
coderhs has joined #ruby
marcgg has joined #ruby
bradhe has joined #ruby
jbpros has quit [Quit: jbpros]
sayan has quit [Ping timeout: 256 seconds]
ukd1_ has quit [Remote host closed the connection]
T_T has joined #ruby
freakazoid0223 has quit [Read error: Operation timed out]
bradhe has quit [Ping timeout: 268 seconds]
mrsolo has joined #ruby
jprovazn has joined #ruby
parzo has quit [Ping timeout: 268 seconds]
tonni has quit [Read error: Connection reset by peer]
polysics has joined #ruby
<polysics> hello
alup has joined #ruby
<polysics> anyone has ever needed to test Net::SSH under Rspec?
<polysics> http://net-ssh.github.io/ssh/v2/api/classes/Net/SSH/Test.html seems to be geared towards Test::Unit
h_kon has joined #ruby
<mzdravkov> I am wondering... do ruby have something like method apply, that get block and evaluate all the expressions from the block on self. For example
<mzdravkov> a = 41
<mzdravkov> +1
<mzdravkov> a.apply do
<mzdravkov> end
<mzdravkov> puts a # => 42
<mzdravkov> Ok, sorry for that...
<polysics> there at least 4 ways I can think of to do that :D
<polysics> 1) call methods on the boject
<polysics> 2) instance_eval
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
<mzdravkov> I am trying to implement it with class eval over Object
<polysics> 3) yield self to a block
<polysics> 4) reopen class (BAD)
xjiujiu has joined #ruby
cj3kim has quit [Remote host closed the connection]
mansi has joined #ruby
cj3kim has joined #ruby
<mzdravkov> when I yield self to block, then the block will have to do something like a.apply {|self| self.method1; self.method2}
diegoviola has quit [Quit: WeeChat 0.4.1]
<polysics> if you use instance_eval, the self inside the scope is set to the receiver
<polysics> ie. you do not need self.
zarubin has joined #ruby
zz_michael_mbp is now known as michael_mbp
<polysics> is that what you want?
<polysics> also, shameless plug for our telephony framework :P
<sevenseacat> git st
<sevenseacat> wrooong window
T_T has quit [Remote host closed the connection]
<polysics> you ain't stashing us!
sayan has joined #ruby
<sevenseacat> its my shortcut for status, not stash :P
<polysics> so, no one ever had to test Net::SSH using RSpec?
mansi has quit [Ping timeout: 245 seconds]
<polysics> I am fine then, thanks for asking
Hanmac has joined #ruby
<sevenseacat> :P
<polysics> :)
tonni has joined #ruby
<polysics> I wonder why people don't write test framework agnostic spec helpers
aganov has joined #ruby
_Minos_ has quit [Ping timeout: 245 seconds]
braincra- has joined #ruby
ahawkins has joined #ruby
Kricir has joined #ruby
timonv has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
braincrash has quit [Ping timeout: 264 seconds]
senayar has joined #ruby
callenb has joined #ruby
softgr has joined #ruby
<softgr> ciao
<softgr> !list
mercwithamouth has joined #ruby
softgr has left #ruby [#ruby]
Kricir has quit [Ping timeout: 245 seconds]
<sevenseacat> this is so weird, i have two projects, one is stuck on ree, the other just got given the go-ahead to use ruby 2.1
softgr has joined #ruby
* sevenseacat jumps back and forth
claymore has joined #ruby
<softgr> ciao
<softgr> !list
jbpros has joined #ruby
<sevenseacat> buon pomeriggio (sp?)
tonni has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
marius has quit [Quit: x]
<softgr> !list
softgr has quit [Client Quit]
jbrechtel has quit [Quit: Lost terminal]
ephemerian has joined #ruby
i_s has joined #ruby
paolooo has joined #ruby
okinomo has quit [Ping timeout: 268 seconds]
scottstamp is now known as zz_scottstamp
jbpros has quit [Ping timeout: 245 seconds]
<polysics> ciao :)
<polysics> that's spelled correcty
tatsuya_o has quit [Remote host closed the connection]
toah has joined #ruby
einarj has joined #ruby
Bry8Star{T2 has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
<sevenseacat> \o/
<sevenseacat> i remember something from six years of elementary school italian
<polysics> so, just loading that Net::SSH::Test helper borks everything
i_s has quit [Ping timeout: 240 seconds]
ewnd9 has quit [Ping timeout: 256 seconds]
<polysics> my daughters are learning english in preparation for a possible move to the US :)
jbpros has joined #ruby
<polysics> question: how does everybody test Net::SSH? Just mock the shit out of it?
<sevenseacat> i havent tested it before >_>
<polysics> I would love to get more meaningful tests, by itself the "all mocks" approach does not test much
Bry8Star{T2 has joined #ruby
<polysics> I might even jsut not test it
brum has joined #ruby
<polysics> as I obviously know mocking everything out works :)
obs has joined #ruby
snovak has joined #ruby
tatsuya_o has joined #ruby
aagdbl has quit [Quit: Leaving.]
Bry8Star{T2 has quit [Client Quit]
axsuul has joined #ruby
tonni has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
brum has quit [Read error: Operation timed out]
andikr has joined #ruby
colonolGron has joined #ruby
snovak has quit [Ping timeout: 252 seconds]
camilasan has joined #ruby
Bry8Star{T2 has joined #ruby
lurch_ has joined #ruby
nbrosnahan has joined #ruby
aagdbl has joined #ruby
blaxter_ has joined #ruby
threesome has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
Coffers has joined #ruby
ewnd9 has joined #ruby
pootler has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
tgraham has joined #ruby
xjiujiu has joined #ruby
DanKnox is now known as DanKnox_away
aagdbl has quit [Quit: Leaving.]
snyp has joined #ruby
zeade has quit [Quit: Leaving.]
browndawg has quit [Quit: Leaving.]
okinomo has joined #ruby
vlad_starkov has joined #ruby
tesuji has joined #ruby
tgraham has quit [Ping timeout: 256 seconds]
tonni has quit [Remote host closed the connection]
quoin has joined #ruby
Macaveli has quit [Quit: Computer has gone to sleep.]
lurch_ has left #ruby [#ruby]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
lurch_ has joined #ruby
xjiujiu has joined #ruby
Macaveli has joined #ruby
|jemc| has joined #ruby
toah has quit [Ping timeout: 246 seconds]
platzhirsch has left #ruby [#ruby]
bartocc has joined #ruby
quoin has quit [Ping timeout: 268 seconds]
maroloccio has joined #ruby
fgo has quit [Remote host closed the connection]
troessner has joined #ruby
adambeynon has joined #ruby
strk has joined #ruby
YaNakilon has quit [Ping timeout: 264 seconds]
kaspergrubbe has joined #ruby
<strk> I get this error: [ undefined method `username=' ] when doing: [ user = User.new; user.username = 'something' ]
gianlucadv has quit [Ping timeout: 260 seconds]
dawkirst has joined #ruby
<strk> but the _same_ syntax works in another file, does it sound like a missing include or similar ?
<sevenseacat> strk: your User has no username setter
dodosan has joined #ruby
<sevenseacat> where are you defining it?
kil0byte_ has joined #ruby
brum has joined #ruby
<strk> sevenseacat: it does, and it works in another place. It's defined in app/models/user.rb, works when used by lib/tasks/setup.rake, doesn't when used by spec/support/factories/users.rb
YaNakilon has joined #ruby
<sevenseacat> ah, rails
<strk> neither of the two have something that looks like an include
<strk> should I ask in #rails ?
<sevenseacat> so, show the definition
clocKwize has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
<sevenseacat> sequel... the layers get deeper
kil0byte has quit [Ping timeout: 260 seconds]
<strk> uhm, indeed I don't find that thing
<canton7> strk, make sure the 'username' field exists in the table
<strk> oh, it could be that I'm using two different databases
dodosan has quit [Ping timeout: 240 seconds]
<strk> that'd explain
<canton7> sequel models dynamically get attributes depending on the table they represent
<strk> carto_db_development indeed has the users table with its username field, while carto_db_test is empty
<canton7> that'll be it
* strk checks db logs
brum has quit [Ping timeout: 240 seconds]
<polysics> my money is on "your test db is not up to date"
<polysics> always bites me too
<strk> polysics: none of my db are ever up to date, indeed :>
<strk> so the rake db:migrate thing doesn't do that for all envs does it ?
* strk confirms the db in use is the empty one
<polysics> rake db:test:prepare
mansi has joined #ruby
Behi has quit [Ping timeout: 240 seconds]
threesome has quit [Ping timeout: 245 seconds]
<polysics> don't you LOVE a CI build passing message? :)
iravan has quit [Quit: Leaving.]
<sevenseacat> yes :D
seanmccann has joined #ruby
<polysics> it does not count if you commented out failing tests, though - happened once :)
Markvilla has joined #ruby
RDash[AW] is now known as RDash
mansi has quit [Ping timeout: 264 seconds]
svector has joined #ruby
Markvilla has quit [Client Quit]
<sevenseacat> i have known people to pend failing tests to make builds pass, and then never come back to them
Markvilla has joined #ruby
browndawg has joined #ruby
<strk> polysics: db:test:prepare did it, thank you !
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kricir has joined #ruby
<polysics> always gets me too :)
tonni has joined #ruby
<strk> I'll write a Makefile as soon as I figure how you're supposed to run test :>
Jdubs_ has quit [Remote host closed the connection]
Jdubs has joined #ruby
xjiujiu has quit [Read error: Connection reset by peer]
beilabs_ has quit [Ping timeout: 264 seconds]
mzdravkov has left #ruby [#ruby]
xjiujiu has joined #ruby
<strk> it looks like simply running "rspec" does run lots of tests, maybe I finally figured how's done :>
funburn has joined #ruby
<polysics> are they all green? :)
Kricir has quit [Ping timeout: 240 seconds]
<strk> no way
<strk> speaking of which... is passing args to rspec the only way to limit the tests being run ?
pygospa has quit [Disconnected by services]
* strk always comes back to disable tests, soon or late :)
TheRealPygo has joined #ruby
<polysics> you can use focus: true, or flag tests in groups
<polysics> but really
<polysics> use guard
<polysics> and always run all tests
<polysics> your teammates will thank you
<strk> what's guard ?
Jdubs has quit [Ping timeout: 245 seconds]
jlebrech has joined #ruby
timonv has quit [Remote host closed the connection]
funburn has quit [Client Quit]
elaptics`away is now known as elaptics
jonathanwallace has joined #ruby
OdNairy has joined #ruby
enriclluelles has joined #ruby
mikecmpbll has joined #ruby
noname001 has joined #ruby
fgo has joined #ruby
dawkirst has quit [Ping timeout: 248 seconds]
vlad_sta_ has joined #ruby
beilabs_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<polysics> guard continuosly runs your tests
<sevenseacat> when it feels like it
<polysics> when you save a file, it will run the tests for that file only
* sevenseacat not a fan of guard atm
julweber has joined #ruby
<polysics> it's not perfect, but what is?
<sevenseacat> this is a fair point.
<polysics> I like the fact that it cuts some startup time at best
<strk> polysics: gotcha, a bit soon for that. First must pass, then must be _quick_, then we'll see. We do have a buildbot running on push.
<polysics> you can configure it to behave a few different way
_maes_ has joined #ruby
kil0byte has joined #ruby
<polysics> my favorite is: run all tests on startup, run changed file only test on save. if a file that was red goes green, run the whole suite again.
allsystemsarego has joined #ruby
<polysics> buildbot adds time to your work as you have to actually wait for it and check for input
julweber has quit [Remote host closed the connection]
<polysics> guard, when it works, becomes almost subliminal
snovak has joined #ruby
Kar- has joined #ruby
<polysics> sevenseacat: what's wrong with guard anyway? it does run tests depending on weather or what you ate on occasion but other than that it's fine :)
kil0byte_ has quit [Ping timeout: 248 seconds]
<sevenseacat> its developed a nasty habit of a) only watching some of the files i tell it to, and b) hanging when i save unwatched files
_maes_ has quit [Ping timeout: 245 seconds]
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
<strk> I think developers should have an active role in testing their changes. Surely must be simple, but subliminal doesn't help growing them :)
fgo has quit [Ping timeout: 248 seconds]
okinomo has quit [Ping timeout: 260 seconds]
snovak has quit [Ping timeout: 246 seconds]
crunch-choco has joined #ruby
predator117 has joined #ruby
<polysics> we just corner people that don't write specs and threaten them with knives
<polysics> "SPECS OR I SHANK YOU" works well
kil0byte_ has joined #ruby
<polysics> we are past the "good habit" point, not testing is unacceptable.
<strk> yes, that's the right way to do things :)
shaunbaker has joined #ruby
predator217 has quit [Ping timeout: 245 seconds]
kil0byte has quit [Ping timeout: 240 seconds]
dawkirst has joined #ruby
ananthakumaran has joined #ruby
shaunbak_ has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
Bry8Star{T2 has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
cj3kim has quit [Remote host closed the connection]
freakazoid0223 has joined #ruby
cj3kim has joined #ruby
ananthakumaran1 has quit [Ping timeout: 252 seconds]
tgraham has joined #ruby
soc42 has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
wchun has quit [Ping timeout: 245 seconds]
Kneferilis2 has quit [Quit: Leaving]
Kneferilis has quit [Quit: Leaving]
shaunbaker has quit [Ping timeout: 245 seconds]
Kneferilis has joined #ruby
<strk> real 10m2.996s -- runtime of current specs
DonRichie has joined #ruby
zets has quit []
tgraham has quit [Ping timeout: 248 seconds]
<sevenseacat> ive worked on worse
julweber has joined #ruby
pootler has quit [Ping timeout: 256 seconds]
snyp has quit [Quit: leaving]
timonv has joined #ruby
gianlucadv has joined #ruby
yacks has joined #ruby
rgoodwin has left #ruby ["Textual IRC Client: www.textualapp.com"]
quoin has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
narcan has joined #ruby
ananthakumaran1 has joined #ruby
<strk> do you know how to get a report of failures/successes w/out spending another 10mins on it ?
tonni has joined #ruby
<sevenseacat> use something like fuubar that reports errors as they happen?
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
_maes_ has joined #ruby
quoin has quit [Ping timeout: 268 seconds]
ananthakumaran has quit [Ping timeout: 240 seconds]
ghr has quit [Ping timeout: 252 seconds]
mm__ has quit [Ping timeout: 245 seconds]
abk has quit [Ping timeout: 252 seconds]
mm__ has joined #ruby
vaicine has quit [Quit: leaving]
LMolr has joined #ruby
seanmccann has quit [Quit: Computer has gone to sleep.]
dodosan has joined #ruby
visof has joined #ruby
brum has joined #ruby
aagdbl has joined #ruby
aagdbl1 has joined #ruby
schaerli has joined #ruby
threesome has joined #ruby
Hanmac has quit [Quit: Leaving.]
Markvilla has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
pootler has joined #ruby
dodosan has quit [Ping timeout: 245 seconds]
krandi has joined #ruby
krandi has quit [Remote host closed the connection]
andikr has quit [Ping timeout: 240 seconds]
aagdbl has quit [Disconnected by services]
visof has quit [Client Quit]
aagdbl1 is now known as aagdbl
sevenseacat has quit [Quit: Leaving.]
brum has quit [Ping timeout: 248 seconds]
mansi has joined #ruby
dangerousdave has joined #ruby
Hanmac has joined #ruby
mansi has quit [Ping timeout: 248 seconds]
staafl has joined #ruby
abk has joined #ruby
nari has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
mklappstuhl has joined #ruby
maasha has joined #ruby
toah has joined #ruby
<maasha> Hi
dhruvasagar has quit [Ping timeout: 240 seconds]
<maasha> Me got problem: bzip2-ruby gem fails to compile on Ruby version 2. There is a bugfix on github, but it was never pushed to the gem repository. What can I do?
Kricir has quit [Ping timeout: 264 seconds]
bartocc has quit [Quit: bartocc]
lessless has joined #ruby
dhruvasagar has joined #ruby
<lessless> how to do multiple assignment via ternary operand: sign, css_class = satisfying?(current, previous) ? '+', 'success' : '-', 'danger' ?
rdark has joined #ruby
<hoelzro> I bet it'd work if you used array literals
<hoelzro> >> sign, css_class = true ? ['+', 'success'] : ['-', danger]; puts(sign); puts(css_class)
<eval-in> hoelzro => + ... (https://eval.in/50617)
blackmesa has joined #ruby
gr33n7007h has joined #ruby
<lessless> hoelzro, thank you!
<hoelzro> np =)
<maasha> very unreadable, though
zarubin has quit [Ping timeout: 245 seconds]
greengriminal has joined #ruby
beilabs_ has quit [Ping timeout: 245 seconds]
funburn has joined #ruby
<maasha> OK, back to ruby 1.9
Domon has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
ghr has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
<maasha> What a shame :o(
<hoelzro> maasha: have you tried building the gem yourself with the fix applied?
dhruvasagar has joined #ruby
<maasha> hoelzro: I am not sure how to. I looked at the https://github.com/rdp/specific_install gem, but that does not cut it.
kitak has quit [Ping timeout: 246 seconds]
bobdobbs` has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
vlad_sta_ has quit [Remote host closed the connection]
<maasha> hoelzro: adding the fix to the code downloaded by the gem and rerunning gem install gives another error but no error message
dodosan has joined #ruby
<hoelzro> another error? of what nature?
threesome has quit [Read error: Operation timed out]
vince_prignano has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
Nenor has joined #ruby
snovak has joined #ruby
brum has joined #ruby
<g0th> hi
<g0th> how do I get all divisors (including negative ones) of a list of numbers?
<hoelzro> howdy
<g0th> I guess I could do it list item by list item
<g0th> but shouldn't it be possible to do it faster?
rdark has quit [Quit: leaving]
<hoelzro> g0th: could you elaborate?
<hoelzro> you want to get all of the common factors of a list of numbers?
<g0th> what I want to calculate is Z[k]=sum_{divisors n of k}1/|n|V[n]W[k/n]
<g0th> for all "important" k
<michael_mbp> hi all
<hoelzro> g0th: could you provide some sample input/output?
<michael_mbp> Any thoughts on const_missing(_const); super; end where super returns nil ?!
<g0th> V[-1]=V[4]=V[0]=V[18]=2
<g0th> W something similar
<michael_mbp> this is really strange...
mrsolo has quit [Quit: This computer has gone to sleep]
dodosan has quit [Ping timeout: 246 seconds]
<michael_mbp> trying to debug what's causing the call to super to return nil.
<g0th> hoelzro: well in reality V and W are densities but anyway
gcds has joined #ruby
okinomo has joined #ruby
<g0th> hoelzro: the formula should give me the product density
snyp has joined #ruby
gcds has quit [Client Quit]
rdark has joined #ruby
kitak has joined #ruby
snovak has quit [Ping timeout: 248 seconds]
brum has quit [Ping timeout: 252 seconds]
<g0th> hoelzro: so in the above case k ranges over: all possible divisors of occuring keys of V and W
nfk has joined #ruby
<g0th> (-n..n).collect { |d| [d,n/d] if ((n/d) * d) == n}.compact
beilabs_ has joined #ruby
<snyp> If classes are objects of type Class, and Class is a subclass of Module and Module that of Object, is Object the only "class type" that has is itself not an object? Otherwise if Object were of type Class, it would be a circular recursion...
<g0th> that should give me the divisors of n
einarj has joined #ruby
<maasha> hoelzro: ok, so something is now different. Regular 'gem install bzip2-ruby' fails. Adding the fix from the issue tracker and rerunning 'gem install bzip2-ruby' fails with the same error
<hoelzro> well
<hoelzro> gem install bzip2-ruby will just fetch it from the repository
<hoelzro> it won't install what you've just built
<g0th> lets make it simpler
<hoelzro> you probably have to do something like gem install ./bzip2-ruby.*.gem
<hoelzro> g0th: please do =)
<g0th> how do I get the biggest key of a hash?
mengu has joined #ruby
<g0th> (and the smallest)
mengu has quit [Changing host]
mengu has joined #ruby
<hoelzro> iterate over the keys and keep track of the min/max
<g0th> can you give a nice line?
<g0th> I can somehow manage
<g0th> I am trying to improve my style
<hoelzro> I understand that you want to get all factors of a number
<hoelzro> my style isn't very good =/
<maasha> hoelzro: and where would that *.gem file be located?
<hoelzro> maasha: didn't you just build it?
<hoelzro> via gem build?
<g0th> hoelzro: I want to find "candidate" ks
Elhu has joined #ruby
<canton7> g0th, my_hash.keys.min and .max
<g0th> thanks!
<hoelzro> canton7 to the rescue!
<snyp> anyone?
<maasha> hoelzro: hm, I need to research gem
LMolr has quit [Ping timeout: 252 seconds]
<michael_mbp> anyone ?
<hoelzro> snyp: so what you're asking is if Object.class is a class?
<hoelzro> michael_mbp: no idea, sorry
Domon has joined #ruby
<michael_mbp> thoughts on const_missing(name); super # => nil; end ?
<snyp> yeah , but that's a cicular reference thingy..
<michael_mbp> hoelzro: np...
<snyp> so how does it even work?
Nenor has quit [Quit: Nenor]
nari has joined #ruby
soba has quit [Ping timeout: 252 seconds]
* hoelzro shrugs
<hoelzro> the parent directory of / is /
tgraham has joined #ruby
<hoelzro> that seems to work =)
<g0th> hmm
<hoelzro> I think Ruby understands where to stop at some level
<hoelzro> I confess, I haven't dug into that part much
<g0th> the maximum of the absolute values of the keys of two hashes
<g0th> ?
<hoelzro> (hash_one.keys + hash_two.keys).collect(:abs).max
<hoelzro> that would probably do it
<snyp> I will read some articles and try understanding it.
snyp has quit [Quit: leaving]
<hoelzro> the Ruby source would probably be useful too!
svector has quit [Read error: Connection timed out]
<g0th> nice
<g0th> the "+" concatenates the arrays?
svector has joined #ruby
<hoelzro> mhmm
tgraham has quit [Ping timeout: 256 seconds]
thisirs has joined #ruby
cj3kim has quit [Remote host closed the connection]
jbpros has quit [Quit: jbpros]
quoin has joined #ruby
Nenor has joined #ruby
swordsmanz has joined #ruby
LMolr has joined #ruby
quoin has quit [Ping timeout: 260 seconds]
filipe__ has quit [Ping timeout: 245 seconds]
<atmosx> I'm trying to write some basic rspec for helpers (sinatra) and I'm getting a an error... related to a module method. https://gist.github.com/atmosx/6697597 any ideas on why the method is not recognized?
filipe__ has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<atmosx> Okay, I figure it out, removing the class the calling directly the module did the trick
pootler_ has joined #ruby
pootler has quit [Read error: Connection reset by peer]
clocKwize has quit [Quit: Cya]
vlad_starkov has joined #ruby
<atmosx> Bdexit
mengu has quit [Quit: This computer has gone to sleep]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
brum has joined #ruby
xjiujiu has joined #ruby
Xeago_ has quit [Remote host closed the connection]
Xeago has joined #ruby
abk has quit [Ping timeout: 240 seconds]
soba has joined #ruby
mansi has joined #ruby
nfk has quit [Read error: Connection reset by peer]
brum has quit [Ping timeout: 248 seconds]
Michae___ has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
lyanchih has quit [Quit: lyanchih]
zeel has joined #ruby
vlad_starkov has quit [Ping timeout: 246 seconds]
abk has joined #ruby
xk_id has quit [Quit:
chairabanta has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
<coderhs> hey what does *rights variable mean in ruby
clocKwize has joined #ruby
svector has quit [Ping timeout: 256 seconds]
camilasan has quit [Remote host closed the connection]
razi has joined #ruby
camilasan has joined #ruby
Kricir has joined #ruby
sanderj_ has joined #ruby
vince_prignano has quit [Ping timeout: 246 seconds]
gr33n7007h has quit [Ping timeout: 245 seconds]
svector has joined #ruby
sander^work has quit [Ping timeout: 264 seconds]
Kricir has quit [Ping timeout: 256 seconds]
<hoelzro> coderhs: it's called the splat operator
<coderhs> what does it do?
sanderj_ is now known as Sander^work
timonv has quit [Remote host closed the connection]
<hoelzro> it expands its argument
<hoelzro> for example
<hoelzro> let's say I have a method do_stuff
<hoelzro> def do_stuff(foo, bar, baz) ... end
<hoelzro> if I have an array with three elements ([1, 2, 3])
<hoelzro> I *could* do do_stuff(a[0], a[1], a[2])
<hoelzro> or
<hoelzro> I could do do_stuff(*a)
timonv has joined #ruby
<Hanmac> in ruby2.1+ there is also a double-splat operator "**opts"
chairabanta has quit [Quit: Leaving...]
sectionme has quit [Ping timeout: 240 seconds]
<coderhs> ah i c, that can be helpful
<coderhs> hanmac: how does double-spat work
lkba has joined #ruby
<Hanmac> the same way as the normal one, but it returns an Hash, not an Array
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<jlebrech> if i wanted to do filepath.split(slash)[-1] to find a filename is there a ruby method to output a "/" or "\" or should i just use File.basename?
bartocc has joined #ruby
chairabanta has joined #ruby
vince_prignano has joined #ruby
tvw has joined #ruby
amacgregor has joined #ruby
krz has quit [Quit: krz]
ehaliewicz has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
snovak has joined #ruby
toah has quit [Ping timeout: 256 seconds]
dodosan has joined #ruby
brum has joined #ruby
camilasa_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
m00nlight has quit [Remote host closed the connection]
Hanmac has quit [Quit: Leaving.]
quoin has joined #ruby
lyanchih has joined #ruby
dodosan has quit [Ping timeout: 246 seconds]
snovak has quit [Ping timeout: 245 seconds]
intuxicated has joined #ruby
brum has quit [Ping timeout: 256 seconds]
<joonty> jlebrech: are you looking for File::SEPARATOR?
<joonty> >> File::SEPARATOR
<eval-in> joonty => "/" (https://eval.in/50636)
jonahR has quit [Quit: jonahR]
camilasa_ has quit [Remote host closed the connection]
camilasan has joined #ruby
vlad_starkov has joined #ruby
m00nlight has joined #ruby
gyzmodo has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.0]
<shevy> jlebrech filepath is a string? I usually use '/', it seems to work on windows just fine in my .rb scripts
mikemac has quit [Ping timeout: 240 seconds]
KobraKao has joined #ruby
kizzx2 has quit [Quit: Leaving.]
threesome has joined #ruby
tgraham has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
sevenseacat has joined #ruby
vlad_sta_ has joined #ruby
bartocc has quit [Quit: bartocc]
svector has quit [Read error: Connection timed out]
vlad_starkov has quit [Read error: Connection reset by peer]
bartocc has joined #ruby
nfk has joined #ruby
KobraKao has quit [Ping timeout: 256 seconds]
nfk has quit [Changing host]
nfk has joined #ruby
mikemac has joined #ruby
xk_id has joined #ruby
kaspergrubbe has joined #ruby
svector has joined #ruby
Nenor has quit [Quit: Nenor]
Stalkr_ has joined #ruby
MagmaRules has joined #ruby
tgraham has quit [Ping timeout: 240 seconds]
h_kon has quit [Remote host closed the connection]
nomenkun has joined #ruby
KobraKao has joined #ruby
m00nlight has quit [Remote host closed the connection]
vlad_sta_ has quit [Remote host closed the connection]
h_kon has joined #ruby
cj3kim has joined #ruby
Behi has joined #ruby
Nenor has joined #ruby
sectionme has joined #ruby
<coderhs> is there any shorter way to write this block. with out having the need to have a bracket
mklappstuhl has joined #ruby
<coderhs> "2012/4/3".split('/').map { |i| i.to_i }
MagmaRules has quit [Quit: MagmaRules]
kitak has quit [Remote host closed the connection]
<tobiasvl> "2012/4/3".split('/').map(&:to_i)
<tobiasvl> coderhs: ^
<g0th> hi
<coderhs> tobiavl: thank you was looking for that :)
hogeo has quit [Ping timeout: 252 seconds]
<g0th> how do I add all hash values corresponding to a key that satisfies some condition?
<g0th> e.g. <=7
<g0th> in one line if possible
<apeiros> a hash has only one value corresponding to a key
<apeiros> ah
<apeiros> the key must satisfy the condition
<tobiasvl> g0th: what do you mean by "add"?
<apeiros> Hash#select
<g0th> +
nomenkun has quit [Remote host closed the connection]
<g0th> the has values are numbers
<g0th> hash*
<apeiros> Hash#select to get the key/value pairs which satisfy the condition, #values & #inject to sum
Popple has joined #ruby
atno__ has joined #ruby
aagdbl1 has joined #ruby
atno has quit [Ping timeout: 248 seconds]
<g0th> has.select{|k,v| k<=7}.inject(:+)?
<g0th> hash
crunch-choco has quit [Quit: leaving]
<apeiros> you omitted the values part
<apeiros> otherwise `inject { |acc,ele|` gets [key, value] hashes yielded as `ele` param
<g0th> hmm right
<g0th> how do I do that?
<apeiros> *otherwise `inject { |acc,ele|` gets [key, value] *arrays* yielded as `ele` param
<g0th> as simple as possible
<apeiros> ?
<apeiros> you call .values before you inject
<g0th> ah of course
LMolr has quit [Read error: Operation timed out]
<g0th> thanks
<g0th> I just started to use ruby yesterday
pootler_ has quit [Ping timeout: 260 seconds]
Seb has joined #ruby
Kruppe has quit [Ping timeout: 240 seconds]
<Seb> hi fellows
aagdbl has quit [Ping timeout: 268 seconds]
brum has joined #ruby
Banistergalaxy has joined #ruby
Kruppe has joined #ruby
<Seb> is there a way with ruby to interpolate hash values in a string ? Like "${foo}" % hash or something ?
Hanmac has joined #ruby
okinomo has quit [Ping timeout: 256 seconds]
<tobiasvl> >> "#{foo}" % {:a => "a"}
<eval-in> tobiasvl => undefined local variable or method `foo' for main:Object (NameError) ... (https://eval.in/50641)
<tobiasvl> lol sorry
<apeiros> tobiasvl: %, not #
arussel` has joined #ruby
<apeiros> >> "%{foo}" % {:a => "a"}
<eval-in> apeiros => key{foo} not found (KeyError) ... (https://eval.in/50642)
<apeiros> ah lol
<apeiros> why do you use foo and pass a?
<apeiros> >> "%{foo}" % {foo: "a"}
<eval-in> apeiros => "a" (https://eval.in/50643)
mansi has joined #ruby
clocKwize has quit [Quit: Cya]
withnale has joined #ruby
<Seb> apeiros: amde-up example sorry
<tobiasvl> i was trying to do
<Seb> made*
<Seb> apeiros, tobiasvl: thanks a lot
<tobiasvl> >> foo = {:a => "a"}; puts "#{foo}"
<eval-in> tobiasvl => {:a=>"a"} ... (https://eval.in/50644)
brum has quit [Ping timeout: 248 seconds]
<arussel`> Hi, I'm a not a ruby but I need to debug some ruby app. Where can I find a tutorial on setting up good dev env ideally usign intellij ? (I want to know how to start a program, put the lib where needs to be, debug ...)
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
Xanderby has joined #ruby
threesome has quit [Ping timeout: 256 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
Afal has joined #ruby
Afal has left #ruby [#ruby]
mansi has quit [Ping timeout: 256 seconds]
Hanmac has quit [Read error: Operation timed out]
g0bl1n has joined #ruby
nanashiRei has joined #ruby
Stalkr^ has joined #ruby
Nenor has quit [Quit: Nenor]
aagdbl has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
Lauritz_ has joined #ruby
Stalkr^ has quit [Read error: Connection reset by peer]
pootler has joined #ruby
Xeago has joined #ruby
fgo has joined #ruby
Kricir has joined #ruby
mmozuras has joined #ruby
sailias has joined #ruby
Hanmac has joined #ruby
pootler_ has joined #ruby
nisstyre has quit [Quit: Leaving]
<nanashiRei> Hi, i've no idea about ruby but i get one, i guess rather small error in chef from a recipie, i fail to see what's wrong. http://pastie.org/8354164
pootler has quit [Read error: Connection reset by peer]
<nanashiRei> if someone could help me
aagdbl1 has quit [Ping timeout: 240 seconds]
KobraKao has quit [Ping timeout: 246 seconds]
Xeago has quit [Ping timeout: 245 seconds]
jbpros has joined #ruby
evelyette_ has joined #ruby
<evelyette_> hi
polysics has left #ruby [#ruby]
sailias has quit [Ping timeout: 268 seconds]
Kricir has quit [Ping timeout: 268 seconds]
justsee has quit [Ping timeout: 248 seconds]
<evelyette_> I'm getting the following error when trying to run an application: "undefined method `source_index' for Gem:Module", I'm guessing it's because the application is picking up ruby 1.9.1, which is installed in the system, but I'm using ruby 1.9.3 installed by RVM. I'm not sure how to resolve that; any ideas?
atno__ is now known as atno
pushpak has joined #ruby
arkiver has joined #ruby
ananthakumaran has joined #ruby
Domon has quit [Remote host closed the connection]
aagdbl1 has joined #ruby
Domon has joined #ruby
jbpros has quit [Client Quit]
shevy has quit [Ping timeout: 260 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
fmcgeough has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
abk has quit [Ping timeout: 252 seconds]
svector has quit [Read error: Connection timed out]
ananthakumaran1 has quit [Ping timeout: 268 seconds]
jost has joined #ruby
aagdbl has quit [Ping timeout: 245 seconds]
ananthakumaran has quit [Read error: Connection reset by peer]
Domon has quit [Ping timeout: 246 seconds]
svector has joined #ruby
Ox6abe has joined #ruby
dhruvasagar has joined #ruby
<jost> Hi! I'm trying to install some gems using the bundler, but it freezes at the "Fetching source index from https://rubygems.org/" step. The freeze seems not to be due to a long downloading time, as network utilization stays down. What could be the reason, how to solve that? Bundler version is 1.3.5, and I'm trying to fetch a single gem for a redmine plugin.
lyanchih has quit [Quit: lyanchih]
Lauritz_ has quit [Ping timeout: 268 seconds]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
nbrosnahan has quit [Quit: Textual IRC Client: www.textualapp.com]
decoponio has joined #ruby
nbrosnahan has joined #ruby
mmitchell has joined #ruby
mmitchell has quit [Remote host closed the connection]
_Minos_ has joined #ruby
OdNairy has left #ruby [#ruby]
Stalkr^ has joined #ruby
osvico has quit [Ping timeout: 240 seconds]
ewnd9 has quit [Ping timeout: 260 seconds]
ldnunes has joined #ruby
thisirs has quit [Remote host closed the connection]
dodosan has joined #ruby
brum has joined #ruby
pootler has joined #ruby
pootler_ has quit [Read error: Connection reset by peer]
chairabanta has quit [Quit: Leaving...]
lyanchih has joined #ruby
Popple has quit [Quit: Computer has gone to sleep.]
sailias has joined #ruby
shevy has joined #ruby
Popple has joined #ruby
osvico has joined #ruby
aagdbl has joined #ruby
funburn has quit [Quit: funburn]
<coderhs> hey i was trying out splat operator. and saw this issue
<coderhs> is it a bug or is it suppose to work like that
dodosan has quit [Ping timeout: 240 seconds]
gwb3 has joined #ruby
brum has quit [Ping timeout: 245 seconds]
ananthakumaran has quit [Read error: Connection reset by peer]
<coderhs> i tried it in ruby 2.0.0p0
pushpak has quit [Read error: Connection reset by peer]
tgraham has joined #ruby
pootler has quit [Read error: Connection reset by peer]
tkuchiki has quit [Remote host closed the connection]
siwica has joined #ruby
aagdbl1 has quit [Ping timeout: 240 seconds]
pootler has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
tesuji has quit [Read error: Connection reset by peer]
abk has joined #ruby
KobraKao has joined #ruby
Xeago has joined #ruby
Seb has left #ruby [#ruby]
xjiujiu has joined #ruby
svector has quit [Ping timeout: 245 seconds]
mayday_jay has quit [Quit: c ya!]
<xybre> Its supposed to work like that. What else would you expect it to do?
Popple has quit [Quit: Computer has gone to sleep.]
Bofu2U has joined #ruby
angoragoats has joined #ruby
<Dwarf> Anyone got any experience with datamapper? In some cases it fails to generate a record
Banistergalaxy has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
svector has joined #ruby
failshell has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
<jost> sorry to nag you... but do you have any hints about a slow bundle install, hanging at the "Fetching source index from https://rubygems.org/" step? It takes about 500M or memory when it hangs, and it does not seem use any network
ananthakumaran has joined #ruby
failshell has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
pranny1 has joined #ruby
pranny has quit [Read error: Connection reset by peer]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
tgraham has quit [Quit: Leaving...]
tagrudev has quit [Remote host closed the connection]
krawchyk_ has joined #ruby
siwica has quit [Ping timeout: 252 seconds]
Es0teric has joined #ruby
axsuul has quit [Ping timeout: 268 seconds]
colonolGron has quit [Ping timeout: 248 seconds]
<coderhs> xybre: well return the value even if i do not assign it to a variable
krawchyk_ has quit [Remote host closed the connection]
krawchyk has joined #ruby
graydot has quit [Quit: graydot]
lkba has quit [Ping timeout: 260 seconds]
brum has joined #ruby
lyanchih has quit [Ping timeout: 264 seconds]
enriclluelles has quit [Remote host closed the connection]
dodosan has joined #ruby
ewnd9 has joined #ruby
tacos1de has quit [Ping timeout: 240 seconds]
angoragoats has quit [Quit: angoragoats]
zodiak has quit [Ping timeout: 240 seconds]
noname001 has quit [Ping timeout: 245 seconds]
mansi has joined #ruby
IceyEC has joined #ruby
tacos1de has joined #ruby
brum has quit [Ping timeout: 246 seconds]
dodosan has quit [Ping timeout: 240 seconds]
greengriminal has quit [Quit: Leaving]
Jdubs has joined #ruby
svector has quit [Ping timeout: 240 seconds]
graydot has joined #ruby
mlpinit has joined #ruby
khushildep has joined #ruby
graydot has quit [Client Quit]
mansi has quit [Ping timeout: 256 seconds]
<evelyette_> hi, how to resolve this error: http://nopaste.me/paste/7745324685242d584901ed
mlpinit has quit [Remote host closed the connection]
svector has joined #ruby
Jdubs has quit [Remote host closed the connection]
<maasha> I am failing to understand begin/ensure/end. When is ios closed in the last example here? https://gist.github.com/maasha/e5d2f9a2cb14f925bc4c
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
<maasha> I thought it would be closed when the object went out of scope
Kricir has joined #ruby
xjiujiu has joined #ruby
<maasha> I am trying to make the filehandle close by itself no matter if it was opened in block context or not.
mlpinit has joined #ruby
osvico has quit [Ping timeout: 240 seconds]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kricir has quit [Ping timeout: 248 seconds]
angoragoats has joined #ruby
varfoo has quit [Quit: WeeChat 0.4.0]
arkiver has quit [Remote host closed the connection]
Martinez has quit [Ping timeout: 260 seconds]
kristiandelay has joined #ruby
beilabs_ has quit [Ping timeout: 246 seconds]
Martinez has joined #ruby
krawchyk has quit [Remote host closed the connection]
jimeh has quit [Ping timeout: 260 seconds]
jimeh has joined #ruby
krawchyk has joined #ruby
akemrir has joined #ruby
<maasha> hrpughmpth!#!@#
ldnunes has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
wmoxam has quit [Ping timeout: 245 seconds]
wmoxam has joined #ruby
Guest96589 has joined #ruby
wallerdev has joined #ruby
marcgg has quit [Ping timeout: 252 seconds]
mlpinit_ has joined #ruby
mlpinit has quit [Read error: Connection reset by peer]
snyp has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
mlpinit_ has quit [Read error: Connection reset by peer]
mlpinit has joined #ruby
snyp has quit [Client Quit]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
kaldrenon has joined #ruby
SHyx0rmZ has joined #ruby
mlpinit has quit [Remote host closed the connection]
mansi has joined #ruby
gyzmodo has quit []
angoragoats has quit [Quit: angoragoats]
snovak has joined #ruby
geekbri has joined #ruby
beilabs_ has joined #ruby
breakingthings has joined #ruby
brum has joined #ruby
ravster has joined #ruby
<maasha> file handle is closed as soon as it is returned: https://gist.github.com/maasha/e5d2f9a2cb14f925bc4c
marcgg has joined #ruby
mansi has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 268 seconds]
mansi has joined #ruby
polaco_zZz is now known as polaco
brum has quit [Read error: Operation timed out]
vlad_starkov has joined #ruby
svector has quit [Ping timeout: 256 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
Ox6abe has quit [Remote host closed the connection]
Lewix has quit [Ping timeout: 245 seconds]
kil0byte has joined #ruby
mengu has quit [Remote host closed the connection]
nyuszika7h has left #ruby ["WeeChat 0.4.2-rc2"]
Elhu has joined #ruby
tobago has quit [Remote host closed the connection]
tgraham has joined #ruby
tkuchiki has joined #ruby
ericmathison has quit [Ping timeout: 256 seconds]
svector has joined #ruby
kil0byte_ has quit [Ping timeout: 260 seconds]
mansi has quit [Ping timeout: 240 seconds]
nomenkun has joined #ruby
colonolGron has joined #ruby
pranny1 has quit [Quit: Leaving.]
vlad_starkov has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
banister has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
devoldmx3 has joined #ruby
enriclluelles has joined #ruby
snyp has joined #ruby
vlad_starkov has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
yekta has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
huoxito has joined #ruby
cody-- has joined #ruby
robbyoconnor has quit [Ping timeout: 268 seconds]
intuxicated has quit [Ping timeout: 245 seconds]
kobain has joined #ruby
Bira has joined #ruby
KobraKao has quit [Ping timeout: 264 seconds]
rbento has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
soba has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
KobraKao has joined #ruby
mlpinit has joined #ruby
snyp has quit [Quit: leaving]
brupeb has joined #ruby
svector has quit [Ping timeout: 268 seconds]
Cyrus has quit [Quit: Cyrus.close()]
mengu has joined #ruby
devoldmx3 has joined #ruby
brum has joined #ruby
cj3kim has quit [Ping timeout: 248 seconds]
jprovazn has quit [Quit: Leaving]
devoldmx has quit [Ping timeout: 245 seconds]
leehambley has quit [Ping timeout: 264 seconds]
jibi has joined #ruby
mephux has quit [Ping timeout: 240 seconds]
browndawg has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
Banistergalaxy has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Ping timeout: 260 seconds]
dodosan has joined #ruby
vlad_starkov has joined #ruby
axl_ has joined #ruby
Guest91445 has joined #ruby
xk_id has quit [Quit:
nanoxd has joined #ruby
alekst has joined #ruby
Banistergalaxy has joined #ruby
jerius has joined #ruby
ehc has joined #ruby
leehambley has joined #ruby
browndawg has joined #ruby
dodosan has quit [Ping timeout: 256 seconds]
Elfix_113 has quit [Quit:  ]
devoldmx3 has quit [Ping timeout: 240 seconds]
Tricon has joined #ruby
Stalkr^ has quit [Quit: Linkinus - http://linkinus.com]
kvirani has joined #ruby
gcds has joined #ruby
axl_ has quit [Quit: axl_]
duggiefresh has joined #ruby
<gcds> Hello maybe someone with ruby / c knowledge could help me with unix domain socket programming ?
<gcds> C freezes in while until I kill ruby script
_Minos_ has quit [Ping timeout: 245 seconds]
phantasm66 has joined #ruby
<gcds> stuck maybe not freezes*
devoldmx has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
JPascal has joined #ruby
JPascal has quit [Max SendQ exceeded]
Kricir has joined #ruby
Behi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JPascal has joined #ruby
JPascal has quit [Max SendQ exceeded]
<g0th> hi
axl_ has joined #ruby
JPascal has joined #ruby
julweber_ has joined #ruby
intuxicated has joined #ruby
Monie has joined #ruby
mlpinit has quit [Remote host closed the connection]
mlpinit has joined #ruby
julweber has quit [Ping timeout: 240 seconds]
<g0th> lets say I have a class Foo and for Foo objects I would like to access foo.var, what should happen if I do that is: if "var" isn't set yet it should be calculated according to a function, if it is set just return the calculated value
<lupine> attr_accessor :var ; def var ; super || ... ; end
<lupine> sort of, is
<g0th> ok
<lupine> ...h
lfox has joined #ruby
<g0th> so I have attr_accessor :var
<g0th> but I define a var function
Kricir has quit [Ping timeout: 246 seconds]
<lupine> rather than super, i'd probably actually go for @var ||= (calculate-value-here)
<lupine> aye, and the latter overrides the former
<lupine> if you're not calling super, you can just have attr_writer :var
<g0th> nice
v0n has joined #ruby
<g0th> hmm
strk has left #ruby [#ruby]
<g0th> I can't do: def var; @var || ... ?
<g0th> hmm or I guess that's what you wrote roughly?
<lupine> you could - that will recalculate the value every time
Anticom has joined #ruby
<g0th> a||b just returns a if that is set?
<g0th> so why would it recalculate?
<lupine> yes, b will never be evaluated if a is anything other than false or nil
<lupine> because a will never be set, in that fragment
bobinator60_ has joined #ruby
<g0th> aaarg
<lupine> if someone called your var = "my new value", b would stop being evaluate
<g0th> right
<lupine> ...d
siwica has joined #ruby
<g0th> thanks
<lupine> a ||= b will set a if it's not already set
<lupine> so b will only be evaluated once, until something else unsets a
<g0th> so I have to do @var ||= as you suggested
vince_prignano has quit [Ping timeout: 252 seconds]
<lupine> if the calculation is complicated, it may be worth it
jprovazn has joined #ruby
angusiguess has joined #ruby
snyp has joined #ruby
<lupine> the other thing to be aware of is that if someone does foo.var = false - they'll never see it. they'll get whatever b evaluates to instead
<lupine> to fix that, you'd need a guard variable that states whether var= has been called or not, rather than just relying on the value of var
burlyscudd has joined #ruby
vince_prignano has joined #ruby
<g0th> if someone does foo.var he gets the method or the @var?
<g0th> foo.var() method, foo.var var?
<g0th> hmm
colonolGron has quit [Ping timeout: 245 seconds]
<g0th> sorry for asking such basic questions
<lupine> there's no difference between foo.var, or foo.var() - they both return the value the def foo ... end method returns
burlyscudd has quit [Client Quit]
Emmanuel_Chanel has quit [Ping timeout: 245 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
<lupine> the attr_writer :var call creates a method like def foo=(new_val) ; @var = new_val ; end
Xeago has joined #ruby
xjiujiu has joined #ruby
<lupine> (and attr_reader does something similar, a method that just returns the value of @var )
xjiujiu has quit [Max SendQ exceeded]
snovak has joined #ruby
<g0th> ah silly me
<g0th> the outside will never get @var
<g0th> it will always get the method
<g0th> that's what the attr_... is for
xjiujiu has joined #ruby
<lupine> it could call foo.instance_variable_get("@var") - but that is evil
<g0th> now if the method gives the internal @var, fine
peregrine81 has joined #ruby
<g0th> ok thanks
cj3kim has joined #ruby
sayan has quit [Ping timeout: 246 seconds]
NinjaPenguin has joined #ruby
aagdbl has quit [Quit: Leaving.]
KobraKao has quit [Ping timeout: 252 seconds]
sambao21 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Quit: Leaving.]
KobraKao has joined #ruby
devoldmx has joined #ruby
snyp has quit [Quit: leaving]
xjiujiu has quit [Client Quit]
tatsuya_o has joined #ruby
joofsh has joined #ruby
xjiujiu has joined #ruby
nhhagen has joined #ruby
weirdpercent has joined #ruby
deception has joined #ruby
interactionjaxsn has joined #ruby
<weirdpercent> I have a unique challenge: in DOM traversal with Nokogiri, I need to select next_sibling x times, but my result is just returning the first sibling three for example
bean__ has joined #ruby
vlad_sta_ has joined #ruby
vlad_starkov has quit [Read error: No route to host]
Aryasam has joined #ruby
v0n has quit [Ping timeout: 264 seconds]
pwh has joined #ruby
codecop has quit [Remote host closed the connection]
prismate has joined #ruby
v0n has joined #ruby
Naoe-Kanno has joined #ruby
blaxter_ has quit [Quit: foo]
devoldmx3 has joined #ruby
SHyx0rmZ has quit [Ping timeout: 246 seconds]
iamjarvo has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
beilabs_ has quit [Ping timeout: 240 seconds]
pwh has quit [Client Quit]
freerobby has joined #ruby
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
evenix has joined #ruby
devoldmx has joined #ruby
xk_id has joined #ruby
h_kon has quit [Remote host closed the connection]
gwb3 has quit [Remote host closed the connection]
mansi has joined #ruby
Michae___ has quit [Remote host closed the connection]
devoldmx3 has quit [Ping timeout: 264 seconds]
burlyscudd has joined #ruby
mansi has quit [Read error: Connection reset by peer]
larissa has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
tabolario has joined #ruby
mansi has joined #ruby
aryaching has joined #ruby
lkba has joined #ruby
anonymuse has joined #ruby
<weirdpercent> how can I get "next" sibling x number of times using Nokogiri DOM traversal?
jlast has joined #ruby
Monie has quit [Read error: Connection reset by peer]
theRoUS has quit [Ping timeout: 268 seconds]
vim_shim has joined #ruby
dallasm has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
Soda has joined #ruby
gazarsgo has joined #ruby
marius has joined #ruby
akemrir has quit [Quit: WeeChat 0.4.1]
angoragoats has joined #ruby
_maes_ has joined #ruby
blackmesa has joined #ruby
senayar_ has joined #ruby
mmitchell has joined #ruby
<Hanmac> weirdpercent: call #next_sibilng in a #inject loop
johnjohnson has joined #ruby
BillCriswell has joined #ruby
anonymuse has quit [Remote host closed the connection]
beilabs_ has joined #ruby
<Hanmac> weirdpercent: there is also an #css method with this you can use the css selectors to get the siblings
senayar has quit [Ping timeout: 252 seconds]
<weirdpercent> hanman: I will try an inject loop, I am using a css selector, but rather than writing next.next.next, I want something like 3.times do .next
<weirdpercent> hanmac:
Soda has quit [Ping timeout: 264 seconds]
<Hanmac> thats why inject
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
elaptics is now known as elaptics`away
xjiujiu has joined #ruby
leehambley has quit [Ping timeout: 264 seconds]
Monie has joined #ruby
senayar_ has quit [Remote host closed the connection]
peregrine81 has quit []
senayar has joined #ruby
Anticom has quit [Quit: Nettalk6 - www.ntalk.de]
vince_prignano has quit [Remote host closed the connection]
zoee has quit [Quit: zoee]
tatsuya_o has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
weirdpercent has quit [Quit: Leaving]
tatsuya_o has joined #ruby
noop has quit [Ping timeout: 245 seconds]
fuhgeddaboudit has joined #ruby
cody-- has quit [Quit: derp]
KobraKao has quit [Ping timeout: 245 seconds]
tonni has quit [Remote host closed the connection]
bobinator60_ has quit [Quit: bobinator60_]
zarubin has joined #ruby
Soda has joined #ruby
|jemc| has quit [Ping timeout: 240 seconds]
gazarsgo has quit [Quit: gazarsgo]
x1337807x has joined #ruby
brennanMKE has joined #ruby
st0ne2th1dge has joined #ruby
<st0ne2th1dge> hey all
end_guy has quit [Remote host closed the connection]
beilabs_ has quit [Ping timeout: 248 seconds]
<st0ne2th1dge> an entry in a yaml file is causing me troubles
<st0ne2th1dge> i decided to implement a check
<st0ne2th1dge> but ruby doesnt seem to distinguish between a hash value with both key and value
<st0ne2th1dge> or only the key (in wich case it will return the key as value also)
<st0ne2th1dge> is there a way to get around this?
failshell has joined #ruby
iamjarvo_ has joined #ruby
theRoUS has joined #ruby
nouitfvf has joined #ruby
<tgraham> Can you do a pastie or gist of what you've done so we have an idea of what you're talking about?
rcedillor has joined #ruby
nikeita has joined #ruby
<st0ne2th1dge> tgraham: oki!
OdNairy has joined #ruby
dinotool has joined #ruby
mrsolo has joined #ruby
iamjarvo has quit [Ping timeout: 268 seconds]
Uranio has joined #ruby
quoin has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 260 seconds]
YaNakilon has quit [Ping timeout: 252 seconds]
Kricir has joined #ruby
pootler has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
pootler has joined #ruby
dhruvasagar has joined #ruby
pootler has quit [Read error: Connection reset by peer]
OdNairy has quit [Ping timeout: 252 seconds]
pootler has joined #ruby
anderSon has quit [Ping timeout: 240 seconds]
blackmesa has quit [Quit: WeeChat 0.4.1]
maoko has joined #ruby
xjiujiu has quit [Read error: Connection reset by peer]
lukec has joined #ruby
Kricir has quit [Ping timeout: 260 seconds]
beilabs_ has joined #ruby
YaNakilon has joined #ruby
<g0th> hi
<st0ne2th1dge> tgraham: http://pastebin.com/YBLrUL9F
<st0ne2th1dge> I gave a bit more details tehre
<tgraham> k
elaptics`away is now known as elaptics
Kelet has quit [Read error: Connection reset by peer]
s2013 has joined #ruby
Kelet has joined #ruby
OdNairy has joined #ruby
kpshek has joined #ruby
sayan has joined #ruby
<tgraham> The formatting in the mongo-c.yml is wrong.
gcds has quit [Quit: gcds]
<tgraham> Are you generating that file somehow or are you manually creating it?
<g0th> how do I get the sign of a natural number?
ananthakumaran has joined #ruby
Taranis has quit [Quit: leaving]
mengu has quit [Remote host closed the connection]
<lessless> Is it possible to set a default value for a certain key in hash arguments of a function?
Kar- has quit [Ping timeout: 240 seconds]
<tgraham> g0th: you mean +-?
<lessless> I want my constructor to accept a hash of parameters and that on of its keys has a default value
michael_mbp is now known as zz_michael_mbp
<g0th> yes
jost has quit [Remote host closed the connection]
i_s_ has joined #ruby
gcds has joined #ruby
<tgraham> g0th: you'll want to create your own methods that extend the Numeric class.
cburyta has joined #ruby
Dreamer3 has joined #ruby
<tgraham> lessless: you can it after you pass in the hash.
gcds has quit [Client Quit]
OdNairy has quit [Ping timeout: 245 seconds]
<tgraham> can set it *
<g0th> tgraham: how would I do that?
<g0th> number.zero? 0 : number/number.abs ?
<g0th> arg
<g0th> hmm
<g0th> a/b should work
<g0th> number.abs divides number so we get +-1
leehambley has joined #ruby
colonolGron has joined #ruby
<bean__> goth, i'd just check if it was less or greater than 0...
gwb3 has joined #ruby
<bean__> g0th: *
<g0th> ok
freezey has joined #ruby
<g0th> another question
mengu has joined #ruby
<g0th> if I define *() and +(), do I also get *=() and +=()?
nbrosnahan has quit [Quit: Textual IRC Client: www.textualapp.com]
_bart has joined #ruby
<st0ne2th1dge> tgraham: I am creating it myself, with the purpose of not being able to create it in the future lets say
gazarsgo has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<tgraham> st0ne2th1dge: if you're creating it yourself then you'll want to use the correct yaml syntax to actually set the key/value pair. Unless I'm misunderstanding.
devoldmx has joined #ruby
mlpinit has quit [Ping timeout: 240 seconds]
bobinator60_ has joined #ruby
<bean__> yeah, proper yaml would help
colonolGron has quit [Ping timeout: 245 seconds]
MrThePlague has joined #ruby
platzhirsch has joined #ruby
<g0th> can I do: (foo) ? bar
<g0th> or do I have to do something like: (foo) ? bar : donothing()
<g0th> nil
<bean__> that seems overly complicated
coderhs has quit [Quit: Leaving]
<st0ne2th1dge> tgraham: The reason i created the one with the faulty syntax was so i could create a check that detects faulty syntax
fourq has joined #ruby
mlpinit has joined #ruby
<st0ne2th1dge> so I can use it in a CI
nfk has quit [Read error: Connection reset by peer]
<tgraham> Ok, so you just want to validate the yaml?
dexi has joined #ruby
<tgraham> Try something like kwalify.
kevind has joined #ruby
DanKnox_away is now known as DanKnox
* bean__ is not a big fan of testing negatives
maletor has joined #ruby
khushildep has quit [Read error: Connection reset by peer]
khushildep has joined #ruby
dexi has left #ruby ["Leaving"]
toddWork_ has joined #ruby
<platzhirsch> bean__: then why not drop testing completely
<platzhirsch> err... I meant, how come?
<bean__> because, why not just test that your test /does something correctly/
cads has quit [Ping timeout: 264 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bean__> seems like overtesting to me if one of your tests is to make sure that your yaml parses correctly. Why not just test what you're going to use that yaml for
<bean__> heh
kil0byte has quit [Remote host closed the connection]
<cout> I prefer to test that my code doesn't not do something unincorrectly
<st0ne2th1dge> tgraham: yessir!
mary5030 has joined #ruby
braoru has quit [Remote host closed the connection]
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
burlyscudd has quit [Quit: Leaving.]
petey has joined #ruby
aryaching_ has joined #ruby
nikeita has quit [Quit: sleep]
burlyscudd has joined #ruby
freezey has quit [Remote host closed the connection]
gyzmodo has joined #ruby
jerius has quit [Ping timeout: 245 seconds]
Xiti has quit [Read error: Connection reset by peer]
maasha has quit [Ping timeout: 250 seconds]
nikeita has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
Xiti has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
aryaching has quit [Ping timeout: 256 seconds]
devoldmx has joined #ruby
jlast_ has joined #ruby
brum has quit [Remote host closed the connection]
jlast_ has quit [Remote host closed the connection]
brupeb has quit [Remote host closed the connection]
jerius has joined #ruby
senayar_ has joined #ruby
rhys has joined #ruby
Aryasam has quit [Ping timeout: 268 seconds]
Banistergalaxy has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
Aryasam has joined #ruby
jlast_ has joined #ruby
d2dchat has joined #ruby
GeissT has quit [Read error: Connection reset by peer]
mlpinit has quit [Read error: Connection reset by peer]
maoko has quit [Quit: Textual IRC Client: www.textualapp.com]
Aryasam has quit [Client Quit]
mlpinit has joined #ruby
codecop has joined #ruby
jlast has quit [Ping timeout: 248 seconds]
senayar has quit [Ping timeout: 260 seconds]
sevenseacat has quit [Quit: Leaving.]
alex__c2022 has joined #ruby
GregLLL has joined #ruby
au5lander has joined #ruby
persand has quit [Quit: persand]
danman has joined #ruby
pushpak has joined #ruby
dr_ has joined #ruby
ahawkins has quit [Quit: leaving]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kil0byte has joined #ruby
dr_ is now known as dr_mittens
<dr_mittens> anybody know how to speed up TCPSocket receiving?
johnnymoo_ has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
<dr_mittens> seems to be very slow compared to other clients (Scala, Python, etc)
GoldenGiant has joined #ruby
senayar_ has quit [Remote host closed the connection]
senayar has joined #ruby
<GregLLL> dr_mittens: Have you tried disabling TCP NO DELAY?
beilabs_ has quit [Ping timeout: 240 seconds]
Monie has joined #ruby
jbrechtel has joined #ruby
<GregLLL> dr_mittens: or enabling it, sorry
<dr_mittens> GregLLL: yeah - I've tried it both ways
geekbri has quit [Remote host closed the connection]
<dr_mittens> GregLLL: but I wouldn't think TCP_NODELAY would make a difference since it's receiving that's the issue
geekbri has joined #ruby
<GregLLL> dr_mittens: So the socket connection is going slow when you receive, have you also tried sending?
|jemc| has joined #ruby
<dr_mittens> GregLLL: um ... sure - sending seems to be plenty fast
theRoUS has quit [Ping timeout: 252 seconds]
Bira has quit [Remote host closed the connection]
<cout> dr_mittens: do you have a benchmark you can share?
<cout> saying something is "slow" is sort of meaningless without a good reference
<dr_mittens> cout: takes about 10 seconds to send a 100MB file, but around 90 secs to receive the same file from the same server
Speed has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dr_mittens> cout: (same server = the same server it sent to, not localhost)
MrZYX|off is now known as MrZYX
<cout> dr_mittens: that's not a benchmark...
cmarques has joined #ruby
<cout> for all we know that might be normal or it might be that your code is written in some odd way that cause the slowdown
Tarential has quit [Excess Flood]
<cout> it's just that right now the question is too broad and we don't have much to go on without just guessing
OdNairy has joined #ruby
yfeldblum has joined #ruby
Tarential has joined #ruby
<dr_mittens> cout: agreed - I'll try to fill in some more detail
s2013 has quit [Quit: Leaving]
tonni has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
st0ne2th1dge has quit [Quit: leaving]
<dr_mittens> cout: using debug messages with timestamps, I've narrowed it down to 'result = socket.read(len)' where len is 100MB
<cout> oh
joeyzou has joined #ruby
<dr_mittens> cout: using a different client (scala) the entire response is read in under 5 seconds
nari has quit [Ping timeout: 260 seconds]
<banister> waxjar what does: "op = op = op = op = op" mean? i saw that in a shop today
<dr_mittens> cout: I just can't fathom that the ruby Socket would be that much less performant than a Scala Socket
<dr_mittens> cout: both clients set SO_RCVBUF to 2MB
<davidcelis> banister: assigns `op` to itself four times
<davidcelis> i think whoever wrote that doesn't understand; four isn't special in this particular circumstance, but seven is
<banister> davidcelis unfortunately this programming language isn't ruby, it's dutch :(
burlyscudd has quit [Quit: Leaving.]
<davidcelis> wtf
<GregLLL> wat
<GregLLL> lol
<bean__> dr_mittens: and you're for sure using Socket::TCP_NODELAY?
<bean__> (on both the client and the server)
<banister> maloik ping
Kricir has joined #ruby
beilabs_ has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<dr_mittens> bean__: yeah - the server is the same for both the ruby client and the scala client so if TCP_NODELAY isn't set on the server, than I would think that would affect both clients equally
Spami has quit [Quit: This computer has gone to sleep]
senayar_ has joined #ruby
<cout> yeah I don't think nagle is the issue here
<dr_mittens> bean__: but I can see in the server code that TCP_NODELAY is set on it (server is written in scala)
havenwood has joined #ruby
<bean__> I guess I can't help without seeing code. heh
* bean__ knows scala to be fast.
<dr_mittens> bean__: totally understand about seeing the code
Macaveli has quit [Quit: Computer has gone to sleep.]
_maes_ has joined #ruby
mengu has quit [Remote host closed the connection]
senayar_ has quit [Remote host closed the connection]
seggioo has joined #ruby
cody-- has joined #ruby
senayar_ has joined #ruby
Kricir has quit [Read error: Connection reset by peer]
Kricir_ has joined #ruby
dhruvasagar has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
Monie has joined #ruby
<cout> dr_mittens: well I can't reproduce your result on localhost
brum has joined #ruby
zz_michael_mbp is now known as michael_mbp
senayar has quit [Ping timeout: 260 seconds]
monkegjinni has joined #ruby
<cout> dr_mittens: is it possible that the read on scala is returning less than 100MB?
<dr_mittens> cout: yeah - neither can I - on localhost all is great - that's what has me pulling my hair out - thanks for taking the time to try to reproduce it though
browndawg has quit [Ping timeout: 248 seconds]
codelette has joined #ruby
<dr_mittens> cout: no - we piped the output to a file and, sure enough, it was 100MB
Monie has quit [Client Quit]
anderSon has joined #ruby
sectionme has quit [Ping timeout: 260 seconds]
<cout> dr_mittens: try running strace on the ruby process and the scala process to see if there is a difference
<dr_mittens> cout: k
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
einarj has quit [Ping timeout: 256 seconds]
<cout> strace -T preferably
gwb3 has quit [Remote host closed the connection]
nfk has quit [Ping timeout: 264 seconds]
maoko has joined #ruby
OdNairy has quit [Ping timeout: 240 seconds]
bobinator60_ has quit [Quit: bobinator60_]
paolooo has quit [Ping timeout: 250 seconds]
whunt has joined #ruby
brum has quit [Ping timeout: 245 seconds]
nfk has joined #ruby
<rien> how do I write a function that creates a local variable in the caller's site?
brupeb has joined #ruby
tgraham has quit [Quit: Leaving...]
monkegjinni has quit [Remote host closed the connection]
geggam_ has joined #ruby
deception has quit [Ping timeout: 256 seconds]
mrsolo has joined #ruby
prism has joined #ruby
prism is now known as pantaloon
freezey has joined #ruby
billiam has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<jacobat> rien: I don't think you can. You can assign the return value from the method call.
_mikeg has joined #ruby
<banister> rien: you have to use https://github.com/banister/binding_of_caller
devoldmx has joined #ruby
xiphias has quit [Quit: leaving]
<cout> (which banister should be telling you not to actually do in real code)
<banister> rien but even then, you're not creating a local variable
<banister> rien you can only modify ones that already exist
xiphias has joined #ruby
jacktrick has joined #ruby
<rien> banister: yeah apparently I just found a thread explaining that even with eval("x = 1", call_site) that the rest of the code in call_site won't see x... https://www.ruby-forum.com/topic/4415408
<cout> banister: surely you can use that to create dynvars, right?
<_mikeg> need a temporary directory. was going to use mktmpdir but would like to specify where the temp dir is created. anyone know a way of doing that. seems it currently uses the system temp dir path by default
<jacobat> "Do not use this in production apps" :)
<banister> cout not in my experience
maletor has quit [Quit: Computer has gone to sleep.]
<rien> that's a real shame that local variables can't be created in macros
<cout> banister: could be that behavior changed then, or I might be remembering wrong
GoldenGiant has quit [Ping timeout: 240 seconds]
<banister> rien just use an ivar :)
momomomomo has joined #ruby
prismate has quit [Ping timeout: 256 seconds]
brianpWins has quit [Quit: brianpWins]
<cout> rien: ruby doesn't have macros :)
<Dwarf> Anyone got any experience with datamapper? In some cases it fails to generate a record for me, oddly
devoldmx3 has joined #ruby
Monie has joined #ruby
<rien> banister: I don't want to be forced to use objects right now in this particular place in my code
<banister> rien 'ivars' are not objects
<banister> they're just scoped differently to locals
<rien> banister: ivar == instance_var right?
<banister> rien yes, so they're a variable that has scope throughout the whole object, they're not objects themselves
<rien> I've never done "@x = 0" inside a function (not in a class ) to see how it behaves
jprovazn is now known as jprovazn_afk
<rien> banister: right, but there's no object here, so what happens?
Emmanuel_Chanel_ has joined #ruby
alup has quit [Quit: Leaving]
<banister> rien i think you're pretty confused...
GoldenGiant has joined #ruby
<banister> rien there's always an object
<rien> banister: my file.rb has 5 def my_method... not inside a class. I want to create vars/ivars inside each def... metaprogrammatically. I'm not confused.
<banister> rien but i think i have an idea what you're trying to do, but still you should probably state exactly the problem you're trying to solve
<_mikeg> figured it out
<banister> rien then it's inside the 'main' object
Emmanuel_Chanel_ has quit [Max SendQ exceeded]
Bira has joined #ruby
katsrc has joined #ruby
<rien> banister: then that's a problem because I want the scope of those vars restricted to inside each def.... is that impossible?
Emmanuel_Chanel_ has joined #ruby
browndawg has joined #ruby
devoldmx27 has joined #ruby
<banister> rien if those are top-level defs, and you're invoking them only at top-level, then the @ivar will be stored on main, and accessed on main
Coffers has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
devoldmx has quit [Read error: Connection reset by peer]
browndawg has quit [Max SendQ exceeded]
St_Marx has quit [Ping timeout: 240 seconds]
<rien> banister: let me write a bit of code to show you what I'm trying to do
x1337807x has joined #ruby
axl_ has quit [Quit: axl_]
<shevy> rien you can use local variables inside a method, but if you use @vars, then they are available in your class
devoldmx3 has quit [Ping timeout: 240 seconds]
<rien> shevy: I have no class
browndawg has joined #ruby
<shevy> the code you show has only method calls
Monie has quit [Client Quit]
zarubin has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has quit [Ping timeout: 268 seconds]
<rien> shevy: they're not methods, they're functions.
browndawg has quit [Max SendQ exceeded]
<shevy> there are no "functions", these are attached to Object
zmike123 has joined #ruby
Xeago has quit [Remote host closed the connection]
<rien> shevy: right, I want to ignore that fact because I don't want those functions to share any scope.
JumpMast3r has quit [Quit: JumpMast3r]
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
<shevy> that code is very odd
<shevy> does it work?
<rien> shevy: even using objects wouldn't help me as I would still want the vars inside each method to not be shared beyond the methods' scopes
<shevy> save_statement(vendor_id, invoice_date)
<rien> shevy: it doesn't because I don't know how to write params and check
<shevy> I dont see from where vendo_id comes
<shevy> *vendor_id
deception has joined #ruby
ssvo has joined #ruby
<rien> shevy: 'check' should instantiate vendor_id
<rien> as a local var
<shevy> a local var won't be shared
<rien> shevy: give me a minute, I'll make it clearer
vince_prignano has joined #ruby
browndawg has joined #ruby
dinotool has quit [Ping timeout: 250 seconds]
browndawg has quit [Max SendQ exceeded]
<rien> (the comment)
<shevy> aha
Emmanuel_Chanel_ is now known as Emmanuel_Chanel
browndawg has joined #ruby
<shevy> rien the only way how this could work, if you do not use @ivars, would be by mhaving the method pass in those variables
<rien> I'm not trying to do anything crazy here. this is basic stuff in other languages that allow metaprogramming
browndawg has quit [Max SendQ exceeded]
<shevy> another way could be to instead use vendor_id as a method call that will return the value
hashpuppy has joined #ruby
intuxicated has quit [Remote host closed the connection]
<shevy> see, get() is a method call
<rien> shevy: I'm not opposed to any alternative solution, but whatever I create inside the scope where params was called has to remain there and should not be shared beyond that scope
<shevy> do/end is almost the same as {}
noop has joined #ruby
maletor has joined #ruby
<banister> rien it's not possible to do it
siwica has quit [Ping timeout: 252 seconds]
aryaching_ has quit [Ping timeout: 245 seconds]
Bira has quit [Ping timeout: 246 seconds]
browndawg has joined #ruby
maveonair has joined #ruby
<rien> shevy: I understand how sinatra works and ruby's OO. my questions here are purely about its metaprogramming capabilities.
<shevy> btw rien
<rien> banister: any way around it while still keeping the created vars/ivars inside that scope only?
<shevy> so in save_statement() you initialize vendor_id?
dzhulk has quit [Quit: Leaving.]
<rien> I don't mind using ivars or methods or whatever, I just can't have the things I'm created be visible beyond the scope they were created in
<rien> shevy: give me a minute to answer that with more comments :)
proxie has quit []
<shevy> well the thing is
<shevy> I am not sure I understand the intent of your code, even if it is pseudo-code
<platzhirsch> Sometimes I am doubting myself... I used pry-debugging so vividly, but for out of the stand Ruby testing I fired up irb and not pry...
<shevy> you send in two arguments
<shevy> def save_statement(vendor_id, invoice_date)
<cout> rien: you could do this if ruby had macros, but it doesn't. some people have tried to add them (e.g. see rubymacros), but they're not much more than an experiment afaik
<shevy> then you suddenly have a hardcoded name:
<shevy> check :vendor_id
nikeita has quit [Quit: sleep]
plotter has quit [Read error: Connection reset by peer]
mzdravkov has joined #ruby
geekbri has quit [Remote host closed the connection]
<waxjar> banister: literally it means gone = gone, they're selling all they've got in stock, (usually) at a discount
<rien> shevy: hopefully that'll make my intent clearer
<banister> rien you could just set them as methods
<rien> banister: can you show me?
<shevy> ok so you basically want to pull out a value from a hash and set corresponding local variables from that
<rien> yes!
geekbri has joined #ruby
geekbri has quit [Remote host closed the connection]
proxie has joined #ruby
moli has quit [Read error: Connection reset by peer]
<shevy> if it would be an instance variable, it would be so much easier... with .instance_variable_get :P
moli has joined #ruby
<shevy> I think that is also the first time I heard someone want to do that
GoldenGiant has quit [Quit: Computer has gone to sleep.]
<banister> rien sure, just set them as attr_accessors on the singleton class of main, and just assign to them
<rien> shevy: then you'd have to show me how to make one ad hoc throw-away class each time paramaterize is called... because instance variables are visible through all methods in an object and I want to restrict the scope to the call site
<banister> rien self.vendor_id = 123456
<jacobat> Why are you trying to make life so difficult?
<rien> banister: but then in my other `get '/something_else'` route if it also takes vendor_id then I'm screwed?
T_T has joined #ruby
<shevy> I think there is no programmatic way to create local variables in ruby
<shevy> perhaps through some way to eval() perhaps
<banister> rien no it'll just overwrite it, you only want to use the value for the lifetime of a method right? so it's no issue if it gets overwritten in another method, unless you have multiple threads
<GregLLL> cout: You suggest that dr_mittens do a strace -T, what values would you look for in there to tell you what may be going on?
robert__ is now known as robert_
__username__ has joined #ruby
GoldenGiant has joined #ruby
<cout> GregLLL: a large number of read() syscalls maybe
sambao21 has quit [Quit: Computer has gone to sleep.]
<banister> rien and even if you do have multiple threads, you could just use thread local storage
<rien> banister: yes only the lifetime of the method. ok I can go with that. I need a bit more help on how to do it but let me phrase my next question...
alekst has quit [Quit: Leaving...]
<banister> rien so the 'params' method is setting the methods?
<|jemc|> speaking of thread locals, does anyone know if there are thread-local equivalents for the post-Regexp-match global variables for captures like $1, $2, etc?
duggiefresh has quit [Remote host closed the connection]
<rien> shevy: you mean the second answer with 6 votes right?
<shevy> yeah
<shevy> but that sucks still
<shevy> he uses eval() twice ...
<cout> banister: oh interesting, dynvars are set by index now instead of by nae
mlpinit has quit [Ping timeout: 256 seconds]
<cout> name
<rien> shevy: just because he wants to, no? couldn't I concat them all in one call?
maveonair has quit [Ping timeout: 256 seconds]
<shevy> you mean two statements in one eval() ?
kil0byte has quit [Remote host closed the connection]
julweber_ has quit [Remote host closed the connection]
<banister> shevy rien that code won't work outside of irb
<banister> at least in ruby 1.9+
<shevy> rien yeah, it can be shortened
<banister> i think it used to work in 1.8
<shevy> eval "t=2;t", IRB.conf[:MAIN_CONTEXT].workspace.binding
<GregLLL> cout: I'm new to strace, is it normal for a lot of time spent in "futex"?
<shevy> rien but that still sucks really ...
<shevy> looking at that makes me angry
<cout> GregLLL: depends on what you mean by "a lot"
ravster has left #ruby [#ruby]
sambao21 has joined #ruby
<cout> GregLLL: that might be the GVL or it might be something else
geekbri has joined #ruby
<mzdravkov> hey guys, I was thinking it would be nice to have such method in Object: https://gist.github.com/mzdravkov/6701867 Is there something like that already done, that I can't find? Do you like it? I think it is more pleasant that long method call chains, what do you think?
maoko has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cout> banister: one _could_ free the DFP and create a new one with all the dynvars plus the one you want to add :)
<GregLLL> cout: This was what I got: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 94.34 9.269501 3048 3041 48 futex
<shevy> rien seems it does not work in real ruby code at all :(
pellenation has joined #ruby
<cout> GregLLL: yeah that sounds like a lot
jprovazn_afk has quit [Ping timeout: 245 seconds]
<rien> shevy: aww...
maveonair has joined #ruby
<rien> shevy: I'm going to try and do it the way banister recommended
toastynerd has joined #ruby
<cout> GregLLL: do you know if the code is using threads?
bartocc has quit [Quit: bartocc]
burlyscudd has joined #ruby
<GregLLL> cout: No its single threaded
IceDragon has joined #ruby
toastynerd has quit [Client Quit]
devoldmx27 has quit [Read error: Connection reset by peer]
<IceDragon> morning!
devoldmx has joined #ruby
toastynerd has joined #ruby
<shevy> fire on the IceDragon, hurry!
<IceDragon> D:
<IceDragon> Y
<cout> GregLLL: well that futex is almost certainly the problem and it's almost certainly a bug. are you using the latest ruby and a recent kernel?
jacktrick has quit []
Lewix has joined #ruby
<IceDragon> I just realized, my little cpu won't be very useful... 64kb of ram is not much to work with..
chrisja has joined #ruby
theRoUS has joined #ruby
<cout> 64 kilobits should be enough for anybody
lukec has quit [Quit: lukec]
katsrc has quit [Ping timeout: 252 seconds]
<IceDragon> I was thinking of strapping an 8 bit display to it.
<IceDragon> 240x120 pixels
<GregLLL> cout: No Im on ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]
<GregLLL> cout: and RHEL 6.4 2.6.32-358.11.1.el6.x86_64
<shevy> IceDragon is that pixel potato?
kil0byte has joined #ruby
<cout> GregLLL: should be recent enough but I would try the latest just to see if anything changes
<IceDragon> I have no idea
<GregLLL> cout: So would you suggest I try ruby 2.0 then?
joeyzou has quit [Remote host closed the connection]
GoldenGiant has quit [Quit: Computer has gone to sleep.]
<IceDragon> After I got the Parser/Lexer working I was thinking of extensively testing my lil processor
<cout> GregLLL: no, the latest 1.9.3
digital-ghost has joined #ruby
pleal has joined #ruby
maveonair has quit [Ping timeout: 268 seconds]
pellenation has quit [Quit: Leaving.]
Dave has joined #ruby
<cout> p448
dangerousdave has quit [Read error: Connection reset by peer]
GoldenGiant has joined #ruby
Dave is now known as Guest62473
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
soheil has joined #ruby
whunt has quit [Quit: Computer has gone to sleep.]
<cout> GregLLL: also if you can come up with a small test case, you can submit a bug report
aganov has quit [Remote host closed the connection]
amsi has joined #ruby
sepp2k has joined #ruby
billiam has quit [Changing host]
billiam has joined #ruby
<GregLLL> cout: Cool, I will do some more investigation and see if that high % of futex happens consistently
<GregLLL> cout: I'll also update to 448
adkron has joined #ruby
Spami has joined #ruby
<shevy> rien I think sometimes ruby can be a bit limited. what you could always do is, though, create and remove methods on the fly. so, vendor_id could be a method call, that looks like an instance variable, and exists only as long as def foo (its parent method) is called, then it is removed
GoldenGiant has quit [Ping timeout: 245 seconds]
vince_prignano has quit [Ping timeout: 245 seconds]
schaerli has quit [Remote host closed the connection]
zeade has joined #ruby
huoxito_ has joined #ruby
vince_prignano has joined #ruby
maveonair has joined #ruby
nomenkun_ has joined #ruby
iamjarvo has joined #ruby
nomenkun_ has quit [Remote host closed the connection]
nomenkun has quit [Read error: Connection reset by peer]
blaxter_ has joined #ruby
nomenkun has joined #ruby
<cout> shevy: I like that idea
katsrc has joined #ruby
Nogbit has joined #ruby
<rien> shevy: I'm interested in that. I don't know how to do that last part "then it is removed"
huoxito has quit [Read error: Operation timed out]
<rien> shevy: because now that I think about it, I want to avoid banister's ivar suggestion because it could introduce subtle bugs by making variables available that shouldn't be
<shevy> I am not sure myself hehehe, I never had a need to have volatile, short-lived methods...
Rix has quit [Ping timeout: 264 seconds]
<shevy> but there is remove_method
iamjarvo_ has quit [Ping timeout: 248 seconds]
<rien> shevy: well I'm sure that should be possible to do, I'll just have to look at my metaprogramming book I just bought (Perrotta's)
chairabanta has joined #ruby
<banister> rien what kind of bugs?
<rien> shevy: but what I mean is, that's a good idea, and thanks for it :)
kaspergrubbe has quit [Remote host closed the connection]
<rien> banister: in some other method, if I don't do paramaterize :vendor_id, I could still have a vendor_id ivar that was set from some other method that was called first
jinie has quit [Ping timeout: 260 seconds]
ghr has quit [Quit: Computer has gone to sleep.]
<banister> rien but that method would have cleared out that ivar before it's used/re-set
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dallasm has quit []
abk has quit [Read error: Operation timed out]
dkamioka has joined #ruby
quoin has joined #ruby
mikecmpbll has joined #ruby
<banister> rien in order for that method to use that ivar, then it has to run a method which updates it, and in the process of updating it, if no new value is available, it can just clear it out
burlyscudd has quit [Quit: Leaving.]
lfox has quit [Quit: ZZZzzz…]
<rien> banister: only if I do parameterize :vendor_id, right? but if I don't call parameterize then won't I still have a vendor_id ivar? if not, then I'd need to see an example because I'm missing something
pel_daniel has joined #ruby
<banister> that way you avoid old data
<rien> banister: right tight, what I mean is if I don't call that method
rbento has quit [Quit: ZZZzzz…]
Falcore has joined #ruby
<banister> rien then that's a bug in that method itself, it shouldn't be trying to access vendor_id until it's called params, surely?
nomenkun has quit [Ping timeout: 240 seconds]
dzhulk has joined #ruby
<rien> banister: yes it would be a bug in that method itself, however it would be a very hard bug to track
jlast_ has quit [Remote host closed the connection]
<banister> rien not that hard, certainly not hard enough to cause you avoid using this approach IMO
<banister> rien also you could metaprogram those methods so that they *always* do a 'params'
camilasan has quit [Remote host closed the connection]
<banister> like a before_filter in rails
bradhe has joined #ruby
mikecmpbll has quit [Client Quit]
apeiros has quit [Remote host closed the connection]
IcyDragon has joined #ruby
browndawg has quit [Ping timeout: 245 seconds]
Monie has joined #ruby
<rien> banister: ok, could you do a rough sketch on top of this so I can see it? https://gist.github.com/peternmr/8a5195d13f482d08b799
jlast has joined #ruby
<IcyDragon> >.>
IceDragon has quit [Ping timeout: 245 seconds]
Nogbit has quit [Quit: Leaving.]
iamjarvo has quit [Remote host closed the connection]
<banister> rien btw you could avoid all this trouble by just going: vendor_id, invoice_date = parameterize :vendor_id, :invoice_date
<banister> rien but you don't like that API or sth?
Elhu has quit [Quit: Computer has gone to sleep.]
Nogbit has joined #ruby
iamjarvo has joined #ruby
ujjain has quit [Ping timeout: 264 seconds]
<banister> rien since you're doing it inside the 'get' you would have to use whatever sinatra api offers you in terms of a before_filter, i don't use sinatra that much so i don't know what it would be :)
brum has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
Bira has joined #ruby
<banister> rien or you could even do: parameterize :vendor_id, :invoice_date do |vendor_id, invoice_date| … end
tewmten has quit [Ping timeout: 245 seconds]
<rien> banister: true, that's a nice suggestion. I don't dislike that api, I dislike the repetition it forces me to write. (don't worry about sinatra's before, I was only asking for a sketch of how to write `parameterize` to instantiate the ivars)
<GregLLL> cout: While I'm compiling the newest ruby, do you have any ideas what else could be causing the "slowness" in this situation?
mengu has joined #ruby
jlast has quit [Remote host closed the connection]
<GregLLL> cout: or any other tricks to try to identify where the bottleneck/problem may be
<banister> rien is that block form ok?
<dr_mittens> cout: GregLLL has taken up the charge for me while I eat my soup
<banister> rien that would expose vendor_id etc as locals to the block
jlast has joined #ruby
sailias has quit [Ping timeout: 248 seconds]
<rien> banister: I know how to make that block form work, I was trying to not say the variable names twice, but I guess I'll have to take that hit because eliminating that repetition looks too daunting... plus there wouldn't be too many params per request anyway
<havenwood> GregLLL: What is slow on 2.0.0p247 in particular? Can you show the code?
joofsh has quit [Ping timeout: 245 seconds]
<banister> rien yeah, we also have this repetition in ruby a lot, which is similar: def initialize(x, y); @x = x; @y =y ; end
zeel has quit [Quit: loren_the_dude]
germanstudent has joined #ruby
<banister> rien we just put up with that repetition :)
fmcgeough has joined #ruby
<GregLLL> havenwood: Oh sorry we aren't on 2, we are testing socket receive on 1.9.3p429
kpshek has quit []
<havenwood> GregLLL: Latest stable Ruby is 2.0.0. Latest Ruby is 2.1.0-preview1. :P
julweber has joined #ruby
<rien> banister: ok, I'll put up with it :)
Rix has joined #ruby
Nisstyre-laptop has joined #ruby
<GregLLL> havenwood: cout suggested updating to p448 so that is what I am doing now
dhruvasagar has quit [Ping timeout: 246 seconds]
<jokke> hey i want to do something weird with a raketask
kpshek has joined #ruby
<rien> banister: do I have to use your binding_of_caller to access the params variable from within the parameterize function so that I can access its keys?
pleal has quit [Remote host closed the connection]
<havenwood> GregLLL: Sockets are slow on 1.9 for you? Is there a little snippet of code that recreates issue or more intertwined?
brum has quit [Ping timeout: 240 seconds]
<banister> rien alternatively you could pass in a hash that you mutate to store those values
<jokke> i have a task that has another task as a dependency and always passes the same parameter to the dependent task how should i do this?
<banister> rien parameterize :vendor_id, :blah, my_hash
<banister> rien and you get back a my_hash with :vendor_id and :blah keys
<havenwood> GregLLL: 2.0.0-p247 is stable, same problem there?
<banister> but you'd have to define the hash before the method call
<jokke> right now i have something like this: task :build, [:environment] => (COMMON_DEPS + ['optimizer:optimize[store]']) do |task, args|
<banister> rien wait you can do what rails does
<jokke> but that does not work
<jokke> Don't know how to build task 'optimizer:optimize[store]'
<GregLLL> havenwood: I haven't tried it, that's on the list of things to try, we aren't sure if its a ruby bug
<banister> rien have a semi-global @params method, and the parameterise just updates that hash automatically
sarlalian has joined #ruby
<GregLLL> havenwood: here is a snippet that one of my co-workers posted earlier https://gist.github.com/anonymous/6701398
<GregLLL> havenwood: takes around 90 seconds to download a 100mb file
rbento has joined #ruby
hpekdemir has joined #ruby
rbento has quit [Max SendQ exceeded]
<hpekdemir> hi can somebody have a look at this please? http://nopaste.info/3a745aa835.html
<hpekdemir> ruby 1.9.3p0, Rails 3.2.13, Bundler version 1.3.5, gem1.8.11 here.
<banister> rien so when you go: parameterise :vendor_id, :blah it'll automatically update a params hash that stores those values. You can get sinatra to clear it out at the start of every request
<jokke> i can call optimizer:optimize[store] from the commmand line though
TheRealPygo is now known as pygospa
<banister> rien i would be surprised if sinatra doesn't have something like that already
paolooo has joined #ruby
chairabanta has quit [Quit: Leaving...]
<havenwood> GregLLL: Reading 4 bytes at a time? That seems tiny to me, but i haven't had coffee and just glanced at the code.
quoin has quit [Ping timeout: 252 seconds]
chairabanta has joined #ruby
Kricir_ has quit [Remote host closed the connection]
<jokke> anyone?
<havenwood> GregLLL: Is this fast in other languages or just done in shell? :O
Speed has quit [Ping timeout: 260 seconds]
<dr_mittens> havenwood: the first 4 bytes is an int32 that represents the total length of the message
devoldmx has quit [Read error: Connection reset by peer]
<rien> banister: I like that semiglobal idea, let me work on it a bit and then I'll show you, thanks so much
devoldmx has joined #ruby
<havenwood> dr_mittens: oh, gotcha - then len is read
<dr_mittens> havenwood: right
<dr_mittens> havenwood: and the scala client is plenty fast
<banister> rien rails has a bunch of those hashes that have different levels of scope/extent. params is cleared out at the end of every request, session is cleared out at the end of every session, etc
troessner has quit [Quit: Leaving]
<dr_mittens> havenwood: but we've got to integrate this gem with existing Ruby code
freezey has quit [Remote host closed the connection]
<rien> banister: I didn't know that, TIL :)
<rien> banister: sinatra's before filter is just called before ;)
<banister> rien cool
<havenwood> dr_mittens: the scala version reads in a chunk of the whole file size as well?
Kricir has joined #ruby
iamjarvo has quit [Remote host closed the connection]
julweber has quit [Ping timeout: 245 seconds]
sarlalian has quit [Quit: WeeChat 0.4.1]
sarlalian has joined #ruby
<dr_mittens> havenwood: I believe so ... I'd have to check again, but we've tried it both ways - one read(len) vs looping through and read(chunk_size) until done - neither way was appreciably faster than the other
<havenwood> dr_mittens: hrm
xk_id has quit [Quit:
gwb3 has joined #ruby
cody-- has quit [Quit: derp]
browndawg has joined #ruby
jefflyne1 has joined #ruby
dodosan has joined #ruby
whunt has joined #ruby
gcds has joined #ruby
VTLob has joined #ruby
freezey has joined #ruby
axl_ has joined #ruby
zmike123 has quit [Quit: ~]
gwb3 has quit [Ping timeout: 245 seconds]
lukec has joined #ruby
vince_prignano has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
callenb has left #ruby [#ruby]
jerius has quit [Ping timeout: 245 seconds]
iliketurtles has joined #ruby
_maes_ has joined #ruby
gcds has quit [Ping timeout: 268 seconds]
Faris has joined #ruby
gcds has joined #ruby
carraroj has joined #ruby
Faris has quit [Quit: Changing server]
senayar_ has quit [Read error: Operation timed out]
gwb3 has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jerius has joined #ruby
<havenwood> dr_mittens: Is?: socket.class #=> TCPSocket
brianpWins has joined #ruby
sectionme has joined #ruby
amnay has joined #ruby
sailias has joined #ruby
<dr_mittens> havenwood: I can check, but it's Socket.new(:INET, :STREAM) which I believe returns TCPSocket
<havenwood> yup, it does
Nogbit has quit [Ping timeout: 252 seconds]
<havenwood> err, well it doesn't actually return a TCPSocket but basically constructing your own from what i understand
gyre007 has joined #ruby
lessless has quit [Quit: I'm using a Free IRC Bouncer from BNC4FREE - http://bnc4free.com/]
i_s_ has quit [Remote host closed the connection]
rupee has joined #ruby
paolooo_ has joined #ruby
enriclluelles has quit [Remote host closed the connection]
sectionme has quit [Ping timeout: 264 seconds]
jerius has quit [Ping timeout: 246 seconds]
paolooo_ has quit [Client Quit]
ssvo_ has joined #ruby
ssvo has quit [Ping timeout: 256 seconds]
aaroncm_ has quit [Ping timeout: 256 seconds]
paolooo_ has joined #ruby
tgraham has joined #ruby
gwb3 has quit [Remote host closed the connection]
paolooo_ has quit [Client Quit]
diegoviola has joined #ruby
Kar- has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
paolooo has quit [Ping timeout: 250 seconds]
aaroncm has joined #ruby
devoldmx has joined #ruby
fflush has joined #ruby
banister has quit [Read error: Connection reset by peer]
<fflush> bonjour
au5lander has quit [Quit: Page closed]
<jokke> bonsoir
<havenwood> dr_mittens: and pretty similar bad performance with a loop of something like #readpartial(1024 * 16) too?
io_syl has joined #ruby
cburyta has quit [Remote host closed the connection]
sailias has quit [Ping timeout: 260 seconds]
brennanMKE has quit [Remote host closed the connection]
banisterfiend has joined #ruby
<fflush> ca va?
jerius has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dr_mittens> havenwood: yeah - I've even tried looping sysread(so_rcvbuf_size)
<jokke> oui ca va bien, et toi?
paolooo has joined #ruby
<fflush> pas mal, merci
<havenwood> dr_mittens: gunna go grab coffee but i may try recreating, i'd be curious if you have same issue on 2.0, but no clue
<dr_mittens> havenwood: it's pretty crazy - I can set the so_rcvbuf to 50MB and I still only see ~2MB/sec transfer rate
<havenwood> dr_mittens: shouldn't be that slow!
rdark has quit [Quit: leaving]
<banisterfiend> dr_mittens are you a real dr
dankest has joined #ruby
pantaloon is now known as prismate
<dr_mittens> banisterfiend: I'm a real mitten, anyway
mengu has quit [Remote host closed the connection]
<banisterfiend> k00
gcds_ has joined #ruby
<havenwood> dr_mittens: long shot but any difference if you disable nagle algorithm on socket server? hrm
maveonair has quit [Ping timeout: 256 seconds]
<dr_mittens> havenwood: yeah - forgot to mention, but TCP_NODELAY Is set on the server (server is written in scala)
mzdravkov has left #ruby [#ruby]
<dr_mittens> havenwood: thanks for the good input though - we may have to try ruby 2 and see what happens
machuga is now known as machuga|away
machuga|away is now known as machuga
prism has joined #ruby
i_s has joined #ruby
gcds has quit [Ping timeout: 252 seconds]
gcds_ is now known as gcds
prism is now known as Guest23238
apeiros has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
MrThePlague has quit [Remote host closed the connection]
paolooo has quit [Quit: Page closed]
prismate has quit [Ping timeout: 240 seconds]
Nisstyre-laptop is now known as nisstyre
paolooo has joined #ruby
Guest23238 is now known as prismate
Nogbit has joined #ruby
jerius has quit [Ping timeout: 260 seconds]
prismate is now known as pantaloon
kaldrenon has quit [Remote host closed the connection]
Monie has joined #ruby
jerius has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
kaldrenon has joined #ruby
devoldmx has joined #ruby
iliketurtles has joined #ruby
Kar- has quit [Ping timeout: 245 seconds]
saarinen has joined #ruby
pootler has quit [Ping timeout: 245 seconds]
tylersmith has joined #ruby
schaerli has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
katsrc has quit [Read error: Connection reset by peer]
kaldrenon has quit [Ping timeout: 240 seconds]
dash_ has joined #ruby
cody-- has joined #ruby
dash_ is now known as d45h
cody-- has quit [Max SendQ exceeded]
huoxito__ has joined #ruby
seanmccann has joined #ruby
jerius has quit [Ping timeout: 252 seconds]
cody-- has joined #ruby
sailias has joined #ruby
ColKurtz has joined #ruby
pantaloon is now known as prismate
bradhe has quit [Remote host closed the connection]
jerius has joined #ruby
carraroj has quit [Ping timeout: 252 seconds]
vince_prignano has joined #ruby
bradhe has joined #ruby
mengu has joined #ruby
yxhuvud has quit [Quit: Nettalk6 - www.ntalk.de]
<GregLLL> cout: Hey I updated to 448 and reran the 100MB file with strace and got this result with -c flag: https://gist.github.com/anonymous/6702941
huoxito_ has quit [Ping timeout: 264 seconds]
kpshek has quit []
pushpak has quit [Read error: Connection reset by peer]
nikeita has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yxhuvud has joined #ruby
pootler has joined #ruby
malkomalko has joined #ruby
T_T has quit [Read error: Connection reset by peer]
stkowski has joined #ruby
Monie has joined #ruby
geekbri has quit [Remote host closed the connection]
kpshek has joined #ruby
ssvo_ is now known as ssvo
nomenkun has joined #ruby
codelette has quit [Remote host closed the connection]
kaldrenon has joined #ruby
mlpinit has joined #ruby
lessless has joined #ruby
bradhe_ has joined #ruby
huoxito__ has quit [Quit: Leaving]
iliketurtles has quit [Quit: zzzzz…..]
elaptics is now known as elaptics`away
bradhe has quit [Read error: Connection reset by peer]
T__T has joined #ruby
enriclluelles has joined #ruby
BlakeRG has joined #ruby
<BlakeRG> hey everyone, odd question but i am forming an LLC and i need a name, i figured i'd just throw together a couple of programming terms and call it a day, suggestions?. Figure i'll just compile a list of words and mix 'em up
OdNairy has joined #ruby
<apeiros> BlakeRG: there are bullshit bingo generators out there
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
pootler has quit [Ping timeout: 256 seconds]
malkomalko has quit [Remote host closed the connection]
<apeiros> also: Compu-Global-Hyper-Mega-Net
paolooo has quit [Quit: Page closed]
burlyscudd has joined #ruby
<GregLLL> BlakeRG: method madness
<BlakeRG> nice one GregLLL
interactionjaxsn has quit [Remote host closed the connection]
khushildep has quit [Ping timeout: 245 seconds]
GoldenGiant has joined #ruby
interactionjaxsn has joined #ruby
Elfix has joined #ruby
gwb3 has joined #ruby
zeade has quit [Ping timeout: 256 seconds]
<havenwood> BlakeRG: Trailing Whitespace, LLC
zeade has joined #ruby
Uranio has quit [Read error: Connection reset by peer]
<BlakeRG> havenwood: lmao
<BlakeRG> im seriously putting these on my list too
felixjet has joined #ruby
burlyscudd has quit [Ping timeout: 246 seconds]
<havenwood> TwoSpaceSoftTab, LLC
jerius has quit [Ping timeout: 264 seconds]
felixjet__ has quit [Ping timeout: 248 seconds]
<dr_mittens> BlakeRG: why not combine random words from astronomy and physics?
momomomomo has quit [Quit: momomomomo]
<BlakeRG> dr_mittens: that would work too
<dr_mittens> BlakeRG: First choice: Uranus Hertz
vince_prignano has quit [Remote host closed the connection]
brum has joined #ruby
<GregLLL> hahaha
kil0byte has quit [Remote host closed the connection]
c0rn has joined #ruby
abk has joined #ruby
* BlakeRG writes down "Uranus Hertz"
<havenwood> Freedom Patch, LLC
abk has quit [Read error: Connection reset by peer]
interactionjaxsn has quit [Ping timeout: 268 seconds]
bklane has joined #ruby
RDash is now known as RDash[AW]
<dr_mittens> method missing :name on "LLC"
fgo has quit [Remote host closed the connection]
<havenwood> hah
browndawg has quit [Ping timeout: 246 seconds]
quoin has joined #ruby
<BlakeRG> havenwood: this is good
adkron has quit [Ping timeout: 260 seconds]
iliketurtles has joined #ruby
hpekdemir has left #ruby [#ruby]
adkron has joined #ruby
brum has quit [Ping timeout: 260 seconds]
tatsuya_o has quit [Remote host closed the connection]
deception has quit [Ping timeout: 245 seconds]
<havenwood> Robert'); DROP TABLE Companies;--, LLC
<BlakeRG> YES!
<BlakeRG> LOL yeah i've seen that one, freggin awesome
kennyvb_ has quit [Quit: ZNC - http://znc.in]
<atmosx> anyone doing tests on HAML/sinatra?
nikeita has quit [Quit: sleep]
duggiefresh has joined #ruby
kennyvb has joined #ruby
siwica has joined #ruby
quoin has quit [Ping timeout: 240 seconds]
gwb3 has quit [Remote host closed the connection]
snyp has joined #ruby
nikeita has joined #ruby
razi has quit [Ping timeout: 245 seconds]
T_T has joined #ruby
T__T has quit [Read error: Connection reset by peer]
sailias has quit [Ping timeout: 240 seconds]
jerius has joined #ruby
<YaNakilon> tests are for noobs
<atmosx> this code seems a little repetitive, can I make it more DRY? https://gist.github.com/atmosx/6703291
<atmosx> YaNakilon: no shit
nisstyre has quit [Quit: Leaving]
cburyta has joined #ruby
amnay has quit [Ping timeout: 256 seconds]
Nogbit has quit [Read error: Operation timed out]
Es0teric has joined #ruby
<YaNakilon> tests are in nature the trying to compensate and hide the lack of professionality
Stalkr^ has joined #ruby
<atmosx> YaNakilon: but I'm not a professional, so I'm okay with TDD.
amnay has joined #ruby
Voodoofish430 has joined #ruby
jinie has joined #ruby
<YaNakilon> non-professionals shouldn't write production code
atno is now known as atnoFood
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<atmosx> YaNakilon: good to know.
ujjain has joined #ruby
<havenwood> atmosx: no need to feed #split the ' ', it is already the default arg
atnoFood is now known as atno|AFK
mengu has quit [Remote host closed the connection]
theRoUS has quit [Ping timeout: 246 seconds]
<atmosx> havenwood: ah nice, had no idea.
RichardBaker has joined #ruby
Stalkr_ has quit [Ping timeout: 256 seconds]
tewmten has joined #ruby
mengu has joined #ruby
enricllu_ has joined #ruby
rezzack has joined #ruby
zz_tsykoduk is now known as tsykoduk
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
graft has quit [Ping timeout: 240 seconds]
freezey has quit [Read error: Connection reset by peer]
Taranis has joined #ruby
toah has joined #ruby
browndawg has joined #ruby
tsykoduk has quit [Quit: ZNC - http://znc.in]
mistertim has joined #ruby
enriclluelles has quit [Ping timeout: 252 seconds]
pushpak has joined #ruby
chairabanta has quit [Quit: Leaving...]
freezey has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
gwb3 has joined #ruby
<Eiam> YaNakilon: ... lol
Monie has joined #ruby
jerius has quit [Read error: Operation timed out]
graft has joined #ruby
zarubin has joined #ruby
mengu has quit [Remote host closed the connection]
gwb3 has quit [Remote host closed the connection]
momomomomo has joined #ruby
dangerousdave has joined #ruby
tsykoduk has joined #ruby
Guest62473 has quit [Read error: Connection reset by peer]
DanKnox is now known as DanKnox_away
Nogbit has joined #ruby
mansi has quit [Read error: Connection reset by peer]
jaimef has quit [Excess Flood]
mansi has joined #ruby
<dr_mittens> atmosx: you could do a case(line[/(server|cipher|port/])
<Eiam> atmosx: not sure how valuable the 3 values are but
<apeiros> YaNakilon: a professional who thinks tests are only for those lacking professionalism shouldn't write production code.
chairabanta has joined #ruby
<atmosx> dr_mittens: very nice, I was trying to figure it out how to use case :-) thanks.
<dr_mittens> atmosx: never mind - that would only give the first one
sailias has joined #ruby
<Eiam> atmosx: not ( %w{server cipher port} & line).empty? ) ? result = line.split.first : ''
<Eiam> I wouldn't do a ternary there it was just so i could make it one line in irc
<atmosx> Eiam: that looks neat, I'll test it.
<atmosx> oh okay
<Eiam> but concept is the same
tonni has quit [Ping timeout: 246 seconds]
<atmosx> my arabic food just got home! yummy!
nikeita has quit [Quit: sleep]
<Eiam> I don't get why you optionally set 3 different values
Tearan has joined #ruby
<dr_mittens> atmosx: (the if statements will set each variable if the test is true - case would just set the variable for the first test that is true)
<Eiam> because that means you have to optionally check all 3 values
<YaNakilon> apeiros you never make sense
cj3kim has quit [Ping timeout: 240 seconds]
freezey has quit [Read error: Connection reset by peer]
<Eiam> YaNakilon: he makes perfect sense. your lines about testing are inane
<atmosx> Eiam: what do you mean? I'm trying to read them all in one sweep avoiding regexp
maveonair has joined #ruby
<apeiros> YaNakilon: and you're still either a troll or clueless.
<czhang> are you sure he's not a chatbot?
brum has joined #ruby
<Eiam> atmosx: well you COULD set network, cypher and port, you COULD set network but not cypher or port.. and so on
<atmosx> Eiam: that's an openconf.conf several lines, each line 'option value'
freezey has joined #ruby
<banisterfiend> apeiros sup stefan
carlyle has joined #ruby
<YaNakilon> there are too many php-in-past kids in ruby community
<Eiam> atmosx: which means later you'll have to figure out IF you set any or all of those values or what
<YaNakilon> they have no clue in programming
jaimef has joined #ruby
<atmosx> Eiam: not sure I'm following.
<apeiros> YaNakilon: so I gather you're one of them?
<Eiam> atmosx: what my example will do is say if the line contains ANY server, cipher or port, then split that line and pull the first value.
<YaNakilon> apeiros your jokes are from kindergarned style
<YaNakilon> that just proves
<apeiros> I take that as a "yes"
v0n has quit [Ping timeout: 264 seconds]
<Eiam> YaNakilon: seriously. you lose. stop!
<platzhirsch> What's up
<YaNakilon> or it's just buttgurt - it also has such an effect, that butthurted can't think up anything smart
<Eiam> atmosx: its not regex, its a set intersection
Kricir has quit [Remote host closed the connection]
<atmosx> Eiam: how will ruby know which keyword to bind to which variable, the order might be random
<apeiros> banisterfiend: the trolls are loose, run for cover ;-)
<platzhirsch> Send them to the mine for work
<Eiam> atmosx: well, thats what I was saying, is there a promise that all 3 values will exist?
<Eiam> if so you should read all 3 lines in at once
Asterism has joined #ruby
joofsh has joined #ruby
<banisterfiend> YaNakilon sup
<atmosx> Eiam: well yes, sure. All these values are needed, the only the changes from file to file is the order.
sailias has quit [Ping timeout: 248 seconds]
freezey has quit [Read error: Connection reset by peer]
GoldenGiant has quit [Quit: Computer has gone to sleep.]
<Eiam> oh..
freezey has joined #ruby
mistertim has quit [Quit: Changing server]
GoldenGiant has joined #ruby
schaerli has quit [Remote host closed the connection]
pushpakrangaiah has joined #ruby
<Eiam> and a line will only ever have one value?
<Eiam> e.g. if you hit server, you won't hit cipher or port?
nemesit|znc has quit [Read error: Operation timed out]
pskrz has joined #ruby
<atmosx> Eiam: yes
<apeiros> atmosx: will it contain only those 3 values? and will all 3 always be present? (just in any order)?
<atmosx> it's like: server 10.0.0.1\nport 8890\ncipher AES-CBC-256\n etc...
pushpak has quit [Ping timeout: 256 seconds]
brum has quit [Ping timeout: 240 seconds]
heidi has joined #ruby
pushpakrangaiah has quit [Client Quit]
Asterism has left #ruby ["Leaving"]
pushpak has joined #ruby
<apeiros> Hash[config.scan(/^(sever|port|cipher) (.*)$/)]
* Eiam stares
<b00stfr3ak> do you guys like using print,puts or printf? I guess it depends on the task but just interested.
<apeiros> >> config = "server 10.0.0.1\nport 8890\ncipher AES-CBC-256\n"; Hash[config.scan(/^(sever|port|cipher) (.*)$/)]
<eval-in> apeiros => {"port"=>"8890", "cipher"=>"AES-CBC-256"} (https://eval.in/50678)
<atmosx> b00stfr3ak: puts then printf if I need %0.2f/etc.
<Eiam> b00stfr3ak: logger.send =)
<apeiros> b00stfr3ak: generally puts. rarely printf.
<dr_mittens> atmosx: if a line will only ever have one value, then you can use the case statement I posted earlier
<yxhuvud> I never use printf, but the other is useful. as is %.
<YaNakilon> armies of monkeys, that doesn't care about learning to program - they think that existance of millions of bugs is ok in software, and that it's not their problem
pwh has joined #ruby
<atmosx> dr_mittens: I'll check both your and apeiros solutions thanls :-)
<YaNakilon> every hour spent on thinking up testcases could be spent on learning and getting skill
<YaNakilon> but no, brain work is too hard for them
<Eiam> what are you on about, seriously?
<YaNakilon> that's why apeiros would never grow up
<Eiam> I have never met an engineer that wasn't appreciative of QA
<platzhirsch> very entertaining... not
devoldmx has quit [Read error: Connection reset by peer]
GoldenGiant has quit [Ping timeout: 245 seconds]
<apeiros> YaNakilon: dangerous grounds. cut back the insults or you're gone. that's the only warning.
<Eiam> for engineers that don't have the luxury of QA, tests help provide confidence when making major refactors that things still work
<dr_mittens> atmosx: you'll have to add the when "server", when "cipher", etc statements
devoldmx has joined #ruby
<YaNakilon> "stop butthurt me, that's a warning"
<apeiros> atmosx: fix my typo then. I wrote sever instead of server.
gwb3 has joined #ruby
<atmosx> dr_mittens: yeah I can do that.
Kricir has joined #ruby
nemesit|znc has joined #ruby
<yxhuvud> eiam: I see them as complementary - tests are still needed even if you have QA.
<Eiam> apeiros: regex at the start of the string, look for any of these values... then hell if i know
<YaNakilon> Eiam why to do the refacting, in which you are not confident?
<Eiam> YaNakilon: bye
mogpt has joined #ruby
lfox has joined #ruby
zeade has quit [Quit: Leaving.]
<Eiam> yxhuvud: sure... it seems to vary by organization.. some teams are pretty strict about tests, some teams choose to spend their time on other things and let QA sort out the changes
benzocoumaran35 has quit [Ping timeout: 252 seconds]
dzhulk has quit [Quit: Leaving.]
<Eiam> I've seen plenty of things make it by tests, but its always nice to have an engineer not send you something thats blatantly and obviously broken if they'd only looked (or had tests)
<apeiros> Eiam: sorry, missed that you were looking for an explanation. trolls are annoyingly distracting :)
<apeiros> >> config = "server 10.0.0.1\nport 8890\ncipher AES-CBC-256\n"; config.scan(/^(server|port|cipher) (.*)$/)
<eval-in> apeiros => [["server", "10.0.0.1"], ["port", "8890"], ["cipher", "AES-CBC-256"]] (https://eval.in/50679)
<apeiros> scan with captures will return an array of arrays, the inner arrays being the captures
<Eiam> I'm reading on tubular but I don't get how (.$) works.. capture everything that matches from the end of the line?
<b00stfr3ak> cool, Yeah I was looking for a way to format output to the screen or a file dynamically. I tried to use \t but that didn't work very well.
benzocoumaran35 has joined #ruby
<apeiros> and Hash[ary_of_ary] creates a hash from key/value tuples
<Eiam> rubula
<Eiam> apeiros: I meant the regex ;)
<apeiros> oh
dbjeepn has joined #ruby
dbjeepn has left #ruby [#ruby]
<apeiros> match any of those words, then match a space, then any amount of any character (except newline) and then end of line
duggiefr_ has joined #ruby
toah has quit [Ping timeout: 240 seconds]
nomenkun has quit [Ping timeout: 245 seconds]
<apeiros> basically: match the rest of the line
alex__c2022 has quit [Quit: alex__c2022]
schaerli has joined #ruby
Falcore has quit [Quit: Falcore]
YaNakilon has quit [Quit: Íå ñòîèò ðàññêàçûâàòü âñåãî ñðàçó. Ïîòîìó ÷òî íåäîñêàçàííîñòü - îíà êàê...]
v0n has joined #ruby
nbouscal has quit [Ping timeout: 256 seconds]
petey has quit [Remote host closed the connection]
nbouscal has joined #ruby
alex__c2022 has joined #ruby
gwb3 has quit [Read error: Connection reset by peer]
gwb3 has joined #ruby
soheil has quit [Read error: Connection timed out]
ner0x has joined #ruby
duggiefresh has quit [Ping timeout: 268 seconds]
maveonair has quit [Ping timeout: 240 seconds]
soheil has joined #ruby
<Eiam> ahhh
OneMT has joined #ruby
<Eiam> yes yes
newUser1234 has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
chairabanta has quit [Quit: Leaving...]
<Eiam> heh that guy started priv messaging me =(
Hanmac has quit [Quit: Leaving.]
<Eiam> trying to offer me advice about programming
<Eiam> apeiros: thanks
<apeiros> yw
<apeiros> YaNakilon?
<apeiros> I'm somewhat surprised he didn't start spamming my pm…
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
evelyette_ has quit [Read error: Connection reset by peer]
<OneMT> I'm expect my rescue on JSON::ParserError to move the => e to a error_dir. But I'm getting a TypeError, https://gist.github.com/OneMT/61f1d0062d44fcde16f5. I have a pathname set for error_dir.
evelyette_ has joined #ruby
<apeiros> OneMT: uh, no, that's not how that works
petey has joined #ruby
<apeiros> FileUtils.mv is to move a file/directory in your filesystem. your `e` is not a string referring to a file/directory. it's an exception.
<OneMT> So I should say FileUtils.mv (file), error_dir?
<OneMT> do *
devoldmx has quit [Read error: Connection reset by peer]
<OneMT> s/say/do
<apeiros> do you have a file? I don't think you do…
devoldmx has joined #ruby
<banisterfiend> apeiros what's up now stefan
<apeiros> you could write the exception out into a file, but you'd still need a filename. Example: File.write("exceptionfilename.txt", "#{e.class}: #{e.message}\n#{e.backtrace.join("\n")}")
bean__ has quit [Quit: Computer has gone to sleep.]
GoldenGiant has joined #ruby
<Eiam> yeah that guy, yanakilon
<apeiros> banisterfiend: trolls no longer loose. you can get out of cover.
KobraKao has joined #ruby
pushpak has quit [Read error: Connection reset by peer]
Guest96589 has quit [Remote host closed the connection]
<apeiros> banisterfiend: what's up in your galaxy?
obs has quit [Read error: Connection reset by peer]
obs has joined #ruby
schaerli has quit [Remote host closed the connection]
zeade has joined #ruby
gcds has quit [Read error: Connection reset by peer]
<OneMT> apeiros, Can I move the file that fires the rescue? Or will that just begin to move all my files after the rescue fures?
<apeiros> o0
<apeiros> OneMT: what the heck are you trying to achieve by that?
cburyta has quit [Remote host closed the connection]
gwb3 has quit [Remote host closed the connection]
breakingthings has quit []
cburyta has joined #ruby
cj3kim has joined #ruby
<banisterfiend> apeiros learning rails and drinking beer
<apeiros> or maybe: what do you consider "the file that fires the rescue"? the ruby script? or are you parsing a json file and you mean that?
pushpak has joined #ruby
gcds has joined #ruby
iliketurtles has joined #ruby
freezey has quit [Remote host closed the connection]
<OneMT> I want to move the parsing json file that fires the rescue.
freezey has joined #ruby
<OneMT> I'm parsing several json files I want to move one if it fires the rescue.
jerius has joined #ruby
<apeiros> ok. the `=> e` means ruby will write the raised exception into the local variable `e`. that has nothing to do with the json file you're reading.
carraroj has joined #ruby
breakingthings has joined #ruby
<apeiros> so yes, you'll have to pass the path to the json file you're reading to FileUtils.mv
<OneMT> Certainly you explained that very well.
Nogbit has quit [Quit: Leaving.]
greenride has joined #ruby
<OneMT> Ok, thank you apeiros.
Kricir has quit [Remote host closed the connection]
bean__ has joined #ruby
<apeiros> yw
Nogbit has joined #ruby
dr_mittens has quit [Ping timeout: 250 seconds]
schaerli has joined #ruby
einarj has joined #ruby
siwica has quit [Quit: siwica]
platzhirsch has left #ruby [#ruby]
x1337807x has joined #ruby
robert_ has quit [Read error: Connection reset by peer]
blaxter_ has quit [Quit: foo]
browndawg has quit [Quit: Leaving.]
quoin has joined #ruby
GoldenGiant has quit [Quit: Computer has gone to sleep.]
platzhirsch has joined #ruby
GoldenGiant has joined #ruby
<platzhirsch> How cool is that.. %i{black coffee} => [:black, :coffee] ?
evelyette_ has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
evelyette_ has joined #ruby
<apeiros> I love it
<apeiros> and I hate it, everytime I have to use 1.9, that is
<Eiam> platzhirsch: about as cool as %w{a b c}
whowantstolivefo has joined #ruby
<platzhirsch> I will switch to literal notation to generate symbols if they contain a dot
dbjeepn has joined #ruby
<platzhirsch> because I think :"record.groups" is awful
jb41 has joined #ruby
einarj has quit [Ping timeout: 260 seconds]
nfk has quit [Quit: yawn]
<Eiam> >>%i{record.groups}
<eval-in> Eiam => [:"record.groups"] (https://eval.in/50683)
kirun has joined #ruby
<Eiam> >>%i{record\ groups}
<eval-in> Eiam => [:"record groups"] (https://eval.in/50684)
<Eiam> seems fine =)
bradhe_ has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
KobraKao has quit [Ping timeout: 248 seconds]
pushpak_ has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
quoin has quit [Ping timeout: 260 seconds]
devoldmx has joined #ruby
pushpak has quit [Ping timeout: 264 seconds]
GoldenGiant has quit [Ping timeout: 245 seconds]
Targen has joined #ruby
dbjeepn has quit [Read error: Connection reset by peer]
schaerli has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
freezey has quit [Ping timeout: 264 seconds]
evelyette_ has quit [Remote host closed the connection]
evelyette_ has joined #ruby
mklappst_ has joined #ruby
maveonair has joined #ruby
Kar- has joined #ruby
stkowski has quit [Ping timeout: 256 seconds]
BlakeRG has left #ruby [#ruby]
mklappstuhl has quit [Ping timeout: 256 seconds]
pr0ggie has quit [Read error: Operation timed out]
dbjeepn has joined #ruby
Naoe-Kanno has quit [Quit: ネウロイを負かさなきゃならないね]
pr0ggie has joined #ruby
Nisstyre-laptop has joined #ruby
maveonair has quit [Ping timeout: 260 seconds]
randomautomator has quit [Remote host closed the connection]
Macaveli has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Monie has joined #ruby
allsystemsarego has quit [Quit: Leaving]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
stkowski has joined #ruby
Lauritz_ has joined #ruby
freezey has joined #ruby
vim_shim_ has joined #ruby
GoldenGiant has joined #ruby
Nisstyre-laptop is now known as nisstyre
v0n has quit [Ping timeout: 248 seconds]
pushpak_ has quit [Quit: Linkinus - http://linkinus.com]
Monie has quit [Ping timeout: 260 seconds]
tkuchiki has quit [Remote host closed the connection]
evelyette_ has quit [Read error: Connection reset by peer]
evelyette_ has joined #ruby
dzhulk has joined #ruby
WillAmes has joined #ruby
mansi has quit [Read error: Connection reset by peer]
soheil has quit [Read error: Connection timed out]
mansi has joined #ruby
NinjaPenguin has quit [Ping timeout: 245 seconds]
rupee has quit [Quit: Leaving]
soheil has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
fcahoon has joined #ruby
fcahoon has quit [Client Quit]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
GoldenGiant_ has joined #ruby
gener1c has joined #ruby
gener1c has quit [Changing host]
gener1c has joined #ruby
petey_ has joined #ruby
GoldenGiant has quit [Ping timeout: 240 seconds]
noop has quit [Ping timeout: 252 seconds]
RichardBaker has quit [Quit: RichardBaker]
brum has joined #ruby
rupee has joined #ruby
rupee has quit [Client Quit]
<gener1c> if i would like to make a p2p program , how could i split the file in to chunks and combine the chunks back again to reform the file ?
blaxter_ has joined #ruby
petey has quit [Ping timeout: 240 seconds]
Nogbit has quit [Quit: Leaving.]
<gener1c> simply read(chunk_size) write(chunk_size) ? and if so how can i keep track of which chunk is which?
GoldenGiant_ has quit [Client Quit]
<apeiros> why do you have to keep track?
GoldenGiant_ has joined #ruby
<gener1c> because i am going to get different chunks from different peers
<gener1c> like bittorrent
dankest has quit [Quit: dankest]
interactionjaxsn has joined #ruby
<apeiros> ok, in that case: why do you reinvent the wheel?
<gener1c> humz... to learn i guess
dankest has joined #ruby
_Minos_ has joined #ruby
<apeiros> and how to identify it: send the index of the chunk
<gener1c> oh
<onewheelskyward> and a checksum.
<gener1c> so its like in c , there is an index
<onewheelskyward> file checksum and chunk checksum.
DanKnox_away is now known as DanKnox
<gener1c> crc checksum
<gener1c> to check its not corrupt
pellenation has joined #ruby
brum has quit [Ping timeout: 248 seconds]
<apeiros> I'd assume malicious modifications, and then crc is not a good fit.
<gener1c> md5?
rgbdev has joined #ruby
<apeiros> broken, outdated.
<apeiros> sha1 at least
<gener1c> k
Nogbit has joined #ruby
GoldenGiant_ has quit [Read error: Connection reset by peer]
GoldenGiant__ has joined #ruby
cj3kim has quit [Ping timeout: 245 seconds]
snyp has quit [Quit: "bbl"]
BizarreCake has quit [Ping timeout: 245 seconds]
v0n has joined #ruby
jerius has quit [Ping timeout: 252 seconds]
freezey has quit [Remote host closed the connection]
mayorga has joined #ruby
cj3kim has joined #ruby
petey has joined #ruby
_bart has quit [Remote host closed the connection]
devoldmx3 has joined #ruby
i_s has quit [Remote host closed the connection]
gwb3 has joined #ruby
jerius has joined #ruby
Nogbit has quit [Quit: Leaving.]
pootler has joined #ruby
rgbdev has quit [Ping timeout: 264 seconds]
mayorga has quit [Max SendQ exceeded]
codezombie has joined #ruby
intuxicated has joined #ruby
deception has joined #ruby
d45h has quit [Ping timeout: 240 seconds]
iliketurtles has quit [Quit: zzzzz…..]
devoldmx has quit [Ping timeout: 256 seconds]
pootler has quit [Read error: Connection reset by peer]
pootler_ has joined #ruby
petey_ has quit [Ping timeout: 256 seconds]
sayan has quit [Ping timeout: 256 seconds]
ewnd9 has quit [Ping timeout: 245 seconds]
prism has joined #ruby
prism is now known as pantaloon
theRoUS has quit [Ping timeout: 252 seconds]
gwb3 has quit [Remote host closed the connection]
cj3kim has quit [Remote host closed the connection]
rafaelcgo has joined #ruby
Jdubs has joined #ruby
evelyette_ has quit [Read error: Connection reset by peer]
gwb3 has joined #ruby
<rafaelcgo> guys, im developing a gem that has another gem dependencies.. whenever I try to install it with the local file, in a empty gemset, I get Unable to resolve dependencies:, Gem::DependencyError … how can I make the gem install the dependencies first, just like any other gem ?
Macaveli has quit [Quit: Computer has gone to sleep.]
prismate has quit [Ping timeout: 240 seconds]
blaxter_ has quit [Quit: foo]
evelyette_ has joined #ruby
randomnick_ has joined #ruby
Nenor has joined #ruby
pootler_ has quit [Read error: Connection reset by peer]
dsferreira has joined #ruby
pootler has joined #ruby
jbrechtel has quit [Ping timeout: 256 seconds]
<dsferreira> join /#ruby-on-rails
<rafaelcgo> It isnt a Rails issue..
<dsferreira> sorry
petey has quit [Read error: Connection reset by peer]
<dsferreira> just trying to connect to rails irc
<rafaelcgo> let me try #rubygems :)
alex__c2022 has quit [Quit: alex__c2022]
<Morrolan> The / belongs at the very beginning, dsferreira. ;)
<Morrolan> And I *think* the channel is #rubyonrails, no dashes.
<dsferreira> yeah
petey has joined #ruby
marius has quit [Quit: oh nooo]
alex__c2022 has joined #ruby
Advocation has joined #ruby
justsee has joined #ruby
<rafaelcgo> Morrolan: yeap, no dashes
soheil has quit [Read error: Connection timed out]
<atmosx> rafaelcgo: can you show your gemspec?
decoponio has quit [Quit: Leaving...]
<rafaelcgo> atmosx: sure, lemme gist it
<atmosx> rafaelcgo: actually how are you trying to create the gem? There are some programs which give you the skeleton, or a DSL to create teh gem.
quique has joined #ruby
<quique> I have this template: http://pastebin.com/i1JwcPkH which gives me each member on it's own line. Is there a way to change the delimiter so it's a space instead of a new line?
dash_ has joined #ruby
<atmosx> I wrote a gem some time back in order to distribute a script I wrote actually.. more easily and I don't recall having any sort of issues with dependencies
axl_ has quit [Quit: axl_]
soheil has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
axl_ has joined #ruby
Kricir has joined #ruby
pootler has quit [Read error: Connection reset by peer]
freezey has joined #ruby
pootler has joined #ruby
<atmosx> rafaelcgo: I used this https://github.com/technicalpickles/jeweler
RDash[AW] is now known as RDash
<atmosx> it's pretty straight forward
havenwood has quit [Remote host closed the connection]
<rafaelcgo> atmosx: I'm using Bundler
havenwood has joined #ruby
newUser1234 has quit [Ping timeout: 264 seconds]
petey has quit [Ping timeout: 264 seconds]
ColKurtz has quit [Quit: Textual IRC Client: www.textualapp.com]
<atmosx> rafaelcgo: seems pretty much okay
kvirani has quit [Remote host closed the connection]
<Morrolan> The version requirements probably conflict with something specified by one of those gems.
<Morrolan> I'd assume the error message should contain more information? Else just try removing the fixed versions one by one.
<atmosx> yeah that's what I thugh too, try removing the versoins
petey has joined #ruby
dash_ has quit [Ping timeout: 248 seconds]
kvirani has joined #ruby
kvirani has quit [Read error: Connection reset by peer]
Jdubs has quit [Remote host closed the connection]
kvirani has joined #ruby
Kricir has quit [Ping timeout: 268 seconds]
dash_ has joined #ruby
einarj has joined #ruby
<rafaelcgo> Morrolan: just updated the gist with the error…
brum has joined #ruby
pootler has quit [Read error: Connection reset by peer]
<rafaelcgo> If I install all gem dependencies, one by one, using the version on the gemspec, everything goes ok
pootler has joined #ruby
<rafaelcgo> do I need any kind of special command to make the dependencies to be installed first and then my gem ?
<Morrolan> No.
<Morrolan> Remove the version requirements one by one, and try to install it.
<rafaelcgo> k
newUser1234 has joined #ruby
<Morrolan> Actually, '--local' might not fetch gems from a remote.
Soda has quit [Ping timeout: 240 seconds]
colonolGron has joined #ruby
<Morrolan> What's the reason for you using it?
brennanM_ has joined #ruby
Fire-Dragon-DoL has joined #ruby
stkowski has quit [Ping timeout: 248 seconds]
quoin has joined #ruby
gwb3 has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
<rafaelcgo> same error
amsi has quit [Ping timeout: 256 seconds]
sniffingcats has joined #ruby
<Morrolan> Without '--local', too?
<rafaelcgo> I thought —local was the flag needed to make rubygems not try to fetch my gem from a external server
brum has quit [Ping timeout: 264 seconds]
<rafaelcgo> Morrolan: lemme check that right now
<Morrolan> If you specify a local file, it'll install the local file.
<Morrolan> No need for --local for that. :)
<rafaelcgo> wow
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rafaelcgo> it works
<rafaelcgo> Morrolan: thx...
<Morrolan> :)
<rafaelcgo> I hate when I have these dumb assumptions
pootler_ has joined #ruby
newUser1234 has quit [Ping timeout: 240 seconds]
newUser1234 has joined #ruby
<sniffingcats> how to get name of an index in associative array? like meh = foo["bar"] = 123, and how to print "bar" from meh?
RichardBaker has joined #ruby
a1ph4g33k has joined #ruby
pr0ggie has quit [Ping timeout: 268 seconds]
RichardBaker has quit [Client Quit]
Xiti` has joined #ruby
quoin has quit [Ping timeout: 248 seconds]
justsee has quit [Ping timeout: 245 seconds]
RichardBaker has joined #ruby
byprdct has joined #ruby
<Morrolan> Can you rephrase that?
<a1ph4g33k> Good afternoon all.
<Morrolan> Above assignment seems a tad odd.
quique has left #ruby ["Leaving"]
_Minos_ has quit [Ping timeout: 245 seconds]
<sniffingcats> oh, nvm me
mr`jones has joined #ruby
randomautomator has joined #ruby
<Morrolan> Okay.
mr`jones has left #ruby [#ruby]
Xiti has quit [Ping timeout: 240 seconds]
pootler has quit [Ping timeout: 256 seconds]
devoldmx3 has quit [Ping timeout: 248 seconds]
andynu has joined #ruby
pootler_ has quit [Read error: Connection reset by peer]
pootler has joined #ruby
alvaro_o_ has joined #ruby
alvaro_o_ has quit [Read error: Connection reset by peer]
Jdubs has joined #ruby
pr0ggie has joined #ruby
kay__ has joined #ruby
__userna1 has joined #ruby
randomnick_ has quit [Read error: Connection reset by peer]
kay_ has quit [Read error: Connection reset by peer]
<mnemon> sniffingcats: meh.keys ?
devoldmx has joined #ruby
tgraham has quit [Quit: Leaving...]
randomautomator has quit [Read error: No route to host]
__username__ has quit [Ping timeout: 240 seconds]
robustus has quit [Ping timeout: 264 seconds]
dbjeepn has quit [Quit: Leaving...]
momomomomo has quit [Quit: momomomomo]
robustus has joined #ruby
tvw has quit []
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
Bira has quit [Remote host closed the connection]
swordsmanz has quit [Read error: Connection reset by peer]
stkowski has joined #ruby
pootler has quit [Read error: Connection reset by peer]
swordsmanz has joined #ruby
pootler has joined #ruby
cj3kim has joined #ruby
momomomomo has joined #ruby
<gf3> sniffingcats: Also we call them Hashes in rubby :)
k610 has joined #ruby
pwh has quit [Quit: pwh]
rupee has joined #ruby
Bira has joined #ruby
<Morrolan> Well, in PHP they're actually associative arrays, no hash under the hood.
<Morrolan> And I guess that's his background.
stkowski_ has joined #ruby
rupee has quit [Client Quit]
moli has quit [Read error: Connection reset by peer]
mark_locklear has joined #ruby
madhatter has quit [Ping timeout: 268 seconds]
rickmasta has joined #ruby
stkowski has quit [Ping timeout: 248 seconds]
stkowski_ is now known as stkowski
<apeiros> there are Array#assoc and #rassoc, though
madhatter has joined #ruby
postmodern has joined #ruby
jbrechtel has joined #ruby
pootler has quit [Read error: Connection reset by peer]
pootler has joined #ruby
graft has quit [Read error: No route to host]
<gf3> apeiros: Indeed, I've never seen it used in practice though
<shevy> in php you can do function foo() and which is the same as function FOO()
<apeiros> me neither
<shevy> it really simplified things, did it not? :)
<gf3> Let's just not talk about PHP
<apeiros> seconded
diegoviola has quit [Ping timeout: 268 seconds]
aliesky has joined #ruby
benzocoumaran35 has quit [Ping timeout: 264 seconds]
<Morrolan> Heh.
<aliesky> hello everybody
madhatter has quit [Read error: Operation timed out]
<gf3> Hello… Dr. Nick?
<aliesky> how I can run a php script from ruby and store the result in an array?
sambao21 has quit [Quit: Computer has gone to sleep.]
<Morrolan> Speaking of the devil.
<Morrolan> Run it through the PHP interpreter, capture stdout (or wherever the results go to), and convert into an array in a sensible way?
<aliesky> syntax please?
mercwithamouth has joined #ruby
madhatter has joined #ruby
bean__ has quit [Quit: Computer has gone to sleep.]
<apeiros> output = `php your.php`
<aliesky> so simple?
<sniffingcats> dunno why I like %x{} more :>
<aliesky> now, the php script return an array, it will stored as array as well?
<Morrolan> That's the first two steps. How simple or complex the 'converting to array' is will depend on the PHP script.
<Morrolan> No.
pootler has quit [Read error: Connection reset by peer]
Ripp__ has joined #ruby
<apeiros> aliesky: a shell script *can't* return
<apeiros> so it can't return an array either
<apeiros> all it can do is *output* (aka: print)
<Morrolan> The PHP script will have to print to stdout, write to a file, or something similar.
<apeiros> and that's always a string
<apeiros> you can make your php output something which can be parsed as an array.
<apeiros> e.g. JSON
<apeiros> or YAML
cburyta has quit [Remote host closed the connection]
<apeiros> or any other sensible serialization format.
<aliesky> ah I see, let me try
dallasm_ has joined #ruby
<shevy> could be worse
pootler has joined #ruby
ColKurtz has joined #ruby
<shevy> he could want to call a ruby script from a php script :-)
lurch_ has quit [Ping timeout: 245 seconds]
Hanmac has quit [Quit: Leaving.]
newUser1234 has quit [Ping timeout: 245 seconds]
Galgorth has quit [Ping timeout: 264 seconds]
newUser1234 has joined #ruby
Falcore has joined #ruby
momomomomo has quit [Quit: momomomomo]
nisstyre has quit [Quit: Leaving]
brum has joined #ruby
sambao21 has joined #ruby
julweber has joined #ruby
jonathanwallace has quit [Ping timeout: 245 seconds]
<atmosx> d
pootler has quit [Read error: Connection reset by peer]
pootler has joined #ruby
<shevy> e
<Morrolan> g
St_Marx has joined #ruby
mlpinit has quit [Ping timeout: 245 seconds]
pootler has quit [Client Quit]
timonv has quit [Remote host closed the connection]
Galgorth has joined #ruby
brum has quit [Ping timeout: 246 seconds]
julweber has quit [Ping timeout: 245 seconds]
<shevy> Morrolan you are out!
<onewheelskyward> php.rb
<Morrolan> Dang. Was never too good at this. :/
epta has quit [Ping timeout: 240 seconds]
<atmosx> onewheelskyward: that's a disgrace
bean__ has joined #ruby
theRoUS has joined #ruby
<Morrolan> rb.php?
mac___ has joined #ruby
<Morrolan> pry.php. :D
* Morrolan ducks
epta has joined #ruby
<atmosx> Okay, I think I'll stop now, since I've reach the point where I need to implement CSS3, I can move on to the next project.
<atmosx> lol
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgbdev has joined #ruby
<shevy> ack
KobraKao has joined #ruby
Nogbit has joined #ruby
apeiros has quit [Remote host closed the connection]
momomomomo has joined #ruby
prism has joined #ruby
apeiros has joined #ruby
prism is now known as Guest69754
<aliesky> no luck :-(
tonni has joined #ruby
<Morrolan> 'No luck' is horribly indescriptive.
<Morrolan> How are you attempting to share information, currently?
<aliesky> no output stored in the var :-(
zacts has joined #ruby
<Morrolan> If you do output = `some shell command`, then output will contain whatever went to stdout.
sailias has joined #ruby
<Morrolan> And stderr too, probably. In the case of your PHP script this'll be whatever you printed.
<aliesky> the php script is printing something like this 'dir1,dir2,dir3' but i can't store it in a var from ruby, i think it's not exeuting the script, but no errors either
kyllesdk has joined #ruby
kyllesdk has quit [Client Quit]
rbennacer has joined #ruby
<rbennacer> hey guys
<rbennacer> how is this possible
<rbennacer> 1.9.3p448 :016 > url
<rbennacer> => "localhost:3000"
<rbennacer> 1.9.3p448 :017 > url =~ /localhost/i
<rbennacer> => 0
atmosx has quit [Ping timeout: 240 seconds]
pantaloon has quit [Ping timeout: 245 seconds]
<Morrolan> 0 is truth-y.
<Morrolan> (And indicates the index of the first match)
<rbennacer> ?
<Morrolan> 0, in this case, means "match found at index 0"
nisstyre has joined #ruby
<Morrolan> If it doesn't match, it'll probably return 'nil'.
<Morrolan> >> "localhost:3000" =~ /foobar/
<eval-in> Morrolan => nil (https://eval.in/50705)
<rbennacer> 1.9.3p448 :022 > url =~ /grt/i
<rbennacer> => nil
<Morrolan> Yea.
<rbennacer> you are right sir
<rbennacer> thank you very much
<Morrolan> :)
<Morrolan> Keep in mind that, in Ruby, everything except 'nil' and 'false' are truth-ish values.
<rbennacer> i tend to forget this very often
<rbennacer> :)
prism1 has joined #ruby
atmosx has joined #ruby
<aliesky> Morrolan: I got it, the problem was with php-cgi, for some reason it works from command line but no from ruby
<aliesky> I did it only with php
<Morrolan> I see. :)
Advocation has quit [Quit: Advocation]
mlpinit has joined #ruby
Guest69754 has quit [Ping timeout: 240 seconds]
failshell has joined #ruby
randomnick_ has joined #ruby
JesseH has quit [Ping timeout: 240 seconds]
anonymuse has joined #ruby
cody-- has quit [Quit: derp]
brennanM_ has quit [Remote host closed the connection]
platzhirsch has left #ruby [#ruby]
mlpinit has quit [Ping timeout: 245 seconds]
jonahR has joined #ruby
kaspergrubbe has joined #ruby
havenwood has quit [Remote host closed the connection]
epta has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
robert_ has joined #ruby
robert_ has quit [Changing host]
robert_ has joined #ruby
havenwood has joined #ruby
epta has joined #ruby
JesseH has joined #ruby
momomomomo has quit [Quit: momomomomo]
havenwood has quit [Read error: Connection reset by peer]
<aliesky> it's weird but it works
Kricir has joined #ruby
nomenkun has joined #ruby
sectionme has joined #ruby
heidi has quit [Quit: Leaving.]
Monie has joined #ruby
heidi has joined #ruby
nfk has joined #ruby
momomomomo has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
sectionme has quit [Read error: Operation timed out]
funburn has joined #ruby
GoldenGiant__ has quit [Quit: Computer has gone to sleep.]
GoldenGiant__ has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
pleal has joined #ruby
JesseH has quit [Ping timeout: 240 seconds]
GoldenGiant__ has quit [Read error: Connection reset by peer]
GoldenGiant__ has joined #ruby
dbjeepn has joined #ruby
nemesit|znc has quit [Ping timeout: 240 seconds]
brum has joined #ruby
T_T has quit [Remote host closed the connection]
epta has quit [Ping timeout: 240 seconds]
tatsuya_o has quit [Ping timeout: 246 seconds]
whowantstolivefo has quit [Ping timeout: 248 seconds]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tatsuya_o has joined #ruby
jonathanwallace has joined #ruby
epta has joined #ruby
<rafaelcgo> is there a problem to require same gem 2 times on different files? (I know it isnt a good pratice, but I just want to know if this will cause some crash or bug)
dkamioka has quit [Remote host closed the connection]
felipec has joined #ruby
pellenation has quit [Quit: Leaving.]
dbjeepn has quit [Client Quit]
Jdubs has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
<felipec> why isn't it possible to redirect stdout to a process?
iliketurtles has joined #ruby
amacgregor has quit [Ping timeout: 245 seconds]
<felipec> the equivalent in C works fine
quoin has joined #ruby
petey has quit [Read error: Operation timed out]
sambao21 has quit [Quit: Computer has gone to sleep.]
devoldmx3 has joined #ruby
Jdubs has joined #ruby
ehaliewicz has joined #ruby
<Morrolan> rafaelcgo: Nope, completely harmless.
brum has quit [Ping timeout: 240 seconds]
Falcore has quit [Quit: Falcore]
stkowski has quit [Quit: stkowski]
sambao21 has joined #ruby
T_T has joined #ruby
gazarsgo has quit [Ping timeout: 245 seconds]
<rafaelcgo> Morrolan: nice
<Morrolan> (It won't load it if it's already loaded, so even if loading the gem has side effects, they shouldn't happen twice)
tonni has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 258 seconds]
gwb3 has joined #ruby
mogpt has quit [Quit: Page closed]
GoldenGiant__ has quit [Ping timeout: 264 seconds]
aliesky has quit [Quit: Leaving]
colonolGron has quit [Ping timeout: 252 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Speed has joined #ruby
theRoUS has quit [Ping timeout: 248 seconds]
colonolGron has joined #ruby
Bira has quit [Remote host closed the connection]
RDash is now known as RDash[AW]
amsi has joined #ruby
tgraham has joined #ruby
visof has joined #ruby
Lauritz_ has quit [Quit: Linkinus - http://linkinus.com]
v0n has quit [Ping timeout: 268 seconds]
Stalkr_ has joined #ruby
prism1 is now known as prismate
_mikeg has quit [Remote host closed the connection]
Jdubs has quit [Remote host closed the connection]
KobraKao has quit [Read error: Connection reset by peer]
gr33n7007h has joined #ruby
KobraKao has joined #ruby
Jdubs has joined #ruby
GoldenGiant__ has joined #ruby
aryaching has joined #ruby
sailias has joined #ruby
mlpinit has joined #ruby
quoin has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
atmosx has quit [Ping timeout: 240 seconds]
atmosx has joined #ruby
phantasm66 has quit [Quit: *sleeeep….]
cj3kim has quit [Remote host closed the connection]
freezey_ has joined #ruby
theRoUS has joined #ruby
i_s has joined #ruby
JesseH has joined #ruby
benzocoumaran35 has joined #ruby
freezey has quit [Ping timeout: 245 seconds]
tonni has joined #ruby
pskrz has quit [Quit: pskrz]
devoldmx3 has quit [Read error: No route to host]
devoldmx has joined #ruby
havenwood has quit [Remote host closed the connection]
evenix has quit [Remote host closed the connection]
nemesit|znc has joined #ruby
LMolr has joined #ruby
konr has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
mrsolo has quit [Quit: This computer has gone to sleep]
konr has left #ruby [#ruby]
GregLLL has quit [Quit: Page closed]
huoxito has joined #ruby
<a1ph4g33k> felipec ... take a look at popen ...
KobraKao has quit [Read error: Connection reset by peer]
KobraK has joined #ruby
<felipec> a1ph4g33k: I have
SkuliOskarsson has joined #ruby
petey has joined #ruby
jaimef has quit [Excess Flood]
SkuliOskarsson has quit [Remote host closed the connection]
SkuliOskarsson has joined #ruby
anonymuse has quit [Remote host closed the connection]
Suit_Of_Sables has quit [Quit: WeeChat 0.4.0]
mac___ has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 245 seconds]
Nenor has quit [Quit: Nenor]
mac___ has joined #ruby
ner0x has quit [Quit: Leaving]
anonymuse has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
IceyEC has quit [Quit: IceyEC]
havenwood has joined #ruby
codecop has quit [Remote host closed the connection]
maoko has joined #ruby
GoldenGiant__ has quit [Ping timeout: 260 seconds]
gyre007 has quit [Ping timeout: 245 seconds]
mercwithamouth has joined #ruby
adeponte has joined #ruby
havenwood has quit [Remote host closed the connection]
SkuliOskarsson has quit [Client Quit]
duggiefr_ has quit [Remote host closed the connection]
mark_locklear has quit [Quit: Leaving]
kaldrenon has quit [Remote host closed the connection]
havenwood has joined #ruby
tsykoduk has quit [Quit: ZNC - http://znc.in]
duggiefresh has joined #ruby
<a1ph4g33k> felipec, if you explain a bit more about what you're trying to do, it would help.
kaldrenon has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
tsykoduk has joined #ruby
<a1ph4g33k> things that work in language 'x' are reproducible ... but don't always follow line-for-line.
brum has joined #ruby
devoldmx has joined #ruby
<felipec> a1ph4g33k: it's not clear? parent | child
GoldenGiant__ has joined #ruby
<a1ph4g33k> felipec, no it wasn't clear to me. no comments in your source.
jaimef has joined #ruby
St_Marx has quit [Quit: Leaving]
freezey_ has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 246 seconds]
amnay has quit [Ping timeout: 246 seconds]
angusiguess has quit [Ping timeout: 245 seconds]
St_Marx has joined #ruby
SkuliOskarsson has joined #ruby
breakingthings has quit []
phrog has quit [Ping timeout: 256 seconds]
james_woods has quit [Ping timeout: 264 seconds]
duggiefresh has quit [Ping timeout: 260 seconds]
dodosan has quit [Read error: Connection reset by peer]
kaldrenon has quit [Ping timeout: 260 seconds]
dodosan has joined #ruby
brum has quit [Ping timeout: 260 seconds]
dangerousdave has quit [Quit: Linkinus - http://linkinus.com]
senayar has joined #ruby
KobraK has quit [Read error: Connection reset by peer]
brennanMKE has joined #ruby
dzhulk has quit [Quit: Leaving.]
huoxito_ has joined #ruby
mklappst_ has quit [Remote host closed the connection]
maoko has quit [Quit: Textual IRC Client: www.textualapp.com]
jaynewstrom has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
byprdct has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> $original_stdout = $stdout
<shevy> # redirect stdout to /dev/null
lnormous has joined #ruby
einarj has joined #ruby
<shevy> $stdout = File.new('/dev/null', 'w')
Jdubs has quit [Remote host closed the connection]
JumpMast3r has joined #ruby
<shevy> puts 'you wont see this!'
aryaching has quit [Ping timeout: 241 seconds]
<shevy> # restore stdout
mlpinit has quit [Ping timeout: 264 seconds]
<shevy> $stdout = $original_stdout
ldnunes has quit [Quit: Leaving]
amnay has joined #ruby
T_T has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
burlyscudd has joined #ruby
platzhirsch has joined #ruby
huoxito has quit [Ping timeout: 248 seconds]
theRoUS has quit [Quit: Leaving]
<platzhirsch> is there an enumerator for arrays that does something until a condition becomes true? So I don't have to use a while loop
huoxito__ has joined #ruby
<havenwood> >> $stdout = File.new(File::NULL, 'w'); puts 'cannot see'; $stdout = STDOUT
<eval-in> havenwood => #<IO:<STDOUT>> (https://eval.in/50709)
LMolr has quit [Quit: Leaving]
obs has quit [Quit: Konversation terminated!]
Jdubs has joined #ruby
erichmenge has quit [Ping timeout: 245 seconds]
einarj has quit [Read error: Operation timed out]
SkuliOskarsson has quit [Quit: Bye.]
huoxito has joined #ruby
shaunbaker has joined #ruby
jaynewstrom has joined #ruby
freezey has joined #ruby
erichmenge has joined #ruby
jerius has quit [Ping timeout: 248 seconds]
Jdubs has quit [Remote host closed the connection]
krawchyk has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
dallasm_ has quit [Remote host closed the connection]
<shevy> oh true, I forgot there is STDOUT as well
<shevy> felipec there you go!
devoldmx has joined #ruby
mlpinit has joined #ruby
T_T has joined #ruby
tjbiddle has joined #ruby
<felipec> shevy: what? that has nothing to do with my problem?
huoxito_ has quit [Ping timeout: 260 seconds]
<a1ph4g33k> shevy, I I don't believe that's what the user wants.
funburn has quit [Quit: funburn]
huoxito_ has joined #ruby
<tjbiddle> Does anyone know where I can find out what would be the total size of all gems hosted on rubygems.org? I want to mirror it but want to ensure I have enough space
jerius has joined #ruby
Kar- has quit [Ping timeout: 264 seconds]
<a1ph4g33k> felipec, you want both of the scripts to be defined in the same file ???? Or does that part matter ?
tsykoduk has quit [Quit: ZNC - http://znc.in]
<felipec> a1ph4g33k: I actually want "ruby script | less", basically
huoxito__ has quit [Ping timeout: 256 seconds]
tsykoduk has joined #ruby
<Stalkr_> I am done reading 'Learning to Program', do you think I have enough knowledge to start with Sinatra/Padrino or should I read some more before playing with frameworks?
<felipec> but I'm starting the absolute simplest case, if that script doesn't work, there's no way popen or anything fancier would
tgraham is now known as tgraham|away
adambeynon has joined #ruby
<havenwood> Stalkr_: A good followup book would be The Ruby Programming Language but no harm done in poking around with Sinatra.
huoxito has quit [Ping timeout: 245 seconds]
adkron has quit [Ping timeout: 245 seconds]
<Stalkr_> havenwood: Yeah, I spoke with you about what to do after :-) I have it on my list to read
KobraKao has joined #ruby
SkuliOskarsson has joined #ruby
<Stalkr_> havenwood: I found this list after though http://astonj.com/tech/best-way-to-learn-ruby-rails/ Do you think it's a good list?
<Stalkr_> I could probably switch a book out with 'The Ruby Programming Language'
jonathanwallace has quit [Ping timeout: 248 seconds]
carlyle has quit [Remote host closed the connection]
newUser1_ has joined #ruby
prism has joined #ruby
prism is now known as Guest91170
zz_scottstamp is now known as scottstamp
Guest91170 is now known as pantaloon
newUser1234 has quit [Read error: Connection reset by peer]
kaspergrubbe has quit [Remote host closed the connection]
tastycode has joined #ruby
Kricir has joined #ruby
bean__ has quit [Quit: Computer has gone to sleep.]
<tastycode> Is there any trick to using Module#prepend in ruby 2.0.0p247?
jerius has quit [Ping timeout: 260 seconds]
freerobby has quit [Quit: Leaving.]
<tastycode> Can't even copy and paste in examples
gwb3 has quit [Remote host closed the connection]
enricllu_ is now known as enriclluelles
plotter has joined #ruby
prismate has quit [Ping timeout: 248 seconds]
gwb3 has joined #ruby
osvico has joined #ruby
funburn has joined #ruby
<havenwood> >> module Before end; class Example; prepend Before end; Example.ancestors
<eval-in> havenwood => [Before, Example, Object, Kernel, BasicObject] (https://eval.in/50711)
<havenwood> tastycode: No trick, sure you're on 2.0
tonni has quit [Remote host closed the connection]
failshell has quit [Ping timeout: 260 seconds]
<havenwood> tastycode: Double check?: RUBY_VERSION
devoldmx3 has joined #ruby
<tastycode> ya 2.0.0
freezey has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
vim_shim has quit [Ping timeout: 256 seconds]
Michae___ has joined #ruby
<tastycode> I'm only doing this because of Module#prepend, I need to intercept all calls to rails url_helpers in the context of Rabl::Engine ... is there some way of emulating this in ruby193 ? e.g. overriding send?
kirun has quit [Quit: Client exiting]
Kricir has quit [Ping timeout: 246 seconds]
vim_shim_ has quit [Ping timeout: 268 seconds]
mmitchell has quit [Remote host closed the connection]
codezombie has quit [Ping timeout: 256 seconds]
mrsolo has joined #ruby
Guest4603 has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
gwb3 has quit [Ping timeout: 245 seconds]
tgraham|away is now known as tgraham
<Guest4603> ho
Guest4603 has quit [Client Quit]
<felipec> I don't understand how IO.popen("-") works
brum has joined #ruby
<canton7> felipec, hmm it seems to work if you assign e.g. $stdin = r, but not if you use #reopen
dodosan_ has joined #ruby
<tastycode> i'm an idiot
<tastycode> nevermind... it was zeus's fault
czhang is now known as czhang_______
<felipec> canton7: indeed, but that only works inside the ruby script
pantaloon is now known as prismate
<felipec> canton7: if I do system('echo foo'), that wouldn't be redirected
bean__ has joined #ruby
<canton7> yeah, makes sense
justsee has joined #ruby
maroloccio has joined #ruby
<a1ph4g33k> felipec, provide more detail of what you want ... it's great that you said "I want basically script.rb | less" ... are you trying to provide the less side, or the script side, or both within a single program ?
dodosan has quit [Ping timeout: 260 seconds]
julweber has joined #ruby
<a1ph4g33k> ( asking if you are trying to emulate the pipe ... the less ... or something else... ? )
brum has quit [Ping timeout: 248 seconds]
adkron has joined #ruby
shaunbaker has quit [Remote host closed the connection]
pwh has joined #ruby
<felipec> a1ph4g33k: I don't understand how it's not clear, the only thing less does is receive a stream from stdin, I want to redirect stdout to less's stdin
<felipec> a1ph4g33k: script | less
shaunbaker has joined #ruby
zastern has joined #ruby
hakunin has quit [Remote host closed the connection]
<a1ph4g33k> felipec, the part that isn't clear if you mean from a console, where you can just type exactly that "script | less" ... or from within a script (lets call it outer)... where you are trying to run a script (inner) ... through less, and then have IO with outer then be sent along to less ... ???
<felipec> a1ph4g33k: obviously from the script, that's why I'm writing the script
devoldmx has joined #ruby
johnjohnson has quit [Quit: Textual IRC Client: www.textualapp.com]
<a1ph4g33k> felipec, and IO with outer is meant to be passed along to inner ? or to less ?
freezey has joined #ruby
BillCriswell has quit [Remote host closed the connection]
devoldmx3 has quit [Read error: Connection reset by peer]
quoin has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<felipec> a1ph4g33k: IO is not meant to be passed, the steam has to be redirected
devoldmx has joined #ruby
bobinator60_ has joined #ruby
<a1ph4g33k> felipec, so all you want is the ability for you to send all of the output from script 1 to script 2 ?
bklane has quit [Remote host closed the connection]
<felipec> a1ph4g33k: yes, but it's not a "script 1", it's code within a ruby script, and it's not "script 2", it's less
bklane has joined #ruby
bobinator60_ has quit [Client Quit]
bobinator60_ has joined #ruby
mac_ has joined #ruby
mac_ has quit [Remote host closed the connection]
mac___ has quit [Ping timeout: 246 seconds]
jerius has joined #ruby
<shevy> hehe
bklane has quit [Ping timeout: 245 seconds]
<shevy> a1ph4g33k you don't give up easily :D
parus has quit [Ping timeout: 264 seconds]
visof has quit [Remote host closed the connection]
OneMT has quit [Quit: OneMT]
<a1ph4g33k> shevy, nope.
Krajsnick has joined #ruby
<a1ph4g33k> I wanted to understand.
<a1ph4g33k> felipec, is this something specific to less ? or is that your general use case ?
<havenwood> felipec: IO.popen('less', 'w') { |less| less.puts 'OMGWTFBBQ' }
dash_ has quit [Quit: dash_]
marius has joined #ruby
<felipec> havenwood: that doesn't redirect
<rafaelcgo> guys, have you ever used OCRA to build a GEM into a windows .exe ?
<felipec> IO.popen('less', 'w') { |less| system('echo foo') }
tgraham is now known as tgraham|away
<a1ph4g33k> as in, would something like "tie" or "cat" or any other command that is just going to do consume data through the pipe until it hits end-of-file ... ?
burlyscudd has quit [Quit: Leaving.]
aryaching has joined #ruby
<felipec> a1ph4g33k: that's what less does, yes
RichardBaker has quit [Quit: RichardBaker]
<havenwood> felipec: it is redirecting text to less, what different than that do you want?
platzhirsch has left #ruby [#ruby]
artofraw has joined #ruby
RichardBaker has joined #ruby
<felipec> havenwood: it's not redirecting stdout to less's stdin
<a1ph4g33k> no that isn't what less does.
<artofraw> would it be possible to make functions first class citizens in MRI?
s0ber_ has joined #ruby
<felipec> I found something that works
<havenwood> felipec: oh, you want to just continue to redirect output?
<artofraw> so you could pass the actual methods as arguments to other methods, etc.
<a1ph4g33k> less consumes data from the pipe, but then provides for you to be able to hit keys and move around within the data ... search, scrollback, etc ...
iliketurtles has quit [Quit: zzzzz…..]
quoin has quit [Ping timeout: 260 seconds]
parus has joined #ruby
<a1ph4g33k> that's why I was asking about "grep" or "tie" or "cat" or "echo" ... or anything else that only handles stdin and when it reaches the end, it's done.
<bnagy> artofraw: you can do it with procs etc
iliketurtles has joined #ruby
<waxjar> artofraw, not really. Procs/lambdas are the next best thing
<shevy> I dont think he will ever be clear on what he wants, it seems to be a moving target
<artofraw> yeah I know, but I mean why you can't do it? is it just a design decision that's now hard to change?
s0ber has quit [Ping timeout: 260 seconds]
<artofraw> or it depends on something internal to the language
s0ber_ is now known as s0ber
<bnagy> well you can, it's just fiddly
<bnagy> methods _are_ objects
cj3kim_ has joined #ruby
<bnagy> but every actual use case I've ever seen you want to be working with procs or lambdas instead
devoldmx has quit [Read error: Connection reset by peer]
devoldmx27 has joined #ruby
<bnagy> cause methods are bound to objects
kpshek has quit []
<felipec> a1ph4g33k: less doesn't end until it reaches the EOF of thes stream, for all practical purposes in this code it's the same as cat, except that it takes longer for the process to finish, specifically, until the user says so
<shevy> not with UnboundMethod !
<artofraw> i see
bobinator60_ has quit [Quit: bobinator60_]
<artofraw> thx
<shevy> damn... how can I get an UnboundMethod?
<waxjar> Method#unbind or something like that
<a1ph4g33k> felipec, less doesn't end until you get a ctrl-c or a q from the keyboard ... and that's my point.
<shevy> ah... also found another example ... x = Array.instance_method("pop")
nisstyre has quit [Quit: Leaving]
<felipec> a1ph4g33k: and how does that affect this script?
<havenwood> felipec: Heh: $stdout = IO.popen('less', 'w')
<felipec> havenwood: that doesn't redirect
<havenwood> felipec: yeah it does
<havenwood> felipec: send to stdout, and stdout is less
<havenwood> felipec: but why in the world?
<havenwood> felipec: what are you really trying to do?
rgbdev has quit [Quit: rgbdev]
ru has joined #ruby
<shevy> omg... ruby indeed has a Method class waxjar ... I did not know: http://www.ruby-doc.org/core-2.0.0/Method.html
claymore has quit [Quit: Leaving]
<shevy> how do you call a method on class Method? :\
bean__ has quit [Quit: Computer has gone to sleep.]
adkron has quit [Ping timeout: 264 seconds]
sniffingcats has quit [Quit: Til rivido Idisti!]
pyx has joined #ruby
<artofraw> yes you could create Method objects that represents methods
<waxjar> object.method(:method_name).foo
bobinator60_ has joined #ruby
pyx has quit [Client Quit]
<shevy> aaaaaaah ...
<shevy> Method.send :clone
<shevy> I am in the weird part of ruby
artofraw has quit [Remote host closed the connection]
cj3kim_ has quit [Ping timeout: 264 seconds]
<bnagy> that's why we use lambdas :)
Michae___ has quit [Remote host closed the connection]
<shevy> they seem kinda easier now ...
<bnagy> or implicit to_proc like map(&:upcase)
Michae___ has joined #ruby
brum has joined #ruby
super_man has joined #ruby
Monie has joined #ruby
<Boohbah> shevy: We can't stop here! This is bat country!
rkrdo has joined #ruby
<a1ph4g33k> felipec, http://pastie.org/8355721
<shevy> Boohbah yeah man... sometimes one just has to make it through and hope for the best
<shevy> this is how I won the Lemmings game
<shevy> despite all the losses of our lemming brothers...
<felipec> havenwood: no, it does not
<felipec> havenwood: you are not helping at all
<shevy> troll alarm!
jerius has quit [Ping timeout: 260 seconds]
<felipec> havenwood: see, I wrote code to test
<felipec> test_1 outputs "foo bar", test_2 outputs "this is the line: foo bar"
<felipec> test_2 works, test_1 doesn't
<a1ph4g33k> felipec, and mine ?
devoldmx27 has quit [Read error: Connection reset by peer]
<felipec> a1ph4g33k: that's not what I want, I said I wanted the code inside to do it
devoldmx has joined #ruby
rkrdo has quit [Remote host closed the connection]
brum has quit [Ping timeout: 240 seconds]
<shevy> a1ph4g33k he hates you man, accept it
<felipec> a1ph4g33k: like a method: do_pager() { # stuff }
<bnagy> what happens if you popen and then reopen $stdout to the program stdin?
mansi has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
kvirani has quit [Remote host closed the connection]
kvirani has joined #ruby
<felipec> bnagy: that would work, but the program would hang forever because apparently we can't close $stdout
SkuliOskarsson has quit [Remote host closed the connection]
<bnagy> no but you can close the program's stdin
estebanrules has joined #ruby
kevind has quit [Quit: kevind]
<felipec> bnagy: and when do I do that?
<bnagy> that's how I do pipe streaming
<bnagy> read from ARGF, write to target stdin, then close that
<havenwood> felipec: well in that case, i suggest a fork bomb: def test_3; loop { fork { test_3 }} end; test_3
shaunbak_ has joined #ruby
<felipec> bnagy: but there's no way from the parent to know if less is done
colonolGron has quit [Quit: Lost terminal]
<bnagy> eh
<bnagy> ok, forget it, I join with everyone else in not knowing what on earth you're talking about
mansi has quit [Ping timeout: 240 seconds]
brum has joined #ruby
<bnagy> you seem happy with your code though, so yay
idiocrash has joined #ruby
Zai00 has quit [Quit: Zai00]
alex__c2022 has quit [Quit: alex__c2022]
fuhgeddaboudit has quit [Ping timeout: 256 seconds]
<shevy> havenwood hehehe
freezey has quit [Remote host closed the connection]
kvirani has quit [Ping timeout: 248 seconds]
tgraham|away is now known as tgraham
bklane has joined #ruby
sectionme has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
shaunbaker has quit [Ping timeout: 252 seconds]
jlast has quit [Remote host closed the connection]
funburn has quit [Quit: funburn]
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
devoldmx3 has joined #ruby
devoldmx has quit [Read error: No route to host]
Michae___ has quit [Remote host closed the connection]
<a1ph4g33k> felipec, http://pastie.org/8355751
<a1ph4g33k> There ... done.
Tearan has joined #ruby
Michae___ has joined #ruby
pwh has quit [Quit: pwh]
<felipec> bnagy: it's very simple; it doesn't work
<felipec> bnagy: IO.popen('less -FSRX', 'w') { |io| $stdout.reopen(io); $stdout.puts "test"; io.close_write }
phantasm66 has joined #ruby
sectionme has quit [Ping timeout: 252 seconds]
estebanrules has quit [Remote host closed the connection]
<a1ph4g33k> felipec, waiting for you to tell me that's not what you want ... =)
osvico has quit [Ping timeout: 246 seconds]
<felipec> a1ph4g33k: replace puts "Candy!" with system('echo Candy\!') and you'll see it doesn't work
<shevy> lol
<shevy> it doesn't work
petey has quit [Ping timeout: 240 seconds]
mlpinit has quit [Ping timeout: 252 seconds]
<shevy> it will never work
<a1ph4g33k> wow.
<felipec> shevy: it does work, I pasted one script that does
yfeldblum has joined #ruby
einarj has joined #ruby
burlyscudd has joined #ruby
<havenwood> the fork bomb was actually the desired behavior?
Krajsnick has quit [Remote host closed the connection]
Stalkr^ has quit [Ping timeout: 240 seconds]
<a1ph4g33k> felipec, I don't have any more time to spend on this.
KobraKao has quit [Ping timeout: 256 seconds]
Stalkr_ has quit [Ping timeout: 264 seconds]
cmarques has quit [Remote host closed the connection]
<a1ph4g33k> in that kind of situation, you would be using `echo Candy!` instead of the system call ... you want to know the output...
<a1ph4g33k> so a puts `echo candy!` will work just fine within the with_paged_output function.
<felipec> a1ph4g33k: yeah, but why would I do that if redirection works for all the cases?
dodosan_ has quit [Read error: No route to host]
<a1ph4g33k> felipec, because you are too focused on getting a specific answer instead of accepting any answer provided that gets you to the goal.
osvico has joined #ruby
adkron has joined #ruby
<shevy> it simply doesn't work
<shevy> and if it does
<shevy> the definition is changed
RORgasm has quit [Remote host closed the connection]
visof has joined #ruby
einarj has quit [Ping timeout: 260 seconds]
phantasm66 has quit [Quit: *sleeeep….]
<felipec> a1ph4g33k: I specifically asked for stdout to be redirected to less' stdin
xk_id has joined #ruby
<a1ph4g33k> ... and/or you've permanently modified your stdin/stdout file descriptors and are setup for a nightmare.
<a1ph4g33k> felipec, I already told you I'm done sir.
<felipec> a1ph4g33k: a solution that doesn't do that, is not a solution
<shevy> it doesn't work
devoldmx has joined #ruby
<felipec> in theory this should do the trick: IO.popen('less -FSRX', :in => :out) { |io| puts "test" }
whunt is now known as whunt___________
devoldmx3 has quit [Read error: Connection reset by peer]
prism has joined #ruby
<felipec> but somehow it doesn't work
<a1ph4g33k> felipec, you've got my ire sir ... I ask you to stop before I just /ignore you.
einarj has joined #ruby
whunt___________ is now known as whunt
<shevy> /ignore does not work
prism is now known as Guest64532
<felipec> it's all right, it's probably way too advanced for you anyway
<a1ph4g33k> by /ignore I meant add a rule to my IRC client to redirect to /dev/null ...
<havenwood> ;)
<a1ph4g33k> felipec, love the trolling.
KobraKao has joined #ruby
Tricon has quit [Quit: Bye!]
<shevy> felipec be a man and write to https://www.ruby-forum.com/forum/ruby
<a1ph4g33k> if you know as much as you think, it's surprising you'd come here in the first place.
<shevy> of course that requires you to formulate a question ...
<shevy> so it does not work
volty has joined #ruby
<shevy> it simply doesn't work
prismate has quit [Ping timeout: 240 seconds]
<felipec> shevy: I will, after I'm done with the investigation why :in => :out doesn't work
<shevy> the ruby forum is actually funny, this guy thinks that ruby is dying :) https://www.ruby-forum.com/topic/4417318
hashpuppy has quit [Quit: Computer has gone to sleep.]
<a1ph4g33k> ... on the bright side, I do like my with_paged_output function so ... regardless ... I got something out of it.
prism1 has joined #ruby
<shevy> a1ph4g33k it doesn't work
<a1ph4g33k> mine does ... for all cases I would use it on...
prism1 is now known as pantaloon
<a1ph4g33k> I don't expect to have a copy of system output ...
<a1ph4g33k> if I want a copy of system command output I use `` or popen .
<shevy> perhaps he wants a new OS in ruby
<shevy> long live ``
<shevy> anything more complicated just does not work
rafaelcgo has quit [Quit: Leaving.]
__userna1 has quit [Ping timeout: 256 seconds]
michael_mbp is now known as zz_michael_mbp
super_man has left #ruby [#ruby]
Guest64532 has quit [Ping timeout: 245 seconds]
<bnagy> ruby is obviously weird this morning, guess I'll write go today instead :P
|jemc| has quit [Quit: WeeChat 0.4.1]
<a1ph4g33k> bnagy, ?
__userna1 has joined #ruby
<rien> IRB question: after `irb -r ./file.rb` and having made changes to a file that file.rb requires/loads, how to I force IRB to reload the whole thing?
jbrechtel has quit [Quit: leaving]
<volty> load ?
<rien> yes, requires
<tgraham> reload
<rien> I want to reload it all, yes
<volty> load './file.rb' ?
momomomomo has quit [Quit: momomomomo]
<rien> nope, doesn't work
<rien> oh hold on
<a1ph4g33k> rien, the problem is if file.rb does requires, then the requires cache is already loaded.
kaspergrubbe has joined #ruby
momomomomo has joined #ruby
<a1ph4g33k> ... if file.rb uses load ... the load './file.rb' will cause ::load calls for all of the other files.
momomomomo has quit [Client Quit]
burlyscudd has quit [Quit: Leaving.]
<shevy> always load() it again
<rien> I'm just looking for a way that I can change code and try it immediately in irb
<tgraham> You want a REPL/
<rien> I'm working on a project where files require other files in the project etc
<tgraham> ?
<rien> tgraham: a repl that always runs the latest code from the files
Popple has joined #ruby
<shevy> just define a method that calls/loads your files anew
<rien> tgraham: I don't like to write code in the repl, I write it in the file, then play with it in the repl
<workmad3> rien: ctrl-d then type 'irb -r "myfile.rb" '
<a1ph4g33k> rien, use Pry and edit_method
end_guy has joined #ruby
snovak has quit [Remote host closed the connection]
<a1ph4g33k> er ... method_source
anonymuse has quit [Remote host closed the connection]
<a1ph4g33k> pry & method_source
<atmosx> `/away afk
casheew_ has quit [Read error: Connection reset by peer]
<rien> a1ph4g33k: I alredy have a workflow with emacs and my command line that I'm unwilling to break, but thanks :)
qubit has joined #ruby
casheew has joined #ruby
<volty> what's wrong with :in => :out ?
GoldenGiant__ has quit [Quit: Computer has gone to sleep.]
<workmad3> rien: you know what pry is?
<rien> shevy: how woud you code such "reload" method?
SkuliOskarsson has joined #ruby
<rien> workmad3: yep I use it with pry-byebug to debug my code
<bnagy> load works mostly
<bnagy> you get redefined constant warnings, but I still use it a lot
GoldenGiant__ has joined #ruby
|jemc| has joined #ruby
<rien> bnagy: I think you're right, it just so happens I have an error in my requires that was causing an error and I wrongly assumed load was broken...
<bnagy> gotta load the full filename blah.rb not blah
katsrc has joined #ruby
<bnagy> some stuff you definitely can't load twice though
felixjet_ has joined #ruby
<qubit> what's the accepted practice for deploying apps that use bundler? Meaning should it be left up to the system's package manager to install `bundler`, or do we somehow include bundler in the app? If it's left up to the system/user to install bundler, are all versions of bundler ensured to be compatable with each other?
nomenkun has quit [Remote host closed the connection]
kaspergrubbe has quit [Ping timeout: 246 seconds]
jbrechtel has joined #ruby
felixjet has quit [Read error: Connection reset by peer]
GoldenGiant__ has quit [Read error: Connection reset by peer]
GoldenGiant___ has joined #ruby
gr33n7007h has quit [Read error: Connection timed out]
anonymuse has joined #ruby
<bnagy> I hate bundler so much :<
<tgraham> rien: you could create an .irbrc file that requires a file where you define a reload method that re loads the files you've changed, then that relaod method be in every irb session you start.
gr33n7007h has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<rien> +1 for hating bundler
<shevy> qubit I once tried to install rails through bundler, from a tutorial. it failed. that was ~3 years ago or so, I just gave up using it
devoldmx has joined #ruby
<rien> tgraham: that's a nice tip, thanks
<tgraham> Doesn't rubygems install some version of blunder by default?
<shevy> "gem install rails" ~7 days ago worked fine for me btw, and since I dont need bundler, I dont use it
<volty> rien: i would go with a bash script "while true \n do \n irb ./file.rb \n done
gr33n7007h has quit [Max SendQ exceeded]
<shevy> tgraham no, only "gem"
<shevy> hmm
gr33n7007h has joined #ruby
<rien> volty: I'm embarrassed but I don't understand how that helps me
<qubit> well without bundler, how do you handle gem installation and version incompatability?
<shevy> I have bundler-1.3.5.gem .... strangely enough, I dont remember having installed it
<shevy> perhaps rails sneakily installed it for me :\
gr33n7007h has quit [Max SendQ exceeded]
<workmad3> rien: it automatically re-runs irb and loads your file again when you ctrl-d
<shevy> qubit I trust that people who write gems are clever
<qubit> shevy: theyre not
<a1ph4g33k> rien, all i was stating is that instead of irb, you can use pry ... set up Pry.editor = "emacsclient" and then you can run code ... and do "edit Class#method" ... and never have to leave pry ... ... and auto reloads whatever you modify.
<volty> you exit irb and reload all of it -- sure that you don't have hanging arround
gr33n7007h has joined #ruby
kx has joined #ruby
<a1ph4g33k> rien, won't say any more.
amnay has quit [Ping timeout: 245 seconds]
gr33n7007h has quit [Max SendQ exceeded]
<rien> a1ph4g33k: I'll check it out, thanks
<rien> workmad3: and I'd quit it for good with C-c ?
burlyscudd has joined #ruby
<workmad3> rien: pass? :)
<workmad3> rien: that would be a q for volty
c0rn has quit [Ping timeout: 248 seconds]
<tgraham> qubit: I would think that if your setting up an environment that can even use gems, you'd have ruby/rubygems installed, so within that configuration management I would think getting bundler installed would happen.
<shevy> !
SHyx0rmZ has joined #ruby
<shevy> a virus!
<volty> is pry guaranteed (or does it have a command) to clean all the hanging data arround ?
mac_ has joined #ruby
<qubit> tgraham: and that might be the proper way, but would it be possible for a version of bundler to be installed that isn't compatabible with the Gemfile in the project?
<volty> workmad3: no C-c - working on file.rb for life :)
<havenwood> volty: reset
<havenwood> volty: or restart it
joofsh has quit [Remote host closed the connection]
headius has joined #ruby
phantasm66 has joined #ruby
c0rn has joined #ruby
newUser1_ has quit [Remote host closed the connection]
<volty> yap , thanks havenwood --- i know everything about restarting :)
<volty> reset is very very nice
joofsh has joined #ruby
joofsh has quit [Remote host closed the connection]
sepp2k1 has joined #ruby
<rien> workmad3: your suggestion is fantastic! so convenient to just press C-d to reload... thanks lots
sepp2k has quit [Ping timeout: 245 seconds]
<workmad3> rien: credit where it's due... it was volty's suggestion
<a1ph4g33k> pry doesn't touch any data, it just reloads the methods.
<workmad3> rien: I merely stated what it does ;)
<rien> sorry, thanks volty!
<rien> volty: to exit I do: type exit, then while it's hanging I do C-c
headius has quit [Client Quit]
<volty> ask the experts -- if irb can exit with a return code -- then you can check against it
Trazira has joined #ruby
<volty> (if you want to interrupt without trying to get it idle -- i don't know how fast you are :) )
soheil has quit [Read error: Connection timed out]
quoin has joined #ruby
devoldmx has quit [Read error: No route to host]
pel_daniel has left #ruby [#ruby]
<a1ph4g33k> ah ... my bad ... hadn't used the reset command in pry before ...
soheil has joined #ruby
devoldmx has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
Galgorth has quit [Ping timeout: 256 seconds]
angoragoats has quit [Quit: angoragoats]
GoldenGiant___ has quit [Quit: Computer has gone to sleep.]
St_Marx is now known as [St_Marx]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GoldenGiant___ has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
iliketurtles has quit [Quit: zzzzz…..]
evelyette_ has quit [Remote host closed the connection]
amacgregor has joined #ruby
<rien> volty: for now this does it :)
iliketurtles has joined #ruby
evelyette_ has joined #ruby
bobinator60_ has quit [Quit: bobinator60_]
burlyscudd has quit [Quit: Leaving.]
einarj has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
einarj has joined #ruby
Kricir has joined #ruby
mneorr has joined #ruby
k610 has quit [Ping timeout: 264 seconds]
devoldmx has quit [Read error: Connection reset by peer]
SiliconDon has joined #ruby
mneorr has quit [Remote host closed the connection]
devoldmx has joined #ruby
geggam_ has quit [Remote host closed the connection]
VTLob has quit [Quit: VTLob]
__userna1 has quit [Ping timeout: 240 seconds]
GoldenGiant___ has quit [Ping timeout: 260 seconds]
sailias has quit [Ping timeout: 245 seconds]
Kelet has quit [Read error: Connection reset by peer]
<volty> rien: i'll post ...
<rien> volty: only problem is I lose my bash history and my C-y after reloading with C-c
Kelet has joined #ruby
gyzmodo has quit []
<volty> ?
<rien> so I can't go arrow-up to get the last history item
ephemerian has quit [Quit: Leaving.]
<volty> wait a min for a clean way
randomnick_ has quit [Quit: Leaving]
Popple has quit [Quit: Computer has gone to sleep.]
zodiak has joined #ruby
<rien> awesome, go ahead and test if with your way you can arrow-up and get the command you executed before C-d
<workmad3> rien: reload with pry instead of irb? :)
einarj has quit [Ping timeout: 240 seconds]
dsferreira has quit [Quit: This computer has gone to sleep]
deception has quit [Quit: Goodbye]
Kricir has quit [Ping timeout: 264 seconds]
<volty> you can remove that, idling, " echo $? "
rhys has quit [Quit: Leaving]
SiliconDon has quit [Remote host closed the connection]
<rien> what does that echo do?
<volty> rien: workmad3's right, you should try pry anyway
<volty> rien: nothing, i was testing the exit code
aryaching has joined #ruby
<rien> yeah but it's a shame to have to introduce an external tool to the tool that should know how to handle this simple case
greenride has quit [Quit: Leaving.]
DrCode has quit [Remote host closed the connection]
<volty> should be nicer if we could do an exit 1 and test that instead of ...
kitak has joined #ruby
<rien> I'm not as concerned with exiting as I am with the history. I guess I'll try pry
<rien> workmad3: how do I reload in pry? reset you said?
quoin has quit [Ping timeout: 256 seconds]
berc has joined #ruby
<banisterfiend> 'reset' in pry is basically just exec("pry") ;) (not sure if that's what u want)
blarghmatey_ has joined #ruby
DrCode has joined #ruby
<volty> ah, now i seeeee, you meant the history of irb.... try require 'irb/ext/save-history'
devoldmx has quit [Ping timeout: 240 seconds]
rcedillor has quit [Read error: Operation timed out]
berc has quit [Killed (idoru (Spam is off topic on freenode.))]
phantasm66 has quit [Quit: *sleeeep….]
amacgregor has quit [Read error: Connection reset by peer]
hashpuppy has joined #ruby
devoldmx has joined #ruby
amacgregor has joined #ruby
<rien> volty: that doesn't fix it :/
<volty> sorrry
<rien> volty: oh, in irbrc.....
<rien> hold on
banghouse2 has joined #ruby
<rien> yeah, no.... it still has old stuff saved from my previous rails sessions even (that I don't use anymore)
tatsuya_o has quit [Remote host closed the connection]
<a1ph4g33k> rien, if you use the built in edit command to edit methods within Pry, it will automatically reload the appropriate code for you.
mansi has joined #ruby
<volty> rien: come in you, you have to try two sessions at least
<a1ph4g33k> reset in pry simply puts you back to the original binding point where pry was invoked.
senayar has quit [Remote host closed the connection]
<rien> a1ph4g33k: I might try that in the future but I knew I could get it working without it, plus C-d is really handy for reloading... now it works :)
<volty> good to know
iliketurtles has quit [Quit: zzzzz…..]
evelyette_ has quit [Read error: Connection reset by peer]
soheil has quit [Read error: Connection timed out]
evelyette_ has joined #ruby
predator117 has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
<a1ph4g33k> rien, that is completely fine ... was just trying to make sure that the merits of my suggestion were understood ... and not interpretted as "my way is better".
<volty> (btw i use irb only as a calculator hihi )
devoldmx has joined #ruby
<felipec> a1ph4g33k: bnagy: behold the ultimate solution http://pastie.org/8355863
<a1ph4g33k> felipec, I don't care any more.
soheil has joined #ruby
evelyette_ has quit [Read error: Connection reset by peer]
predator117 has joined #ruby
<rien> a1ph4g33k: definitely understood here :) pry is amazing but it's a world on its own and I'm always afraid of it becoming my second emacs that I'm always tweaking :)
yekta has joined #ruby
w3pm has joined #ruby
evelyette_ has joined #ruby
<a1ph4g33k> rien, it could.
Popple has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
<a1ph4g33k> but ... it is a chainsaw and a half ... ri, editting, getting to see the source of any method ... ability to cd between object bindings...
<a1ph4g33k> really cool stuff.
<a1ph4g33k> even lets you edit the source of a function you typed into the repl ... ( and autoreloads it )
<a1ph4g33k> anyways ... I'm glad you have a solution.
dmerrick has joined #ruby
prism1 has joined #ruby
<a1ph4g33k> g'afternoon to you folks.
a1ph4g33k has quit [Quit: Leaving]
<lewellyn> or not.
devoldmx3 has joined #ruby
prism1 is now known as prismate
toastynerd has quit [Ping timeout: 245 seconds]
devoldmx27 has joined #ruby
ru has quit [Ping timeout: 260 seconds]
mansi has joined #ruby
pantaloon has quit [Ping timeout: 248 seconds]
DrCode has quit [Ping timeout: 240 seconds]
ru has joined #ruby
Michae___ has quit [Remote host closed the connection]
Kricir has joined #ruby
Michae___ has joined #ruby
Michae___ has quit [Remote host closed the connection]
DrCode has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
aryaching has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 260 seconds]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
SHyx0rmZ has joined #ruby
devoldmx27 has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
pwh has joined #ruby
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
mansi has quit [Ping timeout: 260 seconds]
soheil has quit [Read error: Operation timed out]
lnormous has quit [Quit: Leaving]
<g0th> hi
ismlages has quit [Read error: Connection reset by peer]
<g0th> newkeys=modifiers.inject(keys) { |i,m| m.fun(i) }
soheil has joined #ruby
<g0th> I want to do modifiers[10].fun(...(modifiers[1].fun(modifiers[0].fun(keys)))...)
<g0th> is the above ok or not?
devoldmx3 has joined #ruby
danman has quit [Quit: danman]
<bnagy> sorry wat?
mansi has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
<bnagy> like a mini recursion?
<g0th> I'm trying to successively apply the fun function from an array of objects that have it
<g0th> it's not the same function
<g0th> why recursion?
<g0th> recursion is if the function reoccurs during its own calculation
anonymuse has quit [Remote host closed the connection]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
SHyx0rmZ has joined #ruby
<bnagy> whatever you say
mac_ has quit [Remote host closed the connection]
tgraham is now known as tgraham|away
<bnagy> anyway, yeah looks more or less right, what's not working?
digital-ghost has quit [Remote host closed the connection]
<g0th> something else then darn
devoldmx has quit [Ping timeout: 245 seconds]
|jemc| has quit [Ping timeout: 240 seconds]
Lewix has quit [Remote host closed the connection]
<g0th> somehow it behaves as if only one was applied
<bnagy> just make sure you're getting the object you expect
<g0th> but probably the mistake is somewhere else then
<g0th> fun takes list and gives list
pleal has quit [Read error: Connection reset by peer]
pleal has joined #ruby
<pontiki> g0th: you have the parameters backwards, i think
<pontiki> p. sure it's |memo,obj|
<bnagy> it definitely is
i_s has quit [Remote host closed the connection]
jibi has quit [Quit: .]
mac_ has joined #ruby
Popple has quit [Quit: Computer has gone to sleep.]
AdmiraI has joined #ruby
<bnagy> we're injecting some array into the memo, and then modifying that with each of the modifiers in turn, aren't we?
<g0th> wait a second
<g0th> what
<pontiki> what is the initial value of keys?
<g0th> its a list
<pontiki> k
<g0th> what I want is:
<g0th> keys2=m[0].fun(keys)
funburn has joined #ruby
<g0th> then keys3=m[1].fun(keys2)
<bnagy> so every item in modifiers is going to be called m, and m.fun( some_ary ) will be called and that array result stored in i
brennanMKE has quit [Ping timeout: 245 seconds]
<g0th> that sounds right
<g0th> so is my order correct?
aryaching has joined #ruby
<bnagy> call i key_array and m modifier_item
<pontiki> actually,... i don't think so here
<volty> the code is ok, what could be wrong is one of your fun
<bnagy> if that sounds right then yeah
<pontiki> i & m are backwards
<pontiki> in the |i,m| , it should be |m,i|
<volty> no
<g0th> I don't think so
<pontiki> no?
<czhang_______> the memo goes first
<volty> but he's naming in a weird name
<pontiki> hmm
<bnagy> ^^
<g0th> I have to debug to find what goes wrong, sigh
<g0th> not that command it seems
proxie has quit []
diegoviola has joined #ruby
rupee has joined #ruby
<bnagy> modifiers.inject(things_to_modify) {|things,modifier| things = modifier.modify( things )}
<pontiki> yeah, ok
lfox has quit [Quit: ZZZzzz…]
sepp2k1 has quit [Read error: Connection reset by peer]
<g0th> is there a way to print stuff inside inject block?
<pontiki> p
<bnagy> yeah everything normal works
<volty> newval = modifiers.inject(oldval) { |val, obj| obj.fun(val) }
<g0th> doesnt that give problem with the return?
<volty> ops
<volty> wrong
<bnagy> just make sure the last thing evaluated is your list
<volty> i got it
<g0th> ah ok
<volty> maybe
<AdmiraI> I'm having issues with spawning processes in ruby. I'm trying to run a (somewhat long-running) external command and kill it after a certain period.
<g0th> so I put a ";"
<g0th> and then what I want
<czhang_______> make it a block
katsrc has quit [Read error: Connection reset by peer]
<czhang_______> .inject(x) do |a, b|
<czhang_______> p whatever
<pontiki> it already is a block
proxie has joined #ruby
<czhang_______> no i mean a multiline one
<czhang_______> don't use semicolons
benzocoumaran35 has quit [Ping timeout: 246 seconds]
<g0th> got it thanks
<g0th> I think I found the error
snovak has joined #ruby
<g0th> in the examples I used the list is rather small and actually is already size 1 after the first step
__userna1 has joined #ruby
<g0th> so I think my functions don't behave as I expected for list size 1
<volty> ah !
lfox has joined #ruby
<g0th> (in this specific example)
<volty> newval = modifiers.inject(oldval) { |val, obj| r = obj.fun(val); puts r; r }
<volty> next time
<g0th> yes, thanks
lfox has quit [Client Quit]
<g0th> they use shift
<g0th> damn
benzocoumaran35 has joined #ruby
<g0th> shift returns nil if empty
mac_ has quit [Remote host closed the connection]
<g0th> I have to catch that
<bnagy> but shift never returns an array
<volty> unless the element is an array
<bnagy> zing!
<bnagy> :)
<volty> :)
petey has joined #ruby
<bnagy> you can use drop(1) if you want the array not the element
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<g0th> !
<g0th> that's it
<g0th> no wonder I got strange results
gwb3 has joined #ruby
lfox has joined #ruby
hashpuppy has quit [Quit: Computer has gone to sleep.]
<g0th> really?
bobinator60_ has joined #ruby
<g0th> shift(n) must return an array, no?
<g0th> how else can it return multiple things?
<bnagy> >> [ [1,2,3].shift, [1,2,3].drop(1) ]
<eval-in> bnagy => [1, [2, 3]] (https://eval.in/50718)
IceyEC has joined #ruby
<bnagy> shift gives you what was shifted, drop gives you what's left
iliketurtles has joined #ruby
<g0th> >> [ [1,2,3].shift(1), [1,2,3].drop(1) ]
<eval-in> g0th => [[1], [2, 3]] (https://eval.in/50719)
<IcyDragon> O: drop
<IcyDragon> Now thats nifty
ehc has quit [Quit: ehc]
cody-- has joined #ruby
<g0th> shift(n) gives array
<g0th> shift gives element
<volty> and that isn't coherent
cody-- has quit [Client Quit]
<volty> while drop is coherent
snovak has quit [Ping timeout: 246 seconds]
<g0th> what's faster
<g0th> shift or drop?
<g0th> it actually really matters here
<BraddBitt> if i want to turn an array into a string, but start from the 3rd indice, how can I do that?
<volty> ops, sorry
<g0th> because I apply it on exp. many things
<volty> i'm wrong, they are both coherent
<pontiki> g0th: what do want at the end?
phantasm66 has joined #ruby
<g0th> well
<bnagy> BraddBitt: ary[2..-1] make into string somehow eg join
<BraddBitt> oh right
<pontiki> the array or the shifted element(s)?
<BraddBitt> perfect ty bnagy
<g0th> I want a density of some random variables
cody-- has joined #ruby
<g0th> so I take all permutations of the possible values
<g0th> and evaluate a list of functions on them
<g0th> sum this up
<g0th> and use it as a key in a hash
rupee has quit [Quit: Leaving]
<g0th> at this key the values is increased by the corresponding probability
<pontiki> that was a little higher level than i was asking, but ok :)
<pontiki> i meant: "do you want the shifted elements, or just the remainder of the array" ?
KobraKao has quit [Ping timeout: 260 seconds]
<g0th> whatever is faster
<tylersmith> i love ruby, but if you're trying decide if you should use #shift or #drop from a performance standpoint, maybe you don't want ruby
<g0th> I sort the array before
<pontiki> you are missing the point of the question
<g0th> so I can choose the sorting algorithm
<pontiki> shift returns something different than drop, right?
<g0th> so I can choose what comes first and what comes last
<volty> no
<g0th> yes?
<g0th> in the sorting algorithm
i_s has joined #ruby
Nogbit has quit [Ping timeout: 245 seconds]
<BraddBitt> msg = parts[3..-1].join(" ")[1..-1]
<bnagy> I dread to ask, but what are you _actually_ doing?
<BraddBitt> is this acceptable ruby
<BraddBitt> xD
<volty> shift is ok, coherent, just use it with a param, even if only one
nomenkun has joined #ruby
<g0th> bnagy: calculating die density functions
<volty> [1,2,3].shift => 1, [1,2,3].shift(1) => [1]
benzocoumaran35 has quit [Ping timeout: 248 seconds]
<g0th> yep
endash has quit [Quit: endash]
<g0th> I do that
<bnagy> g0th: link?
<pontiki> g0th: benchmark it
<pontiki> then decide
<g0th> I didn't apply the current change yet
<volty> guys, you'd better study the theory of strings .... :)
<g0th> (because it's not working properly yet)
<pontiki> get it working however first
heidi has quit [Quit: Leaving.]
<pontiki> then worry about making it fast
cody-- has quit [Client Quit]
<g0th> yep
<volty> and use good names for your variables
nomenkun has quit [Read error: Operation timed out]
<g0th> I always used i for inject
<g0th> so I am kind of used to it
<volty> thinking also about poor ppl you may be asking
<g0th> you got a point there
<pontiki> this mousie gets confused