apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p327: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
<mpfundstein_home> end
<mpfundstein_home> jcrawford: here we go: https://gist.github.com/4393341
<mpfundstein_home> i dont have the article class here
<jcrawford> understood
<jcrawford> now the question is why type is even in that second each
<jcrawford> iirc the second each should only loop the type array and not include the type?
<mpfundstein_home> it does
undert has quit [Ping timeout: 276 seconds]
<mpfundstein_home> in my example
rjfranco has quit [Remote host closed the connection]
<jcrawford> right but why in mine it acts different
jonahR has quit [Quit: jonahR]
<jcrawford> with a nested each?>
<mpfundstein_home> without each_pair ?
<jcrawford> yes with just each
horofox has joined #ruby
<mpfundstein_home> because it will iterate over 4
<mpfundstein_home> php than article than ruby than []
<jcrawford> hmm maybe i need to read up on each then :)
<mpfundstein_home> in each_pair only over the pairs
<jcrawford> i was assuming each was only going to be called on the articles in "php" when in the second each
<jcrawford> ohh wait
friskd has joined #ruby
<jcrawford> the first each is for the type, the second is for the articles BUT the type in passed down to the articles each?
<jcrawford> am i grasping that correctly
<jcrawford> there is no scope differences
becom33 has joined #ruby
ner0x has joined #ruby
<mpfundstein_home> dont know now lets check
undert has joined #ruby
<jcrawford> in my code example i would have expected p to never be the type, i would have expected the type variable to always be the type
<jcrawford> i expected p to always be the article
<mpfundstein_home> articles = {"php"=>["<Article: /articles/php//2012/12/this-is-a-test>"], "ruby"=>[]}
<mpfundstein_home> articles.each do |type|
<mpfundstein_home> endprints
<mpfundstein_home> type.each do |p|
<mpfundstein_home> puts p
<mpfundstein_home> php, "Article", "ruby"
_64k has quit [Quit: _64k]
<mpfundstein_home> like expected
<mpfundstein_home> end
<mpfundstein_home> type is a string.
<jcrawford> right so why when you do puts p it puts out the type string?
<jcrawford> that's what i am not understanding
_64k has joined #ruby
horofox has quit [Client Quit]
<mpfundstein_home> in the first
<mpfundstein_home> iteration
<mpfundstein_home> type is a string
<mpfundstein_home> than an array
<mpfundstein_home> than a string
<mpfundstein_home> change puts p into puts p.class
mercwithamouth has joined #ruby
<jcrawford> so the first each loops oever EVERY key AND value in the hash, not just the keys like I would have expected
<jcrawford> i am coming from php so this is a bit awkward for me as in php if you have a foreach loop it only loops the keys and not the values as well
_64k has quit [Client Quit]
<mpfundstein_home> ahhhh
<jcrawford> going to go read up on each to make sure i fully understand all this
<mpfundstein_home> array.each on your hash
<mpfundstein_home> returns type only as an array
<mpfundstein_home> than you do type.each
<jcrawford> thanks for pointing that out :)
<mpfundstein_home> and thats of course than php -> article -> ruby -> empty
<jcrawford> right
<lupine> jcrawford, hsh.keys.each { } if you must
<lupine> but I wouldn't
<mpfundstein_home> i would use the pair solution
<jcrawford> i musn't i must understand each though :) going to read up on it now
<lupine> hsh.each {|k, _| } is fine
_64k has joined #ruby
<jcrawford> that will not work either it returns [<Article>] rather than just <Article>
<mpfundstein_home> jcrawford: share your insights :-)
<mpfundstein_home> jcrawford: an than u iterate through [<Article>]
<jcrawford> oy lol
frightenedmonkey has left #ruby [#ruby]
* jcrawford smacks himself, sorry
freakazoid0223 has quit [Quit: Leaving]
slash_nick has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
fomatin has quit [Quit: Textual IRC Client: www.textualapp.com]
objectivemo has quit [Quit: objectivemo]
miskander has quit [Quit: miskander]
Tomasso has joined #ruby
alexspeller has joined #ruby
buibex has quit [Remote host closed the connection]
neurotech has joined #ruby
ebobby has quit [Quit: Lost terminal]
tommyvyo_ has joined #ruby
nomenkun has joined #ruby
<jcrawford> am i being stupid again? http://pastie.org/5586455
alesguzik has quit [Quit: leaving]
<jcrawford> 235 is the Array.new
_alejandro has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 248 seconds]
slash_nick has quit [Quit: leaving]
<mpfundstein_home> jcrawford: that i leave as an exercise to u :-)
<jcrawford> lol i thought it was because it was not an array but i created it still failed :)
friskd_ has joined #ruby
<jcrawford> got it
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<jcrawford> articles was not instanciated as a hash
<jcrawford> bah
friskd has quit [Read error: Operation timed out]
friskd_ is now known as friskd
jenrzzz has joined #ruby
<jcrawford> i think i am getting tired :) been doing soo good extending Jekyll till this point, been doing it all day though lol
danneu has quit [Quit: WeeChat 0.3.8]
jromine has joined #ruby
<reppard> anyone play with sinatra ?
<reppard> i never have
mpfundstein_home has quit [Ping timeout: 246 seconds]
jjbohn has joined #ruby
<lupine> yep
<lupine> it has its own irc channel, but I'm sure questions can be answered here too
Musfuut has joined #ruby
_64k has quit [Quit: _64k]
alexspeller has quit [Remote host closed the connection]
<reppard> oh haha yeah true
<reppard> im just playing around
<reppard> cant get it to post, just keeps coming up with that sinatra doesn't know this ditty page
bradleyprice has quit [Remote host closed the connection]
<wildcard1> i use sinatra lots
jeedey_ has quit [Quit: No Ping reply in 180 seconds.]
<pskosinski> use nanoc!
<reppard> wildcard1: maybe you can help me see what im doing wrong
<wildcard1> please repost the question
<reppard> just trying to get it to actually post
jjbohn has quit [Quit: Leaving...]
<reppard> it always comes up with that sinatra doesn't know that ditty
<reppard> i use rails and have never tried sinatra. thought it would be fun to fool around with
tk___ has joined #ruby
thinkclay has quit [Quit: Leaving.]
<wildcard1> are you sure you're sending a post request?
<jcrawford> ok so if type is a string, how can i make it evaluate to the string rather than the literal type? It is complaining about no type method being defined which is true but if type were evaluated as a variable it would work :0 site.type.each.select{|x| x.data.key? 'redirects' }.each do |p|
<wildcard1> cause this looks right
Michael has joined #ruby
<reppard> i'm pretty sure i am...i dont see how i wouldn't be, i specify method="post"
Michael is now known as Guest24015
<wildcard1> sec, im going to try this
<wildcard1> maybe im blind
hadees has quit [Quit: hadees]
<reppard> 127.0.0.1 - - [27/Dec/2012 19:44:12] "POST /answer HTTP/1.1" 404 443 0.0007
<reppard> its a post for sure
<wildcard1> localhost - - [27/Dec/2012:16:44:40 PST] "POST /answer HTTP/1.1" 200 14
<wildcard1> - -> /answer
<wildcard1> i got a 200
<jcrawford> question with code: http://pastie.org/5586527
<wildcard1> POST /answer HTTP/1.1
<wildcard1> Host: 10.0.0.3
<wildcard1> Content-length: 18
<havenn> jcrawford: Object#type is deprecated.
<havenn> jcrawford: What version of Ruby are you using?
<reppard> yeah i get 404
<reppard> strange
<wildcard1> do you get it if you telnet in and do it manually?
<havenn> jcrawford: Object#class
<lupine> site.send(type)
<jcrawford> havenn: look at the code i am not trying to use a type method :) type is a variable and i am trying to use that variable as a method call
<lupine> mightbe what youy mean
<reppard> wildcard1: i just got it, had to restart the server
<reppard> thanks for looking though
<wildcard1> reppard: cool. i thought i wasn't blind here :)
<wildcard1> hehe
<lupine> jcrawford, definitely what you're looking for
<reppard> yeah same here =)
<jcrawford> lupine: thanks will try that
<havenn> jcrawford: Oh, ha I see.
autumn has quit [Remote host closed the connection]
<ner0x> Any quarks with the ruby switch statement?
<lupine> just the indenting
<wildcard1> reppard: check out shotgun. it does autoreloading like webrick in rails
<jcrawford> lupine: so then site.send(type).each.select{|x| x.data.key? 'redirects' }.each do |p|
<Quadlex> Nope, it's mainly muons
<lupine> I put when at the same indent level as case and end
<ner0x> Other than that works as advertised and is okay to use?
<lupine> if I don't, the else looks stupid
<lupine> oh, and when x : y is invalid in 1.8
<banisterfiend> ner0x: yeah
<lupine> 1.9*
dougireton has quit [Quit: Leaving.]
<banisterfiend> ner0x: it uses ===
<havenn> ner0x: It uses threequals === operator. So 1..4 === 4
<banisterfiend> ner0x: so this might not do what u think:
<lupine> jcrawford, should work
<lupine> assuming it has the appropriate methods
<lupine> x.send('y') is the same as x.y
<ner0x> I'm doing text.
<ner0x> case status 'active' 'pending' etc.
<banisterfiend> case blah; when MyClass; puts "hi"; end
<banisterfiend> where blah is MyClass, it won't print 'hi'
<reppard> wildcard1: good time, thats why i didn't think to reload, i'm use to rails
thinkclay has joined #ruby
slainer68 has quit [Remote host closed the connection]
sailias1 has quit [Quit: Leaving.]
ikaros has quit [Quit: Ex-Chat]
<ner0x> I'll just have to run some tests.
<aedorn> so I moved from just gitolite to gitlab today. Such a painful experience so I hope it pays off
daniel_- has quit [Ping timeout: 250 seconds]
<graft> okay, so with $stdout.reopen("log.txt","w") I can redirect stdout. If i do $stderr = $stdout, I can redirect stderr within ruby. If I do system "echo test", it redirects the output to log.txt correctly. However, system "echo test 1>&2" does not work - it still echoes to the console. How come?
<ner0x> record.valid? in MyValidator will cause an infiniteloop huh. :-/
pskosinski has quit [Ping timeout: 244 seconds]
cakehero has joined #ruby
IceDragon has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
dmiller has joined #ruby
phelps has quit [Quit: Computer has gone to sleep.]
cakehero has quit [Client Quit]
AntonioNeto has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
phelps has joined #ruby
AntonioNeto has left #ruby [#ruby]
phelps has quit [Read error: Connection reset by peer]
phelps has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
<heftig> graft: is stderr redirected?
marr has quit [Ping timeout: 265 seconds]
dmiller has quit [Ping timeout: 244 seconds]
<heftig> graft: try using $stderr.reopen($stdout) instead of reassigning
Guest24015 has quit [Remote host closed the connection]
<graft> heftig: ah, that does it, thanks
havenn has quit [Read error: Operation timed out]
mrdtt has joined #ruby
sorbo_ has left #ruby [#ruby]
Kuifje has quit [Ping timeout: 265 seconds]
jromine has quit [Ping timeout: 244 seconds]
zastern_ has quit [Remote host closed the connection]
seanstickle has joined #ruby
freeayu has joined #ruby
alex0 has joined #ruby
lordnaz has joined #ruby
marienz has quit [Ping timeout: 624 seconds]
itchyouch has joined #ruby
friskd has quit [Read error: Operation timed out]
chessguy has quit [Remote host closed the connection]
eregon has quit [Ping timeout: 244 seconds]
dankest has quit [Quit: Leaving...]
miskander has joined #ruby
eregon has joined #ruby
yshh has joined #ruby
pothibo has quit [Quit: pothibo]
felipe_Brz has joined #ruby
Proshot has quit [Read error: Operation timed out]
LouisGB has quit [Ping timeout: 246 seconds]
thinkclay has quit [Quit: Leaving.]
<felipe_Brz> i want to use ruby to execute a sql file... what I'm doing right now is to read the .sql file into a string and then run db.query(string) where db is a database connection created via the Mysql/Ruby client
<felipe_Brz> however, i'm getting an error after the first colon
itchyouch has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<felipe_Brz> is there any way to execute many queries at once?
<felipe_Brz> for instance, when you dump a database to a .sql file, you generally get many commands separated by colons
nignaztic has joined #ruby
jromine has joined #ruby
amacgregor_osx has joined #ruby
adkron has joined #ruby
zeade has joined #ruby
<felipe_Brz> *semicolons
Xeago has quit [Remote host closed the connection]
autumn has joined #ruby
reppard has quit [Ping timeout: 264 seconds]
jonahR has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
Russell^^ has quit [Quit: Russell^^]
x82_nicole has quit [Quit: Computer has gone to sleep.]
moshee has quit [Ping timeout: 264 seconds]
dankest has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
jenrzzz has joined #ruby
alex0 has quit [Quit: Leaving]
sn0wb1rd has quit [Quit: sn0wb1rd]
reppard has joined #ruby
xargoon has quit [Read error: Operation timed out]
cirwin has quit [Quit: snooz....zing!]
swex_ has quit [Read error: Operation timed out]
picca has joined #ruby
JoeHazzers has quit [Quit: JoeHazzers]
xargoon has joined #ruby
JoeHazzers has joined #ruby
picca has quit [Remote host closed the connection]
swex has joined #ruby
phelps has quit [Ping timeout: 250 seconds]
jonahR has quit [Quit: jonahR]
richardr has joined #ruby
jonahR has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
michaelhf has joined #ruby
johnmilton has quit [Remote host closed the connection]
mengu has quit [Quit: This computer has gone to sleep]
phelps has joined #ruby
banisterfiend is now known as banister`sleep
voodoofish430 has quit [Quit: Leaving.]
cloaked1 has quit [Ping timeout: 245 seconds]
jonahR has quit [Quit: jonahR]
phelps has quit [Ping timeout: 265 seconds]
jonahR has joined #ruby
amacgregor_osx has quit [Ping timeout: 252 seconds]
io_syl has quit [Quit: Computer has gone to sleep.]
<reppard> anyone from georgia know of a good usergroup/meet up?
phelps has joined #ruby
amacgregor_osx has joined #ruby
cakehero has joined #ruby
sorbo_ has joined #ruby
cableray has joined #ruby
cakehero has quit [Client Quit]
maetthew has quit [Quit: bye]
amacgregor_osx has quit [Read error: Operation timed out]
<bakis> does anyone know of sublime settings / plugins to make it exactly vim? with captial R replace and all the commands and such?
<reppard> sudo apt-get install vim ?
amacgregor_osx has joined #ruby
benlieb has quit [Quit: benlieb]
slainer68 has joined #ruby
marienz has joined #ruby
matip_ has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
matip has quit [Read error: Connection reset by peer]
lenovodroid has joined #ruby
flock has joined #ruby
<shevy> hmm is ARGF a perlism? and if so, how did perl come up with ARGF? the name
<flock> hey gang, I am having a small issue dereferencing a key in a hash
<flock> my key is called "key" (as thats how its called in the Github API, I am using the github_api gem)
slainer68 has quit [Ping timeout: 248 seconds]
<flock> so I have user.keys.all.first.key == fail :/
<aedorn> shevy: no it was in C long before perl
<flock> whereas user.keys.all.first.title works. The error MRI gives me is "ArgumentError: wrong number of arguments(0 for 1)"
<flock> thats because it wants to call the key method of Hash, which is not what I want ;)
nari has joined #ruby
sn0wb1rd has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<shevy> aedorn ok
maetthew has joined #ruby
mercwithamouth has joined #ruby
<aedorn> shevy: well, let me slightly take that back .. concept wise.
ltsstar has quit [Quit: ltsstar]
amacgregor_osx has quit [Read error: Operation timed out]
x82_nicole has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
amacgregor_osx has joined #ruby
sn0wb1rd_ has joined #ruby
mame0 has quit [Ping timeout: 244 seconds]
banister`sleep has quit [Ping timeout: 255 seconds]
sn0wb1rd has quit [Ping timeout: 265 seconds]
woolite64 has quit [Ping timeout: 265 seconds]
sn0wb1rd_ is now known as sn0wb1rd
mame0 has joined #ruby
Hanmac1 has joined #ruby
banister`sleep has joined #ruby
lenodroid has joined #ruby
whitedawg has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
adkron has quit [Ping timeout: 245 seconds]
x82_nicole has quit [Quit: Computer has gone to sleep.]
Hanmac has quit [Ping timeout: 256 seconds]
<felipe_Brz> bakis: i think you want vintage mode
lenovodroid has quit [Read error: Connection reset by peer]
kmurph has quit [Quit: kmurph]
emocakes has quit [Quit: emocakes]
<felipe_Brz> i have read a file (pure text with some newlines) into a string using File.read (i'm on the interactive cli)... i can see there are many newlines (\n) when i look at it in the cli but I can't for the love of (insert deity) split the string using newline as separator
<felipe_Brz> i've trie all sorts of combinations but none of them seem to work
blazes816 has quit [Ping timeout: 256 seconds]
jgrevich has quit [Read error: Connection reset by peer]
<felipe_Brz> anyone has any ideas of what might be the issue here?
BoomCow has quit [Quit: Leaving]
Iszak has quit []
F1skr has quit [Quit: WeeChat 0.3.9.2]
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
blazes816 has joined #ruby
jrajav has joined #ruby
jgrevich has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
ltsstar has joined #ruby
banister_ has joined #ruby
elico has quit [Quit: elico]
banister`sleep has quit [Ping timeout: 255 seconds]
lenodroid has quit [Read error: Connection reset by peer]
lenodroid has joined #ruby
<kenneth> if i have a block, is there a way to execute it while adding variables to its scope?
<kenneth> say i have block = lambda { puts hello }
<kenneth> could i do something to set hello = "world" within the scope of this block before i .call it?
<ryanf> kenneth: no, but you can use instance_eval to execute the block in the context of some object that has a method called hello
<ryanf> there is no way to inject locals into a block like that, unfortunately
<kenneth> so that means that every method call that depends on implicit self in the block would no longer work
<kenneth> hmm
michaelhf has quit [Remote host closed the connection]
ltsstar has quit [Quit: ltsstar]
banister_ has quit [Ping timeout: 252 seconds]
theRoUS has joined #ruby
theRoUS_ has joined #ruby
banister`sleep has joined #ruby
Aqua has quit [Ping timeout: 260 seconds]
the_jeebster has quit [Quit: Leaving.]
HorizonXP has joined #ruby
lenodroid has quit [Read error: Connection reset by peer]
<HorizonXP> hey guys, i'm trying to run this ruby program called soundCLI
<HorizonXP> looks like it rquires curb/curl
<HorizonXP> however, when i install it via gem install, running soundcli still yields sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev
<HorizonXP> i mean no such file to load -- curb
<HorizonXP> i figure it's because the gem i installed somewhere other than the default ubuntu/Ruby path
<HorizonXP> is there a package in Ubuntu I can intsall
joofsh has joined #ruby
justincampbell has quit [Remote host closed the connection]
jromine has quit [Remote host closed the connection]
Aqua has joined #ruby
<kenneth> HorizonXP: do you have libcurl + associated headers installed correctly?
TheFuzzball has quit [Ping timeout: 245 seconds]
kokainepizza has quit [Quit: My pooter is sleep.]
<kenneth> HorizonXP: and have you done a `gem install curb` and watched it successfully install?
kmurph has joined #ruby
jduan1981 has quit [Ping timeout: 246 seconds]
pwelch has joined #ruby
jaygen has quit [Remote host closed the connection]
pwelch has quit [Client Quit]
<HorizonXP> kenneth: gem install curb was successful
emanu has joined #ruby
<kenneth> HorizonXP: and you're sure that ruby gems / ruby is setup correctly? with rvm it can sometimes be easy to install gems in the wrong ruby and have them not work when you try to use them
<HorizonXP> kenneth: i installed ruby and ruby gems via apt-get so i assume they're setup correctly
<HorizonXP> i'm a total ruby noob here
dougireton has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
The_8473 has joined #ruby
The_8472 has quit [Ping timeout: 260 seconds]
miskander has quit [Quit: miskander]
sailias has joined #ruby
jenrzzz has joined #ruby
joofsh has quit [Remote host closed the connection]
bigmac has quit [Remote host closed the connection]
kmurph has quit [Quit: kmurph]
toekutr has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
amacgregor_osx_ has joined #ruby
dougireton has quit [Quit: Leaving.]
charliesome has joined #ruby
Eric_ has joined #ruby
fir_ed has quit [Ping timeout: 252 seconds]
amacgregor_osx has quit [Ping timeout: 252 seconds]
dougireton has joined #ruby
Eric_ has left #ruby [#ruby]
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
miskander has joined #ruby
ekr has joined #ruby
<ryanf> HorizonXP: you should really use rvm or rbenv instead of the ubuntu packages. they're notorious for being broken
<ryanf> dunno if maybe they're better lately, but it's probably best to just steer clear of them
Michael has joined #ruby
<charliesome> ryanf, HorizonXP: +1
Michael is now known as Guest86696
nari has quit [Ping timeout: 250 seconds]
<ryanf> I will say that it no longer feels like 50% of the questions in here are about people's broken ubuntu ruby installs
<ryanf> which is why I said maybe they're better
<charliesome> or maybe people have started using rvm or rbenv more
<ryanf> but that's probably just either people learning not to use them or me paying less attention
<ryanf> yeah
kenneth has quit [Quit: kenneth]
<aedorn> why!? why does ruby segfault!? argh
<charliesome> aedorn: uh oh, what's going on?
amacgregor_osx_ has quit [Read error: Operation timed out]
rakl has quit [Quit: sleeping]
<aedorn> charliesome: trying to get the last portions of gitlab working. When I go to the Users link it will segfault. And it looks like it's coming from ActiveRecord, but I can't tell why it would fault there
SeySayux has quit [Read error: Operation timed out]
<charliesome> are you using any c extensions?
jrajav has quit [Quit: I tend to be neutral about apples]
<ryanf> probably using a db driver with a c extension
<ryanf> aedorn: maybe try gem pristine --all to make sure your native extensions are all compiled against the right versions of things?
jenrzzz has quit [Ping timeout: 252 seconds]
SeySayux has joined #ruby
<aedorn> well, unicorn, pg, ffi .. not sure what else it uses. Everything is already pristine though (the whole system was rebuilt today)
amacgregor_osx has joined #ruby
cnielsen has joined #ruby
cnielsen is now known as sparc
sparc is now known as sparc_
theRoUS_ has quit [Ping timeout: 250 seconds]
<sparc_> Is there a good Ruby book about Ruby in the cloud?
cakehero has joined #ruby
theRoUS has quit [Ping timeout: 276 seconds]
<sparc_> I know the fog library and RightScale have ruby libraries that let us use AWS pretty well
<sparc_> The Oreilly ones seem to be Python specific
joofsh has joined #ruby
beneggett has quit [Read error: Operation timed out]
amacgregor_osx has quit [Read error: Operation timed out]
icole has joined #ruby
amacgregor_osx has joined #ruby
rakl has joined #ruby
kokainepizza has joined #ruby
tyman_ has joined #ruby
<seanstickle> sparc_: Perhaps you can do a mitzvah and write one!
tyman_ has quit [Read error: Connection reset by peer]
beneggett has joined #ruby
<banister`sleep> seanstickle: sup stick
xemu has quit [Ping timeout: 246 seconds]
<seanstickle> banister`sleep: shouldn't you be asleep?
<ryanf> yeah, I think he's been asleep for like an hour
<ryanf> more like two hours
reppard has quit [Ping timeout: 260 seconds]
sorbo_ has quit [Quit: sorbo_]
<banister`sleep> seanstickle: i tried already, now I'm watching a dock on riemann hypothesis
<banister`sleep> doco
<banister`sleep> fuck u apple
redgetan has joined #ruby
emanu has quit [Quit: emanu]
beneggett has quit [Ping timeout: 248 seconds]
LouisGB has joined #ruby
ekr has quit [Quit: ekr]
<charliesome> ruby sucks at being cross compiled
<redgetan> why does 1.2 - 1 give me 0.19999999999999996 instead of 0.2?
<redgetan> im using ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
<banister`sleep> redgetan: wow, not you too
<seanstickle> redgetan: IEEE 754
<redgetan> did someone ask the same question?
<seanstickle> redgetan: learn it, love it
<banister`sleep> redgetan: it gets asked here about once a day ;)
NihilistDandy has joined #ruby
<seanstickle> redgetan: master it
<redgetan> oh haha
<banister`sleep> redgetan: answer is "it's just how floating points work in computers, omg why didn't u learn that at college" ;)
<redgetan> hehe
<seanstickle> This is what happens when people didn't cut their teeth on assembly language.
<redgetan> i did dabble on assembly, but not that advanced :(
<NihilistDandy> Hi. I'm doing the Ruby koans and I've just hit the first one that I don't really get.
<NihilistDandy> http://hpaste.org/79900
<seanstickle> NihilistDandy: what's the sound of one hand clapping?
ekr has joined #ruby
<banister`sleep> seanstickle: this might be up your alley http://www.youtube.com/watch?v=yRn0A7FSjxc
<seanstickle> Jesus, really, what's up with those slides?
<seanstickle> These mathematicians should be crucified
amacgregor_osx has quit [Read error: Operation timed out]
<banister`sleep> seanstickle: it's interesting when he talks about the connection to fourier analysis, i hadn't heard of that before
<seanstickle> If I could read the slides I might try to watch.
<seanstickle> Although even then I would want to punch the presenter for writing so much crap on the slides.
moshee has quit [Ping timeout: 244 seconds]
amacgregor_osx has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
<seanstickle> But I've read a couple of books on the hypothesis, so it's all good.
<NihilistDandy> So what I think it's doing is pushing the values onto the default value, an empty Array. My intuition says that there is only one default value in a Hash, so pushing onto that Array alters the default value. Is that correct?
<NihilistDandy> And on top of that, since there is only one default value, anything keyed to the default value is altered along with it.
busybox42 has quit [Ping timeout: 260 seconds]
<NihilistDandy> Or, perhaps more correctly, any two values have the same object_id. This is why the default bound values are not listed when listing the contents of the hash.
icole has quit [Remote host closed the connection]
<NihilistDandy> But binding a non-default value to some key produces a different object_id, so it is listed.
tyman has joined #ruby
gnul0ver has joined #ruby
postmodern has joined #ruby
tyman has quit [Remote host closed the connection]
felipe_Brz has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121129162756]]
<NihilistDandy> Do I have the idea down, or am I misinterpreting something?
Aliv3 has joined #ruby
dougireton has quit [Quit: Leaving.]
rakl has quit [Quit: sleeping]
Umren has joined #ruby
<gnul0ver> happy boxing day
<gnul0ver> everyone
<gnul0ver> 0_o
landho has joined #ruby
dougireton has joined #ruby
breakingthings has joined #ruby
miskander has quit [Quit: miskander]
whitedawg has quit [Quit: Leaving.]
xAndy is now known as xandy
phantasm66 has quit [Quit: *sleeeep….]
rippa has joined #ruby
megharsh has quit [Quit: WeeChat 0.3.9.2]
LouisGB has quit [Ping timeout: 260 seconds]
Aliv3 has quit [Quit: Leaving]
mikekelly has quit [Ping timeout: 265 seconds]
mikekelly has joined #ruby
phelps has quit [Ping timeout: 252 seconds]
redgetan has quit [Quit: Leaving]
woolite64 has joined #ruby
xandy is now known as xAndy
phelps has joined #ruby
stevechiagozie has joined #ruby
cyong has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
<wallerdev> if i start a process in a thread, and end the ruby script, will it end the process?
dr_neek has joined #ruby
elico has joined #ruby
elico has quit [Client Quit]
Umren has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
joofsh has quit [Remote host closed the connection]
<sparc_> seanstickle: yeah, a good idea!
<sparc_> it looks like the fog docs are really good though
<seanstickle> sparc_: :D
<aedorn> ah hah.. no more segfault
My_Hearing has joined #ruby
My_Hearing has joined #ruby
My_Hearing has quit [Changing host]
Mon_Ouie has quit [Read error: Operation timed out]
<aedorn> aww damn it, spoke too soon
<jonahR> wallerdev: the process will only be active as long as ruby is running the script
<sparc_> I don't know a lot about developing in ruby and havn't seen rubydoc.info
<aedorn> wtf c:0167 p:---- s:0887 b:0887 l:000886 d:000886 CFUNC :(null)
<wallerdev> jonahR: cool, will test it out
pau110 has joined #ruby
pau110 has quit [Client Quit]
<jonahR> wallerdev: no problem, for further info you should check this: http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_threads.html
JoeHazzers has quit [Quit: JoeHazzers]
JoeHazzers has joined #ruby
chimkan has joined #ruby
bradleyprice has joined #ruby
<jonahR> wallerdev: also you might be interested in Fibers which are lighter than threads and support concurrency (http://www.ruby-doc.org/core-1.9.3/Fiber.html)
Guest86696 has quit [Remote host closed the connection]
amacgregor_osx_ has joined #ruby
dr_neek has quit [Ping timeout: 250 seconds]
harushimo has quit [Quit: Leaving]
crazedpsyc has joined #ruby
amacgregor_osx has quit [Read error: Operation timed out]
Michael has joined #ruby
Michael is now known as Guest50783
roconnor has joined #ruby
cj3kim has joined #ruby
chriskk has quit [Quit: chriskk]
chimkan___ has joined #ruby
ekr has quit [Quit: ekr]
chimkan has quit [Ping timeout: 248 seconds]
chimkan___ is now known as chimkan
kokainepizza has quit [Quit: My pooter is sleep.]
abhishiv has joined #ruby
abhishiv has left #ruby [#ruby]
radic has joined #ruby
abhishiv has joined #ruby
kiyoura has quit [Ping timeout: 250 seconds]
richardr has quit [Remote host closed the connection]
icole has joined #ruby
amacgregor_osx_ has quit [Read error: Operation timed out]
abhishiv has left #ruby [#ruby]
amacgregor_osx has joined #ruby
adzdavies has joined #ruby
radic_ has quit [Ping timeout: 264 seconds]
bradleyprice has quit [Remote host closed the connection]
dougireton has quit [Quit: Leaving.]
dougireton has joined #ruby
icole has quit [Ping timeout: 252 seconds]
chimkan has quit [Ping timeout: 245 seconds]
sailias has quit [Quit: Leaving.]
blazes816 has quit [Quit: blazes816]
seanstickle has quit [Quit: seanstickle]
ekr has joined #ruby
ekr has quit [Client Quit]
Hanmac1 is now known as Hanmac
<Hanmac> does someone sill has an ruby1.8 installed ? i need some little test
dr_neek has joined #ruby
<roconnor> I have ruby-1.8.7-p357
jgrevich has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
kmurph has joined #ruby
guns has joined #ruby
<ner0x> assert_match /User [#{user.email}]/, login.errors.messages[:email][0] Any specific reason this would fail if it is infact "User [thecorrectemail] ...." ?
<Hanmac> roconnor: you could test this: s="a";h={s => 3};s.object_id == h.keys[0].object_id
dougireton has quit [Quit: Leaving.]
<roconnor> bin/ruby -e 's="a";h={s => 3};print (s.object_id == h.keys[0].object_id)'
<roconnor> false
<Hanmac> hmm ök
becom33 has quit [Quit: Leaving]
<roconnor> Hanmac: same result for ruby-1.9.3-pl194
akells has joined #ruby
megharsh has joined #ruby
stevechiagozie has quit [Ping timeout: 255 seconds]
akells has left #ruby [#ruby]
cyong has quit [Quit: Leaving.]
nwertman has joined #ruby
ner0x has quit [Quit: Leaving]
seanyo has joined #ruby
<heftig> roconnor: hash wants a frozen key, so it dups it
<heftig> compare s.frozen? and h.keys[0].frozen?
DrShoggoth has quit [Quit: Leaving]
hadees has joined #ruby
lukeholder has joined #ruby
<Hanmac> heftig yeah i know (i thought that there was a problem when you use strings as keys besights the memory stuff)
<heftig> roconnor: s="a".freeze;h={s => 3};s.object_id == h.keys[0].object_id
<breakingthings> Does anyone know if ruby can shorten the ternary? eg. 'puts var_nil ?: var_exists'
rakl has joined #ruby
<breakingthings> or anything similar to that
lukeholder has quit [Client Quit]
Bry8Star_ is now known as Bry8Star
<roconnor> /nix/store/yc8ja3d276aa716qckz3b0i4vs2j04bj-ruby-1.9.3-p194/bin/ruby -e 's="a".freeze;h={s => 3};print (s.object_id == h.keys[0].object_id)'
<roconnor> true
<roconnor> /nix/store/5l3j3y0a990pqasiwbqfavyf0l49dgsn-ruby-1.8.7-p357/bin/ruby -e 's="a".freeze;h={s => 3};print (s.object_id == h.keys[0].object_id)'
<roconnor> true
ananthakumaran has joined #ruby
mockra has quit [Remote host closed the connection]
<adzdavies> breakingthins: you can use a dangling 'if' or unless - which is an expression... so it can be used as: puts (var_exists unless var_nil)
nwertman has quit [Ping timeout: 244 seconds]
fir_ed has joined #ruby
mockra has joined #ruby
<breakingthings> adzdavies: I probably could have used a better name there, but I was actually aiming for 'puts var_nil' being the preferable execution if var_nil was in fact… not nil.
<breakingthings> so let's just say that we have var1 and var2, var1 can either be a string or nil and var2 is always present
<shevy> puts var_nil unless var_nil
<shevy> puts var2 if var1
<adzdavies> continue... :)
<shevy> break!!!
<shevy> I want to define "def break!!!"
<breakingthings> longer than: puts var_nil ? var2 : var1
<breakingthings> :/
<breakingthings> err
rakl has quit [Quit: sleeping]
<breakingthings> puts var1*
<shevy> huh?
<breakingthings> egh
<adzdavies> so you wanna show var 1 if present, but always var2?
<breakingthings> adzdavies var1 if present, if not then var 2.
<shevy> that is the advantage of the ternary operator
<shevy> ?
<shevy> it is very short
<shevy> :>
<breakingthings> yes but I was curious if ruby had the short-shorthand of ternary
<shevy> it's like putting "if" and "else" into one line and one character
<breakingthings> ala php
<breakingthings> var1 ?: var2
<shevy> the short-short-shorthand?
<shevy> aha
<adzdavies> another trick is using ||
zeade has quit [Quit: Leaving.]
<NihilistDandy> I have a newbie question, if someone's got a moment.
<breakingthings> where it assumes that it should return the result of the statement if the statement evaluates true
<shevy> hmm perhaps this is one of the few instances where PHP beats Ruby
<shevy> return?
<shevy> or print it out
<adzdavies> output = var1 || var2
pcarrier has quit []
<breakingthings> well, it 'returns' it, which you can then use to print
<adzdavies> the "||" means or, so it returns var1 if it's present
<breakingthings> eg. echo var1 ?: var2
<shevy> puts var1 || var2
<adzdavies> puts var1 || var2
<adzdavies> :)
<shevy> TAKE THIS PHP
<breakingthings> i will try that
<breakingthings> I think I tried that though
<breakingthings> perhaps i've just gone bonkers though
<shevy> perhaps your variables have other values
<adzdavies> only thing to take care of -- if var1 is a boolean, and it's false.... well var2 wins all the time
<shevy> I like born winners
<breakingthings> yeah, that's what it probably was shevy
<breakingthings> var1 hasn't been nil, it's been a blank string
<shevy> I am gonna date php
<breakingthings> so iunno
<adzdavies> blank string isn't nil... so it will be true
<breakingthings> I don't use this that much I'm just code golfing for shits and giggles
<adzdavies> you can use the Rails ".presence" helper here..
<breakingthings> adzdavies yeah, I realize
<breakingthings> I was just curious if I could shrink the code a bit if I could make the var nil instead of blank string
<breakingthings> and it's just base ruby
<breakingthings> .empty? works for that purpose
<adzdavies> well yeah...
cyong has joined #ruby
<adzdavies> that's kind of what presence does -- it returns the object if its not blank?, where blank? is false for empty string/nil
<breakingthings> while I appreciate the knowledge, it won't work for this :)
<reactormonk> adzdavies, blank? is RoR
<NihilistDandy> I have a newbie question about hashes if someone has a moment.
<adzdavies> it certainly is
<adzdavies> just showing the concept... you could always approximate with a few functions rather than monkey patching Object
<NihilistDandy> http://hpaste.org/79903 -- code in question and thoughts on it
staafl has joined #ruby
<shevy> NihilistDandy with .default you can set a default return value for a hash, when a key was not found
io_syl has joined #ruby
<adzdavies> NihilistDandy -- yeah it's the same object each time. The api explains: http://www.ruby-doc.org/core-1.9.3/Hash.html#method-c-new
<adzdavies> basically you use a block if you want a different array for each new default
amacgregor_osx_ has joined #ruby
<NihilistDandy> And pushing onto the Array with the shovel changes the default value of the Hash, yes?
havenn has joined #ruby
<adzdavies> it does, but you're also not actually assigning anything into the hash
JohnBat26 has joined #ruby
dankest is now known as dankest|away
amacgregor_osx has quit [Read error: Operation timed out]
sayan has joined #ruby
<NihilistDandy> Right. That was what I thought. You can change the default, but the default is always the same object, so any defaulted key will take on the new value.
<adzdavies> not if you did this: hash = Hash.new { [] }
<aedorn> troubleshooting resque is a bit infuriating
lele has quit [Ping timeout: 246 seconds]
<NihilistDandy> adzdavies: Because then the Hash is inhabited. I see.
<adzdavies> no... it's not... it's just the default is fresh each time
<havenn> Another way to say the same thing: hash = {}; hash.default = []
<NihilistDandy> Oh. Hadn't checked it in irb. Now I see what you mean, though.
<NihilistDandy> Okay, that clears a lot up, then. Thanks.
<adzdavies> This from the api doc does a more sensible thing... setting the key with the default:
<adzdavies> h = Hash.new { |hash, key| hash[key] = "Go Fish: #{key}" }
gnul0ver has quit [Ping timeout: 265 seconds]
<NihilistDandy> Right, I think something like that was the next koan
<NihilistDandy> The Ruby koans are one of my favorite ways to learn a language. I've been meaning to try Ruby for a while, and it's a neat method.
araujo has quit [Quit: Leaving]
lele has joined #ruby
NerveStream has joined #ruby
tommyvyo has quit [Quit: http://thomasvendetta.com]
tommyvyo has joined #ruby
jduan1981 has joined #ruby
cyong has quit [Quit: Leaving.]
kenneth has joined #ruby
elsifaka has joined #ruby
Gurpartap has joined #ruby
<Gurpartap> shevy:
ananthakumaran1 has joined #ruby
dmiller has joined #ruby
stkowski has quit [Quit: stkowski]
dmiller has quit [Remote host closed the connection]
ananthakumaran has quit [Ping timeout: 260 seconds]
breakingthings has quit []
seanyo has quit [Ping timeout: 250 seconds]
Asher has quit [Quit: Leaving.]
sayan has quit [Ping timeout: 260 seconds]
cyong has joined #ruby
jsilver has quit [Read error: Connection reset by peer]
nari has joined #ruby
fred909 has joined #ruby
happosade has quit [Read error: Operation timed out]
nw has quit [Ping timeout: 276 seconds]
IceDragon has quit [Quit: Space~~~]
shaman42 has quit [Ping timeout: 252 seconds]
sayan has joined #ruby
nwertman has joined #ruby
samuel02 has joined #ruby
Gurpartap has quit [Quit: Page closed]
cableray has quit [Quit: cableray]
ryanf has quit [Quit: leaving]
ryanf has joined #ruby
nwertman has quit [Ping timeout: 252 seconds]
fred909_ has joined #ruby
mockra has quit [Remote host closed the connection]
fred909 has quit [Ping timeout: 250 seconds]
tvw has joined #ruby
Quadlex is now known as AwayLex
mockra has joined #ruby
hotovson has joined #ruby
robustus has quit [Ping timeout: 255 seconds]
robustus has joined #ruby
Tomasso has quit [Ping timeout: 264 seconds]
sparc_ has quit [Ping timeout: 248 seconds]
mercwithamouth has quit [Ping timeout: 260 seconds]
hotovson has quit [Read error: No route to host]
cyong has quit [Quit: Leaving.]
spinagon has joined #ruby
rippa has quit [Read error: Connection reset by peer]
fred909 has joined #ruby
atyz has joined #ruby
jimeh has joined #ruby
fred909_ has quit [Ping timeout: 265 seconds]
NihilistDandy has quit [Quit: Textual IRC Client: www.textualapp.com]
tPl0ch has joined #ruby
dankest|away has quit [Quit: Leaving...]
cableray has joined #ruby
wargasm has quit [Ping timeout: 265 seconds]
baphled has quit [Ping timeout: 252 seconds]
sayan_ has joined #ruby
pen has joined #ruby
sayan has quit [Ping timeout: 248 seconds]
daniel_- has joined #ruby
sayan_ is now known as sayan
sayan has quit [Changing host]
sayan has joined #ruby
JoeHazzers has quit [Ping timeout: 245 seconds]
JoeHazzers has joined #ruby
hakunin has quit [Remote host closed the connection]
Tux-Tn has joined #ruby
daniel_- has quit [Ping timeout: 244 seconds]
wargasm has joined #ruby
spinagon has quit [Ping timeout: 240 seconds]
jimeh has quit [Quit: Computer has gone to sleep.]
hotovson has joined #ruby
wallerdev has quit [Quit: wallerdev]
dhruvasagar has joined #ruby
happosade has joined #ruby
mafolz has joined #ruby
shaman42 has joined #ruby
hotovson has quit [Read error: No route to host]
staafl_alt has joined #ruby
mengu has joined #ruby
Slivka has joined #ruby
atyz has quit [Quit: Leaving...]
skcin7 has quit [Quit: Computer has gone to sleep.]
staafl_alt has quit [Read error: Connection reset by peer]
mengu has quit [Client Quit]
eldariof has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
mengu has joined #ruby
staafl has quit [Ping timeout: 248 seconds]
arturaz has joined #ruby
staafl has joined #ruby
helvete has joined #ruby
nw has joined #ruby
filipe has joined #ruby
staafl has quit [Read error: Connection reset by peer]
tommyvyo has quit [Quit: Computer has gone to sleep.]
daniel_- has joined #ruby
Catnaroek has joined #ruby
marr has joined #ruby
amacgregor_osx_ has quit [Read error: Operation timed out]
lolcathost has quit [Ping timeout: 255 seconds]
staafl has joined #ruby
pcarrier has joined #ruby
Siphonblast has quit [Quit: quit()]
staafl has quit [Read error: Connection reset by peer]
Icarot has joined #ruby
staafl has joined #ruby
drfreeze_ has quit [Ping timeout: 260 seconds]
staafl_alt has joined #ruby
pcarrier has quit [Ping timeout: 255 seconds]
havenn has quit [Remote host closed the connection]
drfreeze has joined #ruby
pcarrier has joined #ruby
staafl has quit [Ping timeout: 250 seconds]
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mockra has quit [Remote host closed the connection]
cableray has quit [Quit: cableray]
mengu_ has joined #ruby
amacgregor_osx has joined #ruby
mockra has joined #ruby
mockra has quit [Remote host closed the connection]
mengu has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
nari has quit [Ping timeout: 248 seconds]
thomasfedb has quit [Remote host closed the connection]
cj3kim has quit [Quit: This computer has gone to sleep]
cj3kim has joined #ruby
cableray has joined #ruby
bigmcq77 has joined #ruby
xpen has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
waxjar has quit [Remote host closed the connection]
stnly has quit [Remote host closed the connection]
amacgregor_osx has quit [Read error: Operation timed out]
fred909 has quit [Ping timeout: 248 seconds]
yacks has joined #ruby
x82_nicole has joined #ruby
Morkel has joined #ruby
amacgregor_osx has joined #ruby
nemesit has joined #ruby
pen has quit [Read error: Connection reset by peer]
mengu_ has quit [Read error: Connection reset by peer]
emergion has quit [Quit: Computer has gone to sleep.]
pen has joined #ruby
mengu_ has joined #ruby
emergion has joined #ruby
berserkr has joined #ruby
hotovson has joined #ruby
daniel_- has quit [Ping timeout: 248 seconds]
aedorn has quit [Quit: Konversation terminated!]
hotovson has quit [Ping timeout: 248 seconds]
Icarot has quit [Quit: quit()]
emergion has quit [Quit: Computer has gone to sleep.]
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
advorak has joined #ruby
megharsh has quit [Read error: Operation timed out]
Virunga has joined #ruby
jduan1981 has quit [Quit: jduan1981]
hotovson has joined #ruby
daniel_- has joined #ruby
hoelzro|away is now known as hoelzro
blaxter has joined #ruby
ninegrid_ has joined #ruby
fyolnish has quit [Remote host closed the connection]
fyolnish has joined #ruby
Blaguvest has joined #ruby
tommyvyo has joined #ruby
ninegrid_ has quit [Ping timeout: 265 seconds]
sayan has quit [Read error: Connection reset by peer]
eka has joined #ruby
stayarrr has joined #ruby
nomenkun has joined #ruby
nomenkun_ has joined #ruby
xaphod has joined #ruby
kmurph has quit [Quit: kmurph]
sayan has joined #ruby
nomenkun has quit [Ping timeout: 260 seconds]
xaphod has quit [Client Quit]
guns has quit [Quit: guns]
xaphod has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
arturaz has quit [Remote host closed the connection]
xaphod has left #ruby ["Leaving"]
jgrevich has quit [Remote host closed the connection]
zz_chrismcg is now known as chrismcg
emocakes has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
slainer68 has joined #ruby
megharsh has joined #ruby
Guest25886 has joined #ruby
banister`sleep has quit [Read error: Connection reset by peer]
autumn has quit [Changing host]
autumn has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
banister`sleep has joined #ruby
autumn has quit [Remote host closed the connection]
autumn has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
semlib has joined #ruby
semlib has left #ruby [#ruby]
autumn is now known as noxgirl
noxgirl is now known as autumn
cirwin has joined #ruby
mengu_ has quit [Quit: This computer has gone to sleep]
yacks has quit [Ping timeout: 244 seconds]
fjfish has quit [Remote host closed the connection]
My_Hearing is now known as Mon_Ouie
emergion has joined #ruby
cantonic has quit [Quit: cantonic]
arturaz has joined #ruby
nari has joined #ruby
stayarrr has quit [Ping timeout: 264 seconds]
Proshot has joined #ruby
daniel_- has quit [Ping timeout: 248 seconds]
megharsh has quit [Quit: WeeChat 0.3.9.2]
atno has quit [Read error: Connection reset by peer]
blacktulip has joined #ruby
kil0byte has quit [Remote host closed the connection]
mjolk has joined #ruby
yshh has quit [Remote host closed the connection]
mjolk is now known as Guest82439
banseljaj is now known as imami|afk
francisfish has joined #ruby
emocakes has quit [Quit: emocakes]
atno has joined #ruby
emocakes has joined #ruby
mrdtt has quit [Quit: mrdtt]
yacks has joined #ruby
_64k has joined #ruby
hadees has quit [Ping timeout: 248 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
dankest has joined #ruby
hadees has joined #ruby
xpen has quit [Ping timeout: 248 seconds]
seoaqua has joined #ruby
__BigO__ has joined #ruby
thomasfedb has joined #ruby
francisfish has quit [Remote host closed the connection]
amacgregor_osx has quit [Read error: Operation timed out]
dsdeiz has joined #ruby
knirhs has quit [Ping timeout: 250 seconds]
Spaceghostc2c has quit [Excess Flood]
amacgregor_osx has joined #ruby
Spaceghostc2c has joined #ruby
fteem has joined #ruby
hadees has quit [Read error: Connection reset by peer]
hadees_ has joined #ruby
<dsdeiz> hi! why does Time.parse('2012-12-27').strftime('%B %m, %Y') return 'December 12, 2012'?
Guest82439 has quit [Quit: Leaving]
mjolk2 has joined #ruby
lkba has quit [Ping timeout: 256 seconds]
autumn has quit [Remote host closed the connection]
knirhs has joined #ruby
autumn has joined #ruby
_64k has quit [Quit: _64k]
<Hanmac> dsdeiz: because "%m - Month of the year, zero-padded (01..12)"
<dsdeiz> hm, not sure what you mean sorry. but i was expecting the result to be December 27, 2012
<dsdeiz> ah
<dsdeiz> my bad
thomasfedb has quit [Remote host closed the connection]
nemesit has quit [Quit: Leaving...]
__BigO__ has quit [Remote host closed the connection]
dankest has quit [Quit: Leaving...]
amacgregor_osx has quit [Read error: Operation timed out]
_64k has joined #ruby
xAndy is now known as xandy
dankest has joined #ruby
xandy is now known as xAndy
gyre007 has joined #ruby
atno has quit [Remote host closed the connection]
cableray has quit [Quit: cableray]
amacgregor_osx has joined #ruby
wermel has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
woolite64 has quit [Ping timeout: 260 seconds]
adzdavies has quit [Quit: Leaving]
mafolz has quit [Remote host closed the connection]
mafolz has joined #ruby
Blaguvest has quit [Quit: Leaving]
darthdeus has joined #ruby
mafolz has quit [Client Quit]
mafolz has joined #ruby
aetaric has quit [Ping timeout: 255 seconds]
_64k has quit [Quit: _64k]
pen has quit [Remote host closed the connection]
mafolz has quit [Remote host closed the connection]
mafolz has joined #ruby
larissa has joined #ruby
atno has joined #ruby
lkba has joined #ruby
_64k has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
Astral has joined #ruby
Astral is now known as Guest26151
aetaric has joined #ruby
aef has quit [Remote host closed the connection]
Astral__ has quit [Ping timeout: 255 seconds]
aef has joined #ruby
dankest has quit [Quit: Leaving...]
Guest26151 has quit [Ping timeout: 248 seconds]
LouisGB has joined #ruby
slainer68 has quit [Remote host closed the connection]
alesguzik has joined #ruby
alesguzik has quit [Client Quit]
Proshot has quit [Quit: Leaving]
kjellski has joined #ruby
EhyehAsherEhyeh has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
jonahR has quit [Quit: jonahR]
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
jibi has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
eka has quit [Quit: Computer has gone to sleep.]
nemesit has joined #ruby
hemanth_ has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
vlad_starkov has joined #ruby
francisfish has joined #ruby
cakehero has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
banister`sleep has quit [Remote host closed the connection]
slainer68 has joined #ruby
seoaqua has quit [Quit: 离开]
beiter has joined #ruby
cakehero has quit [Ping timeout: 248 seconds]
ikaros has joined #ruby
Catnaroek has quit [Quit: leaving]
jbw has quit [Ping timeout: 252 seconds]
cakehero has joined #ruby
Catnaroek has joined #ruby
Astral has joined #ruby
vlad_starkov has joined #ruby
Astral is now known as Guest42577
slainer68 has quit [Ping timeout: 248 seconds]
knirhs has quit [Ping timeout: 260 seconds]
sayan has quit [Remote host closed the connection]
helvete has quit [Read error: Connection reset by peer]
kjellski has quit [Quit: This computer has gone to sleep]
Guest42577 is now known as Astral_
samphippen has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
Astral_ is now known as Astral__
samphippen has quit [Client Quit]
dspp has quit [Ping timeout: 248 seconds]
Astral__ is now known as Astralum
amacgregor_osx has quit [Read error: Operation timed out]
helvete has joined #ruby
helvete has quit [Client Quit]
jbw has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
knirhs has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
Catnaroek has quit [Ping timeout: 255 seconds]
xaphod has joined #ruby
atyz has joined #ruby
amacgregor_osx has joined #ruby
ikaros has quit [Quit: Ex-Chat]
Bry8Star has quit [Remote host closed the connection]
pskosinski has joined #ruby
amacgregor_osx has quit [Read error: Operation timed out]
Phoop has joined #ruby
Bry8Star has joined #ruby
amacgregor_osx has joined #ruby
jbw has quit [Ping timeout: 255 seconds]
atyz has quit [Ping timeout: 265 seconds]
jsmonkey has joined #ruby
<jsmonkey> has anyone used google apis with the ruby client? Im having some problems
Udom0 has joined #ruby
vlad_starkov has joined #ruby
xaphod has left #ruby ["Leaving"]
neurotech has quit [Remote host closed the connection]
ikaros has joined #ruby
jibi has quit [Quit: .]
stevechiagozie has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
eldariof has quit [Ping timeout: 245 seconds]
atyz has joined #ruby
stevechiagozie has quit [Ping timeout: 252 seconds]
kaen has quit [Read error: Connection reset by peer]
hotovson has quit [Remote host closed the connection]
neku has joined #ruby
mengu_ has joined #ruby
snowflight has joined #ruby
mpfundstein has quit [Ping timeout: 255 seconds]
<snowflight> in this statement here, is the argument passed an object?
<snowflight> @hash = Hash.new({:hello => 'world'})
<hoelzro> snowflight: the argument to me?
<snowflight> argument to hash object
<snowflight> Hash object
samphippen has joined #ruby
<hoelzro> er, to new
<hoelzro> that's what I meant to type.
<snowflight> ya
<snowflight> the {} are confusing me, not seen much of those before
<hoelzro> snowflight: that's a hash
<snowflight> ah! click. thats right
koshii has quit [Ping timeout: 250 seconds]
<snowflight> so its just a regular parameter except the datatype is a hash?
koshii has joined #ruby
sayan has joined #ruby
mpfundstein has joined #ruby
<hoelzro> that's correct
<snowflight> ok, I am guessing the instantiate method for Hash then looks like def instantiate({}) ?
<hoelzro> snowflight: do you mean initialize?
sepp2k has joined #ruby
<snowflight> Yes, sorry for the confusion :)
<snowflight> its just too many languages at the same time
<hoelzro> it's just def initialize(a_hash_or_possibly_something_else)
_64k has quit [Quit: _64k]
<snowflight> Thanks hoelzro , now time to try it out in irb
Banistergalaxy has quit [Ping timeout: 246 seconds]
ananthakumaran1 has quit [Quit: Leaving.]
kaen has joined #ruby
nari has quit [Ping timeout: 255 seconds]
beiter has quit [Read error: Connection reset by peer]
hybris has joined #ruby
beiter has joined #ruby
Rym has joined #ruby
Nss has joined #ruby
tommyvyo_ has joined #ruby
cajone has joined #ruby
Udom0 has left #ruby [#ruby]
Udom0 has joined #ruby
dr_neek has quit [Quit: dr_neek]
stevechiagozie has joined #ruby
slainer68 has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
stevechiagozie has quit [Ping timeout: 250 seconds]
adkron has joined #ruby
vdandre has joined #ruby
mpfundstein_home has joined #ruby
_64k has joined #ruby
Kuifje has joined #ruby
jonahR has joined #ruby
berserkr has quit [Quit: Leaving.]
Chryson_ has joined #ruby
Nss has quit [Ping timeout: 255 seconds]
johanwallberg has joined #ruby
<johanwallberg> we're looking for full-time back-end developers! jobs.revibe.fm
banister`sleep has joined #ruby
dangerousdave has joined #ruby
megharsh has joined #ruby
yacks has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
<snowflight> https://gist.github.com/4397850 What do i need in this sample in order to access @bar[:k] ?
Nss has joined #ruby
LouisGB has quit [Ping timeout: 248 seconds]
seanstickle has joined #ruby
spathi has quit [Read error: Operation timed out]
<Hanmac> snowflight Foo does not have an [] method for its instances
<snowflight> I see,
jonahR has quit [Quit: jonahR]
fteem has quit [Remote host closed the connection]
<snowflight> thanks, let me give it another try
fteem has joined #ruby
stevechiagozie has joined #ruby
Cooler_ has joined #ruby
LouisGB has joined #ruby
Banistergalaxy has joined #ruby
Nss has quit [Ping timeout: 248 seconds]
spathi has joined #ruby
Nss has joined #ruby
tvw has quit [Remote host closed the connection]
Rym has quit [Quit: Rym]
<snowflight> Hanmac: is this the right direction? (except for the syntax of def [:key]) https://gist.github.com/4397932
<cajone> any one able to look at this and give some pointers ( excuse the pun!) http://hpaste.org/79910
seanstickle has quit [Quit: seanstickle]
<Hanmac> snowflightdef [](key); return @v[key]; end
_64k has quit [Quit: _64k]
Nss has quit [Client Quit]
<Hanmac> cajone line 17 "@s"
[JellyBean] has quit [Quit: ZNC - http://znc.in]
_64k has joined #ruby
<cajone> Hanmac: if a pass in @a it words fine, if I pass in 's' without the @ it returns nothing, think I'm missing something
<cajone> works*
neku has quit [Quit: Linkinus - http://linkinus.com]
<Hanmac> cajone i think you does not understand ... "a" and @a are not the same
ner0x has joined #ruby
<Hanmac> so when you do: s= @subj[0] than s is "a" and not @a
<cajone> Hanmac: agreed, just wonder how I would go about it
johanwallberg has left #ruby [#ruby]
Xeago has joined #ruby
<snowflight> thanks Hanmac that helped
gyre007 has quit [Remote host closed the connection]
<Hanmac> cajone: instance_variable_get("@{s}")
emocakes has quit [Quit: emocakes]
<cajone> Hanmac: :) thanks, that makes perfect sense!
adkron has quit [Ping timeout: 252 seconds]
s1n4 has joined #ruby
larissa has quit [Quit: Leaving]
dsdeiz has quit [Ping timeout: 244 seconds]
seanstickle has joined #ruby
The_8473 is now known as The_8472
banister`sleep has quit [Remote host closed the connection]
tPl0ch has quit [Quit: Verlassend]
joofsh has joined #ruby
xemu has joined #ruby
dr_neek has joined #ruby
s1n4 has quit [Quit: leaving]
eka has joined #ruby
<The_8472> cajone, dynamically definiting lots of different instance variables can be bad for performance. you should use a hash instead.
seanyo has joined #ruby
DrShoggoth has joined #ruby
tenmilestereo has joined #ruby
gyre007 has joined #ruby
seanyo has quit [Remote host closed the connection]
companion has quit [Remote host closed the connection]
moos3 has joined #ruby
companion has joined #ruby
sailias has joined #ruby
willob has joined #ruby
whowantstolivefo has quit [Read error: Connection reset by peer]
<cajone> The_8472: thanks for the tip!
whowantstolivefo has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
Bish has quit [Read error: Operation timed out]
Bish has joined #ruby
Asher has joined #ruby
breakingthings has joined #ruby
matip__ has joined #ruby
banister`sleep has joined #ruby
GoGoGarrett has joined #ruby
matip_ has quit [Ping timeout: 264 seconds]
ananthakumaran has joined #ruby
kirun has joined #ruby
kjellski has joined #ruby
atmosx has joined #ruby
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
_64k has quit [Quit: _64k]
_64k has joined #ruby
jerius has joined #ruby
Rym has joined #ruby
Xeago has quit [Remote host closed the connection]
mpfundstein_home has quit [Ping timeout: 252 seconds]
kjellski has quit [Ping timeout: 252 seconds]
nmeum has quit [Quit: WeeChat 0.3.8]
kjellski has joined #ruby
nmeum has joined #ruby
uris has joined #ruby
waxjar has joined #ruby
Rym has quit [Quit: Rym]
carlyle has joined #ruby
nomenkun has quit [Ping timeout: 252 seconds]
lkba has joined #ruby
Sou|cutter has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
nomenkun has joined #ruby
phantasm66 has quit [Client Quit]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
browndawg has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
lkba has joined #ruby
<shevy> hmmm
kjellski has quit [Ping timeout: 244 seconds]
hadees_ has quit [Ping timeout: 248 seconds]
<shevy> those advertizement folks are annoying
<shevy> you get an email, a company is out for hire, if you reply in a non standard way with questions, you get ignored
<shevy> how is this fair? that's one sided spam
<shevy> * advertisement
kjellski has joined #ruby
CamonZ has quit [Quit: Linkinus - http://linkinus.com]
<mpfundstein> shevy: corporate bullshit
kjellski has quit [Read error: Connection reset by peer]
<seanstickle> All spam is one sided, no?
reppard has joined #ruby
<shevy> seanstickle yeah
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
marr has quit [Ping timeout: 265 seconds]
<Hanmac> shevy i thought about this "ruby boot camps" the same ...
<shevy> that too, but at least they only advertised here. it's somehow different to getting a "personal" email which in effect is nothing but disguised, one-sided spam ... :(
nomenkun has quit [Read error: Connection reset by peer]
mengu_ has quit [Quit: This computer has gone to sleep]
reppard has quit [Ping timeout: 260 seconds]
<shevy> was any of these guys a longtime rubyist anyway?
nomenkun has joined #ruby
kjellski has joined #ruby
browndawg has quit [Quit: Leaving.]
stopbit has joined #ruby
<shevy> If all you have is a hammer, then everything will look like a nail.
landho has quit [Ping timeout: 248 seconds]
tommyvyo_ has joined #ruby
kil0byte has joined #ruby
<hybris> If your only tool is a hammer, all your problems will look like nails
Udom0 has left #ruby [#ruby]
rondale_sc has joined #ruby
vagnerd has joined #ruby
<hybris> If your only tool is ruby, all your problems will look like rails
<hybris> lol lolz
matthewm has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
reppard has joined #ruby
adamnbowen has joined #ruby
nobuoka has joined #ruby
megharsh has quit [Quit: WeeChat 0.3.9.2]
pmros has joined #ruby
<pmros> hi!
statarb3 has quit [Ping timeout: 248 seconds]
haxrbyte_ has joined #ruby
vvlad has joined #ruby
<Hanmac> while rubyists uses rails, pythonists only "import teleport" for transportation
roconnor has quit [Quit: Konversation terminated!]
C0deMaver1ck has joined #ruby
pmros has quit [Read error: Connection reset by peer]
pmros has joined #ruby
michaelhf has joined #ruby
haxrbyte has quit [Ping timeout: 256 seconds]
Timao has joined #ruby
banister`sleep has quit [Remote host closed the connection]
jrajav has joined #ruby
jonahR has joined #ruby
jbw has joined #ruby
nobuoka has quit [Quit: Leaving...]
jdar has joined #ruby
matthewm has quit [Ping timeout: 248 seconds]
<jdar> Rack question: I know I could configure stdlib Logger to go to a file instead of 'rack.errors'… but is there a subscriber pattern that is common?
<pskosinski> pythonists are crawling
<shevy> hybris lol
<shevy> ok that's it, I must learn rails. it's no fun to rant against it without knowing it very well
thone_ has joined #ruby
<shevy> gem install rails
joshman_ has joined #ruby
<shevy> File not found: lib
<shevy> ERROR: While generating documentation for rails-3.2.9
<shevy> ... MESSAGE: exit
<shevy> well ...
<hybris> gem install lib?
<hybris> :P
pmros has quit [Quit: Konversation terminated!]
<shevy> aha
<shevy> :)
<shevy> works now
<shevy> 29 gems installed
<Mon_Ouie> Normally that's just an error for the documentation generation (because the actual rails gem contains no code), but it does install it
<shevy> hmm installing the ri documentation takes longer than the rest.... hehehe
choffstein has joined #ruby
thone has quit [Ping timeout: 265 seconds]
icole has joined #ruby
miskander has joined #ruby
icole has quit [Remote host closed the connection]
<slainer68> when trying to compile ruby 2.0.0p2 on os x with ruby-build i got a fatal error : "erb.rb:375: [BUG] vm_base_ptr: unreachable" (log : https://gist.github.com/4398742)
<slainer68> does somebody know the problem?
<slainer68> thanks
<hybris> yeah shevy, I was originally trying to learn rails on a windows computer, it install ri docs for about 20 minutes before i ctrl+c'd lol
Coeus has joined #ruby
<yxhuvud> slainer68: I'd guess ruby-core oslt would be a better place to place that question. There are probably more people with the relevant experience there.
<slainer68> yxhuvud: ok i'll try
LouisGB has quit [Ping timeout: 252 seconds]
rismoney has joined #ruby
freeayu has quit [Ping timeout: 260 seconds]
rippa has joined #ruby
mpfundstein has quit [Ping timeout: 264 seconds]
nomenku__ has joined #ruby
nomenkun has quit [Ping timeout: 265 seconds]
michaelhf has quit [Remote host closed the connection]
freeayu has joined #ruby
nomenkun has joined #ruby
Timao has quit []
daniel_- has joined #ruby
beiter has quit [Quit: beiter]
fomatin has joined #ruby
jeffreybaird has joined #ruby
ltsstar has joined #ruby
nomenku__ has quit [Ping timeout: 248 seconds]
yacks has joined #ruby
regedarek has joined #ruby
icole has joined #ruby
Phoop has quit [Quit: Phoop]
chimkan has joined #ruby
landho has joined #ruby
Vivid_ has joined #ruby
assurbanipal has joined #ruby
chimkan has quit [Quit: chimkan]
freeayu has quit [Remote host closed the connection]
flock has left #ruby ["Leaving"]
banister`sleep has joined #ruby
sayan has quit [Read error: Connection reset by peer]
jsmonkey has quit [Ping timeout: 245 seconds]
withnale has joined #ruby
withnale has quit [Remote host closed the connection]
AndChat- has joined #ruby
<shevy> wow already on 2.0.0
<shevy> and I only recently compiled 1.9.3-p362 ...
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
withnale has joined #ruby
dr_neek has quit [Quit: dr_neek]
vvlad has quit [Quit: i <3 pork (http://dev.ojnk.net)]
tanathos has quit [Ping timeout: 260 seconds]
<jdar> I am considering setting up a loop to continuously read from a stream (the "rack.errors" stream)… is there something smarter I could be doing?
Virunga has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 252 seconds]
bean has joined #ruby
<withnale> if I want to install a gem, how can I ensure that a dependency (that is already met) is not upgraded to it's latest version?
Zoup has joined #ruby
<Sou|cutter> withnale: it won't be unless the gem you're install requires it
<jdar> withnale: if using bundler, you can set with "= 3.2.8"
nimred has quit [Ping timeout: 255 seconds]
<withnale> this is from the command line...
<withnale> hmmm. I've checked all the dependencies.
Asher has quit [Quit: Leaving.]
<Sou|cutter> so is this actually a problem, or just a fear?
chimkan has joined #ruby
kjellski has quit [Ping timeout: 244 seconds]
<withnale> it's a problem. I want to use netscaler-cli but it's a bit out of date and uses v1 of savon...
_64k has quit [Quit: _64k]
elsifaka has quit [Quit: Veloma e!]
<withnale> savon last month moved to 2.0.x and changed it's interface.
<withnale> I thought I could just do gem install -v 1.2.0 savon && gem install netscaler-cli
kjellski has joined #ruby
<Sou|cutter> withnale: works for me
<Sou|cutter> I get the old savon, but it does look like you get a newer nori
<Sou|cutter> is that the problem?
arturaz has quit [Remote host closed the connection]
<withnale> yes. I'm trying to then use gem->fpm on them..
thatguycraig has joined #ruby
nwertman has joined #ruby
Chryson_ has quit [Quit: Leaving]
kjellski has quit [Read error: Connection reset by peer]
<withnale> so subdependencies are reevaluated when you do a gem install??
Michael has joined #ruby
Guest50783 has quit [Read error: Connection reset by peer]
browndawg has joined #ruby
Michael is now known as Guest98100
<withnale> if I am trying to install A when depends on B which depends on C...
<cirwin> withnale: use bundler to get visibility into what's going on
Chryson has quit [Quit: Leaving]
<cirwin> just put the three gems in your Gemfile, locked to the versions you want
<cirwin> and run bundle install
jdar has quit [Quit: jdar]
dr_neek has joined #ruby
<withnale> if I already have a supported version of B but the most recent version of B uses a newer version of C, I will end up with two versions of C installed?
nimred has joined #ruby
nimred has quit [Changing host]
nimred has joined #ruby
<cirwin> withnale: if it explicitly depends on the newer version, yes
_64k has joined #ruby
<withnale> gem dependency netscaler-cli ..... savon (>= 0.9.2)
<Sou|cutter> 1.2.0 should meet that.. not sure what deps are forcing higher versions of other things though. hmm
lolcathost has joined #ruby
<withnale> there is a 2.0.2 available that will pull in newer.
<withnale> but I thought if I preinstall savon 1.2.0 it wouldn't have to worry about savon's changed dependencies
skcin7 has joined #ruby
jdar has joined #ruby
<withnale> gem dependency savon -v 2.0.2 .... wasabi (~> 3.0.0)
<atyz> You could always just edit the gem and specify the dependencies of the gem you're using
<withnale> gem dependency savon -v 1.2.0
<atyz> maybe you'll be lucky and it will work with other versiosn
anders__ has joined #ruby
busybox42 has joined #ruby
<withnale> gem dependency savon -v 1.2.0 ... wasabi (~> 2.5.0)
<anders__> is_int() in ruby is what?
mafolz has quit [Remote host closed the connection]
<anders__> I need to ensure the right datatype is set
<Sou|cutter> withnale: I hesitate to say this, but maybe this is a bug with gem dependency resolution
<withnale> so if i do gem install -v 1.2.0 savon && gem install netscaler-cli I end up with two versions of wasabi
mercwithamouth has joined #ruby
<Sou|cutter> feels like everybody is using bundler now, so maybe it is overlooked or something... I see no reason why you're getting some of those deps
dsdeiz has joined #ruby
pwelch has joined #ruby
<withnale> going to try using graphviz to see if there is something I'm missing
mybrainis301 has joined #ruby
<matip__> is there a method to catch for example all the upper case letters after "#" in "foo#A bar#B zaz#C xux#T pop#Q", between "bar#B" and "xux#T"
<matip__> ?
mybrainis301 has quit [Remote host closed the connection]
mybrainis404 has joined #ruby
<matip__> m = text.scan /bar\#(\w+) (?:\s\w+\#(\w+))* \sxux\#(\w+)/ix
<matip__> for example ^
<matip__> (it doesn't work exactly the same way, but I'm afraid it's not possible...
fteem has quit [Ping timeout: 248 seconds]
lolcathost has quit [Quit: brb]
LouisGB has joined #ruby
<matip__> > "foo#A bar#B zaz#C xux#T pop#Q".scan /bar\#(\w+) (?:\s\w+\#(\w+))* \sxux\#(\w+)/ix
<matip__> => [["B", "C", "T"]]
<matip__> in this case it works, but if I add another part between bar and xux, it doesn't:
fomatin has quit [Quit: Computer has gone to sleep.]
dmiller has joined #ruby
<matip__> > t = "foo#A bar#B test#Y zaz#C xux#T pop#Q".scan /bar\#(\w+) (?:\s\w+\#(\w+))* \sxux\#(\w+)/ix
<matip__> => [["B", "C", "T"]]
dmiller has quit [Remote host closed the connection]
<matip__> (the result should be B, Y, C and T)
dmiller has joined #ruby
choffstein has quit [Remote host closed the connection]
<hoelzro> does Ruby's regex engine not support look-behind?
jdar has quit [Quit: jdar]
<matip__> how would it help anyway?
<hoelzro> t[/bar.*xux/].scan /(?<=#)[A-Z]/
<hoelzro> matip__: ^^
<hoelzro> (t is the string)
Goles has joined #ruby
<hoelzro> if you want to include xux#T:
<hoelzro> t[/bar.*xux#[A-Z]/].scan /(?<=#)[A-Z]/
<matip__> ohh
<matip__> ah, ok, wait.. you're matching two times
<hoelzro> yeah
<matip__> yeah, it's easy in that way :P
<hoelzro> indeed ;)
enroxorz-work has quit [Read error: Connection reset by peer]
<matip__> you don't even need look-behind
<matip__> the challenge was to do that in one match, but as I said I don't think it can be done
nwertman has quit [Ping timeout: 260 seconds]
<shevy> hmm do you guys think it would be easy to make simple browser games with ruby on rails?
<hoelzro> depends on the game
<matip__> here is a simplified version:
<matip__> > "A B C D".scan /(A)(\s\w)+\s(D)/x
<matip__> => [["A", " C", "D"]]
<matip__> it should have been /(A)(?:\s(\w))+\s(D)/x **
tenmilestereo has quit [Quit: Leaving]
lazyPower has joined #ruby
sirecote has quit [Remote host closed the connection]
icole has quit [Remote host closed the connection]
pothibo has joined #ruby
assurbanipal has quit [Remote host closed the connection]
mahmoudi_ has joined #ruby
<lazyPower> Correct me if i'm wrong, but i can call any method via its symbol from within the class correct? example i have a need to call a method dynamically, :#{enqueue} and :#{enqueue_delay} would call their respective methods?
mercwithamouth has quit [Ping timeout: 255 seconds]
rondale-sc has joined #ruby
carlyle has quit [Remote host closed the connection]
aedorn has joined #ruby
baphled has joined #ruby
rondale-sc has quit [Client Quit]
reppard has quit [Ping timeout: 245 seconds]
<lazyPower> self.send(:#{method}) rather
<banister`sleep> lazyPower: or just: send(method)
track7 has quit [Read error: Connection reset by peer]
fomatin has joined #ruby
<lazyPower> oh, so the self. is non required, and i dont need to symbolize the method call?
<banister`sleep> string is fine
<lazyPower> mind = blown
stevechiagozie has quit [Quit: Lost terminal]
track7 has joined #ruby
<lazyPower> banister`sleep, also - i can pass arguments along with that call by just adding (somearg)?
cj3kim has quit [Quit: This computer has gone to sleep]
<banister`sleep> lazyPower: send(method, arg1, arg2, arg3, &block)
<lazyPower> ah! ok. Thank you so much.
megharsh has joined #ruby
Noldorin has joined #ruby
berserkr has joined #ruby
pcarrier has quit []
mrdtt has joined #ruby
daniel_- has quit [Ping timeout: 252 seconds]
blaxter has quit [Quit: foo]
emocakes has joined #ruby
banister`sleep is now known as banisterfiend
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
_nitti has joined #ruby
slash_nick has joined #ruby
sie has joined #ruby
atmosx has joined #ruby
<sie> Do rubygems implement require hooks?
<yfeldblum> sie, what's a "require hook"?
__BigO__ has joined #ruby
<sie> Well I think the name explains itself. I'd want to execute my code whenever x is required.
Guest98100 has quit [Remote host closed the connection]
<shevy> you can do that in ruby code
<shevy> so it is up to the library in question whether it makes use of it or not
<shevy> haha :) Mon_Ouie is famous:
<sie> ?
<shevy> Thanks to Mon_Ouie, the solution is:
carlyle has joined #ruby
miskander has quit [Quit: miskander]
postmodern has quit [Quit: Leaving]
lenovodroid has joined #ruby
hoelzro is now known as hoelzro|away
Noldorin has quit [Quit: Computer has gone to sleep.]
<aedorn> well, once you get over the pains of installing it and getting it working smoothly ... gitlab is pretty good
danneu has joined #ruby
<shevy> sounds like sex
<shevy> though I am not even sure what gitlab actually is... sounds like a laboratory with git geeks
<aedorn> it's the open source alternative to github
krawchyk has joined #ruby
lolcathost has joined #ruby
<shevy> oh
<aedorn> company has weird control issues and doesn't like spending money so ... I'm glad it exists.
slash_nick is now known as slash_working
Michael has joined #ruby
Michael is now known as Guest90422
jerius has quit []
dankest has joined #ruby
<seanstickle> I have weird control issues too. I like to use software that I control.
<seanstickle> Not software in the cloud that may go away if someone decides to buy it and put a bullet in its heads.
<shevy> lol
<shevy> I want to be a machine
<seanstickle> I am moderately OK with github
<shevy> then you will call me skynet
<seanstickle> Because it's built on a common standard
<shevy> or googlenet. same thing
<seanstickle> Same with Gmail.
<seanstickle> But fuck the social networks.
d2dchat has joined #ruby
jerius has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
tvw has joined #ruby
<aedorn> seanstickle: when I say weird, I mean ... the code repository machine must be in our possession .... but it's perfectly acceptable to toss all the data we use on the cloud
<aedorn> I'm pretty sure it's some fight at the higher levels .. one side wants to embrace it, the other side says no... it's the only thing that makes any sense
<shevy> hehe
fteem has joined #ruby
dr_neek has quit [Quit: dr_neek]
reppard has joined #ruby
<aedorn> well, that's okay.. other than that one thing I can pretty much do whatever I want. It evens out somehow
carlyle has quit [Remote host closed the connection]
lolcathost has quit [Quit: leaving]
<aedorn> alright, guess I need to figure out why 1.9.3 p362 causes segfaults and 327 doesn't
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
Nss has joined #ruby
Nss has quit [Remote host closed the connection]
Artheist_ has joined #ruby
lolcathost has joined #ruby
Vivid_ has quit [Remote host closed the connection]
filipe has quit [Remote host closed the connection]
woolite64 has joined #ruby
blazes816 has joined #ruby
friskd has joined #ruby
zeade has joined #ruby
<Hanmac> shevy: http://www.ruby-forum.com/topic/4409391 << " How to deactivate RubyGems? " oO
maletor has joined #ruby
pcarrier has joined #ruby
reppard has quit [Ping timeout: 255 seconds]
arturaz has joined #ruby
skcin7 has quit [Quit: Computer has gone to sleep.]
carlyle has joined #ruby
dmiller has quit [Remote host closed the connection]
marr has joined #ruby
mockra has joined #ruby
pwelch has quit [Quit: pwelch]
kokainepizza has joined #ruby
sailias has quit [Quit: Leaving.]
sailias has joined #ruby
kjellski has joined #ruby
lolcathost has quit [Quit: brb gaize!!1]
<atmosx> is there a heroku-like setup for private servers?
BoomCow has joined #ruby
<atmosx> like, writing an app locally and push changes to a remote server which will "run" them?
<atmosx> without having to restart manually the session?
<eka> atmosx: look at OpenStack
<atmosx> I have a ready nginx+unicorn setup
nomenkun has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
icole has joined #ruby
jonathanwallace has quit [Ping timeout: 265 seconds]
datura has joined #ruby
hotovson has joined #ruby
koshii has quit [Ping timeout: 250 seconds]
<atmosx> ah no way it's way too complicated.
<atmosx> I'll just ssh and type a few lines..
dhruvasagar has joined #ruby
<Mon_Ouie> shevy: Just for the record, that's because he asked the question here too :p
snowflight has quit [Quit: snowflight]
jerius has quit []
voodoofish has quit [Ping timeout: 244 seconds]
dankest is now known as dankest|away
jerius has joined #ruby
dankest|away has quit [Quit: Leaving...]
boomcow_2 has joined #ruby
icole has quit [Ping timeout: 255 seconds]
dspp has joined #ruby
red5 has joined #ruby
mrdtt has quit [Quit: mrdtt]
hotovson has quit [Ping timeout: 248 seconds]
jerius has quit [Client Quit]
red5 has left #ruby ["WeeChat 0.3.7"]
lolcathost has joined #ruby
BoomCow has quit [Ping timeout: 250 seconds]
statarb3 has quit [Ping timeout: 248 seconds]
jerius has joined #ruby
datura has quit [Quit: This computer has gone to sleep]
mahmoudi_ has joined #ruby
jgrevich has joined #ruby
kjellski_ has joined #ruby
lolcathost has quit [Client Quit]
carlyle has quit [Remote host closed the connection]
jduan1981 has joined #ruby
x82_nicole has joined #ruby
Quintus_q has joined #ruby
koshii has joined #ruby
kjellski has quit [Ping timeout: 250 seconds]
boomcow_2 is now known as BoomCow
dspp has quit [Quit: Lost terminal]
dhruvasagar has quit [Read error: Connection reset by peer]
francisfish has quit [Remote host closed the connection]
emocakes has quit [Quit: emocakes]
emocakes has joined #ruby
voodoofish has joined #ruby
miskander has joined #ruby
skcin7 has joined #ruby
nga4 has joined #ruby
nyuszika7h has quit [Read error: Connection reset by peer]
nyuszika7h has joined #ruby
lolcathost has joined #ruby
<shevy> Mon_Ouie heheh nice
<shevy> Hanmac hahahaha :D
<shevy> ruby --disable-gems
<shevy> awesome
<shevy> atmosx the way of the least resistance eh?
<atmosx> exactly
Guest90422 has quit [Remote host closed the connection]
<shevy> I like it a lot
nyuszika7h has quit [Read error: Connection reset by peer]
dmiller has joined #ruby
<shevy> but sometimes one has to push-force the way through
<shevy> like when you are on the frontier somewhere
<shevy> ruby 2.0 code
<shevy> mruby
dankest has joined #ruby
<Hanmac> what will happen when sommer next year ruby1.8 dies (painfuly) and OSX still does not provide an newer system ruby? :P
chrstphrhrt has joined #ruby
<shevy> I think they will switch
<shevy> or they will stay with the old one
<shevy> but who uses OSX anyway
otters has quit [Ping timeout: 260 seconds]
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
Quintus_q has left #ruby ["Valete!"]
gener1c has joined #ruby
gener1c has quit [Changing host]
gener1c has joined #ruby
sayan has joined #ruby
<gener1c> is there a framework for makeing mobile games with ruby? (mobile as in ios and android)
Noldorin has joined #ruby
<Hanmac> i think osx users choices there punischment :P
<gener1c> gosu for ios or android...
dmiller has quit [Read error: Operation timed out]
kenneth has quit [Quit: kenneth]
jsonperl has joined #ruby
<jsonperl> Does "make install" upgrade a previous ruby version?
kjellski_ has quit [Quit: This computer has gone to sleep]
<jsonperl> I'm thinking bout upgrading to p362
otters has joined #ruby
jduan1981 has quit [Quit: jduan1981]
slainer68 has quit [Remote host closed the connection]
<Hanmac> jsonperl it seems that p362 is tainted
<jsonperl> oh noes
<jsonperl> really?
<jsonperl> p327 is still the preference for now?
<eka> p362 tainted? how?
snowflight has joined #ruby
<eka> jsonperl: there is not much difference unless you hit a bug in p327
<shevy> it has tainted mojo
benlieb has joined #ruby
<jsonperl> i hate tainted mojo
mpfundstein has joined #ruby
<jsonperl> totally the worst kind of mojo
<shevy> hmm jsonperl "make install" should just install from the Makefile in the directory you are in
<eka> what's that?
* eka is totally lost
<shevy> if you use the same prefix, i.e. into /usr, then earlier files can get overwritten
lazyPower has quit [Ping timeout: 260 seconds]
<shevy> for .so files, this is usually no problem because the so-suffix name is different
atyz has quit [Quit: Leaving...]
<shevy> a problem is libruby-static.a though
<atmosx> I don't know of anyone who relies on the pre-installed ruby version of osx
<shevy> /Programs/Ruby/1.8.7p370/lib/libruby-static.a /Programs/Ruby/1.9.3p362/lib/libruby-static.a
<atmosx> for no reason
<jsonperl> do you have any suggestions on upgrade procedures?
<eka> Hanmac: thx
<jsonperl> this is linux bteedubs
<shevy> the way this gets solved is usually by different directory names
<shevy> ack :( a segfault, that's bad
BoomCow has quit [Read error: Connection reset by peer]
<eka> tainted wouldn't be when done on purpose? e.g.: source codebase hacked or whatever?
voodoofish430 has joined #ruby
thatguycraig has quit [Quit: Leaving.]
BoomCow has joined #ruby
atyz has joined #ruby
nyuszika7h has joined #ruby
chrstphrhrt has left #ruby [#ruby]
hybris has quit [Read error: Connection reset by peer]
_alejandro has joined #ruby
browndawg has quit [Quit: Leaving.]
_64k has quit [Quit: _64k]
vlad_starkov has quit [Remote host closed the connection]
lazyPower has joined #ruby
otters has quit [Ping timeout: 252 seconds]
<shevy> yeah I would not use the word tainted for segfaults
<shevy> I'd say... it's horribly broken :P
<jsonperl> balls
mguy_ has quit [Quit: leaving]
gnul0ver has joined #ruby
gnul0ver has quit [Client Quit]
<jsonperl> ruby 1.9.3p362 (2012-12-25 revision 38607) [i686-linux]
<shevy> jsonperl well said :)
<jsonperl> here goes nothin
<shevy> it does not work?
DrShoggoth has quit [Ping timeout: 248 seconds]
mguy has quit [Quit: leaving]
dyrot has joined #ruby
snowflight has quit [Quit: snowflight]
<shevy> hmm I see the future
<shevy> RubyOS will be famous for its segfaults
burgestrand has quit [Quit: Leaving.]
pwelch has joined #ruby
kenneth has joined #ruby
rking has quit [Quit: Upgrading weechat]
__BigO__ has quit [Remote host closed the connection]
rking has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
sailias has quit [Quit: Leaving.]
jds has joined #ruby
tvw has quit [Remote host closed the connection]
<shevy> but who wants to go back to C :(
dsdeiz has quit [Remote host closed the connection]
kjellski has joined #ruby
fomatin has quit [Quit: Textual IRC Client: www.textualapp.com]
<kenneth> shevy: C's awesome :)
<jsonperl> c is...
berserkr has quit [Quit: Leaving.]
<jsonperl> ok
<jsonperl> its certainly fast :)
kil0byte has quit [Remote host closed the connection]
<shevy> yeah but other than the speed?
kjellski_ has joined #ruby
<kenneth> memory efficiency
<kenneth> efficient data structure
thatguycraig has joined #ruby
<kenneth> using exactly what you need and no more
<kenneth> less weird behavior
reppard has joined #ruby
<kenneth> (because less magic)
tvw has joined #ruby
<kenneth> more portability
<jsonperl> writing a web app with c would probably inflate my prices a bit ;)
<kenneth> not saying we should all go back to writing C, but it's still one of my favorite programming languages and got a LOT of things right
<seanstickle> I think my favorite programming language is APL
<seanstickle> Gots tons right.
kjellski has quit [Ping timeout: 244 seconds]
<seanstickle> Still neglected
dmiller has joined #ruby
_64k has joined #ruby
<eka> Ruby is awesome… just sayinn
<eka> kenneth: good at C? you are core committer to Ruby?
kjellski_ has quit [Ping timeout: 255 seconds]
<shevy> less weird behavior - one can say so only because there are worse alternatives. like C++
<shevy> :D
atyz has quit [Quit: Leaving...]
<lupine> ?
DaltonUS has joined #ruby
<kenneth> shevy: i've had random bugs in ruby that took me forever to debug, only to find out the GC randomly decided to not release my stuff
<kenneth> or release it too soon
<lupine> C is a perfectly reasonable language, the runtime/develop-time tradeoff is just a bit different
dmiller has quit [Ping timeout: 244 seconds]
jduan1981 has joined #ruby
<jsonperl> i write ruby 10 times faster than c
<jsonperl> and drop into c for performance
<jsonperl> and then segfault all over myself
daniel_- has joined #ruby
<kenneth> the performance c code can typically run at a factor of 10-100x faster than MRI
dmiller has joined #ruby
<jsonperl> at least
<jsonperl> yep
<Hanmac> "Ruby: You shoot yourself in the foot and then have to justify it to all your friends who are still naively using Perl. "
<jsonperl> ive achieved 500x improvements on some stuff
<shevy> you can misuse every language
<shevy> the only real argument I see is speed
<kenneth> well, what about features that just aren't available in ruby?
<eka> shevy: speed and elegance ;)
<kenneth> like, say, threading
KernlPanic has joined #ruby
<Hanmac> i use bindings so i get the speed from C/C++ with the nice syntax magic from ruby
<KernlPanic> hi guys!!
<shevy> we would need a ruby-like language (but simpler), able to reach close to the speed of C
<seanstickle> scheme!
<lupine> kenneth, threading is available in ruby
<kenneth> lupine: with the GIL threading in ruby is not real threading
<KernlPanic> I have to deploy an ruby on rails application..I built the app and I need to put on production server...wich method you syggest me? thanks
<lupine> so use a non-gil ruby
<lupine> I do
reppard has quit [Ping timeout: 265 seconds]
<kenneth> unless you use JRuby, i guess, but don't get me started on the JVM
tk___ has quit [Quit: ばいばい]
<lupine> rubinius is apparently GIL-less
sn0wb1rd has joined #ruby
<lupine> but not all my tests pass yet
<lupine> so we're still on jruby
<shevy> isn't rubinius dead after the main developer abandoned it?
<kenneth> is that for real? i thought they were still working on that but it was nowhere near production ready
<jsonperl> evan works at living social now
<jsonperl> but another dev is on it at engine yard
<lupine> > 1.0 so must be production ready
<lupine> otherwise it'd be < 1.0
<lupine> ruby people *never* mess up versioning. trufact
fteem has quit [Ping timeout: 248 seconds]
mjolk2 has quit [Quit: This computer has gone to sleep]
dyrot has quit [Ping timeout: 246 seconds]
kjellski has joined #ruby
wallerdev has joined #ruby
jrajav has joined #ruby
snowflight has joined #ruby
berserkr has joined #ruby
<shevy> well, projects often change when other people take over. like shoes is not the same anymore without _why
<shevy> gobolinux did not survive the takeover either :(
<lupine> rubinius had a change of leadership?
<shevy> dunno the rest of the team
arietis has joined #ruby
<kenneth> c has gotten a lot more elegant recently
<Hanmac> C++11 is more elegant ..
<shevy> lol
<lupine> did they remove all the features?
<kenneth> especially with some of the stuff apple has been doing
<shevy> the grey pig calls the black pig ugly
<Hanmac> but there are new evil functions too
Virunga has joined #ruby
<lupine> the main feature of c++ I use is default function arguments
<kenneth> lib blocks and lib dispatch are AWESOME
<Hanmac> like marking a class as final
danneu has quit [Ping timeout: 252 seconds]
<lupine> for everything else, there's a C idiom
<Hanmac> lupine i use function templates for evil
<lupine> yes, they are pretty evil
<kenneth> Obj-C is a much better OO C than C++ though!
<jsonperl> later dudes
jsonperl has left #ruby [#ruby]
<lupine> never used objective c
<lupine> #AIUI, though, the "C" part of the name is a lie
<kenneth> #AIUI?
<lupine> "as I understand it". the # was a typo
<kenneth> but lupine, the C part of the name is much less of a lie than in C++ :)
<kenneth> lupine: Obj-C is a strict superset of C. any C code is valid Obj-C, and Obj-C doesn't change any fundamental C concept
<lupine> I obviously don't understand it well ^^
<_nitti> pfft
<_nitti> obj-c is just c
<kenneth> lupine: not true of C++
<_nitti> c with a runtime
<Hanmac> lupine Obj-C is from apple, what did you expected?
<lupine> that i'd want to avoid it, obviously
Michael has joined #ruby
<kenneth> _nitti: and a compiler with some added features
robustus has quit [Quit: ZNC - http://znc.in]
Michael is now known as Guest57351
<kenneth> i love how we're having a discussion about c in #ruby btw
* lupine was writing a c ruby extension t'other day. quite enjoyable
sepp2k has quit [Ping timeout: 265 seconds]
<Hanmac> "Python You create a gun module, a gun class, a foot module, and a foot class. After realizing you can't point the gun at the foot, you pass a reference to the gun to a foot object. After the foot is blown up, the gun object remains alive for eternity, ready to shoot all future feet that may happen to appear. "
robustus has joined #ruby
<Hanmac> lupine writing an c ruby extension in C++ is more fun :D
jduan1981 has quit [Quit: jduan1981]
alexwh has joined #ruby
bricker has joined #ruby
alexwh is now known as Guest30535
<shevy> kenneth well C is the future... mruby... is like embedded ruby... but you can only embed it if you know C :(
<lupine> pointless for me, since I was wrapping a c library ^^
<lupine> now all I need to do is get a void * from my extension to another, via some smoke bindings
<kenneth> oh in other news
<kenneth> i just wrote a ruby version of lisp's let statement
<kenneth> fuck yeah for dynamic languages
<Hanmac> shevy: so the past is the future ... interesting cycled map of time :P
<kenneth> although it's a little shady the way it's done
<kenneth> so i probably shouldn't ever use it inproduction
<shevy> pfffft (lisp(man(even(C(is(better
<lupine> eh, they're for different things
<shevy> Hanmac I think the underlying hardware influences a lot of the design
woodlee has joined #ruby
<lupine> or are for all machines that aren't lisp hardware machines
<Hanmac> shevy even ASM is better whan Lisp :P
<shevy> yeah lupine
<lupine> lisp is a perfectly fine language, I just can't think in it
<shevy> one car uses gasoline, the other one uses sunlight
<lupine> not consistently, anyway
Guest57351 has quit [Remote host closed the connection]
zastern_ has joined #ruby
aces23up has quit []
<shevy> you are faster with the gasoline, but cheaper with the sunlight
woodlee has quit [Remote host closed the connection]
_set has quit [Quit: Lost terminal]
<shevy> we just need better hardware
<mpfundstein> lupine: u can learn that
<lupine> I'd rather not, in all honesty
<mpfundstein> hanmac: lisp and asm cant be compared
kokainepizza has quit [Quit: My pooter is sleep.]
<mpfundstein> lupine: it will come automatically. mostly after smalltalk ^^
<lupine> hardware lisp machines have an assembly language that is entirely comparable to x86 assembly
<shevy> ack smalltalk
<shevy> beautiful idea, ugly syntax
sailias has joined #ruby
<mpfundstein> lupine: i think about common lisp sry
<kenneth> shevy: lisp is fucking awesome, just a pain in the ass to use
<lupine> mpfundstein, well, if you want to focus on a single runtime, that's fine
<rismoney> if i have a string that comes back as UTF-16LE that looks like "A\x00v\x00a..etc" how do i make it readable?
otters has joined #ruby
Artheist_ has quit [Remote host closed the connection]
<mpfundstein> lupine: lets not discuss this now i have to do shopping :-)
dougireton has joined #ruby
<kenneth> shevy: macros, homoiconicity, and solid functional concepts make it awesome
<kenneth> it's just not very practical and kind of a bitch to read later on
kuranai has joined #ruby
AndChat- has quit [Ping timeout: 248 seconds]
<lupine> c-lisp compiles though, so it's a boring distinction
DrShoggoth has joined #ruby
altamic has joined #ruby
<kenneth> i'm talking about lisp as a family of languages btw, not CL. my favorite is clojure, but the jvm is a deal breaker unfortunately
<seanstickle> scheme is delightful!
<seanstickle> I find no pain in the ass there at all.
Umren has joined #ruby
_64k has quit [Quit: _64k]
<kenneth> i gave up on lisp though where i realize there'd be no way i could convince anybody at the company here to learn it
<lupine> crash bandicoot was written in lisp
amacgregor_osx has quit [Read error: Connection reset by peer]
<shevy> that's another thing
<lupine> fun aside
<shevy> lisp can be so awesome, but if you have a million different implementations, it just confuses people
<lupine> they ended up writing their own lisp dialect, including compiler, and had real trouble finding staff
<kenneth> i wrote and pushed a clojure service. i got stuck with its maintenance forever before killing it because NOBODY could even look at it and understand anything
<lupine> but, it's a solid set of games
<seanstickle> Trouble finding staff is cured by recruiting and *keeping* staff.
amacgregor_osx has joined #ruby
<seanstickle> Though many companies seem to have a problem with that.
<lupine> i probably wouldn't even apply to a job that said i'd be working in a custom dialect of lisp
<lupine> it's not an attractive prospect
<Hanmac> i uses features from C / C++ and some part of ruby for automatic generating methods with automatic type conversion and error handling ... all i need to write is macro_attr(Attr,Type) ... it sometimes does also accept values of an look-alike type
<seanstickle> I would.
<seanstickle> But I love learning new quirky things, if the pay is good.
<RubyPanther> I thought it was the lack of precedence that made smalltalk suck?
Banistergalaxy has joined #ruby
dangerousdave has quit [Quit: Linkinus - http://linkinus.com]
slainer68 has joined #ruby
<shevy> it's definitely the syntax
<shevy> x := 'aeiou'
<shevy> bye
<shevy> Io died because of this too!
<shevy> y := 42 factorial
<shevy> DIE!!!
<atmosx> weird
<atmosx> datamapper doesn't save the entries in the db..
<atmosx> wtf
<seanstickle> lack of precedence?
sepp2k has joined #ruby
<seanstickle> precedence rules are evil, and should be abolished
<seanstickle> burn them all!
<shevy> actually, a few parens are not so bad, when they make things clearer to a human
mpfundstein has quit [Ping timeout: 245 seconds]
Slivka has joined #ruby
<shevy> 3 factorial + 4 factorial between: 10 and: 100
bricker has quit [Quit: leaving]
Russell^^ has joined #ruby
Guest30535 has quit [Quit: Quitting]
<shevy> employer := aCompany
<shevy> employer = aCompany;
<shevy> hmmm
<seanstickle> I like APL's rules -- no precedence.
<seanstickle> Everything is evaluated right to left.
<shevy> java actually beats smalltalk in this example :\
mpfundstein has joined #ruby
<shevy> haha
<shevy> sounds like an arabic programming language
<shevy> seanstickle but you are kidding about APL right? you don't really like it
<seanstickle> shevy: I am not kidding about APL.
Tux-Tn has quit [Changing host]
Tux-Tn has joined #ruby
<seanstickle> shevy: it is far and away my favorite programming language
KernlPanic has quit []
<seanstickle> An elegant language for a more civilized sort of programming.
vlad_starkov has joined #ruby
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<RubyPanther> yeah, as elegant as backwards reverse Polish notation... right to left, no parens
<seanstickle> You can use parens in APL
<kenneth> i have to say i like lisp's parens
<kenneth> there's no way to get confused
Banistergalaxy has quit [Ping timeout: 248 seconds]
<seanstickle> I have a grave dislike for operator precedence
Michael has joined #ruby
bricker has joined #ruby
<kenneth> if i write 1 + 2 * 3 depending on language semantics and precedence rules, it could mean either 7 or 9
Michael is now known as Guest76141
Zoup has quit [Quit: Lost terminal]
<C0deMaver1ck> kenneth: I was talking to a coworkers boyfriend who writes Clojure... and that's what he said
<seanstickle> In APL it's just 7
<seanstickle> easy!
<C0deMaver1ck> can't tell if sarcastic or serious
<kenneth> if i write (+ 1 (* 2 3))
<kenneth> nobody's confused
danneu has joined #ruby
<C0deMaver1ck> wrap it inside a few more parens like it would be irl
Guest76141 has quit [Remote host closed the connection]
<RubyPanther> Parens are the only salve that makes LISP tolerable. It doesn't change the ugliness factor, but it at least forces it to make sense, however much it kicks and screams
Banistergalaxy has joined #ruby
<kenneth> with some good macros. parens can be made less panfuls
<kenneth> what gets really annoying is when you end up with (code (that (is (nested (like (this)))))))
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
<RubyPanther> if your paren is less than a pan full, you need to close it
<kenneth> but with a macro you can do (-> (code) (that) (is) (sequentially) (ordered) (like) (this))
pats_Toms has joined #ruby
<kenneth> with is semantically equivalent
<Hanmac> kenneth with ruby you need to look if you write "-3" or "- 3" ... the first one may be 33% faster :P
<kenneth> stupid autocorrect. painful* not panfuls
sailias has quit [Quit: Leaving.]
dankest is now known as dankest|away
ikonia has joined #ruby
kmurph has joined #ruby
wargasm1 has joined #ruby
danneu has quit [Ping timeout: 252 seconds]
soulcake has quit [Quit: ZNC - http://znc.in]
wargasm has quit [Ping timeout: 252 seconds]
yacks has quit [Ping timeout: 250 seconds]
<shevy> hmmm
<strtok> is there a reliable ruby sandbox? something that could be used for something like geordi from #c++
chriskk has joined #ruby
<Hanmac> eval-in: p "strtok"
banisterfiend has quit [Remote host closed the connection]
<Hanmac> ... no reaction from the bot? :'(
Xeago has joined #ruby
kjellski_ has joined #ruby
<strtok> oh, is eval-in like geordi ?:)
kjellski has quit [Read error: Connection reset by peer]
<strtok> when it responds i mean :)
sayan has quit [Quit: Leaving]
<pats_Toms> hi, I am new to ruby. I want to setup nokogiri. I have ruby 1.9.2 but gem installs nokogiri for 1.8.7 (as show in description)
<pats_Toms> someone have idea how to install it for 1.9.2?
alexwh has joined #ruby
chimkan has quit [Quit: chimkan]
<Hanmac> pats_Toms i think you have ubuntu right?
<pats_Toms> yes
alexwh is now known as Guest41548
<Hanmac> use gem1.9.1 or swap your default ruby with update-alternatives --config ruby (and --config gem)
bigmcq77 has quit [Quit: Textual IRC Client: www.textualapp.com]
h4mz1d has joined #ruby
<yxhuvud> I'd assume there should be some ruby-full (oslt) package that actually includes the standard distribution.
Guest41548 is now known as alexwh
marr has quit [Ping timeout: 255 seconds]
<Hanmac> yxhuvud until recent ubuntu , ruby-full and the other ruby meta packages point to the installed 1.8 version ...
_64k has joined #ruby
<pats_Toms> hmm, I run "gem1.9.1 install nokogiri" what installs ok, but when I run nokogiri -v now I got "[BUG] Segmentation faultruby 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]"
skrite has joined #ruby
<skrite> hey all
<shevy> pats_Toms ack, debian
<Hanmac> pats_Toms as i said its better to switch your default ruby with update-alternatives
<skrite> i am having a weird issue. i can gem install, gem installs, then when i require that gem, it says that it doesn't exist
<yxhuvud> I wonder why the distros always feel the need to go full retard when it comes to packaging ruby.
<pats_Toms> but I have did that before, I setup my ruby as wrote here - http://lenni.info/blog/2012/05/installing-ruby-1-9-3-on-ubuntu-12-04-precise-pengolin/
<shevy> yxhuvud because they want full control. they regard rubygems as an opponent to their profit scheme
jds has quit [Remote host closed the connection]
jduan1981 has joined #ruby
statarb3 has joined #ruby
<pats_Toms> skrite: are you installing gems with sudo?
jds has joined #ruby
<shevy> pats_Toms, "nokogiri -v" # Nokogiri (1.5.5) works here
nomenkun has joined #ruby
<shevy> ruby 1.8.7 (2012-06-29 patchlevel 370) [i686-linux]
<pats_Toms> but I have 1.9.2 ruby
<pats_Toms> ruby version shows that
<shevy> ok let's see
reppard has joined #ruby
<shevy> unable to convert U+2019 from UTF-8 to US-ASCII for lib/nokogiri.rb, skipping
<shevy> encoding so fucking sucks...
jearvondharrie has joined #ruby
jearvondharrie has quit [Client Quit]
<shevy> nokogiri -v # Nokogiri (1.5.5)
<shevy> ruby 1.9.3p362 (2012-12-25) [i686-linux]
<shevy> here we go pats_Toms
<shevy> but I switch back to 1.8.7, encoding gives me zero advantages and only some non-working scripts
<shevy> pats_Toms you can try to find the nokogiri gem
<shevy> extract it, then install from within that directory
<shevy> there should be a log file stating the error
lazyPower has quit [Quit: Leaving]
<pats_Toms> ok, momento
<shevy> or you can tell the debian guys to stop breaking people's ruby
<lupine> ><
<pats_Toms> I need to find error log? http://sprunge.us/AQFJ
<pats_Toms> or I get wrong
mahmoudi_ has joined #ruby
<yxhuvud> that nokogiri is installed for ruby 1.8, whihc is obviously wrong in your case.
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_sta_ has joined #ruby
<pats_Toms> yes, I know that, my first question was
<pats_Toms> why gem is installing wrong version for me? :d
wermel has quit [Remote host closed the connection]
vlad_sta_ has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
<lupine> maybe it's gem1.8 vs. gem1.9
reppard has quit [Ping timeout: 264 seconds]
_alejandro has quit [Remote host closed the connection]
<lupine> under debian, /usr/bin/gem will be a symlink to one or t'other, as /usr/bin/ruby is too
<Signum> Newbie here… I want to use the trello.com API and thus did "gem install ruby-trello". But for some reason I can't "require 'Trello'" in the 'irb' as described in http://rubydoc.info/gems/ruby-trello/0.4.4.1/frames. What am I doing wrong?
<lupine> just install libnokogiri-ruby1.8 and libnokogiri-ruby1.9 packages, I guess
JMcAfreak has joined #ruby
<pats_Toms> I have changed my GEM_HOME
kmurph has quit [Quit: kmurph]
<lupine> that's ok, the debian packages aren't gems
Xeago has quit [Remote host closed the connection]
<pats_Toms> hmm, nokogiri is not working anyway
<pats_Toms> I am feeling like trololo because that nokogiri what I have is for 1.8.7 as I know
<pats_Toms> and I really can't understand how that package will help me
adambeynon has joined #ruby
jds has quit [Remote host closed the connection]
Noldorin has quit [Quit: Computer has gone to sleep.]
jds has joined #ruby
soulcake has joined #ruby
<lupine> well, where is your ruby1.9 from?
<lupine> rvm? system ruby? something else?
kiyoura has joined #ruby
<pats_Toms> ruby is prom apt repo
<pats_Toms> *debian repo
<lupine> require 'nokogiri' will work if you install the libnokogiri-ruby1.9 package
<lupine> and you won't need rubygems loaded to make it work either
slash_working has quit [Ping timeout: 252 seconds]
teh4 has joined #ruby
<pats_Toms> seems like you have true, ,lupe
<pats_Toms> big thanks about support
slash_working has joined #ruby
<lupine> don't fight the packaging if you can avoid it ^^
jds has quit [Ping timeout: 255 seconds]
bean has quit [Quit: Computer has gone to sleep.]
<lupine> if you want to use gem extensively in debian, I'd generally avoid system ruby and rubygems, and use an rvm'd one instead
_nitti has quit [Remote host closed the connection]
<pats_Toms> rvm?
TheFuzzball has joined #ruby
<lupine> but quite a few common libraries are packaged as debs, and so usable trivially with system ruby
<lupine> ruby version manager
<lupine> there's also rbenv
<lupine> maybe others
<lupine> they do all the legwork of installing and managing ruby versions into your home directory
atyz has joined #ruby
<lupine> certainly for development, something like that is fairly invaluable
ebouchut has joined #ruby
kmurph has joined #ruby
atyz has quit [Client Quit]
<aedorn> wish I saw this bug earlier: https://bugs.ruby-lang.org/issues/7629 ... would have saved me hours of annoyance
Umren has quit [Read error: Connection reset by peer]
nemesit has quit [Quit: Leaving...]
jds has joined #ruby
banisterfiend has joined #ruby
krawchyk has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
<aedorn> Chef/Puppet for ... 7-10 servers and 60-80 machines behind them?
jdar has joined #ruby
burgestrand has joined #ruby
danneu has joined #ruby
Morkel_ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
statarb3 has quit [Ping timeout: 244 seconds]
melkor has joined #ruby
Goles has quit [Read error: Connection reset by peer]
Goles has joined #ruby
<melkor> Did ruby change the syntax of while loops between 1.9 and 1.8?
snowflight has quit [Quit: snowflight]
<banisterfiend> melkor: what syntax were u using in 1.8 that no longer works in 1.9
<melkor> I'm going through the Humble Little Ruby Book, and when I do a while I have to use do.
Morkel has quit [Ping timeout: 265 seconds]
Morkel_ is now known as Morkel
AltGrendel has joined #ruby
moos3 has joined #ruby
<lupine> there are some backward-incompatible syntax changes, but none in while AFAIK
<lupine> #test case? :)
<kenneth> i don't understand why let isn't a part of native ruby syntax
<kenneth> this is my half assed attempt at it
<kenneth> i'm still looking for a hack that won't require instance eval
<lupine> kenneth, you might want LetProxy to be a blankslate
fomatin has joined #ruby
toekutr has joined #ruby
<lupine> or whatever it is they call it nowadays
dougireton has quit [Quit: Leaving.]
<kenneth> yeah i thought about that, i heard those were shady though
<lupine> BasicObject
tenmilestereo has joined #ruby
<yxhuvud> kenneth: because you are supposed to make small enough methods that you don't need them.
Goles has quit [Ping timeout: 260 seconds]
_nitti has joined #ruby
<lupine> I've used 'em in places, they just work
<melkor> lupine: http://pastie.org/5590245
<banisterfiend> kenneth: that's yucky
<banisterfiend> kenneth: watch this
<banisterfiend> def let; yield; end
<lupine> melkor, it'll be that :
<lupine> I've never seen a while loop do that, but it used to be valid in case
pzol has left #ruby ["Sayonara!"]
<banisterfiend> kenneth: let { |x=10, y=20| x * y } #=> 200
<lupine> (case x ; when 1 : y ; end
<kenneth> oh shit, banisterfiend… did not even think of that
statarb3 has joined #ruby
jds has quit [Remote host closed the connection]
chimkan has joined #ruby
mpfundstein has quit [Ping timeout: 265 seconds]
<melkor> lupine: thanks, I was replacing the colon with do and it was working fine.
<lupine> anyway, the infrastructure is more lines than the code
Goles has joined #ruby
<lupine> conclusion: it's not worth it ^^
altamic has quit [Quit: altamic]
pabloh has joined #ruby
IceDragon has joined #ruby
<kenneth> banisterfiend: this is awesome. this makes me happy
<banisterfiend> kenneth: 1.9+ only though
<kenneth> i'm okay with that
Diranged has joined #ruby
<kenneth> i've been 1.9+ for a year now
moos3 has quit [Quit: Computer has gone to sleep.]
<Diranged> im currently using this line in a ruby template file that puppet parses: <%= require "json"; Hash[combined_data.map { |elem| elem.split('=', 2) }].to_json %>
<Diranged> the problem it seems is that the array comes out in different orders sometimes.. which causes puppet to re-build the file almost every time it runs
<Diranged> is there a way to sort the output of that, so its always in the same order?
daniel_- has quit [Quit: WeeChat 0.3.9.2]
<Diranged> (its taking an array of strings in the format key=value, and turning it into a hash in the form of { 'key': 'value', 'key2': 'value2' })
<ryanf> Diranged: combined_data.sort.map ?
<Diranged> heh, didnt think of that..
<Diranged> trying it now.. probably gonna work just fine
<Diranged> well, unless the to_json is what breaks the ordering..
jgrevich has quit [Remote host closed the connection]
_64k has quit [Quit: _64k]
kirun has quit [Ping timeout: 265 seconds]
kmurph has quit [Quit: kmurph]
<lupine> well, it'll change the format of the json from a hash to an array of arrays
shevy has quit [Ping timeout: 246 seconds]
<lupine> you want an OrderedHash I guess
gyre007 has quit [Remote host closed the connection]
<melkor> wow, installing rubyracer fails because of some crap in v8.h?
<lupine> or ruby 1.9
<lupine> Diranged, don't be too upset. hash order has bitten me more than oncem,as well
<Diranged> hmm
<Diranged> what do i need to require to use orderdhash?
<lupine> there's one in activesupport
<lupine> there might be one in extlib
<lupine> or you could do your own with your own custom to_json as well
tvw has quit [Remote host closed the connection]
mpfundstein has joined #ruby
<lupine> (if constraints on what combined_data can contain are strong enough, that's not as crazy as it sounds)
jgrevich has joined #ruby
__BigO__ has joined #ruby
<lupine> the other option would be to read the existing file and only rewrite it if the read-in hash differs from the one you're about to call to_json on
jgrevich_ has joined #ruby
atno has quit [Remote host closed the connection]
datura has joined #ruby
atno has joined #ruby
jgrevich has quit [Ping timeout: 265 seconds]
jgrevich_ is now known as jgrevich
dougireton has joined #ruby
shevy has joined #ruby
dankest|away is now known as dankest
bluOxigen has quit [Ping timeout: 264 seconds]
ninegrid_ has joined #ruby
statarb3 has quit [Ping timeout: 255 seconds]
berserkr has quit [Quit: Leaving.]
<Diranged> argh i cant seem to use activerecord in a ruby template in puppet for some reason
<Diranged> not sure why..
Noldorin has joined #ruby
<ner0x> ||= is assignment but is there anything specific about it specifically?
<ner0x> Equals itself or new value?
<IceDragon> think of it as: a = x if a == nil
jds has joined #ruby
<IceDragon> or rather
<IceDragon> a = x if !!a == false
<ner0x> Ah. That makes sense.
vagnerd has quit [Quit: Leaving]
alanjc has joined #ruby
lmfao has joined #ruby
lmfao is now known as mpfundstein_home
nada has joined #ruby
<JMcAfreak> wait, ner0x said ||= while IceDragon used !!=... difference?
adambeynon has quit [Quit: Computer has gone to sleep.]
<IceDragon> no !! is short for converting objects to Bools
<IceDragon> ! == not ; !! == not not == true
nada has left #ruby [#ruby]
<JMcAfreak> yes, but what about double-pipes?
<ner0x> ruby-fu, as it were.
<IceDragon> I should have left off the !! to avoid confusion
miskander has quit [Quit: miskander]
<IceDragon> ||= is similar to saying = if nil or false
<IceDragon> a ||= x ; a = x if a == nil
<JMcAfreak> I see
<IceDragon> rather: a ||= x ; a = x if a == nil or a == false
<IceDragon> but since nil is evaluated as false I guess it doesn't make a difference
miskander has joined #ruby
<JMcAfreak> I see
Slivka has quit [Remote host closed the connection]
DrShoggoth has quit [Ping timeout: 248 seconds]
<mpfundstein_home> there was a cool blogpost about this
<mpfundstein_home> trying to find it
jds has quit [Ping timeout: 250 seconds]
coasterD has quit [Ping timeout: 276 seconds]
snowflight has joined #ruby
thecreators has joined #ruby
<Paradox> ruby is like mayonnaise
<Paradox> it goes with everything
<Paradox> and some people who are probably stupid dont like it
Virunga has quit [Remote host closed the connection]
<JMcAfreak> I hate mayonnaise
methoddk has joined #ruby
<banisterfiend> JMcAfreak: that's what she said
x82_nicole has quit [Quit: Computer has gone to sleep.]
<JMcAfreak> banisterfiend: oh, it is. It sure is
<banisterfiend> JMcAfreak: all hail squish-face!
Michael has joined #ruby
methoddk has quit [Remote host closed the connection]
<Paradox> emocakes, mayo would go with that nicely
<Paradox> mayo and lemon
Michael is now known as Guest3912
Goles has quit [Quit: Computer has gone to sleep.]
methoddk has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
<JMcAfreak> banisterfiend: that's actually what /he/ said.
chimkan has quit [Quit: chimkan]
alexspeller has joined #ruby
chimkan_ has joined #ruby
twopoint718 has joined #ruby
twopoint718 has joined #ruby
twopoint718 has quit [Changing host]
Virunga has joined #ruby
michaelhf has joined #ruby
darthdeus has quit [Quit: Leaving...]
moshee has quit [Ping timeout: 244 seconds]
twopoint718 has quit [Client Quit]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
fir_ed has quit [Ping timeout: 248 seconds]
mpfundstein has quit [Ping timeout: 248 seconds]
dfr|work has joined #ruby
methoddk is now known as coasterD
twopoint718 has joined #ruby
twopoint718 has quit [Client Quit]
statarb3 has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
jonathanwallace has joined #ruby
arietis has quit [Read error: Connection reset by peer]
pats_Toms has quit [Quit: pats_Toms]
elico has joined #ruby
oxeote has joined #ruby
marr has joined #ruby
melkor has quit [Ping timeout: 260 seconds]
<anders__> How fast can you learn ruby if you are a php programmer?
thatguycraig has quit [Quit: Leaving.]
emsilva has joined #ruby
<JMcAfreak> about as fast as anyone.
<IceDragon> depends on you.
<aedorn> like with most languages it depends on how fast you can let go of former conventions and relearn
<mpfundstein_home> anders__ coding is coding, its just a different way of thinking
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<JMcAfreak> start there
<anders__> mpfundstein_home, so how did it work out for you?
sparc_ has joined #ruby
arietis has joined #ruby
<mpfundstein_home> anders__: pretty good
<emocakes> anders__, wondering the same here
<mpfundstein_home> anders__: i went from C to Node to php to smalltalk to ruby at my work
<mpfundstein_home> anders__: and the main difference were mostly the conventions
<emocakes> anders__, it seems to be the same here, just have to use it to learn
<mpfundstein_home> anders__: and the tricks. in ruby everything is an object. this goes deep into the meta system
<emsilva> how can I get the "matches" from this text via regex? https://gist.github.com/4401866 I got to /^(.+?)(_|-).*$/ so far, but I can't get the second line to match as well without messing up with the rest of the entries. Thank you.
<mpfundstein_home> anders__: i used php mostly functional, classes not really, only for some objects. ruby gives you the full oop concept and thats cool. just different
slash_working is now known as slash_nick
<IceDragon> emsilva: i'll take a look at it
<mpfundstein_home> anders__: just get started and port some code. or challenge yourself with something easy to learn the syntax and get a feel. then get a good book like "metaprogramming in ruby"
onibox has joined #ruby
elico has quit [Remote host closed the connection]
<emsilva> IceDragon: Thank you. I think I just got it /^(.+?)(_|-|$).*$/, but I'm not 100% confident yet.
<aedorn> eloquent ruby is pretty good too if you want a book more towards the beginning
<mpfundstein_home> i assume he is a coder already who wants to learn how the language itself works
<JMcAfreak> anders__: why's poignant guide is good if you also want to get a good laugh
<anders__> Im starting with ruby now, I think Im going to do a cardgame simulator with different games such as poker, blackjack etc
<anders__> Im gonna use a lot of classes and parents
<mpfundstein_home> yeah perfect
<mpfundstein_home> dont inherit too much
michaelhf has quit [Remote host closed the connection]
<mpfundstein_home> composition is mostly better
<anders__> I already draw the structure on a paper
megharsh has quit [Ping timeout: 265 seconds]
<mpfundstein_home> you want to learn oop right?
<anders__> JMcAfreak, I bookmarked the site now
jekotia has joined #ruby
<anders__> mpfundstein_home.. well I know a little oop already, but I havn't really used it alot in practice
<anders__> you have any reccommendation on that?
<mpfundstein_home> anders__: ok. than the best way is indeed to start out with a project where you create a lot of objects. just a tip: dont inherit too much
<mpfundstein_home> anders__: learn about composition and delegates
<mpfundstein_home> anders__: if you want i can send you a book for that
<seanstickle> Yeah, basically ignore most everything written about inheritance you see in the OO books.
<slash_nick> mpfundstein_home: 5.times { +1 }
<seanstickle> Bad practices.
<mpfundstein_home> :-) , yeah , i had bad experiences already :D
lenovodroid has quit [Ping timeout: 248 seconds]
danneu has quit [Quit: WeeChat 0.3.8]
vlad_starkov has quit [Remote host closed the connection]
jds has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
datura has quit [Quit: This computer has gone to sleep]
<IceDragon> emsilva: http://rubular.com/r/NXWRLCIb5u # Not exactly what I was heading for :x
banisterfiend has quit [Ping timeout: 252 seconds]
Noldorin has quit [Quit: Computer has gone to sleep.]
kjellski_ has quit [Ping timeout: 265 seconds]
<emocakes> mpfundstein_home that metaprogramming ruby is a good book
<mpfundstein_home> emocakes: awesome book
<emocakes> reading first chapter now
<emocakes> good fun so far
<emocakes> i like his style
<mpfundstein_home> emocakes: especially the part about ActiveRecord, when everything comes together
lenovodroid has joined #ruby
ltsstar has quit [Quit: ltsstar]
<emsilva> IceDragon: good call on grouping the two "if's" together.
<emsilva> IceDragon: Thanks mate
Noldorin has joined #ruby
<Gate> /window 8
teh4 has quit [Quit: Leaving]
Goles has joined #ruby
<IceDragon> emsilva: http://rubular.com/r/Kp5XYFs94G
<IceDragon> :)
<IceDragon> Now I did it
<slash_nick> Gate: That's the first time I've seen someone other than me do that
ebouchut has quit [Quit: This computer has gone to sleep]
<IceDragon> hmm. that last one got me...
DrShoggoth has joined #ruby
altamic has joined #ruby
altamic has quit [Changing host]
altamic has joined #ruby
havenn has joined #ruby
Shadow_S has joined #ruby
<emocakes> mmm irssi slash_nick
maletor has joined #ruby
<emsilva> IceDragon: I'm looking at the code, but I don't get why its working for - and not for _
jds has quit [Ping timeout: 252 seconds]
<IceDragon> its the \w+
<IceDragon> it captures underscores as well
_64k has joined #ruby
<IceDragon> emsilva: ^#\s([A-Z]+)[_-]?((?:\w+)(?:[_-](?:\w+))*)?$
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
daniel_- has joined #ruby
megharsh has joined #ruby
<emsilva> IceDragon: thanks mate
<IceDragon> np
ltsstar has joined #ruby
statarb3 has quit [Ping timeout: 255 seconds]
Takehiro has joined #ruby
banisterfiend has joined #ruby
Noldorin has quit [Quit: Computer has gone to sleep.]
onibox has quit [Quit: leaving]
slainer68 has quit [Remote host closed the connection]
dangerousdave has joined #ruby
Guest25886 has quit [Quit: Guest25886]
slash_nick has quit [Ping timeout: 252 seconds]
Squarepy has joined #ruby
banisterfiend has quit [Ping timeout: 255 seconds]
cableray has joined #ruby
theRoUS_ has joined #ruby
theRoUS has joined #ruby
x82_nicole has joined #ruby
kuranai is now known as kuranai_off
kennyvb has quit [Ping timeout: 244 seconds]
soulcake has quit [Quit: ZNC - http://znc.in]
_64k has quit [Quit: _64k]
altamic has quit [Ping timeout: 264 seconds]
Morkel has quit [Quit: Morkel]
soulcake has joined #ruby
kennyvb has joined #ruby
havenn has quit [Remote host closed the connection]
icole has joined #ruby
havenn has joined #ruby
Diranged has left #ruby [#ruby]
vlad_starkov has joined #ruby
_64k has joined #ruby
kennyvb has quit [Ping timeout: 245 seconds]
snearch has joined #ruby
havenn has quit [Ping timeout: 244 seconds]
banisterfiend has joined #ruby
snowflight has quit [Ping timeout: 250 seconds]
d2dchat has quit [Ping timeout: 245 seconds]
<GlenK> don't suppose anyone could give me a hint on this koan? test_proxy_records_messages_sent_to_tv
nomenkun has quit [Remote host closed the connection]
oxeote has quit [Ping timeout: 255 seconds]
nemesit has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
_64k has quit [Quit: _64k]
_64k has joined #ruby
toekutr has quit [Remote host closed the connection]
vdandre has quit [Quit: leaving]
kennyvb has joined #ruby
oxeote has joined #ruby
datura has joined #ruby
Noldorin has joined #ruby
<GlenK> perhaps if I paste the relevant bit? http://fpaste.org/mNmQ/ It's telling me stack too deep on the test_tv_methods_still_perform_their_function section now.
Squarepy has quit [Changing host]
Squarepy has joined #ruby
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
lolcathost has quit [Ping timeout: 260 seconds]
DaltonUS has quit [Quit: DaltonUS]
<aedorn> GlenK: try changing calls in method_missing for Proxy to @calls
jds has joined #ruby
elico has joined #ruby
<GlenK> aedorn: ha. duh. thanks. I still barely know what I'm doing here, so I guess that's what put the blinders on. haha.
slainer68 has joined #ruby
jerius has quit [Ping timeout: 252 seconds]
DrShoggoth has quit [Quit: Leaving]
toekutr has joined #ruby
fomatin has quit [Quit: Textual IRC Client: www.textualapp.com]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
rondale_sc has quit [Quit: rondale_sc]
<aedorn> GlenK: just keep in mind that stack level too deep almost always relates to something being called recursively. In this case method_missing is recursively and indefinitely called searching for 'calls' rather than the instance variable
burgestrand has quit [Quit: Leaving.]
mayfield has quit [Ping timeout: 260 seconds]
miskander has quit [Quit: miskander]
Noldorin has quit [Quit: Computer has gone to sleep.]
blacktulip has quit [Remote host closed the connection]
Spaceghostc2c has quit [Excess Flood]
slainer68 has quit [Ping timeout: 265 seconds]
datura has quit [Quit: This computer has gone to sleep]
Spaceghostc2c has joined #ruby
pwelch_ has joined #ruby
_nitti_ has joined #ruby
Guest3912 has quit [Remote host closed the connection]
chimkan_ has quit [Quit: chimkan_]
kiyoura has quit [Ping timeout: 264 seconds]
statarb3 has joined #ruby
dt6 has joined #ruby
Michael has joined #ruby
Michael is now known as Guest27727
kennyvb has quit [Ping timeout: 245 seconds]
ner0x has quit [Quit: Leaving]
pwelch has quit [Ping timeout: 260 seconds]
_nitti has quit [Ping timeout: 252 seconds]
Guedes has quit [Ping timeout: 255 seconds]
dt6 has quit [Quit: dt6]
pwelch_ has quit [Ping timeout: 265 seconds]
skrite has quit [Quit: WeeChat 0.3.8]
danneu has joined #ruby
shadewin1 has joined #ruby
sparc_ has quit [Quit: leaving]
<JMcAfreak> so many part/join messages
<IceDragon> your average day in #ruby
lolcathost has joined #ruby
daveturnbull has joined #ruby
<JMcAfreak> i see
elaptics is now known as elaptics`away
<shadewin1> how can I get a class by name from an extension
mockra_ has joined #ruby
thecreators has quit [Quit: thecreators]
mpfundstein has joined #ruby
mengu has joined #ruby
_nitti_ has quit [Remote host closed the connection]
arturaz has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 255 seconds]
<shevy> shadewin1 you have a name in a variable?
<shadewin1> no, I have a string
__BigO__ has quit [Remote host closed the connection]
<shadewin1> a C string with the name of the class
<shevy> a C string? hmm you mean you want to know how to do so in ruby-C?
<shevy> in pure ruby it is easy
emocakes has quit [Ping timeout: 252 seconds]
<shevy> class Bar; end; Object.const_get("bar".capitalize).new
_alejandro has joined #ruby
banisterfiend has quit [Remote host closed the connection]
<RubyPanther> shadewin1: VALUE time_klass = rb_const_get( rb_cObject, rb_intern("Time") );
<shevy> :)
<shevy> that's the translation!
<shevy> from Object.const_get to rb_const_get, this is a very clever RubyPanther
banisterfiend has joined #ruby
<RubyPanther> <3 CRuby
<shevy> who was evilly kicked from #ruby-lang
pwelch has joined #ruby
mockra_ has quit [Remote host closed the connection]
<RubyPanther> if I was banned from more places, I'd write even more code
assurbanipal has joined #ruby
jrajav has joined #ruby
<shevy> lol
theRoUS has quit [Ping timeout: 245 seconds]
theRoUS_ has quit [Ping timeout: 265 seconds]
banisterfiend has quit [Ping timeout: 252 seconds]
fir_ed has joined #ruby
aces1up has joined #ruby
<aces1up> how would i use Process.spawn to run a java jar file the command line is java -jar myjar.jar -role hub
twoism has joined #ruby
<shadewin1> RubyPanther: thanks
koshii has quit [Ping timeout: 260 seconds]
dougireton has quit [Quit: Leaving.]
daveturnbull has quit [Quit: daveturnbull]
icole has quit [Remote host closed the connection]
<graft> what's a good way to get the array member before or after a specific index?
icole has joined #ruby
<graft> i don't want to loop backwards to the end of the array
snearch has quit [Quit: Verlassend]
spacemud has joined #ruby
amacgregor_osx has quit [Read error: Operation timed out]
icole has quit [Read error: Connection reset by peer]
crodas has quit [Ping timeout: 264 seconds]
<graft> it's annoying that array[array.size] is nil, but array[-1] == array.last
amacgregor_osx has joined #ruby
_alejandro has quit [Remote host closed the connection]
<jrajav> graft: Curse the man who decided that array indices should correspond to pointer math
<jrajav> graft: Also, is there a reason you can't simply do array[index + 1] (or -)
<seanstickle> Dijkstra?
<jrajav> ?
<jrajav> Oh, you mean in the context of looping around to negative/positive indexing I guess
<apeiros_> dijkstra is the guy you two should read up on.
<seanstickle> Whoa now.
twoism has quit [Remote host closed the connection]
<seanstickle> I've read me plenty of Dijkstra.
<apeiros_> seanstickle: not you obviously :)
<seanstickle> Oh.
<apeiros_> jrajav and graft
<seanstickle> His hand-written papers are interesting stuff.
twoism has joined #ruby
<pskosinski> You all should read about Dijkstra
<graft> i don't want to read up on dijkstra, i just want to know how to get the previous member of an array
<graft> i can't do array[index - 1] because it loops around
GoGoGarrett has quit [Remote host closed the connection]
<Paradox> graft, damn
<Paradox> thats a tricky one
<Paradox> heh
<apeiros_> write a method
<Paradox> you probably have to do some checks to make sure you're not the last in the array
<apeiros_> add it to Array
<Paradox> yeah
<apeiros_> be happy
<Paradox> monkeypatch array
<Paradox> Array.prev
<graft> yeah, sure i can do that
<Paradox> surely rails did something like that
<pskosinski> So what index you want to have when index is -1 …?
<Paradox> i cant believe it
<Paradox> rails didnt
<seanstickle> Presumably he wants the ary.prev to index 0 to be a nil
<Paradox> maybe in enumerable
<graft> right, seanstickle
<apeiros_> Enumerable does not imply indexed
<jrajav> I have that bookmarked, I've read it, and I still think arrays should start at 1
<graft> that goes against so many years of training
<jrajav> Luckily I'm writing my own language, so I'm in the 1% who will do shit about it
<seanstickle> jrajav: well, you're more than welcome to create a language that does that
<jrajav> And get rageblogged at, as a result
<graft> it's like using a dvorak keyboard... just give it up, scum!
<jrajav> seanstickle: ninja'd! :D
<GlenK> ha. well, I finished ruby koans. I don't exactly feel enlighted though, as in a Ruby expert. haha.
dankest is now known as dankest|away
<seanstickle> Visual Basic does 1-indexing
<seanstickle> Be like Visual Basic!
<graft> i rest my case
<graft> case closed
dangerousdave has quit [Quit: Leaving...]
<jrajav> Your fear tactics won't work on me
twoism has quit [Ping timeout: 265 seconds]
<graft> geh, i guess i'll monkeypatch Array... seems like there should be some neater way to do this
<pskosinski> And -index doesn't loop but is just going backwards. :<
dankest|away is now known as dankest
<graft> wait, so does -array.size give you nil?
banisterfiend has joined #ruby
<pskosinski> Yes
<graft> array[ -array.size -1 ] does
<pskosinski> No
<jrajav> No, because negative indices ARE 1-indexed
<pskosinski> -size+1
<pskosinski> ah, eys, sorry
amacgregor_osx has quit [Read error: Operation timed out]
amacgregor_osx has joined #ruby
<graft> okay, so x[ index - x.size - 1 ] does what i want to get the previous element, and x[ index + 1 ] works for the next element
<graft> nice
breakingthings has quit []
onibox has joined #ruby
<seanstickle> Yes, and x[ index - x.size - 1 ] is super easy to understand. No maintenance problems there!
johnmilton has joined #ruby
<graft> well, i can't have everything. it's not that bad, at least i didn't use inject
alanp has quit [Ping timeout: 260 seconds]
datura has joined #ruby
datura has quit [Client Quit]
vonsar has joined #ruby
_64k has quit [Quit: _64k]
Xeago has joined #ruby
twoism has joined #ruby
atmosx has joined #ruby
twoism has quit [Remote host closed the connection]
twoism has joined #ruby
dougireton has joined #ruby
adamnbowen has quit [Quit: Textual IRC Client: www.textualapp.com]
mockra has joined #ruby
nemesit has quit [Quit: Leaving...]
_veer has quit [Ping timeout: 248 seconds]
mockra has quit [Remote host closed the connection]
<reactormonk> graft, you could also use slice_before for that kind of stuff
joofsh has quit [Remote host closed the connection]
swex has quit [Ping timeout: 248 seconds]
fomatin has joined #ruby
atyz has joined #ruby
GoGoGarrett has joined #ruby
skcin7 has quit [Ping timeout: 245 seconds]
reppard has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
stopbit has quit [Quit: Leaving]
_64k has joined #ruby
Shadow_S has quit [Quit: Textual IRC Client: www.textualapp.com]
eph3meral has joined #ruby
willob has quit [Quit: Leaving.]
Shadow_S has joined #ruby
michaelhf has joined #ruby
GlenK has quit [Quit: leaving]
justinweiss has quit [Ping timeout: 264 seconds]
GoGoGarrett has quit [Remote host closed the connection]
reppard has quit [Ping timeout: 260 seconds]
justinweiss has joined #ruby
miskander has joined #ruby
zeade has quit [Quit: Leaving.]
tvw has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
pabloh has quit [Read error: Connection reset by peer]
twoism has quit [Remote host closed the connection]
havenn has joined #ruby
Squarepy has quit [Remote host closed the connection]
twoism has joined #ruby
kil0byte has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
benlieb has joined #ruby
sn0wb1rd has joined #ruby
nyuszika7h has quit [Remote host closed the connection]
LouisGB has quit [Ping timeout: 252 seconds]
nyuszika7h has joined #ruby
twoism has quit [Ping timeout: 250 seconds]
<shevy> test
<blazes816> F
danneu has quit [Ping timeout: 252 seconds]
havenn has quit [Ping timeout: 248 seconds]
<shevy> hmm... anyone ever been in a situation where fdisk/mount/umount don't work, and you have a read-only file system...
<IceDragon> with a flash drive?
kennyvb has joined #ruby
sn0wb1rd has quit [Ping timeout: 265 seconds]
<seanstickle> shevy: yup
h4mz1d has quit [Read error: Operation timed out]
<shevy> IceDragon hmm my main computer right now... wondering what to do
<IceDragon> sorry, never happened to me (yet)
joshman_ has quit [Quit: Computer has gone to sleep.]
<shevy> hehe
kokainepizza has joined #ruby
<shevy> well, I finished backing up everything so in theory I could reinstall
kmurph has joined #ruby
<IceDragon> have you tried booting using another system?
michaelhf has quit [Remote host closed the connection]
<IceDragon> or OS and check your filesystem (Parted Magic)
swex has joined #ruby
emmanuelux has joined #ruby
havenn has joined #ruby
<shevy> hmm, if I reboot, I know I will be unable to login because mount will not work again
assurbanipal has quit [Remote host closed the connection]
<shevy> system is ext4 ... going to try to repair that perhaps
<atmosx> shevy: what is your error?
<shevy> mount: relocation error: mount: symbol blkid_evaluate_spec, version BLKID_2.20 not defined in file libblkid.so.1 with link time reference
<atmosx> is that the / or another fs?
<shevy> two libblkid.so.1 exist, one in /lib/i386-linux-gnu/ and the other one in /usr/lib
<shevy> this is on /
<shevy> I'd like to remove /lib/i386-linux-gnu/ but I cant modify /etc/ld.so.conf :(
<JMcAfreak> :|
<JMcAfreak> fun
<atmosx> shevy: why not? hmm try booting in single user mode
<atmosx> and mounting the fs
<atmosx> boot using a liveCD or something
<shevy> aha
<shevy> now that's an idea
<atmosx> the problem is described here and as you said it's a bad (wrong) symlink. You need to remove the old one, make a link to the new one and run ldconfig http://forums.gentoo.org/viewtopic-t-808255.html
<atmosx> this will generate new paths for the system and you're all set
<anders__> shevy: sudo gedit /etc/ld.so.conf
<anders__> what happens?
<shevy> it is read only, I can not modify the file
reppard has joined #ruby
<anders__> I try here then
<shevy> but the liveCD is indeed a solution, I could simply copy or move the files
banister_ has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
pwelch has quit [Quit: pwelch]
<anders__> shevy, well I have write access as admin
<shevy> going to try that soon, let's see how long I will be down :)
<JMcAfreak> we'll be timing you!
<shevy> the funny thing is, a few of my ruby scripts dont work properly on read-only file systems
<shevy> VideoPlayer.rb:422:in `initialize': Read-only file system - last_video_file_played (Errno::EROFS)
C0deMaver1ck has quit [Remote host closed the connection]
<aedorn> shevy: how did you manage that one?
<JMcAfreak> I'd assume "very carefully"
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<aedorn> heh, or very randomly
freakazoid0223 has joined #ruby
ner0x has joined #ruby
AltGrendel has left #ruby [#ruby]
yeban has left #ruby [#ruby]
samuel02 has quit [Remote host closed the connection]
<shevy> aedorn hmm not 100% sure...
GlenK has joined #ruby
samuel02 has joined #ruby
banister_ is now known as banister`sleep
<shevy> I tried to remove some directories in /tmp, when suddenly rm spammed out "can not remove... blabla read-only file system"