apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste >3 lines of text on gist.github.com || Rails is in #rubyonrails || Log: http://irclog.whitequark.org/ruby
banseljaj is now known as imami|afk
test34 has joined #ruby
aeufemio has joined #ruby
test34- has quit [Ping timeout: 244 seconds]
niku4i has quit [Remote host closed the connection]
minijupe has quit [Quit: minijupe]
iocor has quit [Quit: Computer has gone to sleep.]
adamkittelson has joined #ruby
ChampS666 has quit []
Banistergalaxy has joined #ruby
adamkittelson has quit [Remote host closed the connection]
EvanR has joined #ruby
EvanR is now known as Guest4231
mikepack has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
baniseterfiend` has quit [Remote host closed the connection]
nowthatsamatt has left #ruby [#ruby]
LordDoskias has quit [Quit: Leaving]
Guest4231 has quit [Ping timeout: 244 seconds]
brianpWins has quit [Read error: Connection reset by peer]
brianpWins has joined #ruby
tomb__ has quit [Ping timeout: 245 seconds]
ereslibre_laptop has quit [Quit: No Ping reply in 180 seconds.]
ereslibre has joined #ruby
ereslibre has quit [Changing host]
ereslibre has joined #ruby
nobdraisentone has left #ruby [#ruby]
<Synthead> How can I turn a string like "0a81" into a hex, 0x0a81 ?
dagobah has quit [Remote host closed the connection]
mneorr has quit [Ping timeout: 245 seconds]
shevy has quit [Ping timeout: 245 seconds]
AlbireoX`Laptop has joined #ruby
mneorr has joined #ruby
shevy has joined #ruby
tomb__ has joined #ruby
<eph3meral> Synthead, hmm... I'm not sure about that, I do know you can convert between strings and binary via String.to_i(2) and Integer.to_s(2)
<eph3meral> Synthead, i would imagine that may work for hex too, just use bas 16 instead of base 2
finch has joined #ruby
<eph3meral> Synthead, someone else probably knows better
hashset has joined #ruby
<finch> Hey folks, quick question - if I have a class defined like class Sub < Super; def self.foo; end; end and I want to invoke Super.foo from Sub.foo, what's the best way to do this?
<finch> That is, how should inheritance work with class level methods?
dagobah_ has joined #ruby
<eph3meral> just call super
<eph3meral> you don't need anything special
<eph3meral> finch, when you call super, it will call, the method, of the same name as the one you're in, but on the parent class
<finch> You're kidding. If it's that simple I will be both thrilled and humiliated because FUCK YEAH RUBY but I sould have tested it myself
<finch> I assumed it would only operate on the instance level methods
<eph3meral> oh, well hmm, yeah I guess I don't know for 100% sure
<eph3meral> re: class methods
<eph3meral> but, I would imagine it works the same
<finch> yeah, that gets a bit weird. Might as well test, but nothing sounds too insane about my plan, right?
<eph3meral> although, if it's a class method, essentially, you can call MyParentClassName.foo
<eph3meral> finch, lol, actually I don't know what your "plan" is, give us a pastebin with a test scenario
<eph3meral> that is a good question though, whether super works on class methods, I've never had a real need to use that
<eph3meral> again, you can just use the actual class name, as you would normally
cryptfu has quit [Quit: Leaving]
<eph3meral> finch, that's not a test case, that's domain specific application code
<finch> Straight up copy/paste, but I would rather use something akin to super instead of hardcoding another class name. Not sure if it's justified, but something itches at me by doing Parent.foo
<eph3meral> finch, yeah testcase != "straight up copy and paste"
<eph3meral> at least not 99% of the time
<finch> Erm, pardon, you're meaning like a unit test as opposed to an implementation
<finch> correct?
<eph3meral> finch, i'm saying I'm too lazy to decipher your code :P
<eph3meral> finch, I'm saying make a test case, a generic one
<eph3meral> that's simple
<eph3meral> many fewer lines
andrewhl has joined #ruby
<finch> but lazy!
* finch lazy, that is
Konboi has joined #ruby
libertyprime has joined #ruby
carloslopes has joined #ruby
<finch> eph3meral: https://gist.github.com/2907840 you were right, thank you for encouraging me to write this!
<finch> I was thinking too narrowly, and appreciate you giving me that kick
<Synthead> is there a way I can apply to_i to each element in an array without a block?
cj3kim has quit [Quit: This computer has gone to sleep]
<heftig> .map(&:to_i)
Monofu has joined #ruby
jeffreybaird has joined #ruby
ukd1 has quit [Quit: ukd1]
<eph3meral> finch, no problem
AlbireoX`Laptop has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
<Banistergalaxy> Heftig sup hefty
<heftig> yo
Monofu has quit [Quit: quit]
gtuckerkellogg has joined #ruby
eywu has joined #ruby
<Enekoos> any know transmission ruby gem? http://rubydoc.info/gems/transmission/0.1.0/frames I try it but not download :/
minijupe has joined #ruby
akem has quit [Ping timeout: 244 seconds]
liluo has quit [Remote host closed the connection]
peterhil` has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
baroquebobcat has joined #ruby
igotnolegs has joined #ruby
ZachBeta has joined #ruby
jeff_sebring has joined #ruby
sbanwart has joined #ruby
wallerdev has quit [Quit: wallerdev]
<eph3meral> is there a way to concurrently map/each/iterate two arrays side by side?
<eph3meral> like if I had an array of keys, and an array of values
<eph3meral> and the indexes of one array correspond to the items in another
<eph3meral> I mean, like a "functional" way to do this, ideally without using, e.g. counters or indexes
<eph3meral> i have a list of inputs, and a list of multipliers
<eph3meral> well, no actually I have a list of objects, and then I have a list of multipliers, each multiplier needs to be assigned to the object with the same/corresponding index
micsha has joined #ruby
looopy has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
<micsha> Does anyone know if it's possible for the core ruby (1.9.3) language to work with, i.e. manipulate and/or write, raw binary data?
jeff_sebring has quit [Remote host closed the connection]
<eph3meral> micsha, sure
<micsha> ok, how?
<eph3meral> micsha, what do you want to do to it? ruby has bitwise operators, Files I believe can also be opened in binary
<micsha> I need to receive a binary blob of data from a tcp stream and process the data as a binary blob and write it to a file
<akem> you need 2 plugins for that, one for the 0 and the other for the 1 (:
looopy has joined #ruby
<micsha> thus far, ruby has been nothing but a nightmare to try to solve this problem due to it's almost arbitrary data type changes and restrictions
Juul has joined #ruby
jeff_sebring has joined #ruby
<eph3meral> micsha, too bad for you, ruby's been a dream come true for me - well, with the exception of many of the inhabitants of this channel :P
<eph3meral> micsha, I manipulate binary with ruby, not from a TCP stream, but still, ruby has pretty decent binary manipulation features
<micsha> I'm seriously trying to like ruby but right now the only thing I feel when I code ruby is rage
<micsha> well, I need to entirely cut parts of the binary blob out, reading it into an array can't do that for me, dropping parts of the binary blob and writing others causes problems.
liluo has joined #ruby
baniseterfiend` has joined #ruby
stephenjudkins has quit [Read error: Connection reset by peer]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
phantasm66 has quit [Quit: *poof*]
mikepack has quit [Remote host closed the connection]
ten00 has joined #ruby
Banistergalaxy has quit [Ping timeout: 244 seconds]
ten00 has left #ruby [#ruby]
gmci has quit [Read error: Connection reset by peer]
olrrai has joined #ruby
jenrzzz-mac has joined #ruby
Banistergalaxy has joined #ruby
D4rkM4s73r777 has quit [Remote host closed the connection]
ciopte7 has quit [Quit: ciopte7]
micsha has left #ruby [#ruby]
gmci has joined #ruby
ciopte7 has joined #ruby
stephenjudkins has joined #ruby
jenrzzz-mac has quit [Client Quit]
ciopte7 has quit [Client Quit]
Banistergalaxy has quit [Ping timeout: 256 seconds]
carloslopes has quit [Quit: Leaving]
jenrzzz-mac has joined #ruby
jenrzzz-mac has quit [Read error: Connection reset by peer]
jeff_sebring has quit [Remote host closed the connection]
jenrzzz-mac has joined #ruby
noganex has quit [Quit: Eagles may fly, but a weasel will never be sucked into a jet engine.]
graspee has quit [Quit: too late!]
replore_ has joined #ruby
<Synthead> Thought I would share something I just wrote :) This script controls those USB dart launchers with libusb, enjoy http://codepad.org/v9h3ziYw
hemanth__ has quit [Read error: Connection reset by peer]
hemanth__ has joined #ruby
hashset has quit [Remote host closed the connection]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
chessguy has quit [Remote host closed the connection]
hashset has joined #ruby
Juul has quit [Ping timeout: 245 seconds]
rizzylt has quit [Ping timeout: 244 seconds]
jenrzzz-mac has joined #ruby
seanstickle has quit [Quit: seanstickle]
mrdtt has joined #ruby
wallerdev has joined #ruby
minijupe has quit [Quit: minijupe]
adeponte has joined #ruby
macgregor_ has joined #ruby
shtirlic has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
iori has joined #ruby
adeponte has quit [Remote host closed the connection]
yoklov has quit [Quit: bye!]
<eph3meral> ok, is it just me, or is this an anomaly/bug?
gloomer has quit [Ping timeout: 260 seconds]
ten00 has joined #ruby
gloomer has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
<eph3meral> oh, wait
ten00 has left #ruby [#ruby]
<eph3meral> er, wait, nope it was just my pebcak :P
<baniseterfiend`> eph3meral: what's a pegcak
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
jimeh has quit [Ping timeout: 245 seconds]
<Synthead> baniseterfiend`: problem exists between computer and keyboard
sleetdrop has joined #ruby
<baniseterfiend`> Synthead: oh ok th
<Synthead> baniseterfiend`: or, problem exists between chair and keyboard, rather
shevy2 has joined #ruby
<Synthead> baniseterfiend`: hah. same as an id-ten-t error
moshee has quit [Ping timeout: 246 seconds]
<heftig> or an OSI Level 8 issue
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<Synthead> heftig: what's that one?
<heftig> er, Layer 8
<baniseterfiend`> heftig: hey heft, what's up
<heftig> nothing
<baniseterfiend`> heftig: still in germany?
<heftig> yes
foo-bar- has joined #ruby
<baniseterfiend`> hey is anyone here on forrst?
sleetdro_ has joined #ruby
shevy has quit [Ping timeout: 244 seconds]
sleetdrop has quit [Read error: Connection reset by peer]
Tricks has quit [Ping timeout: 244 seconds]
friskd has quit [Quit: friskd]
Tricks has joined #ruby
yonggu has joined #ruby
yonggu has quit [Remote host closed the connection]
shtirlic_ has joined #ruby
yonggu has joined #ruby
kah_ has quit [Remote host closed the connection]
MrGando has joined #ruby
looopy has quit [Remote host closed the connection]
Tricks_ has joined #ruby
shtirlic has quit [Ping timeout: 244 seconds]
ciopte7 has joined #ruby
Tricks has quit [Ping timeout: 244 seconds]
dbgster has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
yonggu_ has joined #ruby
ken_barber1 has joined #ruby
cj3kim has joined #ruby
Tricks_ has quit [Read error: Connection reset by peer]
<MrGando> hey guys, I've been using ruby for a while now, but I feel like I'm just scratching the language surface... I never followed a book on thesubject. Could anyone recommend a good book?
ken_barber has quit [Ping timeout: 240 seconds]
<deryl> The Well Grounded Rubyists and work it end to end
<deryl> Rubyist
test34 has quit [Ping timeout: 250 seconds]
jenrzzz-mac has joined #ruby
yonggu has quit [Ping timeout: 260 seconds]
<baniseterfiend`> MrGando: also eloquent ruby, and metaprogramming ruby
looopy has joined #ruby
Tricks has joined #ruby
<MrGando> which one should I try first ?
<MrGando> :)
<deryl> you know what I'm going to say
<MrGando> ok!!
cj3kim has quit [Client Quit]
macgregor_ has quit [Ping timeout: 265 seconds]
wvdschel has quit [Remote host closed the connection]
Karmaon has quit [Quit: WeeChat 0.3.8-rc2]
ken_barber1 has quit [Remote host closed the connection]
Karmaon has joined #ruby
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
sepp2k has quit [Remote host closed the connection]
x0F_ has joined #ruby
x0F has quit [Disconnected by services]
x0F_ is now known as x0F
fixl has joined #ruby
Targen has quit [Ping timeout: 244 seconds]
perryh_away is now known as perryh
moosya has quit [Quit: moosya]
libertyprime has quit [Quit: Lost terminal]
libertyprime has joined #ruby
wallerdev has quit [Quit: wallerdev]
DanBoy has quit [Remote host closed the connection]
beandip has quit [Quit: WeeChat 0.3.2]
beandip has joined #ruby
foo-bar- has quit [Read error: Connection reset by peer]
foo-bar-_ has joined #ruby
<RubyPanther> MrGando: normally you would read the whole "pickaxe" book first, and then "Well Grounded"
<RubyPanther> The only thing that can really replace Pickaxe as the basic primer would be Matz' book
<offby1> I tried ordering "The Ruby Way" from the local library, but it was missing
<offby1> ugh. Manning
rossfuhrman has quit [Ping timeout: 246 seconds]
<baniseterfiend`> offby1: hink u'd thinkd 'metaprogramming ruby'
<baniseterfiend`> you'd like*
<baniseterfiend`> sorry
cryptfu has joined #ruby
<offby1> eventually probabl
<offby1> y
<offby1> I suspect it's all about "eval"
<offby1> and simulating macros with eval "some_#{thing}"
moosya has joined #ruby
<GeekOnCoffee> I'm reading through metaprogramming ruby right now, it's great
<offby1> yeah, but you're a geek, and you're on coffee.
<offby1> in #git there's a frog, on wheels.
wvdschel has joined #ruby
Bosma has quit [Ping timeout: 244 seconds]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
* Enekoos se despide
Enekoos has quit [Remote host closed the connection]
seanstickle has joined #ruby
palmfrond has quit [Read error: Connection reset by peer]
sspiff has quit [Ping timeout: 260 seconds]
jenrzzz-mac has joined #ruby
<baniseterfiend`> offby1: no it's not
<baniseterfiend`> offby1: metaprogramming in ruby is hardly ever about eval
<baniseterfiend`> offby1: eval is a last resort and easily avoided in 99% cases
<offby1> huh
<offby1> as is the case in Lisp-land
walterheck has joined #ruby
<seanstickle> And not the case in Python land
<baniseterfiend`> offby1: most metaprogramming stuff can be achived with: define_method, instance_eval, class_eval (these are not string-based evals), method_missing, and so on
<seanstickle> metaprogramming in Python is the suck
<seanstickle> Enjoy the beauty of Ruby!
<eph3meral> offby1, send
<offby1> eph3meral, receive
<offby1> baniseterfiend`: so how many variants of your nick do you use? Or do you just randomly change 'em as the impulse strikes you?
<baniseterfiend`> offby1: pry uses eval though, but the more exotic Binding#eval variant, u like it
itnomad_ has joined #ruby
<baniseterfiend`> offby1: i connect via about 4 differnet machines, so whichever one i am on that needs to join registered chans uses the canonical nick, other connections get changed to random variants
ipoval has joined #ruby
<offby1> *gasp* you don't use screen! tsk tsk tsk
* offby1 waggles a finger
itnomad_ has quit [Client Quit]
<baniseterfiend`> offby1: why dont you use tmux
itnomad has quit [Quit: Leaving]
palmfrond has joined #ruby
<offby1> not enough better than screen to warrant the effort it'd take to learn
Limb has joined #ruby
frishi has joined #ruby
itnomad has joined #ruby
sbanwart has quit [Ping timeout: 245 seconds]
emmanuelux has quit [Ping timeout: 264 seconds]
<baniseterfiend`> offby1: did u know that the ruby stack frame can be accessed as an object
<offby1> I suspected.
<offby1> I've meant to poke around inside "caller"
<offby1> and "binding"
<baniseterfiend`> offby1: no, caller is nothing
<baniseterfiend`> caller is just a backtrace
<baniseterfiend`> yeah, binding is the dude
<baniseterfiend`> offby1: so u can save a stackframe whenever u want, and introspect on it later
<baniseterfiend`> it's pretty powerful
<baniseterfiend`> offby1: in fact that's what pry is, pry just allows interactive introspection of stack frames
stefanp_ has joined #ruby
<baniseterfiend`> any stack frame at all, u can capture then with a call to 'binding'
<offby1> I was rendering some stuff using ERB, and I realized that I wanted every "nil" value to render as "N.A." (rather than the default, which is the empty string). I considered adding a to_s method on the nil object, but that seemed too horrible. Then I considered somehow whopping the bindings, to insert such a method (the advantage being that my to_s method would have no effect outside of the call to ERB). But I couldn't figure out how
<offby1> to do it; "binding" seems to have no API.
foo-bar- has joined #ruby
<baniseterfiend`> and then just invoke pry on that binding at your leisure to see what thwas going on in that frame at the time
foo-bar- has quit [Remote host closed the connection]
<baniseterfiend`> offby1: it doesn't, u just eval() in the context of the binding to find out what u want
<baniseterfiend`> offby1: an API would be too limiting :P 'eval' gives you access to absolutely everything
<offby1> hmm
<offby1> food for thought indeed.
<baniseterfiend`> offby1: in fact, if u call 'binding' on the callers of a method then u can interactively walk up and down the entire call stack
<baniseterfiend`> offby1: that's the basis of this project: https://github.com/pry/pry-stack_explorer
Juul has joined #ruby
<baniseterfiend`> that no one seems to use :P
<baniseterfiend`> well, i have about 2 or 3 users anyway
foo-bar-_ has quit [Ping timeout: 244 seconds]
tty0pts has quit [Ping timeout: 240 seconds]
stefanp has quit [Ping timeout: 265 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
ZachBeta has quit [Read error: Connection reset by peer]
wvdschel has quit [Ping timeout: 260 seconds]
ZachBeta has joined #ruby
frishi has quit [Quit: Leaving...]
ZeroModulus_ is now known as ZeroModulus
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
<[Neurotic]> hey guys - pretty new to Ruby (coming from JVM based langauges) so the whole 'Gem' think is messing with my head. Question is - say I want to connect to mysql to do some basic SQL queries. I see I can do a 'gem install mysql' - then how do I deploy this? (it's just a process that will be called via cron most likely) - do I make a rake file to install the required gems? how does that work?
<[Neurotic]> Sorry - I should say, i write my code to do the SQL with the mySQL gem - how them do I deploy this? I can deploy the code up to my machine, but how does the gem get there? do I need to manually install that as well?
Bosma has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
looopy has quit [Remote host closed the connection]
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
looopy has joined #ruby
codezombie has joined #ruby
<seanstickle> [Neurotic]: it's like a jar file.
<seanstickle> [Neurotic]: deployment is not undifferent
<seanstickle> But somewhat similar
<[Neurotic]> but with a .jar file I can just copy it
<[Neurotic]> From my reading - seems like people use Bundler to define gem dependencies
<[Neurotic]> and that automates much of the process?
<[Neurotic]> and that will install / update control which gems are installed?
<[Neurotic]> Would that be correct?
<seanstickle> Bundler is a popular way, yes.
<seanstickle> You still need to run "bundle" on the target server
minijupe has joined #ruby
<[Neurotic]> yah, that makes sense
cj3kim has joined #ruby
<[Neurotic]> I assume the other way would be with Rake or some other tool?
bradhe_ has joined #ruby
Banistergalaxy has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
vitoravelino is now known as vitoravelino`afk
DesiJat has joined #ruby
Tricks_ has joined #ruby
Tricks has quit [Read error: Connection reset by peer]
nilg` has joined #ruby
bradhe has joined #ruby
bradhe_ has quit [Ping timeout: 244 seconds]
Juul has quit [Read error: Operation timed out]
bradhe_ has joined #ruby
kstephens has quit [Quit: PredictTheFuture]
bradhe has quit [Ping timeout: 265 seconds]
emdub has quit [Quit: new kernel]
seanstickle has quit [Quit: Nihil sub sole novum]
AlbireoX`Laptop has joined #ruby
emdub has joined #ruby
<[Neurotic]> So correct me if I'm wrong (please) - but for deployment, i could just use a gemspec and bundle up my code in a gem, and all should be well in the world. However, for doing development and passing code around to other developers, Bundler makes life easier, because it allows other devs to just do 'bundle install' and they are up and moving - whereas they would have to do manual gem installation to get up and running with just a gemspec, yes?
azm has quit [Ping timeout: 248 seconds]
kstephens has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
fayimora has quit [Quit: Busy…..zzzzz]
Targen has joined #ruby
fayimora has joined #ruby
eywu has quit [Quit: Leaving.]
emdub has quit [Quit: .]
emdub has joined #ruby
khakimov has joined #ruby
dbgster has quit [Quit: dbgster]
davidokner has joined #ruby
davidokner has left #ruby [#ruby]
AlbireoX`Laptop has quit [Ping timeout: 245 seconds]
maletor has joined #ruby
hemanth__ has quit [Read error: Connection reset by peer]
hemanth__ has joined #ruby
Markvilla has quit [Quit: Markvilla]
gloomer has quit []
nowthatsamatt has joined #ruby
nowthatsamatt has left #ruby [#ruby]
<eph3meral> [Neurotic], bundler
savage- has joined #ruby
<eph3meral> [Neurotic], all you need to do for any project, is you add a file called Gemfile to your project root folder, run `bundle install` on the command line and then add: require 'bundler/setup' to your app at some point
yonggu_ has quit [Remote host closed the connection]
yonggu has joined #ruby
<[Neurotic]> eph3meral, thanks. That looks like what I am starting to do here. Bundler looks like it should make it easy. I don't see a reference to needing 'bundler/setup' though, I will look that up
<[Neurotic]> eph3meral, oh I see it!
<eph3meral> [Neurotic], one nice thing about the Gemfile, is you can tell it to pull the gems from various places other than a standard packaged/distributed gem from rubygems.org
<eph3meral> [Neurotic], i.e. you could point it at your own git repo on a private server
<eph3meral> [Neurotic], where you've written a gem
<[Neurotic]> ah that is nice
<eph3meral> [Neurotic], or you could point it to a location on disk
<eph3meral> where you have a gem that you're writing
<eph3meral> [Neurotic], look in to the :path => "", and :git => "" options in gemfile
<eph3meral> Gemfile (capitalization matters)
<eph3meral> [Neurotic], if you come from the JVM world you should check out jruby and rbj
<eph3meral> blerp... rjb
<[Neurotic]> yah, I did a bundle gem projectname to get a basic skeleton happening
<[Neurotic]> eph3meral, yeah, we are running jruby for exactly that reason
<eph3meral> ah, ok cool
<eph3meral> yeah, so you probably are aware, you can only run pure-ruby gems
<eph3meral> as in, no C based extensions
<eph3meral> if that's the reason you're using it though, i doubt you'll come across that as being a problem :)
<[Neurotic]> aah - good point. That will influence how I do this mysql stuff
<[Neurotic]> I think the default mysql driver is c based
<eph3meral> [Neurotic], yeah you basically have to do that with jdbc
<eph3meral> [Neurotic], yeah it is
<eph3meral> postgres as well
<[Neurotic]> whereas there is a pure ruby version, so I'll use that one instead
<[Neurotic]> good point - thanks for the heads up
<eph3meral> oh really? hmm, i didn't know there was a "pure ruby" mysql gem?
<eph3meral> what's it called?
<[Neurotic]> i think so..
<[Neurotic]> lemme see what I found..
<eph3meral> i would use jdbc over that, IMO
fayimora has quit [Quit: Busy…..zzzzz]
<eph3meral> i mean, if you're a java person
<eph3meral> ahh, indeed
<eph3meral> ok, well sure I suppose you can do that
Hanmac1 is now known as Hanmac
hunglin has quit [Quit: Leaving.]
<[Neurotic]> the interesting question is.. if I do a 'gem "mysql" - will it know to get the right one
replore_ has quit [Remote host closed the connection]
<[Neurotic]> hmnn.. or do I use something like DBI which seems much more agnostric
<[Neurotic]> (sorry - trail of thoughts flowing out my head)
<[Neurotic]> Thanks for your help eph3meral
frishi has joined #ruby
frishi has quit [Client Quit]
elico has quit [Read error: Connection reset by peer]
Guest1343 has quit [Quit: Leaving]
hemanth__ is now known as hemanth
elico has joined #ruby
nlc has quit [Remote host closed the connection]
elico has quit [Read error: Connection reset by peer]
elico has joined #ruby
elico has quit [Client Quit]
elico has joined #ruby
<eph3meral> [Neurotic], well
<eph3meral> [Neurotic], to be sure, you could just download the one from the mysql site
<eph3meral> [Neurotic], if it comes packaged as a .gem already, you can just: gem install special-mysql-1.2.3.gem
<eph3meral> [Neurotic], then subsequently, it will be available for bundler to use when you do require 'bundler/setup'; require 'mysql'
elico has quit [Read error: Connection reset by peer]
<eph3meral> [Neurotic], or, similarly, if you have the source for that mysql distribute pure native gem, then you could just point your gem file to where you downloaded and extracted the source, such as :path => "~/Downloads/ruby-mysql/"
trend has quit [Disconnected by services]
vitor-br has quit [Quit: Saindo]
<[Neurotic]> from the page - I can just do: 'gem install ruby-mysql' so couldn't I just include it in my Gemfile as 'gem ruby-mysql' ?
Sheehan has joined #ruby
nipra has joined #ruby
<eph3meral> [Neurotic], oddly enough, they seem to have docs http://www.tmtm.org/en/ruby/mysql/
<eph3meral> [Neurotic], well it might not be a defacto "gem" per se
elico has joined #ruby
<eph3meral> some things you need to install by running e.g. ruby setup.rb or ruby install.rb
<eph3meral> like rubygems itself for example
baniseterfiend` has quit [Remote host closed the connection]
itnomad has quit [Quit: Leaving]
<[Neurotic]> seems it is
<[Neurotic]> <[Neurotic]> from the page - I can just do: 'gem i
eft has joined #ruby
<[Neurotic]> whoops
elico has quit [Read error: Connection reset by peer]
yonggu has quit [Read error: Connection reset by peer]
rippa has joined #ruby
<eph3meral> [Neurotic], "You can install MySQL/Ruby..." and earlier "MySQL/Ruby is built on top of the MySQL C API"
yonggu has joined #ruby
<[Neurotic]> This is starting to sound like something I'm just going to have to try and see what happens
<eph3meral> [Neurotic], http://www.tmtm.org/en/ruby/mysql/ is the pure ruby version
<eph3meral> [Neurotic], "Ruby/MySQL" aka it's "ruby first, mysql second"
* Hanmac prefer native gems :P
<eph3meral> nothing on the home page says anything about being able to install *that* with gem install
<eph3meral> [Neurotic], only the native C gem is available via "gem install foo"
<eph3meral> [Neurotic], follow the instructions here http://www.tmtm.org/en/ruby/mysql/
<eph3meral> [Neurotic], if they don't work, then come back and maybe tell us what went wrong, pastie.org with the error, etc
<[Neurotic]> yeah, just going to give is a crack
jacobw has quit [Ping timeout: 248 seconds]
<[Neurotic]> another stupid question - with Bundler, do I need to put required "bundler/setup" anywhere particular, or it doesn't matter?
walterheck has quit [Quit: Computer has gone to sleep]
jacobw has joined #ruby
Sheehan has quit [Quit: Sheehan]
<[Neurotic]> oooh
<[Neurotic]> bundler/setup includes the items specified in the Gemfile? (is that right?)
krz has joined #ruby
dagnachewa has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
minijupe has quit [Quit: minijupe]
kylemcgill has quit [Remote host closed the connection]
werdnativ has joined #ruby
Sheehan has joined #ruby
roams has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
boredomist has quit [Quit: ZNC - http://znc.sourceforge.net]
Sheehan has quit [Quit: Sheehan]
BlankVerse has joined #ruby
<BlankVerse> how do i load a sinatra app into irb and debug/edit my database?
t0mmyvyo has quit [Quit: http://twitter.com/tommyvyo]
Sheehan has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
<burgestrand> BlankVerse: you start IRB and require whatever you need from your app (usually everything)
<burgestrand> Nothing special about it
Sheehan has quit [Client Quit]
ZeroModu_ has joined #ruby
<eph3meral> [Neurotic], yes that's exactly what it does
<eph3meral> [Neurotic], so, presumably, you'll need/want to put it some where early
<[Neurotic]> eph3meral, sweet. that makes a lot of sense. Thanks
banisterfiend has joined #ruby
<[Neurotic]> oh - so you don't have to repeat a require statement in each .rb file that needs it?
<eph3meral> [Neurotic], i dunno how you're structuring your app
<[Neurotic]> splitting up into seperate .rb files for classes
<eph3meral> banisterfiend, o.0
<eph3meral> [Neurotic], yes, what about it?
<[Neurotic]> it's okay - I'll work it out ;)
<[Neurotic]> easier to try and fail, than explain
jeff_sebring has joined #ruby
Gavilan has left #ruby [#ruby]
AlbireoX`Laptop has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
<eph3meral> [Neurotic], DRY is better
ZeroModulus has quit [Ping timeout: 240 seconds]
mikeycgto has quit [Read error: Connection reset by peer]
AlbireoX`Laptop has quit [Remote host closed the connection]
<eph3meral> [Neurotic], http://en.wikipedia.org/wiki/Don't_repeat_yourself if you weren't yet aware
<[Neurotic]> ya no worries
<[Neurotic]> more of a technical requirement of ruby I'm not yet understanding - but I'll get there
voodoofish has quit [Ping timeout: 240 seconds]
dagnachewa has quit [Quit: Leaving]
digitalcakestudi has quit [Ping timeout: 245 seconds]
yxhuvud has joined #ruby
Synthead has quit [Ping timeout: 244 seconds]
<banisterfiend> eph3meral: is there ever a time when u look at that little '3' in your nickname and just *SIGGGGH* ?
<banisterfiend> :P
cj3kim has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Client Quit]
twodollarz has quit [Ping timeout: 240 seconds]
ph^ has joined #ruby
mark_ has joined #ruby
bradhe_ has quit [Remote host closed the connection]
mark_ is now known as voodoofish431
pooja has joined #ruby
koskoz has joined #ruby
prtksxna has joined #ruby
<koskoz> hi, I'm trying to load erb view based on route param. I do this: get '/:page' do erb params[:page].to_s end
<koskoz> but the thing is my view doesn't load, instead I have the param which prints in my layout
<eph3meral> koskoz, wrong channel I think
<eph3meral> koskoz, sounds like you want either #rubyonrails or @sinatra maybe
nipra has quit [Read error: Operation timed out]
burgestrand has quit [Quit: Leaving.]
<koskoz> eph3meral: it's sinatra but I thought it was a generic ruby issue
<eph3meral> koskoz, nope
<koskoz> maybe I don't know how to pass correctly a var to the function (I guess erb is a function which takes a string in parameter)
twodollarz has joined #ruby
<koskoz> I come from PHP so switching to Ruby isn't easy for me
aeufemio has quit [Ping timeout: 245 seconds]
hakunin has quit [Remote host closed the connection]
andrewhl has quit [Remote host closed the connection]
nipra has joined #ruby
<eph3meral> koskoz, back over here now
CheeToS has joined #ruby
<eph3meral> koskoz, because symbols will essentially never change, they perform faster
<eph3meral> koskoz, note however, that symbols and strings are *not* perfectly interchangeable, though they serve the same purposes
<koskoz> ok, I see.
<koskoz> but what I don't get is why erb doesn't take a string
nirakara has joined #ruby
akem has quit [Ping timeout: 256 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
<Hanmac> koskoz: and never generate symbols from user input or in a loop until you REALY know what you do
icooba has joined #ruby
djdb has joined #ruby
<koskoz> Hanmac: ok
fantazo has quit [Remote host closed the connection]
artOfWar has joined #ruby
artOfWar has quit [Remote host closed the connection]
artOfWar has joined #ruby
proghat has joined #ruby
wvdschel has joined #ruby
timonv has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
sspiff has quit [Ping timeout: 260 seconds]
proghat has quit [Client Quit]
ananthakumaran has joined #ruby
fridim_ has joined #ruby
koskoz has quit [Ping timeout: 246 seconds]
artOfWar_ has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
bosphorus has joined #ruby
nirakara has quit [Ping timeout: 245 seconds]
artOfWar has joined #ruby
cyong has joined #ruby
SecretAgent has joined #ruby
<Karmaon> Hi, would you guys storing currencies as integers instead of BigDecimals to perform arithmic on them?
<Karmaon> *would you guys recommend
heftig has quit [Quit: leaving]
vectorshelve has joined #ruby
<Boohbah> Karmaon: no, Float
shtirlic_ has quit [Read error: Connection reset by peer]
<Karmaon> Boohbah: what why?
shtirlic has joined #ruby
<Boohbah> because Floats include fractional parts
artOfWar_ has quit [Ping timeout: 246 seconds]
<Karmaon> and they loose precision.
<Karmaon> you can represent 1 usd as 1e20 or something
ajonsson has joined #ruby
nirakara has joined #ruby
<Boohbah> i suppose that depends on how much precision you need for your application
<Boohbah> are you doing market trading?
<Karmaon> Boohbah: yes
<bnagy> never use Float for money
<Boohbah> no?
<bnagy> atually never se Float for anything, really, but it's convenient if you honestly don't give a crap if the answer is at all accurate
<Karmaon> bnagy: bigdecimal('1.23123718723') or int(123123718723) ?
<bnagy> I would use bigdecimal if you ever need to divide
<bnagy> or multiply by fractions
Sheehan has joined #ruby
<Karmaon> whats wrong dividing integers?
<bnagy> which is the same thing
<bnagy> that truncates
<bnagy> 5/2 => 2
<Karmaon> well given thats all the precision i need
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
fridim_ has quit [Ping timeout: 264 seconds]
Morkel has joined #ruby
blumbri has joined #ruby
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
<Karmaon> well i guess i can let postgres do the truncating
<banisterfiend> bnagy: ltns
<banisterfiend> bnagy: how's your food poisoning
ajonsson has quit [Quit: ajonsson]
cyong has left #ruby [#ruby]
dangerousdave has joined #ruby
woaho has joined #ruby
artOfWar_ has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
ryanf has joined #ruby
ph^ has quit [Ping timeout: 260 seconds]
fabrice31 has joined #ruby
cyong has joined #ruby
cyong has quit [Quit: Leaving.]
cyong has joined #ruby
jgrevich has quit [Ping timeout: 256 seconds]
ZeroModu_ has quit [Ping timeout: 246 seconds]
cyong has quit [Client Quit]
cyong has joined #ruby
ipoval has quit [Quit: ipoval]
<vectorshelve> hemanth: hai bhai
maesbn has joined #ruby
vandemar has quit [Quit: leaving]
dubios has quit [Quit: I was never here]
<hemanth> vectorshelve, yo wasup?
dubios has joined #ruby
<vectorshelve> hemanth: nothing.. yaar had a good weekend hw abt you ?
zommi has joined #ruby
nirakara has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby
ryanf has quit [Quit: leaving]
woaho has left #ruby [#ruby]
ph^ has joined #ruby
prtksxna_ has joined #ruby
prtksxna has quit [Read error: Connection reset by peer]
ph^ has quit [Remote host closed the connection]
<hemanth> vectorshelve, pretty good, still sleepy :D
ph^ has joined #ruby
<[Neurotic]> eph3meral, - gem "ruby-mysql" worked like a charm :) no problems. Had to also include rake, but that was it.
<[Neurotic]> eph3meral, that was it
ph^_ has joined #ruby
<[Neurotic]> eph3meral, thanks for your help
qwerxy has joined #ruby
rippa has quit [Ping timeout: 245 seconds]
nirakara has joined #ruby
ph^ has quit [Ping timeout: 244 seconds]
artOfWar_ has quit [Remote host closed the connection]
rippa has joined #ruby
TheHunter_1039 has quit [Quit: TheHunter_1039]
hemanth has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
sleetdro_ has quit []
igotnolegs has quit [Quit: Computer has gone to sleep.]
sleetdrop has joined #ruby
schovi has joined #ruby
heftig has joined #ruby
rippa has quit [Ping timeout: 245 seconds]
blacktulip has joined #ruby
billiamii has quit [Quit: Leaving]
nirakara has quit [Quit: This computer has gone to sleep]
hemanth_ is now known as hemanth
davidpk has joined #ruby
elhu has joined #ruby
Criztian has joined #ruby
Kunda has quit [Quit: Kunda]
cj3kim has quit [Quit: This computer has gone to sleep]
urbann has quit [Ping timeout: 244 seconds]
blumbri has quit [Quit: leaving]
Sheehan has quit [Quit: Sheehan]
blumbri has joined #ruby
blumbri has quit [Client Quit]
d3vic3 has joined #ruby
CheeToS has quit [Ping timeout: 248 seconds]
blumbri has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
lilin has joined #ruby
dhruvasagar has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
prtksxna has joined #ruby
prtksxna_ has quit [Read error: Connection reset by peer]
<eph3meral> [Neurotic], cool, good to know
blumbri has left #ruby [#ruby]
blumbri has joined #ruby
<vectorshelve> hemanth: just had lunch going to sleep again :P
jimeh has joined #ruby
mdw has joined #ruby
berkes has joined #ruby
jimeh has quit [Ping timeout: 240 seconds]
fserb has joined #ruby
chaotic_good has joined #ruby
ABK has joined #ruby
kartouch has joined #ruby
<chaotic_good> ruby!!
<chaotic_good> hey anyone awake?
simao has joined #ruby
Facefox has quit [Remote host closed the connection]
bambanx has joined #ruby
binaryplease has joined #ruby
<bambanx> hello
Facefox has joined #ruby
baniseterfiend` has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
Shahor has joined #ruby
jenglish has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
schaerli has joined #ruby
schaerli has quit [Remote host closed the connection]
<eph3meral> so, this is what I get when I try to run rdebug
<eph3meral> any suggestions?
<chaotic_good> read the ruby programming book
<chaotic_good> 10x
hemanth has joined #ruby
Shahor has quit [Client Quit]
<bambanx> guys where i should put the else here : my_orders.each {|f| c +=1 if f['bid'] == 'True' }
mockra has joined #ruby
<bambanx> i need use a else too
<bambanx> but i dont know where i should put it
schaerli has joined #ruby
timonv has joined #ruby
francisfish has joined #ruby
<Boohbah> bambanx: wrap it in a do.. else block instead of { }
<Boohbah> bambanx: http://pastie.org/4066073
qwerxy has quit [Quit: offski]
<bambanx> thanks Boohbah i know that , but i wanna use one line
mockra has quit [Remote host closed the connection]
<Boohbah> bambanx: why not make it readable?
<bambanx> using { }
<bambanx> i need to use a lot of this code, so is more readable in one line for me
jimeh has joined #ruby
Helius has joined #ruby
<eph3meral> bambanx, you could use ternary
<bambanx> how is that?
<bambanx> with this : ?
<eph3meral> bambanx, if, you can write it all on one line as well I believe
mockra has joined #ruby
BlankVerse has quit [Quit: Lost terminal]
<Boohbah> bambanx: http://pastie.org/4066085
<eph3meral> my_orders.each { |f| if f['bid'] == 'True' f['bid'] +=1 else ... end }
<Boohbah> oops i put the |f| outside the bracket :(
<Boohbah> my error
<bambanx> thanks guys i plya with yoour code now
<bambanx> eph3meral, when i do this: my_orders.each {|f| if f['bid'] == 'True' c+=1 } give me error
<eph3meral> how long does it take to build the line cache gem?
mockra_ has joined #ruby
<bambanx> i should use ;
<eph3meral> bambanx, yes of course, you're missing the end
<bambanx> i fix
<eph3meral> bambanx, look at mine
<bambanx> i see
mockra has quit [Ping timeout: 244 seconds]
<bambanx> eph3meral, end and ;
prtksxna has quit [Read error: Connection reset by peer]
prtksxna_ has joined #ruby
walterheck has joined #ruby
workmad3 has joined #ruby
<Hanmac> why not like this?: my_orders.each {|f| c+=1 if f['bid'] == 'True'}
<Hanmac> but more better: c += my_orders.count {|f| f['bid'] == 'True'}
bambanx_ has joined #ruby
<bambanx_> hi Hanmac
<Hanmac> hy bambanx_
schaerli has quit [Remote host closed the connection]
skum has joined #ruby
<bambanx_> Hanmac, i use it my_orders.each {|f| if f['bid'] == 'True'; buyer+=1 else seller+=1 end }
shtirlic has quit [Ping timeout: 260 seconds]
bambanx has quit [Ping timeout: 245 seconds]
snearch has joined #ruby
<bambanx_> what is a fixnum ?
<bambanx_> is like a integer?
iori has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
<bambanx_> Hanmac, you use rails?
robotmay has joined #ruby
<Hanmac> no
<Hanmac> there is your shorted code: buyer, seller = my_orders.partition {|f| f['bid'] == 'True' }.map(&:count)
<Hanmac> PS: but i would recomend to think about the data structure ... (use symbols for keys, and not strings for boolean)
imami|afk is now known as banseljaj
<Hanmac> bambanx_: fixmun is part of Intergers ... there are fixnum & bignum, both are stored different
<bambanx_> ty Hanmac
workmad3 has quit [Ping timeout: 245 seconds]
prtksxna has joined #ruby
fserb has quit [Quit: ttyl]
prtksxna_ has quit [Read error: Connection reset by peer]
fserb has joined #ruby
shadoi has quit [Quit: Leaving.]
tonini has joined #ruby
olrrai has quit [Quit: Saliendo]
Banistergalaxy has quit [Ping timeout: 256 seconds]
fserb has quit [Client Quit]
urbann has joined #ruby
<bambanx_> what is wrong with this : File.delete('C:/Users/My Orders-*.txt')
cek has joined #ruby
<Hanmac> i think you cant use * on File.delete
<bambanx_> damn
dhruvasagar has quit [Ping timeout: 248 seconds]
Nitrodist has joined #ruby
user__ has joined #ruby
<Hanmac> but you can try File.rm('C:/Users/My Orders-*.txt') after you require 'fileutils'
<Hanmac> hm no its FileUtils.rm('C:/Users/My Orders-*.txt')
dhruvasagar has joined #ruby
<heftig> no, FileUtils.rm Dir.glob('C:/Users/My Orders-*.txt')
<Nitrodist> anyone know why rspec doesn't print out my full stacktrace? https://gist.github.com/e141031247c506ba8d52
<cek> %x{rm -rf }
akem has quit [Ping timeout: 240 seconds]
<heftig> cek: not on Windows
<cek> Nitrodist, rspec's dead
<Nitrodist> lol cek
<Nitrodist> and you have an alternative, right?
sako has quit [Ping timeout: 240 seconds]
<cek> yea. use java.
<bambanx_> thanks heftig Hanmac
<Nitrodist> true, then I would see 3000 lines of stacktrace
walterheck has quit [Quit: Computer has gone to sleep]
<cek> java is the only enterprise ready solution
jeff_sebring has quit [Ping timeout: 244 seconds]
<Nitrodist> joking aside, anyone have an idea, though?
gianlucadv has quit [Quit: ZNC - http://znc.sourceforge.net]
hemanth has quit [Read error: Connection reset by peer]
roolo has joined #ruby
mockra_ has quit [Remote host closed the connection]
<cek> Nitrodist, i guess it manipulates Exception#backtrace somewhere
hemanth has joined #ruby
<Nitrodist> got it
akem has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
<Nitrodist> updated rspec :)
Banistergalaxy has joined #ruby
<cek> to java?
berserkr has joined #ruby
tatsuya_o has joined #ruby
<Nitrodist> cek: no, then I would say I updated to JMock :P
<cek> Exception#set_backtrace, too.
<Hanmac> i would never use jruby for my projects :P
<cek> it has thread implementation backed by years of enterprise usage
<cek> and a garbage collection policy that's enterprise ready, too
user__ has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
davidcelis has joined #ruby
binaryplease has quit [Quit: WeeChat 0.3.8]
schickung has joined #ruby
nipra has quit [Ping timeout: 244 seconds]
urbann has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 240 seconds]
schickung has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
jeff_sebring has joined #ruby
schickung has joined #ruby
schickung has quit [Client Quit]
d3c has quit [Quit: Quit]
cyong has quit [Quit: Leaving.]
ephemerian has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
a_a_g has joined #ruby
yannis has joined #ruby
iori has joined #ruby
Guest20110 has joined #ruby
bambanx_ has quit [Read error: Connection reset by peer]
bambanx_ has joined #ruby
akem has quit [Read error: Connection timed out]
arturaz has joined #ruby
nipra has joined #ruby
kjellski has joined #ruby
iori has quit [Ping timeout: 245 seconds]
demian`_ has quit [Quit: demian`_]
<chaotic_good> enterprise lol
<chaotic_good> enterprise = sucks so bad we gota try n intimidate wit titles
<chaotic_good> bsd or linux far better than solaris
<chaotic_good> postgresql replaces oracle
<chaotic_good> done
<bnagy> linux better than solaris?
<bnagy> XD
<bnagy> you fuuuny
<chaotic_good> far far better
<chaotic_good> zfs who needs it?
<chaotic_good> softraid and reiser
<chaotic_good> zfs eats all your ram so your app gets nuked
<chaotic_good> for 3% better performance?
<chaotic_good> bleh
<chaotic_good> dedup means your arent using db or mogileFS right
<chaotic_good> linux has openvz and lxp zones
<chaotic_good> hek virtualization is a fraud anyhow
<chaotic_good> jsut like SAN
<chaotic_good> softraid and let app multitask or GASP fork
<chaotic_good> the whole continuations thing helps there
borkman has joined #ruby
<bnagy> is it warm on your planet?
<chaotic_good> but I am off on a rant
<chaotic_good> ok I stop
<bambanx_> hey bnagy
<chaotic_good> earth yes
<chaotic_good> los angeles
<chaotic_good> prime material plane
<bambanx_> guys i have a class with two methods , in one method i declare a variable but this variable i need use in other method, how i can scope this variable to my oother method? using a class variable like this @@myvariable ?
<matled> banisterfiend: when using pry the inspect takes very long sometimes. it would be nice if there would be a message while the pretty print is computed (e.g. "Preparing inspect, ^C to abort.") or even if it would be possible to start printing before the processing is complete. what do you think about that?
<bnagy> bambanx_: @@classvars are never correct, ever
gokul has joined #ruby
<chaotic_good> Solaris/x86 is a joke, last I heard. (It has) very little support for any kind of strange hardware. If you thought Linux had issues with driver availability for some things, let's see you try Solaris/x86. (Editors' note: Drivers enable an operating system to communicate with specific hardware such as a video card or network adapter.)
<bambanx_> i know bnagy
<chaotic_good> -linus torvalds
<bambanx_> bnagy, what i can do?
<bambanx_> make instance a object and declare it like a object variable? bnagy
<chaotic_good> is there a mogileFS in ruby?
<bnagy> bambanx_: if they're both instance methods ('normal' class methods) then just an @ivar will work
<bambanx_> i am using class methods bnagy
Shahor has joined #ruby
Shahor has quit [Client Quit]
Shahor has joined #ruby
<bnagy> why? :)
<bnagy> anyway, then use class ivars
<bambanx_> i dont know ivars class
iori has joined #ruby
<baniseterfiend`> matled: we just use pretty_inspect currently; but we could consider customizing it to add features like that, cool. Can you file an issue?
pygospa has quit [Disconnected by services]
jamesaxl has quit [Ping timeout: 265 seconds]
pygospa has joined #ruby
<matled> baniseterfiend`: yeah, I'll do that later. at least adding the message would be nice (i.e. print it and then use kill line to remove it), sometimes I'm not sure if I abort the code I entered or the inspect
Prz has joined #ruby
<baniseterfiend`> matled: sure thing
ramblex has joined #ruby
<_br_> Anyone have an idea why when I trap a kill signal and even define a objectspace finalizer to kill a child process before the parent object gets killed, doesn't kill it?
<bambanx_> nn guys
bambanx_ has quit [Quit: Saliendo]
<Hanmac> _br_ maybe you need the other the term signal?
MrGando has quit [Read error: Connection reset by peer]
Shrink has quit [Ping timeout: 252 seconds]
<Hanmac> i never used finalizer in ruby itself, because i can not trust them
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
Paradox has joined #ruby
Ammar01 has joined #ruby
<_br_> Hanmac: I thought so too, but doesn't do either... hmpf.
wvdschel has quit [Ping timeout: 260 seconds]
<Paradox> im having a problem installing termios
<_br_> Hanmac: Yes, it seems you were right to not trust them :|
<Paradox> its mad that ruby 1.9.3 uses rubyio
<Paradox> instead of ruby/io
<Paradox> pastebinning
<Paradox> any helps?
shtirlic has joined #ruby
<Hanmac> _br_ you can define better ways to mark&sweep objects, but not from the ruby side :P
wvdschel has joined #ruby
wvdschel has quit [Changing host]
wvdschel has joined #ruby
Morkel has quit [Quit: Morkel]
<_br_> Hanmac: seems so :(.. trying to find a way around
corenumb has joined #ruby
<corenumb> https://gist.github.com/94228d284ae1276b7f1c why Im getting a error uninitialized constant RUBY (NameError)
sspiff has quit [Ping timeout: 260 seconds]
perryh is now known as perryh_away
iocor has joined #ruby
* corenumb anyone
kjellski has quit [Quit: This computer has gone to sleep]
<bnagy> and other hilarities, such as 'virtualization is a fraud, so is SAN'
Shrink has joined #ruby
<bnagy> hahah yay screen
chaotic_good has quit [Remote host closed the connection]
<baniseterfiend`> bnagy: i trust your opinion on such matters, your nerdiness seems focussed in those areas
<corenumb> anyone ?
<_br_> corenumb: simple, if you call it that way the path is not setup for you I assume. Also, this is case sensitive. Substitute "RUBY" with e.g. "/usr/bin/ruby"
<bnagy> corenumb: because you didn't initialize the constant?
<_br_> corenumb: don't forget the quotation marks
ramblex has quit [Quit: ramblex]
<bnagy> I'd imagine you'll get another error for THIS_FILE, once you fix the first one
Prz has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
qwerxy has joined #ruby
<_br_> corenumb: possible you want to use the ENV[""] hash to find the right path to your ruby interpreter...
iori has quit [Ping timeout: 245 seconds]
pawdro has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
lilin has quit [Ping timeout: 244 seconds]
heftig has quit [Quit: leaving]
tatsuya_o has quit [Read error: Connection reset by peer]
tatsuya_o has joined #ruby
Boohbah has quit [Remote host closed the connection]
Boohbah has joined #ruby
dcorbin has quit [Quit: This computer has gone to sleep]
foofoobar has joined #ruby
cheater_ has joined #ruby
nfk has joined #ruby
cheater has quit [Ping timeout: 260 seconds]
flype has joined #ruby
snearch has quit [Quit: Verlassend]
corenumb has left #ruby ["Leaving"]
gcds has joined #ruby
<gcds> Hello
zz_chrismcg is now known as chrismcg
schickung has joined #ruby
<gcds> I have very silly question :D Now I am working with 10,000 records and need somehow to keep them now I am working with hash based storage but its really messy… I thinking how major of gems and stuff in ruby returns something like <Item #23213123213 name="aaaa" … >
<gcds> how to make something like this? :D
mneorr has quit [Read error: Connection reset by peer]
prtksxna has quit [Remote host closed the connection]
cantonic_ has joined #ruby
banisterfiend has quit [Remote host closed the connection]
cantonic has quit [Ping timeout: 245 seconds]
cantonic_ is now known as cantonic
tdubz has joined #ruby
tdubz has quit [Client Quit]
Criztian_ has joined #ruby
Criztian has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 245 seconds]
schaerli has joined #ruby
tdubz has joined #ruby
dhruvasagar has joined #ruby
tdubz is now known as tdubellz
mdstunthamster has joined #ruby
pradeepto has quit [Quit: No Ping reply in 180 seconds.]
pradeepto has joined #ruby
<_br_> gcds: Not sure I understand what you want. Do you mean, building an Abstract Data Type (ADT)? e.g. like you show there, create a ... class Item ; attr_accessor :name, :id ; end ; storage = []; 10000.times { storage << Item.new( ...); }
ciopte7 has quit [Quit: ciopte7]
federic has joined #ruby
schovi has quit [Remote host closed the connection]
pedrocarrico has joined #ruby
Foxandxss has joined #ruby
mikekelly has quit [Ping timeout: 252 seconds]
si14 has quit [Read error: Operation timed out]
jrgifford has quit [Read error: Operation timed out]
DavidTiger has quit [Read error: Operation timed out]
amar_key has quit [Read error: Operation timed out]
aquaranto has quit [Read error: Operation timed out]
ramblex has joined #ruby
jhowarth has quit [Ping timeout: 246 seconds]
moeSeth has quit [Ping timeout: 244 seconds]
ctevie has quit [Ping timeout: 245 seconds]
dekz has quit [Ping timeout: 240 seconds]
lectrick has quit [Ping timeout: 252 seconds]
_marvin has quit [Ping timeout: 260 seconds]
randym has quit [Ping timeout: 260 seconds]
kapowaz has quit [Ping timeout: 260 seconds]
denysonique has quit [Ping timeout: 245 seconds]
cesario has quit [Ping timeout: 245 seconds]
NimeshNeema has quit [Ping timeout: 245 seconds]
ziyadb has quit [Ping timeout: 245 seconds]
pooja has quit [Ping timeout: 244 seconds]
BrianE has quit [Ping timeout: 252 seconds]
Spaceghostc2c has quit [Ping timeout: 245 seconds]
SeanTAllen has quit [Ping timeout: 244 seconds]
relix has quit [Ping timeout: 260 seconds]
Dr4g has quit [Ping timeout: 260 seconds]
MetaCosm has quit [Ping timeout: 260 seconds]
avandendorpe has quit [Ping timeout: 260 seconds]
d3vic3 has quit [Ping timeout: 252 seconds]
mikekelly has joined #ruby
schovi has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
d3vic3 has joined #ruby
zinjacoder has joined #ruby
dhruvasagar has joined #ruby
pawdro has quit [Quit: Konversation terminated!]
freeayu has joined #ruby
Beoran4 has quit [Ping timeout: 252 seconds]
fermion has joined #ruby
zastav has joined #ruby
liluo has quit [Remote host closed the connection]
indian has joined #ruby
indian has quit [Changing host]
indian has joined #ruby
pedrocarrico has left #ruby [#ruby]
tonini has quit [Ping timeout: 260 seconds]
federic has quit [Ping timeout: 245 seconds]
eph3meral has quit [Quit: Leaving]
tdubellz has quit [Quit: leaving]
tdubz has joined #ruby
schaerli has quit [Remote host closed the connection]
Vert has quit [Ping timeout: 252 seconds]
francisfish has quit [Remote host closed the connection]
tonini has joined #ruby
foofoobar has quit [Quit: bb]
Beoran4 has joined #ruby
Guedes_out is now known as Guedes
zastav has quit [Ping timeout: 245 seconds]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
dekroning has joined #ruby
jbw_ has quit [Ping timeout: 248 seconds]
Dl33ter has joined #ruby
<Dl33ter> Hi!
hidek46 is now known as acotie_
acotie_ is now known as acotie
davidcelis has quit [Read error: Connection reset by peer]
francisfish has joined #ruby
<zii> Would you be in peace with lead dev's desire to enforce use of Enumerable#map instead of Enumerable#collect?
federic has joined #ruby
<Nitrodist> zii: who cares
<Dl33ter> How could I choose the first and the last record of a collection_select ? (for exemple, put " Other " at the end of the list, but keep all ordered by name ASC?)
davidcelis has joined #ruby
<zii> Nitrodist: I do.
<Nitrodist> Dl33ter: whatever_thing << "other"
<Nitrodist> zii: it's such a minor point, I wouldn't care
<Nitrodist> I'm wondering why you're spending valuable time on petty stuff such as that
<matled> Dl33ter: what do you want to do?
iocor has quit [Quit: Computer has gone to sleep.]
<Dl33ter> matled: I want to choose the first and the last record of a collection_select. ("ALL" for the first, and "OTHER" for the last)
mdw has quit [Remote host closed the connection]
<matled> what is a collection_select?
aeufemio has joined #ruby
<Dl33ter> <%= f.collection_select :mark_id (A combobox ^^)
vlad_starkov has quit [Remote host closed the connection]
werdnativ has quit [Quit: werdnativ]
<Dl33ter> Like in the Railscasts #88 (Dynamic Select Menus)
rizzylt has joined #ruby
<matled> oh, I haven't used rails in a while
frishi has joined #ruby
<Dl33ter> Oh, sorry, I didn't say that I was taling about rails...
starburst has quit [Remote host closed the connection]
<Dl33ter> talkink*
<Dl33ter> TALKING* -_-
<Dl33ter> Nitrodist: you sayed " whatever_thing << "other" ", but where should I put that? Model, View or Controller?
jbw_ has joined #ruby
dhruvasa1ar has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<Nitrodist> Dl33ter: view, me thinks. not sure if that'll work the way you want it to
<Nitrodist> or if it will at all
ramblex has quit [Remote host closed the connection]
nirakara has joined #ruby
jenrzzz-mac has joined #ruby
ramblex has joined #ruby
<Dl33ter> I'll try, thanks
vlad_starkov has joined #ruby
user__ has joined #ruby
akem has quit [Max SendQ exceeded]
nooodl has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
Shrink has quit [Ping timeout: 256 seconds]
user__ has quit [Ping timeout: 246 seconds]
Kunda has joined #ruby
lxsameer has joined #ruby
<csmrfx> What kind of syntax would you prefer for a ruby scraper to make sure site "Foo.com" has the "<title>" tag with contents "Bar"?
<zii> You're asking a design?
iocor has joined #ruby
fearoffish has joined #ruby
<zii> csmrfx: title == "bar"
<csmrfx> need to tell the thing which site or url to look at first
<csmrfx> how about: inquire("foo.com") { make sure <title> equals "Bar" }
<zii> make sure? overkill
nanderoo has joined #ruby
<csmrfx> well I think there are going to be a couple of different verbs like that
<zii> What's your target? Development or ingenious tool?
<csmrfx> also, equals || contains || !equals || !contains
<csmrfx> it's a tool for ppl working with websites
banseljaj is now known as imami|afk
dhruvasa1ar has quit [Ping timeout: 256 seconds]
mdw has joined #ruby
<csmrfx> I also need to figure out the syntax for "scrape all pages behind this url" vs "on this url contents" and things like how far along the links to scrape
danielferguson has joined #ruby
dhruvasagar has joined #ruby
akem has quit [Ping timeout: 245 seconds]
fayimora has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
Shrink has joined #ruby
<csmrfx> Who knows, maybe there are already 10s of scraper-test-runners made with ruby
hemanth has joined #ruby
<cek> zii, map is when you map things, collect is when you gather things
<zii> cek: I know.
<cek> for ex., .map(&:to_i)
sleetdrop has quit [Remote host closed the connection]
akem has joined #ruby
<cek> .collect {|e| e[1] }
`gregorg` has quit [Changing host]
`gregorg` has joined #ruby
`gregorg` is now known as gregorg
<Mon_Ouie> map to an integer, map each element to its second element
roams has joined #ruby
maesbn has quit [Remote host closed the connection]
iocor has quit [Quit: Computer has gone to sleep.]
<csmrfx> Do you use parenthesis around the method def's arguments?
<csmrfx> also, do you use a space between method name and arguments in def, or not?
tk has joined #ruby
<Mon_Ouie> I do even in cases where I would always omit them when calling the method
<shevy2> csmrfx I use parens around method def arguments, yes, but only if there are arguments
<shevy2> def foo
tk is now known as Guest40995
<shevy2> def foo(i)
maesbn has joined #ruby
<Mon_Ouie> def foo=(val); end
iocor has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
iocor has quit [Client Quit]
<csmrfx> ok
<Dl33ter> How can I insert " include_blank " or " prompt " in each subcategory of a grouped_collection_select?
<csmrfx> def foo ( strarg ) OR def foo(strarg) iyo?
shevy2 is now known as shevy
<Mon_Ouie> latter
dhruvasagar has joined #ruby
gokul has quit [Quit: Leaving]
<csmrfx> I think I will call this site scraper "The Spanish Inquisition"
user__ has joined #ruby
<shevy> csmrfx no space is better
t0mmyvyo has joined #ruby
niklasb has joined #ruby
<shevy> there are quite a few ruby hackers who omit the () in method definitions
<shevy> but I always found this harder to understand at first glance
akem has quit [Ping timeout: 244 seconds]
moshee has quit [Ping timeout: 252 seconds]
<csmrfx> perhaps syntax -> persecute foo.com/pages/ { try <title> contains "foobar"; try contains "<body>" }
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<csmrfx> or whats it called when the spanish inquisition is interrogating the subject 8P
cjs226 has quit []
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<shevy> quite verbose
geekbri has joined #ruby
jamesaxl has joined #ruby
<shevy> almost sounds like a natural english version for "if string.include? '<body>'"
<shevy> well the inquisition would torture until any fake confession was achieved :)
<csmrfx> uh, persecute
<csmrfx> hm, maybe 'confess' instead of 'try'
user__ has quit [Ping timeout: 245 seconds]
<cek> not MVC
<shevy> man... confess... try... with try I have to think of java
<shevy> or python...
<shevy> catch try throw
<shevy> confess reminds me more of inquisition
<shevy> but what should I confess
akem has joined #ruby
fayimora has quit [Quit: Be back in a gifii]
fayimora has joined #ruby
macmartine_ has joined #ruby
<csmrfx> the inquisitor asks the page to confess, right
locriani_ has joined #ruby
<cek> yes, java is enterprise inquisitor ready
<csmrfx> not sure if aiming for fun suntax is going to be worthwhile
<shevy> cek haha I like that
<csmrfx> now that I look at it, I bet xpath is going to have to be used sooner or later
cek has quit [Quit: жопа диридай диридиридай]
a_a_g1 has joined #ruby
a_a_g1 has quit [Ping timeout: 245 seconds]
tommyvyo has quit [Ping timeout: 244 seconds]
t0mmyvyo is now known as tommyvyo
<shevy> ewww... sounds like XML attack
flype has quit [Quit: Computer has gone to sleep.]
nirakara has quit [Read error: No route to host]
macmartine has quit [Ping timeout: 240 seconds]
Asher1 has joined #ruby
krz has quit [Ping timeout: 244 seconds]
sirecote has quit [Ping timeout: 244 seconds]
<csmrfx> well true, if I want xpath the pages need to be parsed with nogogiri I think
nirakara has joined #ruby
locriani has quit [Ping timeout: 244 seconds]
hemanth has quit [Ping timeout: 244 seconds]
devdazed has quit [Ping timeout: 244 seconds]
<csmrfx> not quite xml but xpath syntax nontheless
tarside has joined #ruby
williamherry has quit [Ping timeout: 244 seconds]
Dratir has quit [Ping timeout: 244 seconds]
nw has quit [Ping timeout: 240 seconds]
a_a_g1 has joined #ruby
ABK has quit [Ping timeout: 244 seconds]
macmartine_ is now known as macmartine
a_a_g1 has quit [Read error: Connection reset by peer]
otters has quit [Ping timeout: 240 seconds]
dross has quit [Ping timeout: 240 seconds]
flagg0205 has quit [Ping timeout: 240 seconds]
dphase has quit [Ping timeout: 240 seconds]
a_a_g has quit [Ping timeout: 265 seconds]
SeySayux has quit [Ping timeout: 244 seconds]
nw has joined #ruby
dross has joined #ruby
tommyvyo_ has joined #ruby
Asher has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Ping timeout: 265 seconds]
ABK has joined #ruby
dhruvasagar has joined #ruby
epochwolf|vps2 has quit [Ping timeout: 240 seconds]
krz has joined #ruby
epochwolf|vps has joined #ruby
dphase has joined #ruby
nirakara has quit [Client Quit]
any-key has joined #ruby
williamherry has joined #ruby
any-key has quit [Ping timeout: 240 seconds]
alienvenom has joined #ruby
ping-pong has quit [Ping timeout: 240 seconds]
ben_alman has quit [Ping timeout: 244 seconds]
alienvenom has quit [Ping timeout: 244 seconds]
lxsameer has quit [Quit: Leaving]
sirecote has joined #ruby
williamherry has quit [Max SendQ exceeded]
mmercer has quit [Ping timeout: 244 seconds]
BeLucid_ has joined #ruby
dv310p3r has quit [Ping timeout: 260 seconds]
devdazed has joined #ruby
flagg0204 has joined #ruby
dross has quit [Read error: Connection reset by peer]
SeySayux_ has joined #ruby
a_a_g has joined #ruby
william_ has joined #ruby
jamesaxl has quit [Write error: Connection reset by peer]
hemanth has joined #ruby
BeLucid has quit [Ping timeout: 244 seconds]
jamesaxl has joined #ruby
ping-pong has joined #ruby
Jck_true has quit [Ping timeout: 240 seconds]
Jck_true has joined #ruby
krusty_ar has joined #ruby
akem has quit [Ping timeout: 244 seconds]
Bartzy has joined #ruby
<Bartzy> Hey
a_a_g1 has joined #ruby
Dratir has joined #ruby
test34 has joined #ruby
a_a_g1 has quit [Read error: Connection reset by peer]
<Bartzy> I'm using Capistrano, hope you can help with this. I am trying to assign a value to a variable in one task and read it in another task. How do I do that ?
a_a_g has quit [Read error: Connection reset by peer]
a_a_g1 has joined #ruby
`brendan has joined #ruby
ben_alman has joined #ruby
nirakara has joined #ruby
<kalleth__> globals baby, yeah
tarside has quit [Ping timeout: 245 seconds]
kalleth__ is now known as kalleth
tarside has joined #ruby
Dl33ter has quit [Ping timeout: 252 seconds]
indian has quit [Ping timeout: 265 seconds]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
tonini has quit [Remote host closed the connection]
iocor has joined #ruby
vitoravelino`afk is now known as vitoravelino
test34 has left #ruby [#ruby]
mneorr has joined #ruby
CannedCorn has joined #ruby
akem has joined #ruby
kjellski has joined #ruby
<CannedCorn> guys i've got what is probably a simple question, when i call to_json on something its escaping the string, how do i get it to not do that
<_br_> CannedCorn: Hm, probably if its not escape it would be invalid json.
<_br_> CannedCorn: Can't you just unescape on the receiving end?
<CannedCorn> hrm
senny has joined #ruby
<CannedCorn> well im writing a sinatra app, and i have a bunch of routes that use the json render method from sinatra::contrib
<CannedCorn> they all work fine
<CannedCorn> on hashes etc
<CannedCorn> but this one route has an array of mongodb documents, when i try to output that as json, it barfs
rizzylt has quit [Ping timeout: 244 seconds]
alexander-- has joined #ruby
peterhil` has quit [Ping timeout: 260 seconds]
<CannedCorn> says it can't convert nil to string
d3c has joined #ruby
<CannedCorn> but i don't understand why it would be trying to convert nil, when i call to_json on it, i see the output just fiine
<CannedCorn> and i think that is what the json helper is doing
alexander-- has quit [Remote host closed the connection]
A124 has joined #ruby
<_br_> Well, that means that at some point you try to do some manipulation on a nil object, but that method doesn't exist. Try run the thing with the debugger attached maybe you can track it down with that
<CannedCorn> what debugger do you recommend?
vectorshelve has quit [Ping timeout: 245 seconds]
<csmrfx> CannedCorn: use pry
<CannedCorn> im using that :-)
peterhil` has joined #ruby
<CannedCorn> but wait, why does to_json work...
<CannedCorn> very odd
<csmrfx> I believe it is all the debugger you need
frishi has quit [Quit: Leaving...]
akem has quit [Ping timeout: 245 seconds]
<CannedCorn> interesting
<CannedCorn> not quite sure how to attach it, but i guess i'll do some digging
timonv_ has joined #ruby
<CannedCorn> just doesn't make sense that i can see the output via to_json just fine though
<csmrfx> it's just something small you've overlooked, probably
<csmrfx> ~as these nil probs usually are
kjellski has quit [Quit: Leaving]
niklasb has quit [Ping timeout: 244 seconds]
timonv has quit [Ping timeout: 248 seconds]
bosphorus has quit [Read error: Connection reset by peer]
bosphorus has joined #ruby
cjs226 has joined #ruby
nw has quit [Quit: leaving]
nw has joined #ruby
SimSala has joined #ruby
TheHunter_1039 has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
nw has quit [Client Quit]
Markvilla has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
nw has joined #ruby
Dl33ter has joined #ruby
lxsameer has quit [Max SendQ exceeded]
<_br_> Hm.. everyone at sleep at #zeromq. Anyone here who is a bit familar with it?
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
ryannielson has joined #ruby
<Dl33ter> On my grouped_collection_select, (RAILS) can I add a field in each subcategories, and define that "First" ? But I want to keep everything ordering by "name ASC".
ZachBeta has joined #ruby
nw has quit [Client Quit]
ryannielson is now known as twixmix
<Tasser> Dl33ter, #rubyonrails
nw has joined #ruby
<csmrfx> ok, next up: handle block arguments to a method
<Dl33ter> Tasser: Ok thanks :)
<csmrfx> Is it possible to handle a block argument as data or a string?
<Nitrodist> csmrfx: why
<csmrfx> ie. lisp stylee
<Tasser> csmrfx, as data, yes, as string, no
<csmrfx> Nitrodist: well if I want to actually parse the block contents myself
<Nitrodist> csmrfx: yes you can parse it line by line if you want
<csmrfx> ok, so what would be a good place to look to learn more?
Dl33ter has quit [Client Quit]
andrewhl has joined #ruby
ZachBeta has quit [Client Quit]
iocor has quit [Quit: Computer has gone to sleep.]
<_br_> csmrfx: probably the *multi gem's. e.g. smulti.
wangr has joined #ruby
<_br_> csmrfx: Quite slow though.
<_br_> csmrfx: Alternatively, you could use the 1.9 sourcify gem with ParseTree and manipulate the AST directly
<csmrfx> ok this is nowhere nearly as complicated
<_br_> What do you want to do anyway?
<csmrfx> the parse tree has 3 branches, 2 levels of nodes
<csmrfx> just be able to parse sentences like: (make sure this url) contains <tag> with "string" contents
<csmrfx> split is fine atm
<Nitrodist> like writing your own dsl
<csmrfx> almost
<_br_> yeah, there are two ways for this. Either you leverage ruby syntax and build a simple dsl ontop of it. Or you go full out with smulti.
<csmrfx> I'm more interested in learning how to coax a block argument into something splittable
<csmrfx> simple as that 8)
<_br_> alternatively, you could shoot with regex'es at it
xaxisx has joined #ruby
rizzylt has joined #ruby
<_br_> csmrfx: blocks are proc's. Not sure if that is splitable. The only way i have found was over sourcify gem. let me show you, just a sec
jeff_sebring has quit [Remote host closed the connection]
apeiros_ has joined #ruby
<_br_> csmrfx: here... https://gist.github.com/2868864 Was for a different problem, but for you its the same approach.
<_br_> Not sure how stable this is though, espeically since proc's are vm dependent *?*
<_br_> csmrfx: Why don't you make something like, MyClass.make_sure url, is => String, :contains => %r{blah}
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
<csmrfx> ok now I see what that means
<csmrfx> hm, seems like a bit of an hack
wvdschel has quit [Remote host closed the connection]
<_br_> csmrfx: the sourcify one? Yes, probably.
<csmrfx> hm, so let me rephrase
dhruvasagar has quit [Ping timeout: 256 seconds]
<csmrfx> what would be the simplest way to get the contents of a code block passed as argument to a method as arrays of string (loc)
danielferguson has quit [Quit: danielferguson]
dhruvasagar has joined #ruby
<csmrfx> hm I guess thats is it
<csmrfx> _br_: as to that Myclass... suggestion: well I already have persecute url { contains String } type of thing
lxsameer has quit [Ping timeout: 245 seconds]
lxsameer has joined #ruby
wvdschel has joined #ruby
nirakara has quit [Quit: http://gplus.to/nikhil]
jeff_sebring has joined #ruby
heftig has joined #ruby
sspiff has quit [Ping timeout: 260 seconds]
maploin`` has joined #ruby
<csmrfx> ah well, I am sure I'll get this working with method missing and yield with args... gotta yield now
<maploin``> hi. Is there any way to get the path of a ruby module? i.e. use require just to check that a file exists somewhere on the path, but without actually loading it?
<shevy> that is really weird to see, code that tries to type check in ruby in different ways :D
dubios has quit [Quit: I was never here]
fantazo has joined #ruby
<_br_> csmrfx: A Block is a Proc. The only way I know to get the code from a proc object at the moment is via sourcify. As I said.
akem has joined #ruby
dubios has joined #ruby
bglusman has joined #ruby
hynkle has joined #ruby
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
<csmrfx> maybe no need to parse this simple stuff
<shevy> maploin`` hmm there is __FILE__ and $LOAD_PATH
<shevy> via require or load, I think the file will be appended to $LOAD_PATH
<maploin``> shevy: I know, but I'd rather not loop through LOAD_PATH myself
jenrzzz-mac has quit [Quit: jenrzzz-mac]
<csmrfx> oh yeah, thats right
<shevy> Don't think it is possible to find out without tapping into the $LOAD_PATH array
emmanuelux has joined #ruby
chson has quit [Remote host closed the connection]
<shevy> anyone has a simpler way to convert $FOO variables to ENV['FOO'], in a string, but only if $FOO was defined? I came up with this here: http://pastie.org/4067260
dekroning has quit [Ping timeout: 244 seconds]
lorandi has joined #ruby
niklasb has joined #ruby
dross has joined #ruby
abionic has joined #ruby
<Mon_Ouie> gsub accepts a block
<Mon_Ouie> gsub(YourEnvRegex) { |match| ENV[$1] || match }
andrewhl has quit [Remote host closed the connection]
ABK has quit [Ping timeout: 240 seconds]
Konboi has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 244 seconds]
niklasb has quit [Ping timeout: 252 seconds]
william_ has quit [Quit: Leaving]
A124 has left #ruby [#ruby]
CannedCorn has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
statix has joined #ruby
statix is now known as stat1x
flype has joined #ruby
afallows has quit [Quit: Lost terminal]
abionic has quit [Ping timeout: 244 seconds]
crankycoder has joined #ruby
jgarvey has joined #ruby
Progster has joined #ruby
dekroning has joined #ruby
wvdschel has quit [Ping timeout: 260 seconds]
xaxisx has left #ruby [#ruby]
Jackneill has quit [Quit: .]
dhruvasagar has quit [Ping timeout: 245 seconds]
peterhil` has quit [Ping timeout: 248 seconds]
<shevy> oh cool
dhruvasagar has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
jarednorman has quit [Ping timeout: 246 seconds]
sleetdrop has joined #ruby
peterhil` has joined #ruby
fermion has quit [Ping timeout: 252 seconds]
dv310p3r has joined #ruby
pu22l3r has joined #ruby
tarside has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
digitalcakestudi has joined #ruby
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
brngardner has joined #ruby
udante has joined #ruby
workmad3 has joined #ruby
hynkle has quit [Ping timeout: 244 seconds]
dhruvasagar has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
dv310p3r has quit [Quit: Leaving]
a_a_g1 has quit [Quit: Leaving.]
[Neurotic] has quit [Quit: Leaving]
dv310p3r has joined #ruby
uris has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
dekroning has quit [Ping timeout: 248 seconds]
hynkle has joined #ruby
tscolari has joined #ruby
fermion has joined #ruby
hynkle has quit [Ping timeout: 244 seconds]
Tricks_ has quit [Read error: Connection reset by peer]
irrationalfab has joined #ruby
Tricks has joined #ruby
proghat has joined #ruby
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
fermion has quit [Ping timeout: 248 seconds]
Facefox has quit [Ping timeout: 260 seconds]
the_jeebster has joined #ruby
hynkle has joined #ruby
joshman_ has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
dhruvasagar has joined #ruby
eurek has joined #ruby
Jackneill has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
nricciar_ has joined #ruby
mdhopkins has quit [Quit: mdhopkins]
Facefox has joined #ruby
jeff_sebring has joined #ruby
chson has joined #ruby
tuxaddicted has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
indian has joined #ruby
carloslopes has joined #ruby
relix has joined #ruby
relix is now known as relix2
jeff_sebring has joined #ruby
d3c has quit [Quit: Sleep]
noganex has joined #ruby
<relix2> hey guys
nowthatsamatt has joined #ruby
d3c has joined #ruby
<relix2> I have a centralized Rails app, and an independent ruby app ("node") that needs to interact with the Rails app (but sparsely, just requesting the email address for a user given the username)
<relix2> right now I'm using ActiveResource in the ruby node app to retrieve that data, but I was wondering if there is a better REST gem out there for ruby
<relix2> since I'm not using Rails in the small ruby app I'm not attached to ActiveResource
nricciar has quit [Quit: Leaving]
nowthatsamatt has quit [Client Quit]
Dl33ter has joined #ruby
boodle has joined #ruby
<Dl33ter> Hi!
theRoUS has joined #ruby
tdelam_ has joined #ruby
zinjacoder has quit [Read error: Connection reset by peer]
tdelam_ has quit [Client Quit]
<shevy> relix2 usually the rails users are on #rubyonrails, many people here on #ruby dont even know rails
zinjacoder has joined #ruby
<relix2> shevy yes, but it's not a rails question
<relix2> shevy and the people on #rubyonrails are mostly unfriendly in my (limited) experience
<shevy> :)
<relix2> unlike the #ruby people :)
<relix2> so forget I talked about rails
fermion has joined #ruby
boodle has quit [Quit: boodle]
<relix2> I'll rephrase the question: what's the best Ruby REST client library?
khyron320 has joined #ruby
tdelam has joined #ruby
<relix2> I wouldn't be surprised if it actually is activeresource :)
<shevy> sorry no idea. the very little thing i did with ruby + www was mostly using ruby .cgi :D
t-mart has joined #ruby
mdhopkins has joined #ruby
<relix2> ah ok :)
axl_ has joined #ruby
afallows has joined #ruby
nlc has joined #ruby
otters has joined #ruby
adambeynon has joined #ruby
dekz has joined #ruby
EvanR has joined #ruby
irrationalfab has quit []
EvanR is now known as Guest77270
mmercer has joined #ruby
sleetdrop has quit [Remote host closed the connection]
irrationalfab has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
brngardner has quit [Remote host closed the connection]
sleetdrop has joined #ruby
hashpuppy has quit [Quit: hashpuppy]
<_br_> relix2: rest ruby client library? Ah, curb?
avandendorpe has joined #ruby
dhruvasagar has joined #ruby
<relix2> _br_: I was wondering if there's something more high level out there like activeresource
CannedCorn has joined #ruby
<CannedCorn> hey guys
llaskin has joined #ruby
<zeroXten> hi all, i'm having problems installing ruby-graphviz gem. Seems to install ok, but I get the following error when trying to require it: /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- graphviz (LoadError)
mxweas has quit [Ping timeout: 252 seconds]
<llaskin> anyone here have experience with testunit?
<_br_> relix2: hm not sure about that
<CannedCorn> im working on building something and was wondering what the best process is for spawning, checking, killing processes is
jeff_sebring has quit [Read error: Connection reset by peer]
schovi has quit [Read error: Connection reset by peer]
<CannedCorn> ensuring that they die, etc
<CannedCorn> and ensuring that they are up
<CannedCorn> that sort of thing
<_br_> zeroXten: Did you install the graphviz library via the system package manager? Seems you are missing libgraph* ?
schovi has joined #ruby
jeff_sebring has joined #ruby
<_br_> CannedCorn: Ensuing that they are up? Hm e.g. the god gem ?
<CannedCorn> hrm
irrationalfab has left #ruby [#ruby]
mxweas has joined #ruby
<zeroXten> _br_: i think so, graphviz is installed as is libgv-ruby
<_br_> ahhhhh... anyone here played ever with ffi-rzmq ?
<zeroXten> (ubuntu 12.04)
irrationalfab has joined #ruby
shellox has joined #ruby
Guest77270 is now known as EvanR
EvanR has quit [Changing host]
EvanR has joined #ruby
tdelam has quit [Quit: tdelam]
ananthakumaran has quit [Quit: Leaving.]
tdelam has joined #ruby
<_br_> zeroXten: hm, please paste the following into gist; dpkg -l | egrep -i graphviz ; gem env ; gem list | egrep -i graphviz ;
<shevy> CannedCorn I think a common pattern is to use the block form. like File.open('bla') {}, and inside the block ensure that this is closed properly. that could work for the spawning/killing you are trying to do as well
<_br_> zeroXten: could also be a permission issue. If you require it as root user does it work?
<shevy> also have a look at the ruby daemons project. even if you dont use it, they must have solved similar problems
<CannedCorn> ok great shevy, God gem looks amazing but I think i want to use popen
<zeroXten> _br_: doesn't work as root
jrgifford has joined #ruby
<zeroXten> ah, i think I spotted the problem
<zeroXten> my gem version doesn't match ruby
<zeroXten> hmm, I seem to have 1.9 and 1.8 installed :(
ph^_ has quit [Remote host closed the connection]
si14 has joined #ruby
ph^ has joined #ruby
jprovazn_away is now known as jprovazn
jrgifford has quit [Client Quit]
fbernier has joined #ruby
hashpuppy has joined #ruby
Morkel has joined #ruby
<zeroXten> cool, that was simple. Although update-alternatives doesn't seem to be playing nicely
DavidTiger has joined #ruby
Sheehan has joined #ruby
maploin`` has quit [Remote host closed the connection]
albemuth has joined #ruby
<shevy> zeroXten hehehe
<shevy> sounds like fun on debian!
<shevy> Hanmac here is a heavy debian user
ph^ has quit [Ping timeout: 256 seconds]
<shevy> he knows how to solve every ruby-related problem on debian
jrist-afk is now known as jrist-mtg
<ekaleido> im such a scrub. ive been fighting with rails for a few weeks and today i realize it had cgi builtin
Spaceghostc2c has joined #ruby
<shevy> rails? or you mean ruby
carloslopes_ has joined #ruby
rodasc is now known as crodas
<ekaleido> ruby had cgi builtin
<ekaleido> sorry
ddls-devbox has joined #ruby
saidin_ has joined #ruby
<ekaleido> i could be doing what im working on with that instead of rails
carloslopes has quit [Ping timeout: 245 seconds]
<ekaleido> cause i want to choke the creators of rails
Sou|cutter has joined #ruby
nricciar_ has quit [Quit: Leaving]
<_br_> ekaleido: Try Sinatra. Its quite fun.
hakunin has joined #ruby
Jackneill has quit [Remote host closed the connection]
<ddls-devbox> Pls help. Im going crazy. I have the string "Study Type\302\240 ICMJE" and just want the part from [0] to index of \. But since its a backslash everything fails hard.. ideas?
nilg` has quit [Remote host closed the connection]
<_br_> ddls-devbox: Hm, that output is actually a "=" sign in UTF-8
<hashpuppy> there's a function: "def after_commit(*args, &block); set_callback(:commit, :after, *args, &block); end". is there a way to do something like "after_commit :my_func("blah")", where i want it to execute my_func with "blah" passed to it
<_br_> ddls-devbox: seems you are working on a multi-byte string using the wrong encoding.
dhruvasagar has quit [Ping timeout: 246 seconds]
<ddls-devbox> _br_: might be. thx, Ill check the encoding in the source.
<ddls-devbox> :)
aquaranto has joined #ruby
sbanwart has joined #ruby
luxurymode has joined #ruby
<_br_> hashpuppy: Not sure I can clearly understand. Are you looking for instance_eval( &block ) ?
hoelzro|away is now known as hoelzro
billiamii has joined #ruby
<llaskin> anyone using TestUnit?
uris has quit [Read error: Connection reset by peer]
roolo has quit [Quit: Linkinus - http://linkinus.com]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
PaciFisT has joined #ruby
gtuckerkellogg has joined #ruby
lectrick has joined #ruby
nipra has quit [Ping timeout: 245 seconds]
jeff_sebring has quit [Remote host closed the connection]
balki_ is now known as balki
nu7hatch has joined #ruby
jeff_sebring has joined #ruby
workmad3 has joined #ruby
peterhil` has quit [Ping timeout: 260 seconds]
hunglin has joined #ruby
<lectrick> so I finally set up a free amazon ec2 instance to mess around with. Pretty awesome. Might move my domain over to it.
CheeToS has joined #ruby
virunga has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
<_br_> lectrick: Free?
brngardner has joined #ruby
axl_ has joined #ruby
walterheck has joined #ruby
<hashpuppy> i guess my question is when something takes in a &block, how can i pass it a method name w/ some arguments or is the only way to do it { my_func("blah") }
gongura has joined #ruby
tdubz is now known as tdubellz
<Sigma00> def funcTakesBlockAndArgs(&block, *args)
internet_user has joined #ruby
<apeiros_> Sigma00: not in that order, though
<apeiros_> &block arg must be the last, both in defining and in calling
<Sigma00> yeah, I'm a newb, just shooting stuff I've lightly read over. Thanks for the heads up
kvirani has joined #ruby
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
ananthakumaran has joined #ruby
uris has joined #ruby
stefanp_ has quit [Ping timeout: 265 seconds]
peterhil has joined #ruby
peterhil has quit [Remote host closed the connection]
jeff_sebring has quit [Remote host closed the connection]
freeayu has quit [Quit: 离开]
SegFaultAX has joined #ruby
Synthead has joined #ruby
jeff_sebring has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
Facefox has quit [Remote host closed the connection]
walterheck has quit [Quit: Computer has gone to sleep]
MetaCosm has joined #ruby
ph^ has joined #ruby
akem has quit [Quit: Forget progress by proxy. Land on your own moon.]
rorrego has joined #ruby
ben_alman has quit [Excess Flood]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
diegok has joined #ruby
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
dekroning has joined #ruby
heftig has quit [Quit: leaving]
iocor has joined #ruby
heftig has joined #ruby
sleetdrop has quit [Remote host closed the connection]
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
shellox has quit [Disconnected by services]
jrist-mtg is now known as jrist
benwoody has left #ruby [#ruby]
ben_alman has joined #ruby
Guest40995 has quit [Quit: ばいばい]
mxweas has quit [Ping timeout: 245 seconds]
Facefox has joined #ruby
IrishGringo has joined #ruby
mxweas has joined #ruby
proghat_ has joined #ruby
looopy has quit [Remote host closed the connection]
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ckrailo has joined #ruby
mxweas has quit [Ping timeout: 244 seconds]
krz has quit [Quit: krz]
ken_barber has joined #ruby
looopy has joined #ruby
proghat has quit [Ping timeout: 252 seconds]
nu7hatch has left #ruby [#ruby]
skum is now known as Vainoharhainen2
jprovazn is now known as jprovazn_away
er1c_ has quit [Quit: WeeChat 0.3.4]
bricker88 has joined #ruby
relix2 has quit [Quit: relix2]
mxweas has joined #ruby
kiela has quit [Remote host closed the connection]
eurek has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
kiela has joined #ruby
Facefox has quit [Ping timeout: 250 seconds]
looopy has quit [Remote host closed the connection]
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
jarednorman has joined #ruby
cbuxton has joined #ruby
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
diegoviola has joined #ruby
fayimora has quit [Ping timeout: 240 seconds]
er1c_ has joined #ruby
GeekOnCoffee has quit [Read error: Operation timed out]
fayimora has joined #ruby
arturaz has quit [Read error: Operation timed out]
nateberkopec has joined #ruby
mxweas has quit [Ping timeout: 246 seconds]
kenperkins has quit [Quit: Computer has gone to sleep.]
DrShoggoth has joined #ruby
zomgbie has joined #ruby
MrGando has joined #ruby
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
jeffreybaird has joined #ruby
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
diegoviola has quit [Quit: leaving]
thone_ has joined #ruby
zomgbie has quit [Read error: Connection reset by peer]
macmartine has quit [Quit: macmartine]
arturaz has joined #ruby
ciopte7 has joined #ruby
sako has joined #ruby
thone has quit [Read error: Operation timed out]
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
GeekOnCoffee has joined #ruby
savage- has joined #ruby
Facefox has joined #ruby
pk1001100011 has quit [Quit: Burn your gods and kill the king; Subjugate your suffering; Dead heart, in a dead world]
koskoz has joined #ruby
<CannedCorn> is it proper form to kill then waitpid
<CannedCorn> ?
wvms has quit [Quit: wvms]
iocor has quit [Quit: Computer has gone to sleep.]
bluOxigen has joined #ruby
froy has joined #ruby
ptulskie has joined #ruby
mxweas has joined #ruby
<shevy> CannedCorn I think it is an ok solution
savage- has quit [Remote host closed the connection]
hydrozen has joined #ruby
MrGando has quit [Remote host closed the connection]
zomgbie has joined #ruby
S2kx has quit [Ping timeout: 245 seconds]
pdtpatrick has quit [Quit: pdtpatrick]
MasterIdler_ has joined #ruby
mxweas has quit [Ping timeout: 245 seconds]
andrewpthorp has joined #ruby
<andrewpthorp> Hi, does rake create the .rake_tasks~ file by default?
<CannedCorn> thanks shevy
dcorbin has joined #ruby
dcorbin has quit [Changing host]
dcorbin has joined #ruby
<llaskin> shevy any chance u have any experience with test unit?
Helius has quit [Remote host closed the connection]
<shevy> llaskin not really. I mostly only test very very primitive
<shevy> if __FILE__ == $PROGRAM_NAME
<shevy> foo = Foo.new
<shevy> foo.test 'x > 1'
<shevy> :)
<llaskin> i am just trying to understand why it crashes out after the first failure
<llaskin> instead of after the end of the tst run
<shevy> that is basically how I "test"
wvms has joined #ruby
<shevy> ekaleido yeah, ruby-cgi is very simple. often too simple, but simplicity is ok. we could try to make a better ruby-cgi though :)
workmad3 has quit [Ping timeout: 256 seconds]
<shevy> ekaleido did you see the project "cgi-exception"?
mxweas has joined #ruby
<shevy> is like only one .rb file
S1kx has joined #ruby
S1kx has joined #ruby
S1kx has quit [Changing host]
rknLA has joined #ruby
<rknLA> hey, is this the most up-to-date info about writing ruby bindings for c code? http://www.ruby-doc.org/docs/ProgrammingRuby/html/ext_ruby.html
<setient> just a neato thing for those of you mysql users out there http://seclists.org/oss-sec/2012/q2/493
<setient> esp in the cloud
azm has joined #ruby
maesbn has quit [Remote host closed the connection]
<shevy> rknLA I think this is for ruby 1.8.7, a few things changed in ruby C since 1.9.x
mikepack has joined #ruby
<shevy> the general gist of it should still be valid though
<bnagy> rknLA: if you're writing bindings I'd suggest FFI
mayankkohaley has joined #ruby
ciopte7 has quit [Quit: ciopte7]
<bnagy> portable for more interpreters, and good to work with / maintained
bradhe has joined #ruby
wvms has quit [Ping timeout: 248 seconds]
jeff_sebring has quit [Remote host closed the connection]
mxweas has quit [Ping timeout: 265 seconds]
<rknLA> which direction does ffi go?
<rknLA> calling c functions from ruby?
<bnagy> wrapping binary libs
<rknLA> (the docs on the github page are a bit perplexing.. maybe i should read the ruby extensions document first)
<shevy> I have a question. In IRB, when I type 'pwdj', and this method was not found, it reports this:
<shevy> NameError: undefined local variable or method `pwdj' for main:Object
<shevy> Is there a way to somehow catch this, and perhaps do something else, but only when run in irb?
<rknLA> bnagy: is there more latency using FFI than getting my hands dirty and going DIY?
<rknLA> (the binary lib is for real time audio)
sako has quit [Ping timeout: 245 seconds]
hynkle has quit [Read error: No route to host]
<bnagy> if it's an existing lib it's going to be a lot easier with ffi, I'd say
<bnagy> if you're that worried about performance then ruby isn't the right tool
mxweas has joined #ruby
zomgbie has quit [Read error: Connection reset by peer]
koskoz has quit [Ping timeout: 240 seconds]
Guest20110 has quit [Ping timeout: 260 seconds]
sacarlson has quit [Ping timeout: 245 seconds]
bradhe has quit [Remote host closed the connection]
<rknLA> it's not an existing lib.
t-mart has quit [Quit: Leaving]
<rknLA> i'm thinking about doing a lib that does all of the heavy lifting of the audio processing in c,
hynkle has joined #ruby
<shevy> hmmm how do I require a .rb file in 1.9.3
<rknLA> but writing it in a way that is flexible enough to use with ruby or other c programs.
hasrb has joined #ruby
<shevy> aha... changing require 'test.rb' to require './test.rb' works ...
<rknLA> similar to max/msp or puredata, in that all of the objects are written in c, but they're connected in a gui patching environment. all of the sound objects would be written in c, but connected together in ruby
nooodl_ has joined #ruby
<rknLA> ruby should be fast enough to handle that, right?
<bnagy> rknLA: well then your only real option is to write it as a standalone lib, and then wrap it, no? If you write it as a ext gem it won't be usable for anything else
nooodl has quit [Disconnected by services]
pygospa has quit [Disconnected by services]
nooodl_ is now known as nooodl
ciopte7 has joined #ruby
TheRealPygo has joined #ruby
<bnagy> afaik, anyway
<rknLA> bnagy: yeah, correct.
<rknLA> k
bbttxu has joined #ruby
<rknLA> er,
<rknLA> misread as afk
<rknLA> so is ffi useful for that?
mxweas has quit [Ping timeout: 245 seconds]
<bnagy> main options are FFI and DL
<bnagy> I have had extreme pain with DL, but some people like it
pdtpatrick has joined #ruby
<rknLA> ah, so, i'd write the lib in c, then use ffi just to call the functions in the headers?
<bnagy> yes
mxweas has joined #ruby
ipoval has joined #ruby
codezombie has quit [Quit: Linkinus - http://linkinus.com]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
td123 has quit [Quit: WeeChat 0.3.8]
ipoval has quit [Client Quit]
pygospa has joined #ruby
TheRealPygo has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
artOfWar has joined #ruby
Cicloid has joined #ruby
mxweas has quit [Ping timeout: 245 seconds]
blacktulip has quit [Read error: Connection reset by peer]
blacktulip has joined #ruby
ephemerian has quit [Quit: Leaving.]
pygospa has quit [Ping timeout: 245 seconds]
ciopte7 has quit [Quit: ciopte7]
pygospa has joined #ruby
<shevy> whoa... stackoverflow is kinda becoming like a high quality wiki
berkes has quit [Ping timeout: 245 seconds]
mxweas has joined #ruby
jenglish has quit [Remote host closed the connection]
Markvilla has quit [Read error: Connection reset by peer]
indian has quit [Ping timeout: 265 seconds]
udante has quit [Disconnected by services]
udante_ has joined #ruby
centipedefarmer has joined #ruby
sacarlson has joined #ruby
pk1001100011 has joined #ruby
sacarlson has quit [Max SendQ exceeded]
counterbeing has joined #ruby
sacarlson has joined #ruby
sacarlson has quit [Max SendQ exceeded]
indian has joined #ruby
codebeaker has joined #ruby
udante_ has quit [Client Quit]
hynkle has quit [Quit: hynkle]
sacarlson has joined #ruby
Markvilla has joined #ruby
codebeaker has quit [Client Quit]
sacarlson has quit [Max SendQ exceeded]
robotmay has quit [Remote host closed the connection]
ChampS666 has joined #ruby
eywu has joined #ruby
eywu has quit [Client Quit]
<shevy> class CGI; @@accept_charset="UTF-8" unless defined?(@@accept_charset)
<shevy> ugh
ddls-devbox has quit [Remote host closed the connection]
mdstunthamster has quit [Quit: Linkinus - http://linkinus.com]
bier has quit [Ping timeout: 245 seconds]
eywu has joined #ruby
bricker88 has quit [Quit: Leaving.]
Helius has joined #ruby
Bartzy has quit [Ping timeout: 245 seconds]
a_a_g has joined #ruby
proghat__ has joined #ruby
lkba has joined #ruby
youdonotexist has joined #ruby
senny has quit [Remote host closed the connection]
<rknLA> stack overflow is fucking amazing.
<shevy> yeah
khakimov has joined #ruby
savage- has joined #ruby
proghat_ has quit [Ping timeout: 245 seconds]
ciopte7 has joined #ruby
francisfish has quit [Remote host closed the connection]
gongura has quit [Quit: This computer has gone to sleep]
fabrice31 has quit [Remote host closed the connection]
francisfish has joined #ruby
iocor has joined #ruby
bluOxigen has quit [Ping timeout: 256 seconds]
brianpWins has quit [Quit: brianpWins]
kenperkins has joined #ruby
wilmoore has joined #ruby
bier has joined #ruby
sacarlson has joined #ruby
francisfish has quit [Ping timeout: 245 seconds]
sacarlson has quit [Max SendQ exceeded]
<rking> I don't get why stackoverflow has caught on so much.
MasterIdler_ is now known as MasterIdler
MrGando has joined #ruby
<rking> Don't get me wrong - I like it, but why that site and not the 50 others like it, before it?
CheeToS has quit [Ping timeout: 248 seconds]
tatsuya_o has quit [Remote host closed the connection]
dcorbin has quit [Quit: This computer has gone to sleep]
azm has quit [Read error: Connection reset by peer]
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
mdw has quit [Remote host closed the connection]
<eam> rking: UI (experts-exchange was terrible, faked info, register-to-read), and license (SO is cc-wiki)
kenichi has joined #ruby
oooPaul has joined #ruby
Soliah has joined #ruby
adeponte has joined #ruby
ptulskie has quit [Quit: ptulskie]
alexim has joined #ruby
Morkel has quit [Quit: Morkel]
carloslopes_ has quit [Ping timeout: 245 seconds]
<rknLA> register (and pay) to read definitely killed experts exchange.
<rking> Good points.
<rknLA> UI definitely helped a lot. also searchability (though that may be more recent).. it's consistently in the top few of all of my tech-related google searches
<rking> I didn't even know about the license. That's fantastic.
gongura has joined #ruby
tds has joined #ruby
<rknLA> i think the upvoting and "accepted" answer aspects of the UI are probably it's best usability features. experts exchange was basically just a phpbb, right? reading through 6 pages of conversation is annoying when you just want the answer.
hadees has quit [Quit: hadees]
gongura has quit [Client Quit]
bigoldrock has joined #ruby
indian has quit [Ping timeout: 248 seconds]
dekroning has quit [Ping timeout: 245 seconds]
gongura has joined #ruby
tomask has joined #ruby
rippa has joined #ruby
Solnse has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
artOfWar_ has joined #ruby
fserb has joined #ruby
koskoz has joined #ruby
a_a_g has quit [Quit: Leaving.]
snip_it_ has joined #ruby
hasrb has quit [Remote host closed the connection]
artOfWar has quit [Ping timeout: 252 seconds]
zomgbie has joined #ruby
sako has joined #ruby
Sheehan has quit [Ping timeout: 245 seconds]
macmartine has joined #ruby
macmartine has quit [Remote host closed the connection]
macmartine has joined #ruby
td123 has joined #ruby
ramblex has quit [Quit: ramblex]
dr_bob has joined #ruby
looopy has joined #ruby
ken_barber has quit [Remote host closed the connection]
ken_barber has joined #ruby
rippa has quit [Ping timeout: 265 seconds]
hmans has joined #ruby
carlyle has joined #ruby
rippa has joined #ruby
yonggu_ has joined #ruby
hasrb has joined #ruby
hynkle has joined #ruby
bluenemo_ has joined #ruby
az has left #ruby ["WeeChat 0.3.7"]
axl_ has quit [Read error: Connection reset by peer]
iocor has quit [Quit: Computer has gone to sleep.]
hadees has joined #ruby
axl_ has joined #ruby
<bluenemo_> i'm on debian squeeze and i'm getting the mysql2 error: rb_wait_for_single_fd (while gem installing it its checked for (not present) but the installation doesnt fail), when i then rake assets:precompile i get undefined symbol: rb_wait_for_single_fd
shadoi has joined #ruby
yonggu_ has quit [Remote host closed the connection]
yonggu has quit [Read error: Connection reset by peer]
yonggu_ has joined #ruby
looopy has quit [Remote host closed the connection]
<bluenemo_> i've googled a lot and found that i can give the installation several options like --mysql-dir and so on, which doesnt help. i'm quite sure i've got all the (apt) packages installed
Helius has quit [Ping timeout: 246 seconds]
timonv_ has quit [Remote host closed the connection]
d3vic3 has quit [Ping timeout: 245 seconds]
n1x has joined #ruby
timonv has joined #ruby
<shevy> rking I dont really know any other site like stackoverflow
<shevy> it's kinda like almost the simplest thing possible. people post questions, other people post answers. that's it kinda... plus there is some kind of karma system, where everyone helping others is encouraged to do so
Facefox has quit [Ping timeout: 250 seconds]
d3vic3 has joined #ruby
<dross> yep
andrewpthorp has quit [Quit: Linkinus - http://linkinus.com]
adamkittelson has joined #ruby
<tds> design question for you all: I'm coding some payroll software, and it's meant to be used by companies both in the US and Canada (with possibility of future expansion elsewhere.) obviously for some classes like Employee, there is going to be some shared functionality, but a lot of differences as well. for example, some regulatory data and business logic only has to exist for one country in the other. since a company can contain only one type of employee in this app (t
<tds> they can only be canadian or american), i was thinking of just using mixins to add the different functionality at runtime, instead of creating an inheritance hierarchy which has the potential to become extremely cumbersome. any thoughts/criticisms/alternatives?
greyEAX has joined #ruby
Facefox has joined #ruby
<greyEAX> how do i set my code to work with utf8?
ZeroModulus has joined #ruby
<dross> shevy: I'm curious how stackoverflow funds the site
<greyEAX> i need to use japanese characters in a response, and i can't do it because it errors our
<greyEAX> *(out
<dross> probably ads, which i don't se
<dross> see
<shevy> dross yeah, no idea at all
v0n has joined #ruby
mdhopkins has quit [Quit: mdhopkins]
timonv has quit [Ping timeout: 245 seconds]
d3vic3 has quit [Client Quit]
joch_n has joined #ruby
<rking> greyEAX: What Ruby version?
<greyEAX> it should be 1.9.1
<greyEAX> lemme check
<rking> greyEAX: OK, as long as it's 1.9
<greyEAX> 1.9.3
Targen has quit [Ping timeout: 245 seconds]
<rking> (1.8 is do-able, but different)
<greyEAX> p194
alexander-- has joined #ruby
alexander-- has quit [Client Quit]
<shevy> 1.8 was great
RiseAgainst has joined #ruby
<rking> greyEAX: OK, so exactly what are you doing with your data, input → processing → output ?
<rking> shevy-- # not the first time I've said that.
fayimora has quit [Read error: Connection reset by peer]
<greyEAX> well basically i just want to print a string with にほんご characters
<rking> greyEAX: The string is embedded in the .rb itself?
<shevy> rking why was Encoding not made optional?
<greyEAX> yeah
<rking> shevy: Because it's a nonoptional concept. Otherwise you're stuck with hardcoding an implicit encoding.
fayimora has joined #ruby
<rking> greyEAX: Super. Put # encoding: utf8 as the 2nd line of your script.
RiseAgainst has quit [Remote host closed the connection]
chrismcg is now known as zz_chrismcg
<greyEAX> coolshoes
<greyEAX> that worked
<greyEAX> thanks!
fridim_ has joined #ruby
snearch has joined #ruby
schovi has quit [Remote host closed the connection]
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby
<rking> greyEAX: BTW I think it should be utf-8, not utf8.
<rking> greyEAX: I was surprised to Alt+Tab over here and see you say it worked. =)
<rking> (Because in my test I had to use the dash.)
<shevy> metainformation in comments
TaTonka has quit [Read error: Connection reset by peer]
peregrine81 has joined #ruby
<greyEAX> oh mine had the dash in it
<greyEAX> i didn't copypaste it
blumbri has quit [Ping timeout: 246 seconds]
<rking> shevy: In 1.8 you had to use -Ku, which I like less.
<shevy> after the shebang?
elhu has quit [Ping timeout: 248 seconds]
<shevy> something like "#!/usr/bin/ruby -wKu" ?
<shevy> or is that a commandline switch
blumbri has joined #ruby
hoelzro is now known as hoelzro|away
<rking> Yeah, like that.
apok has joined #ruby
<rking> But it has numerous disadvantages to the current way.
zomgbie has quit [Ping timeout: 245 seconds]
ziyadb has joined #ruby
n1x has left #ruby ["Ex-Chat"]
<shevy> well the new way requires an additional line specifying what encoding to use
<shevy> perhaps in ruby 3.0 we can code in pure comments alone :D
<shevy> that would be a language worth having, one where comments is data and logic
zomgbie has joined #ruby
rippa has quit [Ping timeout: 256 seconds]
bigdc1 has joined #ruby
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby
ringotwo has joined #ruby
relix has joined #ruby
mdw has joined #ruby
ringotwo has quit [Remote host closed the connection]
williamcotton has joined #ruby
snearch has quit [Quit: Verlassend]
jrist is now known as jrist-afk
gongura has quit [Quit: This computer has gone to sleep]
flip_digits has joined #ruby
ringotwo has joined #ruby
tomask has quit [Quit: Quit]
hemanth has quit [Read error: Connection reset by peer]
SegFaultAX|work2 has joined #ruby
hemanth has joined #ruby
zomgbie has quit [Ping timeout: 244 seconds]
TaTonka has joined #ruby
<rking> Ehh, sorta.
kvirani has quit [Remote host closed the connection]
Facefox has quit [Ping timeout: 250 seconds]
llaskin has left #ruby [#ruby]
counterbeing has quit [Read error: Connection reset by peer]
Solnse has quit [Ping timeout: 252 seconds]
Drewch has joined #ruby
alexander-- has joined #ruby
alexander-- has quit [Client Quit]
cesario has joined #ruby
A124 has joined #ruby
roolo has joined #ruby
borys_b_timakov has joined #ruby
tayy has joined #ruby
werdnativ has joined #ruby
tayy has quit [Remote host closed the connection]
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
krusty_ar has quit [Read error: Connection reset by peer]
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
the_jeebster1 has joined #ruby
pdtpatrick_ has joined #ruby
DrShoggoth has quit [Read error: Connection reset by peer]
the_jeebster has quit [Ping timeout: 245 seconds]
bigdc1 has quit []
pdtpatrick has quit [Ping timeout: 245 seconds]
pdtpatrick_ is now known as pdtpatrick
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
krusty_ar has joined #ruby
davidpk has joined #ruby
arturaz has quit [Ping timeout: 240 seconds]
arturaz has joined #ruby
havenn has joined #ruby
pdtpatrick has quit [Read error: Connection reset by peer]
zomgbie has joined #ruby
Facefox has joined #ruby
Facefox has quit [Max SendQ exceeded]
pdtpatrick has joined #ruby
khakimov has joined #ruby
Facefox has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Facefox has quit [Max SendQ exceeded]
Facefox has joined #ruby
cbuxton has quit [Quit: Leaving.]
cbuxton has joined #ruby
schovi has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
mrsolo has joined #ruby
mockra has joined #ruby
mrsolo has quit [Client Quit]
mrsolo has joined #ruby
schickung has quit [Quit: schickung]
vlad_starkov has joined #ruby
irrationalfab has quit [Remote host closed the connection]
cj3kim has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
cbuxton has quit [Ping timeout: 245 seconds]
cbuxton has joined #ruby
cj3kim has quit [Client Quit]
zommi has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
mdw_ has joined #ruby
<shevy> so when you are writing a ruby program that outputs stuff on the commandline
<shevy> but you want to have it coloured, what do you use?
carloslopes has joined #ruby
nahhh has quit [*.net *.split]
patronus has quit [*.net *.split]
rudle has quit [*.net *.split]
brian- has quit [*.net *.split]
ged has quit [*.net *.split]
nahhh has joined #ruby
rudle has joined #ruby
patronus has joined #ruby
brian- has joined #ruby
ged has joined #ruby
<shadoi> highline does it for menus/prompts, etc.
<shadoi> If you just want colored output there are a few different options
<shadoi> I suppose you could just use highline for it as well though.
mdw has quit [Ping timeout: 248 seconds]
ciopte7 has quit [Quit: ciopte7]
irrationalfab has joined #ruby
<shevy> hmm ok, going to have a look at highline, thanks
mindrag has joined #ruby
voodoofish430 has joined #ruby
cbuxton has quit [Remote host closed the connection]
jeffreybaird has quit [Quit: jeffreybaird]
nipra has joined #ruby
jamesaxl has quit [Ping timeout: 245 seconds]
baniseterfiend` has quit [Remote host closed the connection]
jamesaxl has joined #ruby
baniseterfiend` has joined #ruby
<matled> shevy: search for ansi / vt 100 escape codes
<matled> probably there are libraries for that too, but some simple stuff is useful to know anyway
baniseterfiend` has quit [Read error: Connection reset by peer]
Ammar01 has quit [Quit: Leaving]
banisete_ has joined #ruby
nilg has quit [Remote host closed the connection]
hoelzro|away is now known as hoelzro
maletor_ has joined #ruby
<matled> for example "\r\e[K" to go back to the beginning and remove the content of the current line
<shevy> oh that one is cool
havenn has quit [Remote host closed the connection]
<matled> handy to display progress of long running jobs :)
<shevy> lol ...
<shevy> print "hi \r\e[K"
werdnativ has quit [Quit: werdnativ]
robbyoconnor has quit [Ping timeout: 252 seconds]
<shevy> outputs nothing at all :)
<shevy> at least not the "hi" part
<shevy> hmm indeed, I could make a growing status bar with this I suppose?
<shevy> print "\r\e[K|"
<shevy> print "\r\e[K|==="
<shevy> print "\r\e[K|========"
<shevy> print "\r\e[K|========>"
<matled> if the output is growing \r is enough
<shevy> ah
<matled> the kill line is necessary to remove anything that is longer than the new output
<matled> for example if you're counting down
<shevy> I see
CannedCorn has quit [Ping timeout: 246 seconds]
<matled> or just add the current item in the output which has varying length
lxsameer has quit [Ping timeout: 245 seconds]
nilg has joined #ruby
mikepack has quit [Remote host closed the connection]
<tommylommykins> be warned: Some utilities gsub \r with zn before printing
<tommylommykins> that messed timers up
<Paradox> i'm having trouble installing the termios gem on OS X 10.7 with 1.9.3-p194
<Paradox> i run gem install termios, and it spits make errors
<Icehawk78> shevy: For that in particular, I generally just use the progressbar gem
zaychenok has joined #ruby
<shevy> cool
fayimora has quit [Quit: Busy…..zzzzz]
<Icehawk78> shevy: Additionally, you can use colorize if you want to just add color to your outputs.
<shevy> colorize?
brianpWins has joined #ruby
proghat has joined #ruby
maletor_ has quit [Ping timeout: 248 seconds]
<Paradox> shevy, take a look at highline
<Paradox> :p
<Icehawk78> ie `puts "Blue".blue + " Green".green + " Swapped".black.on_white`
<Icehawk78> It's another gem. Sounds likely that highline may either implement that gem or do something similar.
mdhopkins has joined #ruby
fayimora has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
_marvin has joined #ruby
<Paradox> highline does a lot of nice things for getting and printing to the terminal
proghat__ has quit [Ping timeout: 245 seconds]
zaychenok has joined #ruby
<Paradox> like…you can chose what to echo back
maletor has joined #ruby
<Paradox> so a password prompt could echo nothing, or *, or gibberish
<Paradox> its up to you
axl__ has joined #ruby
bluOxigen has joined #ruby
ChampS666 has quit [Ping timeout: 245 seconds]
<Icehawk78> Ah, gotcha.
ananthakumaran has quit [Quit: Leaving.]
Y_Ichiro_ is now known as Y_Ichiro
<Paradox> that actually segues into my problem
<Paradox> they recommend on unix-based systems, you use termios for better character control
<Paradox> and thats what i'm trying to install
axl_ has quit [Ping timeout: 256 seconds]
axl__ is now known as axl_
<Paradox> but when i run gem install
<lectrick> Can anyone explain the "delegate" method often present in things like rails source? Here is an example call: delegate :pluck, to: :scoped
moktod has quit [Read error: Operation timed out]
cj3kim has joined #ruby
<Paradox> lectrick, do you have pry?
<Paradox> i find its great to go poking around applications/rails/whatever and find what does what
zaychenok has quit [Quit: Konversation terminated!]
<Paradox> sadly i dont know enough to answer your question
hydrozen has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
zaychenok has joined #ruby
<lectrick> Paradox: I can set it up I believe
moktod has joined #ruby
maletor has quit [Ping timeout: 240 seconds]
qwerxy has quit [Ping timeout: 244 seconds]
<Paradox> its useful for pulling something apart
<Paradox> and generally you learn more that way
cj3kim has quit [Client Quit]
khakimov has quit [Quit: Computer has gone to sleep.]
a_a_g has joined #ruby
roolo has quit [Quit: Linkinus - http://linkinus.com]
<koskoz> what is the gem to install to have the 'Time' library?
maletor has joined #ruby
ringotwo has quit [Remote host closed the connection]
krz has joined #ruby
<Hanmac> koskoz you dont need a gem for time
roolo has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
dekroning has joined #ruby
Dreamer3 has joined #ruby
Vainoharhainen2 has quit [Quit: Leaving...]
havenn has joined #ruby
mrdtt has quit [Quit: Leaving]
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
<Paradox> koskoz, it comes built in
<Paradox> do you mean the addons rails provides?
<Paradox> they come in actionview and actionpack
jcromartie has joined #ruby
albemuth has quit [Ping timeout: 252 seconds]
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
<deryl> don't you just have to: require 'time' to get all of the time classes including the stuff that people are debating over merging together into core/stdlib
* deryl thought i read that was all that was required
digitalcakestudi has quit [Ping timeout: 245 seconds]
albemuth has joined #ruby
roolo has quit [Quit: Linkinus - http://linkinus.com]
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
<Dl33ter> How can I add a field like " ALL ", in a grouped_collection_select, in all categories?
snip_it_ has quit [Quit: snip_it_]
walterheck has joined #ruby
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
gcds has quit [Quit: gcds]
borkman` has joined #ruby
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
NimeshNeema has joined #ruby
borkman has quit [Ping timeout: 248 seconds]
<Paradox> deryl, no, not as of p194…
<deryl> hh. rolled in then. thanks for the heads up
<Paradox> the stdlib Time doesn't have changes to Fixnum or time_ago_in_words
mindrag has left #ruby [#ruby]
<Paradox> like… 10.minutes.ago
<Paradox> or 10.minutes for that matter
<deryl> ok so that change was not rolled in. my mistake. thanks :)
zaychenok has quit [Read error: Connection reset by peer]
<Paradox> those are in actionview i believe
zaychenok has joined #ruby
williamcotton_ has joined #ruby
<deryl> no no, this i thought wasn't part of the rails related gems. i thought that the time_ago_in_words was added to the portion of ruby that isn't considered core. (Thats stdlib correct? core is, well, core, and then there's stdlib)
jeffreybaird has joined #ruby
williamcotton has quit [Ping timeout: 246 seconds]
williamcotton_ is now known as williamcotton
<Paradox> aah no
<Paradox> my mistake
havenn has quit [Remote host closed the connection]
<deryl> like Date was supposed to have an extender lib that was put into stdlib but not rolled directly into core. and yes, this is me going purely off what i thought i read
<Paradox> they are in active support
<deryl> ok. thanks for the clarification
vitoravelino has quit [Ping timeout: 252 seconds]
<Paradox> afaik, its still not in stdlib
<Paradox> time_ago_in_words and distance_between… are still in Actionpack
vitoravelino has joined #ruby
vitoravelino has quit [Changing host]
vitoravelino has joined #ruby
<deryl> got ya
rknLA has quit [Remote host closed the connection]
<Paradox> and the mods to fixnum and whatnot so you can do 10.minutes or string.titlecase
<Paradox> are in Activesupport
<deryl> ok so i'm confused. least i know that
<Paradox> yeah
<Paradox> hopefully we'll see those things rolled in in 2.0
<Paradox> because they are pretty damn useful
<Paradox> i mean all that 10.minutes returns is 600
<Paradox> but still
<deryl> yeah, hope so too.
zaychenok has quit [Client Quit]
<Paradox> better than having to define your own constants in every program
<deryl> true
zaychenok has joined #ruby
<deryl> just lots of these 'little things' going on so not always sure if they've taken place already, are pending, etc. and the intimate details of whats what i'm not always sure where to find the details on
jrist-afk is now known as jrist
<deryl> just goes with the territory :)
khyron320 has quit [Remote host closed the connection]
arturaz has quit [Ping timeout: 245 seconds]
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
<Paradox> thats one reason why i prefer ruby to python
<Paradox> actual community debates
<Paradox> python, if guido doesnt like something
<Paradox> he just shuts it down
<Paradox> hard to imagine matz acting that way
<deryl> yeah, you'd be hard pressed to get me to believe hed ever go that route
<deryl> err he'd
<Paradox> i came up with this analogy in a different IRC chan a week or so ago
<Paradox> both guido and matz are nerds
<Paradox> but guido is the guy who got angry and wouldnt play dnd with you if you didnt let him be dungeon master
<deryl> i mean not like i know the guy personally or anything, just what i read of him and his translated tweets etc, he doesn't strike me as that kind of guy
khyron320 has joined #ruby
<Paradox> while matz was the one who lol'd at being eaten by a grue
<deryl> lol
artOfWar_ has quit [Read error: Connection reset by peer]
UNIXgod has quit [Ping timeout: 245 seconds]
zaychenok has quit [Client Quit]
artOfWar has joined #ruby
<deryl> oops phone
zaychenok has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
ChampS666 has joined #ruby
twock has joined #ruby
Foxandxss has joined #ruby
koskoz has quit [Ping timeout: 256 seconds]
zaychenok has quit [Client Quit]
<shevy> lol
zaychenok has joined #ruby
<shevy> you'd have to be able to speak japanese though, if matz were to be the DM :P
<Paradox> i think he speaks broken english
<Paradox> most japanese do
<Paradox> and…hasnt he talked at cons before?
<shevy> yeah
hmans has quit [Quit: Linkinus - http://linkinus.com]
<shevy> but he "thinks" in japanese while talking english
<Paradox> thats what i mean by broken english
fermion has quit [Quit: P]
<Paradox> like…i speak broken french
<Paradox> but i dont think in french yet
<shevy> hehe
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
fearoffish has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
artOfWar has quit [Remote host closed the connection]
davidpk has quit [Quit: Computer has gone to sleep.]
Kunda has quit [Quit: Kunda]
Helius has joined #ruby
davidpk has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
hydrozen has joined #ruby
bosphorus has quit [Remote host closed the connection]
jrist is now known as jrist-mtg
werdnativ has joined #ruby
zaychenok has quit [Client Quit]
williamcotton_ has joined #ruby
zaychenok has joined #ruby
williamcotton has quit [Ping timeout: 248 seconds]
williamcotton_ is now known as williamcotton
walterheck has quit [Quit: Computer has gone to sleep]
sepp2k has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
tcopp has joined #ruby
MasterIdler has quit [Quit: MasterIdler]
zaychenok has quit [Client Quit]
MasterIdler has joined #ruby
qwerxy has joined #ruby
zaychenok has joined #ruby
francisfish has joined #ruby
wpaulson has joined #ruby
maletor has quit [Ping timeout: 256 seconds]
maletor has joined #ruby
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby
fayimora has quit [Read error: Connection reset by peer]
a_a_g has quit [Ping timeout: 244 seconds]
fayimora has joined #ruby
hasrb has quit [Remote host closed the connection]
mdw_ has quit [Read error: Connection reset by peer]
greyEAX has quit [Ping timeout: 260 seconds]
mdw has joined #ruby
manizzle has joined #ruby
UNIXgod has joined #ruby
dotnull has joined #ruby
timonv has joined #ruby
kirun has joined #ruby
maletor has quit [Ping timeout: 245 seconds]
mdw has quit [Read error: Connection reset by peer]
mdw_ has joined #ruby
brngardner has quit [Remote host closed the connection]
hasrb has joined #ruby
maletor has joined #ruby
tewecske has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
peregrine81 has joined #ruby
mdw_ has quit [Read error: Connection reset by peer]
Facefox has quit [Ping timeout: 250 seconds]
nipra has quit [Ping timeout: 244 seconds]
mdw has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
Facefox has joined #ruby
zaychenok has joined #ruby
mdw has quit [Read error: Connection reset by peer]
mdw has joined #ruby
kirun_ has joined #ruby
qwerxy has quit [Quit: offski]
ylluminate has joined #ruby
kirun has quit [Ping timeout: 252 seconds]
alejo has joined #ruby
mdw has quit [Read error: Connection reset by peer]
yoklov has joined #ruby
zaychenok has quit [Read error: Connection reset by peer]
mdw has joined #ruby
zaychenok has joined #ruby
wpaulson has quit [Quit: wpaulson]
williamcotton_ has joined #ruby
qwerxy has joined #ruby
evoltech has left #ruby [#ruby]
fayimora has quit [Ping timeout: 245 seconds]
wpaulson has joined #ruby
the_jeebster has joined #ruby
williamcotton has quit [Ping timeout: 246 seconds]
williamcotton_ is now known as williamcotton
the_jeebster1 has quit [Read error: Connection reset by peer]
olrrai has joined #ruby
mdw has quit [Read error: Connection reset by peer]
mdw has joined #ruby
rizzylt has quit [Ping timeout: 245 seconds]
zaychenok has quit [Read error: Connection reset by peer]
nipra has joined #ruby
zaychenok has joined #ruby
UNIXgod has quit [Changing host]
UNIXgod has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
fayimora has joined #ruby
<lectrick> What's the best way to duck-type whether an object is IO-like?
<lectrick> So far I have respond_to?(:rewind) but I'm not 100% sure
mayankkohaley has quit [Ping timeout: 244 seconds]
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
<wpaulson> Checking for :rewind sounds pretty good. What methods are you planning to call on the object after it's typed?
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
dEPy has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
zaychenok has quit [Read error: Connection reset by peer]
<dEPy> what is ||= in ruby?
zaychenok has joined #ruby
<xclite> val || = expr
<epochwolf> dEPy: if object is false, nil, or undefined, assign it to this.
<xclite> same as val = val || expr
<xclite> as epochwolf said, basically initializes something that is falsy
nipra has quit [Ping timeout: 244 seconds]
<epochwolf> xclite: or undefined
<xclite> undefined is falsy
<epochwolf> xclite: it's not in most cases
<epochwolf> it's an exception
<shevy> lectrick I usually check for .is_a? directly
<lectrick> shevy: StringIO.is_a?(IO) #=> false
<epochwolf> lectrick: if you know you need an IO object, it's okay to check the type directly.
<xclite> so it is
kirun_ is now known as kirun
federic has quit [Remote host closed the connection]
<Hanmac> xclite "val ||= expr" and "val = val || expr" is not the directly the same, but similar enough
<epochwolf> Hanmac: val = will define val as nil
<epochwolf> before (val || expr) is evaluated
<shevy> lectrick well seems as if IO and StringIO are not really related to each other or?
theRoUS has quit [Remote host closed the connection]
<xclite> yay principle of least surprise. ||= is equivalent to: a or a = expr
nanderoo has quit [Quit: Leaving.]
theRoUS has joined #ruby
<Hanmac> shevy: they are related
<lectrick> shevy: Well, I guess it's semantics. StringIO doesn't deal directly with files, it just implements the IO calls to a String object
<epochwolf> xclite: it's not actually, you'll get an exception if a isn't defined.
zaychenok has quit [Read error: Connection reset by peer]
<shevy> well, are they subclasses of anything else?
zaychenok has joined #ruby
<shevy> with subclasses, code like this would work fine: class Cat; end; class Dog < Cat; end; cat = Cat.new; dog = Dog.new; cat.is_a? Cat # => true; dog.is_a? Dog # => true; dog.is_a? Cat # => true; cat.is_a? Dog # => false
<xclite> epochwolf: should have said || but got lazy with the shift
<Hanmac> shevy, not per subclass because this is not so possible, but they share the same methods
<xclite> epochwolf: hm even that's wrong. guess my ref was outdated
<shevy> walks like a duck
<epochwolf> xclite: val = val || expr is the behavior iirc
<shevy> quacks like a duck
<shevy> is a wolf
<shevy> the epochwolf!!!
graft has joined #ruby
* epochwolf raises his pimppaw and slaps shevy
zaychenok has quit [Client Quit]
<shevy> lol
<graft> anyone okay with REXML here? I am trying to figure out how to get the name of an attribute, and it seems to not exist as a method
zaychenok has joined #ruby
burgestrand has joined #ruby
<epochwolf> REXML… the horrors
<shevy> :)
* epochwolf clings to nokogiri
<epochwolf> at least nokogiri can validate stuff in a decent manner D:
<shevy> nokogir is the good looking dress around the bride, but she is still ugly
<epochwolf> shevy: I'm an enterprise rails developer, it's ugly.
looopy has joined #ruby
<epochwolf> graft: I'll check some docs for you, which ruby version?
<graft> i think i avoided nokogiri because i didn't like the way it generates output or something, i forget
<graft> never mind, i figured it out
ken_barber1 has joined #ruby
<GeekOnCoffee> shevy: doesn't mean you should put an ugly dress on the ugly bride
<graft> REXML::Element.attributes doesn't actually return an enumerator of the attributes, it just gives |name,value| pairs
rippa has joined #ruby
<epochwolf> graft: ow… nokogiri just provides a nice method.
<Hanmac> shevy: StringIO.ancestors shows some kind of impossible modules :P
<shevy> I remember I had problems in the past with nokogiri. it was a dependency for mechanize. not sure what changed, but nokogiri didnt work for me back then and neither did mechanize as a result :(
<shevy> but it was like 2 or 3 years ago
zaychenok has quit [Client Quit]
<epochwolf> shevy: I've been using it for parsing html and xml for a few years.
<epochwolf> It's pretty good.
zaychenok has joined #ruby
<epochwolf> hmm.. maybe just 18 months.
<shevy> Hanmac, yeah... IO.ancestors is even stranger... # => [IO, is this common that a class has itself as ancestor?
<shevy> oh
<shevy> first member seems to be itself
<shevy> StringIO.ancestors # => [StringIO, IO::writable, IO::readable,
cbuxton has joined #ruby
ahuman_ is now known as ahuman
ken_barber has quit [Ping timeout: 246 seconds]
<Hanmac> this "IO::writable" module is very funny :P
<nw> graft: REXML is unbelievably slow, though
<nw> compared to nokogiri
looopy has quit [Remote host closed the connection]
<epochwolf> nw: it's slow compared to anything
<nw> epochwolf: true enough
<shevy> Hanmac, well I still find the ruby separation in modules and classes a bit weird
<epochwolf> shevy: modules are namespaces
<shevy> it kinda gives me the message "try to use classes and subclasses"... but with modules, it seems to tell me "ignore subclasses, use separate modules and include them"
<epochwolf> but they also can act as mixins
wpaulson has left #ruby [#ruby]
hydrozen has quit [Quit: Computer has gone to sleep.]
<shevy> epochwolf, but people use class Foo; class Bar too. see apeiros_ he once said the toplevel class gives him more options than a module:)
<epochwolf> shevy: inheritance is a heavy weight tool.
ChampS666 has quit []
hemanth has quit [Read error: Connection reset by peer]
<nw> i recently migrated a script from REXML to nokogiri… the execution time went down from over two minutes to less than two seconds
wpaulson_ has joined #ruby
<Hanmac> shevy: goto php and use ther interfaces
<shevy> ewwwwwww
<shevy> php!
hemanth has joined #ruby
<epochwolf> nw: yes, I've seen similar performance changes, especially with xpaths
<shevy> but who knows... perhaps I will one day
<nw> epochwolf: yep
itnomad has joined #ruby
<shevy> there seem to be more php jobs :P
<nw> so yeah, i really wouldn't recommend using rexml unless you absolutely have to :P
<epochwolf> shevy: there's more fast food jobs than php jobs
<daed> hell yeah fast food
<dEPy> what's .method ?
<daed> there are more php jobs maybe
<daed> but holy fuck i'd rather write ruby any day
<daed> i'd even take a pay cut to write ruby over php
<epochwolf> daed: pretty much
<shevy> epochwolf man, I have utmost respect for the fast food folks. I couldn't do such a job
<barefoot> hehe
<epochwolf> shevy: O
<daed> i loved working fast food for the most part
<epochwolf> shevy: I've done it. I have no respect for those people.
<daed> at least, the food prep
<daed> manning drive-thru is the worst experience on earth
<epochwolf> daed: 1 month at McDonalds, 2 years at subway.
<Hanmac> depy: .method returns an Method object, its like a time capsule wich you can call later
bosphorus has joined #ruby
<shevy> daed: hehe
<daed> epochwolf; 9 months at taco bell, 1 year at papa johns doing delivery
<daed> i enjoyed both
<Hanmac> at 03:14:07 UTC on Tuesday, 19 January 2038, epochwolf will apear and swallow the sun
<shevy> k we still have some years
* epochwolf hiccups
<shevy> epochwolf why only one month there?
ghanima has joined #ruby
francisfish has quit [Remote host closed the connection]
<epochwolf> shevy: a manager punched me. I left.
kvirani has joined #ruby
<shevy> whoa
<dEPy> Hanmac closure? closed over an acuall class/object?
<epochwolf> I also had one of those peopel slip drugs into my drink
<Hanmac> depy: yeah the Method Objects are similar to a closure/Proc
Seventoes has joined #ruby
hadees has quit [Quit: hadees]
jrist-mtg is now known as jrist
cyong has joined #ruby
tuxaddicted has quit [Quit: leaving]
jeffreybaird has joined #ruby
twixmix has left #ruby [#ruby]
<ghanima> Let me rephrase is capistrano the right tool for automated tasking if you have to interface with sudo a great deal
stat1x has quit [Remote host closed the connection]
stat1x has joined #ruby
vitor-br has joined #ruby
havenn has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
vlad_starkov has quit [Remote host closed the connection]
looopy has joined #ruby
zaychenok has joined #ruby
hadees has joined #ruby
dangerousdave has quit [Quit: Linkinus - http://linkinus.com]
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
Helius has quit [Remote host closed the connection]
zomgbie has quit [Ping timeout: 245 seconds]
williamcotton has quit [Ping timeout: 256 seconds]
corenumb has joined #ruby
williamcotton has joined #ruby
zaychenok has quit [Client Quit]
hasrb has quit [Remote host closed the connection]
wpaulson__ has joined #ruby
zaychenok has joined #ruby
<corenumb> why isnt this working https://gist.github.com/2912405 ? it keeps giving me Please Enter -h for more infomation even tho i pass -h argvement
* corenumb anyone ?
ken_barber has joined #ruby
<RubyPanther> ghanima: yes
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
<xclite> corenumb: are you passing a -i also? your if requires both $host and $inj to be set
sepp2k has quit [Read error: Operation timed out]
<xclite> corenumb: if you pass just -h $inj isn't set.
ken_barber1 has quit [Ping timeout: 244 seconds]
<corenumb> xclite, but when I do just -h shouldnt it show the help and exit ?
sepp2k has joined #ruby
wpaulson_ has quit [Ping timeout: 265 seconds]
<xclite> corenumb: I've never used OptionParser but does it just hit the first occurrence of -h?
kapowaz_ has joined #ruby
<corenumb> hmm
zaychenok has quit [Client Quit]
<xclite> corenumb: if you remove the first h does it exit as expected?
<corenumb> xclite, gimme a minit
zaychenok has joined #ruby
Banistergalaxy has quit [Ping timeout: 260 seconds]
xaq has joined #ruby
kapowaz_ is now known as kapowaz
bradb has joined #ruby
zaychenok has quit [Client Quit]
cek has joined #ruby
zaychenok has joined #ruby
<cek> wondering why isn't my autoload working when execution is 1 class away from parent module
<cek> says it can't find the constant
<cek> autoload :A, 'a' ; getting uninitialized constant Top::A when trying to use A.new
ken_barber1 has joined #ruby
<cek> from within Top::B#some_method
jeremy_carroll has joined #ruby
ken_barb_ has joined #ruby
<jeremy_carroll> Quick question. Does ruby 1.8.7 have a Random function which takes a Seed? I see 1.9.2 has Random.new.
<cek> problem solved by moving autoload under Top.
cek has quit [Client Quit]
td123 has joined #ruby
ken_barber has quit [Ping timeout: 265 seconds]
banisete_ has quit [Remote host closed the connection]
<xclite> jeremy_carroll: after a quick google, there is no Random object in 1.8.7
schaerli has joined #ruby
zaychenok has quit [Read error: Connection reset by peer]
<xclite> jeremy_carroll: so of course there's rand but I don't see it taking a seed. maybe some doc somewhere elaborates
zaychenok has joined #ruby
ken_barber1 has quit [Ping timeout: 245 seconds]
<jeremy_carroll> xclite: Yeah. I was coming up blank as well. Was looking for an RNG to get the same values every time based on a seed. Ex: I have an array of 100 servers, and I need 10% of them. Calculate an RNG to pick out 10 numbers from 0-99 with a seed so the same servers are selected every time, even with a failure / retry block
<xclite> jeremy_carroll: one stackoverflow user mentioned installing the backport gem
<xclite> jeremy_carroll: which gives you access to Random, among other things, without requiring an upgrade to 1.9.2
zaychenok has quit [Client Quit]
<jeremy_carroll> xclite: I don't know what else that will affect tho. Wondering if I can just recompile random.c for 1.8.7 in a gem, or something.
zaychenok has joined #ruby
netogallo has joined #ruby
stephenjudkins has joined #ruby
<xclite> jeremy_carroll: there's a gem called simple-random but I have no experience with it. Most of my dev is local so I keep on the bleeding edge of ruby
nisstyre has quit [Quit: Leaving]
chienpo has joined #ruby
jeffreybaird has quit [Ping timeout: 244 seconds]
cjs226 has quit []
carlyle has quit [Remote host closed the connection]
<jeremy_carroll> xclite: I hear you. I'm used to 1.9.x branch, but I have some 1.8.x clients that are looking to deploy this.
<jeremy_carroll> xclite: Thanks for the tips. Looking into that now.
ken_barber has joined #ruby
icooba has quit [Quit: icooba]
fayimora has quit [Ping timeout: 246 seconds]
carlyle has joined #ruby
cyong has quit [Quit: Leaving.]
dcorbin has joined #ruby
dcorbin has quit [Changing host]
dcorbin has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
Gavilan has joined #ruby
bluenemo__ has joined #ruby
bluenemo__ has quit [Changing host]
bluenemo__ has joined #ruby
zaychenok has joined #ruby
ken_barb_ has quit [Ping timeout: 256 seconds]
pu22l3r has quit [Ping timeout: 245 seconds]
philips has quit [Excess Flood]
moktod has quit [Quit: Lost terminal]
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
philips has joined #ruby
zaychenok has quit [Client Quit]
<corenumb> https://gist.github.com/2912574 how can I know how much time it took get a response ?
zaychenok has joined #ruby
fbernier has quit [Ping timeout: 245 seconds]
* corenumb anyone ?
dEPy has quit []
timonv has quit [Remote host closed the connection]
olrrai has quit [Ping timeout: 245 seconds]
diegok has quit [Read error: Operation timed out]
Morkel has joined #ruby
eywu has left #ruby [#ruby]
rippa has quit [Ping timeout: 244 seconds]
<stephenjudkins> corenumb: unsure what you're asking?
<stephenjudkins> is calling `Time.now` before and after somehow inefficient?
bigoldrock has quit [Read error: Connection reset by peer]
<corenumb> stephenjudkins, i was just wondering how can I know how much time it took to get a complete response from the server
<stephenjudkins> also, `Net::HTTP.get` does what you're looking for with less lines of code
Kunda has joined #ruby
<stephenjudkins> ok... check the time before you start, check the time when you're finished, and compare the two.
workmad3 has joined #ruby
zaychenok has quit [Ping timeout: 265 seconds]
<corenumb> stephenjudkins, can u give me something ? like an example ?
davidpk has quit [Quit: Computer has gone to sleep.]
<stephenjudkins> corenumb: no. you need to learn to figure these things out yourself.
bigoldrock has joined #ruby
roams has quit [Ping timeout: 260 seconds]
davidpk has joined #ruby
jeffreybaird has joined #ruby
Guest20110 has joined #ruby
ephemerian has joined #ruby
williamcotton_ has joined #ruby
hashpuppy has left #ruby [#ruby]
A124 has left #ruby [#ruby]
williamcotton has quit [Ping timeout: 248 seconds]
williamcotton_ is now known as williamcotton
Spooner has joined #ruby
yannis has quit [Quit: yannis]
wpaulson__ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
mikepack has joined #ruby
Helius has joined #ruby
mengu has quit [Quit: Konversation terminated!]
Helius has quit [Remote host closed the connection]
<R3dy> If I do Thread.new{function_that_returns_string(args)}
wpaulson_ has joined #ruby
<R3dy> I don't get my returned data
d3c has quit [Quit: Quit]
<R3dy> is ther esomething else I need to do to track that?
<workmad3> R3dy: well... not surprising
Dr4g_ has joined #ruby
schickung has joined #ruby
<workmad3> R3dy: the whole point of a thread is that it executes in a different context at a different time... you need to jump through hoops if you want to transfer data between threads (and it's generally advised to keep data sharing to a minimum)
<R3dy> workmad3: acctually I just want each thread to prepend to an array
hynkle has quit [Quit: hynkle]
<R3dy> so like I have a method that maeks a call to a website and pulls some data
<R3dy> it then uses that data to create an instance of a class
geekbri has quit [Remote host closed the connection]
<R3dy> I am doing this a few thousand times
<R3dy> so it would be cool to thread it
<R3dy> to make it faster?
<R3dy> maybe I don't understand it correctly
<shevy> R3dy seems you can not easily append data to arrays that way in a thread
<shevy> it works when you use thread.join however
iocor has joined #ruby
carloslopes has quit [Quit: Leaving]
<shevy> to make it "faster" seems to be the wrong word. synchronous... or "work at the same time", would be better words. i.e. nonblocking mode
<shevy> the pickaxe example downloads some different websites via Thread.new at the same time
<ged> R3dy: pry(main)> ary = []; thr = []; 5.times { |i| thr << Thread.new { ary << i; sleep 2 } }; thr.each( &:join ); ary
<ged> => [0, 1, 2, 3, 4]
<ged> I.e., you can append to the array inside the thread.
<ged> Just .join all the threads at the end.
blacktulip has quit [Remote host closed the connection]
<R3dy> lol man I"m such a newb
<ged> Or the thread's block will return the last value of the block when you .join if you prefer to not to share the array inside the threads. Which, as workmad3 says is better.
<R3dy> I don't really get either of the help from shevy or ged
<ged> Or I guess .value is how you do that under 1.9.
<ged> pry(main)> ary = []; thr = []; 5.times { |i| thr << Thread.new { sleep rand(5) } }; thr.each {|t| ary << t.value }; ary
<ged> => [1, 4, 2, 1, 2]
Bartzy has joined #ruby
looopy has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
Zolrath has joined #ruby
netogallo has quit [Remote host closed the connection]
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby
kylemcgill has joined #ruby
tatsuya_o has joined #ruby
akoumjian has joined #ruby
hashset has left #ruby [#ruby]
DanBoy has joined #ruby
Illiux has joined #ruby
baroquebobcat has joined #ruby
baniseterfiend` has joined #ruby
jeffreybaird_ has joined #ruby
jeffreybaird has quit [Read error: Connection reset by peer]
jeffreybaird_ is now known as jeffreybaird
luxurymode has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
dr_bob has quit [Quit: Tune in next week when you'll hear Dr. Bob say...]
nowthatsamatt has joined #ruby
nowthatsamatt has left #ruby [#ruby]
looopy has joined #ruby
<akoumjian> Any ideas why I'm getting this Net::SCP error? https://gist.github.com/2912736 Using it with vagrant.
<shevy> R3dy you wrote "each thread to prepend to an array". my code does that.
wpaulson has joined #ruby
<R3dy> I didn't acctually write any threads
wpaulson_ has quit [Ping timeout: 244 seconds]
<shevy> well, it appends. but it's almost the same, just do @array[0,0] = 'foo'
havenn has quit [Read error: Connection reset by peer]
<R3dy> I just have a method that creates and isntance of a class
dagnachewa has joined #ruby
<R3dy> then prepends that output
<R3dy> to an array
centipedefarmer has quit [Quit: This computer has gone to sleep]
<shevy> k then why did you write "acctually I just want each thread to prepend to an array"
<R3dy> and I call that methods a bunch of times
<R3dy> i probably used wrong terms because I don't acctually udnerstand threads
<R3dy> my thought process was
<shevy> you isolate some code into a thread, then it runs in another context
cjs226 has joined #ruby
<shevy> while not blocking the rest of your program
<R3dy> so if I have a lone that for instance looks like this
<R3dy> array.each {|something| call_function(something)}
<R3dy> I thought maybe I could to Thread.new{array.each {|something| call_function(something)}}
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
kvirani has quit [Remote host closed the connection]
<shevy> and do you call .join on your thread?
sako has quit [Remote host closed the connection]
<zii> Could someone show some sdl::mixer working example code?
<R3dy> shevy I haven' yet
<R3dy> how does that work?
wpaulson has quit [Read error: Connection reset by peer]
wpaulson has joined #ruby
cyong has joined #ruby
pdtpatrick_ has joined #ruby
schovi has quit [Remote host closed the connection]
bigoldrock has quit [Read error: Connection reset by peer]
mengu has joined #ruby
ken_barber1 has joined #ruby
bigoldrock has joined #ruby
Helius has joined #ruby
Helius has quit [Remote host closed the connection]
jeffreybaird has quit [Read error: Connection reset by peer]
ken_barb_ has joined #ruby
jeffreybaird has joined #ruby
<R3dy> is there anyway you can put the thread ouside of the class
<R3dy> my code has a class
zomgbie has joined #ruby
<R3dy> but then also a bunch of code ouside of class
<R3dy> and it is ouside of the class that I want to create the threads
theRoUS has quit [*.net *.split]
theRoUS_ has quit [*.net *.split]
pdtpatrick has quit [Ping timeout: 245 seconds]
pdtpatrick_ is now known as pdtpatrick
ken_barber has quit [Ping timeout: 244 seconds]
bbttxu has quit [Quit: bbttxu]
<shevy> then put the thread outside your class
vlad_starkov has joined #ruby
ken_barber1 has quit [Ping timeout: 244 seconds]
<R3dy> hmm doesn't seem to change speed of execution one bit
moeSeth has joined #ruby
<shevy> yeah
<shevy> it doesn't jump on your computer and clone the RAM it has
<R3dy> shevy: I know that but i should be able to maek 50 simultaenosu web requests
<R3dy> instead of one at a time, should I not?
zomgbie has quit [Ping timeout: 245 seconds]
cespare has joined #ruby
stewart_ has joined #ruby
Markvilla has quit [Quit: Markvilla]
wpaulson has quit [Quit: wpaulson]
saschagehlich has joined #ruby
peregrine81 has quit [Quit: Goodbye.]
eph3meral has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 248 seconds]
<shevy> sure
havenn has joined #ruby
<shevy> that page explains what it is done with threads
<shevy> to see the different, remove all thread occurences and run that script again
<eph3meral> has anyone here successfully gotten ruby-debug-ide19 to play nice with Eclipse 3.7 (Indigo) using the DLTK Ruby plugin? I actually had to modify some of the code in that plugin to get it to not throw errors, and now in my eclipse debugger log, I get messages about connecting to the remote app when I run my ruby program, but then nothing happens, I can't do much from there, can't set breakpoints, don't see anywhere to click step over,
<eph3meral> or see variables, etc
<eph3meral> ruby-debug19 itself works fine for me
td123 has quit [Quit: WeeChat 0.3.8]
jeffreybaird has quit [Read error: Connection reset by peer]
lorandi has quit [Quit: Leaving]
<eph3meral> i'm using the actual ruby-debug-19 gem as opposed to the 'debugger' gem
joshman_ has quit [Ping timeout: 244 seconds]
jeffreybaird has joined #ruby
yxhuvud has quit [Ping timeout: 244 seconds]
<eph3meral> i've got both rdebug and rdebug-ide available on my path
jgarvey has quit [Ping timeout: 240 seconds]
Markvilla has joined #ruby
Azure has quit [Ping timeout: 240 seconds]
looopy has quit [Remote host closed the connection]
nlc has quit [Ping timeout: 244 seconds]
Azure has joined #ruby
nlc has joined #ruby
pdtpatrick has quit [Remote host closed the connection]
Gm4n has quit [Ping timeout: 244 seconds]
looopy has joined #ruby
pdtpatrick has joined #ruby
mdw has quit [Remote host closed the connection]
azm has quit [Read error: Operation timed out]
looopy has quit [Remote host closed the connection]
Gm4n has joined #ruby
sepp2k has quit [Remote host closed the connection]
nilg has quit [Remote host closed the connection]
bricker88 has joined #ruby
koskoz has joined #ruby
mneorr has quit [Read error: Operation timed out]
wvms has joined #ruby
Vert has joined #ruby
bglusman has quit [Remote host closed the connection]
bglusman has joined #ruby
koskoz has quit [Ping timeout: 244 seconds]
looopy has joined #ruby
nfk has quit [Quit: yawn]
Guest20110 has quit [Ping timeout: 244 seconds]
CannedCorn has joined #ruby
berserkr has quit [Quit: Leaving.]
jeffreybaird has quit [Ping timeout: 244 seconds]
binaryplease has joined #ruby
bglusman has quit [Ping timeout: 260 seconds]
cyong has quit [Quit: Leaving.]
wangr has quit [Ping timeout: 265 seconds]
ylluminate has quit [Read error: Connection reset by peer]
bluenemo__ has quit [Remote host closed the connection]
ylluminate has joined #ruby
theRoUS has joined #ruby
theRoUS_ has joined #ruby
<havenn> R3dy: I'd use Celluloid for that sort of thing. Like so: https://gist.github.com/2912970
tewecske has quit [Quit: Leaving.]
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
theRoUS has quit [Quit: Leaving]
schaerli has quit [Remote host closed the connection]
bluenemo_ has quit [Remote host closed the connection]
mdw has joined #ruby
denysonique has joined #ruby
medik has joined #ruby
sohocoke has joined #ruby
robbyoconnor has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
chson has quit [Remote host closed the connection]
theRoUS has quit [Client Quit]
mneorr has joined #ruby
dagnachewa has quit [Quit: Leaving]
<ged> havenn: Do you find that the Actor pattern is easier to describe to people than just Threads on their own?
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
internet_user has quit [Remote host closed the connection]
hemanth has joined #ruby
<havenn> ged: If they already understand classes and objects, then I think yes. Adding a '!' to make it concurrent is pretty easy imho.
<lectrick> why does Hash#delete not end in a bang
<havenn> ged: I suppose if they don't get Objects, then 'no'.
<workmad3> lectrick: why should it?
<Karmaon> How do I add trailing zeros after a number? 1.2 -> 1.20
<ged> I quite like Celluloid, and am using it for a largish project, but for just fetching a bunch of HTML, it seems like overengineering.
<lectrick> workmad3: because the general consensus seems to be that any methods that modify the receiver should end in a ! if they can
<ged> havenn: And your example is glossing over the need for futures with the sleep 10.
<workmad3> lectrick: that's not the general consensus
<havenn> ged: true true
<workmad3> lectrick: that's the general consensus in *lisp*
<workmad3> lectrick: the ruby idiom is that a ! should be used for a potentially more dangerous variant of a method
<lectrick> workmad3: There should be 2 versions. Hash#delete should return a copy of the original Hash instance, minus the key. Hash#delete! should delete the key from the receiver and return it if it exists, otherwise return nil
<ged> I think the second you have any threads that need to talk to *each other*, Celluoid will save you a ton of heartache.
<lectrick> workmad3: "potentially more dangerous" is bullshit vagueness for "it has side effects or it does not have side effects"
<ged> I ask because I am going to need to explain Actors and Futures to some people in the near future.
<lectrick> I think the conceptual division is pretty clear
<workmad3> lectrick: hardly
digitalcakestudi has joined #ruby
borys_b_timakov has quit [Remote host closed the connection]
<workmad3> lectrick: various ! methods, both variants have side effects, but behaviour changes
beneggett has joined #ruby
<workmad3> lectrick: others, neither may modify the receiver, but one may throw exceptions that the other doesn't
<workmad3> lectrick: if no variants are present, no ! method should be present...
<billiamii> Does that mean that I should alwasy default to no !... yeah.
<workmad3> billiamii: I'll be upset with you if you stick a ! on a method for no reason :P
<lectrick> workmad3: Do you think it is theoretically possible to line all these up into a pattern?
hasrb has joined #ruby
<billiamii> Well, it's not no reason, it's an incorrect reason :)
<shevy> well
<shevy> what methods have a ! in standard ruby
<workmad3> billiamii: sure :)
<shevy> noone has such a list!
<havenn> ged: I agree with everything you've said. I just am enjoying fiddling with Celluloid (my example was sad indeed, but nice to know it's out there and getting used more and more!)!
samwin has joined #ruby
<bricker88> workmad3: I like unnecessary bangs, makes the code more exciting
<workmad3> bricker88: you're evil
theRoUS has quit [Read error: Connection reset by peer]
<shevy> I hate the bangs
<bricker88> :D
<lectrick> def omg!
<bricker88> omgwtfbbq!
<shevy> but I use them, especially the .gsub! ones
<ged> In pry: find-method -n \!$ will show you a list.
<shevy> x = x.gsub(/\d+/,'') vs x.gsub!(/\d+/,'') alone, saves ... uhm... 3 characters I think
<ged> havenn: Yeah, it's really pretty brilliant, IMO.
<ged> havenn: It's taken a bit of shifting in the way I think about the problem, but then things just seem to drop into place.
PaciFisT has quit [Quit: Leaving.]
dv310p3r has quit [Ping timeout: 260 seconds]
<workmad3> aha, Tempfile#close!
mdw has quit [Ping timeout: 256 seconds]
<workmad3> both close and close! have side-effects (they close the file handle) but close! will unlink it too :)
ciopte7 has joined #ruby
youdonotexist has quit [Remote host closed the connection]
<workmad3> not to mention Process.exit vs Process.exit!
<havenn> Why not #each! instead of #map, is there a reason a bang doesn't fit there?
theRoUS has joined #ruby
<workmad3> havenn: map and map! both exist
hemanth has quit [Read error: Connection reset by peer]
balki_ has joined #ruby
<havenn> workmad3: Ahh, forgot about that. >.> #each, #each!, and #each!!?!! then =P
<workmad3> havenn: and each!... what would that do?
<shevy> die, !-methods, die!
hemanth has joined #ruby
alexander-- has joined #ruby
alexander-- has quit [Client Quit]
wpaulson has joined #ruby
axl_ has quit [Quit: axl_]
<ged> Hehe.
<shevy> well, more than one ! would be nice to have
balki has quit [Read error: Connection reset by peer]
* Sigma00 gives shevy a class with !-methods that perform normally, and non!-methods that act on themselves
<workmad3> shevy: process.die!!!!!!!!
<shevy> to prioritize which methods are more important than others :>
<shevy> yeah workmad3 exactly
wpaulson has quit [Read error: Connection reset by peer]
goraxe has joined #ruby
Enekoos has joined #ruby
<shevy> I am still sad the ennnnd proposal was shot down
<shevy> imagine it:
<shevy> def feed_the_cat
wpaulson has joined #ruby
<shevy> in a class
<goraxe> hi, I'm looking to learn what the difference between :slave and ':slave' is and how to get to the former from the latter :-)
<shevy> ennd!!!!
wpaulson has quit [Read error: Connection reset by peer]
<shevy> goraxe the '
wpaulson has joined #ruby
<shevy> the second is a string
<goraxe> string vs other
<shevy> the first is a symbol
<shevy> a string object is be different from another string object
<shevy> a symbol is always its boring same
<shevy> :cat.object_id # => 1115048
<shevy> ":cat".object_id # => 26642740
<shevy> ":cat".object_id # => 26651280
<goraxe> okay makes sense
wpaulson has quit [Read error: Connection reset by peer]
wpaulson has joined #ruby
<goraxe> can I get the symbol named ina string?
<shevy> :symbols are faster than string objects, if you fill up a hash with one million string objects and one million symbols you will see the difference
qwerxy has quit [Quit: offski]
<shevy> via .to_sym
wpaulson_ has joined #ruby
<goraxe> nice shevy thanks
<havenn> goraxe: :slave.inspect #=> ":slave"
<shevy> ":cat".to_sym # => :":cat"
<havenn> for the other way around
<shevy> hmm odd... that output looked different I could swear...
<shevy> did something change here from 1.8 to 1.9?
<shevy> oh wait
<shevy> I dumbed myself down here
<xclite> "cat".to_sym => :cat
<shevy> yeah
<shevy> goraxe, you confused me :P
<goraxe> I have enough to figure it out
<shevy> haha
<goraxe> I had been adding a ':' but that may not be needed
<shevy> goraxe, the most important thing is... ruby symbols are really boring
<shevy> yep
<shevy> when you use .to_sym, the string objects rarely have a leading ':' character
<havenn> goraxe: ":cat".delete(":").to_sym #=> :cat
<workmad3> :":#{my_string}"
<goraxe> I have control of where the ':' was being addesd so just don't need to do that
crankyco_ has joined #ruby
<shevy> :)
<havenn> goraxe: much better than removing it!
mvangala_ has joined #ruby
mockra_ has joined #ruby
<goraxe> I was looking to fiugre out how to get acces to a hash keyed by symbols so I guess I XYed myself
<goraxe> but didn't know enough ruby to talk about it, but I got there which is the cool thing about irc
<goraxe> :-) cheers one and all
<workmad3> goraxe: hsh.stringify_keys!
[Neurotic] has joined #ruby
dekroning has quit [Quit: leaving]
wpaulson has quit [Ping timeout: 265 seconds]
wpaulson_ is now known as wpaulson
bluOxigen has quit [Ping timeout: 245 seconds]
<[Neurotic]> morning
<workmad3> or is that a railsism?
DanBoy has quit [Quit: Leaving]
<Sigma00> workmad3: looks like it, no method in irb
theRoUS has quit [Ping timeout: 260 seconds]
<havenn> workmad3: require 'activesupport'
acotie_ has joined #ruby
iaj_ has joined #ruby
phite has joined #ruby
barefoot_ has joined #ruby
macmartine has quit [Quit: macmartine]
locriani has joined #ruby
RudyValencia- has joined #ruby
jeedey has joined #ruby
<havenn> active_support **
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
<havenn> I can never remember between underscore, hyphen, and no-space...
rossfuhrman has joined #ruby
stephenjudkins_ has joined #ruby
MasterIdler has quit [Quit: MasterIdler]
ckrough has joined #ruby
klaas- has joined #ruby
tdubz has joined #ruby
Aatong has joined #ruby
Prudhvi_ has joined #ruby
Aatong is now known as Aaton
kmwhite has joined #ruby
brianpWins_ has joined #ruby
ckrough is now known as Guest20050
masterhumper has joined #ruby
tdubz_ has joined #ruby
locriani_ has quit [Ping timeout: 240 seconds]
xybre has joined #ruby
mxweas_ has joined #ruby
ewag_ has joined #ruby
classix_ has joined #ruby
sgronblo1 has joined #ruby
johnduhart2 has joined #ruby
zeknox_ has joined #ruby
AwesomeG1rethMan has joined #ruby
matti_ has joined #ruby
Wandering_Glitch has joined #ruby
RichG has joined #ruby
hackeron_ has joined #ruby
Kwpolska_ has joined #ruby
mikalv_ has joined #ruby
dotnull has quit [Read error: Connection reset by peer]
c3l_ has joined #ruby
trollface has joined #ruby
mvangala_ has quit [Remote host closed the connection]
frogstarr77 has joined #ruby
tcopp_ has joined #ruby
setient_ has joined #ruby
ben225 has joined #ruby
rtl_ has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
Tricks has quit [Read error: Connection reset by peer]
GeekOnCoffee has quit [Disconnected by services]
GeekOnCoffee_ has joined #ruby
GeekOnCoffee_ is now known as GeekOnCoffee
v1_ has joined #ruby
schickung has left #ruby [#ruby]
Morkel has quit [Quit: Morkel]
Mch1 has joined #ruby
xxi has joined #ruby
Tricks has joined #ruby
ph^ has quit [Remote host closed the connection]
wang_ has joined #ruby
fantazo_ has joined #ruby
_class_ has joined #ruby
xxi is now known as Guest85273
omry_ has joined #ruby
ph^ has joined #ruby
barefoot has quit [Disconnected by services]
IrishGringo has quit [Read error: Connection reset by peer]
nooodl has quit [Quit: Leaving]
akem has quit [Read error: Operation timed out]
barefoot_ is now known as barefoot
shadoi1 has joined #ruby
IrishGringo has joined #ruby
mikalv has quit [Disconnected by services]
invictus1 has quit [Ping timeout: 244 seconds]
alexander-- has joined #ruby
barefoot has quit [Changing host]
barefoot has joined #ruby
mikalv_ is now known as mikalv
alexander-- has quit [Client Quit]
invictus1 has joined #ruby
samwin has left #ruby [#ruby]
Tricks_ has joined #ruby
rakm_ has joined #ruby
acotie_ has quit [Ping timeout: 244 seconds]
davidcelis has quit [Ping timeout: 244 seconds]
eft has quit [Ping timeout: 240 seconds]
stepnem has quit [Ping timeout: 240 seconds]
drizz_ has joined #ruby
tessi has quit [Ping timeout: 248 seconds]
phite is now known as tessi
sirecote has quit [Ping timeout: 244 seconds]
undert has quit [Ping timeout: 244 seconds]
elspeth_ has joined #ruby
acotie has quit [Ping timeout: 248 seconds]
mockra has quit [Ping timeout: 248 seconds]
mxweas has quit [Ping timeout: 248 seconds]
blast_hardcheese has quit [Ping timeout: 248 seconds]
RudyValencia has quit [Read error: Connection reset by peer]
stephenjudkins has quit [Ping timeout: 248 seconds]
tdubellz has quit [Ping timeout: 248 seconds]
kmwhite_ has quit [Ping timeout: 248 seconds]
Paradox has quit [Ping timeout: 248 seconds]
omry has quit [Ping timeout: 248 seconds]
skryking has quit [Ping timeout: 248 seconds]
sejo has quit [Ping timeout: 248 seconds]
Guest63274 has quit [Ping timeout: 248 seconds]
thedonvaughn has quit [Ping timeout: 248 seconds]
Prudhvi has quit [Ping timeout: 248 seconds]
RichGuk has quit [Ping timeout: 248 seconds]
beneggett has quit [Ping timeout: 248 seconds]
brianpWins has quit [Ping timeout: 248 seconds]
crankycoder has quit [Ping timeout: 248 seconds]
voodoofish431 has quit [Ping timeout: 248 seconds]
radic has quit [Ping timeout: 248 seconds]
sgronblom has quit [Ping timeout: 248 seconds]
Kovensky has quit [Ping timeout: 248 seconds]
xybre_ has quit [Ping timeout: 248 seconds]
nlc has quit [Ping timeout: 248 seconds]
iaj has quit [Ping timeout: 248 seconds]
jeedey_ has quit [Ping timeout: 248 seconds]
ewag has quit [Ping timeout: 248 seconds]
mvangala has quit [Ping timeout: 248 seconds]
FLeiXiuS has quit [Ping timeout: 248 seconds]
c3l has quit [Ping timeout: 248 seconds]
Kwpolska has quit [Ping timeout: 248 seconds]
klaas has quit [Ping timeout: 248 seconds]
matti has quit [Ping timeout: 248 seconds]
zigidias has quit [Ping timeout: 248 seconds]
WanderingGlitch has quit [Ping timeout: 248 seconds]
frogstarr78 has quit [Ping timeout: 248 seconds]
zeknox has quit [Ping timeout: 248 seconds]
classix has quit [Ping timeout: 248 seconds]
R3dy has quit [Ping timeout: 248 seconds]
setient has quit [Ping timeout: 248 seconds]
__class__ has quit [Ping timeout: 248 seconds]
Aaton_off has quit [Ping timeout: 248 seconds]
ZachBeta has joined #ruby
kenperkins has quit [Ping timeout: 248 seconds]
rtl has quit [Ping timeout: 248 seconds]
AwesomeGarethMan has quit [Ping timeout: 248 seconds]
R3dy has joined #ruby
Kovensky has joined #ruby
johnduhart has quit [Read error: Connection reset by peer]
hackeron has quit [Remote host closed the connection]
tcopp has quit [Ping timeout: 248 seconds]
fantazo has quit [Ping timeout: 248 seconds]
neektza has quit [Ping timeout: 248 seconds]
lantins has quit [Ping timeout: 248 seconds]
soulcake has quit [Ping timeout: 248 seconds]
rakm has quit [Ping timeout: 248 seconds]
ixx has quit [Ping timeout: 248 seconds]
Mchl has quit [Ping timeout: 248 seconds]
wang has quit [Ping timeout: 248 seconds]
trebaum has joined #ruby
thomas has quit [Ping timeout: 620 seconds]
lantins has joined #ruby
trebaum_ has quit [Ping timeout: 248 seconds]
drizz has quit [Ping timeout: 248 seconds]
ben225 is now known as beneggett
blumbri has quit [Ping timeout: 248 seconds]
brianpWins_ is now known as brianpWins
elspeth has quit [Ping timeout: 248 seconds]
mxweas_ is now known as mxweas
sohocoke has quit [Quit: Computer has gone to sleep.]
rakm_ is now known as rakm
stephenjudkins_ is now known as stephenjudkins
canton7 has quit [Ping timeout: 241 seconds]
matti_ is now known as matti
trebaum has quit [Changing host]
trebaum has joined #ruby
_class_ is now known as __class__
flip_digits has quit [Ping timeout: 244 seconds]
alexim has quit [Ping timeout: 244 seconds]
mmercer has quit [Ping timeout: 244 seconds]
noganex has quit [Ping timeout: 244 seconds]
tommyvyo has quit [Ping timeout: 244 seconds]
tommyvyo_ is now known as tommyvyo
alindeman has quit [Ping timeout: 240 seconds]
soulcake has joined #ruby
carlyle has quit [Remote host closed the connection]
zigidias_ has joined #ruby
hemanth has quit [Ping timeout: 244 seconds]
twock has quit [Ping timeout: 244 seconds]
shadoi has quit [Ping timeout: 244 seconds]
thedonvaughn has joined #ruby
undert has joined #ruby
Tricks has quit [Ping timeout: 240 seconds]
v1_ has quit [Ping timeout: 240 seconds]
ping-pong has quit [Ping timeout: 240 seconds]
RubyPanther has quit [Ping timeout: 240 seconds]
stroem has quit [Ping timeout: 240 seconds]
balki_ is now known as balki
radic has joined #ruby
sgronblo1 has quit [Ping timeout: 244 seconds]
siksia has quit [Ping timeout: 244 seconds]
dcope has quit [Ping timeout: 244 seconds]
havenn has quit [Remote host closed the connection]
FLeiXiuS has joined #ruby
FLeiXiuS has quit [Changing host]
FLeiXiuS has joined #ruby
stepnem has joined #ruby
omry_ has quit [Ping timeout: 240 seconds]
stroem has joined #ruby
pdtpatrick_ has joined #ruby
krusty_ar_ has joined #ruby
fridim_ has quit [Ping timeout: 264 seconds]
ph^ has quit [Ping timeout: 256 seconds]
crankycoder has joined #ruby
UNIXgod has quit [Ping timeout: 244 seconds]
Synthead has quit [Ping timeout: 244 seconds]
Koshian has quit [Ping timeout: 244 seconds]
savage-_ has joined #ruby
jeedey_ has joined #ruby
crankyco_ has quit [Ping timeout: 244 seconds]
MrGando has quit [Ping timeout: 244 seconds]
cout has quit [Ping timeout: 244 seconds]
jeffreybaird has joined #ruby
jeedey has quit [Ping timeout: 269 seconds]
ephemerian has quit [Ping timeout: 240 seconds]
krusty_ar has quit [Ping timeout: 269 seconds]
noganex has joined #ruby
UNIXgod has joined #ruby
t0mmyvyo has joined #ruby
c3l_ has quit [Remote host closed the connection]
JB___ has joined #ruby
c3l has joined #ruby
twock has joined #ruby
oooPaul has quit [Ping timeout: 244 seconds]
Facefox has quit [Ping timeout: 249 seconds]
burgestrand1 has joined #ruby
burgestrand has quit [Ping timeout: 240 seconds]
cout has joined #ruby
shaman42_ has joined #ruby
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
pdtpatrick_ has quit [Read error: Connection reset by peer]
sgronblom has joined #ruby
whuffor has quit [Ping timeout: 260 seconds]
DesiJat has quit [Remote host closed the connection]
DesiJat_ has joined #ruby
shaman42 has quit [Ping timeout: 244 seconds]
Jb_ has quit [Remote host closed the connection]
savage- has quit [Ping timeout: 240 seconds]
Guedes is now known as Guedes_out
pdtpatrick_ has joined #ruby
minijupe has joined #ruby
TheFuzzb_ has joined #ruby
mmercer has joined #ruby
<shevy> well
TheFuzzball has quit [Ping timeout: 244 seconds]
pdtpatrick has quit [Ping timeout: 240 seconds]
pdtpatrick_ is now known as pdtpatrick
dcope has joined #ruby
locriani_ has joined #ruby
bier has quit [Ping timeout: 244 seconds]
blumbri has joined #ruby
voodoofish431 has joined #ruby
blast_hardcheese has joined #ruby
sohocoke has joined #ruby
omry has joined #ruby
oooPaul has joined #ruby
locriani has quit [Ping timeout: 244 seconds]
DesiJat_ is now known as DesiJat
davidcelis has quit [Ping timeout: 244 seconds]
bier has joined #ruby
Synthead has joined #ruby
sirecote has joined #ruby
davidcelis has joined #ruby
bosphorus has quit [Remote host closed the connection]
Corey has quit [Ping timeout: 600 seconds]
zaychenok has joined #ruby
klaas- is now known as klaas
stephenjudkins has quit [Quit: stephenjudkins]
MrGando has joined #ruby
azm has quit [Ping timeout: 245 seconds]
Facefox has joined #ruby
kirun has quit [Quit: Client exiting]
alexander-- has joined #ruby
alexander-- has quit [Client Quit]
tatsuya_o has joined #ruby
ping-pong has joined #ruby
alexander-- has joined #ruby
RubyPanther has joined #ruby
alexander-- has quit [Client Quit]
hemanth has joined #ruby
alindeman has joined #ruby
whuffor has joined #ruby
acotie_ has joined #ruby
banseljaj is now known as imami|afk
the_jeebster has quit [Quit: Leaving.]
alexander-- has joined #ruby
alexander-- has quit [Client Quit]
stephenjudkins has joined #ruby
tcopp_ has quit [Quit: leaving]
Koshian has joined #ruby
Arelius has joined #ruby
<Arelius> So, I'm getting this problem trying to install thin: https://gist.github.com/eecd04514f3254e4acde A similar one when I try to install eventmachine via 'gem'
jeffreybaird has quit [Quit: jeffreybaird]
sbanwart has quit [Ping timeout: 252 seconds]
<Arelius> any thoughts
<Arelius> This happens on debian and ubuntu
Criztian_ has quit [Remote host closed the connection]
ciopte7 has quit [Quit: ciopte7]
xaq has quit [Remote host closed the connection]
pk1001100011 has quit [Quit: Burn your gods and kill the king; Subjugate your suffering; Dead heart, in a dead world]
eft has joined #ruby
alexander-- has joined #ruby
alexander-- has quit [Client Quit]
maahes has quit [Read error: Connection reset by peer]
<stephenjudkins> Arelius: this is happening on multiple machines?
Facefox has quit [Ping timeout: 240 seconds]
bglusman has joined #ruby
<Arelius> stephenjudkins: Yeah, configured very simularly however
<Arelius> sid on debian, whatever is newest for ubuntu
<stephenjudkins> Arelius: you should ask in #eventmachine
<Arelius> well that bug is for thin
Facefox has joined #ruby
<Arelius> but similar bugs in thin and event machine
noganex has quit [Read error: Connection reset by peer]
<stephenjudkins> the gist you pasted was just for eventmachine
etank has quit [Quit: WeeChat 0.3.7]
<Arelius> seems that it has warnings treated as errors on for building native extensions
<shevy> that needs a C expert!
<stephenjudkins> anyways, it all seems strange since it's eventmachine internal. probably some way your cc is configured on those machines
minijupe has quit [Quit: minijupe]
<Enekoos> any know a good gem for torrent?
<Arelius> yeah, it does seem that way.
hunglin has quit [Ping timeout: 244 seconds]
<stephenjudkins> i'm not really a C guy
<stephenjudkins> but the thing that these errors have in common is that they seem to be caused by the "-Werror=format-security" option to gcc
tatsuya_o has quit [Remote host closed the connection]
<stephenjudkins> for whatever reason this is enabled on your boxes. i don't know all the ways the flags are passed in
<stephenjudkins> i would ask in #debian
bglusman has quit [Ping timeout: 244 seconds]
<stephenjudkins> it's likely they will offer zero constructive advice and instead claim the C code is insecure and broken
<Arelius> =P
<Arelius> thanks!
virunga has quit [Read error: Connection reset by peer]
<shevy> stephenjudkins lol
<shevy> going to try gem install thin myself
noganex has joined #ruby
<shevy> Fetching: thin-1.3.1.gem (100%)
<shevy> Successfully installed thin-1.3.1
<shevy> 1 gem installed
<shevy> Building native extensions. This could take a while...
<shevy> hmm
<shevy> what else
rdctnst has joined #ruby
<shevy> eventmachine
ben_alman has quit [Excess Flood]
<shevy> Fetching: eventmachine-0.12.10.gem (100%)
<shevy> Building native extensions. This could take a while...
<shevy> Successfully installed eventmachine-0.12.10
<shevy> 1 gem installed
<shevy> k seems to work
<barefoot> shevy: 32bit?
<shevy> hmm no, 64bit I *think*... not 100% sure... how to find out? :)
<shevy> my ruby binary has symlinks like librt.so.1 => /lib64/librt.so.1
<shevy> so I think it is 64bit
<barefoot> uname -i
<shevy> oh
<shevy> x86_64
<barefoot> there is a bug from a failed build on debian about it failing on 64bit so figured I would ask
<baniseterfiend`> anyone here on forrst?
baniseterfiend` is now known as banisterfiend
<shevy> well Arelius now knows that it can work on other machines :D
<Arelius> yeah, thanks
Chuball has joined #ruby
<barefoot> hehe
looopy has quit [Remote host closed the connection]
<banisterfiend> barefoot: did you name yourself after the k.d lang album
<barefoot> banisterfiend: no, lived on boats for awhile and never wore shoes :)
iocor has quit [Ping timeout: 245 seconds]
<shevy> cool
zaychenok has quit [Quit: Konversation terminated!]
<shevy> banister can do that in new zealand too
zaychenok has joined #ruby
jamesaxl has quit [Remote host closed the connection]
<banisterfiend> shevy: why do u tell so many lies
flip_digits has joined #ruby
<shevy> man, all I know is that it is an island!
workmad3 has quit [Ping timeout: 245 seconds]
zaychenok has quit [Client Quit]
gaius65 has joined #ruby
zaychenok has joined #ruby
<gaius65> Hello
dade has joined #ruby
dade has left #ruby [#ruby]
<gaius65> How can I ask my gem tool which versions of gem X exist
<shevy> hmm perhaps gem query and grepping for that gem
<shevy> pry (0.9.9.4)
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
ben_alman has joined #ruby
xkx_ has quit [Ping timeout: 252 seconds]
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
looopy has joined #ruby
LiquidInsect has joined #ruby
Karmaon has quit [Quit: WeeChat 0.3.8-rc2]
<gaius65> gem query returns a list of local installed gems, … I probably was a bit unclear
<gaius65> I need a list of available gems on the server
<LiquidInsect> https://github.com/babney/yamljam/ has this been done already? I don't want to reinvent a wheel
billiamii has quit []
<gaius65> (highest version has a conflict with another tool, so I want to change one down)
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
<LiquidInsect> basically I looked around for something that would merge yaml files and didn't find anything existing... didn't ask here first though
Sol has joined #ruby
Sol is now known as Guest47773
looopy has quit [Remote host closed the connection]
hoelzro is now known as hoelzro|away
apeiros_ has quit [Remote host closed the connection]
Cicloid has quit [Remote host closed the connection]
sohocoke has quit [Quit: Computer has gone to sleep.]
Soliah has quit [Ping timeout: 245 seconds]
Cicloid has joined #ruby
etank has joined #ruby
walterheck has joined #ruby
jeffreybaird has joined #ruby
hemanth_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
brianpWins has quit [Quit: brianpWins]
timonv has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
joch_n has quit [Quit: Linkinus - http://linkinus.com]
digitalcakestudi has quit [Ping timeout: 265 seconds]
zaychenok has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
jeffreybaird has quit [Read error: Connection reset by peer]
zaychenok has quit [Client Quit]
jeffreybaird has joined #ruby
qwerxy has joined #ruby
zaychenok has joined #ruby
robacarp has quit [Read error: Operation timed out]
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
fserb has quit [Quit: ttyl]
fserb has joined #ruby
chson has joined #ruby
banghouse is now known as banghouseAFK
robacarp has joined #ruby
robacarp is now known as Guest52528
minijupe has joined #ruby
uris has quit [Quit: leaving]
zaychenok has quit [Quit: Konversation terminated!]
sohocoke has joined #ruby
zaychenok has joined #ruby
wpaulson has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
ciopte7 has joined #ruby
binaryplease has quit [Ping timeout: 245 seconds]
ken_barber has joined #ruby
td123 has joined #ruby
ken_barber has quit [Remote host closed the connection]
hasrb has quit [Remote host closed the connection]
<Arelius> interesting, how do I override CONFIG['CFLAGS'] from mkmf in all gems?
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
binaryplease has joined #ruby
ken_barb_ has quit [Ping timeout: 245 seconds]
gtuckerkellogg has joined #ruby
joshman_ has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
emmanuelux has quit [Remote host closed the connection]
indian has joined #ruby
libertyprime has quit [Ping timeout: 244 seconds]
emmanuelux has joined #ruby
<shevy> you could set another CFLAGS ENV variable perhaps?
<shevy> ENV['CFLAGS'] = '-m32'
<shevy> should also work in plain ruby code
<shevy> I have no idea what is CONFIG however
azm has joined #ruby
itnomad has quit [Ping timeout: 244 seconds]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
ZachBeta has quit [Quit: Computer has gone to sleep.]
jcromartie has quit [Quit: jcromartie]
Guest52528 is now known as robacarp_
jenrzzz-mac has joined #ruby
jcromartie has joined #ruby
tayy has joined #ruby
Araxia_ has joined #ruby