fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
darren has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
mrdodo has joined #ruby
locriani has joined #ruby
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
v0n has quit [Read error: No route to host]
v0n has joined #ruby
banisterfiend has quit [Ping timeout: 252 seconds]
<therealfakemoot> So here's my question. In the example from this article (http://www.rubyinside.com/how-to-create-a-ruby-extension-in-c-in-under-5-minutes-100.html) the method defined is passed (VALUE self). Do I change all the types of the arguments to VALUE?
adeponte has quit [Remote host closed the connection]
enroxorz has quit [Ping timeout: 240 seconds]
enroxorz has joined #ruby
qwerxy has quit [Quit: offski]
maletor has quit [Quit: Computer has gone to sleep.]
dross_ is now known as dross
enroxorz has quit [Ping timeout: 240 seconds]
enroxorz has joined #ruby
Rochefort has quit [Remote host closed the connection]
locriani has quit [Ping timeout: 268 seconds]
Kabie has joined #ruby
Banistergalaxy has joined #ruby
daniel_hinojosa has quit [Ping timeout: 244 seconds]
havenn has joined #ruby
enroxorz has quit [Ping timeout: 240 seconds]
Kabie has left #ruby [#ruby]
jumpingcloud has joined #ruby
linoj has joined #ruby
darren has joined #ruby
drewbug02 has joined #ruby
g_rotbart has joined #ruby
drewbug02 has quit [Client Quit]
welterde has joined #ruby
igotnolegs has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
hunglin has joined #ruby
hunglin has quit [Client Quit]
Banistergalaxy has quit [Ping timeout: 240 seconds]
pygospa_ has joined #ruby
maletor has joined #ruby
<bperry> therealfakemoot: only the ones coming from ruby
<bperry> if you have types floating around in the C code, then you will use ints or char[], whatever
mrdodo has quit [Remote host closed the connection]
<bperry> but for any callbacks that get consumed in ruby, the vars will have to be VALUE
<bperry> all callbacks will have at least an arity of one, it will have at least one argument
<bperry> that is self
<bperry> it enables to you to interact with the object as if it were object oriented in C code
<pygospa_> Hi! I've got a crazy question, I guess. But still it bothers me ;) I know that Ruby was influenced by Smalltalk (actually I used to program in Smalltalk), and that it implements the idea of Smalltalk, that _everything_ is an object, and that there are no statements, only messages between objects.
graspee has quit [Quit: leaving]
<bperry> where did you hear the latter part of that?
<pygospa_> Now in Smalltalk if-then-else is implemented as method (Boolean#ifTrue and Boolean#ifFalse) in the Boolean class… but I could't find a class implementing the if-then-else structure in Ruby… so I wonder: how is this handled in Ruby?
<therealfakemoot> bperry: Okay, that makes sense
sepp2k has quit [Remote host closed the connection]
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<banisterfiend> pygospa_: if/then/else are not methods in ruby, but it's easy to implement it if you want that
<banisterfiend> pygospa_: if/then/else are keywords much like in python
velikasha has joined #ruby
velikasha has left #ruby [#ruby]
<bperry> who makes the claim there are no statements, only messages between objects?
<bperry> is this a ruby idiom?
<nedbat> my understanding is that it's in the middle: there are no statements, only expressions, but it isn't as reductionist as smalltalk
<therealfakemoot> https://gist.github.com/322a07049c0c857da63a So I'm trying to use FFI to wrap an .so I have. I'm getting the error in the second half of the pastebin when trying to invoke splice.rb via irb
<pygospa_> Oh. Okey. I was reading a book "Engineering Long-Lasting Software: An Agile Approach Using SaaS and Cloud Computing" (by Fox and Patterson), and it said something along the lines of everything being method calls with explicit or implicit receiver, and every method always having an object returned as answer to the method…
mahmoudimus has joined #ruby
<pygospa_> Which I didn't question in any ways (at first), because as mentioned I come from Smalltalk
<bperry> ruby returns the last object touched
adeponte has joined #ruby
<therealfakemoot> I don't get how the module I'm defining is supposed to be initialized.
<banisterfiend> pygospa_: ruby still has keywords, it's just that we have less keywords than other languages. Many things are methods in ruby that in other languages would be keywords
<banisterfiend> pygospa_: like 'loop' and 'attr_accessor' and 'raise', etc
<banisterfiend> (all methods)
<pygospa_> Yes, I've stumbled upon those as well… which even strengthened my believe that everything must be method calls ;)
<banisterfiend> nup
<bperry> extend FFI:Library
<bperry> should be extend FFI::Library
<bperry> no?
<pygospa_> But then that was wrong… I'll try to find the passage in the book where it said that everything was a method… maybe I got mixed up…
<pygospa_> Thanks for your help!
<MarioEIU> pygospa_: Good choice on the book btw. I took the course they offered on Coursera and picked the book up to supplement it
<therealfakemoot> bperry: I realized that a few seconds ago
mrdodo has joined #ruby
hsbt has quit [Read error: Connection reset by peer]
hsbt has joined #ruby
nobitanobi has joined #ruby
nobitanobi has left #ruby [#ruby]
justsee is now known as justsee|away
liluo has quit [Remote host closed the connection]
eikko has joined #ruby
leoncame` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
linoj has quit [Quit: linoj]
leoncamel has joined #ruby
waxjar has quit [Ping timeout: 240 seconds]
freeayu has joined #ruby
mrdodo has quit [Remote host closed the connection]
chichou has quit [Remote host closed the connection]
linoj has joined #ruby
iori has joined #ruby
adelcampo has quit [Quit: Leaving...]
waxjar has joined #ruby
adelcampo has joined #ruby
<therealfakemoot> So I have main.rb which contains "require 'splice.rb' " in the same directory as splice.rb. When I try to invoke main.rb, I get an error about "cannot load such file splice.rb"
<therealfakemoot> What's the deal?
<bperry> remove the .rb
ForSpareParts has quit [Ping timeout: 240 seconds]
<bperry> just require 'splice'
<therealfakemoot> Cannot load such file -- splice
<bperry> require_relative './splice'
<bperry> that may be frowned upon
<bperry> not really sure
bambanx has joined #ruby
<therealfakemoot> In Python, rleative imports are bad
<therealfakemoot> and this feels like a bad hack
bambanx has quit [Read error: Connection reset by peer]
<therealfakemoot> but it worked
<bperry> yes, I agree
Eplemosen has quit [Quit: NOPE]
<therealfakemoot> I wish I could learn why it didn't work the way it should've.
joephelius has quit [Quit: WeeChat 0.3.8]
<bperry> I think you need to set some specific env vars in order for ruby to look in the current dir
<bperry> it has a similar thing to $PATH
<jumpingcloud> therealfakemoot: does 'load' work in place of 'require' ?
<therealfakemoot> jumpingcloud: Negative.
<jumpingcloud> therealfakemoot: i had an issue like this before, i think bperry is right about the $PATH
mrdodo has joined #ruby
mfridh has quit [Ping timeout: 268 seconds]
justsee|away is now known as justsee
emmanuelux has joined #ruby
<therealfakemoot> Bluh
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<jumpingcloud> oh looks like you can
freeayu has quit [Read error: Connection reset by peer]
<jumpingcloud> 'require ./file'
<jumpingcloud> in 1.9+
MonsterWithin has joined #ruby
mrdodo has quit [Remote host closed the connection]
cj3kim has left #ruby ["Leaving"]
<therealfakemoot> Hm
<therealfakemoot> Feels hacky
<therealfakemoot> But I guess I'll live
<canton7> by default, the current dir isn't in require's path
<canton7> so either add it, or use require_relative
<therealfakemoot> oh
<therealfakemoot> That's a design choice
<canton7> I think I'm right in saying it wasn't so in 1.8? So it's a conscious change
liluo has joined #ruby
freeayu has joined #ruby
<banisterfiend> canton7: Yeah, wasn't in 1.8
manizzle has joined #ruby
sysrmr has quit [Quit: Konversation terminated!]
Chryson has quit [Quit: Leaving]
mahmoudimus has joined #ruby
Rain777 has joined #ruby
niklasb has quit [Ping timeout: 265 seconds]
Markvilla has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Remote host closed the connection]
itnomad has quit [Quit: Leaving]
voodoofish has quit [Read error: Connection reset by peer]
Rain777 has left #ruby [#ruby]
adelcampo has quit [Quit: Linkinus - http://linkinus.com]
gen0cide_ has joined #ruby
infinitiguy has joined #ruby
TorpedoSkyline has joined #ruby
Jay_Levitt has quit [Ping timeout: 250 seconds]
darren has quit [Remote host closed the connection]
infinitiguy has quit [Client Quit]
Hanmac1 has joined #ruby
<havenn> If you want the (unsafe) 1.8-style require, you can quickly revive with: ENV['RUBYLIB'] = '.'
Hanmac has quit [Ping timeout: 276 seconds]
<havenn> Or from term: export RUBYLIB="."
gen0cide_ has quit [Ping timeout: 240 seconds]
<havenn> (I'd assume neither is recommended. >.>)
voodoofish has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<canton7> you see a lot of $LOAD_PATH.unshift(File.dirname(__FILE__)) around, but I'm not convinced that's recommended either
<havenn> canton7: I've never been able to get over how ugly it is!
nari_ has joined #ruby
okapi has quit [Quit: Leaving]
mahmoudimus has joined #ruby
mahmoudimus has quit [Client Quit]
<canton7> $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) is worse, to be fair :P
<havenn> canton7: haha, so true
<canton7> $: << '.' is the shortest I've seen, although it's perhaps worse...
<davidcelis> definitely worse
<davidcelis> the more people that look at a line of code and go "wtf", the worse
igotnolegs has joined #ruby
<havenn> davidcelis: I submit the following: (true.object_id..nil.object_id).each &method(:puts)
ryanf has joined #ruby
<havenn> >> (true.object_id..nil.object_id).each &method(:puts)
<al2o3cr> stdout was too long, I PMed it to you
emmanuelux has quit [Ping timeout: 244 seconds]
banisterfiend has joined #ruby
<ryanf> >> [false, true, nil].map(&:object_id).join(' ')
<al2o3cr> (String) "0 2 4"
Araxia has quit [Quit: Araxia]
adeponte has quit [Remote host closed the connection]
Markvilla has joined #ruby
<banisterfiend> >> ObjectSpace._id2ref(4)
<al2o3cr> (NilClass) nil
<banisterfiend> >> ObjectSpace._id2ref(6)
<al2o3cr> stderr was too long, I PMed it to you
<al2o3cr> exit status: 1
<banisterfiend> >> ObjectSpace._id2ref(5)
<al2o3cr> (Fixnum) 2
<davidcelis> havenn: true's object_id is 2, nil's is 4
<davidcelis> havenn: doesn't everybody know that
<banisterfiend> Qundef is 6
<fowl> canton7: save a few chars, $:<<?.
<banisterfiend> but ruby doesnt seem to like that very much :)
<havenn> davidcelis: Yes... but I'm in RBX so nil was 26... MAUHAHAHAHHAA
pingfloyd has quit [Ping timeout: 248 seconds]
<havenn> That does cause a lot of problems with Ruby Koans and RBX/Jruby
<havenn> Really an implementation detail
<havenn> ?
<maletor> Is there any solution for this? https://gist.github.com/2704272
<jrajav> Ahhh, dates. My age-old nemesis
banisterfiend has quit [Remote host closed the connection]
<havenn> banisterfiend: GC?? Okay, that is truly confusing (to me at least >.>)
jarred has quit [Quit: jarred]
<maletor> FWIW, the usec is off.
Markvilla has quit [Ping timeout: 244 seconds]
n_blownapart has joined #ruby
justsee is now known as justsee|away
<n_blownapart> hi I'm wondering why, with @seats = 2 set for the tandem bike, why the output in pry is seats = 1 from the superClass. thanks: http://pastie.org/4463787
ddouglas has joined #ruby
patient has quit [Quit: leaving]
darren has joined #ruby
Spooner has quit [Ping timeout: 265 seconds]
nu7hatch has left #ruby [#ruby]
havenn has quit [Remote host closed the connection]
<ddouglas> hello comrades, I'm getting a "invalid multibyte char (US-ASCII)" error from Postgres/Rails when trying to do some stuff with DateTime elements.... I've posted the method on https://gist.github.com/3336474 if you think you might know something about DateTime data-type errors in SQL dbs
nwest has joined #ruby
Banistergalaxy has joined #ruby
cwang has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
justsee|away is now known as justsee
iamjarvo has joined #ruby
tommyvyo has joined #ruby
havenn has joined #ruby
joast has joined #ruby
Markvilla has joined #ruby
pingfloyd has joined #ruby
dangsos has joined #ruby
apok has joined #ruby
<dangsos> anyone ever used refinery cms gem?
adeponte has joined #ruby
pygospa_ has left #ruby [#ruby]
Markvilla has quit [Ping timeout: 244 seconds]
lledet has joined #ruby
<_br_> n_blownapart: In Byclyle set the seats variable like this @seats ||= 1 That will only set the variable if it doesn't exist already (as in your case).
<n_blownapart> _br_: cool thanks I'll try it. (the pastie is precisely how the textbook has it).
sazboom has quit [Ping timeout: 246 seconds]
justsee is now known as justsee|away
jarred has joined #ruby
lledet has quit [Client Quit]
<nedbat> _br_: but he sets @seats = 2 after calling super in Tandem. Shouldn't that take care of it?
banisterfiend has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
<ryanf> that code works fine for me already n_blownapart
<ryanf> perhaps you aren't running the code you think you are?
daemoen has quit [Disconnected by services]
<n_blownapart> ryanf: well, the code ran fine, but the output had seats = 1. I included the output in the pastie. I thought it was odd. thanks!
<n_blownapart> ^^ I ran it in pry.
nedbat has quit [Ping timeout: 250 seconds]
<fowl> n_blownapart: we're missing the part where you instantiate Tandem
mmercer has joined #ruby
<n_blownapart> ryanf: fowl hold on thanks
<n_blownapart> fowl ryanf I just put person_2 = Tandem.new ... that gave the output in the pastie
lledet has joined #ruby
<n_blownapart> I'm trying it from an editor file since it worked for ryanf
ananthakumaran has joined #ruby
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tommyvyo has joined #ruby
jarred has quit [Quit: jarred]
banisterfiend has quit [Ping timeout: 256 seconds]
banisterfiend has joined #ruby
drago757 has quit [Quit: drago757]
k_89 has joined #ruby
wereHamster has joined #ruby
<n_blownapart> fowl http://pastie.org/4463787 . hey, any hints on why this won't run? ryanf
sazboom has joined #ruby
<n_blownapart> fowl ryanf I just initialized it with (gears = 1) in new pastie. It ran, but originally I ran it in pry and got the output on line 20. (@seats = 1)
<seanstickle> Wait, we have keyword arguments now?
<bperry> n_blownapart: super gears
<bperry> maybe?
<ryanf> no
<ryanf> super passes all params if you don't give it empty parens
<bperry> I see
jso has joined #ruby
Hawklord has joined #ruby
<seanstickle> n_blownapart: what version of Ruby?
<n_blownapart> ok, when I ran it at first in pry, I didn't initialize Tandem.new with any argument. line 20 was the output with @seats = 2 succeeding super. ryanf fowl seanstickle
<seanstickle> Because with 1.9.3, I get #<Tandem:0x007ff3c4108668 @wheels=2, @seats=2, @gears=1>
<n_blownapart> seanstickle: this is a book example (1.9.1) I'm running 1.9.3
aezop has quit [Read error: Connection reset by peer]
<n_blownapart> seanstickle: you ran it in pry/irb?
<seanstickle> Yup
joekarma has quit [Quit: joekarma]
sazboom has quit [Ping timeout: 246 seconds]
<seanstickle> Although that gears=1 doesn't mean anything
aezop has joined #ruby
<seanstickle> person_2 = Tandem.new(2)
<seanstickle> Or person_2 = Tandem.new(1) I mean
<seanstickle> #<Tandem:0x007f86c99dbb68 @gears=1, @seats=2, @wheels=2>
<n_blownapart> seanstickle: yikes, let me try it in pry. I had no args. on line 18 at first in pry.
<n_blownapart> thanks for schlepping seanstickle
banisterfiend has quit [Ping timeout: 256 seconds]
<seanstickle> Suretainly
banisterfiend has joined #ruby
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
yasushi has joined #ruby
pygospa has joined #ruby
havenn has quit [Remote host closed the connection]
yasushi has quit [Remote host closed the connection]
yasushi has joined #ruby
<n_blownapart> seanstickle: yeah I got it to work. I hadn't initialize person_2 = Tandem.new with (1) on my first go. but oddly, the output gave me a new Tandem object, with only 1 seat. why would it do that?
kyb3r has joined #ruby
<n_blownapart> ^^ on the first go, it gave me one seat. the second go worked with seats = 2 as output.
ananthakumaran has quit [Quit: Leaving.]
yasushi has quit [Ping timeout: 245 seconds]
<seanstickle> I'd have to see your code
<seanstickle> I can't visualize this
<n_blownapart> seanstickle: this is the corrected prog if you're not yet sick with boredom. thanks http://pastie.org/4463787
jumpingcloud has quit [Ping timeout: 240 seconds]
<n_blownapart> this one worked. the only difference in the first run was line 18, where I had : person_2 = Tandem.new ... without arg
<bnagy> no
waxjar has quit [Quit: Ah! Well, prepare to put mustard on those words, for you will soon be consuming them along with this slice of humble pie that comes direct from the oven of shame, set at gas mark "egg on your face"! I sort of forget what I was talking about.]
<bnagy> I reject your assertion
<bnagy> you must have changed something else without noticing
<bnagy> use ideone or codepad, they run the code for you
<seanstickle> I agree.
<seanstickle> Something else changed.
<n_blownapart> bnagy: the pry log is right here ..its very strange
<seanstickle> You wouldn't have been able to run Tandem.new
<seanstickle> It would have given you an argument error
linoj has quit [Quit: linoj]
<bnagy> n_blownapart: replicate the behaviour and paste to ideone or codepad, then I'll believe you :)
<n_blownapart> seanstickle: bnagy ok I figured out something. when I ran it in pry I misspelled initialize(gears) in line 12 : intialize . I missed the i. the prog. I pasted was from the book's prog. files online. so it ran with that word misspelled.
<seanstickle> That'll do it
<bnagy> that'd do it
<banisterfiend> that did it
<n_blownapart> bnagy: seanstickle but the prog still ran and gave me seats = 1. without Tandem initialized, the super just read the instance vars. from the superclass?
<seanstickle> At this point, all I remember is you mistyped a bunch of stuff and weird things happened
<seanstickle> I'm not going to unpack the history of it for curiosity's sake
maletor has quit [Quit: Computer has gone to sleep.]
<n_blownapart> good idea. thanks very much seanstickle bnagy
<seanstickle> Sure thing
jumpingcloud has joined #ruby
v0n has quit [Ping timeout: 244 seconds]
n_blownapart has quit [Remote host closed the connection]
htroyack has joined #ruby
<bnagy> n_blownapart: if you misspell initialize in the subclass it just becomes some random method called initrujfsddsg or whatever
<bnagy> so the only available initialize is from the parent class
<bnagy> so that's all that runs
insecurlex has joined #ruby
alexim has joined #ruby
alexim has quit [Client Quit]
mockra has quit [Remote host closed the connection]
mockra has joined #ruby
apok has quit [Quit: apok]
tobyo has joined #ruby
Markvilla has joined #ruby
ananthakumaran has joined #ruby
pygospa has quit [Quit: pygospa]
mockra has quit [Remote host closed the connection]
burgestrand has joined #ruby
vitor-br has quit [Ping timeout: 276 seconds]
yasushi has joined #ruby
Markvilla has quit [Ping timeout: 245 seconds]
jrajav has quit [Quit: The best darkness is strange and surprising]
justsee|away is now known as justsee
justsee has quit [Quit: Leaving...]
tk_ has joined #ruby
beneggett has joined #ruby
jonahR has joined #ruby
vertroa_ has quit [Ping timeout: 240 seconds]
mockra has joined #ruby
vertroa_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 240 seconds]
savage- has quit [Remote host closed the connection]
tommyvyo has quit [Quit: Computer has gone to sleep.]
jonahR has quit [Quit: jonahR]
mockra has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
burgestrand has quit [Quit: Leaving.]
maxmmurphy has quit [Quit: maxmmurphy]
blast_hardcheese has quit [Ping timeout: 276 seconds]
williamherry has joined #ruby
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
luckyruby has joined #ruby
mikepack has joined #ruby
lledet has left #ruby [#ruby]
mikepack has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
jeff_sebring has joined #ruby
yasushi has quit [Remote host closed the connection]
yasushi has joined #ruby
seanstickle has quit [Quit: seanstickle]
Konboi has joined #ruby
htroyack has quit [Quit: 1:40 a.m. here in Brazil. Must sleep... BRB]
yasushi has quit [Ping timeout: 240 seconds]
s1n4 has joined #ruby
Konboi has quit [Ping timeout: 248 seconds]
ryanf_ has joined #ruby
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
Axsuul has quit [Ping timeout: 252 seconds]
masteraka has joined #ruby
Axsuul has joined #ruby
joekarma has joined #ruby
Konboi has joined #ruby
justsee has joined #ruby
mockra has joined #ruby
Konboi has quit [Remote host closed the connection]
blast_hardcheese has joined #ruby
Axsuul has quit [Client Quit]
blast_hardcheese has quit [Excess Flood]
cloud|droid has joined #ruby
r0bby has joined #ruby
strnx has quit [Excess Flood]
araujo has quit [Quit: Leaving]
mockra has quit [Ping timeout: 246 seconds]
robbyoconnor has quit [Ping timeout: 240 seconds]
a_a_g has joined #ruby
timonv has joined #ruby
r0bby is now known as robbyoconnor
vectorshelve has joined #ruby
brianpWins has joined #ruby
mike4_ has quit [Quit: bbl]
centipedefarmer has quit [Quit: This computer has gone to sleep]
mbuf has joined #ruby
MarioEIU has quit [Quit: Leaving]
<mbuf> anyone here used bzconsole from ruby-bugzilla? using bzconsole getbug gives me unknown command: getbug, even though the -h lists it as an available command
noyb has joined #ruby
burgestrand has joined #ruby
perryh_away is now known as perryh
strnx has joined #ruby
blast_hardcheese has joined #ruby
blast_hardcheese has quit [Excess Flood]
savage- has joined #ruby
jso has quit []
perryh is now known as perry
uris has quit [Quit: leaving]
a_a_g has quit [Quit: Leaving.]
tonini has joined #ruby
a_a_g has joined #ruby
chylli has joined #ruby
<chylli> hi everyone. Should I install ruby first before install rvm ?
dhruvasagar has quit [Ping timeout: 252 seconds]
<luckyruby> chylli: i wouldn't
<burgestrand> chylli: no, you install ruby with rvm once you have rvm installed :)
<bnagy> rvm relies on ruby
<bnagy> but your old crappy system ruby should work
<burgestrand> chylli: most systems have a ruby installed already, which you use to install rvm
<fowl> bnagy: cant tell if you're being serious or not
a_a_g has quit [Client Quit]
<fowl> lol
<bnagy> fowl: one of the many reasons imho rbenv > rvm
<fowl> what a bass-ackwards way to do things
<banisterfiend> burgestrand: check this out: http://github.com/conradirwin/pry-capture
<burgestrand> banisterfiend: saw it about an hour ago, sat and read the source for breakfast :)
<bnagy> hey burgestrand I am still having no luck with that threading / capybara issue
<burgestrand> no idea how I saw it though
<luckyruby> rvm relies on ruby?
<bnagy> if you're bored again :)
<banisterfiend> burgestrand: haha, cute. what did u think?
artOfWar has joined #ruby
<burgestrand> bnagy: I managed to get mine working eventually, I figured out the issue but you were gone by then :p
<burgestrand> bnagy: it’s not current_session, it’s page that you need to override
<burgestrand> banisterfiend: surprisingly little code!
<bnagy> orly? I copied your code more or less but still blows up
<banisterfiend> burgestrand: most of it is in: http://github.com/conradirwin/interception
artOfWar_ has joined #ruby
<bnagy> burgestrand: if I gist mine can you fix it? :D
<burgestrand> bnagy: https://gist.github.com/3312972 yeah I changed it about ~10 hours ago
<burgestrand> bnagy: I use capybara-webkit because poltergeist could not scrape the title of pages
<chylli> Thanks very much , let me try
butblack has quit [Quit: butblack]
<bnagy> burgestrand: https://gist.github.com/3337161
<burgestrand> banisterfiend: yeah that’s the one I found very surprising
blast_hardcheese has joined #ruby
blast_hardcheese has quit [Excess Flood]
<burgestrand> bnagy: just rename current_session on both places to page
<bnagy> burgestrand: oic so literally just override page instead of current_session?
heftig has quit [Remote host closed the connection]
heftig has joined #ruby
blast_hardcheese has joined #ruby
artOfWar has quit [Ping timeout: 240 seconds]
nobitanobi has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
g4_ has joined #ruby
g4 has quit [Read error: Operation timed out]
<burgestrand> banisterfiend: I’ve concluded however the most annoying issues are gems who print out warnings, but don’t show where the warnings are coming from so I can’t figure out how to fix them
Markvilla has joined #ruby
eregon has quit [Read error: Operation timed out]
<burgestrand> like, "using X is deprecated, use Y instead" and the issue comes from one of my like… forty gems >.>
<bnagy> burgestrand: HA yeah that works for MRI
<bnagy> now I have a jruby encoding error :/
<burgestrand> bnagy: hooray :D
nobitanobi has joined #ruby
<burgestrand> encoding errors are fun
<bnagy> ick some json crap
eregon has joined #ruby
artOfWar_ has quit [Remote host closed the connection]
dangsos has quit [Quit: Page closed]
<burgestrand> hm
<burgestrand> I wonder if poltergeist is at fault here
timonv has quit [Remote host closed the connection]
<nobitanobi> Where can I find some info on the differences between Class variables and Class instance variables?
<bnagy> class variables suck, class ivars don't
ryanf_ has quit [Quit: broken pipes |||]
vectorshelve has quit [Quit: Page closed]
Markvilla has quit [Ping timeout: 248 seconds]
<burgestrand> nobdraisentone: just search for "ruby class variables"
<nobitanobi> burgestrand: Thanks for the suggestions. Was wondering if somebody had some nice to read and understand article over here :)
<burgestrand> nobdraisentone: I wouldn’t expect there to be too much information, as pretty much everybody avoids class variables like the plague.
yxhuvud has joined #ruby
<nobitanobi> burgestrand: ok. Thanks :)
<burgestrand> bnagy: that error does not happen on MRI?
<bnagy> burgestrand: no it doesn't
<bnagy> also, it seems to work with capybara-webkit
<burgestrand> bnagy: it looks like poltergeist is sending some command to the underlying driver via JSON, but the string coming in is in BINARY (i.e. no encoding information) for some reason
<bnagy> I guess I can just force_encoding on it
alvaro_o_ has joined #ruby
<burgestrand> bnagy: yeah if you can figure out why the command has a weird encoding
<burgestrand> bnagy: ruby -e 'p "".encoding' — what does that show in both jruby and mri?
indian has quit [Ping timeout: 240 seconds]
<bnagy> yeah that does it
<bnagy> wacky, I just force_encoding before I pass it to the search method
<burgestrand> bnagy: try just slapping an encoding: utf-8 on the top of your file, might remedy the issue
<burgestrand> from the file you’re calling search from that is
<bnagy> yah good point
alvaro_o has quit [Ping timeout: 245 seconds]
ChampS666 has joined #ruby
<bnagy> hm no luck with that
<bnagy> I can still have ausr bin env shebang before the encoding comment right?
<burgestrand> yeah
<bnagy> anyway I think I'll stick with force_encoding
<bnagy> cause then I can comment it
<burgestrand> bnagy: just be careful and make sure your strings really are in the encoding you say they are in, if it ever changes (because of your system perhaps) the errors will be about the same but even weirder :p
<nobitanobi> burgestrand: that page you gave is pretty good actually. Thank you.
<burgestrand> nobdraisentone: :)
<nobitanobi> gnight
timonv has joined #ruby
wereHamster has quit [Quit: Lost terminal]
timonv has quit [Remote host closed the connection]
nobitanobi has quit [Read error: Connection reset by peer]
<bnagy> burgestrand: thanks a lot for that, now I can be MRI free again
<burgestrand> bnagy: \o/
nobitanobi has joined #ruby
nobitanobi has left #ruby [#ruby]
vectorshelve has joined #ruby
timonv has joined #ruby
pen has quit [Remote host closed the connection]
ddouglas has quit [Quit: Ex-Chat]
wereHamster has joined #ruby
MarGarina has joined #ruby
apok has joined #ruby
abstrusenick has joined #ruby
ringotwo has quit [Remote host closed the connection]
Eldariof-ru has joined #ruby
lolmaus has joined #ruby
benatkin has joined #ruby
MarGarina has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Ping timeout: 268 seconds]
MonsterWithin has quit [Ping timeout: 245 seconds]
guns has joined #ruby
Stalkr_ has joined #ruby
bigkevmcd has joined #ruby
therealfakemoot has left #ruby [#ruby]
inteq has quit []
banisterfiend has joined #ruby
a_a_g has joined #ruby
daganu has joined #ruby
andrewhl has quit [Remote host closed the connection]
tagrudev has joined #ruby
daganu has left #ruby [#ruby]
<shevy> bnagy hehe
maesbn has joined #ruby
<fowl> >> fork
<al2o3cr> (Fixnum) 6668
<al2o3cr> (NilClass) nil
MonsterWithin has joined #ruby
<shevy> this is so annoying...
<shevy> I kept on using my custom modifications to ruby core classes
<shevy> this makes distributing projects annoying
<shevy> "foo".starts_with?
<shevy> vs
<shevy> "foo".start_with?
<shevy> grrrrr
<shevy> I kept on using starts_with?
<shevy> :(
g4_ has quit [Remote host closed the connection]
larry has quit [Quit: Leaving]
joekarma has quit [Quit: joekarma]
<Paradox> i blame matz
<Paradox> :p
mohits has joined #ruby
<ryanf> haha yeah, that gets me a lot too
<ryanf> include? is maybe justifiable with enough effort, but I'm not sure there's any justifying start_with?
senny has joined #ruby
hmmmm has joined #ruby
<Paradox> as i said
<hmmmm> BRUH
<Paradox> i blame matz
<Paradox> being japanese
<hmmmm> i got head from the bitch already
<hmmmm> Y U MAD AT ME NIGGA?
<Paradox> maybe doesnt believe in plurals or something
<hmmmm> come at me if you gonna swing bro i don't even give a fuck no mo
<hmmmm> Oh, this is the ruby channel, sorry
<Paradox> ಠ_ಠ
<hmmmm> disregard that
<hmmmm> hey guys, is ruby obsolete?
apok has quit [Quit: apok]
<hmmmm> i heard Python is better
<bnagy> Paradox: 'starts' is not plural, it's third person ;)
savage- has quit [Remote host closed the connection]
Morkel has joined #ruby
<aezop> paradox
hmmmm was kicked from #ruby by banisterfiend [hmmmm]
dr_bob has joined #ruby
<Paradox> banisterfiend, try *!*@*71-181-205-76.sctnpa.east.verizon.net
<banisterfiend> Paradox: itw as a warning shot
djdb has joined #ruby
twinturbo has joined #ruby
chriskk has quit [Quit: chriskk]
<chylli> what's the meaning of this ? Database file /home/chyllionrails/.rvm/user/db does not exist.
<chylli>
cwang has quit [Remote host closed the connection]
rutkla has joined #ruby
zealinux has joined #ruby
noyb has quit [Ping timeout: 244 seconds]
gilead has joined #ruby
<bnagy> probably it means the database file /home/chyllionrails/.rvm/user/db does not exist.
timonv has quit [Remote host closed the connection]
<bnagy> but I'm just guessing
<chylli> I want to know what should I do
<bnagy> does the file exist?
<zealinux> a question, I had a mysql database and data in it, then how to build the rails system?
<chylli> is it an error message ?
pen has joined #ruby
<bnagy> zealinux: try #rubyonrails
<bnagy> chylli: sure appears so
Araxia has joined #ruby
Stalkr_ has quit [Ping timeout: 248 seconds]
<chylli> bnagy: there is no such file
mahmoudimus has joined #ruby
Filuren has joined #ruby
Filuren has quit [Remote host closed the connection]
<bnagy> looks like it's correct then :)
jso has joined #ruby
<chylli> then how to fix it ? or needn't fix it ?
<zealinux> exit
zealinux has left #ruby [#ruby]
qwerxy has joined #ruby
RichieEvan has joined #ruby
jumpingcloud has quit [Remote host closed the connection]
Eldariof-ru has quit []
<bnagy> looks like an rvm issue, you could try over in their channel
Stalkr_ has joined #ruby
Stalkr_ has quit [Changing host]
Stalkr_ has joined #ruby
<chylli> thanks
<bnagy> someone might pipe up here, too, but I personally gave up on rvm after it screwed me for the 17th time
Stalkr_ has quit [Client Quit]
<chylli> 17th time
<chylli> ?
<bnagy> approximately
hsbt_away has joined #ruby
hsbt_away is now known as hsbt_
wqn has joined #ruby
gqlewis has quit [Remote host closed the connection]
hsbt has quit [Read error: Connection reset by peer]
jso_ has joined #ruby
ChampS666 has quit [Ping timeout: 240 seconds]
insecurlex has quit [Remote host closed the connection]
MarGarina has joined #ruby
rippa has joined #ruby
jso_ has quit []
dhruvasagar has joined #ruby
workmad3 has joined #ruby
wqn has quit [Remote host closed the connection]
dtribble has quit [Ping timeout: 248 seconds]
eikko has quit [Ping timeout: 252 seconds]
manizzle has quit [Ping timeout: 268 seconds]
<shevy> LONG LIVE RUBY!
manizzle has joined #ruby
<williamherry> :)
ephemerian has joined #ruby
<vectorshelve> shevy: LONG LONG LIVE RUBY!
<shevy> is that your github repo?
<fowl> its only 10% more work to use gosu and put graphics to it
<shevy> eh 10% ;P
shadoi has joined #ruby
jeff_sebring has quit [Ping timeout: 276 seconds]
arvidkahl has quit [Quit: arvidkahl]
<vectorshelve> shevy: yes :)
becomingGuru has joined #ruby
tewecske has quit [Quit: Leaving.]
<fowl> shevy: probably less
<shevy> hmm
twinturbo has quit [Quit: twinturbo]
<vectorshelve> shevy: you liked it ? ;)
macer_ has joined #ruby
<shevy> vectorshelve didn't look at it yet, was waiting to see whether it is your repo or whether you just linked any-other-random-guy's repo here :D
<vectorshelve> shevy: no it is mine dude... that pic is mine.. why would I lie ? haha ;D
<shevy> testing now
<shevy> vectorshelve, no, I really had no idea. I also dont keep IRC logs, and tend to forget what happened ~3 days ago :(
<vectorshelve> shevy: ok
<vectorshelve> shevy: hows the code... ur thoughts are very valuable to me.. would definitely work on it
<shevy> dunno
<shevy> semi-ok I think
<shevy> code like this though confuses me:
<shevy> def update; each(&:update)
<shevy> this just updates each entry?
<shevy> but I see you managed to reduce the amount of lines
<shevy> lol
<shevy> if cell_is_lonely?
<shevy> oh no wait
<shevy> if_cell_lonely?
<shevy> hehe
dhruvasagar has quit [Ping timeout: 265 seconds]
Hawklord has quit [Ping timeout: 276 seconds]
dhruvasagar has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
subbyyy has quit [Quit: Leaving.]
timonv has joined #ruby
burgestrand has quit [Quit: Leaving.]
arietis has joined #ruby
brdude has joined #ruby
twinturbo has joined #ruby
hoelzro|away is now known as hoelzro
jeff_sebring has joined #ruby
aezop has quit [Read error: Operation timed out]
Rochefort has joined #ruby
ph^ has joined #ruby
<hoelzro> morning Ruby folk
ph^_ has joined #ruby
xorigin has joined #ruby
unixf00l has left #ruby [#ruby]
burgestrand has joined #ruby
maxmmurphy has joined #ruby
y2k has joined #ruby
<shevy> holzo! hello!
<vectorshelve> shevy: doesnt that method name make sense from the context of the game ? :(
ph^ has quit [Ping timeout: 265 seconds]
<shevy> vectorshelve I think update is a logical name for a method name
opus has joined #ruby
<shevy> I dont really know what the game is about hahaha
opus has quit [Client Quit]
opus has joined #ruby
<vectorshelve> shevy: but you were talking about if_cell_lonely?
specialGuest has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<hoelzro> so, a question for those of you more grounded in Ruby in I. I'd like to automate Gemfile creation for a gem I'm making (and future gems). I've seen that Bundler can do this, but Bundler seems a bit too heavy for just that task. Are there any alternatives for this sort of thing?
arkiver has joined #ruby
ryanf has quit [Quit: leaving]
Hanmac1 is now known as Hanmac
<burgestrand> hoelzro: automate gemfile creation?
<shevy> vectorshelve ah yes, I found the method name funny
<burgestrand> hoelzro: ah, you mean gemspec?
<shevy> vectorshelve, I have mixed feelings about if_foo
<shevy> vectorshelve, normally, you would rather see code like this:
<shevy> if cell.is_lonely?
<shevy> or
<shevy> if cell.lonely?
<shevy> it's a bit odd to see
<shevy> if if_cell_lonely?(i)
specialGuest has quit [Changing host]
specialGuest has joined #ruby
<shevy> or
<shevy> array << i if_cell_lonely?(i)
<shevy> hmm wait
<shevy> array << i if if_cell_lonely?(i)
<hoelzro> burgestrand: I believe so
<hoelzro> I wrote a library, and I'd like to package it up as a Gem
dhruvasagar has quit [Ping timeout: 260 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
<burgestrand> hoelzro: here’s a starter guide for you (on the topic of gems): http://guides.rubygems.org/
dhruvasagar has joined #ruby
brianpWins has quit [Quit: brianpWins]
<burgestrand> hoelzro: as far as automatic gemspec creation I did automate it for me personally once but it actually went faster to just copy an old gemspec and modify the points I needed to change, the annoying things to set up for each new gem is the directory structure, license file, tests, rakefile and documentation
<bnagy> the ruby hard way stuff covers this and recommends having a 'skeleton' dir with all the basics and you just tweak values per new gem
MonsterWithin has quit [Ping timeout: 244 seconds]
<bnagy> which is probably imho not a bad approach
thone_ has joined #ruby
<burgestrand> Yeah. I use bundler to generate a new gem, which essentially is the same as doing that skeleton thing. The trick is to remember to change all placeholder values :)
<bnagy> I still find th gem stuff pretty arcane, tbh
brdude has quit [Quit: brdude]
<hoelzro> bnagy: you mean the ecosystem?
guns has quit [Quit: guns]
eldariof has joined #ruby
thone has quit [Ping timeout: 252 seconds]
qwerxy has quit [Quit: offski]
pen has quit [Remote host closed the connection]
SeanTAllen has quit [Remote host closed the connection]
MetaCosm has quit [Remote host closed the connection]
NimeshNeema_ has quit [Read error: Connection reset by peer]
igotnolegs has quit [Quit: Computer has gone to sleep.]
darren has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
chichou has joined #ruby
<shevy> hmm your largest project in .tar.bz2
darren has joined #ruby
<shevy> how large is it? in ruby... mine is at 144K
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
<shevy> hmm and all my ruby files together, in .tar.bz2, are 6.5M
<shevy> that's not much after 5 years
<shevy> :\
Fretta has quit [Quit: Fretta]
<davidcelis> code is small bro
<davidcelis> text doesn't take up that much space
<Hanmac> shevy do you count c-ext for ruby code too?
SeanTAllen has joined #ruby
MetaCosm has joined #ruby
qwerxy has joined #ruby
NimeshNeema_ has joined #ruby
tsccof has joined #ruby
qwerxy has quit [Client Quit]
becomingGuru has quit [Quit: Leaving.]
specialGuest has quit [Ping timeout: 276 seconds]
<banisterfiend> Hanmac: 'alut
<davidcelis> banisterfiend: why are you opped
<davidcelis> scary
darren has quit [Remote host closed the connection]
<banisterfiend> davidcelis: i am the big boss dog
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
cloud|droid has quit [Ping timeout: 260 seconds]
bluOxigen has joined #ruby
tagrudev has quit [Ping timeout: 240 seconds]
tagrudev has joined #ruby
kitofr has left #ruby [#ruby]
twinturbo has quit [Quit: twinturbo]
tsccof has left #ruby [#ruby]
Jackneill has joined #ruby
<macer_> anyone knows some bindata?
Jackneill is now known as Guest47435
yhyubub has left #ruby [#ruby]
bluenemo_ has joined #ruby
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
<macer_> is it normal that rake install builds and installs two times :/?
<macer_> built installed build installed
arturaz has joined #ruby
arkiver has quit [Quit: Leaving]
opus has quit [Quit:]
omry has quit [Read error: Connection reset by peer]
snearch has joined #ruby
elaptics`away is now known as elaptics
Vert has joined #ruby
vectorshelve has quit [Quit: Page closed]
bam has joined #ruby
timonv has joined #ruby
Rochefort has quit [Remote host closed the connection]
bluenemo_ has quit [Read error: Connection reset by peer]
shadoi has quit [Quit: Leaving.]
jeff_sebring has quit [Quit: Leaving]
Astral has joined #ruby
Rochefort has joined #ruby
[Neurotic] has quit [Quit: Leaving]
Rochefortes has joined #ruby
kartouch has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
mathie has joined #ruby
masteraka has left #ruby [#ruby]
Rochefort has quit [Ping timeout: 276 seconds]
TPFC-SYSTEM has joined #ruby
baphled has joined #ruby
baphled has quit [Client Quit]
baphled has joined #ruby
baphled has quit [Client Quit]
baphled has joined #ruby
pskosinski has joined #ruby
monkegjinni has joined #ruby
TPFC-SYSTEM has left #ruby [#ruby]
TPFC-SYSTEM has joined #ruby
vectorshelve has joined #ruby
peterhellberg has joined #ruby
g_rotbart has quit [Remote host closed the connection]
workmad3 has joined #ruby
nilg has joined #ruby
eataix has joined #ruby
t27331 has joined #ruby
paolooo has joined #ruby
nicoulaj has joined #ruby
Rochefortes has quit [Remote host closed the connection]
Boffers has joined #ruby
timonv has quit [Remote host closed the connection]
Rochefort has joined #ruby
paolooo has quit [Ping timeout: 245 seconds]
berserkr has joined #ruby
Bofu has quit [Ping timeout: 246 seconds]
<xbayrockx> hahahahahah anyone see stephan fecks dive?
<banisterfiend> xbayrockx: you're about 2-3 days behind ;)
apeiros_ has joined #ruby
pingfloyd has quit [Quit: pingfloyd]
qwerxy has joined #ruby
kyb3r has quit []
imami|afk is now known as banseljaj
dhruvasagar has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby
Markvilla has joined #ruby
muxcmux has joined #ruby
s1n4 has quit [Quit: leaving]
baphled has quit [Quit: Lost terminal]
haxrbyte has joined #ruby
baphled has joined #ruby
baphled has quit [Client Quit]
baphled has joined #ruby
muxcmux has left #ruby ["Textual IRC Client: www.textualapp.com"]
guns has joined #ruby
guns is now known as Guest52206
Criztian has joined #ruby
haxrbyte_ has joined #ruby
GaDI has joined #ruby
zaiste has quit [Ping timeout: 248 seconds]
GaDI has left #ruby [#ruby]
zaiste has joined #ruby
haxrbyte has quit [Ping timeout: 248 seconds]
ttilley has quit [Read error: Connection reset by peer]
ttilley has joined #ruby
ph^_ has quit [Remote host closed the connection]
ph^ has joined #ruby
<macer_> is there references in ruby or stuff like that?
<macer_> i.e.
ph^_ has joined #ruby
<macer_> from class I return an array
ph^_ has quit [Remote host closed the connection]
<macer_> and user changes in that array
<macer_> and that changes directly in class
banisterfiend` has joined #ruby
<burgestrand> macer_: it’s all there is in ruby
<macer_> continue please...:p
<burgestrand> macer_: ruby passes things by value, but the value ruby passes are the references to the objects themselves, kind of
ph^ has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
<burgestrand> observe: … loading
<macer_> hm
<burgestrand> macer_: http://codepad.org/sWHsxzpY
<macer_> not like that
tatsuya_o has joined #ruby
<burgestrand> macer_: so, you can modify objects and it “leaks”, but only if the object is mutable
<macer_> wait sec
Guest52206 has quit [Quit: Guest52206]
<bnagy> known technically as Pass Value By Reference Kind Of Depending On The Object
<macer_> i.e. there is class WTF
<macer_> class WTF has its @array
<macer_> b = wtfobject.array
<macer_> b[1] = "adding value"
<macer_> and I want then to that value be in class
davidpk has joined #ruby
<burgestrand> macer_: it wil be
* apeiros_ thinks that macer_ additionally messes up with "class has its @array"
<bnagy> no, it won't be
arietis has quit [Quit: Computer has gone to sleep.]
hoelzro is now known as hoelzro|away
<macer_> apeiros_: :p
<bnagy> @array is an instance variable, the way you describe it
mbuf has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<burgestrand> macer_: http://codepad.org/UIF4fpvv
<apeiros_> macer_: be aware that a class *itself* can very well have an @variable and that this @variable is *different* from @variables in *instances* of said class.
<bnagy> but it will change in that instance (wtfobject)
<macer_> o.O
dhruvasagar has quit [Ping timeout: 244 seconds]
hoelzro|away is now known as hoelzro
<burgestrand> instance variables vs instance variables, simple really
* burgestrand asplodes
<macer_> actually my real code is a little more complicated :p
ph^ has joined #ruby
<burgestrand> It always is, but I think your question is not your question so I would like to question your question and ask for the real question
<macer_> ohh wait it looks like it works
dhruvasagar has joined #ruby
<burgestrand> Oh joy!
<macer_> :D
<apeiros_> I acceidentally my code
<macer_> thanks for help, it looks like anyway it was all good :P
robbyoconnor has quit [Ping timeout: 276 seconds]
<macer_> hmm...
pskosinski has quit [Read error: Connection reset by peer]
<macer_> it doesn't work when the array on initialization is empty
pskosinski has joined #ruby
Hanmac has quit [Quit: Leaving.]
becomingGuru has joined #ruby
<burgestrand> macer_: MCMetadata has the cooties.
<macer_> has what?
<burgestrand> macer_: bugs.
<macer_> oh
<macer_> :P
<burgestrand> macer_: ;)
<burgestrand> macer_: at least, I would assume so.
<macer_> I will paste the code somewhere
<burgestrand> macer_: something done/not done on initialization and in the #[] method.
<macer_> burgestrand: have you used bindata maybe?
Rochefort has quit [Remote host closed the connection]
fearoffish has joined #ruby
<burgestrand> No, sorry. :o
flype has joined #ruby
s1n4 has joined #ruby
freeayu has quit [Ping timeout: 248 seconds]
Shrink has quit [Ping timeout: 248 seconds]
nathandim has joined #ruby
<macer_> *uploading code*
s1n4 has quit [Client Quit]
robbyoconnor has joined #ruby
lkba has quit [Quit: Bye]
freeayu has joined #ruby
<macer_> uhh I forget the passwodz to rubygems.org >.>
<macer_> and email too
cascalheira has joined #ruby
a_a_g has quit [Quit: Leaving.]
a_a_g has joined #ruby
t27331 has quit [Remote host closed the connection]
snearch has quit [Quit: Verlassend]
fastred has joined #ruby
burgestrand has quit [Quit: Leaving.]
Spooner has joined #ruby
answer_42 has joined #ruby
Araxia has quit [Quit: Araxia]
timonv has quit [Read error: No route to host]
arkiver has joined #ruby
timonv has joined #ruby
becomingGuru has quit [Quit: Leaving.]
omry has joined #ruby
becomingGuru has joined #ruby
nathandim has quit [Quit: Leaving]
mfridh has joined #ruby
davidpk is now known as dpk
tvw has joined #ruby
becomingGuru1 has joined #ruby
sspiff has quit [Read error: Connection reset by peer]
becomingGuru has quit [Ping timeout: 244 seconds]
bigkevmcd has quit [Ping timeout: 248 seconds]
Shrink has joined #ruby
seanstickle has joined #ruby
seanstickle has quit [Client Quit]
sspiff has joined #ruby
bigkevmcd has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
abstrusenick has quit [Quit: abstrusenick]
Shrink has quit [Ping timeout: 248 seconds]
ttilley has quit [Changing host]
ttilley has joined #ruby
tiripamwe has joined #ruby
<macer_> >> puts "hi"
<al2o3cr> hi
<al2o3cr> (NilClass) nil
Foxandxss has joined #ruby
Shrink has joined #ruby
Nanuq has quit [Quit: .]
<banisterfiend`> >> o = Class.new; o.instance_eval { def hello; "hello"; end; define_method(:goodbye) { "goodbye" } }; puts o.hello; puts o.goodbye
<al2o3cr> hello
<al2o3cr> exit status: 1
<al2o3cr> stderr was too long, I PMed it to you
<banisterfiend`> >> o = Class.new; o.instance_eval { def hello; "hello"; end; define_method(:goodbye) { "goodbye" } }; puts o.hello; puts o.new.goodbye
<al2o3cr> stdout was too long, I PMed it to you
<banisterfiend`> >> o = Class.new; o.instance_eval { def hello; "hello"; end; define_method(:goodbye) { "goodbye" } }; pring o.hello; print o.new.goodbye
<al2o3cr> exit status: 1
<al2o3cr> stderr was too long, I PMed it to you
<Muz> Pring.
<Muz> Pring. Pranana phone.
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
ph^ has quit [Remote host closed the connection]
<shevy> "Upgrading the code: German comments"
<shevy> german code comments in LibreOffice
<shevy> :\
<shevy> :/
<macer_> lol
yuriy has joined #ruby
<workmad3> >> send('cl' 'ass')
<al2o3cr> (Class) Object
<workmad3> STDIN
<workmad3> >> STDIN
<al2o3cr> (IO) #<IO:<STDIN>>
<workmad3> still there.. :)
<fowl> >> fork
<al2o3cr> (NilClass) nil
<al2o3cr> (Fixnum) 6815
<workmad3> fowl: cool :D
<fowl> >> $0
<al2o3cr> (String) "-e"
<workmad3> >> ARGV
<al2o3cr> (Array) []
<banseljaj> >> $_
<al2o3cr> (NilClass) nil
<shevy> >> ARGV.dup
<al2o3cr> (Array) []
<shevy> >> fork { ARGV.dup }
<al2o3cr> (Fixnum) 6848
<banseljaj> >> puts "Woohoo!"
<al2o3cr> (NilClass) nil
<al2o3cr> Woohoo!
<shevy> hmm
Shrink has quit [Ping timeout: 240 seconds]
<shevy> didn't return anything
<shevy> >> fork { return 5}
<al2o3cr> stderr was too long, I PMed it to you
<al2o3cr> (Fixnum) 6863
<banseljaj> >> x = "Woo"
<al2o3cr> (String) "Woo"
Nanuq has joined #ruby
<shevy> lol
<banseljaj> >> puts x
<al2o3cr> exit status: 1
<al2o3cr> stderr was too long, I PMed it to you
<shevy> <al2o3cr> (eval):1:in `block in <main>': unexpected return (LocalJumpError)
<workmad3> >> fork { p 5 }
<al2o3cr> 5
<al2o3cr> (Fixnum) 6884
<shevy> it still evals
<shevy> can't one of you abuse this?
<shevy> from -e:1:in `eval'
<shevy> what does the -e flag mean again? execute code?
<eregon> >> Dir['*']
<al2o3cr> (Array) ["open-uri20120810-5036-1wj6hu1", "usr", "open-uri20120810-5042-1j10n16", "root", "bin", "lib", "etc", "lost+found"]
<workmad3> ah, it's less restricted now... that's actually nicer :)
<eregon> >> ` hostname`
<al2o3cr> stderr was too long, I PMed it to you
<workmad3> >> $stdout.puts "Hi"
<al2o3cr> exit status: 1
<al2o3cr> Hi
<al2o3cr> (NilClass) nil
<fowl> >> $stdout.puts "\n"*20
<al2o3cr> stdout was too long, I PMed it to you
<workmad3> >> $stdout.puts "Hi, I'm a robot" && 5
<al2o3cr> 5
<al2o3cr> (NilClass) nil
<workmad3> heh, yeah, that was dumb of me
banseljaj is now known as imami|afk
ph^_ has joined #ruby
<al2o3cr> Hi, I'm a robot
<workmad3> >> $stdout.puts("Hi, I'm a robot") || 5
<al2o3cr> (Fixnum) 5
<shevy> lol
<workmad3> >> $stdout.puts("Hi, I'm a robot") || "I'm going to break"
<al2o3cr> (String) "I'm going to break"
<al2o3cr> Hi, I'm a robot
<shevy> > $stdout.puts("Gosh, I am such a stupid bot ...")
<macer_> >>*
<al2o3cr> stderr:
<al2o3cr> from -e:1:in `<main>'
<al2o3cr> -e:1:in `eval': (eval):1: syntax error, unexpected $end, expecting '=' (SyntaxError)
<al2o3cr> exit status: 1
<shevy> fail
<shevy> >> $stdout.puts("Gosh, I am such a stupid bot ...")
<al2o3cr> (NilClass) nil
<al2o3cr> Gosh, I am such a stupid bot ...
<shevy> :(
<macer_> :(
<workmad3> >> $stdout.puts("Get back to work!")
<al2o3cr> (NilClass) nil
<al2o3cr> Get back to work!
<shevy> wow
<shevy> >> $stdout.puts( x= 5; eval x)
<al2o3cr> stderr was too long, I PMed it to you
<al2o3cr> exit status: 1
<banisterfiend`> >> e = Enumerator.new { |y| i = -1; loop { y << (i += 1) }; Hash[('a'..'c').zip(e.cycle)]
<al2o3cr> stderr was too long, I PMed it to you
<al2o3cr> exit status: 1
<shevy> ??
<shevy> why twice
<shevy> I wanna control that mars rover thing
<shevy> and have it send more coloured pictures or even full videos
<eregon> >> (1..1000).reduce(:*)
<al2o3cr> stdout was too long, I PMed it to you
<shevy> and drive around on mars
<macer_> I asked robot for list of all files on system
<macer_> what a spam
<shevy> hehe
<shevy> it gives information about its files surroundings?
<banisterfiend`> >> e = Enumerator.new { |y| i = -1; loop { y << (i += 1) } }; Hash[('a'..'c').zip(e.cycle)]
<al2o3cr> (Hash) {"a"=>0, "b"=>1, "c"=>2}
<kalleth> >> `shutdown -h now`
<al2o3cr> stderr was too long, I PMed it to you
<kalleth> ¬_¬
<macer_> @_@
<al2o3cr> exit status: 1
<kalleth> ¬_¬
<kalleth> >> Kernel.exec("halt")
<al2o3cr> stderr was too long, I PMed it to you
<macer_> dont
<al2o3cr> exit status: 1
<macer_> do
<macer_> this
<kalleth> ok, ok :p
<macer_> :D
<eregon> >> Process.uid
<al2o3cr> (Fixnum) 1000
<macer_> >> Dir["etc/**"]
<al2o3cr> (Array) ["etc/resolv.conf", "etc/ld.so.cache", "etc/pam.d", "etc/sudoers", "etc/group", "etc/passwd", "etc/nsswitch.conf"]
<macer_> >> `cat /etc/passwd`
<al2o3cr> stderr was too long, I PMed it to you
<al2o3cr> exit status: 1
<shevy> hmmm
macer_ is now known as macer1
<shevy> odd
<Muz> You can message the bot in a /query window, rather than spamming the channel.
sepp2k has joined #ruby
<macer1> >> `cat /etc/passwd`.to_s
<al2o3cr> stderr was too long, I PMed it to you
<al2o3cr> exit status: 1
<shevy> notice the '.' at the end of the sentence :)
<eregon> >> require 'etc' and Etc.getlogin
<al2o3cr> (String) "jrajav"
<macer1> nice find
<shevy> hehe
<shevy> hmm
butblack has joined #ruby
<shevy> never saw this combination before... with require, and then an "and"
<eregon> hehe :)
<macer1> hah, nice
<eregon> won't work twice
<shevy> that is kinda cool... require 'pp' and pp my_object for one-liner debugs
<shevy> oh? why not?
<eregon> >> require 'etc' and Etc.getlogin
<al2o3cr> (String) "jrajav"
<shevy> the bot is cheating
<Muz> Re-requiring the same module twice in a single session returns false.
<eregon> ah weird, require should return false
<shevy> yeah eregon, it's a cheating bot
<shevy> it runs some kind of mini-baby ruby language
<Muz> The bot is sanboxed and runs each command under a seperate ruby instance, which is then cleaned up after execution.
<Muz> *sandboxed
<eregon> ah, it's forking at every line?
<kalleth> >> `/bin/cat /root/.ssh/id_rsa.pub`
<al2o3cr> (String) ""
<al2o3cr> [FATAL] Failed to create timer thread (errno: 11)
<al2o3cr> stderr:
<kalleth> aha
<kalleth> :p
nari_ has quit [Ping timeout: 245 seconds]
<macer1> ^^
<shevy> you guys have way too much time :P
<macer1> /bin is empty btw.
<macer1> >> Dir["bin"]
<al2o3cr> (Array) ["bin"]
<macer1> >> Dir["bin/*"]
<al2o3cr> (Array) []
<macer1> there are no cats there
<kalleth> pfft
berserkr has quit [Quit: Leaving.]
<shevy> ?
<Muz> Rather unsurprisingly.
<shevy> ah well
butblack has left #ruby [#ruby]
<shevy> if it is sandboxed or chrooted, that makes sense
<shevy> I hate /bin anyway
* kalleth considers writing a ruby 1liner to download a binary process that will fork into the bg
timonv has quit [Remote host closed the connection]
arkiver has quit [Ping timeout: 246 seconds]
jjang has quit [Ping timeout: 244 seconds]
<macer1> >> File.open("etc/passwd").read
<al2o3cr> (String) "root:x:0:0:root:/root:/bin/bash\nbin:x:1:1:bin:/bin:/bin/false\ndaemon:x:2:2:daemon:/sbin:/bin/false\nmail:x:8:12:mail:/var/spool/mail:/bin/false\nftp:x:14:11:ftp:/srv/ftp:/bin/false\nhttp:x:33:33:http:/srv/http:/bin/false\nnobody:x:99:99:nobody:/:/bin/false\ndbus:x:81:81:System message bus:/:/bin/false\njrajav:x:1000:100::/home/jrajav:/bin/bash\nal:x:1001:1001::/home/al:/bin/bash\n"
<kalleth> hahahaha
<hoelzro> whoa
<macer1> hmm, we are jrajav
<eregon> >> Dir.pwd
<al2o3cr> (String) "/"
<eregon> yeha, definitely chroot'ed
<workmad3> >> Dir["/bin/*"]
<al2o3cr> (Array) []
<workmad3> >> Dir["/usr/bin/*"]
<al2o3cr> (Array) ["/usr/bin/ruby", "/usr/bin/sudo"]
<kalleth> ooh.
<workmad3> >> Dir["/usr/sbin/*"]
<al2o3cr> (Array) []
<kalleth> workmad3: do you have the same instinctive reaction to try and break it whenever someone comes in with bots like this
<workmad3> >> Dir["/sbin/*"]
<al2o3cr> (Array) []
<kalleth> Dir["/root"]
<workmad3> kalleth: who doesn't? :P
<kalleth> >> Dir["/root"]
<al2o3cr> (Array) ["/root"]
<kalleth> >> Dir["/root/*"]
<al2o3cr> (Array) []
<eregon> >> ENV['PATH']
<al2o3cr> (String) "/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl"
<workmad3> >> Dir["/**/*"]
<al2o3cr> stdout was too long, I PMed it to you
<macer1> fail
<workmad3> it's still going :D
<workmad3> macer1: it's doing it all :P
<macer1> that's why I changed nick
<macer1> :)
<kalleth> >> File.rm("/usr/bin/ruby")
<al2o3cr> stderr was too long, I PMed it to you
<macer1> ouch
<al2o3cr> exit status: 1
<kalleth> >> File.delete("/usr/bin/ruby")
<macer1> it's not that easy
<al2o3cr> stderr was too long, I PMed it to you
<macer1> we are not root
<al2o3cr> exit status: 1
<kalleth> permission denied ;(
<chiel> what the shit is going on in here O.o
workmad3 is now known as workmad4
workmad4 is now known as workmad3
<bnagy> >> `uname -a`
<kalleth> >> `/usr/bin/sudo rm /usr/bin/ruby`
<kalleth> yes, i know that's going to fail
<macer1> what the fuck it stopped working
<kalleth> hahaha
<macer1> :(
<macer1> kalleth: you win a cookie!
<bnagy> >> system "uname -a"
<macer1> the bot is dead
workmad3 is now known as workmad4
<eregon> >> "I'm dead"
<bnagy> oh well, that was fun
<workmad4> heh
<macer1> yeah
<macer1> it was
<eregon> so password-less /usr/bin/sudo? that's crazy :)
<macer1> >> "I am not dead, I was just joking ;)"
<al2o3cr> stderr was too long, I PMed it to you
<al2o3cr> exit status: 1
<macer1> that was a lag
<al2o3cr> (String) ""
<al2o3cr> stderr:
<eregon> still remembered old commands, nice
Shrink has joined #ruby
<al2o3cr> [FATAL] Failed to create timer thread (errno: 11)
Rochefort has joined #ruby
workmad4 is now known as workmad3
<macer1> ...
<bnagy> >> RbConfig::CONFIG
<al2o3cr> (NilClass) nil
<workmad3> I wonder if it was just busy pming me the entire filesystem contents..
<macer1> hahaha
<macer1> :D
<workmad3> bah, it resumed... oh well, let it keep it up :)
banisterfiend` is now known as banisterfiend
<bnagy> no rbconfig? :/
bam has quit [Quit: Leaving...]
<bnagy> how can I look for chroot escapes if I don't know the os!
<al2o3cr> (String) "I'm dead"
<workmad3> bnagy: heh :)
<eregon> ahah 5 min lag
twinturbo has joined #ruby
<bnagy> >> require 'rbconfig'; p RbConfig::CONFIG
<al2o3cr> (String) "I am not dead, I was just joking ;)"
<bnagy> oic
perry is now known as perryh_away
<macer1> [12:51:41] <al2o3cr> "I AM SO DEAD" :(
<macer1> [12:52:00] <al2o3cr> ^
<macer1> WTF?
wallerdev has quit [Quit: wallerdev]
dhruvasagar has quit [Ping timeout: 248 seconds]
<fowl> >> IO
arkiver has joined #ruby
xorox90 has joined #ruby
<fowl> >> IO.popen 'uname -a', &:read
dhruvasagar has joined #ruby
ttilley has quit [Quit: ttilley]
<banisterfiend> >> STDIN.class
<macer1> >> require 'net/http'; Net::HTTP.get_print 'my-ip.heroku.com','/'
<banisterfiend> >> STDIN.class.read(__FILE__)
<macer1> now wait 5 minutes for result
<banisterfiend> >> STDIN.class.read($0)
<al2o3cr> stdout was too long, I PMed it to you
<qko> >:D
<eregon> <eregon> >> ENV['PATH'].split(':').flat_map {|d| Dir["#{d}/*"] }
<eregon> <al2o3cr> (Array) ["/usr/bin/ruby", "/usr/bin/sudo"]
vlad_starkov has joined #ruby
arkiver has quit [Max SendQ exceeded]
<eregon> waow, really not a lot in path
<qko> sudo in path
<qko> that is not good
<macer1> >> "I AM LAGGING SO MUCH :("
arkiver has joined #ruby
<al2o3cr> stdout was too long, I PMed it to you
liluo has quit [Ping timeout: 244 seconds]
Lachryma has joined #ruby
<macer1> al2o3cr: pls don't lag k thx
<al2o3cr> (Class) IO
<banisterfiend> >> STDIN.class.read($0)
<bnagy> ooh...
<bnagy> >> require 'ffi'
<Muz> QKO: why, is sudo in the path no good?
<qko> Muz: not in a bot hosted path
<Muz> QKO: why?
<qko> >> system('reboot')
<qko> oh wait
<al2o3cr> stderr was too long, I PMed it to you
<qko> >> system('sudo reboot')
<macer1> its not root
<Muz> You seem to misunderstand what sudo does and how it can be configured.
<macer1> I found a cool way to kill it
<qko> Muz: it allows you to do things as a different user
<macer1> but I don't want to
<qko> depending on config of course
MarGarina has quit [Ping timeout: 244 seconds]
<Muz> It being in the PATH is not inherently bad though.
<macer1> it is already half-dead...
<qko> sadly the default config is to allow the main user to get root access without a password check
<al2o3cr> exit status: 1
<bnagy> QKO: hahahah hahahah on which distro?
<qko> bnagy: ubuntu
<macer1> no?
<Muz> After you've authenticated once before.
<qko> iirc anyway
<al2o3cr> (Class) IO
yuriy has quit [Read error: Connection reset by peer]
<qko> Muz: fair enough
<bnagy> pff not on server, which is the only think I use
<al2o3cr> 167.68.114.6
<fowl> jeez
<macer1> :)
<macer1> good bot
<qko> but heck, I even added myself to the wheel group so I can get free sudo access
<fowl> took tha thing 6 minutes to respond to me
<bnagy> and it only remembers successful sudo for a while
<al2o3cr> (NilClass) nil
<al2o3cr> stderr was too long, I PMed it to you
<Mon_Ouie> What changed with that bot?
<al2o3cr> exit status: 1
akemrir has joined #ruby
<qko> bnagy: it's just very susceptible to bad configurations, and if its purpose is to just run ruby, you probably shouldn't include it
<al2o3cr> stderr was too long, I PMed it to you
burgestrand has joined #ruby
<al2o3cr> exit status: 1
<bnagy> QKO: or alternatively you just don't know what you're talking about
<macer1> hmm
<macer1> all ports all blocked
akemrir has quit [Client Quit]
<al2o3cr> (String) "I AM LAGGING SO MUCH :("
<al2o3cr> stderr was too long, I PMed it to you
<al2o3cr> exit status: 1
<al2o3cr> stderr was too long, I PMed it to you
<al2o3cr> exit status: 1
<al2o3cr> (NilClass) nil
<qko> bnagy: yeah, cuz leaving a possible backdoor open is such a great idea!
<al2o3cr> (NilClass) nil
<bnagy> QKO: in what way is sudo a backdoor?
<macer1> al2o3cr: can do u do some tricks?
<qko> bnagy: in the same way many users will configure it
<bnagy> QKO: it's a chroot jail
<qko> meaning: no password checks
<macer1> 167.68.114.6 hmm
<macer1> looks like all trafic is cut on firewall
<fowl> >> Math.sqrt 2
Criztian has quit [Remote host closed the connection]
<kalleth> macer1: reverse SSH tunnel in pure ruby?
<al2o3cr> (Float) 1.4142135623730951
tobyo has quit [Read error: Connection reset by peer]
<bnagy> >> require 'ffi'; p FFI
<al2o3cr> stderr was too long, I PMed it to you
<Inoperable> shevy: a 10+ new question about regxp
<al2o3cr> exit status: 1
<macer1> I think I found the owner of bot
<macer1> :)
<macer1> cinch
<qko> I still didn't get pmed for my reb00t attempt
<macer1> he is online on freenode
<bnagy> 19:04 <al2o3cr> -e:1:in `eval': cannot load such file -- ffi (LoadError)
<bnagy> :(
<burgestrand> macer1: it’s an IRC bot framework
<fowl> macer1: bot owner is jravsomething
<bnagy> that would have been so much win
<Inoperable> guys, i can't wrap my head around a simple regxp
<macer1> oh
<macer1> :D
<fowl> Inoperable: try it out on rubular.com
<burgestrand> :)
<Inoperable> fowl: i tried, but can't get thrugh :/
<Inoperable> fowl: pisses me off cause it's quite simple
<Inoperable> fowl: i don't get the grouping selection thing
<bnagy> Inoperable: how about asking your question then
<bnagy> instead of talking about how you have a question
MarGarina has joined #ruby
<macer1> supybot is coller
<macer1> cooler*
<qko> that will generally help :D
<macer1> !ping
<macer1> al2o3cr: ping
<macer1> !ping @ping #ping $ping %ping ^ping &ping *ping
<Inoperable> bnagy: [word, word, word, word, word, word, word,] into ["word", "word", "word", ...]
<macer1> [word,word,word].map &:to_s
<burgestrand> :p
<macer1> :)
<Inoperable> macer1: ...
<Inoperable> macer1: can you elaborate a bit? ;)
<macer1> ...
<burgestrand> Inoperable: you really have a trailing comma?
<burgestrand> Inoperable: also, can words contain commas?
<Inoperable> its an example
<bnagy> is the first thing a string, or what?
<burgestrand> I know, that’s why I ask, why are you not answring :(
<Inoperable> i need to put " " around some words
<bnagy> words.map {|w| "\"#{w}\""}
<Inoperable> bnagy: pure regxp
<bnagy> why on earth would you use a regexp for that?
<burgestrand> Beginning to sound like homework
<macer1> :p
* burgestrand coughs
<Inoperable> i asked about regexp, right?
<qko> burgestrand: beginning?:D
<Inoperable> ;)
<Inoperable> cant learn regexp when i dont understand it
<Spooner> I suspect it is just about a really vague question being answered in 100 reasonable ways, but not the right one, because the specification is so broken :)
<chiel> regular-expressions.info :p
dhruvasagar has quit [Ping timeout: 244 seconds]
<qko> Inoperable: I know that the sed command for something like that would be something like s/(*)/"$1"/ or something among those lines
<Spooner> Inoperable : Why not tell us what you are trying to achieve instead of giving us broken code and expecting us to know how you want it to be fixed?
dhruvasagar has joined #ruby
burgestrand has quit [Quit: Leaving.]
lkba has joined #ruby
<shevy> Inoperable regexinfo page is useful
<shevy> yeah
<shevy> regular-expressions.info
<bnagy> QKO: you need a specifier - .* probably
<shevy> Inoperable dedicate a full day to understand regexes
<macer1> Bot is dead...back to work :P
cascalheir has joined #ruby
<bnagy> "cat".sub(/.*/) {|s| "\"#{s}\""} would work I guess
<shevy> macer1 how did it die?
<Inoperable> shevy: yeah, just grabbed the oreilly ebook for it
<macer1> half-dead*
<bnagy> I hate the \1 $1 stuff :(
<macer1> >> "I am half dead and lagging so much"
<bnagy> actually I mostly hate regexp
<al2o3cr> (String) "I am half dead and lagging so much"
<chiel> Inoperable: that book is pretty good. there's 2, one is more of a reference guide
fermion_ has joined #ruby
<chiel> the actual book on it is pretty awesome
<macer1> >> ping
<al2o3cr> stderr was too long, I PMed it to you
<al2o3cr> exit status: 1
<Inoperable> bnagy: im not asking about ruby way but about correct regexp to select \+w and wrap it in " " or {} or $ $, is that enough well specified?
<bnagy> Inoperable: regexps match stuff, they don't tell you how to replace stuff
<bnagy> the match you want is /.*/
<qko> bnagy: myeah, been out of that for quite a while
<Inoperable> chiel: i grab the thin one
<qko> Inoperable: and you put () around what you want to store it
emmanuelux has joined #ruby
<chiel> Inoperable: yeah, that one is more of a reference guide I believe, but should be just fine
<bnagy> except you don't need to group there, the block form captures your match, and you want to match the whole string
<dr_bob> Inoperable: str.gsub /\w+/, '"\\&"'
<chiel> not like you really need to know the internals of the engine.
yuriy has joined #ruby
<Inoperable> dr_bob: perfect, thanks
cascalheira has quit [Ping timeout: 276 seconds]
<dr_bob> YWC, if you need to change in place use gsub!
<dr_bob> i.e. with exclamation mark
Stalkr_ has joined #ruby
timonv has joined #ruby
<Inoperable> shevy: yeah, i need more time to get my head over regexp. was avoiding it long enough ;)
yuriy has quit [Read error: Connection reset by peer]
<Inoperable> is the standard regexp implemented in all linux gawk, grep, sed the same way?
<dr_bob> Inoperable: I didn't read all the history, were you recommended "Mastering Regular Expressions" (O'Reilly)? Other than that, the program "The Regex Coach" is really helpful to understand how matching works. Unfortunately it's windows only.
justsee is now known as justsee|away
r0bby has joined #ruby
<shevy> Inoperable, same here. regexes make my brain go very slowly... and my brain is already very slow
<dr_bob> Inoperable: no unfortunately not
<chiel> Inoperable: there's subtle differences usually
<Inoperable> dr_bob: windows only? hehe
<shevy> Inoperable easy solution - give up on gawk grep and sed, and use ruby
<chiel> like every implementation :p
<dr_bob> Inoperable: might work under WINE as well
<chiel> most implementations of regex try to be perl-compatible versions, as far as I'm aware
<Inoperable> shevy: gawk grep and sed are being used since 30+ years so i think im gonna stick with them
cascalheir is now known as cascalheira
<shevy> we used to have horses rather than cars too in the past
<Inoperable> true
robbyoconnor has quit [Ping timeout: 276 seconds]
<shevy> they worked very well for thousand years so let's use them
becomingGuru1 has quit [Quit: Leaving.]
<bnagy> TIL horses were invented in 1012
<shevy> Inoperable, the thing I dont like about these tools is that they assume different options or syntax... especially awk
<Inoperable> if henry ford would ask ppl what they like to have back then, they will tell him faster horses though
<zii> bnagy, r/circlejerk?
<shevy> grep I actually like
<shevy> Inoperable, do you know why he used black paint for his cars?
<shevy> Inoperable, it was cheaper and also dried faster than other colours
<Inoperable> was a standard bakc then?
<shevy> well kinda
<shevy> I guess pink cars would have been more difficult
<shevy> back then perhaps
<shevy> today we can have DIAMOND CARS IN 10000 COLOURS
<Spooner> Inoperable : Not necessarily. More likely to be horses that didn't get sick and die all the time (this was a major problem in New York just before the cars appeared) :)
<shevy> out from a 3D printer
r0bby is now known as robbyoconnor
<qko> shevy: actually, the dutch monarchs still go by horse at times
<Inoperable> i dont see colors propery, so i don't care ;]
<qko> (pisses me off)
urbann has joined #ruby
<Spooner> shevy : The "Any colo(u)r as long as it is black" is a fallacy, I think.
urbann has left #ruby [#ruby]
crodas has quit [Quit: Disconnecting from stoned server.]
crodas has joined #ruby
<Inoperable> QKO: they go by horse where? around the castle?
<workmad3> Spooner: it's an urban legend, iirc :)
<qko> Inoperable: pretty much
<workmad3> (that's also to shevy btw)
<qko> just enough to annoy the crap out of every driver that has to go to work
<Inoperable> well, horses need their daily walk i guess
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Markvilla has quit [Quit: Computer has gone to sleep.]
Spooner_ has joined #ruby
mike4_ has joined #ruby
becomingGuru has joined #ruby
yuriy has joined #ruby
becomingGuru has quit [Client Quit]
Spooner has quit [Ping timeout: 276 seconds]
nwest has quit [Quit: Computer has gone to sleep.]
kpshek has joined #ruby
Spooner_ is now known as Spooner
bluenemo_ has joined #ruby
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has quit [Read error: Connection reset by peer]
<Inoperable> shevy: http://www.txt2re.com/ ;-)
<chiel> wow
<chiel> that's like
<chiel> harder than writing a regular expression
<chiel> :D
<fowl> omg
<fowl> Inoperable: you understand this stuff?
<Inoperable> hehe
<Inoperable> fowl: no but the picture in the left corner made me laugh
<chiel> hahaha
<chiel> xD
justsee|away is now known as justsee
berserkr has joined #ruby
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
fermion_ is now known as fermion
<Inoperable> i mean shevy said he gots a headeach from regex and that guy looks like he's been through regex hell
fantazo has joined #ruby
twinturbo has quit [Quit: twinturbo]
mengu has joined #ruby
liluo has joined #ruby
twinturbo has joined #ruby
twinturbo has quit [Client Quit]
eikko has joined #ruby
Eplemosen has joined #ruby
geekbri has joined #ruby
chridal has joined #ruby
xclite has quit [Read error: Connection reset by peer]
graspee has joined #ruby
fearoffish has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<chridal> Could anyone please do me a favor? And see if you can connect to irc.esper.net . I was just unable to connect, but am now unable to. Really apreciate it!
xclite has joined #ruby
Criztian has joined #ruby
nedbat has joined #ruby
<chiel> you were unable twice? :D
nanderoo has joined #ruby
xclite has quit [Read error: Connection reset by peer]
<chridal> yea, typo.
<chridal> I was able to, but now uanble to :)
fearoffish has joined #ruby
xorox90 has quit [Ping timeout: 260 seconds]
<chiel> :D
<chridal> did you have any luck?
xclite has joined #ruby
<chiel> I didn't try :p
<chiel> hang on.
<chiel> port 6667?
<chridal> yes
<chiel> works for me
<chridal> that is so weird.
<chridal> But thanks!
<chridal> must be my client
<chiel> just did /connect irc.esper.net
<chiel> in irssi
<chridal> yea, im in irssi as well.
<chridal> will have to check conf.
<chridal> ty.
chridal has quit [Client Quit]
<chiel> hmm
* workmad3 wonders if chridal knows that sometimes servers become inaccessible from locations
<chiel> weird :)
<chiel> they should have something downjustformeorforeveryone for irc
<chiel> :p
<workmad3> chiel: well, you could just put the domain in
<workmad3> chiel: or ping it :)
<chiel> workmad3: yeah I know :p
<workmad3> I suspect the issue is he lost the route entirely
<chiel> perhaps yeah
pferdone has joined #ruby
mrwalker has joined #ruby
nwest has joined #ruby
adeponte has quit [Remote host closed the connection]
g_rotbart has joined #ruby
Inoperable has quit [Quit: Rectify]
chridal has joined #ruby
ephemerian has quit [Read error: Connection reset by peer]
v0n has joined #ruby
yuriy has quit [Read error: Connection reset by peer]
jonathanwallace has quit [Remote host closed the connection]
iamjarvo has joined #ruby
anoldhacker has joined #ruby
<anoldhacker> I'm having trouble with regex & \G. I seem to be anchored at the start of the string. I'm playing in the console right now. Thoughts?
talsamon has joined #ruby
<macer1> it's time for a little break in work. but is working again :D
<macer1> bot*
a_a_g has quit [Quit: Leaving.]
a_a_g has joined #ruby
<dr_bob> anoldhacker: example?
<anoldhacker> @str = "asdf asdfe 1234 wersd 2354 asdffe sfd sfd dfs 345"
<anoldhacker> def grab_next ; @str =~ /\G([\w].*?)(?:(?= \d)|$)/ ; $1 ; end
Paul-Atreides has joined #ruby
<bnagy> I didn't even know we supported \G
<anoldhacker> Actually, I get the same thing with a trivial example: /\G(\w+)/
<Spooner> anoldhacker : What are you trying to do exactly?
<anoldhacker> It's in the 1.9.3 docs
yasushi has joined #ruby
niklasb has joined #ruby
<anoldhacker> I'm trying to break up a line consisting of numbers, dates, and strings. The fields are space separated, and spaces inside the strings are allowed.
<bnagy> sounds like a job for scan
<anoldhacker> I hadn't thought of that.
baphled has quit [Quit: Lost terminal]
baphled has joined #ruby
<bnagy> >> "asdf asdfe 1234 wersd 2354 asdffe sfd sfd dfs 345".scan /\d+/
<al2o3cr> (Array) ["1234", "2354", "345"]
<bnagy> but depends exactly what you want to end up with
xorox90 has joined #ruby
<bnagy> that \G voodoo looks horrible though
<bnagy> but from a quick skim, it matches where the last match finished, and there's no last match in your examples
yasushi has quit [Remote host closed the connection]
charliesome has joined #ruby
<anoldhacker> In my case, the field set is fixed. So a generated regexp will solve the problem. But \G (which is REALLY powerful) appears to be broken...
yasushi has joined #ruby
<anoldhacker> 1.9.3p194 on Darwin
<bnagy> ok well if I found that regexp in any code I was working on I would go and stab the comitter
yuriy has joined #ruby
himsin has quit [Remote host closed the connection]
doherty has joined #ruby
yasushi has quit [Ping timeout: 268 seconds]
<doherty> I was trying to do `sudo gem install bundle` and it bailed out with "File not found: lib ERROR: While generating documentation for bundle-0.0.1" What should I be doing to fix this?
yasushi has joined #ruby
<fowl> doherty: doc generation is done after the gem installs
<fowl> doherty: so if you dont need them locally you're fine
<doherty> Yes, I saw that
<doherty> I would prefer to have them locally
<fowl> gem install rdoc to update rdoc
<Muz> doherty: you really mean 'gem install bundler'
<banisterfiend> doherty: if you're using pry to read documentation, u dont need them pregenerated as it grabs them only when it needs them
strnx has quit [Quit: GeekBouncer - http://geekbouncer.co.uk]
<Muz> 'bundle' is a placeholder gem that depends on bundler, to have it install bundler.
<doherty> but I was more concerned that not being able to generate documents indicated a serious problem with the ruby setup. It's a fairly basic functionality so when the very first ruby command you run dies, you start wondering if you've chosen the right tool :)
<Muz> That error doesn't really matter, it's just the placehlder gem being shoddily written.
<banisterfiend> doherty: take the time to setup rvm or rbenv
<fowl> +1 banisterfiend
<Muz> What you're really be worried about and referencing is the bundler ri/rdoc.
<banisterfiend> there's usually something busted about distro versions of ruby
<bnagy> rbenv rbenv rbenv
<doherty> I'll take a look
yasushi has quit [Ping timeout: 240 seconds]
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has joined #ruby
yasushi has joined #ruby
tommyvyo has joined #ruby
elhu has joined #ruby
<dr_bob> anoldhacker: you said fields are space delimited but spaces are allowed in fields. That does not work.
Eplemosen has quit [Quit: NOPE]
<dr_bob> What exactly is the format?
<anoldhacker> In general, no. But if you don't allow successive string fields, it can work. (Dates and numbers start with digits...)
<anoldhacker> Very ugly, but what I'm supposed to support.
<dr_bob> So you have alternating fields starting with a digit and fields starting with no digit?
tiripamwe has quit [Ping timeout: 244 seconds]
<anoldhacker> My original regexp had problems even without the \G thing. But, as I said, this works better with a composed regexp
liluo has quit [Remote host closed the connection]
nanderoo has quit [Quit: Leaving.]
liluo has joined #ruby
jgarvey has joined #ruby
senny has quit [Remote host closed the connection]
<bnagy> how about splitting on space and just using a simple token parser?
jrajav has joined #ruby
<bnagy> by the sounds all you need to do is rejoin any \w+ next to \w+ and the rest are correct
<jrajav> Muz: Um.
<jrajav> Muz: wtf did you run on the bot :P
<dr_bob> anoldhacker: s.scan /\b\d.*?\b(?=\s+\D|$)|\b\w.*?\b(?=\s+\D|$)/
arkiver has quit [Quit: Leaving]
<dr_bob> => ["asdf", "asdfe 1234", "wersd 2354", "asdffe", "sfd", "sfd", "dfs 345"]
<dr_bob> na
<Muz> jrajav: it's sending me the contents of http://mustaqila.li/crap/noideadog.png over the medium of ASCII and IRC.
<anoldhacker> composition is REALLY the way to go here...
<Muz> The bot clearly has no idea what it's doing.
<jrajav> For how long now? :P
senny has joined #ruby
<Muz> jrajav: it started before I went for lunch... so over 2 hours ago?
<jrajav> Sweet
Markvilla has joined #ruby
<Muz> About the bot having an upper bound on the length of output it returns... :P
<jrajav> By the way, I lost my backup
<jrajav> Of the bot
<jrajav> :(
<jrajav> So now I have to spend the next 15 minutes typing out 40 lines of code that I've already memorized by now
<jrajav> 30 of which is boilerplate Cinch
<jrajav> f my life, eh?
nanderoo has joined #ruby
<jrajav> (Over the weekend, the bot script was deleted in a nice demonstration of how I didn't set folder permissions correctly :P)
<jrajav> Don't worry Muz, I'll keep it sending your image until I'm done
<doherty> "rake aborted! no such file to load -- facter" - Is this 'facter' a 'gem' that is missing?
<dominikh> 30 lines of boilerplate cinch? I tend to doubt that :)
<Muz> jrajav: well at least I'll be able to rebuild that PNG from my IRC logs alone...
<jrajav> Is it? The hello world example is 15 lines
linoj has joined #ruby
<fowl> lol?
v0n has quit [Ping timeout: 260 seconds]
<bnagy> dr_bob: what about "asdf asdfe 1234 wersd 2354 asdffe sfd sfd dfs 345".split(/ (\d+) ?/) ?
sendoushi has joined #ruby
centipedefarmer has joined #ruby
<Muz> doherty: possibly, or it's a file named "facter" within the codebase that rake or something else is failing to load for whatever reason.
subbyyy has joined #ruby
<dr_bob> bnagy: naa, that looks much too simple. ;-)
<jrajav> bnagy: Save a kitten, use \s
tiripamwe has joined #ruby
<jrajav> Or better yet \b
<dr_bob> Also, it's not clear whether the whole field will be digits.
<dr_bob> And I would split on \b as jrajav said
<dominikh> and if it takes you 15 minutes to type 40 lines of memorized code... wow.
<bnagy> no, I won't save any kittens, because solving this problem with a regexp is f'ing stupid
<doherty> Muz: okay, thanks, I figured it might be a standard error message that I wouldn't recognize.
subbyyy has quit [Client Quit]
Inoperable has joined #ruby
<dr_bob> s.split(/\b(\d+)\b/).each &:strip! => ["asdf asdfe", "1234", "wersd", "2354", "asdffe sfd sfd dfs", "345"]
<dr_bob> nice!
<bnagy> the trailing ? was to get the one at the end
Inoperable has quit [Client Quit]
<bnagy> but strip works
<dr_bob> Even better: s.split(/\s*\b(\d+)\b\s*/) => ["asdf asdfe", "1234", "wersd", "2354", "asdffe sfd sfd dfs", "345"]
<bnagy> why do you need \b as well?
<jrajav> dominikh: Yeah I was clearly being literal, and I was also clearly referring to just the act of typing. You should try coffee instead of being an ass for no apparent reason -- might start your morning off a little better
<dr_bob> because \s* matches the empty string, i.e. everywhere
<bnagy> oh right I see
emsilva has joined #ruby
arietis has joined #ruby
<dr_bob> fields which are not numbers might contain digits, I figure
<bnagy> hard to see why \b...\b? isn't just better then :/
Paul-Atreides has left #ruby ["Leaving"]
<dominikh> first of all, my morning started 10 hours ago. second, coffee would give me diarrhea, so probably not better, no.
fmcgeough has joined #ruby
<dr_bob> \s* will eat the whitespace and avoid split
<dr_bob> err strip
<bnagy> and yet... still retraded, unreadable and breakable
Inoperable has joined #ruby
<dr_bob> like?
vectorshelve has quit [Quit: Page closed]
<bnagy> well not for this input, but he said something about dates for example
aezop has joined #ruby
CptJeanLucPicard has joined #ruby
<Inoperable> huh TextMate sources are on git
<bnagy> anyway I have said my thing
<Inoperable> i missed that
<Inoperable> somehow
<jrajav> Inoperable: Well it only happened what, two days ago?
<macer1> textmate is open source?
<macer1> x.x
<Muz> The source for the alpha, at least.
snearch has joined #ruby
bluenemo_ has quit [Remote host closed the connection]
<Muz> "Come, find and report our bugs for free, then let us charge you for the luxury of pre-compiling it!"
<Inoperable> i booted into os x like after few weeks
<macer1> D:
<Inoperable> and suddenly text mate2 gets an update and tells me its opensource
<Inoperable> and i bought sublime for 59$ yesterday..
<Inoperable> hehe
<macer1> sublime text 2 > text mate
<jrajav> ^
<chiel> vim > * ;D
<chiel> oh yeah I went there, sorry!
* chiel hides
<jrajav> I use both
<macer1> sublime text have vim mode
<macer1> it's cool
<Inoperable> chiel yup, nothing can beat vim
<jrajav> macer1: Heh, do you actually use it?
sendoushi has quit [Read error: Connection reset by peer]
<chiel> but why would I buy st2, when i already have vim?
<chiel> vim is free
<macer1> not really
Musok has joined #ruby
<chiel> you can find just about ANY plugin for it, too :p
sailias has quit [Quit: Leaving.]
My_Hearing has joined #ruby
My_Hearing has joined #ruby
My_Hearing has quit [Changing host]
<chiel> i guess the text manipulation people scares people off
iori has quit [Remote host closed the connection]
<jrajav> Yes, you're so leet, chiel :P
<emsilva> and, vim > st 2 * tm
<Inoperable> i like the package support
<Inoperable> and am not yet that fast in vim
<Inoperable> i started using it exclusively like few weeks ago
<Inoperable> get confused from time to time ;)
<jrajav> I haven't been satisfied with many of the vim implementations of intellisense, refactoring, or project traversal
<Inoperable> but i cutter every other editor out of the sys to enforce vim on myself
<chiel> jrajav: thank you, I was totally fishing for compliments! >:D
<jrajav> I love it for pure editing, but I love Sublime Text 2 for a lot of other things
<macer1> woah that textmate have my favorite synta hightlinghing from ST2 xD
<kalleth> >> while true; "what?"; end
<chiel> yeah, I am just being a jackass really :)
<al2o3cr> exit status: 137
<chiel> I don't believe in all these editor-wars :p
<kalleth> dammit ;(
<kalleth> chiel: vim > emacs
<chiel> use whatever editor suits you, that is all.
<Inoperable> so crafty ruby programmers
<macer1> I think I can try textmate
<jrajav> macer1: Um.
<Inoperable> port textmate2 to android ;-)
<chiel> kalleth: well, I agree with you, but I guess if you are used to emacs it can be ok
<macer1> jrajav: Um
<jrajav> macer1: All ST2 syntax highlighting is also Textmate highlighting
<kalleth> chiel: only if you want clawhands from all the modkeys ;(
<macer1> *whatever*
<macer1> I like it
<jrajav> :P
<kalleth> real men use nano
ananthakumaran has quit [Quit: Leaving.]
scotch has joined #ruby
Mon_Ouie has quit [Ping timeout: 276 seconds]
<macer1> ^
<jrajav> Real men make increasingly silly jokes about what real men use, most of them stolen from xkcd
<Muz> Most of which are unoriginal and have been going about the Internet for several decades now.
strnx has joined #ruby
<kalleth> good writers borrow from other writers, great writers steal from them outright
<macer1> can textmate run on linux, and why the answer is no :(?
tatsuya__ has joined #ruby
<fowl> macer1: use sublime
<jrajav> kalleth: Pretty sure that quote refers to poetry :P
<Inoperable> text mate will run on linux probably in next few hours
<kalleth> yes, but not when SAM SEABORN SAID IT
<Inoperable> textmate is python, right?
verto|off is now known as verto
<macer1> yes
tatsuya_o has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
Criztian has quit [Remote host closed the connection]
freeayu has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 272 seconds]
Inoperable has quit [Remote host closed the connection]
<Spooner> kalleth : Real men use a hex editor. It is the only editor that supports ALL formats.
<kalleth> Real men use magnets to flip bits on a disk
theRoUS has joined #ruby
<bnagy> wtf who uses magnetic disks anymore? You think we're barbarians??
<fowl> i thought real men chopped down trees and lived off the land
Criztian has joined #ruby
<iamjarvo> vim for the win :)
jonathanwallace has joined #ruby
<bnagy> I just code with cat > foo.rb .... ^D
<bnagy> young people these days just can't plan ahead
<doherty> I don't use an IRC client, just netcat
yuriy has quit [Read error: Connection reset by peer]
<jrajav> I guess I can't stop the meme chain once it's been started
<jrajav> Only delay it
<fowl> cat /dev/mind > file.rb
<fowl> of course you need to run some cables first
vegeek-ng has joined #ruby
<hoelzro> speaking of strange ways to access IRC, there's that one IRC client that is implemented with 9P
beakerma_ has quit [Read error: Connection reset by peer]
<hoelzro> so you tail -f the channels you are interested in
<jrajav> Muz: Hey, your image has finished transferring
beakerman has joined #ruby
<hoelzro> and echo >> to send stuff
<jrajav> Muz: How's it look?
nacengineer has quit [Read error: Connection reset by peer]
Inoperable has joined #ruby
<fowl> hoelzro: that sounds painful lol
Markvilla has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
<hoelzro> I bet it is =)
<workmad3> fowl: sounds scriptable to me...
<jrajav> hoelzro: Sounds like ordinary Unix userspace to me :P
<fowl> workmad3: still a pita even if you only do it once
<jrajav> Who needs applications when you have text pipes
<kalleth> jankly: what, "painful"? :p
<jankly> uhh, you sure you got the right name?
<kalleth> no
<kalleth> i meant jrajav
<kalleth> =[
<workmad3> heh
<kalleth> j<tab> is an evil master
<chiel> kalleth: haha, clawhands.. :)
<kalleth> =[
<chiel> (i was looking at all the flaming on textmate's license. :D)
* kalleth cries in a corner
<hoelzro> tab completion should go in order of most recently active =)
<jrajav> kalleth: No, using text + pipes + files for literally everything
<kalleth> jrajav: sounds painful to me ;p
GoGoGarrett has joined #ruby
asobrasil has joined #ruby
emsilva has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<jrajav> hoelzro: That might be a good idea, but it would mess with muscle memory of how many tabs it takes to get to someone for any given prefix string
<shevy> jrajav, they broke your bot earlier
<jrajav> shevy: Oh?
<jrajav> Then how is it still running
<jrajav> ?
<shevy> <macer1> Bot is dead...back to work :P
<shevy> ^^^ macer1 did
<jrajav> Like it wasn't responding for a while?
<hoelzro> jrajav: perhaps, if you use that type of completion
<workmad3> hoelzro: yeah, I always get annoyed with that... I used to use a client that went 'most recently active' for tab-completion and it's ruined me for other clients :)
<macer1> emm no
<macer1> I said it was lagging
<workmad3> >> "Shevy lies!"
<al2o3cr> (String) "Shevy lies!"
<shevy> jrajav, dunno. I am just showing you who must be punished :-)
<hoelzro> I don't see why it'd be undoable in irssi
nari_ has joined #ruby
<macer1> >> "Hi jrajav. I am so laggy today :("
<al2o3cr> (String) "Hi jrajav. I am so laggy today :("
franckverrot has left #ruby [#ruby]
cantbecool has joined #ruby
becomingGuru has joined #ruby
Musok has quit [Remote host closed the connection]
<macer1> would you mind if I'll try to kill the bot jrajav :P?
miho has joined #ruby
banisterfiend has quit [Ping timeout: 252 seconds]
<jrajav> Not right now
banisterfiend has joined #ruby
jjbohn has joined #ruby
tcopp has joined #ruby
Inoperable has quit [Quit: Inoperable]
<macer1> Not right now = don't kill the bot, or don't kill the bot right now :P?
<macer1> I mean
<macer1> you can kill the bot or dont kill right now
<jrajav> I don't think you CAN kill the bot, but just in case, don't try right now ;)
<macer1> ok :P
<jrajav> I'm working on it
<jrajav> atm
the_jeebster has joined #ruby
cakehero has joined #ruby
uris has joined #ruby
freeayu has joined #ruby
<Muz> jrajav: :).
pu22l3r has joined #ruby
Jay_Levitt has joined #ruby
cousine has joined #ruby
<jrajav> I'm going to change the way the bot treats stdout and stderr
<jrajav> To complete my shameless copying of ##javascript's ecmabot
<jrajav> The constant PMing is getting kind of annoying, and it makes it harder for everyone to see what's going on rather than just the person running it
<macer1> jrajav: can you share the source :P?
<macer1> it will be interesting to look at it
<jrajav> Of course
<jrajav> I already have the old version (which was in node.js) on github
<jrajav> I'll replace it with this one today
centipedefarmer has quit [Quit: This computer has gone to sleep]
<macer1> I see
vlad_starkov has quit [Remote host closed the connection]
<jrajav> Spoilers: It's pretty boring
t6222 has joined #ruby
<jrajav> Check out cinch and Open3.popen3 and you basically know all of it
<macer1> only 50 lines of code? o.O
<jrajav> That, plus a clever combination of a chroot and sudo
<jrajav> Less than that even
<macer1> al2o3cr: ping
<jrajav> Did you find the node.js version?
<macer1> al2o3cr: version
<macer1> yes :S
<jrajav> I thought ping was kind of redundant when you can just try a script :P
<jrajav> Alos
<jrajav> >> RUBY_VERSION
<al2o3cr> stderr:
<al2o3cr> exit status: 1
<al2o3cr> [FATAL] Failed to create timer thread (errno: 11)
<jrajav> :O
RegEchse has joined #ruby
<macer1> DUM DUM DUMMM
<iamtakingiteasy> >> echo god
<al2o3cr> [FATAL] Failed to create timer thread (errno: 11)
<al2o3cr> stderr:
<al2o3cr> exit status: 1
<macer1> @_@
<macer1> tango down? :D
<jrajav> Huh.
<macer1> >> `echo @_@`
<al2o3cr> [FATAL] Failed to create timer thread (errno: 11)
<al2o3cr> exit status: 1
<al2o3cr> stderr:
<macer1> it's not me this time
<macer1> :P
pu22l3r has quit [Remote host closed the connection]
<jrajav> I need to start logging it
<jrajav> My scrollback is like barely 3 screens
<jrajav> :P
a_a_g has quit [Quit: Leaving.]
centipedefarmer has joined #ruby
<macer1> >> ":("
<al2o3cr> stderr:
<al2o3cr> exit status: 1
<al2o3cr> [FATAL] Failed to create timer thread (errno: 11)
<macer1> al2o3cr: pls work k thx
<jrajav> Well, time to kill the old bot
al2o3cr has quit [Remote host closed the connection]
<jrajav> You will be missed
miho has quit [Read error: Connection reset by peer]
<macer1> :(
<macer1> we will remember you forever al2
uris has quit [Ping timeout: 240 seconds]
miho has joined #ruby
<macer1> run the new one :D
dpk has quit [Quit: Asleep at the keyboard.]
jrist-afk is now known as jrist
<jrajav> macer1: Still writing it, and doing other stuff at the same time
becomingGuru has quit [Quit: Leaving.]
* macer1 afk
<macer1> have fun with bots and stuff ^^
vegeek-ng has quit [Ping timeout: 240 seconds]
bequick has joined #ruby
tayy has joined #ruby
k_89 has quit [Ping timeout: 268 seconds]
carloslopes has joined #ruby
Inoperable has joined #ruby
pu22l3r has joined #ruby
bluenemo_ has joined #ruby
bluenemo_ has quit [Read error: Connection reset by peer]
jjbohn has quit [Read error: Connection reset by peer]
jjbohn has joined #ruby
andrewhl has joined #ruby
v0n has joined #ruby
vitor-br has joined #ruby
vlad_starkov has joined #ruby
mahmoudimus has joined #ruby
t6222 has quit [Remote host closed the connection]
t54764 has joined #ruby
nacengineer has joined #ruby
mahmoudimus has quit [Client Quit]
becomingGuru has joined #ruby
imami|afk is now known as banseljaj
Speed has joined #ruby
Speed has joined #ruby
Speed has quit [Changing host]
Criztian has quit [Remote host closed the connection]
adeponte has joined #ruby
devdazed has quit [Quit: Bye]
ananthakumaran has joined #ruby
sendoushi has joined #ruby
becomingGuru has quit [Client Quit]
tayy has quit [Remote host closed the connection]
Criztian has joined #ruby
devdazed has joined #ruby
adeponte has quit [Ping timeout: 268 seconds]
eikko has quit [Ping timeout: 244 seconds]
lolmaus has quit []
FriedBob has joined #ruby
sendoushi has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
<FriedBob> When setting up a rdoc command, what would the syntax be for using multiple patterns for the --exclude option? I haven't been able to find anything that says anything about doing that.
emmanuelux has quit [Ping timeout: 246 seconds]
johnlcox has joined #ruby
stopbit has joined #ruby
bbttxu has joined #ruby
axl_ has joined #ruby
internet_user has joined #ruby
dereknelson has quit []
pen has joined #ruby
ph^_ has quit [Ping timeout: 245 seconds]
sailias has joined #ruby
beneggett has joined #ruby
dpk has joined #ruby
s1n4 has joined #ruby
fbrn has joined #ruby
<fbrn> hy all
s1n4 has quit [Client Quit]
<fbrn> this room official ruby language?
awarner has joined #ruby
g_rotbart has quit [Remote host closed the connection]
clocKwize has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
v0n has quit [Ping timeout: 246 seconds]
axl_ has joined #ruby
<FriedBob> fbrn: Given that it is #ruby and not ##ruby, I would assume so based on Freenode policies.
jrajav has quit [Quit: The best darkness is strange and surprising]
axl_ has quit [Read error: Connection reset by peer]
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
MissionCritical has quit [Ping timeout: 256 seconds]
Speed has quit [Ping timeout: 252 seconds]
<fowl> fbrn: there is another channel #ruby-lang which is populated by the more elitist crowd (seattlerb, zenspider and his goons)
Speed has joined #ruby
axl_ has joined #ruby
yasushi has quit [Remote host closed the connection]
iamjarvo has joined #ruby
darren_ has joined #ruby
yasushi has joined #ruby
<fowl> FriedBob: #ruby-lang is actually the official ruby channel
<FriedBob> fowl: Interesting. How come this was able to stay at #ruby then, and not change to ##ruby?
<fowl> because nobody cared :)
<FriedBob> :)
araujo has quit [Read error: Connection reset by peer]
eataix has quit [Quit: ZNC - http://znc.in]
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
Targen has quit [Read error: Connection reset by peer]
<FriedBob> Is there somewhere I can get more indepth information on rdoc, specifically the --exclude? Someone told me it can take multiple exclude options, though I don't see that mentioned in the documenation. Nor do I see a way to specify multiple explude paths using a seperator for the regex pattern.
bequick has quit []
brasten has joined #ruby
yasushi has quit [Ping timeout: 246 seconds]
<fowl> FriedBob: --help says --include can be used more than once so many --exclude can too
<fowl> maybe*
darren_ has quit [Remote host closed the connection]
<FriedBob> fowl: Yeah. I was just hoping to get something more solid before I started patchign this program and protentially breaking things.
sendoushi has joined #ruby
pyreal has joined #ruby
Middy has joined #ruby
macer1 has quit [Ping timeout: 272 seconds]
yasushi has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
v0n has joined #ruby
d3vic3 has joined #ruby
monobit has joined #ruby
erichmenge has joined #ruby
MissionCritical has joined #ruby
monobit is now known as asteve
d3vic3 has quit [Client Quit]
whicling has joined #ruby
<shevy> FriedBob software tends to break all the time :)
axisys_ has joined #ruby
tagrudev has quit [Remote host closed the connection]
<fowl> shevy: is this you: http://shevy.jpg.to/ ?
mike4_ has quit [Ping timeout: 276 seconds]
ananthakumaran has quit [Ping timeout: 244 seconds]
<shevy> fowl booooooobs
<apeiros_> funny… all these years I never even considered shevy could be a woman :)
whicling is now known as mike4_
ananthakumaran has joined #ruby
<apeiros_> but then again, I do have that no-gender bias on irc.
<shevy> I code best when I am in the kitchen
freeayu__ has joined #ruby
<shevy> or actually, I really think better when I don't sit in front of a computer :\
tonini has quit [Remote host closed the connection]
tiripamwe has quit [Ping timeout: 240 seconds]
nari_ has quit [Ping timeout: 244 seconds]
freeayu has quit [Ping timeout: 252 seconds]
<peterhellberg> Hmm, http://hellberg.jpg.to/ was much nicer than http://peterhellberg.jpg.to/
sendoushi has quit [Remote host closed the connection]
<peterhellberg> :)
jonathanwallace has quit [*.net *.split]
nanderoo has quit [*.net *.split]
Shrink has quit [*.net *.split]
lkba has quit [*.net *.split]
haxrbyte_ has quit [*.net *.split]
Boffers has quit [*.net *.split]
blast_hardcheese has quit [*.net *.split]
talsamon has quit [*.net *.split]
rlomax has quit [*.net *.split]
jdiez has quit [*.net *.split]
juarlex has quit [*.net *.split]
knightblader has quit [*.net *.split]
busybox42 has quit [*.net *.split]
ekaleido has quit [*.net *.split]
idoru has quit [*.net *.split]
ged has quit [*.net *.split]
Veejay has quit [*.net *.split]
RichGuk has quit [*.net *.split]
arubin has quit [*.net *.split]
telling has quit [*.net *.split]
asuka has quit [*.net *.split]
Schmidt has quit [*.net *.split]
JoeTheGuest has quit [*.net *.split]
thorncp has quit [*.net *.split]
RubyPanther has quit [*.net *.split]
jord has quit [*.net *.split]
mahlon has quit [*.net *.split]
ahuman has quit [*.net *.split]
faulkner has quit [*.net *.split]
infinitiguy has joined #ruby
pi3r has joined #ruby
axisys_ has quit [Quit: leaving]
<fowl> peterhellberg: depends on the criteria, one wins in sexy and the other wins in cool
<shevy> looks like a man from hell
jso has quit [Ping timeout: 252 seconds]
r0bby has joined #ruby
<fowl> haha
<pi3r> hi guys
Inoperable has quit [Quit: Simon says sleep!]
<shevy> hi pi3r
<pi3r> there is something i don't understand in ruby
<shevy> what is it
<pi3r> shevy: hey
<shevy> chinese code comments? :)
<pi3r> i have a use case like that https://gist.github.com/3341323
TheShadowFog has quit [Read error: Connection reset by peer]
indian has joined #ruby
<pi3r> i don't know how to have a class method in a module
mohits has quit [Read error: Connection reset by peer]
My_Hearing is now known as Mon_Ouie
<shevy> what do you want to do there
monkegjinni has quit [Remote host closed the connection]
<Mon_Ouie> Module#include adds the instances methods of the module to the class
<shevy> that the method .hello becomes a class method in module Bar?
jso has joined #ruby
<Mon_Ouie> Use extend to add them as class methods
TheShadowFog has joined #ruby
<peterhellberg> fowl: Haha, not so sure about that… But those aviators sure fit me (I rarely wear shades, due to having glasses)
TheShadowFog has quit [Remote host closed the connection]
<pi3r> Mon_Ouie: with extend i could do Bar.hello ?
<shevy> pi3r, this works http://pastie.org/4466508
<Mon_Ouie> Not if you keep hello as a class method on Foo
<fowl> Mon_Ouie: http://monouie.jpg.to/ it seems you're upside down teacup rendered in ray
<doherty> Is there an easy way to know what targets are available in some rakefile?
vitor-br has quit [Ping timeout: 276 seconds]
robbyoconnor has quit [Ping timeout: 276 seconds]
mockra has joined #ruby
jso has quit [Max SendQ exceeded]
<shevy> where is the "mon" part!
pu22l3r has quit [Remote host closed the connection]
TheShadowFog has joined #ruby
<shevy> http://fowl.jpg.to/ HAHAHAHA
vegeek-ng has joined #ruby
RichGuk has joined #ruby
knightblader has joined #ruby
haxrbyte_ has joined #ruby
juarlex has joined #ruby
lkba has joined #ruby
jdiez has joined #ruby
Schmidt has joined #ruby
nanderoo has joined #ruby
ekaleido has joined #ruby
JoeTheGuest has joined #ruby
RubyPanther has joined #ruby
idoru has joined #ruby
ged has joined #ruby
asuka has joined #ruby
talsamon has joined #ruby
Shrink has joined #ruby
thorncp has joined #ruby
busybox42 has joined #ruby
jonathanwallace has joined #ruby
Veejay has joined #ruby
mahlon has joined #ruby
Boffers has joined #ruby
faulkner has joined #ruby
rlomax has joined #ruby
arubin has joined #ruby
jord has joined #ruby
telling has joined #ruby
ahuman has joined #ruby
<pi3r> shevy: it seems strange to me to extend self each time
<fowl> :)
<shevy> pi3r well you want class methods
rutkla has quit [Excess Flood]
aezop has quit [Excess Flood]
<shevy> extend self would be one way
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> another way would be if you explicitely use Foo.hello within module Bar
vegeek-ng has quit [Ping timeout: 270 seconds]
ged is now known as Guest36615
<pi3r> shevy: hum :D maybe i should use class and inheritance
mockra has quit [Remote host closed the connection]
answer_42 has quit [Ping timeout: 276 seconds]
<apeiros_> extend self is an anti-pattern
<apeiros_> use module_function
rutkla has joined #ruby
<apeiros_> (and generally functions - that is, methods which make no use of self or ivars - are a slight anti-pattern themselves)
<apeiros_> @ pi3r
<shevy> how would module_function be used in the example?
rutkla has left #ruby [#ruby]
<pi3r> apeiros_: but module_function is only for instance method
<apeiros_> pi3r: as opposed to extend self? srsly…
<shevy> I cant get module_function to work in this context
<apeiros_> shevy: work network is superslow atm, example doesn't load :(
<shevy> I tried via module_function :hello rather than extend self
aezop has joined #ruby
syamajala has joined #ruby
<apeiros_> aha, actually it was a WebGL tab that killed the browser…
<shevy> hehe
<shevy> soon we will have whole operating systems in the browser...
<pi3r> so it's not actually possible to "inherit" class methods using Modules ?
<apeiros_> pi3r: modules will always only give you the instance methods when included/extended on other objects
<apeiros_> no
<apeiros_> only classes can do that through inheritance.
jso has joined #ruby
JStoker has quit [Excess Flood]
blast_hardcheese has joined #ruby
pu22l3r has joined #ruby
<pi3r> and wanted to refactor some classes into modules :)
<apeiros_> what you *can* do is extend a class (or module) with a module. that will give you the module's instance methods as class methods on the extended object
jso has quit [Max SendQ exceeded]
Doc_X has quit [Quit: Leaving.]
beneggett has joined #ruby
<pi3r> apeiros_: yep
yasushi has quit [Remote host closed the connection]
<shevy> this keeps on coming again and again
<shevy> people wanting modules to do more
<apeiros_> shevy, pi3r: http://pastie.org/4466542
yasushi has joined #ruby
Doc_X has joined #ruby
<shevy> hmm odd
jso has joined #ruby
<shevy> thought module_function wants a symbol
<apeiros_> shevy: the only thing I want in core ruby is being able to un-include/un-extend a module
MarioEIU has joined #ruby
<apeiros_> shevy: that's one way
jso has quit [Max SendQ exceeded]
<apeiros_> module_function works the same as private/protected/public
<shevy> interesting. never saw that before
<apeiros_> i.e., either provide it a name (as symbol or string) or don't provide it any argument, which means every subsequently defined instance method will be made a module_function
jso has joined #ruby
haxrbyte_ has quit [Ping timeout: 240 seconds]
<apeiros_> oh, actually my paste won't work. if you truly want class methods, callable from external, then module_function is the wrong tool
<apeiros_> it makes the instance methods private
<pi3r> apeiros_: yep :D
haxrbyte has joined #ruby
<apeiros_> so just http://pastie.org/4466542
freeayu__ has quit [Ping timeout: 240 seconds]
<apeiros_> but honestly… sounds like you're wading deeply in anti-patterns…
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
mikepack has joined #ruby
eldariof has quit [Ping timeout: 276 seconds]
<apeiros_> (or not telling the whole story)
<pi3r> apeiros_: last paste now working either
<pi3r> s/now/not
jso has quit [Max SendQ exceeded]
<pi3r> apeiros_: like i told you, i just read http://matt.aimonetti.net/posts/2012/07/30/ruby-class-module-mixins/
<pi3r> and i wanted to do some refactor
haxrbyte_ has joined #ruby
becomingGuru has joined #ruby
<shevy> hehe
<pi3r> but i'm stuck :D
<shevy> blog entries give people ideas
<apeiros_> meh, yes. I keep not taking into account your anti-patternous behavior :-p
jso has joined #ruby
jso has quit [Max SendQ exceeded]
<pi3r> so ... i'll keep using class inheritance :D
yasushi has quit [Ping timeout: 244 seconds]
<apeiros_> pi3r: that blog post tells what matteti did
<apeiros_> not what you do
<shevy> pi3r, I am still not sure... via extend self, you would get extendable module methods or?
<apeiros_> if you have a method that makes no use of self whatsoever, you should ask yourself why the method is where it is
jso has joined #ruby
jso has quit [Max SendQ exceeded]
<apeiros_> and even more so, you should ask yourself why you want to have that very same method in multiple places
jso has joined #ruby
<pi3r> shevy: yep, extend self should work but i really don't like that way
jso has quit [Max SendQ exceeded]
<shevy> ok
Synthead has joined #ruby
<shevy> what other way would you prefer, in terms of syntax?
scotch has quit [Quit: leaving]
<pi3r> i don't know enough about modules to tell you :D
<shevy> you would want include to include both methods?
haxrbyte has quit [Ping timeout: 276 seconds]
bluenemo has quit [Remote host closed the connection]
<shevy> or just one, but in that case, which one
answer_42 has joined #ruby
<shevy> right now it seems you can only include instance methods
<pi3r> shevy: let me enhance the gist :D
<shevy> I guess this follows matz expected behaviour
<shevy> hmm let me try this in mruby
jrajav has joined #ruby
freeayu__ has joined #ruby
leoncamel has quit [Ping timeout: 240 seconds]
mockra has joined #ruby
JStoker has joined #ruby
`brendan has joined #ruby
<shevy> ok
<shevy> it works in mruby as expected
* apeiros_ gtg, brb (~30min)
apeiros_ has quit [Remote host closed the connection]
senny has quit [Remote host closed the connection]
apeiros_ has joined #ruby
mengu has quit [Quit: Konversation terminated!]
uris has joined #ruby
gilead has quit [Quit: This computer has gone to sleep]
<kalleth> haha, code i wrote about 18 months ago: http://imgur.com/3UcBL
mockra has quit [Ping timeout: 240 seconds]
<shevy> http://playcanvas.com/a-multiplayer-3rd-person-shooter-in-html5/ whoa... playing 3D browser games in a browser
<shevy> javascript will win because of being a monopoly :(
freeayu__ has quit [Ping timeout: 252 seconds]
<workmad3> kalleth: you should see some 'print layout' crap I did in one of my own apps about 4 years ago :P
BrokenCog has quit [Ping timeout: 245 seconds]
Doc_X has quit [Quit: Leaving.]
<kalleth> hahaah
<workmad3> shevy: quake live has been around for a couple of years now
<kalleth> quake live is compiled bytecode though
<kalleth> its not actually running in your browser, the browser just bootstraps the actual game
<workmad3> close enough :P
Doc_X has joined #ruby
stargazer has joined #ruby
ananthakumaran1 has joined #ruby
<workmad3> WebGL is fun stuff though :)
ananthakumaran has quit [Ping timeout: 276 seconds]
<kalleth> but.. javascript? :(
gmci has quit [Ping timeout: 252 seconds]
<kalleth> wat.mov
<fowl> wont load for me =(
<pi3r> fowl: me neither
<fowl> oo i got a progress bar
<pi3r> shevy, apeiros_, Mon_Ouie : thanks anyway guys :D
apeiros_ has quit [Ping timeout: 268 seconds]
<workmad3> kalleth: JS is, more and more, becoming just a compile target though
<kalleth> wooo, coffeescript, etc?
<workmad3> kalleth: doesn't something like enscripten basically cross-compile llvm languages to JS? :)
<davidcelis> lol coffeescript
<kalleth> CS -> JS -> engine -> actually running
<kalleth> not sure how many steps
<workmad3> emscripten
<kalleth> davidcelis: i like CS :(
<davidcelis> it's okay, i used to
<workmad3> kalleth: https://github.com/kripken/emscripten/ <-- fun stuff :)
<davidcelis> CS doesn't really fix the stupid parts of JS, though; just makes it look like Ruby
<kalleth> workmad3: yes, but i'm not a real developer
<kalleth> workmad3: thereofre i don't use C/C++
<kalleth> :p
<pi3r> This page requires a browser that supports WebGL. :( I guess i'll just have to get back to work :D
<kalleth> work? hahahahahahha
<davidcelis> once you're familiar with the dumb parts of javascript, they are easily avoidable, so why add the extra compilation layer? just for syntactic sugar and to feel like you're still programming in Ruby?
<kalleth> i'm on the last 24hours of my notice period
<davidcelis> not worth it IMO
ninegrid has quit [Quit: brb]
<kalleth> davidcelis: perhaps, perhaps not
<fowl> pi3r: if you're in chrome to go chrome://flags and enable webgl and native client
<kalleth> i've worked in CS's object model and in Js's
gmci has joined #ruby
<kalleth> and whilst the two are the same
<workmad3> kalleth: partner it with this then ;) http://llvmruby.org/wordpress-llvmruby/
<kalleth> all i know is i prefer working in CS
<kalleth> and erm workmad3
<kalleth> if thats what i think it is
<shevy> I have not used CS but it's syntax is much nicer than JS
yasushi has joined #ruby
<shevy> its syntax
<shevy> hmmm
<shevy> english. difficult language!
<kalleth> oh, its not
<shevy> whoa... llvmruby?
jso has joined #ruby
<fowl> what do you mean shevy
snearch has quit [Quit: Verlassend]
<fowl> syntax is the same (c-like)
kernelpanix has joined #ruby
<workmad3> kalleth: probably take a bit of work, but I bet someone dedicated (like you :P ) could start writing ruby that goes to LLVM, goes through emscripten and comes out as JS ready for the browser ;)
davidcelis has quit [Quit: K-Lined.]
<kalleth> yeah, but i'm lazy
<kalleth> :|
* kalleth looks round to make sure his future boss isn't in this channel
jso has quit [Max SendQ exceeded]
<workmad3> heh
beneggett has quit [Quit: Computer has gone to sleep.]
<kalleth> start new job on thurs
<kalleth> actually getting to play with rails properly
<kalleth> though less pure ruby work
jso has joined #ruby
<kalleth> more frontend, more smaller projects using actual up to date libs :)
emmanuelux has joined #ruby
Doc_X has quit [Remote host closed the connection]
Doc_X has joined #ruby
yasushi has quit [Ping timeout: 268 seconds]
jso has quit [Max SendQ exceeded]
becomingGuru has quit [Quit: Leaving.]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
ckrailo has joined #ruby
maesbn has quit [Remote host closed the connection]
rob_ has joined #ruby
<rob_> hi, can anyone tell me why when i do 'rackup 2>&1 | logger' stdout doens't get logged to syslog?
baroquebobcat has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
mockra has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
stargazer has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
axl_ has joined #ruby
kn330 has quit [Ping timeout: 244 seconds]
jso has joined #ruby
burgestrand has joined #ruby
jso has quit [Max SendQ exceeded]
affix has quit [Ping timeout: 260 seconds]
ttilley has joined #ruby
Vert has quit [Read error: Connection reset by peer]
bradhe has quit [Remote host closed the connection]
apeiros_ has joined #ruby
Fretta has joined #ruby
ttilley has quit [Changing host]
ttilley has joined #ruby
td123 has joined #ruby
jso has joined #ruby
Stalkr_ has quit [Read error: Connection reset by peer]
kernelpanix has quit [Ping timeout: 276 seconds]
Stalkr_ has joined #ruby
theRoUS has quit [Ping timeout: 248 seconds]
jchauncey has joined #ruby
t54764 has quit [Remote host closed the connection]
brdude has joined #ruby
hynkle has joined #ruby
v0n has joined #ruby
Astral_ has joined #ruby
macer_ has joined #ruby
<macer_> jrajav: hey
macer_ is now known as macer1
jso has quit []
<macer1> >> "ping"
mike4_ has quit [Ping timeout: 276 seconds]
i0n has joined #ruby
i0n has quit [Changing host]
i0n has joined #ruby
Astral has quit [Ping timeout: 244 seconds]
<jrajav> You have great timing
<jrajav> I just finished
<jrajav> (I think)
<jrajav> SHIP IT
forrest has joined #ruby
al2o3cr has joined #ruby
<jrajav> >> "ping"
<al2o3cr> (String) "ping"
GordonFreeman has joined #ruby
td123 has quit [Read error: Connection reset by peer]
<peterhellberg> I’ve been asked to be a technical editor for a book about CoffeeScript… probably a good reason to dive deeper into the language :)
pskosinski is now known as Idkblaze
Idkblaze is now known as idkblaze
<jrajav> >> while true; puts "〠" end
senny has joined #ruby
<jrajav> Oh, Ruby doesn't like Unicode, neat
<jrajav> >> while true; Process.fork end
<al2o3cr> [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno..., [FATAL] Failed to create timer thread (errno: 11)
idkblaze is now known as pskosinski
<Muz> Lolz.
atmosx has joined #ruby
<jrajav> Forkbomb-proof
<jrajav> Oh, someone try doing something legitimate (non-while-true-y) with threads; that didn't work last time we tried to limit process forks
<peterhellberg> jrajav: Ruby is pretty happy with Unicode… the bot might not be though
<jrajav> peterhellberg: I'm not doing anything spectacular with the input; just a stdin.write
ninegrid has joined #ruby
carloslopes has quit [Quit: Leaving.]
jasonLaster has joined #ruby
adeponte has joined #ruby
philips_ has quit [Excess Flood]
adeponte has quit [Remote host closed the connection]
fbernier has joined #ruby
<jrajav> >> File.unlink("/bot.rb")
<al2o3cr> -e:1:in `eval': Permission denied - /bot.rb (Errno::EACCES), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<jrajav> Yay
<jrajav> Alright
<jrajav> macer1: NOW you can break it
apok has joined #ruby
<macer1> kthx
<jrajav> If you can
<jrajav> :3
carloslopes has joined #ruby
<macer1> challenge accepted
<macer1> D:
<macer1> watt fork limit
<macer1> ...
<macer1> ayfkm?
<macer1> -_-
ianbrandt has quit [Quit: ianbrandt]
<macer1> >> "failłłłłąąążżó"
<al2o3cr> -e:1:in `eval': (eval):1: invalid multibyte char (US-ASCII) (SyntaxError), (eval):1: invalid multibyte char (US-ASCII), from -e:1:in `<main>'
<jrajav> I guess Ruby is fine with Unicode but eval isn't?
<jrajav> And yes fork limit
philips_ has joined #ruby
<Muz> >> puts "שלם"
<al2o3cr> -e:1:in `eval': (eval):1: invalid multibyte char (US-ASCII) (SyntaxError), (eval):1: invalid multibyte char (US-ASCII), from -e:1:in `<main>'
<macer1> >> `echo sad macer1 :(`
<al2o3cr> -e:1:in `eval': Permission denied - echo sad macer1 :( (Errno::EACCES), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<macer1> em
<macer1> I want echo back :(
<jrajav> Permission denied? Uh.
<jrajav> That should be a shell builtin right? :/
<jrajav> Does `` go to a shell or just path lookups?
jchauncey has quit [Quit: jchauncey]
<macer1> hmm
DrShoggoth has joined #ruby
<macer1> executing programs from path
<macer1> I think
<macer1> like echo,cat etc
<jrajav> Well, the only programs on the path in the chroot are sudo and ruby :P
<macer1> meh
<jrajav> But I wouldn't have expected a Permission denied
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
<Muz> >> `ruby -pe "penis"`
<al2o3cr> -e:1:in `eval': Permission denied - ruby -pe "penis" (Errno::EACCES), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
shevy has quit [Ping timeout: 268 seconds]
jlogsdon has joined #ruby
<macer1> Muz: you are not allowed to use penis on a bot :P
dr_bob has left #ruby [#ruby]
GordonFreeman has quit [Ping timeout: 245 seconds]
ephemerian has joined #ruby
carloslopes has quit [Quit: Leaving.]
peterhellberg has quit [Remote host closed the connection]
vitor-br has joined #ruby
burgestrand has quit [Quit: Leaving.]
<macer1> uh
<macer1> how was ruby string replacing
<macer1> not #replace
dhruvasagar has quit [Ping timeout: 244 seconds]
burgestrand1 has joined #ruby
davidcelis has joined #ruby
davidcelis is now known as Guest16595
TheShadowFog has quit [Read error: Connection reset by peer]
<chiel> macer1: gsub
benson has joined #ruby
<chiel> macer1: or gsub!
<macer1> ok
<macer1> thx
<chiel> depending on whether you want it to be destructive
<jrajav> Muz: Huh. That should have worked
Guest16595 has quit [Client Quit]
<chiel> macer1: basically if you use regular gsub (without!), you'll need to store the return value somewhere
<jrajav> >> `ruby -e "puts 'erm'"`
<al2o3cr> -e:1:in `eval': Permission denied - ruby -e "puts 'erm'" (Errno::EACCES), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
davidcel_ has joined #ruby
baphled has quit [Read error: Operation timed out]
aezop has quit [Ping timeout: 272 seconds]
<jrajav> I guess `` is the thing that's raising permission denied?
<macer1> but why
<jrajav> I unno
davidcel_ is now known as davidcelis
davidcelis has quit [Changing host]
davidcelis has joined #ruby
<jrajav> Is there really a good reason to have access to it?
<jrajav> All you can run is ruby and sudo
alvaro_o__ has joined #ruby
<jrajav> And you're already running ruby
<davidcelis> >> `sudo ruby`
<al2o3cr> -e:1:in `eval': No such file or directory - sudo ruby (Errno::ENOENT), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<macer1> `echo`
<macer1> is cool
<macer1> :D
becomingGuru has joined #ruby
becomingGuru has quit [Remote host closed the connection]
bradhe has joined #ruby
<jrajav> >> puts 'Why is this not good enough?'
<al2o3cr> (NilClass) nil, Console: Why is this not good enough?
becomingGuru has joined #ruby
Criztian has quit [Remote host closed the connection]
elhu has quit [Ping timeout: 268 seconds]
fcadi has joined #ruby
elhu has joined #ruby
alvaro_o_ has quit [Ping timeout: 240 seconds]
Clooth has joined #ruby
<jrajav> Alright, I've githubified the code: https://github.com/jrajav/al2o3cr
<jrajav> Suggestions and criticisms more than welcome
bluOxigen has quit [Ping timeout: 240 seconds]
mahmoudimus has joined #ruby
justsee is now known as justsee|away
eikko has joined #ruby
<davidcelis> 4 space tabs..
becomingGuru1 has joined #ruby
<jrajav> YES.
shevy has joined #ruby
<macer1> NO
<macer1> :<
Fretta has quit [Ping timeout: 252 seconds]
<macer1> use 2 space :P
<jrajav> [INSERT UNCALLED-FOR AND PROFANITY-FILLED FLAMING]
fcadi has quit [Client Quit]
becomingGuru has quit [Read error: Connection reset by peer]
caiges has joined #ruby
<macer1> D:
<macer1> tab nazis
<jrajav> I should raise the "jrajav" up to a higher config-able variable too
Rochefort has quit [Remote host closed the connection]
<jrajav> Not like anyone will actually reuse this
cantbecool has quit [Quit: Computer has gone to sleep.]
pi3r has quit [Quit: Leaving]
xorigin has quit [Quit: leaving]
Fretta has joined #ruby
apok has quit [Quit: apok]
fcadi has joined #ruby
anoldhacker has quit [Quit: KVIrc 4.0.2 Insomnia http://www.kvirc.net/]
Eldariof-ru has joined #ruby
johnlcox has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
cousine has quit [Remote host closed the connection]
alek_b_ has quit [Remote host closed the connection]
senny has quit [Remote host closed the connection]
alek_b has joined #ruby
verto is now known as verto|off
axl_ has quit [Read error: Connection reset by peer]
<shevy> tabs should be forbidden
gfontenot has joined #ruby
axl_ has joined #ruby
<shevy> anyone here working on a shell replacement for bash or zsh in ruby?
jchauncey has joined #ruby
Clooth has quit [Quit: Screw you guys, I'm going home!]
<Muz> shevy: why would you do that?
macer1 is now known as macer2
SegFaultAX has joined #ruby
<lupine_85> no, that would be crazy :)
<canton7> I had a little go once when I was bored
<Muz> Slooooooow would be the obvious reason not to.
<jrajav> shevy: They're actually 4 spaces
<jrajav> shevy: And yeah why would you do that
<lupine_85> eh, nothing to do with speed
vitor-br has quit [Ping timeout: 276 seconds]
<lupine_85> implementing an sh parser is just not going to be fun in any language
Speed has left #ruby ["Leaving channel."]
<fowl> shevy: rush
<shevy> Muz because ruby is a great language
<jrajav> zoh mai gawd
<canton7> jesse storimer wrote a good series of articles too
<jrajav> Just because some language is great in general doesn't mean it's a great shell language
<jrajav> Of course, most shell languages aren't great shell languages either
gfontenot has left #ruby [#ruby]
tatsuya__ has quit [Remote host closed the connection]
hoelzro is now known as hoelzro|away
sneakyness_wk has joined #ruby
<shevy> indeed, they are awful
<asteve> i have a hash return: "a' b" and when I try to puts the hash it is giving me a syntax error; how can I sanitize the string?
<shevy> the only reason against it I can accept is the speed reason
<shevy> asteve what is that? a string?
<shevy> "a' b"
<asteve> shevy: yes, it is a string
gmci has quit [Ping timeout: 244 seconds]
<shevy> how do you get a syntax error?
<shevy> hash = { :foo => "a' b" } # => {:foo=>"a' b"}; hash[:foo] # => "a' b"
<davidcelis> >> { :foo => "a' b" }[:foo]
<al2o3cr> (String) "a' b"
<davidcelis> qed
<asteve> well, the error is actually in a sqlite call to add the string to a db
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<davidcelis> how are we supposed to know sqlite is involved
unrar has joined #ruby
<asteve> davidcelis: you weren't, I misread the error
<unrar> Hi
kyktommy has joined #ruby
<fowl> davidcelis: i saw you get k-lined earlier, what did you do? :>
FaceBack has joined #ruby
Gab0 has joined #ruby
iamjarvo has joined #ruby
<davidcelis> fowl: i dont know how to quit out of IRC so whenever i need to leave, i just go in #freenode and troll
<unrar> One question: should I change from Python to Ruby?
<fowl> davidcelis: lol -_- surely your client has a /quit or /exit
gavit has quit [Read error: Connection timed out]
<unrar> I like the OOP of Ruby, it's better than the Python's one, but Ruby is slower than Python sometimes
<Muz> unrar: you're asking it in a room full of ruby developers? Are you sure you're going to get an unbiased and entirely sensical answer?
gavit has joined #ruby
<canton7> to be fair, though, if speed is an issue, you shouldn't be using a scripting language in the first place
<davidcelis> unrar: false
jjbohn has quit [Quit: Linkinus - http://linkinus.com]
maletor has joined #ruby
<unrar> Yes Muz, I asked Python developers and now I ask Ruby developers :P
* Muz just shakes his head.
<davidcelis> unrar: programming language benchmarks are rarely useful, fyi. ruby and python are extremely comparable in speed. ruby's slowness is a myth
<canton7> and I'm willing to bet they all said 'no', and we'll all say 'yes' :P
arturaz has quit [Ping timeout: 276 seconds]
verto|off is now known as verto
<davidcelis> canton7: i'm gonna say "no"
<canton7> shock horror! :O
<davidcelis> canton7: lets not pollute the community with people who can't make their own decisions :)
<fowl> lol
<Muz> davidcelis: we have enough of those people. They use Rails. ;)
savage- has joined #ruby
<davidcelis> Muz: ಠ_ಠ
<shevy> unrar the main difference between ruby and python is the philosophy
<Muz> I'm sure there's a boilerplate template or blog post instructing me on how this joke should go.
<davidcelis> Muz: `rails g scaffold Joke` ?
<Muz> :)
<canton7> python bungs way too much stuff into the global namespace, and has much uglier "map/reduce" syntax
<canton7> (imo)
<unrar> and what things are different of the philosophy, shevy?
<shevy> unrar the whole point about "more than one way to do it" also means that people try to find new ways in a creative or explorative manner. see the creativity you found in _why for instance
<canton7> also python lacks blocks. blocks are one of ruby's hugely strong points
faen has quit [Ping timeout: 265 seconds]
pu22l3r has quit [Remote host closed the connection]
<unrar> more than one way to do it... i think that it's from Perl :P
<shevy> unrar, well consider this - in python, self is explicit. I dont think a real OOP language should be too stupid to know what is self
<unrar> there's more than a way to do it is a typical phrase of Programming Perl
ChampS666 has joined #ruby
kyktommy has quit [Quit: kyktommy]
<shevy> ruby is perl with the better syntax
<unrar> I also like Perl
<shevy> if you'd be a perl hacker, ruby would be nicer for you
randomautomator has joined #ruby
<shevy> with python, it is harder to say
<fowl> lol perl my arg = shift @_ <- what the fuck is this archaic shit i just want to pass parameters
<shevy> hehe
chridal has quit [Quit: leaving]
jjbohn has joined #ruby
<shevy> unrar, python also has some very good things. better documentation often, better bindings to GUI than ruby too
kn330 has joined #ruby
<pen> ruby is perl??
<unrar> well, there are some things of Perl i hate
<shevy> ruby is the better perl
<pen> how come?
<shevy> perl OOP is unusuable shit
<macer2> jrajav: can you add gem install :p?
burgestrand1 has quit [Quit: Leaving.]
<shevy> my ($self) = @_;
<unrar> I remember I did two IRC bots some months ago: one in perl and one in Python, they did the same
hynkle has quit [Ping timeout: 268 seconds]
<shevy> $khurt->print();
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<macer2> >> require 'active_support'
<al2o3cr> -e:1:in `eval': cannot load such file -- active_support (LoadError), from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<unrar> Perl were about 3 times larger than Python
<unrar> and I also did one in PHP
<shevy> my $self = { _firstName => undef }:
<shevy> perl must die
<unrar> perl is oldie, very oldie
<shevy> but it's the grandpa of ruby, so we should be nicer to it
<unrar> i just played with it because of Programming Perl book
<shevy> PHP is ugly but it kind of dominates the www
<macer2> ^
<unrar> I like PHP for www, well, I preffer PHP that CGI with perl
<shevy> http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html PHP higher ranked than both ruby and python :(
Quadrant_ has joined #ruby
<unrar> i'm doing some things in RoR, but i don't understand nothing
hynkle has joined #ruby
<macer2> I hate php apps without mvc
<canton7> sinatra is lovely, if you haven't tried it
<shevy> ruby still has not surpassed perl ...
<macer2> print("<head>titlebabla</head"); mysql_query; again print html; mysql_query; print html
axl_ has quit [Read error: Connection reset by peer]
<macer2> @_@
<shevy> unrar, RoR is complicated and Ruby is not a very simple language either
<unrar> and I don't understand anything, where does the "New Post" form comes of?
<unrar> I didn't create it!
<unrar> xD
<shevy> I think python is simpler than ruby
axl_ has joined #ruby
<shevy> unrar rails assumes a lot of things
<unrar> Well, I understand Ruby, and I like it
<unrar> but I also like Python
<unrar> also Haskell
<shevy> then it is simple!
<unrar> but Haskell is very rare
<shevy> stick to python :)
<unrar> very very
<atmosx> I like Adriama Lima
<shevy> Haskell is very difficult
faen has joined #ruby
<shevy> can you explain a monad in one human-readable sentence?
Quad has joined #ruby
<shevy> atmosx is that a taekwondo guy? :P
sepp2k has quit [Ping timeout: 276 seconds]
chylli has quit [Ping timeout: 240 seconds]
<shevy> oh no... that was "Andre Lima"
sepp2k has joined #ruby
<atmosx> shevy: Nah, close call though http://adrianalimafan.net/
<atmosx> let's say she's 'good looking female'
Quadrant has quit [Ping timeout: 248 seconds]
<unrar> shevy: I preffer Python for the "old-style" programming, but I preffer Ruby for OOP
<atmosx> old style meaning procedural?
<unrar> Well, I did more OOP things in Ruby that in Python
<atmosx> I need to learn C (some day in the future, when I grow old)
<unrar> yes, I didn't remember the word :P
<shevy> unrar, I really think the philosophy is the biggest difference
dtribble has joined #ruby
indian has quit [Ping timeout: 245 seconds]
<unrar> And where can I see the differences between the 2 philosophies?
<shevy> in ruby you can pass a block to any method
<shevy> in python... I dont know... decorators? can they do the same?
<unrar> I have Programming Perl 4th Edition, Learning Python 4th Edition, Programming Python 4th Edition
<unrar> but i have nothing of Ruby :(
<shevy> unrar, did you read the old interview from matz?
<atmosx> unrar pragmatic bookshelf
<shevy> from 2003
<unrar> nope, i came from Perl
Quadrant_ has quit [Ping timeout: 245 seconds]
<shevy> unrar, http://www.artima.com/intv/rubyP.html I read it back then. I switched from PHP and considered both python and ruby. that interview made me choose ruby first, and I sticked with it
<unrar> I just started exploring Py a few months ago, and Ruby... I remembered Ruby yesterday lol
<shevy> matz = smart guy
<shevy> matz is writing on mruby nowadays... see https://github.com/mruby/mruby/ last commit 5 hours ago :)
<fowl> yes yes we all love Matz (PBUH)
<unrar> and what about Python philosophy, shevy?
<pen> ruby is much better in my opinion, as ruby can be flexible and easy to use but python is very verbose
moshee has quit [Ping timeout: 240 seconds]
* atmosx <== smart guy too, funny also
<workmad3> minswar
<davidcelis> atmosx: nice try
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
<workmad3> *minswan
<atmosx> davidcelis: oh c'mon, it was decent!
<unrar> pen: one of the things I dislike of Python is the... abuse of this
<unrar> *self
<shevy> unrar I dunno... guido's interviews were boring
<shevy> :P
<workmad3> atmosx: we need at least 3 written references and a character reference before we'll believe you're both nice and funny
<atmosx> unrar: I don't know if you noticed the logo, I mean a Python? isn't that twisted?
<unrar> always using self in OOP
<shevy> unrar my problem is ... python used to be a language that is fun
talsamon has quit [Ping timeout: 240 seconds]
<unrar> and the double underscore
<shevy> then came the transition shit between python 2 and python 3
<unrar> I hate the double underscore xD
<atmosx> workmad3: ruby-related?
<shevy> hehe
<shevy> __foo__ is not very elegant
<unrar> def __init__ (self)
<shevy> but ruby has awful things too
<shevy> @@foo
<unrar> underscores and selves
<shevy> I hate (self)
<shevy> hate hate hate
<workmad3> shevy: __send__ :P
stkowski has joined #ruby
<shevy> yeah
<unrar> yes, @ is much pretty
<shevy> but __foo__ is not so bad compared to
NimeshNeema_ has quit []
<shevy> def lalala(self, hi):
sendoushi has joined #ruby
<shevy> def blablablaomg(self,haha_self_again):
<workmad3> that said, __ wrapping is useful to avoid conflicts within the language
<unrar> def initialize (foo); @foo = foo; end
<shevy> def __wtfwtf__(self, damn_why_is_there_always_self)
<workmad3> but forcing the use within overrides... that's ugly
<unrar> hahaha
<uris> you don't always have to use self
<shevy> I can forgive python for using __ in method names... I can even forgive the mandatory : and the indent... but I can not forgive explicit self
affix has joined #ruby
affix has quit [Excess Flood]
NimeshNeema has joined #ruby
<uris> only if you need to access class properties
<shevy> basically all python OOP code I see has lots of (self)
<pen> unrar: yea, even python from google is very very verbose, it felt like an unfinished product in my opinion
<shevy> python is verbose?
adeponte has joined #ruby
<unrar> I like the indent
<shevy> canvas = Canvas(width=300, height=300, bg='white')
<shevy> unrar, is this ruby code or python code ;)
<unrar> I preffer using just indent that { ... } or ... end
<uris> i like both python & ruby. Sometimes I feel like I'm in love with 2 women. :) luckily they are not jealous
<unrar> wait
<unrar> canvas isn't from HTML5?
<unrar> xD
gfontenot has joined #ruby
<shevy> unrar well you can give classes and methods quite about any name
carloslopes has joined #ruby
affix has joined #ruby
<shevy> and canvas is a common name for GUI stuff... gnome has libgnomecanvas I think
<unrar> But what I don't like of Python inden'ts is that you must indent, it'd be better just should indent
<unrar> i didn't touch never GUIs
<unrar> But i read that Python's GUIs are very pretty
<fowl> unrar: the indentation is limiting
carloslopes has quit [Client Quit]
<unrar> but i never tested, i have to read Learning Python and Programming Python
jasonLaster has quit [Remote host closed the connection]
<unrar> but I haven't "Learning Ruby" or "Programming Ruby" :(
<fowl> unrar: for example in python you can't have a lambda that is more complicated than one expression
clocKwize has quit [Quit: clocKwize]
carloslopes has joined #ruby
<unrar> Isn't there any eBook with a good Ruby book?
<unrar> fowl: lambdas are those "x * x in x = 3" or something like that?
<unrar> there is something like that in Haskell, I think
froy has joined #ruby
<fowl> being a rubyist, i thought maybe i could wrap the lambda in () like in almost every other programming language ever.. nope.
Tomasso has joined #ruby
maxmmurphy has quit [Quit: maxmmurphy]
<fowl> unrar: no lambdas are anonymous functions
williamcotton has joined #ruby
<Mon_Ouie> In Haskell it's \x -> x * 2
<shevy> wow
<shevy> I never knew that the indentation limited lambdas
<fowl> you use them like map(lambda x: x * 2, list)
<fowl> or maybe the other way around
<shevy> why did guido decide to use indent anyway?
fbrn has left #ruby [#ruby]
gavit has quit [Read error: Connection timed out]
<nedbat> shevy: until you get to lambdas, it's not a problem, and then it really is.
gavit has joined #ruby
FriedBob has left #ruby [#ruby]
<fowl> shevy: i dunno but wherever you would be limited by indentation in nimrod you *can* wrap in () so its not a problem
beneggett has joined #ruby
<nedbat> shevy: guido has already said that if he were to design a new language now, he wouldn't use indents, because it's a huge distraction. I don't know if he really meant it.
beakerma_ has joined #ruby
<shevy> hmm
<nedbat> shevy: btw, I'm a pythonista, here b/c i'm learning about ruby, if you need someone to speak for the python mindset.
axl__ has joined #ruby
<unrar> So, how can I learn more ruby
<uris> unrar: read a book, and write some code
atmosx has quit [Quit: Computer has gone to sleep.]
<uris> you might not even need a book: rubylearning.com
Morkel has quit [Quit: Morkel]
talsamon has joined #ruby
ianbrandt has joined #ruby
beakerman has quit [Ping timeout: 260 seconds]
td123 has joined #ruby
<unrar> I love O'Reilly books, but they preffer Perl and Python :P
axl_ has quit [Ping timeout: 276 seconds]
axl__ is now known as axl_
williamcotton has quit [Quit: williamcotton]
elaptics is now known as elaptics`away
elaptics`away is now known as elaptics
bam has joined #ruby
jchauncey has quit [Quit: jchauncey]
pdtpatrick has joined #ruby
tvw has quit [Remote host closed the connection]
<shevy> I see nedbat . I wanted to learn python, but this transition phase is no fun
<shevy> I will wait until python 2 is dead
himsin has joined #ruby
miho has quit [Quit: miho]
<davidcelis> like that will happen
miho has joined #ruby
<unrar> Oh nedbat
<unrar> The thing i hate of Python is this version caos between 2.X and 3.X
ChampS666 has quit [Ping timeout: 268 seconds]
mrsolo has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
<shevy> davidcelis well in the long run
<shevy> I am sure it'll get better month by month
<davidcelis> shevy: i want to believe
<davidcelis> i want to
<doherty> How can I dump out the contents of some data structure or object in a human-readable way?
<shevy> doherty, require 'pp'; pp your_data_structure_object_here
<doherty> Thanks
<unrar> Well, i'll program something in Ruby and another something in Python and let's see :P
<nedbat> the 2.x/3.x chaos is difficult, it's true. Funny thing, is, reading about Ruby, it seemed like 1.8/1.9 wasn't so different.
<nedbat> shevy, unrar: I think python3 in production systems will be a reasonable thing this year.
xorox90 has quit [Quit: 전 이만 갑니다.]
arvidkahl has joined #ruby
bier has quit [Ping timeout: 272 seconds]
<shevy> nedbat yeah well. I think I'll give it a try perhaps end of 2012 or start of 2013 again. right now I dont have the motivation
<pen> I wish more people get to know ruby
<shevy> nedbat the only thing that changed really a LOT in ruby 1.9 was the Encoding stuff
<unrar> So nedbat, I want to learn Python better. The book(s) i have are for both 2 and 3 versions, what's better to learn?
<unrar> 3?
<pen> now it's an excuse to not use ruby because "no one" is using it
<shevy> the other syntax changes were not such a big problem... although I dont like the -> operator at all
pdtpatrick has quit [Ping timeout: 276 seconds]
<pen> so sad
ChampS666 has joined #ruby
<shevy> and require_relative stinks compared to plain require
codeFiend has joined #ruby
gmci has joined #ruby
kenichi has joined #ruby
<nedbat> shevy: funny thing: you could summarize the py3 shift *exactly* the same way.
cantonic has quit [Quit: cantonic]
<shevy> I found it is more serious in python
graft has joined #ruby
graft has joined #ruby
<shevy> because a lot of old python code broke
<nedbat> shevy: how many ruby libraries/gems wouldn't work in ruby 1.9? that;'s the heart of tit.
<nedbat> *it
<shevy> even in build scripts, for i.e. xorg related libraries
a_a_g has joined #ruby
<shevy> that print "foo" vs. print("foo") thing alone
mengu has joined #ruby
<workmad3> shevy: require_relative sucks a lot less than '$:.unshift(File.dirname(__FILE__)); require "whatever" ' though :P
<nedbat> shevy: yes, py3 broke everything.
<shevy> workmad3, dunno. I'd rather do require 'foo' than require_relative 'foo' anywhere
<shevy> I would never use $:.unshift myself though
<shevy> this is ugly as hell
<nedbat> shevy: what percentage of gems broke with 1.9? Just a rough guess? 1%? 10%?
<workmad3> shevy: yeah... so what do you do if 'foo' isn't on the load path? :P
<davidcelis> h8rs
<shevy> workmad3, I happily append it via $: << File.dirname(__FILE__)
erichmenge has quit [Quit: Be back later]
<shevy> :D
<workmad3> shevy: ah, but what if you want to make sure *your* foo is found, and not a library foo?
<shevy> nedbat, can't really say... I think many gems broke
caiges has quit [Quit: Computer has gone to sleep.]
<shevy> workmad3 hey... rubygems allows only one name for any library :(
cantonic has joined #ruby
opus has joined #ruby
<shevy> I think that $: << File.dirname(__FILE__) is ugly too btw
<unrar> I don't know what to do!
<shevy> it's all not making me very happy
<shevy> unrar: did you read the interview?
<shevy> it's about the philosophy man!
<nedbat> unrar: use Python! :)
faen has quit [Quit: faen]
<shevy> hehe
cbuxton has joined #ruby
gen0cide_ has joined #ruby
wallerdev has joined #ruby
<shevy> anyone using "jumper" like facilities in their shell? as in ... type only a few things to cd to any directory?
Spooner has quit [Ping timeout: 244 seconds]
berserkr has quit [Quit: Leaving.]
<unrar> what python nedbat
<unrar> 2 or 3???
<unrar> xD
<workmad3> unrar: python 0.2!
jchauncey has joined #ruby
jchauncey has quit [Client Quit]
brianpWins has joined #ruby
pdtpatrick has joined #ruby
FaceBack has quit [Quit: Page closed]
cbuxton has quit [Client Quit]
tvw has joined #ruby
maxmmurphy has joined #ruby
cbuxton has joined #ruby
<nedbat> unrar: that depends on what you want to write, and when you want to write it.
<unrar> i want to learn :P
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Foxandxss has joined #ruby
Spooner has joined #ruby
<nedbat> unrar: the concepts are not so different between the two
gavit has quit [Read error: Connection timed out]
bier has joined #ruby
gavit has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
<shevy> unrar for me it is a bit difficult to switch now, because I maintain a few libraries and projects in ruby now
Hawklord has joined #ruby
Hawklord has quit [Client Quit]
<Spooner> shevy : Refusing to use unshift, rather tahn push, does mean it is much more likely to fail to load properly (since it will try to load your file in every gem before your lib). Most of the time it will work...
<shevy> they have become quite important in that I would try to maintain them in other languages too
mike4_ has joined #ruby
<shevy> dunno
MissionCritical has quit [Ping timeout: 252 seconds]
<mike4_> is ruby OO?
<shevy> I never use array.unshift
<shevy> though
<mike4_> lol
<shevy> I do use array[0,1] = "foo"
<nedbat> mike4_: almost everything these days is OO
<mike4_> seems so.
<Spooner> mike4_ : Ruby is more 00 than any other language I've heard of (which is not all).
<shevy> or array[-1,1] = "bla"
<shevy> mike4_, object.method("argument")
<nedbat> Spooner: smalltalk probably wins.
<mike4_> sounds nice. k
khakimov has joined #ruby
<shevy> in php... $object->method("argument");
<Spooner> nedbat : I dunno. There is OO and OO. Ruby is at quite a different end of OO from most things.
<shevy> ruby is a bit prototypic too
<nedbat> Spooner: no doubt. i was just pointing out the language out beyond it.
<shevy> Struct.new
<mike4_> I was wanting to learn either PERL, Ruby, or Python. Im leaning for ruby, cuz its kinda popular.
<shevy> x = method(:bla)
<shevy> x.call
<shevy> introspection in the Io language was awesome though
<shevy> mike4_ hmm why perl?
<Spooner> mike4_ : Choose the one you prefer. They are all OO, to different extents.
elaptics is now known as elaptics`away
<shevy> ruby and python I can understand
<doherty> mike4_: Perl and Python are also very popular.
<Spooner> And all do the same sort of thing.
<shevy> yeah, they have very much overlapping niches
<doherty> mike4_: What do you plan on doing, aside from learning?
faen has joined #ruby
<shevy> they are like brothers
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
pu22l3r has joined #ruby
<shevy> even PHP
<mike4_> I see.
* Spooner kicks PHP until it bleeds.
<uris> OO is a programming paradigm, you can do OOP in almost any language
<shevy> yeah
<uris> just because a language supports OOP, doesn't mean your program is OO
<Spooner> Ruby/Python/Perl are somewhat supersets of PHP. PHP isn't a general purpose language and thus is extremely limited.
<shevy> and there are different ways to define it too
<uris> i've seen some shity stuff in ruby/java taht isn't OO
dpk has quit [Quit: Asleep at the keyboard.]
<davidcelis> you should try object oriented brainfuck
<shevy> for me, I lean more towards the prototypic way to define OOP... but there are less prototypic based languages and their syntax is ALL crap...
<doherty> object oriented assembly :)
<shevy> Io uses := or =: for assignment (I forgot ) ... and = means "update slot"... I hate this :(
<Spooner> Actually, I've written ASM using OO concepts (I had data structures with "method" pointers and data in it). Really.
<shevy> data structures
TPFC-SYSTEM has joined #ruby
<shevy> data structures are a very important concept
<shevy> in OOP
<shevy> much more so than "how to define inheritance" in my opinion
<Spooner> shevy Do you mean Pascal? That has x := 1 (like our =) and x = 1 (like our ==)
* doherty enjoyed when the professor said "Obviously, a constructor has /no/ return type, or return value"
<fowl> Spooner: stop impressing me
<davidcelis> assembly does a good job of domain-specific problems, but i don't feel like it handles multiple inheritance very well out of the box
<doherty> Having built constructors before, I was like o______________________________________________________________O
<shevy> Spooner, hmm no... Io uses stuff like x := "foo" for assignment. And = for updating this variable... I think the last time I wrote anything in Pascal was in school... 15 years ago or some such :P
<Spooner> fowl It was a washing machine simulator. Mine had animated ascii art and OO. It was epic overengineering.
<davidcelis> Spooner: link
<fowl> lol a washing machine simulator thats a first i think
<davidcelis> Spooner: i once overengineered a Java program that made a bunch of turtles do the Can-Can... but that was long ago
<Spooner> A difference between assign and update? How very odd.
<uris> and workign in mars
workmad3 has quit [Ping timeout: 260 seconds]
<Spooner> davidcelis : Sadly, it was a million years ago for a uni project. Code long since been eaten by time, I'm afraid.
<davidcelis> Spooner: yeah likewise
<davidcelis> wow i was about to say how awesome that JLouisRamblings blog looked
<davidcelis> and then realized it's just a fucking blogspot
<davidcelis> blogspot lookin' pretty good now
mathie has quit [Quit: Sleeping...]
<fowl> shevy: in io := is actually a shortcut for setSlot() if you show the code of the method you'll see that
havenn has joined #ruby
<fowl> getSlot("method") code
chichou has quit [Remote host closed the connection]
chichou has joined #ruby
jrajav has quit []
MissionCritical has joined #ruby
nobitanobi has joined #ruby
<davidcelis> hahahahhahah RVM
* lupine_85 snuggles rvm
<davidcelis> shit like `time gem --version` doesn't work if you use RVM
<davidcelis> because it replaces `gem` with a function
<davidcelis> but then again, what the fuck doesn't RVM replace with a function
<nobitanobi> Trying to create a gem wrapper for the Yelp API. I have this: https://gist.github.com/3342596 — but getting 'uninitialized constant Yelpi::Client::Oauth' — What should I do to make it accessible?
<davidcelis> let's break UNIX. that sounds like a good idea
apok has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
maxmmurphy has left #ruby [#ruby]
pu22l3r has quit [Remote host closed the connection]
chichou has quit [Ping timeout: 260 seconds]
<Spooner> nobitanobi : It is OAuth, not Oauth
<fowl> davidcelis: i hear you have to have ruby installed to install rvm, lul
pu22l3r has joined #ruby
<Spooner> You need ruby installed to install pik (on Windows), which is nice :)
adamkittelson has joined #ruby
* nobitanobi hides from Spooner
<nobitanobi> thanks.
<fowl> Spooner: at that point i would have already installed the latest ruby and dev kit and been done with it
<Spooner> fowl But if you have the latest ruby and dev kit, why use pik? :D
baphled has joined #ruby
<fowl> exactly
axl_ has quit [Read error: Connection reset by peer]
voodoofish430 has joined #ruby
axl_ has joined #ruby
tk_ has quit [Quit: ばいばい]
<pen> :o
jrajav has joined #ruby
<jrajav> macer2: What do you mean by gem install?
<macer2> installing gem for bot
<macer2> bot: gem install rails
<jrajav> Hm.
<jrajav> Sure, why not. I'll add it to the todo list
<jrajav> As long as someone doesn't go ahead and install ALL of them, that would probably fill up the partition :P
khakimov has quit [Quit: Computer has gone to sleep.]
cantonic has quit [Quit: cantonic]
havenn has quit [Remote host closed the connection]
edmmd has joined #ruby
<edmmd> he guys
<edmmd> my jekyll doesn't generate my new post
<edmmd> there is no error, if someone has any ideas ...
<jrajav> I have many ideas
jbw has quit [Read error: Operation timed out]
<davidcelis> >> RUBY_VERSION
<al2o3cr> (String) "1.9.3"
specialGuest has joined #ruby
miho has quit [Quit: miho]
<Spooner> edmmd : Tried in #jekyll?
<jrajav> davidcelis: Did you know that the bot's code is up on github now?
<davidcelis> jrajav: yep, saw it
<davidcelis> 4 space tabs
<davidcelis> tsk tsk
elux_ has joined #ruby
micadeyeye has joined #ruby
<jrajav> Okay seriously does EVERYONE in here swear by 2 space tabs? :P
<davidcelis> yeah
<davidcelis> except shevy
<jrajav> And me
ph^ has joined #ruby
tommyvyo_ has joined #ruby
<davidcelis> he uses 8 spaces
<micadeyeye> can't install oversip in Fedora. here is the error I keep getting - http://fpaste.org/1zoR/
<davidcelis> and by 8 spaces, i mean shevy uses two 4-space hard tabs
<jrajav> Which would be 16 spaces in vanilla vim
<jrajav> :P
<unrar> I think i'll preffer Ruby, I bought some books
<micadeyeye> kindly help!!\
<fowl> micadeyeye: do you have make? `which make`
<unrar> The Ruby Programming Language, Learning Ruby and Ruby's Cookbook
<jrajav> 2 spaces is just too confined for me. I don't find it as readable
<micadeyeye> fowl, [micadeyeye@micadeyeye opt]$ which make
<micadeyeye> /usr/bin/make
<TTilus> ive been thinking of switching to three spaces
<unrar> Or I also can use both python and ruby and stop this punishment
<unrar> :P
<TTilus> or one tab and a space
specialGuest has quit [Changing host]
specialGuest has joined #ruby
<unrar> It's very instructive
elux_ has quit [Client Quit]
<jrajav> unrar: You can and should use several different languages for your own stuff
fascik has joined #ruby
<Spooner> ttilus Why not 3.5 spaces? That would be 3, 7, 10, 14 space indent levels (assuming #to_i, not #round on the numbers :D)
<fowl> micadeyeye: maybe there is something useful in /home/micadeyeye/.gem/ruby/1.9.1/gems/oversip-1.0.5/ext/stud/gem_make.out
<unrar> yeah
<unrar> But one question
<unrar> Ruby is "Dynamicaly typed", no?
<micadeyeye> fowl, http://fpaste.org/cZzO/
<unrar> So there aren't customized types as in C(++)?
<fowl> unrar: no types, classes.
edmmd has quit [Ping timeout: 245 seconds]
<jrajav> That's not what dynamically typed means, but no
<micadeyeye> [micadeyeye@micadeyeye opt]./home/micadeyeye/.gem/ruby/1.9.1/gems/oversip-1.0.5/ext/stud/gem_make.outt
<micadeyeye> bash: ./home/micadeyeye/.gem/ruby/1.9.1/gems/oversip-1.0.5/ext/stud/gem_make.out: No such file or directory
<jrajav> Yes to first, no to second
<micadeyeye> I don't know which of them you wanted.
fastred has quit [Ping timeout: 276 seconds]
fascik is now known as fastred
<fowl> micadeyeye: i dunno there's no useful info there, is there a mkmf.log somewhere?
<micadeyeye> nope
miho has joined #ruby
<fowl> ill try to install and see if i get an error
<banseljaj> hey any of you guys know anything about RuGUI?
<micadeyeye> i just tried installing another app - compass - and it was successful.
flak has joined #ruby
hynkle has quit [Quit: Computer has gone to sleep.]
<unrar> jrajav: i'm spanish, i did a custom translation :P
flak is now known as Guest18558
<unrar> What's dyanamically typed then?
shadoi has joined #ruby
<unrar> and another question: what are the symbols for?
<Spooner> Can anyone help me with this: /home/spooner/scripts/something.rb:99 NonSpecificError: Something went wrong!
<fowl> micadeyeye: yep i get error too
jjbohn is now known as jjbohn|verifying
lkba has quit [Ping timeout: 240 seconds]
whalesalad has joined #ruby
hynkle has joined #ruby
dhruvasagar has joined #ruby
<fowl> micadeyeye: file an issue
<micadeyeye> hmm
<whalesalad> hey guys I am new to ruby, writing a data importer. right now my class loads some data as a property, and when I instantiate an object in the irb it prints all the data, what is called when you create a new object to represent it in the shell?
A124 has joined #ruby
<fowl> whalesalad: when you just type someobj it calls inspect() on it
rippa has quit [Ping timeout: 248 seconds]
<TTilus> unrar: just remember dynamic=runtime, static=compiletime
<unrar> Why does irb crash if I use special characters as "ñ" or "á"¿
elhu has joined #ruby
<whalesalad> fowl: I defined a to_s method and that seems to help
<TTilus> unrar: and type system can very well have a dash of both features
<fowl> unrar: irb sucks. use Pry
_JamieD_ has joined #ruby
<unrar> what's pry?
<fowl> whalesalad: by default inspect() calls to_s()
<jrajav> Why does my bot crash if I use special characters though :(
<jrajav> >> "ñ"
steffes has joined #ruby
<al2o3cr> -e:1:in `eval': (eval):1: invalid multibyte char (US-ASCII) (SyntaxError), (eval):1: invalid multibyte char (US-ASCII), from -e:1:in `<main>'
tvw has quit [Read error: Connection reset by peer]
<fowl> unrar: a much improved repl/code explorer
<nedbat> unrar: dynamically typed means that names can take values of any type. Statically typed means a name can take on only some values.
<whalesalad> fowl: thanks a lot
<unrar> It happens with Python interpret also
<Spooner> jrajav : Because IRC is sending it UTF-8/16 and you are assuming it is ASCII?
slyv has joined #ruby
kvirani has joined #ruby
<fowl> unrar: http://pryrepl.org/
<jrajav> nedbat: That's not necessarily true, and it's overly simplified anyway
<jrajav> Spooner: *I* never assume an encoding, Cinch might
<micadeyeye> fowl, where?
<fowl> whalesalad: you should check out pry too it will speed up your learning to be able to type `show-doc String#scan` and have it right there
<micadeyeye> i don't know ruby bug tracker.
jbw has joined #ruby
<jrajav> Spooner: All I'm doing is calling 'print query' to the runner script's stdin, where query is the captured scriptlet that Cinch gives me (from the regex event)
flype has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
Astral_ has quit [Quit: Leaving]
Guest18558 has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Spooner> jrajav : I haven't used Cinch, so I haven't a clue about that.
<whalesalad> fowl: rad! I imagined there must be an improved irb.
rippa has joined #ruby
ananthakumaran has joined #ruby
<fowl> micadeyeye: find the gem on http://rubygems.org/ click on homepage it will take you to the project's github page where you report issue
AlbireoX has joined #ruby
<Spooner> fowl Hasn't banisterfiend managed to get Pry to replace irb in Ruby distros yet? Slacker!
<fowl> micadeyeye: i'd link you to the github page directly but i already forgot what the gem was called
<slyv> How would I be able get an unknown string in-between two characters, like: "<asdh>" I don't know what asdh would be, but I know it's in between < and >. I think scan might be able to do so, but I haven't quite figured it out.
<fowl> Spooner: i doubt it will, it has too many dependencies
<canton7> slyv, "yay <the thing> boo"[/<(.*?)>/, 1]
macer2 is now known as macer1
macer1 has quit [Changing host]
macer1 has joined #ruby
<Spooner> slyv : "<asdh> <frog>".scan(/<([^>]+)>/).to_a
maletor has quit [Ping timeout: 244 seconds]
<Spooner> Oops, don't need to to_a it.
<slyv> Ah, thank you so much!
becomingGuru1 has left #ruby [#ruby]
<apeiros_> slyv: you don't try to process html by regexen, do you?
<slyv> It's not html, I was just using <>'s as an example.
jjbohn|verifying is now known as jjbohn
urbann has joined #ruby
<unrar> thanks fowl
<unrar> I like the gems system
urbann has left #ruby [#ruby]
<jrajav> I still can't figure out where Cinch or my code is failing with unicode chars
<Spooner> slyv : You narrowly avoided being tarred and feathered there :P
<jrajav> Cinch seems to know about and handle encodings fine
<jrajav> (From the docs at least)
<slyv> lmao :P
<fowl> unrar: whalesalad also install pry-doc so you can show-source and get C sources
flype has quit [Quit: Computer has gone to sleep.]
jlogsdon_ has joined #ruby
maletor has joined #ruby
doherty has left #ruby ["Leaving"]
nedbat has quit [Ping timeout: 244 seconds]
jrist is now known as jrist-gym
lkba has joined #ruby
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
Eldariof59-ru has joined #ruby
jlogsdon has quit [Ping timeout: 240 seconds]
jjbohn is now known as jjbohn|afk
qwerxy has quit [Ping timeout: 244 seconds]
nohonor has joined #ruby
MarGarina has quit [Ping timeout: 245 seconds]
Eldariof-ru has quit [Ping timeout: 260 seconds]
pu22l3r has quit [Remote host closed the connection]
jrajav has quit [Quit: The best darkness is strange and surprising]
wallerdev has quit [Quit: wallerdev]
jlogsdon_ has quit [Remote host closed the connection]
jlogsdon has joined #ruby
dpk has joined #ruby
edmmd has joined #ruby
matti has joined #ruby
<edmmd> Spooner: Yes, already tried
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<edmmd> :(
<clop> is it "fast" to create a string by repeatedly appending small amounts of text with +?
cascalheira has quit [Quit: Leaving...]
emmanuelux has quit [Ping timeout: 240 seconds]
juarlex_ has joined #ruby
<matti> clop: Not very efficient.
<Spooner> clop Use s = "frog"; s << "3" --- don't use s += "3"
bglusman has joined #ruby
<clop> ah thanks, didn't know about <<
<eam> clop: it's because + doesn't append, it returns a new string object
Guest36615 is now known as ged
<matti> ;)
iamjarvo has joined #ruby
<eam> Spooner: does << really behave differently from += though? Sounds like a bug
<Spooner> clop Ruby reallocates the string with s += "2" because it is really just doing s = s + "2" (+= is pure sugar, not a real operator)
<eam> ruby ought to optimize that
<Spooner> eam no, because it is doing what you asked it to :)
<eam> don't give me that -- failure to optimize is a bug
<Spooner> If you wanted to append, you'd use <<
<Spooner> So you don't.
juarlex has quit [Ping timeout: 240 seconds]
<eam> next you'll say gcc shouldn't find more efficient code to represent the functions I hand it
<eam> Spooner: you are wrong
<Mon_Ouie> Except += isn't equivalent to <<
<eam> the role of the compiler or interpreter is to optimize code to do what you say in the most efficient way possible
<eam> Mon_Ouie: how so?
jimeh3 has quit [Ping timeout: 248 seconds]
<davidcelis> eam: bro, += isn't the concatenation operator so why would it concatenate
jrajav has joined #ruby
<eam> davidcelis: how does it differ?
<Mon_Ouie> += creates a new object — it doesn't affect old references to the other string
<davidcelis> they already told you
<Mon_Ouie> += is a syntax sugar for a = a + b, << is just a method call
havenn has joined #ruby
<eam> so the answer to "does it behave differently" is "yes"
<eam> not "no, but interpreters shouldn't optimize"
the_jeebster has left #ruby [#ruby]
the_jeebster has joined #ruby
<Spooner> They shouldn't alter what you ask them to do in order to optimise.
<eam> absolutely incorrect
<davidcelis> lol what
<davidcelis> so a programming language should do something OTHER than what i tell it to?
<davidcelis> seems legit
ananthakumaran has quit [Quit: Leaving.]
<eam> davidcelis: to achieve the same effect within the definition of the language? absolutely
<eam> that is how optimization works
<Spooner> It isn't the same effect. You think it is, we think it isn't. It just happens that x += "frog" in C works one way, which doesn't mean it has to work the same in Ruby (in fact, the Ruby version makes a lot more sense).
kvirani has quit [Ping timeout: 244 seconds]
<eam> x += "frog" doesn't work at all in C
schaerli has joined #ruby
<unrar> Isn't there an increment operator as x++=
<unrar> *?
<Spooner> unrar : Nope, just x += 1
andrewhl has quit [Remote host closed the connection]
steffes has quit [Remote host closed the connection]
<Spooner> Sorry, C++
maxmmurphy_ has joined #ruby
jimeh3 has joined #ruby
kvirani has joined #ruby
resure has joined #ruby
havenn has quit [Ping timeout: 246 seconds]
<Spooner> where x is a string object, not a char* (if we want to be pedantic).
Doc_X has quit [Read error: Connection reset by peer]
<jrajav> x ++= wouldn't make a lot of sense, since ++ is a unary operator
Doc_X has joined #ruby
<eam> Spooner: again, I think you're missing the point. IF there are two equivalent methods, the language implementation should chose the most efficient
<Spooner> And it isn't the compiler magically optimising +=, there is a specific operator += that on a string "happens" to be implemented as append.
<eam> you seem to be missing the "IF" that I predicated all my statements upon
davidcelis has quit [Ping timeout: 260 seconds]
<Spooner> You are the only person here who things they are equivalent in Ruby. They aren't which is why they behave differently.
<eam> Spooner: I did not say they were
centipedefarmer has quit [Quit: This computer has gone to sleep]
<eam> I asked, and you gave the wrong answer
mockra has quit [Remote host closed the connection]
maxmmurphy_ is now known as maxmmurphy
mockra has joined #ruby
<Spooner> I now realise why the other peopel trying to correct you gave up a long time before me :)
<eam> I'm in agreement with them
<eam> our only issue is that you seem to believe that interpreters or compilers should not optimize
<Spooner> I never said that, but I'm done.
a_a_g has left #ruby [#ruby]
<eam> well, next time when someone says "if X is so,then Y" you might want to address X before starting an argument about Y
davidcelis has joined #ruby
<unrar> jrajav: I meant "x++?"
<wmoxam> lol
<unrar> but i wrote "x++=" for error :P
maxmmurphy_ has joined #ruby
* wmoxam read the backscroll
<unrar> i'm now discovering that Ruby is better than Python
kirun has joined #ruby
<wmoxam> unrar: how so?
maxmmurphy_ has quit [Read error: Connection reset by peer]
<unrar> i.e, "Actually the counter is #{x}" in python is "Actually the counter is "+str(x) or "Actually, the counter is %s" % (x)
maxmmurphy_ has joined #ruby
<jrajav> >> "Ruby".length < "Python".length
<al2o3cr> (TrueClass) true
<jrajav> This clearly shows that Ruby is more efficient
<wmoxam> unrar: it's probably more sugary
<wmoxam> 'better' is pretty subjective
<Spooner> unrar : It is both of those in Ruby too ("Actually the counter is "+x.to_s OR "Actually, the counter is %s" % x)
<fowl> unrar: ruby also has String#%
maxmmurphy_ has quit [Read error: Connection reset by peer]
maxmmurphy_ has joined #ruby
<unrar> But in Python there isn't #{x}, no?
<jrajav> unrar: I actually like the simplicity of only having + in Javascript (I don't use Python)
Denommus has joined #ruby
<jrajav> That doesn't mean I won't use #{} in Ruby of course :P
beneggett has joined #ruby
<Denommus> the more I read about Lisp, more I think Ruby is a valid Lisp
<whalesalad> what is preferred in a class method, @blah or self.blah ?
<canton7> yeah, but JS's weak typing makes that lowly + a minefield if you're not wary
moshee has quit [Ping timeout: 276 seconds]
edmmd has quit [Quit: Page closed]
<apeiros_> Spooner: don't feel too bad. it's certainly a broken optimization when the interpreter suddenly mutates an object instead of creating a new one (which I'd assume is what you meant by "it shouldn't change what I tell it to do")
moshee has joined #ruby
<unrar> wmoxam: yes, in somethings (as OOP) Ruby is better (for me) and in other things (i don't discovered them yet) Python is better (for me, I suppose)
<apeiros_> (or rather: it'd be a broken optimization - since luckily, ruby doesn't do that)
monkegjinni has joined #ruby
maxmmurphy has quit [Ping timeout: 276 seconds]
maxmmurphy_ is now known as maxmmurphy
<jrajav> I've heard Python is better for functional programming
<wmoxam> unrar: Python has better library support IMO, especially with things like GUI libs
<Denommus> everybody says "but Lisp's basic data is a list, and even the code is a list and blah blah blah". But, as far as I used Ruby, the same is truth for Ruby and objects. Everything is an object in Ruby, and you can manipulate everything as such
<Spooner> apeiros_ : Indeed. We were comparing apples and oranges a bit there :)
<fowl> you can be functional in ruby
jjbohn|afk is now known as jjbohn
<fowl> just define functions outside of a class
<unrar> woo
<unrar> I don't know, i'm starting to like Ruby
<Denommus> jrajav: that's a lie. Ruby has a lot of support for functional programming
<unrar> let it discover itself :P
<fowl> i used to love to write functional things and pester #ruby-lang with them
<Denommus> jrajav: you can pass a function to other with procs, lambdas or blocks. Each of them acts differently. It's awesome
darren has joined #ruby
waxjar has joined #ruby
<Spooner> unrar : The thing from your example that gets me is str(x) vs x.to_s. The former is a built in method. The latter is a method that you can override in your classes to produce exactly what you want (I admit it is possible that str(x) calls something like __please_make_yourself_into_a_string__ in Python, but it is more direct in Ruby).
theRoUS has quit [Ping timeout: 265 seconds]
<wmoxam> I heard that Ruby has a lot of support for not scaling
<apeiros_> lol
<shevy> davidcelis I gave up on tabs forever. 2 spaces are my indent level until I die
* wmoxam trolls
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347]]
<shevy> unrar Did you read the interview?
<fowl> lol wmoxam
MissionCritical has quit [Ping timeout: 245 seconds]
<unrar> yes shevy
<apeiros_> wmoxam: yeah, but just do Scaling.remove_const(:FullyBlocked)
<unrar> a little part :P
<shevy> ok :)
<shevy> whaaat!
<unrar> hahahah
<shevy> it's the philosophy man! that is more important than 100 specific tutorials!
<Spooner> wmoxam : Not as much as it has a lot of support for real-time applications (the GC is pretty much perfect for games, for example).
<unrar> i'll read it then, i'm doing kindle things now
fermion has quit [Quit: P]
<unrar> i have 3 Ruby books in my kindle :P
<shevy> unrar \o/
<wmoxam> ;)
<apeiros_> Spooner: you should talk with whitequark
<shevy> way too much
<unrar> haha
<shevy> the interview is only like 4 DinA4 pages
<unrar> and 2 Python books
<Spooner> Oops, I mean CRuby GC :)
<Denommus> wmoxam: just like MongoDB scales better. You know, because it's dynamic. Because when we talk about DB's being dynamic is better. But being static is better with languages. Shut up, it makes sense
<apeiros_> he's working on getting ruby (or actually a derivative) on embedded systems
<unrar> and 2 Perl books
<unrar> Ruby wins!
bglusman has quit [Remote host closed the connection]
<Spooner> apeiros_ : whitequark?
<apeiros_> I'm not quite sure how he gets around with the memory constraints…
<apeiros_> yes
<Spooner> Oh, I see.
<Spooner> Sounds like hell.
<apeiros_> sounds like shitloads of fun :)
<unrar> oops no, i just have 2 python
<apeiros_> I'd love to do such stuff on paid time…
<unrar> 2 ruby an 2 perl
<unrar> 2 for everybody
<unrar> Learning Perl&Python, Programming Perl&Python, The Ruby Programming Language, Ruby Cookbook
<wmoxam> "I'll often drop down to node.js if I really need to be close to the metal"
<unrar> What's node.js?
<unrar> I read it somewere
<unrar> *somewhere
wallerdev has joined #ruby
<wmoxam> unrar: It scales
<wmoxam> Obviously
dr_bob has joined #ruby
<Denommus> Perl is the perfect language, if you want to write hieroglyphs
<Denommus>
<Denommus> the second line was an accident, sorry
<fowl> Denommus: flog yourself
<Spooner> We inherited enough hieroglyphs from Perl to do OK in Ruby.
chichou has joined #ruby
jasonLaster has joined #ruby
mathie has joined #ruby
<wmoxam> see, the new hottness is build MongoDB backed node.js app on your ArchLinux laptop using xmonad, tmux, zsh and vim
h8R has quit [Ping timeout: 276 seconds]
<unrar> I know Denommus :P
<unrar> I just have it because it's a very famous book...
<dr_bob> Denommus, are you saying the old Egyptians invented Perl?
<unrar> Programming Perl is The Cammel Book xD
<wmoxam> if you aren't doing that you're old and behind the times and obviously know nothing
<Denommus> dr_bob: yes. They based themselves on Lisp
<dr_bob> wmoxam, Socrates already proved that we do know nothing. So nothing new there.
<Denommus> wmoxam: ok, now I'm offended. I love ArchLinux XD
<eam> I wish ruby's scoping capabilities were as clear and powerful as perl's
Eplemosen has joined #ruby
h8R has joined #ruby
<dr_bob> eam, what are you missing?
<wmoxam> Denommus: http://reddit.com/r/unixporn
bananastalktome has joined #ruby
<wmoxam> there you go
<jrajav> unrar: It's the V8 engine running standalone, basically
<wmoxam> don't jizz on your monitor too much
<flori> ruby isn't that different from Perl, see [ 1,2,3 ].map &-> _ { _ + 1 }
<jrajav> unrar: Plus Node.js, which is some additions for filesystem, network access, etc.
<eam> dr_bob: clear, readable scope declaration. Doesn't exist at all in 1.8, and it's ugly in 1.9
<Denommus> wmoxam: I want to have your children
<jrajav> unrar: Basically the server-side stuff that Javascript is missing
<wmoxam> Denommus: probably not. I run Ubuntu+Unity
<eam> it's horrifying that in 1.8 you can't pass a block without potentially stomping on variables in the containing scope
fantazo has quit [Remote host closed the connection]
savage-_ has joined #ruby
<Denommus> wmoxam: now I can abort your children
<Denommus> *I want to
<wmoxam> lolz
A124 has left #ruby [#ruby]
<jrajav> unrar: The hype about "scaling" is mainly because it makes it very natural to write blocking code asynchronously, and also that the V8 engine is ridiculously fast
<dr_bob> eam, Ruby has Modules and Classes which server as namespaces, def and begin end and do end. It did not really change much between 1.8 and 1.9 - only semtics of blcoks were changed in 1.9 - to the better
<eam> dr_bob: the 1.9 fix of do |a,b,c;x,y,z| is not great
<fowl> wmoxam: i've also heard that any technological discussions and opinions on reddit are worthless, instead we trust in the folks on hackernews
snearch has joined #ruby
<jrajav> Denommus: I don't remember saying "Ruby doesn't have functional programming"
<eam> dr_bob: and AFAIK it's still not possible to declare variables local to an arbitrary scope in 1.9
<Denommus> wmoxam: no, seriously, I love Ubuntu, too. My home computer runs it. But my personal notebook runs Arch because it runs *exactly* how I want it to run
<wmoxam> fowl: I may have helped spread those rumours. I take it all back now
wallerdev has quit [Quit: wallerdev]
<eam> eg, in perl I can start a block with { and say my $foo; } and scope to a block
wallerdev has joined #ruby
<fowl> wmoxam: i dont disagree about the reddit part but the hackernews fanboyism kills me
<jrajav> Denommus: But that's not necessarily clear-cut either; not everyone thinks that lambdas and first-class functions are all you need for functional programming
savage- has quit [Ping timeout: 244 seconds]
<Denommus> jrajav: you didn't say. But I see Python and Ruby as equivalent on functional programming. But this thing about blocking overriding local variables is indeed awful :(
<wmoxam> Denommus: yeah, I ran Arch a while back. It can be fun. In general I don't like Linux on laptops (just run it on a desktop)
<dr_bob> eam, I really don't miss anything. You could look at it from another perspective: too good scoping constructs will invite people to write long methods with a lot nested scopes. That isn't good for readability.
<wmoxam> basically don't like how it sucks a battery dry :p
<Denommus> wmoxam: one of the reasons I decided for it was awesome wm: http://awesome.naquadah.org/
<Denommus> wmoxam: it's great on laptops without a proper mouse
<jrajav> You can't run awesome on ubuntu?
<wmoxam> fowl: HN *was* good for a while, but like every other tech discussion community it rapidly went downhill
haxrbyte has joined #ruby
MasterIdler has joined #ruby
IrishGringo has joined #ruby
<eam> dr_bob: right now in 1.8 I can't make a loop-local variable at all, safely
<wmoxam> Denommus: yeah, I ran awesome for a while
<eam> frankly it's nuts
bluenemo has quit [Remote host closed the connection]
SCommette has joined #ruby
SCommette has quit [Client Quit]
<Denommus> jravjav: you can. But taking an empty distro and configuring was better than taking Unity out of Ubuntu :)
<wmoxam> Denommus: and Ion before that
bluenemo has joined #ruby
SCommette has joined #ruby
<eam> dr_bob: and I don't think ruby has much room to talk regarding readability and lack of glyphs when its only scoping declaration is |,;,|
Mission-Critical has joined #ruby
<Denommus> jrajav: I didn't say it was all you need, but Ruby is not lacking much compared to Python
<eam> I'll take my() any day of the week when it comes to clear, glyph-free readable syntax
<unrar> Look look
<unrar> :3
<fowl> eam: you might have heard but 1.8 is old, slow, and not being updated any more
<fowl> eam: also when you do x = 4 that is a local variable so what are you talking about the only scoping being |,,|
<eam> fowl: and it's probably 90% or more of existing installations, and is the ruby shipped with every major distro
<unrar> I love Ruby yes yes I love it
<unrar> :·3
<eam> fowl: and |,;,| is 1.9
<eam> not 1.8
* unrar is so excited
jjbohn is now known as jjbohn|afk
<eam> it's even uglier and less readable
<matti> Hmmm...
<jrajav> Denommus: I don't know anything about Python; all I said was that "I've heard it's better for functional programming," as a response to someone asking what Ruby and Python are better for in comparison
<fowl> eam: huh? whats that syntax called
<fowl> eam: i want to google it but |,;,| isnt going to fly
<jrajav> I've always been meaning to try Python someday but other things have always seemed more interesting
<eam> fowl: it's how 1.9 allows you to declare a block scoped variable
<dr_bob> eam, quoting Perl for "clear, glyph-free readable syntax" is kind of funny...
<Denommus> jrajav: so I don't think we can discuss much about the subject. I know a bunch about Python, but not enough
<matti> Anyone looks for Ruby / Systems person perhaps?
<eam> dr_bob: truth is stranger than fiction
<jrajav> I know a bunch about functional programming, but not enough about either Ruby or Python to comment either
<fowl> you dont have to declare a block scoped variable...
<eam> fowl: if you don't, you clobber the parent scope
<Denommus> jrajav: now I'm taking a look at emacs Lisp. Makes me wish for emacs rewritten in Ruby. Lisp is awesome, but ugly
<eam> fowl: that's the source of the complaint -- ruby has very poor scoping mechanisms
<fowl> proc { x = 5 } <- x is local to the block
<jrajav> You don't think curves are sexy?
<jrajav> :P
<eam> fowl: it clobbers x if it happens to exist outside the block
<eam> that's the problem
cascalheira has joined #ruby
<eam> you can't scope
Spooner has quit [Ping timeout: 252 seconds]
<fowl> ah, so it does
<Mon_Ouie> Here's a funny thing: def let; yield; end
<eam> 1.9 added a semicolon to the || variable definition syntax to hack around this issue
<Mon_Ouie> x = 5; let { |x = 3| puts x }; puts x
<matti> Mon_Ouie ;-)
<eam> Mon_Ouie: yes. And I would much rather have a normal scope function
<macer1> hmm
<macer1> is there some lib
<unrar> What's let?
sendoushi has quit [Remote host closed the connection]
<macer1> to convert bash ansi escapes colors
<macer1> to html?
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
<eam> something generic and non-specialized
cascalheira has quit [Client Quit]
<Mon_Ouie> unrar: Common syntax for creating variables restricted to a certain scope in many languages
clocKwize has joined #ruby
<Denommus> Mon_Ouie: I would find awesome to have it embedded in main Ruby
Mission-Critical is now known as MissionCritical
Criztian has joined #ruby
<apeiros_> dunno, but if you've got troubles separating your local variables, you have another problem (but yes, I agree that there are issues with the way rubys scoping works, but more than scoping, with the way its closures work)
<Denommus> unrar: it's something based on Lisp. You use let to create local variables inside of that block.
<unrar> I never used Lisp :P
<eam> well, it's not just "based on lisp" -- pretty much all mature languages have the ability to declare variables with a scope
qwerxy has joined #ruby
<eam> eg C's stack variables
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
faen has quit [Read error: Connection reset by peer]
savage- has joined #ruby
<Denommus> eam: Lisp started it, as far as I know
<Denommus> eam: Lisp is older than C
<macer1> if I have some exception
<eam> ruby's syntax is derived from C, as is Perl's and most other languages with a generic procedural syntax involving blocks
<macer1> how can I check from which class is it
<eam> in C, a {} pair allows you to manipulate the stack
<Mon_Ouie> An exception is a regular object
<Mon_Ouie> You can use #class, etc. on it
<macer1> no no
<macer1> I mean
<eam> and create temporary variables on the stack, which are popped off when the {} scope is exited
<macer1> i.e class Encryption raised exception
<Mon_Ouie> A class doesn't raise an exception
<macer1> I want to know it was that class or no
<macer1> -_-
<macer1> from which class is code
<macer1> ...
<Denommus> macer1: you can check the stack message to know where the exception came from
Lachryma has quit [Quit: Leaving]
savage-_ has quit [Ping timeout: 240 seconds]
<eam> eg { int a; // variable is on the stack, and is freed when block ends }
<macer1> I know
<macer1> I see
<macer1> from encryption.rb
bananastalktome has quit [Quit: bananastalktome]
<macer1> but parsing stacktraces is not a good idea
<eam> higher level languages like ruby or perl approximate this scoping behavior, but the way ruby does it is arguably buggy
faen has joined #ruby
<eam> or, at the very least ugly
<apeiros_> eam: first thing to do is probably to realize that the only thing rubys blocks and C's blocks share are the name and the {}
<fowl> you can avoid name clashes if you try *really hard*
<Mon_Ouie> Are you trying to do something different depending on the source of the exception?
<fowl> lol..
<eam> apeiros_: that's right
<eam> and it's unfortunate
<apeiros_> and the second thing is to stop trying to think of trying to use ruby as if it was C. if you want C, use C.
<apeiros_> no, no, that part is certainly not.
<apeiros_> again, if you've got trouble with your local variables, you're already knee-deep in bad code.
<eam> to be clear, you're saying it's not unfortunate that ruby 1.8 cannot declare scoped variables?
<apeiros_> and blaming the language for not giving you tools to deal with bad code… well… that's just stupid.
<Denommus> eam: I don't think so. Ruby is for Rubyists. I love both C and Ruby. If I want something with C style, I'll use C, if I want something with Ruby style, I'll use Ruby
<eam> and you're saying the |,;,| syntax addition in 1.9 isn't ugly as sin?
erratic has quit []
_JamieD_ has quit [Quit: _JamieD_]
<apeiros_> eam: your claim is wrong.
<eam> Denommus: ruby is a C style language, that is its heritage
<apeiros_> eam: ruby HAS scoped variables. even in 1.8.
<apeiros_> but you're clinging on blocks.
<eam> apeiros_: not fully generic
<apeiros_> yeah, not a problem.
<jrajav> Ruby is a C style language?
<jrajav> lol
<eam> there are many contexts where they cannot be created
<Denommus> eam: no, Ruby is a Lisp/Smalltalk style language. There is very little similar to C
<apeiros_> again, not a problem. unless you try to pretend ruby was C.
<eam> Denommus: haha
<apeiros_> it isn't. get your head around it and move on.
<fowl> Denommus: uhh you're forgetting the braces brah!
<eam> Denommus: have you ever *used* either of those?
<infinitiguy> quick question - if I call a function in ruby say.. myfunction()
<infinitiguy> if I put content between the parens …. myfunction(hello)
<Mon_Ouie> Someone is going to say it isn't a function
<infinitiguy> what is hello called and how is it referenced?
<eam> Denommus: or do you just read blogs and parrot them?
<macer1> if exception.fromclass == Encryption; puts "OMGOMG ENCRYPTION ERROR!"
* apeiros_ hopes Mon_Ouie is that someone :)
opus has quit [Quit:]
<Denommus> eam: yes. I'm an emacs user, and I checked a little on Smalltalk. And hell, even Matz admits the similarities
<jrajav> eam: You seem to be basing your arguments entirely on syntactic elements
<Mon_Ouie> infinitiguy: It's a method, not a function ;)
<apeiros_> hurray! :D
<infinitiguy> whoops :)
<eam> jrajav: hardly
<Denommus> eam: the fact that Ruby uses "{ }" does not makes Ruby similar to C. It's not similar. At all
<jrajav> So which of Ruby's semantics do you find to be similar to C
<eam> Denommus: it has nothing to do with {}
<Mon_Ouie> macer1: In that case, you shouldn't be checking the source of the Exception, you should be using a different kind of exception
<apeiros_> Denommus: but but but it uses = for assignment too!!!
<fowl> infinitiguy: by what is it called do you mean what is it refered to by in the myfunction() method?
<macer1> hmmm
<macer1> ohh
<eam> Denommus: pascal is also a C family language, and does not have {}
<macer1> class EncryptionError < Exception;end
<jrajav> Ruby also uses () to delimit function arguments!
<macer1> is that good?
<infinitiguy> yes - so I want to be able to say mymethod(hello) and then assign hello to some variable inside of mymethod to do something with
<fowl> infinitiguy: def myfunction(zoot) <- it's called zoot
<Mon_Ouie> No, use StandardError
<infinitiguy> in my case - enable or disable an api object
<macer1> why?
qwerxy has quit [Quit: offski]
<macer1> maybe I want some other exceptions...
<Denommus> eam: the only thing similar between them is that both of them are procedural. But this does not have anything to do with C
<macer1> rescue that then that rescue other then sthing other
<Mon_Ouie> rescue without specifying a class is rescue StandarError, not rescue Exception
<macer1> >.>
<infinitiguy> currently in my def I only have def mymethod() nothing defined along with it
<eam> Denommus: you are completely wrong, but this argument isn't worth pursuing
tatsuya_o has joined #ruby
<fowl> infinitiguy: then you cannot pass it any arguments, you'll get argumenterror because it expects none but you passed it one
<lectrick> Is there any way to have a def...end return the symbolized method name? That way I could just do >>> private def methodname; ...; end And it all works sweet.
Markvilla has joined #ruby
<eam> Denommus: most of the languages ruby is based on, of which perl is one, are in turn derived in no small part from C and C style syntax
<eam> if that sounds wrong to you, you likely lack historical perspective
<Denommus> eam: so, how are you right? You didn't explain what are the similarities between the languages. The internals are different, the style is different, the way you treat code is different
<wmoxam> eam: C is just an Algol style language
<eam> wmoxam: sure
<fowl> who cares
ringotwo has joined #ruby
<eam> fowl: I agree, this is a red herring
<fowl> eam: your point is moot and you will change nothing by droning on about it
mmercer has quit [Ping timeout: 244 seconds]
<eam> fowl: which point?
<fowl> all of them
<whalesalad> guys how can this be rewritten as a one liner?
<eam> fowl: the scoping issue is moot?
Lars___ has joined #ruby
<fowl> yes, lets talk about our favorite celebrity instead
<eam> seems off topic
<Synthead> why doesn't this match? '20120808154946.jpg'.match(/\A[0-9]{14}\.pdf\z/)
bier has quit [Quit: Ex-Chat]
aaroncm has joined #ruby
<Denommus> eam: Ruby is not similar to C. There are A LOT of things that you can do in Ruby that you can't do as easily in C, and vice-versa
<infinitiguy> right - but if I def mymethod(somevarname) and then when I call it do.. mymethod(differentvalue) if within mymethod should I be able to puts somevarname and get "differentvalue" as the result
<wmoxam> fowl: OMG, did you see Miley's new haircut
<wmoxam> ?
<eam> Denommus: you are missing the point by at least a mile
<slyv> Is there an easy way to remove accents from a string?
<Synthead> oh damn, I did .pdf
<wmoxam> Edgey and cute
<fowl> wmoxam: link plz
MarGarina has joined #ruby
<apeiros_> Denommus: you can construct an almost arbitrarily long list of similarities and dissimilarities between ruby and C. it's really not worth to pursue it.
<eam> Denommus: here you go
<Denommus> eam: because you didn't explain your point. The fact that they share some family does not mean much. Java is also from C family, but what does Java has to do with Ruby?
<eam> Denommus: java is from the C family? But "Java is not similar to C. There are A LOT of things that you can do in Java that you can't do as easily in C, and vice-versa"
<apeiros_> eam: rubys similarity or dissimilarity to/with C is irrelevant. ruby *is not* C. there's nothing really more to say about that part.
<eam> Denommus: do you see why this argument isn't worth pursuing?
<eam> your entire position is fallacious
tatsuya_o has quit [Ping timeout: 276 seconds]
<eam> I would rather talk about the subject *I* introduced, which is the lack of proper scoping in ruby
<fowl> wmoxam: she looks like she got in a fight with a barber and the barber won
moshef has joined #ruby
<wmoxam> fowl: it's hip and edgey. It's got the twitters abuzz
<wmoxam> I want to be like her when I grow up
<apeiros_> eam: and your position on ruby lacking proper scoping is entirely fallacious
<eam> apeiros_: how so?
<apeiros_> it has proper scoping.
bier has joined #ruby
<eam> ok, how do I declare a variable as scoped to its containing block?
snearch has quit [Quit: Verlassend]
<apeiros_> def foo; x = 1; end
<apeiros_> voilà, x is scope only and only to the method foo
<Denommus> eam: but that's exactly my point. The fact that Java is "derived" from C does not mean much
<eam> that's a function. How do I do it for 5.times do end ?
<eam> Denommus: this conversation has ended
<apeiros_> eam: same
<eam> apeiros_: that's not correct
kalleth has quit [Read error: Operation timed out]
<apeiros_> you're very much mistaken
<apeiros_> def foo; x=1; 5.times do … end; end # x is still scoped, properly
<eam> apeiros_: I explained this to fowl above
<eam> that is incorrect, x exists outside the loop scope
<apeiros_> eam: yes, I'm aware. your claim is still wrong.
<eam> you will change the variable "x" if it exists outside the loop
<apeiros_> you're making a broad claim which is wrong. you have an issue with how blocks work
<eam> I have an issue with lack of scoping
<apeiros_> that's an *entirely* different proposition from *not having proper scoping*
<Denommus> eam: I still don't understand your complaining about scoping. Could you post some example explaining what's happening?
<apeiros_> eam: yes, and you're making completely wrong claims about it.
<eam> Denommus: x = 5; 1.times do x = 6; end; puts x
<eam> the "x" is not scoped to the do/end block
<wmoxam> eam: nor should it be
kn330 has quit [Ping timeout: 252 seconds]
<eam> ruby 1.9 introduces the |;| syntax for this
<Denommus> eam: oh, now I get it. So, what's the issue?
<eam> but it's ugly
<apeiros_> eam: and again, for probably the third time - if you run into troubles with how the scoping of blocks works (and that'd be the closure part, which again is a different beast and until apple introduced it was absent from C entirely) you're already knee-deep in bad code
<Denommus> eam: try let
<eam> Denommus: the issue is in defining a proper scope. The reason languages have scope is to prevent change outside of the intended context (I can't believe I'm explaining this)
<savage-> Any popular tools that you guys recommend to diagnose memory leaks in 1.9.3?
<savage-> Most of the good tools seem to be 1.8.x only.
<apeiros_> eam: no, it's you having an issue because you fail at coding and blame the tool for it.
<eam> apeiros_: sorry, instead of resorting to ad-hom attacks could you explain your issue? What is the failure?
<apeiros_> sorry, bad if you need a hand-holding language, ruby may be the wrong tool. it allows to shoot your foot in a thousand ways.
kn330 has joined #ruby
<Denommus> eam: ruby's blocks work as closures. Closures have access to the variables on the declaring scope. But, if you want to protect your variables, try this
<eam> apeiros_: I asked you a very clear question "how can this be scoped" and the code you provided fails to create a scope
<apeiros_> eam: show me an example where your claim matters.
pu22l3r has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<apeiros_> eam: incorrect. x was scoped. to the method.
cantonic has joined #ruby
<Denommus> def let; yield; end; def foo; x = 5; let { |x| x=6; puts x }; puts x; end
<eam> apeiros_: yes, and I am talking about block scope
unrar has quit [Quit: boo]
Bosma has joined #ruby
<apeiros_> eam: which - again - is irrelevant.
<eam> apeiros_: it's not irrelevant, it's the subject
<apeiros_> you want a hammer to be a screwdriver. it isn't.
<eam> apeiros_: you seem to be having a conversation unrelated to the one Denommus and I are having, perhaps you should have it elsewhere?
<apeiros_> eam: you claimed the subject was "lack of proper scoping"
tvw has joined #ruby
<fowl> christ
<apeiros_> you didn't claim the subject to be "lack of procs that can scope"
<eam> Denommus: yes, exactly
<fowl> eam you have no tact
<eam> Denommus: you can also do it with |;x| in ruby 1.9
<apeiros_> eam: but interesting how you did not come up yet with an example where it'd matter.
<eam> Denommus: the problem is that it is *ugly*
<apeiros_> but I guess I'm feeding a troll anyway.
<aaroncm> 'lack of proper scoping' == 'I dont like the way the scoping works'
<wmoxam> eam is a good troll. Been at this for an hour or so
<Denommus> eam: |;| may be ugly, but the "fix" is easy. But I really think "let" should be adopted as a standard
<apeiros_> aaroncm: exactly.
<eam> apeiros_: if you don't understand why scoping is important I don't think I can help you
<jrajav> Wow Denommus, you're screwing up a lot today. Continuing conversations eam has ended, not providing code that does precisely what eam vaguely defines
<eam> Denommus: I agree!
MarGarina has quit [Ping timeout: 245 seconds]
<eam> Denommus: and I'm not sure why folks like apeiros_ are so against the idea
<eam> it's bizarre
<apeiros_> eam: lol, *I* don't need help
<apeiros_> eam: you're the one who's troubled with rubys scoping.
<fowl> get some damn tact
<fowl> forget about ruby
<fowl> learn how to talk to people
havenn has joined #ruby
<eam> it's almost as if there's a fear of acknowledging that ruby syntax might not be beautiful or perfect
<Denommus> eam: I don't think that |;| is exactly bizarre, but I can't disagree because this is subjective. But it is an easy fix, so I don't see why this should be a problem
<apeiros_> eam: um, no. but I say your issue is only an issue if you're badly coding already. so where's your example?
<eam> Denommus: well, this subject came up because people were complaining about Perl and obscure ]glyphs
<aaroncm> eam: or people just don't have a problem with it like you do. this is not a reason to impugn their motives.
<eam> Denommus: so, put it in that context
<Denommus> eam: that's a common programming trope
<jrajav> Perl's problem is not obscure glyphs
<Denommus> eam: just like Lisp's ))))))))))
<eam> Denommus: I agree
Axsuul has joined #ruby
cantonic has quit [Read error: Connection reset by peer]
<eam> Denommus: my only point -- a reasonable point -- is that ruby has lots of ugly corners with obscure glyphs. And there are more than a few cases where Perl can express the same thing in a more readable fashion
<eam> the example I offered was variable scope
<eam> and for some reason, this demonstrably true point caused quite a bit of upset
cantonic has joined #ruby
<apeiros_> "demonstrably" - follow suit and demonstrate.
<infinitiguy> I got variables passed through a method working - how can I get the value of a variable out of a method and into another method?
<eam> fowl: and by the way, I would say the same to others in this channel, regarding tact. Especially apeiros_
<apeiros_> with a nice example in code. lets see.
<infinitiguy> i tried return variablename but that didn't seem to do it
jjbohn|afk is now known as jjbohn
davidcelis has joined #ruby
<slyv> Hey, is there a simple way to remove accents from a string?
<Denommus> eam: uh... I just tested it. x = 5; 10.times { |x| puts x }; puts x
<eam> Denommus: remove the ||
<jrajav> infinitiguy: Paste all of the relevant code if you can
syamajala has quit [Ping timeout: 276 seconds]
<apeiros_> translation: Denommus: tell the language to not do what you want it to do and see how it does not do what you want it to do!
ph^ has quit [Remote host closed the connection]
<jrajav> >> def func(var) return var end; func(3)
<al2o3cr> (Fixnum) 3
havenn has quit [Ping timeout: 240 seconds]
<jrajav> Looks like return works fine to me
syamajala has joined #ruby
<eam> Denommus: the issue is variables not set in ||, for example a temporary variable -- like 10.times { |x| y = x * x; puts y };
syamajala has quit [Read error: Connection reset by peer]
gavit has quit [Read error: Connection timed out]
syamajala has joined #ruby
bowlowni has joined #ruby
<Denommus> eam: oh. Right. If that's an issue for you, what could I do?
<eam> Denommus: in ruby 1.8, both stomp on x
gavit has joined #ruby
<infinitiguy> will do - 1 minute
<eam> Denommus: I am merely suggesting that ruby ought to have variable declaration, for the same reason that other properly structured languages have it
<eam> and that its current implementation is buggy in 1.8, and fixed with ugly syntax in 1.9
<aaroncm> there's that p-word again
theRoUS has quit [Ping timeout: 248 seconds]
<Mon_Ouie> slyv: I'd suggest using Iconv for that
<apeiros_> 21:27 eam: Denommus: the issue is variables not set in ||, for example a temporary variable -- like 10.times { |x| y = x * x; puts y };
<Mon_Ouie> Iconv.conv("ASCI//TRANSLIT", "UTF-8", string)
<eam> the only reason I brought this up is because of the ignorant comments about glyphs in perl from above
<apeiros_> eam: so you claim x is being overridden?
<apeiros_> eam: or is your claim that y exists after the block?
krzysz00 has joined #ruby
<apeiros_> because both are demonstrably false.
<eam> apeiros_: it depends on whether you are using 1.8 or 1.9
<krzysz00> How do I read something thats been 'pp'ed to a file.
<krzysz00> *?
<infinitiguy> I get an undefined local variable when I try to puts fun (my variable) or call a method something (different method trying to access variable fun defined in a previous method).
faen has quit [Ping timeout: 245 seconds]
whalesalad has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<slyv> @jrajav: I had tried that, didn't' seem to work for me but I'll look at it again.
<Mon_Ouie> You want to get back the object?
<jrajav> slyv: Listen to Mon_Ouie
<Denommus> apeiros_: his claim is that you can't "declare" the variable inside of the |x|. I don't think that's an issue for most of rubyists, so it's not worth of discussing
<fowl> krzysz00: cat the file?
<Denommus> sorry, ||
peterhellberg has joined #ruby
Asher has quit [Quit: Leaving.]
<krzysz00> Yes, I want the array (of arrays, and hashes)) back.
<eam> Denommus: you can in 1.9
<apeiros_> Denommus: I agree. and it's what I said before. if it becomes an issue, you're already knee-deep in bad code.
<apeiros_> said that time and time before.
qwerxy has joined #ruby
<Denommus> eam: how so? I couldn't manage to
faen has joined #ruby
<apeiros_> because the only real case where it becomes an issue is when you have lvar-creep.
<apeiros_> which in turn only happens if you have huge methods
<apeiros_> Denommus: and of course, eam failed to provide a practical example where it mattered.
<fowl> krzysz00: if you're storing objects for later you should marshal them
<apeiros_> and honestly, I don't expect him to. chances that he's a troll are stellar.
<slyv> @Mon_Ouie: I get an error: "invalid encoding ("ASCI", "UTF-8")" when I try that.
<eam> I did fail to provide a full explanation of why scope matters
Asher has joined #ruby
<krzysz00> Catting the file in would work, probably.
<apeiros_> eam: it was never about scope
<eam> it's not something I'm up for explaining, especially not to this crowd
<apeiros_> eam: it was always about the scope of blocks
<Denommus> I just don't think this discussion is worth of the effort. It's an issue for him, but we don't see it as an issue
tehgeekmeister has joined #ruby
<apeiros_> different thing, but seems you lack the competence to grasp that difference.
<slyv> As well as: "iconv will be deprecated in the future, use String#encode instead."
<jrajav> "This crowd"
<jrajav> Yup troll
Lars___ has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
<apeiros_> anyway, I think majority thinks this is trolling.
<eam> apeiros_: there's no need to namecall
<fowl> eam: try #ruby-lang
CptJeanLucPicard has quit [Quit: Leaving]
<apeiros_> eam: oh dear, clean up in front of your own house before whining.
<fowl> eam: zenspider will talk to you for hours on this
<jrajav> eam: You're treating literally everyone except you in the room antagonistically
<aaroncm> eam: you'll probably be better off going away then, and go write a blog post about how the ruby community won't listen to criticism of the one true holy language.
<jrajav> Pretty sure that's the definition of trolling
<eam> jrajav: that is not true
Criztian has quit []
<eam> I've been respectful and patient
<jrajav> [14:32] <eam> it's not something I'm up for explaining, especially not to this crowd
<eam> jrajav: I'm not up for it
<krzysz00> I didn't know about Marshal, thanks.
<infinitiguy> it sounds like what I might be looking for to be able to share variables between methods is a module
<infinitiguy> does that sound right?
dhruvasagar has quit [Ping timeout: 252 seconds]
<fowl> krzysz00: pp (prettyprint) is really only for outputting, marshal is the way to go :)
jrist-gym is now known as jrist
OmarLittle has joined #ruby
OmarLittle has quit [Changing host]
OmarLittle has joined #ruby
<shevy> infinitiguy, if you are in a class, use @foo variables
<Denommus> jrajav: I don't think that's trolling. Trolling is when you are polemic only for the sake of seeing people getting irritated. He just has a point that is irrelevant for most of us
<eam> apeiros_: if you want to ban me for pointing out that you insulted me, go ahead
syamajala has quit [Read error: Connection reset by peer]
qwerxy has quit [Client Quit]
<apeiros_> eam: mimimi
<shevy> class Foo; def test; @foo = 5; end; def bla; @foo += 3; end; end; x = Foo.new; x.test; x.bla
<davidcelis> indeed, go ahead
<infinitiguy> what if I haven't defined a class? I've only been defining methods and then the plan was to require the rb file that contains the methods
syamajala has joined #ruby
<aaroncm> infinitiguy: I think you might be engaged in an x-y problem here. you might be better off describing what you really want to do.
<jrajav> Are we going to start debating the definition of trolling now? :P
<shevy> infinitiguy then you can use @foo too
<jrajav> That would pull this conversation into pretty meta territory
<wmoxam> please remove the troll
<shevy> you could also use $global variables
<davidcelis> ^
<infinitiguy> I wanted to use @foo but I can't seem to define mymethod (@foo = "somevar")
<infinitiguy> it gave me an error
<shevy> what is the syntax you tried
<shevy> the exact syntax ;)
<jrajav> He pasted it
<Denommus> jrajav: my point about trolling or not trolling is that he was not malicious, only insistent
<shevy> jrajav omg
mmokrysz has joined #ruby
<infinitiguy> I essentially want to be able to define a variable in a method - have it be able to be changed to something else when the method is called (enable/disable) and then have that variable be accessible by other methods
<shevy> infinitiguy, if you tried that, that would not be valid ruby code!
<fowl> infinitiguy: we could do def somemethod(@x) to automatically set @x to whatever was passed in, in 1.8, but not in 1.9
<jrajav> Denommus: Eh, I don't really care anymore
mmokrysz has quit [Client Quit]
<shevy> infinitiguy, use def foo(i = @foo); @foo = i + 5; end
<davidcelis> infinitiguy: you defined `fun` as a local variable, accessible only inside of `mymethod`
fumduq has joined #ruby
<shevy> yeah, infinitiguy do you know what a local variable is
<eam> Denommus: indeed. I do not want to have this conversation if it isn't productive
<infinitiguy> when I tried to define fun as an instance variable it complained
<shevy> no
mmokrysz has joined #ruby
<shevy> you must have used incorrect syntax infinitiguy
<shevy> use pastie.org to paste
mmokrysz has left #ruby [#ruby]
<fowl> infinitiguy: you can't do def somemethod(@foo) in 1.9
<infinitiguy> i was in 1.8
<shevy> the syntax, paste it ;P
<infinitiguy> but I'd like to be able to come up with something that works in both
qwerxy has joined #ruby
<infinitiguy> ill re-paste
<infinitiguy> 1 sec
<shevy> \o/
<infinitiguy> if I have fun as a local var - it all works except it doesn't come out of the method (as expected)
cascalheira has joined #ruby
<infinitiguy> with it as an instance I get "formal argument cannot be an instance variable"
<xclite> because a formal argument cannot be an instance variable
<shevy> ok first infinitiguy
<xclite> a formal argument (aka the parameter name) is not the same thing as an instance variable
<shevy> infinitiguy, try to have logical indent
<shevy> it makes code more readable
<shevy> after a:
<xclite> @fun is an instance variable, which belongs to the class
<shevy> def foo
<shevy> |continue here
<shevy> # <-- 2 spaces
<apeiros_> "I do not want to have this conversation if it isn't productive" - translation: "I do not want to have this conversation if not everybody agrees with me" but true, it was unproductive. we had only a claim. not even backed up with a single practical example.
<shevy> infinitiguy, change def mymethod (@fun="noval") to def mymethod (i="noval")
<shevy> and this here
<shevy> if 1 == 1
<shevy> this does not make a lot of sense
<shevy> that's like
<shevy> if true
<fowl> infinitiguy: yo dont do that def method(@foo) because you'll have to change it when you upgrade to 1.9
burgestrand has joined #ruby
<davidcelis> why "noval", why not just nil
<fowl> might as well do def method(foo) @foo = foo
<infinitiguy> i know - i was just trying to put in a valid if statement because ive noticed that local variables within an if (i think it was an if) are contained within that block
<lectrick> Is the ruby-core mailing list the place to suggest Ruby changes?
<jrajav> if (the concept of truth exists);
<jrajav> Try compiling that
<shevy> lectrick, yeah. or the bug tracker of ruby, sometimes if approriat
<shevy> appropriate
<infinitiguy> so if I do def method (foo) @foo = foo then I should be able to use @foo elsewhere in other methods?
<infinitiguy> that might be all I need
<shevy> infinitiguy, yes
<apeiros_> lectrick: I'd discuss it in ruby-talk first
<lectrick> shevy: my idea was to have a def...end return the symbolized form of the new method name so that you could do things like protected def... end or private def... end
MarGarina has joined #ruby
<shevy> aha
<apeiros_> lectrick: that's not really a new proposal
<lectrick> apeiros_: ok
<apeiros_> I'd be all in favor of it, though.
<shevy> well, go suggest it to them :D
<apeiros_> anything is better than nil.
<lectrick> apeiros_: yeah I wasn't sure... just occurred to me since it would be kind of nice syntactically
<shevy> apeiros_, is nil better than nil?
<apeiros_> shevy: of course!
<apeiros_> isn't that obvious? :)
burgestrand has quit [Client Quit]
<shevy> lectrick, usually you need to convince matz first
<lectrick> apeiros_: yeah I agree, although to be honest, returning the symbolized form would have the small cost of creating that symbol
cascalheira has quit [Quit: Leaving...]
<shevy> matz usually is sceptical by default so it might require good arguments to persuade him h ehehe
theRoUS has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
<apeiros_> lectrick: I actually wonder why it wasn't implemented. I mean it came up at least 6y ago already. if not even earlier.
<lectrick> well, matz is on the payroll of my company, so perhaps I can influence him that way
burgestrand has joined #ruby
<shevy> nah
<apeiros_> lectrick: no, it wouldn't have that cost
<apeiros_> lectrick: defining a method already creates that symbol
<lectrick> apeiros_: well, awesome then (re: cost)
<infinitiguy> @shevy - thanks for the help
<shevy> you need to make good arguments, for instance, if it is a feature that is useful and worth having
<apeiros_> lectrick: try: x = Symbol.all_symbols.dup; def sdfasdfasdf; end; Symbol.all_symbols-x
<shevy> every new feature comes at a potential cost
<jrajav> matz = matsumoto?
<shevy> yeah
<apeiros_> jrajav: yes
<jrajav> :O
<lectrick> apeiros_: I tried that, it returned an empty array?
Filuren has joined #ruby
<apeiros_> lectrick: o0
locriani has joined #ruby
<lectrick> apeiros_: maybe that changed in 1.9?
<jrajav> >> x = Symbol.all_symbols.dup; def sdfasdfasdf; end; Symbol.all_symbols-x
<al2o3cr> (Array) []
Stalkr_ has quit [Read error: Connection reset by peer]
Filuren is now known as Stalkr_
Spooner has joined #ruby
pu22l3r has quit [Remote host closed the connection]
<apeiros_> lectrick: ah, no
<apeiros_> it's because it's all on one line
<apeiros_> so the symbol is already created at the first statement.
<apeiros_> jrajav: does al2o3cr keep a session for users?
beneggett has quit [Quit: Computer has gone to sleep.]
<Majost> What is the ruby equivalent of Python's __init__() for a class definition?
<apeiros_> >> eval("Symbol.all_symbols.dup\ndef sdfasdfasdf; end\nSymbol.all_symbols-x")
<al2o3cr> -e:1:in `eval': undefined local variable or method `x' for main:Object (NameError), from (eval):1:in `eval', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<barefoot> initialize
Eldariof59-ru has quit []
<apeiros_> >> eval("x=Symbol.all_symbols.dup\ndef sdfasdfasdf; end\nSymbol.all_symbols-x")
<al2o3cr> (Array) []
TPFC-SYSTEM has joined #ruby
<jrajav> apeiros_: No
spobat has joined #ruby
TPFC-SYSTEM has quit [Client Quit]
spobat has left #ruby ["Leaving"]
<jrajav> I could add that pretty easily
elhu has quit [Quit: Computer has gone to sleep.]
<apeiros_> odd…
<lectrick> apeiros_: still a mystery then eh
<Majost> barefoot: so it would be -- def initalize() ?
<apeiros_> lectrick: na, only different to cleanly reproduce.
<apeiros_> it still applies, but the parser obviously works different than in 1.8
<barefoot> Majost: yes
<apeiros_> if you put it on multiple lines in irb, you'll still see it
<barefoot> or without the () if it takes no params
dekronin1 has quit [Ping timeout: 252 seconds]
<Majost> barefoot: Thanks! =)
<barefoot> np
fcadi has quit [Quit: Saindo]
<lectrick> apeiros_: I got it to work, but only via multiple lines. which I agree should not be the case.
jonahR has joined #ruby
<apeiros_> lectrick: well, the parser creates the symbol the moment it's recognized. so it makes certain sense.
<apeiros_> you can have it on a single line too, if you put the def into an eval, so the parser doesn't "see" it
<apeiros_> lectrick: anyway, you get a symbol for everything identifiable in ruby. @foo -> :@foo starts to exist. $foo -> :$foo starts to exist
<apeiros_> etc.
elaptics`away is now known as elaptics
MarGarina has quit [Ping timeout: 260 seconds]
<lectrick> apeiros_: odd, when you do it all on one line, both sets include the symbol for the new method, which is why an empty array is returned
mathie has quit [Quit: Bye!]
Markvilla has quit [Ping timeout: 260 seconds]
oddmunds has quit [Ping timeout: 250 seconds]
<apeiros_> lectrick: yes, of course. as said, because the parser has seen the identifier.
<apeiros_> the symbol is added after parsing but before the code is evaluated
vmatiyko has joined #ruby
<apeiros_> I'd assume that in 1.8, the parser only advanced by a statement at a time
<apeiros_> or maybe I just remember the example code wrong :)
pu22l3r has joined #ruby
nanderoo has quit [Quit: Leaving.]
jwmann has quit [Ping timeout: 245 seconds]
oddmunds has joined #ruby
sazboom has joined #ruby
<lectrick> apeiros_: i see.
gmci has quit [Quit: Computer has gone to sleep.]
kn330 has quit [Read error: Connection reset by peer]
vmatiyko has left #ruby [#ruby]
kn330_ has joined #ruby
jwmann has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
kirun has quit [Ping timeout: 272 seconds]
klip has quit [Remote host closed the connection]
cbuxton has quit [Read error: Connection timed out]
tvw has quit [Remote host closed the connection]
cbuxton has joined #ruby
havenn has joined #ruby
pen has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
fermion has joined #ruby
jrajav has quit [Quit: The best darkness is strange and surprising]
i0n has quit [Quit: Lost terminal]
revans has joined #ruby
beneggett has joined #ruby
mikepack has joined #ruby
moshef has quit [Quit: moshef]
erichmenge has joined #ruby
manizzle has quit [Remote host closed the connection]
revans has quit [Client Quit]
revans has joined #ruby
revans has quit [Client Quit]
manizzle has joined #ruby
jonathanwallace has joined #ruby
chrisbolton has joined #ruby
revans has joined #ruby
Jay_Levitt has quit [Ping timeout: 276 seconds]
timonv has joined #ruby
<nobitanobi> Anybody knows what is this method: 'get' in https://github.com/Yelp/yelp-api/blob/master/v2/ruby/example.rb ?
<nobitanobi> I thought this was part of the httparty gem.
fayimora has joined #ruby
<matti> nobitanobi: Look at oauth.
<davidcelis> nobitanobi: It's an instance method on OAuth::AccessToken. Look at that.
<nobitanobi> matti: yeah, my bad.
<nobitanobi> davidcelis: yup. Sorry. I was trying to pass a :query hash and it was hanging. No wonder now. Thanks.
chessguy has joined #ruby
kirun has joined #ruby
resure has quit [Ping timeout: 276 seconds]
lkba has joined #ruby
timonv has quit [Read error: No route to host]
clocKwize has quit [Quit: clocKwize]
timonv has joined #ruby
cbuxton has quit [Quit: Leaving.]
pnbeast has joined #ruby
Guest47435 has quit [Quit: Guest47435]
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
rakunHo has joined #ruby
resure has joined #ruby
yoklov has joined #ruby
moshef has joined #ruby
ph^ has joined #ruby
kirun has quit [Ping timeout: 248 seconds]
mockra_ has joined #ruby
skipper has joined #ruby
theRoUS has quit [Quit: Leaving]
cbuxton has joined #ruby
havenn_ has joined #ruby
havenn has quit [Read error: Connection reset by peer]
mockra has quit [Ping timeout: 260 seconds]
kenichi has quit [Remote host closed the connection]
elhu has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
adamkittelson has quit [Remote host closed the connection]
skipper has quit [Ping timeout: 268 seconds]
cousine has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
td123 has quit [Read error: Connection reset by peer]
kenichi has joined #ruby
OmarLittle has quit [Quit: Leaving]
td123 has joined #ruby
t68948 has joined #ruby
Markvilla has joined #ruby
MarioEIU has quit [Quit: Leaving]
specialGuest1 has joined #ruby
mmokrysz has joined #ruby
havenn_ is now known as havenn
mockra_ has quit [Remote host closed the connection]
specialGuest1 has quit [Client Quit]
specialGuest has quit [Ping timeout: 244 seconds]
graspee has quit [Read error: Connection reset by peer]
adamkittelson has joined #ruby
Stalkr_ is now known as Staplr_
peterhellberg has quit [Read error: Connection reset by peer]
theRoUS has joined #ruby
peterhellberg has joined #ruby
Staplr_ is now known as Stalkr_
axl__ has joined #ruby
mmokrysz has left #ruby [#ruby]
answer_42 has quit [Ping timeout: 276 seconds]
axl__ has quit [Read error: Connection reset by peer]
axl_ has quit [Ping timeout: 265 seconds]
Araxia has joined #ruby
bradhe has quit []
axl_ has joined #ruby
y2k has left #ruby [#ruby]
bradhe has joined #ruby
eightfold has quit [Quit: eightfold]
Rajesh_ has joined #ruby
graspee has joined #ruby
y2k has joined #ruby
pdtpatrick has joined #ruby
Rajesh_ has quit [Max SendQ exceeded]
ReachingFarr has joined #ruby
jonahR has quit [Quit: jonahR]
<lectrick> Can I do any interpolation in a %w[ this is a word but can i do#{this} ]
<asteve> what is the purpose of %w[] ?
Markvilla has quit [Quit: Computer has gone to sleep.]
tcopp has left #ruby [#ruby]
axl_ has quit [Read error: Connection reset by peer]
gmci has joined #ruby
Markvilla has joined #ruby
savage-_ has joined #ruby
axl_ has joined #ruby
Solnse has joined #ruby
<fowl> lectrick: yes use %W[]
ReachingFarr has left #ruby [#ruby]
<canton7> %w is the same as ' %W is the same as "
Rajesh_ has joined #ruby
Markvilla has quit [Client Quit]
<lectrick> fowl: awesome.
<apeiros_> asteve: %w[] is an array literal
<apeiros_> creates an array of strings
savage- has quit [Ping timeout: 252 seconds]
<apeiros_> e.g. %w[foo bar baz] is equivalent to ['foo', 'bar', 'baz']
TorpedoSkyline has joined #ruby
<lectrick> we have some simple object/string/hash/array monkeypatches in /lib/ like string_utils.rb so now I can just do %w[ object string hash array ].each{ |o| require_relative(File.join(%W[ .. .. lib #{o}_utils ]) } from my initializer
nathandim has joined #ruby
iMe has joined #ruby
<shevy> guys
<shevy> odd question upcoming
<shevy> in terms of ansi-colours, when you write shell scripts or ruby scripts, that output colours
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<shevy> do you follow any convention for what colours to use, depending on whether this is a file, a symlink or a directory? or perhaps just important text, as opposed to normal text
aaroncm has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> (output results on the commandline terminal)
<shevy> I have bright yellow right now for files...
Guedes has joined #ruby
bluenemo_ has joined #ruby
<lectrick> shevy: I don't know if there is a real convention for that yet, but maybe make it configurable and let the end user choose
jlogsdon has quit [Remote host closed the connection]
<shevy> yes, I already have that covered
<barefoot> +1
<shevy> I just wonder about the default
<shevy> if people follow any convention
<shevy> if not I just roll dice :\
<burgestrand> Start a new terminal and fit the color scheme.
<burgestrand> I mean, the default is pretty much black on white or the other way around.
<burgestrand> Kinda boring. I have mine latte-coloured.
Rajesh_ has quit [Max SendQ exceeded]
<pnbeast> shevy: You might want to investigate usability guidelines, with respect to things like color blindness and eyestrain, if nothing else presents itself.
<apeiros_> lectrick: *shudder* @ require_relative - made worse by including lib in it…
<apeiros_> lectrick: seriously, should just be require "#{o}_utils"
<shevy> pnbeast heheh
jonahR has joined #ruby
virunga has joined #ruby
<shevy> burgestrand, hmm do you happen to have some screenshot of your terminal available? with coloured output perhaps?
moshef has quit [Quit: moshef]
<barefoot> could always just go with $LS_COLORS as a start
<shevy> hmm yeah that's an idea
<lectrick> apeiros_: I know. I think we've had this discussion before, about load paths. The complexity has to live somewhere. I agree that it should be in a central location but if it is I have to include that file everywhere, such as in all tests that I want to be able to run from the commandline directly. And I don't want to do that. So, I require_relative for now. I know that this concretes the relative
<lectrick> file structure as a side effect. I'm OK with that for now.
havenn has quit [Remote host closed the connection]
<lectrick> By "complexity" I mean "the load_path complexity for this repository"
<burgestrand> shevy: http://cl.ly/image/2z362O1E2p3I
<apeiros_> lectrick: the central place is your app
<shevy> ah ok
<apeiros_> lectrick: you have two apps - whatever is in your bin, and your test runner
<shevy> I use a dark background
<lupine_85> I don't know what require_relative is, and by the sounds of it, I don't want to know
<shevy> the red M is a normal character right? not some UTF special character
<apeiros_> not that complex to add to load path in the latter (since you don't need it in the former - there it's handled by installing your lib)
<burgestrand> I used to, but it buggered up my eyes in the dark.
<burgestrand> shevy: yep, normal character.
specialGuest has joined #ruby
<shevy> lupine_85 require_relative was added in ruby since ~1.9.x
Rajesh_ has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
<lupine_85> ah. I'm still not using it for much
<lectrick> apeiros_: I like to do ruby test/path/to/test.rb... even if that could be test_runner test/path/to/test.rb, because it allows me to run files directly in editors such as Sublime, which pass the current file path directly to ruby in the editor
specialGuest has quit [Changing host]
specialGuest has joined #ruby
<shevy> hmm ok I see burgestrand ... if I'd pick bright yellow for files, it would not work for you by default with that background... for my system, with black background, yellow would be ok-ish... hmm
<burgestrand> require_relative in gems annoys me to pieces. You don’t get to decide if I can monkeypatch or not, tyvm.
<apeiros_> lectrick: I do ruby test/runner.rb test/path/to/test.rb
<lupine_85> alias ruby_with_lib ruby -Ilib ...
<apeiros_> lectrick: there, easily solved
<lectrick> lupine_85: require_relative is in 1.9.3 and requires a file relative to the location of the current file.
<burgestrand> Or, in this case, monkeypath.
<lupine_85> *shudder*
<apeiros_> lectrick: alternatively: alias ruby_test='ruby -Ilib'
<shevy> hehe monkeypath
<lectrick> apeiros_: I did not know you could specify multiple ruby files to ruby. I thought I tried this in the past and it did not work.
<apeiros_> lectrick: you can't :)
<burgestrand> apeiros_: would changing RUBYOPT work as well?
<lectrick> apeiros_: Are you sure you weren't using ruby -r test/runner path/to/test.rb
<burgestrand> export RUBYOPT='-Ilib'
<burgestrand> or whatever it is.
<apeiros_> burgestrand: yeah, for that it'd even still be sane
<lectrick> apeiros_: oh fuck. the runner takes an arg.
<lupine_85> require_relative sounds like hell to pay
hoelzro|away is now known as hoelzro
<apeiros_> lectrick: yupp ;-)
<apeiros_> lectrick: it also performs all other setup
<burgestrand> require File.expand_path() is often also annoying. >.:
<lectrick> apeiros_: yeah i get it now
<apeiros_> lectrick: meaning I have no duplicate code in my test files
linoj_ has joined #ruby
<apeiros_> lectrick: I mean all those dozen of require_relative shit you see in most test files
<burgestrand> Can bring some really weird load issues where files get required twice. Anyhoo…
delinquentme has joined #ruby
<shevy> hmm ... if I have a class, and a class method... and in that class method, I create a new class
<delinquentme> The value of a Ruby symbol's string part is the name of the symbol, minus the leading colon. << is this a true statement?
<apeiros_> burgestrand: not in 1.9
<shevy> let's say, the class is called Foo
<lectrick> apeiros_: Well there's still the problem of how to convince my editor to run files with that file.
<shevy> def self.create
<shevy> Foo.new.do_something
<shevy> or...
<shevy> self.class.new.do_something
<shevy> ?
<shevy> hmmm
<burgestrand> apeiros_: expanded path always added to loaded features?
<apeiros_> burgestrand: requiring the same file by different paths is a 1.8 problem. 1.9 no longer suffers from it.
<shevy> nevermind, I think I stick to explicit name like Foo, it reads nicer there
centipedefarmer has joined #ruby
<delinquentme> Because it seems like it *cannot* be correct because of this statement <% provide(:title, 'Home') %>
<lectrick> burgestrand: Ruby is supposed to only require files once because it stores the absolute path to the file in a 'loaded' collection
<burgestrand> lectrick: $LOADED_FEATURES :)
<lectrick> burgestrand: exactly
linoj_ has quit [Client Quit]
davidcelis has quit [Ping timeout: 244 seconds]
hoelzro is now known as hoelzro|away
<lectrick> burgestrand: are you saying that breaks sometimes? Because that would be bad.
rburton- has joined #ruby
<apeiros_> lectrick: it was different in 1.8
<rburton-> Has anyone got Growl 1.4 + Bullet working? It seems like Bullet isn't connecting to Growl.
<apeiros_> anyway, the problem was worse when you used File.expand trickery
linoj has quit [Ping timeout: 246 seconds]
<rburton-> As if its not registering with Growl
geekbri has quit [Remote host closed the connection]
<apeiros_> instead of sticking with a proper require
SegFaultAX has quit [Quit: Lost terminal]
bluenemo_ has quit [Quit: Verlassend]
waxjar has quit [Quit: Ah! Well, prepare to put mustard on those words, for you will soon be consuming them along with this slice of humble pie that comes direct from the oven of shame, set at gas mark "egg on your face"! I sort of forget what I was talking about.]
brdude has quit [Quit: brdude]
davidcelis has joined #ruby
<peterhellberg> One of my friends was tasked to rescue a project where a few "Java developers doing Ruby" had re-implemented require using File.open and eval
<peterhellberg> That sucked.
<lupine_85> :)
davidcelis is now known as Guest3113
<matti> peterhellberg: LOL
<rburton-> Shame there are many shitty engineers out there.
<yxhuvud> :D
<fowl> haha
<wmoxam> peterhellberg: what on earth compelled them to do that?
<wmoxam> they just didn't realize that 'require' existed?
<lupine_85> it's not *too* insane, though
<lectrick> apeiros_: What about requiring things with File.join ?
opus has joined #ruby
<peterhellberg> wmoxam: I have _NO_ idea…
Solnse has quit [Ping timeout: 252 seconds]
<lupine_85> def my_require(filename) ; TOPLEVEL_BINDING.eval File.load filename ; end
any-key_ is now known as any-key
<rburton-> Bullet.growl = false #This makes me sad.
<rburton-> :D
timonv has quit [Remote host closed the connection]
<rburton-> well can't finger fuck this too long. Another day! :)
erichmenge has quit [Quit: Be back later]
sailias has quit [Ping timeout: 276 seconds]
<lectrick> peterhellberg: I'm guessing they ran into a require issue and decided to reimplement it themselves since they would rather do that than figure out the actual problem
nobitanobi has quit [Quit: Leaving.]
<apeiros_> lectrick: same thing. 1.8 would register a different path. '../../lib/foo/bar' was not the same as 'foo/bar'
<rburton-> peterhellberg: sorry to hear you have some shitty engineers on the team
<apeiros_> and in 1.9 - still knowledge in the wrong place IMO
whowantstolivefo has joined #ruby
savage-_ has quit [Ping timeout: 252 seconds]
<apeiros_> but as you said, we already had that discussion ;-)
hynkle has quit [Quit: Computer has gone to sleep.]
AndrzejKrzywda has joined #ruby
fantazo has joined #ruby
<rburton-> There are too many engineers that look to create their own solutions vs. actually understanding how a system/framework actually works.
<lectrick> lupine_85: apeiros_ I thought I checked the source and found that it indexed by computing the absolute file path first
Seventoes has joined #ruby
Guest3113 has quit [Ping timeout: 244 seconds]
<apeiros_> lectrick: as said, that was 1.8 behaviour
<peterhellberg> rburton-: Not my team, or company, fortunately
<apeiros_> 1.9 indeed doesn't have that issue
savage- has joined #ruby
<lectrick> apeiros_: ah ok
spree_josh has joined #ruby
<rburton-> I personally would walk over there and ask them nicely "What research have you done? Is this really the solution solution?" Then proceed to slam their keyboard across the desk telling them "Neve lie to my face."
davidcel_ has joined #ruby
<rburton-> :D
<whowantstolivefo> hiya people, what is the best OS platform to work with ruby,rails and web technologies ? for advice i asking people who use ruby
<apeiros_> lectrick: https://github.com/apeiros/literal_parser/blob/master/test/runner.rb as an example test/runner.rb
<rburton-> #TheSteveJobsWay
<shevy> whowantstolivefo, linux
<lupine_85> far too many people use mac
<fowl> whowantstolivefo: *nix is the best for developing on unless you're using a platform specific language like c# or objc
<lupine_85> I have no idea why
<rburton-> Mac++
<burgestrand> ^
<fowl> anybody who tells me you can compile objc in linux is getting shot in the face
<rburton-> Linux is good time but I love my mac
<rburton-> I get laid because of it.
<rburton-> :)
<lectrick> i'm an apple whore who thinks all other OS'es are deeply flawed as general-purpose OS'es (windows: good just for games; linux: good just for servers)
<lupine_85> you go to a ruby conference, and the vast majority of laptops are macs
<shevy> don't lie rburton-
<lupine_85> it's insane
<lectrick> whowantstolivefo: ^
<shevy> real devs have no time for getting laid. they hack code.
<rburton-> shevy: :( Okay I use my mac to beat off to porn.
<rburton-> It's very close!
<rburton-> I use Divvy, one side of my screen for porn and one side for code.
tatsuya_o has joined #ruby
<shevy> with windows, young people use it because of gaming
* apeiros_ still wants a good OS - uses OSX until then
<shevy> :(
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<lupine_85> I honestly don't get the attraction of macs. I find the UI stifling
<shevy> we linux users are totally outnumbered here
<fowl> fie on osx
<apeiros_> lupine_85: nothing wrong with that
<shevy> DOWN WITH THE OSX HORDE!!!
<apeiros_> tastes differ, that's ok
<shevy> why does noone use windows here
<rburton-> I should sell a monitor protector called the "Porno Guardian"
<lupine_85> I wouldn't mind a retina display, though
<lectrick> i won't knock linux or unix peeps tho. Windows people who only develop in microsoft-originated technologies... I want to put them all in a sack and drown them in a river like so many unwanted kittens
* apeiros_ doesn't mind his retina display either
<apeiros_> but the tech isn't there :(
<whowantstolivefo> i got my answers, thank you ppl
<apeiros_> on the discrete graphics, it gets insanely hot
<lupine_85> I can't have a retina display until not-apple starts making them
<apeiros_> many apps have troubles
<whowantstolivefo> this is why i love open source
<shevy> lectrick, my plan was to write ruby-gtk apps, then go back to windows and use ONLY ruby stuff on it
gfontenot has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
miho has quit [Remote host closed the connection]
<forrest> yeah i never understood the big attraction of os x; linux is great for developing
<fowl> lectrick: but not people who develop mac-only programs? they are a-okay in your book?
<apeiros_> lupine_85: I thought your issue was with apples software, not hardware?
<rburton-> When I got my first Mac, I hated it.
<lectrick> shevy: And how did that work out? :)
<apeiros_> it's not difficult to run linux on a mac…
dr_bob has quit [Quit: Tune in next week when you'll hear Dr. Bob say...]
<rburton-> When I got my first compliment for having one. I loved it!
r0bby is now known as robbyoconnor
<lupine_85> apeiros_, nah, everyone would then think I was using a mac
<apeiros_> rburton-: lol
Solnse has joined #ruby
<lupine_85> and the hardware is far too overpriced anyway
<apeiros_> bad argument for having one :-p
<lectrick> fowl: Yes. They are A-OK. I know. It's a bias. At least I admit it.
<shevy> lectrick, well... my ruby commandline scripts are quite ok now. but ruby + GUI stuff... I dont know :( I like ruby-gtk ... but there are WAY too many things to consider and keeping in mind...
<fowl> rburton-: you .. what..?
<shevy> I think HTML+CSS are kinda much easier and also much better
krzysz00 has left #ruby [#ruby]
<lupine_85> I have made ruby GUIs before
<apeiros_> lupine_85: so who's the one obsessed with superficialities? you or the mac users? :-p
<rburton-> fowl: I live for attention :)
<fowl> i hate this channel and 70% of the people in it
<lupine_85> QtRuby was the main one
<fowl> you can all take your apples and shove them up your cupboard
<rburton-> fowl: I hate it for 71% of the people.
<lupine_85> I didn't say mac users were obsessed with superficialities, I said I found the UI stifling
<shevy> I would really like to use just ruby, and just one thing alone for GUI elements, that should work everywhere as I'd expect them to
fayimora has quit [Ping timeout: 244 seconds]
<rburton-> fowl: Aww jump on iChat and let's talk about it ;)
<lectrick> If you like to attention-whore, Apples were way better about 4-5 years ago. Now it's pretty much de rigeur.
<shevy> Jobs is gone. Apple lost its mojo.
* pnbeast has been looking for a channel with activity, this afternoon. "Be careful what you wish for..."
<apeiros_> pnbeast: :-p
<lupine_85> the fun part of QtRuby is making sure you keep all your Qt objects in scope
<shevy> pfft qtruby
<lupine_85> if you don't, then bits of the GUI disppear when the garbage collector runs
<shevy> does it still have only one dev?
<matti> shevy: ;d
<lectrick> shevy: It will take a few years for Jobs' absence to negatively affect the company. Pretty sure he left years of plans in the books.
<rburton-> Steve Jobs is not dead and neither is Tupac!
<lupine_85> I discovered that one the fun way
<shevy> lectrick, I think it won't be a few years, it will be earlier, but we will see :) Microsoft had no problem for a long time, then came google and HTML5 and today it is not as relevant anymore as it was like ~8 years ago
jonahR has quit [Quit: jonahR]
davidcel_ has quit [Remote host closed the connection]
Morkel has joined #ruby
<lectrick> lupine_85: That is the funniest thing that only programmer geeks would understand that i've read today (about GUI elements going out of scope and just disappearing)
<lupine_85> anyway, apple are obviously doing *something* right for developers, given the preponderance of macs at conferences
davidcel_ has joined #ruby
<lupine_85> I just have no clue what that is
robbyoconnor has quit [Read error: Connection reset by peer]
davidcel_ is now known as davidcelis
davidcelis has quit [Changing host]
davidcelis has joined #ruby
spree_josh has quit []
spree_josh has joined #ruby
<lupine_85> lectrick, I ended up just having a QT_OBJECTS global array and pushing everything into it at create, and removing at destroy
<RubyPanther> I can tell you. It is *nix, but easier.
<lupine_85> it was nasty
krz has joined #ruby
<lupine_85> RubyPanther, I sit down at a mac machine, and I feel my productivity drop
<lupine_85> precipitously
manizzle has quit [Quit: Leaving]
<lupine_85> it's not like I haven't tried for extended periods of time to get this working
<shevy> RubyPanther! you are back again!
carloslopes has quit [Quit: Leaving.]
<lectrick> lupine_85: Awesome commandline and unix toolchain support, extremely reliable operation, free developer tools, great editors, great browsers, slick hardware, smooth OS, great screen readability, actual sleep/hibernate that won't crash programs ::cough:: windows, haha ::cough::.... What else?
<RubyPanther> lupine_85: I find Gtk to give the best portability
<matti> lupine_85: I am the same.
nedbat has joined #ruby
<matti> lupine_85: I can't stand OS X.
macer1 has quit [Ping timeout: 268 seconds]
<lectrick> lupine_85: Zero need for antivirus, antispyware, antianything?
<lupine_85> lectrick, i;d like to be able to sit down at a mac and churn out code at the same rate as when I'm sat at a linux computer
<lupine_85> but I can't
robbyoconnor has joined #ruby
<asteve> that's strange
<fowl> OSX is Satans Bunghole and thou art his Product.
<RubyPanther> I don't even have to _think_ about ether OSes, and even a tray app works out of the box anywhere
manizzle has joined #ruby
n_blownapart has joined #ruby
<lupine_85> mm, Qt has some problems
<lectrick> lupine_85: That's just experience. Did you know you can hack the entire Cocoa text input system on OS X? Want vim or emacs bindings that work EVERYWHERE? You can hack that.
<lupine_85> it's just the only one i've tried hard through windows
<lupine_85> erm, ruby
<lupine_85> derp derp
yxhuvud has quit [Ping timeout: 256 seconds]
cascalheira has joined #ruby
<lupine_85> lectrick, I don't use anything like that on linux
<lupine_85> (and I really wouldn't want it)
spree_josh has quit [Client Quit]
<fowl> the #1 thing to hate about macs? they change people. your smugness levels will reach dangerous highs within hours of purchasing a mac
<lupine_85> I use terminals and simple text editors, and a browser
<lectrick> What the hell is a "tray app"?
spree_josh has joined #ruby
<lupine_85> lectrick, look near your computer clock for some program icons
tommyvyo has joined #ruby
<lupine_85> those are tray apps
<lupine_85> (that's another point. I hate the term 'app')
<lectrick> lupine_85: You mean those apps that completely clutter the lower right corner of the screen in windows without asking you, annoy the shit out of you when you least want them to, and occupy memory and CPU bandwidth?
<RubyPanther> or like I use a Ruby gmail notifier. I can right click and get a little context menu
<lupine_85> ja
davidcelis has quit [Ping timeout: 248 seconds]
<RubyPanther> if it asks or not is an installer/config issue
<fowl> "a tray app works out of the box anywhere" oh wow you mean there are benefits to having a monolithic UI?? gee willakers
<lectrick> lupine_85: You mean in the upper right on a mac? Those aren't apps. Those are menus. And they won't nag the shit out of you. Ever.
<lupine_85> wherever your clock is
<lupine_85> I have no tray icons, myself
<n_blownapart> then I thought, "why should someone new to programming easily grasp the method_missing method?" read: why is method_missing "overridden?"
<RubyPanther> I think it is funny that somebody would be against the whole feature, and not even have any productivity apps that interface there.
<RubyPanther> For example, a load monitor, volume control, etc
<lupine_85> I have volume buttons on my keyboard :)
jonahR has joined #ruby
<RubyPanther> sure but your user might not
<lupine_85> and I can type 'top' into the terminal any time i'm curious. polling is the devil's work
<lectrick> Anyone here use Skype on a Mac and Skype on Windows? How about AIM (or any chat) on Mac vs. AIM on Windows? Opening PDF's on Mac vs. opening them on Windows? For all of these examples, the Windows side is 1000% more annoying to work with
<forrest> the daemon's work?
<lupine_85> lectrick, I would never suggest using windows over using a mac
<lupine_85> that would be brain-drooling idiocy
<n_blownapart> ie why does my textbook #method_missing is "overridden," instead that it "overrides?"
havenn has joined #ruby
chessguy has quit [Remote host closed the connection]
<n_blownapart> my textbook *say
davidcelis has joined #ruby
<lectrick> lupine_85: I can text message my girlfriend via a mac app. For free. Send and receive. I think that's pretty rad. It's called... "Messages". It's very simple- I click her name, and I type. Nothing annoys me. Everything is responsive. Everything looks simple and great. Typical Apple. Love it.
<RubyPanther> If you only choose portable tools, neither side will be very annoying it is only a matter of installation/setup
davidcelis is now known as Guest57479
<lupine_85> I.... see
<lupine_85> I'm sure my inability to be productive on a mac is entirely my fault, and nothing to do with the operating system, don't worry
<lteo> my theory is that people are just wired differently
<fowl> lectrick: there are websites that can do that too, there are phone services which connect texting and emails, etc
<lectrick> lupine_85: OK, well I need to use more linux. I have some VM's with Ubuntu on them, I was impressed, but I didn't use them much yet. I was most impressed with how text rendering has improved over the years.
<fowl> lectrick: what an amazing innovation you have there
chessguy has joined #ruby
<lupine_85> I'm just reporting what happens to my productivity when I sit down in front of a mac, even after several weeks of sitting in front of a mc
<lupine_85> mac*
<fowl> lectrick: but if you're on a mac you dont call it text messaging you call it "composing" right?
<lectrick> fowl: I know. I didn't say it was impossible on other os'es, that would be silly. But the *stuff you really want to do* is almost always easy to do.
<lectrick> fowl: it's just called "messaging"
<lupine_85> does it still store the root password in the clear in the directory ?
<RubyPanther> The stuff you really want to do is always easy on any platform because you choose convenient tools, and activate them frequently.
<lupine_85> that's something I always want to do
<lectrick> lupine_85: lol, I really doubt that, and I never knew it did
<lteo> RubyPanther: +1
rippa has quit [Ping timeout: 268 seconds]
Guest57479 has quit [Client Quit]
mmercer has joined #ruby
<lteo> it just depends on what you want to do. i use both Mac and OpenBSD (with a tiling WM) as my desktops, for different reasons.
davidcelis_ has joined #ruby
havenn has quit [Ping timeout: 245 seconds]
<lectrick> RubyPanther: Opening PDF's in a clean interface, quickly, without using nagware, free... Haven't seen it yet on either linux or windows, it's always an annoying experience
davidcelis_ has quit [Client Quit]
<lupine_85> I use evince for my pdfs
fbernier has quit [Ping timeout: 276 seconds]
<lupine_85> works fine
aezop has joined #ruby
<lectrick> Now, Sublime is on all OS'es, so that might change the game for me a bit, since I use it as my editor
<RubyPanther> lectrick: I either double click it, or type "evince blahblah<tab>"
davidcelis_ has joined #ruby
<lupine_85> apparently, textmate is coming to linux
<lupine_85> I might give that a try when it does
<shevy> hmmmm
<lteo> i discovered mupdf recently, it's awesome especially if you like vi
<shevy> what is mupdf
<lectrick> lupine_85: forget it. textmate has already been supplanted by Sublime which is better and already has a windows/linux version
<lteo> shevy: really lightweight pdf viewer
<lupine_85> sounds like effort
<rburton-> I love vim
<shevy> lectrick, well. don't judge too early! I think sublime is nice... but I still use bluefish 1.0.7 :-)
<lectrick> RubyPanther: lupine_85 I didn't know about Evince. Looks like someone finally got it close to right. :)
<rburton-> Sublime Text 2 is my primary Ruby IDE
<RubyPanther> They have adobe on linux too, if you're into proprietary. More features, slower.
<lupine_85> evince has been the standard for a pretty long time
<shevy> adobe acrobat read + wine works fine
<shevy> *reader
<lupine_85> there is a native linux adobe acrobat
<lupine_85> it's just an arse to use
<lectrick> acrobat reader is the worst
<shevy> I prefer wine, the native linux shit of proprietary software usually sux
<apeiros_> I think acrobat is a horror on any platform
<lectrick> ironically
<lteo> OS X Preview does some pretty badass stuff though, like you can re-arrange pages and stuff without needing a real pdf editor.. iirc
<TTilus> n_blownapart: if A < B, then it is pretty common to say A#foo is overriden by B#foo or that B#foo overrides A#foo
<shevy> they seem to only add features nobody uses to their reader
<lectrick> lteo: yeah, Preview.app is excellent
<lupine_85> the latest horror that I've discovered is PDF forms
<TTilus> n_blownapart: both make sense
davidcelis_ has quit [Client Quit]
<lupine_85> I changed conveyancer, partly because of that
davidcelis_ has joined #ruby
<lupine_85> oh, while we're bitching on apple, can someone fix their built-in VNC viewer?
<n_blownapart> TTilus: thanks...why is that?
<lupine_85> there's no point building it in if it doesn't talk VNC
lhk has joined #ruby
davidcelis_ is now known as davidcelis
davidcelis has quit [Changing host]
davidcelis has joined #ruby
<lhk> hi
<lhk> can you point me to a ruby programming quiz/challenge site ?
Solnse has quit [Read error: Connection reset by peer]
<fowl> ruby koans
i0n has joined #ruby
i0n has quit [Changing host]
i0n has joined #ruby
<shevy> ruby poans
nobitanobi has joined #ruby
<lupine_85> project euler ?
<shevy> lhk, or you could help in real existing projects! :)
<TTilus> n_blownapart: well, its just plain english, if adam squigspiffles beth, beth is squigspiffled by adam
Doc_X has quit [Remote host closed the connection]
<RubyPanther> You can just use TightVNC
bluOxigen has joined #ruby
<TTilus> n_blownapart: or what you mean by "why is that"?
<lupine_85> or chicken
<RubyPanther> I don't expect a built-in viewer to be good, why would you expect an OS vendor to choose software that is optimal for your use cases?
<lhk> shevy: nah, im not that good and dont have the time to get active
<lupine_85> but if you're distributing a mac application that uses vnc, it'd be cool if you could just use open -w
<lupine_85> but you can't
<lhk> fowl: thanks that looks good
chessguy has quit [Remote host closed the connection]
<TTilus> n_blownapart: and damn my example, it should be B < A (meaning theres class B < A; ...; end)
<n_blownapart> TTilus: hold on please if you have to time I'm posting to pastie in a sec. thanks
<n_blownapart> *have time
alexim has joined #ruby
<TTilus> n_blownapart: pastie helps
vmatiyko has joined #ruby
<TTilus> n_blownapart: i need to go (to sleep) soon, but there are a ton of people to pick the issue up, just pastie it
verto is now known as verto|off
<n_blownapart> TTilus: thanks sleep well
fayimora has joined #ruby
pu22l3r has quit [Ping timeout: 252 seconds]
qwerxy has quit [Quit: offski]
asteve has quit []
Bosma has quit [Quit: leaving]
Quad is now known as Quadrant
tayy has joined #ruby
qwerxy has joined #ruby
shadoi has quit [Quit: Leaving.]
banseljaj is now known as imami|afk
elhu has quit [Ping timeout: 244 seconds]
shadoi has joined #ruby
schaerli has quit [Remote host closed the connection]
mockra has joined #ruby
SCommette has quit [Quit: SCommette]
qwerxy has quit [Client Quit]
GoGoGarrett has quit [Remote host closed the connection]
mockra_ has joined #ruby
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
SCommette has joined #ruby
crodas has quit [Quit: Disconnecting from stoned server.]
elhu has joined #ruby
bbttxu has quit [Quit: bbttxu]
crodas has joined #ruby
workmad3 has joined #ruby
internet_user has quit [Remote host closed the connection]
qwerxy has joined #ruby
kexibq has joined #ruby
opus has quit [Quit:]
mockra has quit [Ping timeout: 252 seconds]
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
lhk has left #ruby [#ruby]
SegFaultAX has joined #ruby
internet_user has joined #ruby
ChampS666 has quit [Ping timeout: 276 seconds]
opus has joined #ruby
jonahR has quit [Quit: jonahR]
MarGarina has joined #ruby
SQLStud has joined #ruby
qwerxy has quit [Client Quit]
cbuxton has quit [Ping timeout: 272 seconds]
Denommus has left #ruby [#ruby]
kexibq has left #ruby [#ruby]
chessguy has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
cbuxton has joined #ruby
mockra_ has quit [Ping timeout: 240 seconds]
baphled has quit [Ping timeout: 272 seconds]
ChampS666 has joined #ruby
iMe has quit [Quit: Computer has gone to sleep.]
opus has quit [Quit:]
<n_blownapart> hi I don't follow this method_missing prog. thanks: http://pastie.org/4468629
<davidcelis> thanks for what?
sent-hil has joined #ruby
velikasha has joined #ruby
<fowl> varelli its really simple, method_missing catches missing method calls
<lectrick> Here's something worth arguing: I am thinking that backdenting "protected" and "private" to the class definition column is smarter than making them start with the same indentation as the methods they affect
<fowl> m is the name of method you tried to call and *args is the arguments passed to it
chichou_ has joined #ruby
<sent-hil> Does AS::SecureRandom.hex generate unique ids?
JC` has joined #ruby
<apeiros_> lectrick: doing that
<apeiros_> there's places where it looks silly, though :-/
<apeiros_> sent-hil: basic maths would tell you that that'd be impossible
<sent-hil> apeiros_: ?
<apeiros_> ok, maybe that's not basic maths
qwerxy has joined #ruby
rburton- has quit [Quit: rburton-]
bam has quit [Quit: Leaving...]
<apeiros_> sent-hil: random means it can randomly return the same result
chichou has quit [Ping timeout: 276 seconds]
opus has joined #ruby
<apeiros_> the bigger the set and the better the distribution the more unlikely it is
<lectrick> apeiros_: Maybe, but the ruby style guide on github seems to suggest that having "protected" and "private" the same indentation as the "def" is proper form
<apeiros_> lectrick: it's a style guide
<lectrick> apeiros_: :)
forrest has quit [Quit: Leaving]
<apeiros_> there isn't such a thing as "the one true style"
stopbit has quit [Quit: Leaving]
SegFaultAX has quit [Quit: Lost terminal]
<apeiros_> but going with the flow has its merrits
<fowl> apeiros_: one style to bind them
<n_blownapart> fowl thanks but as usual, there is a lot of context I don't understand for instance...
<lectrick> Which is good. LOL fowl
<JC`> hello, all. i've got a small script that worked pretty well in 1.8, but now behaves oddly in 1.9. http://pastebin.com/Dpz1y1SD <- only line 22 "misbehaves" now. the script is ran from within mutt, the unix mail client. it takes attachments and ships them off to a workstation with X for viewing. afterwards, it goes back and prompts for removal of the temporary file. in 1.8, it waits for the y/n removal of the file. in 1.9, the rm runs, the question is pose
asobrasil has left #ruby [#ruby]
balki_ has joined #ruby
<lupine_85> I tend to put private / protected in the same indentation as class
<apeiros_> fowl: the bondage style? :)
sazboom has quit [Ping timeout: 246 seconds]
qwerxy has quit [Client Quit]
alanp has joined #ruby
<lectrick> And in the darkness find them?
<lupine_85> I do the same with case/when and if/else
balki has quit [Read error: Connection reset by peer]
<fowl> lectrick: +1 apeiros_: -1
alanp_ has quit [Read error: Connection reset by peer]
<lupine_85> half-baked rationale: you're not adding something to the enclosing scope, you're specifying a condition for things that are being added to it
<lupine_85> oh, also begin/rescue and begin/ensure
<n_blownapart> why would a method called "grade_for_" be coming in with a Student object? and where would it come from? fowl
nathandim has quit [Quit: Leaving]
<apeiros_> n_blownapart: you'd call grade_for_chemistry
<fowl> n_blownapart: it wouldnt. you're supposed to parse out the name
<apeiros_> n_blownapart: since there's no method with that name, method_missing is invoked, and the first argument is :grade_for_chemistry
<apeiros_> and in your example, you're supposed to parse out "chemistry", get the grade for that subject, and return it
<fowl> you even have a helpful comment: #return the appropriate grade, based on parsing the method name.
<sent-hil> what's a good way to generate uuids for urls? uuid/AS securerandom gives way too long entries
Bosma has joined #ruby
<apeiros_> sent-hil: what about plain ruby's SecureRandom.uuid ?
<sent-hil> apeiros_: too long
<lupine_85> ?
<lupine_85> a UUID is always 128 bits long
<apeiros_> sent-hil: um… you don't know what uuid means then
<lupine_85> no exceptions
<apeiros_> you know, there's a definition for them.
<n_blownapart> apeiros_: fowl so the grade_for_chemistry would be a misplaced/misinformed method name that came in with a Student obj. ? I need to see the scenario in which the grade_for_math would come into the prog. in the first place. thanks
<savage-> sent-hil: how about SecureRandom.base64
<fowl> sent-hil: md5(time())
<lupine_85> :S
<fowl> php^^
BrokenCog has joined #ruby
<lupine_85> you can take the raw 128 bits and base64-encode them, I guess
<fowl> n_blownapart: what do you mean?
DrShoggoth has quit [Quit: Leaving]
<lupine_85> that'll be short
<apeiros_> sent-hil: anyway, if you want a non-uuid random hex, SecureRandom.hex(n). but it's not a uuid then.
<fowl> n_blownapart: i cant help you if its going to take so long for you to reply, i dont have the attention span
<sent-hil> apeiros_: how do existing sites solve this problem then? just increment integers?
<apeiros_> sent-hil: "this problem" being?
<fowl> n_blownapart: if you dont know the scenario then why are you writing method_missing? you havent hit the problem yet that method_missing solves
t68948 has quit [Remote host closed the connection]
<apeiros_> sent-hil: you know, I can't read minds…
geggam has joined #ruby
nicoulaj has quit [Remote host closed the connection]
t57827 has joined #ruby
ChampS666 has quit [Ping timeout: 268 seconds]
<n_blownapart> sorry fowl I had to shut of the garden sprikler.
<n_blownapart> off
sailias has joined #ruby
<n_blownapart> fowl this is a textbook example that doesn't give the context for how to use it.
Aristata has joined #ruby
<Aristata> Can anyone tell me why this .match is not working? http://pastie.org/private/ovatqujprjitlbcy3fli5g
<lupine_85> frankly, any field with a unique constraint will work, as long as you have the consistency part of CAP
<apeiros_> Aristata: without looking at it: you're using it wrong. feel free to amend your problem description.
elhu has quit [Quit: Computer has gone to sleep.]
<lupine_85> we use labels and names an awful lot internally, occasionally just the database 'id' column
<apeiros_> (note that the reply is intentionally as bad as the problem description)
<lupine_85> UUIDs only where things are being generated simultaneously on different hosts and have no chance of being made eventually consistent
<n_blownapart> I understand it in a very limited context: return the grade based on a nonexistent? method name, or send the method call up the superclass lookup.
<n_blownapart> fowl ^^ apeiros_
<n_blownapart> *sprinkler
<fowl> n_blownapart: what do you need context for? method_missing is called when you call a missing method..
<fowl> Student.new.poop! for example
indian has joined #ruby
gfontenot has joined #ruby
<apeiros_> n_blownapart: method_missing is called for any method not present in the method lookup chain.
mockra has joined #ruby
<apeiros_> the last being Object#method_missing which in turn blows up with a NameError. (not necessarily the technical reality, but a good thought model)
<Aristata> apeiros_: It should return a match of both emails, not just the one
<Aristata> sorry
<sent-hil> apeiros_: how to generate a id for each object, without incrementing it from 1?
<n_blownapart> apeiros_: that I get... but from where would the incorrect/nonexistent method be coming from in a real world scenario? thanks
<apeiros_> n_blownapart: the point is that it is *not* incorrect
<apeiros_> and from where it would come: from your code
brdude has joined #ruby
<fowl> da
<apeiros_> you'd intentionally call student.grade_for_chemistry
<fowl> n_blownapart: you're impossible
<apeiros_> because you want to get the grade for chemistry
Morkel has quit [Quit: Morkel]
<n_blownapart> apeiros_: but that seems like a round a bout way of getting the data.
<apeiros_> Aristata: match only returns the first match
<apeiros_> Aristata: look at String#scan
cousine has quit [Remote host closed the connection]
<rking> Do any of you know of a generic diff-based testing tool? For example, imagine recursively wget'ing your generated HTML into a "greenbar" dir in your repo, then re-spidering before committing, so you can see the diffs. (Here's another example of the same idea, but for a CLI script: https://github.com/exad/zu/blob/master/test/run )
<n_blownapart> fowl too much buddhist chanting.
<apeiros_> n_blownapart: it's an example
<fowl> n_blownapart: yes ideally you would call somestudent.grade(:algebra) or something like that
fastred has quit [Quit: fastred]
<Aristata> apeiros_: I figured it out, I needed parenthesis
<fowl> n_blownapart: this should just show you that you can catch missing methods and do useful things with them, its an exercise
<apeiros_> n_blownapart: also, we rubyists are obsessed with aesthetics. we much prefer student.algebra_grade over student.grades[:algebra] or similar
[Neurotic] has joined #ruby
Jonah11_ has joined #ruby
<n_blownapart> fowl apeiros_ ok maybe I'm looking for more is there. I'm fastidious, so I'm thinking : why do it that way?
<apeiros_> Aristata: match will only give you the first match with parentheses too…
<n_blownapart> more *than
<JC`> anyone know if there were any major Kernel#system changes between 1.8 and 1.9?
syamajala has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
<Aristata> apeiros_: No, I have it returning two
<apeiros_> …
<fowl> n_blownapart: why track students and their grades? what kind of creep are you? spying on kids isnt cool.. obviously this software wont actually be used by teachers.. its an exercise
<Aristata> You don't have to believe me
<n_blownapart> apeiros_: so in your comment about aesthetics, instead of using the symbol :algebra, you would just forego a normal sort of data input into the prog?
fowl has left #ruby ["Leaving"]
<apeiros_> Aristata: you may want to pay closer attention to what your return value is
<shevy> JC` I think system() stayed the same
<n_blownapart> fowl !! you're the sick one !
<shevy> he has that nick for a reason!!!
<lupine_85> apeiros_, speak for yourself in that example ^^
<apeiros_> lupine_85: which one? the email matching?
<JC`> shevy: any idea why the code here, particularly line #22, would behave differently? http://pastebin.com/Dpz1y1SD
<lupine_85> student.algebra_grades
chico_chicote has joined #ruby
<lupine_85> I'd probably have student.grades_for :algebra instead
<apeiros_> lupine_85: ah. I was intentionally overstating (hm, what's the proper term for that?)
MarGarina has quit [Ping timeout: 265 seconds]
<apeiros_> lupine_85: I wasn't off, though. consider the whole lot of DSLs
<n_blownapart> thanks fowl apeiros_ lupine_85 I think I get it well enough
<lupine_85> there are certainly occasions where it increases clarity
Jonah11_ has quit [Quit: Leaving]
<apeiros_> which is, to a big degree, an aesthetic measure :)
<Aristata> apeiros_: Shit
ianbrandt has quit [Quit: ianbrandt]
<lupine_85> but anywhere a new category could be arbitrarily added at any point, I consider encoding the category in a method name to be a bad idea
havenn has joined #ruby
<apeiros_> Aristata: I'll refer you once again to String#scan.
<n_blownapart> lupine_85: regarding the method_missing example?
<apeiros_> lupine_85: I get it you'd never use an openstruct instead of a hash? :)
<lupine_85> yeah. you can use metaprograming to handle new categories automatically in the called object, with method_missing and friends, but if you try to do the same at the caller end, you find yourself playing with send and constructing strings a lot
kpshek has quit []
<Aristata> apeiros_: I am going to build a different system anyway :p
<beandip> Hi all. I want to do an if/then if a vairable is defined. What is the best syntax to use?
<apeiros_> Aristata: why did you ask then?
<Aristata> ??
Rajesh_ has quit [Quit: Leaving to Quit]
<lupine_85> if defined?(var-name)
<Aristata> What's it matter?
<n_blownapart> lupine_85: that is somewhat over my head, but my sense is that it is an odd way to do things.
<lupine_85> but when local variables can be defined or not is subject to some fun rules
<lupine_85> (I don't really understand them myself, but apparently, if false; a = 1 ; end ; defined?(a) will return true)
<apeiros_> also it's usually rather code-smelly if you have to test for lvar existence
velikasha has left #ruby [#ruby]
<apeiros_> test for specific values of an lvar, not its existence (e.g. for nil)
infinitiguy has quit [Ping timeout: 244 seconds]
<beandip> apeiros, the question is mainly asked for a chef recipe I'm writing
<lupine_85> mm, if you're having to check whether it's been defined elsewhere in the code or not, you're looking at side-effect city
jgarvey has quit [Quit: Leaving]
<apeiros_> beandip: that doesn't really change the nature of code-smell
mikepack has quit [Read error: Connection reset by peer]
mikepack_ has joined #ruby
<lupine_85> but frameworks will force you to do these things sometimes
<apeiros_> I seriously doubt chef does that
moshee has quit [Ping timeout: 244 seconds]
havenn has quit [Ping timeout: 244 seconds]
<apeiros_> and I'd consider a framework an instafail which does
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<lupine_85> I once had to change a method called by rails so that it returned one thing when called from one section of rails, and another when called from a different section
<apeiros_> ew
khakimov has joined #ruby
<lupine_85> if caller[2] =~ /...\.rb/ ... else ... end IIRC
<n_blownapart> apeiros_: so don't study rails? banisterfiend says he doesn't use it.
theRoUS has quit [Ping timeout: 244 seconds]
<lupine_85> I felt *very* dirty, doing that
<apeiros_> n_blownapart: I do. I'm not a fan of it. and it's certainly not a good source for role model code
<apeiros_> lupine_85: I'd hope so!
<lupine_85> and in fact, that code is still in production :S
<lupine_85> (there is/was a bug in rails with decimal numbers where scale = 0)
<apeiros_> n_blownapart: not to get me wrong - there is a lot of excellent code in rails
<lupine_85> the schema generator turned them from decimal to integer, IIRC
<lupine_85> this was way back in 2.3
<apeiros_> but there's also a lot of very crappy code in it. and unless you already have the experience, you'll probably copy horrible code.
Goles has joined #ruby
vitor-br has joined #ruby
<lupine_85> (of course, decimal(40), scale 0 is the best way to store IPv6 addresses in mysql)
<n_blownapart> apeiros_: thanks I guess I'll come across more method_missing in the core language that will keep me busy. many thanks and to you too lupine_85
<apeiros_> lupine_85: my favorite rails bug was in 3.x where the logger would crash when getting binary data
<lupine_85> heh, not come across that one
<apeiros_> (ooh, you have binary data in your sql? oooh I'm so terribly sorry but I'm gonna crash your app…)
banisterfiend has quit [Remote host closed the connection]
<ged> beandip: if defined?( variable )
<apeiros_> n_blownapart: you can live happily without method_missing. just to say.
<lupine_85> which is lucky, actually, since we do push binary data into a few tables in one AR 3.0.9 project
<lupine_85> 3.0.7 *
ephemerian has quit [Quit: Leaving.]
<apeiros_> oh, fun, I replaced the keycaps for the L and H key :)
banisterfiend` has joined #ruby
<apeiros_> lupine_85: I'd hope it got fixed. I still have it on my todos to remove my fix and see whether it still works.
<lupine_85> our rails stuff at work tends to ossify
<lupine_85> there's more applications than people to maintain them
<apeiros_> similar here
<lupine_85> when I started, back in the 2.1 days, there were still pre-1.0 rails applications hanging around
pskosinski has quit [Ping timeout: 276 seconds]
<apeiros_> should I mention that one of our apps is rails 1.2.3?
<savage-> apeiros_: wow! is there just no compelling reason to upgrade?
Hawklord has joined #ruby
<savage-> I find that it's hard to upgrade when you've monkey-patched the hell out of certain parts.
<apeiros_> savage-: it works. no features need to be added. it's internal, so security isn't an issue.
stepnem has quit [Ping timeout: 245 seconds]
<savage-> ah, makes sense.
jasonLaster has quit [Remote host closed the connection]
<apeiros_> savage-: so yes, upgrading would mean costs for no gains. it just keeps running.
vitor-br has quit [Ping timeout: 276 seconds]
jasonLaster has joined #ruby
<apeiros_> oh, and it seems to be bug-free. which is great :)
<savage-> nice! :)
<savage-> apeiros_: you're not going to BaRuCo in barcelona in a few weeks, are you?
bluOxigen has quit [Ping timeout: 240 seconds]
<apeiros_> savage-: no. been to railsberry & euruko this year already
stepnem has joined #ruby
<apeiros_> considered frozenrails, but I think I'll pass.
<savage-> okay, just curious. :)
<savage-> apeiros_: have you ever given a talk at a ruby conference before?
<lupine_85> I considered frozenrails, but the boss decided not to pay ^^
<lupine_85> so I'm not going
beneggett has joined #ruby
<apeiros_> savage-: nope :)
<savage-> apeiros_: you definitely should. :-) you have a lot of good material.
<apeiros_> savage-: thanks for the heads up
<apeiros_> but maybe I should have more finished material :o)
<apeiros_> working on that, though
<savage-> I'm going to give a quick lightning talk on redis_failover at BaRuCo. I've never given one before, but I'm excited about it.
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<apeiros_> nice
<apeiros_> yeah, I think I'd shit my pants while giving a talk
<savage-> Let's see how many slides I can cram into 7 minutes. :)
t57827 has quit [Remote host closed the connection]
<savage-> hehe
<apeiros_> even if "only" a lightning talk
t58298 has joined #ruby
<savage-> I've actually given talks before at local meetup groups here (hadoop, java-based stuff, etc).
jasonLaster has quit [Ping timeout: 260 seconds]
<savage-> But never anything related to ruby since I took the dive into Ruby a year ago. :-)
Inoperable has joined #ruby
<apeiros_> yeah, still preparing one on deduplicating customer databases and handling addresses
Inoperable has quit [Excess Flood]
<apeiros_> for a local meet-up I mean
jjbohn has quit [Quit: Leaving...]
dpk has quit [Quit: Asleep at the keyboard.]
<savage-> oh cool.
jrist is now known as jrist-afk
Inoperable has joined #ruby
Inoperable has quit [Excess Flood]
vmatiyko has left #ruby [#ruby]
nilg has quit [Remote host closed the connection]
Inoperable has joined #ruby
Inoperable has quit [Excess Flood]
gfontenot has quit [Ping timeout: 240 seconds]
kvirani has quit [Remote host closed the connection]
<apeiros_> yeah, it's quite a difficult topic, and I think I have good solutions
Inoperable has joined #ruby
Inoperable has quit [Excess Flood]
wereHamster has quit [Quit: Lost terminal]
* TTilus is going to frozenrails independent of anyone else paying...
Inoperable has joined #ruby
Inoperable has quit [Excess Flood]
Inoperable has joined #ruby
Inoperable has quit [Excess Flood]
Inoperable has joined #ruby
Inoperable has quit [Excess Flood]
bowlowni has quit [Remote host closed the connection]
Inoperable has joined #ruby
Inoperable has quit [Excess Flood]
cakehero has quit [Quit: Computer has gone to sleep.]
<lupine_85> I only really wanted to go for the location, so it's not too surprising the boss didn't want to pay
<TTilus> frozenrails for the location?
<TTilus> a bit surprising, have to say
<TTilus> take no offence if you live in helsinki
<apeiros_> the location is a teaser to me too
v0n has quit [Ping timeout: 246 seconds]
the_jeebster has quit [Quit: Leaving.]
virunga has quit [Quit: Sto andando via]
<TTilus> oh
<peterhellberg> Best Ruby conference location so far (for me at least): Nordic Ruby this year
<TTilus> imo HICSS or something like that would be "going for the location" ;)
<TTilus> peterhellberg: it was that bath thing?
<peterhellberg> TTilus: Yeah. At a Japanese Spa, close to Stockholm.
cousine has joined #ruby
<apeiros_> haha
<apeiros_> nice
<apeiros_> too bad I missed that
* apeiros_ loves spa
<peterhellberg> Next one up: Boulder, CO :)
n_blownapart has quit [Remote host closed the connection]
steffes has joined #ruby
stepnem has quit [Quit: ZNC - http://znc.sourceforge.net]
SCommette has quit [Quit: SCommette]
<lupine_85> I have never been to helsinki, and wouldn't mind going for free
fearoffish has quit [Quit: Computer has gone to sleep.]
<lupine_85> I don't want to go enough to pay large sums of money to go
dpk has joined #ruby
atmosx has joined #ruby
awarner has quit [Remote host closed the connection]
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<atmosx> hello
rburton- has joined #ruby
<peterhellberg> Hi there atmosx
<atmosx> how's life
jeff_sebring has joined #ruby
stepnem has joined #ruby
<peterhellberg> lupine_85: I was at the first Frozen Rails, the schedule was quite hectic
<peterhellberg> atmosx: Pretty nice actually
virunga has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
<slyv> Hey, is there a way to do summation in ruby?
<virunga> slyv: do mean sum of x from 0 to .. ?
<virunga> for example
<sent-hil> damn id generation is a bigger problem than I thought, especially with mongodb
cousine has quit [Remote host closed the connection]
chrisbolton has quit [Quit: chrisbolton]
<atmosx> so virunga replied correctly
<virunga> slyv: (1..100).reduce(:+)
steffes has quit [Remote host closed the connection]
<virunga> this should work
yoklov has quit [Quit: computer sleeping]
<atmosx> well you can easily create a function to suit your formula
beneggett has quit [Quit: Computer has gone to sleep.]
<atmosx> virunga: what the :+ means?
g_rotbart has joined #ruby
<virunga> atmosx: i don't remember exactly but it returns a proc obj
<virunga> because Symbol class has a method name to_proc that call that method (+)
<virunga> more or less
chessguy has quit [Read error: Connection reset by peer]
<virunga> sorry
luckyruby has quit [Read error: Connection reset by peer]
chessguy has joined #ruby
luckyruby has joined #ruby
<virunga> it's the same as give a block
<virunga> unfortunately i never use ruby :(
<lupine_85> so the implementation of reduce has to do if arg.has_method?(:to_proc) ... ?
<lupine_85> or does it get automatically converted in certain situations ?
<virunga> so i forget things
<lupine_85> (I'm used to ruby 1.9, where you'd do &method(:+))
<lupine_85> erm, 1.8
<virunga> lupine_85: sorry, i don't understand the question. My bad english
<virunga> and hour :P
stepnem has quit [Ping timeout: 245 seconds]
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
<lupine_85> what it boils down to is whether, given reduce(:+), in the implementation of reduce, will block_given? return true?
kn330__ has joined #ruby
emmanuelux has joined #ruby
Aristata has quit [Quit: Leaving.]
jmeeuwen has joined #ruby
<lupine_85> I guess I could write a test case :D
kn330_ has quit [Read error: Connection reset by peer]
poga has joined #ruby
<virunga> lupine_85: you can also go to see the implementation on ruby-doc
<virunga> click on show source code
duncanm has joined #ruby
<duncanm> hmm
indian has quit [Ping timeout: 260 seconds]
<duncanm> i have an issue with doing a POST in net/http in 1.9.3
<duncanm> in `send_request_with_body': undefined method `bytesize' for #<Array:0x007fbd519cb538> (NoMethodError)
<duncanm> and i can't seem to google any solution
stepnem has joined #ruby
SegFaultAX has joined #ruby
<virunga> >> :+.to_proc
<al2o3cr> (Proc) #<Proc:0x00000001270c58>
SegFaultAX has quit [Client Quit]
<virunga> >> p = :+.to_proc; p.call(2, 40)
<al2o3cr> (Fixnum) 42
<lupine_85> right, it doesn't get automatically converted into the block for the method you're passing it as an argument to
<lupine_85> which is a kind of relief, kind of shame
seanstickle has joined #ruby
<lupine_85> so the implementation must do if block_given? ; yield ; else ; args[0].to_proc.call if args[0].respond_to?(:to_proc) ; end
<nobitanobi> Anyone knows how to pass parameters in a hash form when using OAuth get method? Something like this: @photos = @access_token.get('/photos.xml', :parameters => {:id => 1} ) I can't find the way to do it in the Docs.
<lupine_85> *shudder
ph^ has quit [Remote host closed the connection]
justsee|away is now known as justsee
nateberkopec has quit [Quit: Leaving...]
stepnem has quit [Excess Flood]
resure has quit [Remote host closed the connection]
mike4_ has quit [Ping timeout: 276 seconds]
Stalkr_ has quit [Quit: Leaving...]
virunga has quit [Quit: Sto andando via]
bluenemo has quit [Read error: Connection reset by peer]
havenn has joined #ruby
jjang has joined #ruby
xnm has joined #ruby
mikepack_ has quit [Remote host closed the connection]
<shevy> my keyboard makes loud sounds when I type the space key :(
jjbohn has joined #ruby
specialGuest has quit [Quit: WeeChat 0.3.8]
<shevy> it's noisy
<shevy> are there extra silent keyboards?
micadeyeye has quit [Ping timeout: 272 seconds]
SCommette has joined #ruby
havenn has quit [Ping timeout: 240 seconds]
inteq has joined #ruby
micadeyeye has joined #ruby
<ggreer> I hear the IBM Model M is a quiet keyboard
inteq has quit [Client Quit]
nobitanobi has quit [Read error: Connection reset by peer]
pskosinski has joined #ruby
nobitanobi has joined #ruby
<nobitanobi> shevy: Do you happen to have a MB Air? A friend of mine is so frustrated with his space bar noise in his Air...
fayimora has quit [Read error: Connection reset by peer]
spree_josh has quit []
<shevy> nobitanobi hmm no... dont think so... I have a Microsoft Wired Keyboard 200
tayy has quit [Remote host closed the connection]
<shevy> but one month after buying it, the keys seem to have gotten louder :(
<nobitanobi> shevy: oh ~~
<nobitanobi> shevy: go tell em!
<shevy> it's a good keyboard otherwise, but the typing sound annoys me
<shevy> I used to have a really heavy MS Office keyboard... it was fairly silent
idoru has quit [Ping timeout: 600 seconds]
gmci has quit [Ping timeout: 276 seconds]
korczis has quit [Quit: Leaving]
korczis has joined #ruby
<nobitanobi> shevy: I remember my old MS keyboard with the MS Explorer mouse. those were good stuff
<shevy> I semi-watch a video while writing code, and it's on low volume to not distract me too much, and that typing noise distracts me, it's louder than the movie...
t58298 has quit [Remote host closed the connection]
<shevy> haha the explorer mouse
dpk has quit [Quit: Asleep at the keyboard.]
<nobitanobi> shevy: remember the explorer one ah?
t47000 has joined #ruby
SQLStud has quit [Read error: Connection reset by peer]
<nobitanobi> shevy: I loved it...
chessguy has quit [Remote host closed the connection]
<ggreer> I have that cheap amazon bluetooth keyboard. it's pretty quiet
manizzle is now known as WeLoveCP
<shevy> I am not sure if I remember. the mice today are quite ok.. cheap and not annoying. and reliable
<graft> okay... x = []; x[3] = 1; x.inject(:+) fails because + is not defined on nil. what do i do here?
<ggreer> maybe you just hit the spacebar more authoritatively than most keys?
<shevy> a few years ago I had a cheap mouse where the outer polish (that red colour) slowly fell apart in pieces... that was ugly to touch
<nobitanobi> yeah man, do it softer :)
<ggreer> ^^ that's what I use. it's mushy
<shevy> ggreer, yeah, mostly my left thumb
<shevy> when I hit the middle of the space bar it is ok
<ggreer> but it's smaller than most keyboards, so it fits my hands better
<shevy> but when I hit the left side, it creaks and squeaks strangely :(
<LiquidInsect> graft: what are you trying to do?
<nobitanobi> shevy: this is what I am talking about: http://www.maximumpc.com/files/u17625/intellimouse3.jpg
<ggreer> maybe wash your keyboard?
<LiquidInsect> graft: you made an array that looks like [nil, nil, nil, 3]
<ggreer> or lubricate it?
<ggreer> or both?
<LiquidInsect> and tried to sum it
Synthead has quit [Quit: p33 ba115]
<graft> LiquidInsect: yeah...
<shevy> like when you scratch over a chalkboard with a knife... I get slight goose pimples from that sound
<LiquidInsect> nil isn't a number so you can't do that
<shevy> ggreer, will give it a try tomorrow. when I shake it, something rattles inside...
<shevy> as if tiny pearls are in it
<shevy> nobitanobi hmm I thought they were more primitive back then
ph^ has joined #ruby
WeLoveCP is now known as manizzle
<ggreer> oh. it could be one of those springy bars on the sides of big keys. if one of those has come loose, the key won't go straight down if you press off-center
manizzle is now known as manizzle_
<peterhellberg> graft: You could do x.compact.inject(:+)
<peterhellberg> graft: If you just want to remove the nils
gmci has joined #ruby
<shevy> I remember those mice with the teal middle wheel thing
manizzle has joined #ruby
opus has quit [Ping timeout: 240 seconds]
yoklov has joined #ruby
<shevy> nobitanobi, haha almost like this one http://www.circuitgeek.com/sites/default/files/images/p5h.jpg
manizzle is now known as WeLoveCP
benson has quit [Read error: Connection reset by peer]
nobitanobi1 has joined #ruby
nobitanobi1 has quit [Client Quit]
JC` has left #ruby [#ruby]
opus has joined #ruby
cousine has joined #ruby
manizzle_ has quit [Quit: Leaving]
infinitiguy has joined #ruby
benson has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
<graft> LiquidInsect: i understand why it's failing... i just want to sum up all the non-nil members
stepnem has joined #ruby
stkowski has quit [Quit: stkowski]
<graft> peterhellberg: ah, right, duh
SCommette has quit [Quit: SCommette]
manizzle has joined #ruby
<zeromodulus> is it okay to ask rails questions here? the #rails room appears to be dead.
WeLoveCP has quit [Read error: Connection reset by peer]
<adamkittelson> zeromodulus: try the #rubyonrails room
<zeromodulus> actually, nevermind, I discovered my problem. the official room is #rubyonrails
SCommette has joined #ruby
sent-hil has quit [Remote host closed the connection]
<zeromodulus> thanks
SCommette has quit [Client Quit]
chichou_ has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
manizzle has quit [Read error: Connection reset by peer]
dv_ has quit [Read error: Connection reset by peer]
SCommette has joined #ruby
manizzle has joined #ruby
rails has quit [Ping timeout: 248 seconds]
mmercer has quit [Ping timeout: 240 seconds]
rump has joined #ruby
uris has quit [Quit: leaving]
babinho_ has joined #ruby
SCommette has quit [Client Quit]
MasterIdler has quit [Ping timeout: 248 seconds]
dv_ has joined #ruby
jeff_sebring has quit [Quit: Leaving]
babinho has quit [Ping timeout: 268 seconds]
naquad has quit [Ping timeout: 268 seconds]
beneggett has joined #ruby
naquad has joined #ruby
rails has joined #ruby
cfs has joined #ruby
geggam has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
fmcgeough has joined #ruby
infinitiguy has quit [Quit: Leaving.]
marknyc has joined #ruby
marknyc has quit [Client Quit]
baroquebobcat has quit [Ping timeout: 260 seconds]
pnbeast has quit [Quit: = Let's blow this popsicle stand.]
brianpWins has quit [Quit: brianpWins]
ph^ has quit [Remote host closed the connection]