apeiros_ changed the topic of #ruby to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
carlyle has quit [Remote host closed the connection]
jerius has joined #ruby
echobinary has joined #ruby
grayson has quit [Quit: Computer has gone to sleep.]
malte_ has quit [Quit: malte_]
anonymuse has quit [Quit: Leaving...]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
echobinary has quit [Remote host closed the connection]
echobinary has joined #ruby
mattbl has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
khismetix has joined #ruby
predator217 has joined #ruby
hydrozen has joined #ruby
bricker is now known as bricker`away
newUser1234 has quit [Remote host closed the connection]
dawkirst has quit [Ping timeout: 252 seconds]
zastern has quit [Remote host closed the connection]
newUser1234 has joined #ruby
<splud> have array of strings. Want to see if any of them are in another string. Want to bail on FIRST match, not iterate all of them.
TheFuzzball has joined #ruby
hybris has joined #ruby
<banisterfiend> splud: any?
<splud> can't provide the array: ap.include?( string_array )
voobofdoom has joined #ruby
Quebert has joined #ruby
<banisterfiend> splud: string_array.any? { |v| other_string.include?(v) }
drumond19 has joined #ruby
<splud> thanks, will check that.
danman has quit [Quit: danman]
jimeh has joined #ruby
yshh has quit [Remote host closed the connection]
joshman_ has quit [Ping timeout: 245 seconds]
predator117 has quit [Ping timeout: 276 seconds]
<splud> sweet. Thanks.
newUser1234 has quit [Ping timeout: 255 seconds]
apeiros_ has joined #ruby
<lectrick> Spooner: What about the function to convert TO roman numerals? :)
cyong has joined #ruby
chrishough has quit [Ping timeout: 276 seconds]
`p has quit [Ping timeout: 245 seconds]
macmartine has joined #ruby
khismetix has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Trudko has quit [Read error: Connection reset by peer]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
ngotho has joined #ruby
bigoldrock has joined #ruby
dawkirst has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
<lectrick> Spooner: Relevant: http://www.rubyquiz.com/quiz22.html
Mattykins has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
ad_AA has quit [Ping timeout: 252 seconds]
takeru has joined #ruby
Virunga has quit [Remote host closed the connection]
voobofdoom has quit [Remote host closed the connection]
mattbl has quit [Quit: This computer has gone to sleep]
<Spooner> lectrick, They aren't quite as terse though. Bit naff :D
apeiros_ has quit [Ping timeout: 252 seconds]
hasimo has quit [Remote host closed the connection]
MrZYX is now known as MrZYX|off
alex__c2022 has quit [Quit: alex__c2022]
jerius has quit []
hasimo has joined #ruby
cyong has quit [Ping timeout: 252 seconds]
m8 has quit [Quit: Sto andando via]
ilyam_ has joined #ruby
NiteRain has quit [Ping timeout: 246 seconds]
sn0wb1rd_ has joined #ruby
Xeago has quit [Remote host closed the connection]
nari has quit [Ping timeout: 264 seconds]
sn0wb1rd has quit [Ping timeout: 245 seconds]
sn0wb1rd_ is now known as sn0wb1rd
LocutusOfBorg has quit [Read error: Connection reset by peer]
arthurstomp has joined #ruby
ilyam has quit [Ping timeout: 260 seconds]
ilyam_ is now known as ilyam
Banistergalaxy has quit [Ping timeout: 272 seconds]
Vert has quit [Read error: Connection reset by peer]
idkazuma has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
dpg has joined #ruby
<dpg> You guys like tech shows? Techendo - Secret of the Droin http://vimeo.com/techendo/1
hogeo has joined #ruby
jerius has joined #ruby
Ontolog has quit [Remote host closed the connection]
Ontolog has joined #ruby
Banistergalaxy has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
jgrevich has joined #ruby
mercwithamouth has joined #ruby
pkrnj has joined #ruby
chipotle_ has quit [Quit: cya]
emmanuelux has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
adamjleonar has joined #ruby
adamjleonard has quit [Read error: Connection reset by peer]
dpg has left #ruby [#ruby]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
`p has joined #ruby
jgarvey has quit [Quit: Leaving]
hydrozen has quit [Quit: Textual IRC Client: www.textualapp.com]
maycon has joined #ruby
maycon has quit [Changing host]
maycon has joined #ruby
mahmoudimus has joined #ruby
pac1 has joined #ruby
crankycoder has joined #ruby
lewix has joined #ruby
Spooner has quit [Remote host closed the connection]
ibtkm has joined #ruby
chrishun_ has joined #ruby
phretor has joined #ruby
d2dchat has quit [Remote host closed the connection]
<phretor> is it possible to tell `bundle install` to install the gems in a local directory?
apeiros_ has joined #ruby
AlSquire has joined #ruby
<ibtkm> hey every body, How can I put all methods among just one "rescue" statement? I don't want to put each method in a "rescue" statement.
`p has quit [Ping timeout: 264 seconds]
chrishunt has quit [Read error: Operation timed out]
chrishun_ is now known as chrishunt
ivar has joined #ruby
NiteRain has joined #ruby
<ivar> I have a class that mixes in Enumberable, so I need to implement 'each'. I want to delegate 'each' to an ActiveRecord.find_in_batches query. If I didn't have to supply args to find_in_batches, this would be doable with delegate. How should I do this ?
malkomalko has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
tish has joined #ruby
yshh has joined #ruby
lepht_afk has quit [Quit: lepht->out]
etcetera has quit []
arthurstomp has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
kofno has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
generalissimo has quit [Remote host closed the connection]
backjlack has quit [Remote host closed the connection]
`p has joined #ruby
heyitsdave has quit [Ping timeout: 255 seconds]
sirish has quit [Ping timeout: 248 seconds]
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
apeiros_ has quit [Ping timeout: 248 seconds]
daniel_- has quit [Ping timeout: 255 seconds]
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
etcetera has joined #ruby
cyong has joined #ruby
jurassic has quit [Quit: jurassic]
cyong has quit [Max SendQ exceeded]
mattbl has joined #ruby
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
aed has joined #ruby
<havenwood> lectrick: If trailing comma didn't matter it'd be easier: each_slice(n).flat_map { |e| e << ',' }
cyong has joined #ruby
<havenwood> alas...
cyong has quit [Max SendQ exceeded]
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
marcux has quit [Quit: marcux]
taoru has joined #ruby
R_Macy has joined #ruby
QaDeS has quit [Quit: Ex-Chat]
seanmccann has quit [Quit: Computer has gone to sleep.]
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
heyitsdave has joined #ruby
cyong has joined #ruby
aed has left #ruby [#ruby]
<lewix> the %-style notation delimiter could be just about anything?
ivar has left #ruby [#ruby]
aed has joined #ruby
<lewix> or just braces curly brackets and dashes
skattyadz has quit [Quit: skattyadz]
cyong has quit [Max SendQ exceeded]
jurassic has joined #ruby
cyong has joined #ruby
Honeycomb has quit [Quit: Leaving.]
<shevy> lewix almost anything
<shevy> %w% cat dog horse % # => ["cat", "dog", "horse"]
<lewix> shevy: I tried in irb it doesn't seem to hold true
rafacv has quit [Remote host closed the connection]
Honeycomb has joined #ruby
Honeycomb has quit [Client Quit]
<shevy> what did you try
cyong has quit [Max SendQ exceeded]
<lewix> % (space) (space)
<shevy> well space is problematic
<lewix> % character character
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
<shevy> which % do you actually mean :)
<shevy> '%5s' % '1' # => " 1"
cyong has joined #ruby
dhruvasagar has joined #ruby
tomzx_mac has joined #ruby
cyong has quit [Max SendQ exceeded]
<lewix> any
jimeh has quit [Quit: Computer has gone to sleep.]
ngoldman has quit [Remote host closed the connection]
cyong has joined #ruby
<tylersmith> space doesn't work. letters don't seem to work. most symbols do
skattyadz has joined #ruby
<tylersmith> 1.9.3p286 :021 > %w^a^
<tylersmith> => ["a"]
iamjarvo has joined #ruby
<lewix> it seems only wildcards characters work
cyong has quit [Max SendQ exceeded]
marr has quit [Ping timeout: 272 seconds]
mibitzi has joined #ruby
kenneth has quit [Quit: kenneth]
<shevy> cool
<shevy> never tried ^ before
<shevy> %w^a bcd efg^ # => ["a", "bcd", "efg"]
<shevy> quite fun hehe
cyong has joined #ruby
<lewix> yea so I think people should stop saying "anything" goes
<tylersmith> 1.9.3p286 :028 > %w>_>
<tylersmith> => ["_"]
<shevy> wow guys, a smiley
<shevy> %w^_^ # => ["_"]
<tylersmith> u stole my codez
<shevy> %w^:-)^ # => [":-)"]
<shevy> hahaha
jonahR has joined #ruby
jonahR has quit [Client Quit]
<shevy> omg look at this smiley there:
cyong has quit [Max SendQ exceeded]
<shevy> %w`:-)` # => [":-)"]
chipotle_ has joined #ruby
<shevy> even ` can be used
etcetera has quit []
<tylersmith> looks like you can use spaces if the first char is a symbol
<tylersmith> %w\ a\
cyong has joined #ruby
paladin_ has joined #ruby
etcetera has joined #ruby
<shevy> that's awkward
rakl has quit [Quit: sleeping]
stkowski has quit [Ping timeout: 252 seconds]
<shevy> hmm you can use : too
<shevy> %w: a bcd efgh: # => ["a", "bcd", "efgh"]
ibtkm has left #ruby [#ruby]
<paladin_> wiggity wack!
stkowski has joined #ruby
sirish has joined #ruby
stkowski has quit [Client Quit]
<paladin_> shevvvvvvy
paladin_ is now known as palladium
Ontolog has quit [Remote host closed the connection]
macmartine has quit [Quit: Computer has gone to sleep.]
cyong has quit [Ping timeout: 252 seconds]
Ontolog has joined #ruby
pepper_chico has joined #ruby
bigoldrock has quit [Ping timeout: 260 seconds]
<lewix> space can be used if it's %q
endzyme has quit [Ping timeout: 248 seconds]
<lewix> %q hello
tylersmith has quit [Quit: tylersmith]
hemanth_ has joined #ruby
ephemerian has quit [Quit: Leaving.]
pepper_chico has quit [Client Quit]
<hybris> Is there a way to do 0..5, but in non-integer increments? so I would have [0, 0.5, 1, 1.5 …]
samphippen has quit [Quit: Computer has gone to sleep.]
<lewix> actually space could be use for %q %Q and % !
apeiros_ has joined #ruby
adamjleonar has quit [Quit: Leaving...]
<lewix> the need to make it more consistent
zeade has quit [Quit: Leaving.]
<havenwood> lectrick: Here is another way to do eet with #inject: https://gist.github.com/havenwood/5104692
<banisterfiend> hybris: 0.step(5, 0.5).to_a
zeade has joined #ruby
skattyadz has quit [Quit: skattyadz]
zeade has quit [Client Quit]
<banisterfiend> hybris: or: (0..5.0).step(0.5).to_a
cyong has joined #ruby
<hybris> perfect! thanks
hemanth_ has quit [Quit: This computer has gone to sleep]
<banisterfiend> hybris: if you intend to just iterate, then get rid of the to_a and put on your enumerable method of choice, i.e each/map etc
r4um has quit [Ping timeout: 256 seconds]
<hybris> I actually wanted an array so it's perfect :)
<XVirus> How can I access an instance variable without a getter ?
<hybris> that's awesome though, so clean. thanks
charlie_ has joined #ruby
<havenwood> XVirus: You mean without an attr_reader or without creating a getter method at all?
SCommette has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
postmodern has joined #ruby
<XVirus> havenwood: I don't know what an attr_reader is as I'm still learning Ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
r4um has joined #ruby
<banisterfiend> XVirus: you can only access an ivar through a method
nari has joined #ruby
<XVirus> banisterfiend: I see
mrsolo has quit [Quit: Leaving]
<banisterfiend> XVirus: but u can use the instance_variable_get(:@my_ivar) method to get it, if u really want
takeru has quit [Remote host closed the connection]
pepper_chico has joined #ruby
<banisterfiend> but that's quite naughty
<banisterfiend> XVirus: also: obj.instance_eval { @ivar }
<XVirus> I see
<XVirus> banisterfiend: Thanks a lot !
qubit has joined #ruby
<lewix> ruby -e puts 'hi', I have a blank output
SCommette has quit [Ping timeout: 255 seconds]
Domon has joined #ruby
<lewix> what's wrong with my parser
eindoofus has quit [Quit: Leaving]
sam113101 has joined #ruby
johnmilton has quit [Remote host closed the connection]
<banisterfiend> lewix: if u want spaces u have to wrap it in ""
<banisterfiend> ruby -e "puts 'hi'"
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
cyong has quit [Max SendQ exceeded]
etcetera has quit []
<lewix> banisterfiend: spaces?
<banisterfiend> lewix: you hav a space between puts and 'hi'
apeiros_ has quit [Ping timeout: 252 seconds]
<lewix> banisterfiend: oh thanks, never used the -e option before
SCommette has joined #ruby
cyong has joined #ruby
raggedjack has joined #ruby
<lewix> banisterfiend: question
cyong has quit [Max SendQ exceeded]
<lewix> banisterfiend: why did you decide to do another irb, what was the motive
jonathanwallace has joined #ruby
cyong has joined #ruby
<lewix> pry
cyong has quit [Max SendQ exceeded]
freeayu has quit [Read error: Connection reset by peer]
cyong has joined #ruby
_jc has joined #ruby
cyong has quit [Max SendQ exceeded]
cyong has joined #ruby
<banisterfiend> lewix: irb is weaksauce, ruby was capable of better :)
<lewix> lol
jstultz has quit [Ping timeout: 264 seconds]
phretor has quit [Quit: phretor]
<banisterfiend> but in reality, i never conceived of pry as an irb alternative
sam113101 has quit [Quit: WeeChat 0.3.8]
<banisterfiend> it was initially just a runtime thing, a sort of debugger/exploration tool
pdamer has joined #ruby
<lewix> I see
joeycarm_ has quit [Remote host closed the connection]
<banisterfiend> but it only took 1 line of code to make it an irb replacement so i just did it one day
malkomalko has quit [Remote host closed the connection]
sam113101 has joined #ruby
<banisterfiend> lewix: like all software, it's not fully implemented :)
jrendell has joined #ruby
<banisterfiend> always bugs to fix/features to add
_jc has quit [Client Quit]
cyong has quit [Ping timeout: 252 seconds]
NiteRain has quit [Ping timeout: 246 seconds]
froy has joined #ruby
tomzx_mac has quit [Ping timeout: 252 seconds]
splud has quit [Quit: splud]
<XVirus> What's the difference between def balance=(amount) and def balance(amount) ? .. Assuming that balance is an instance variable.
<lewix> setter/getter
freeayu has joined #ruby
dmiller has quit [Ping timeout: 240 seconds]
drumond19 has quit [Remote host closed the connection]
<XVirus> err .. ok
<lewix> banisterfiend: ok let me rephrase it.does it have a stable release
<banisterfiend> lewix: of course
<banisterfiend> 0.9.12 is fairly stable
<banisterfiend> it has a couple of bugs of course, but so does everything
<lewix> banisterfiend: what do you use most, irb or pry
<lewix> what's the main difference
<banisterfiend> is that a serious question?
<havenwood> lewix: alias irb='pry'
<lewix> banisterfiend: lol
<banisterfiend> why the heck would i use irb?
banjara has quit [Quit: Leaving.]
clooth has joined #ruby
<lewix> nostalgia
<banisterfiend> hehe
cyong has joined #ruby
<banisterfiend> well i use irb sometimes when im checking whether pry has a bug or not
bcol has joined #ruby
<XVirus> Isn't attr_accessor equivalent to both attr_writer and attr_reader ?
<banisterfiend> irb is fine for simple stuff, but it annoys me whenever i try to do something in depth
cyong has quit [Max SendQ exceeded]
bcol has left #ruby ["Textual IRC Client: www.textualapp.com"]
sn0wb1rd has joined #ruby
Honeycomb has joined #ruby
palladium has quit [Ping timeout: 260 seconds]
<XVirus> ignore my question
<lectrick> Spooner, havenwood: https://gist.github.com/pmarreck/5104951 Clearly I am very bored lol.
Phoebus has joined #ruby
cyong has joined #ruby
Phoebus has left #ruby ["Leaving"]
tealmage has quit [Remote host closed the connection]
philcrissman has joined #ruby
SCommette has quit [Quit: SCommette]
<lewix> XVirus: you could also use attr balance, true
echobinary has quit [Read error: Connection reset by peer]
<XVirus> lewix: will take a look at that
<lewix> XVirus: which is equivalent to attr)accessor
<XVirus> I see
echobinary has joined #ruby
<lewix> attr_accessor* however it only defines one attribute
<havenwood> nice!
adkron has joined #ruby
<havenwood> lectrick: ^
<lectrick> havenwood: heh, thanks. the on-the-fly "this undefined constant is actually a Roman numeral" is hacky but hot :)
jgrevich has quit [Ping timeout: 245 seconds]
gyre007 has quit [Ping timeout: 245 seconds]
jgrevich has joined #ruby
<havenwood> lectrick: Here's a premature optimization >.>, swap l28 reverse.each_with_object with reverse_each.with_object
ilyam has quit [Remote host closed the connection]
aed has quit [Quit: aed]
ilyam has joined #ruby
<XVirus> I only did attr_reader :balance and I can still do object.balance = 20 .. How come ?
adkron_ has joined #ruby
<lewix> XVirus: do you do it on irb
mootpointer has joined #ruby
raggedjack has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
<havenwood> XVirus: Do you have a?: def balance = this; @balance end
<havenwood> XVirus: Seems like you've either got a setter method or attr_accessor or attr_writer
cyong has quit [Ping timeout: 252 seconds]
rburton- has quit [Quit: Leaving...]
<XVirus> lewix: yes
sam113101 has quit [Quit: WeeChat 0.3.8]
io_syl has quit [Quit: Computer has gone to sleep.]
<XVirus> havenwood: no
<havenwood> XVirus: Gist the code?
sam113101 has joined #ruby
dmiller has joined #ruby
<XVirus> havenwood: I'm accessing the file through irb's load
<lewix> XVirus: because you did it in irb
<havenwood> XVirus: You must be re-opening BankAccount class.
<havenwood> XVirus: It already has the setter.
<havenwood> XVirus: Switch from irb to Pry!!!
cyong has joined #ruby
<havenwood> XVirus: gem install pry; pry
apeiros_ has joined #ruby
<XVirus> What's wrong with irb ?
etcetera has joined #ruby
<havenwood> XVirus: It is inferior to Pry. Not so much what is wrong with irb as what is amazing about Pry.
cyong has quit [Max SendQ exceeded]
<havenwood> XVirus: Syntax highlighting, indentation, view method source code, view documentation, etc.
<havenwood> XVirus: All upsides.
<XVirus> I see
chipotle_ has quit [Quit: cya]
cyong has joined #ruby
<havenwood> XVirus: E.g., in Pry you can type `reset` to wipe out stuff above (like your current situation).
<XVirus> hmm
pskosinski has quit [Quit: Red Eclipse, game of racist admins/devs: http://pawelk.pl/racist-red-eclipse-quin-zeroknight-gingerbear/]
jerius has quit [Ping timeout: 256 seconds]
etcetera has quit [Client Quit]
<havenwood> XVirus: If you `gem install pry` from in Pry you can type `help` to see Pry-specific commands (worth a read).
ttt has joined #ruby
<lewix> XVirus: don't believe everything you read on irc
cyong has quit [Max SendQ exceeded]
jrendell has quit [Read error: Operation timed out]
<XVirus> I still don't understand how is irb a problem in my case
cyong has joined #ruby
<lewix> XVirus: why don't you just run the file with the ruby interpreter
<havenwood> XVirus: Pry has received a lot more love than irb. Very, very helpful. In your current case you need to reset irb, pry can do that.
cyong has quit [Max SendQ exceeded]
sam113101 has quit [Quit: WeeChat 0.3.8]
<lewix> banisterfiend: I'll install pry when I'm done learning =)
<XVirus> isn't a re load "file.rb" enough ?
cyong has joined #ruby
<havenwood> Anyways, Pry doesn't make it harder for noobs and very powerful as you learn it.
sam113101 has joined #ruby
cyong has quit [Max SendQ exceeded]
jerius has joined #ruby
<lectrick> havenwood: reverse_each.with_object is faster/better t han reverse.each_with_object ?
<XVirus> pry looks very neat
<banisterfiend> lewix: i dont see how that follows, it'll aid you in your learning IMO
splud has joined #ruby
<havenwood> lectrick: Yup, instead of doing a sort, then iterating - it iterates from back to front! :D
cyong has joined #ruby
<banisterfiend> pull source/docs for nearly any method, etc
danman has joined #ruby
<lectrick> XVirus: Pry is the bees' knees. When you lurves it, don't forget to thank banisterfiend :)
cyong has quit [Max SendQ exceeded]
<XVirus> banisterfiend: Thanks :-)
<havenwood> lectrick: So no sort overhead. Just iterates in opposite direction.
<lewix> banisterfiend: i don't have much space on my computer. it's the macbook air
cyong has joined #ruby
vierja has quit [Read error: Connection reset by peer]
<lewix> banisterfiend: it's either irb or pry
cyong has quit [Max SendQ exceeded]
<banisterfiend> :)
<lectrick> havenwood: aha. nice
ilyam has quit [Quit: ilyam]
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
cyong has joined #ruby
<lewix> XVirus: load 'file.rb' is enough, but if you run attr_accessor :balance in irb before irb still remembers it
krislappy is now known as krisfremen
philcrissman has quit [Remote host closed the connection]
<havenwood> banisterfiend: Thanks for Pry!! ♥╣[-_-]╠♥
<lewix> lol
<banisterfiend> cool emoticon :D
cyong has quit [Max SendQ exceeded]
Voodoofish430 has quit [Quit: Leaving.]
<lewix> banisterfiend: thanks for pry.i love the love
cyong has joined #ruby
admitted_limited has quit [Quit: admitted_limited]
cyong has quit [Max SendQ exceeded]
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
Choobie has joined #ruby
Choobie has quit [Changing host]
Choobie has joined #ruby
becom33 has joined #ruby
jef_abraham has joined #ruby
admitted_limited has joined #ruby
cyong has joined #ruby
<charlie_> Hello - question about modules. To define a method in a module, like Math::sqrt or something, you need to do module Math; def Math.sqrt(...); ...; end; end yeah? does that mean that methods in modules are really in the singleton class of the module? I'm confused
<becom33> Hello everyone I'm having a problem with a regex logic . https://gist.github.com/anonymous/0bad07edf0d13fc77567
cyong has quit [Max SendQ exceeded]
<becom33> I want to a validate a only a url a clear url
mockra_ has quit [Remote host closed the connection]
cyong has joined #ruby
gyre007 has joined #ruby
dmiller has quit [Ping timeout: 256 seconds]
hbpoison has quit [Ping timeout: 255 seconds]
cyong has quit [Max SendQ exceeded]
<havenwood> becom33: require 'uri'; URI::regexp
<lectrick> The ability to chain Ruby enumerators (and the almost-magic currying of block args) is amazing.
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
cyong has joined #ruby
twoism has quit [Remote host closed the connection]
cyong has quit [Max SendQ exceeded]
<havenwood> becom33: URI.regexp i mean.
apeiros_ has quit [Ping timeout: 264 seconds]
newUser1234 has joined #ruby
<havenwood> becom33: URI::ABS_URI
<lewix> charlie_: you defined a singleton method in the module Math, you could have defined an instance method that could be call by the instance of the a class that mix in module Math
quila23 has quit [Ping timeout: 256 seconds]
<lewix> called*
joofsh has joined #ruby
<Quadlex> "The Ruby answer to both kinds of bugs is to write automated tests, lots and lots of automated tests" This is both the truest and funniest thing I have ever heard about Ruby
<shevy> but I dont write tests
<shevy> yet use ruby
<becom33> havenwood, it doesn't work http://codepad.org/kcspSDX4
<lectrick> shevy: dude just use inline tests, it's stupid easy
<havenwood> becom33: If you don't want to allow spaces, try: URI::ABS_URI
<charlie_> lewix: this is why I'm confused: when you call a method on an object, you check the singleton class, then the class. so when i call Math::sqrt, how does it find sqrt? sqrt is a method in the module Math, not in the class of Math, which is Module, see what I mean?
dmiller has joined #ruby
huoxito has joined #ruby
<shevy> lectrick what for?
icole has quit [Remote host closed the connection]
ddd has quit [Ping timeout: 245 seconds]
<lectrick> if __FILE__==$PROGRAM_NAME; require 'test/unit'; class WtfHappenedToRefinementsTest < Test::Unit::TestCase; def test_refinement; end; end; end # And you're off! Just stick that at the bottom of any Ruby file.
<havenwood> becom33: URI::ABS_URI seems to meet your test case expectations: url =~ URI::ABS_URI
<becom33> havenwood, ABS_URI works fine
<becom33> :D
<havenwood> becom33: :)
<shevy> charlie_ you can use module methods
ndngvr has joined #ruby
<becom33> thanks
<lectrick> shevy: because it validates your code, and when you're first building something out you rip out so much and change so much in a unit of time that it is the only way to validate that your cool-ass refactor didn't break anything
<becom33> hey shevy after a long time man
<shevy> lectrick ok now you argued for a big project here that requires refactoring. what about standalone .rb files?
<shevy> charlie_ for instance: module Test; def self.yes; puts 'this is yes'; end; end; Test.yes # this is yes
jef_abraham has quit [Ping timeout: 248 seconds]
<shevy> hey becom33 still in the wrong part of the world, are you? :-)
<charlie_> shevy: thanks, so is yes a method of the singleton class of the object Test?
<shevy> charlie_ well not sure what you mean with object here
jef_abraham has joined #ruby
jef_abraham has quit [Client Quit]
<shevy> are modules objects? hmm
<charlie_> shevy: yeah modules are objects, instances of the class Module
<shevy> what
<shevy> ohhhh
<lewix> what do you mean by Math::sqrt
<shevy> Module.new works hmmmmm
<havenwood> shevy: I agree with the refactoring argument for tests. When I don't TDD I often seem to go back and add tests just cause I love refactoring and tests save a ton of time. Also, minitest/pride is awesome, all the colors make the code seem win.
<charlie_> shevy: classes are also modules
<shevy> whaaaat... classes are modules?!?!
<charlie_> shevy: ruby's object oriented, so everything is an object
<lewix> whats your point
rocket has joined #ruby
<havenwood> shevy: Class.superclass; #=> Module
<shevy> oh
<havenwood> shevy: Module.class; #=> Class
<shevy> I find that a bit confusing right now :-)
<shevy> the superclass of Class is Module, but Module is also a class... hmmmm
<lewix> calss.ancestors
<lewix> class.ancestors*
adkron__ has joined #ruby
<charlie_> shevy: yeah well this is why i'm confused about where Math.sqrt lives. is is a method in the object Math, or is it a method of the singleton class of Math
<havenwood> shevy: The superclass of a Class is a Module whose class is Class, whose superclass is a Class ad infinitum.
<lewix> it's a method
<shevy> charlie_ I dunno, I never thought of calling Math an object before
<shevy> I was always happy to say that Math is a module and sqrt is a class method (or do you say module method here??? hmmmm)
rupee has quit [Quit: Leaving]
<becom33> shevy, yes I am
<lewix> havenwood: It's a well engineered circle
<shevy> I need beer now, afk ;-)
<becom33> btw dude I goota as . I'm working on a cli app and I was wondering if there is a way I add a code that copies the output coming out from the script into clipboard
<becom33> ask &
<becom33> ask *
<havenwood> lewix: Oops, except I messed up and my last Class should have been Module. Now I need a beer too. >.>
<charlie_> when I do Math.sqrt, i'm calling a method on the object Math, calling a method looks in the class and singleton class of the object. the class of Math is Module, so you can see where i'm confused about how Math.sqrt works, unless sqrt is actually a method on the singleton class of Math
ddd has joined #ruby
<havenwood> lewix: Agreed, hurts my head but seems to really make cool stuff possible.
Quebert has quit [Ping timeout: 248 seconds]
<havenwood> charlie_: Math is a Module and sqrt is a class method.
jdunck has quit [Quit: Computer has gone to sleep.]
tjbiddle has joined #ruby
<lectrick> shevy: ok I ate my own dogfood and added some quick tests to the "roman numerals just for fun" code I just wrote: https://gist.github.com/pmarreck/5104951
<havenwood> charlie_: E.g.: module Math; def self.sqrt end
<lectrick> shevy: That's my "i just need a test that runs only when this file is run by itself" pattern. You can start there and later move it into a suite.
<havenwood> becom33: yeah, you can redirect output to also go to clipboard
<lectrick> shevy: A lot of my Ruby class files have unit tests like that, except once I move the actual test out, I just require it at the bottom. That way whenever I edit a class in Sublime Text 2 I can literally just hit command-B and instantly know if I broke anything
<becom33> havenwood, I was wondering how . I'm still googling for some awnsers
ryanf has quit [Ping timeout: 250 seconds]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<lectrick> shevy: And this has saved my ass countless times. And this is why tests are cool. They're easy, and you're going to be "puts"ing some output anyway to prove your code works to yourself, so it's just 1 hop away from that
bonhoeffer has joined #ruby
jekotia has joined #ruby
<charlie_> havenwood: if methods of modules are class method, then how are methods like puts found? Kernel gets mixed in by Object, but mixing in a module does not mix in the singleton class (where class methods live, is that right?)
Hanmac1 has quit [Ping timeout: 256 seconds]
h4mz1d has joined #ruby
<lectrick> havenwood: I added tests to my gist lol. Just to prove how easy it is
<havenwood> becom33: Do you need to support a variety of platforms or just one OS?
<lectrick> havenwood: (and I should have STARTED with the test, I know)
<havenwood> becom33: Do you want to have `puts` both write to stdout and clipboard?
Ontolog_ has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
tomzx_mac has joined #ruby
<havenwood> lectrick: Yeah..... I don't often do that either. >.<
<becom33> I would love if it supports for linux, win & mac
apok has quit [Quit: apok]
<becom33> havenwood, what do u mean puts before
<becom33> ?
<becom33> oh yea
<becom33> like if there are two string output and only one string is copied to the clipboard . yes
TTilus has quit [Ping timeout: 264 seconds]
daed has quit [Ping timeout: 264 seconds]
TTilus has joined #ruby
daed has joined #ruby
<havenwood> becom33: I'd write a method that takes a block and inside the block does clip/stout printing.
<lewix> charlie_: >> Math.singleton_methods.include?(:sqrt) => true
<becom33> havenwood, ok :D
<havenwood> becom33: Like in OS X, to write a string to clipboard: IO.popen('pbcopy', 'w').puts 'OMGWTFBBQ'
<havenwood> $stdout can be any IO object.
<becom33> okey
<havenwood> becom33: Example of diverting $stdout to dev/null and then restoring: https://gist.github.com/havenwood/5095222
yugui_zzz has quit [Ping timeout: 264 seconds]
Ontolog has quit [Ping timeout: 248 seconds]
<becom33> wait havenwood lemme check that out
hbpoison has joined #ruby
<havenwood> becom33: Writing to STDOUT and IO.popen should do the trick, just need the disto-specific clipboard code.
<charlie_> lewis: ah awesome, so they are singleton methods. thanks very much. now I just don't understand how I can call a method like puts in any object. Kernel is mixed in, but the singleton class of a mixed in module is NOT mixed in as well
neurexairesis24 has joined #ruby
Axsuul has joined #ruby
<lewix> charlie_: Kernel.methods.include?(:puts) => true
<havenwood> becom33: I'd prolly look at Pry's clipit command (or jist gem's).
hashmal has joined #ruby
<lewix> charlie_: puts is an instance method in Kernel
<lectrick> havenwood: just use this stub for all new Ruby class files: http://hastebin.com/junojohaba.rb
<lewix> charlie_: no sorry Im wrong
gyre007 has quit [Ping timeout: 248 seconds]
apeiros_ has joined #ruby
<havenwood> lectrick: For exploratory hacking sometimes i find tests offensive, i know its heresy to some, oh well.
<lewix> charlie_: Kernel.singleton_methods.include?(:puts) => true , banisterfiend: another exception?
sam113101 has quit [Quit: WeeChat 0.3.8]
<havenwood> lectrick: I'd just change it to minitest, but I like it. ;)
NiteRain has joined #ruby
sam113101 has joined #ruby
<lectrick> havenwood: offensive is a strong word lol. Here's what I find... after I write some code I will often "puts" some output to prove it works. A test is just a step from that. I actually think the asserts should be a core part of the language. and havenwood, I usually use minitest but this works out of the box
<charlie_> lewix: that's great thanks but when you include a module (mix it in) you do not get the singleton class (according to http://stackoverflow.com/questions/3848552/why-does-ruby-module-inclusion-exclude-the-modules-singleton-class), so i don't see how i can call puts - the singleton part of Kernel does not get mixed in
neurexairesis24 has quit [Client Quit]
<havenwood> lectrick: shouldn't minitest work out-of-box too?
<lectrick> actually, why AREN'T asserts a core part of Ruby? Aren't they a core part of other languages?
<lectrick> havenwood: we have minitest mapped to test/unit
<havenwood> lectrick: ahhh
Banistergalaxy has quit [Ping timeout: 245 seconds]
<lewix> charlie_: i agree, thats why i wonder if it's a exception again
<lectrick> banisterfiend: Do you know why Ruby doesn't include a handful of asserts as a core part of the language?
<charlie_> lewix: maybe when you define a method on a module it gets defined in both the singleton and the object? that would solve it
sporangiola56 has joined #ruby
<becom33> havenwood, this should copy to the clipboard right ? https://gist.github.com/havenwood/5095222
adkron__ has quit [Ping timeout: 240 seconds]
Banistergalaxy has joined #ruby
<lewix> charlie_: no, try it
<havenwood> becom33: er, no. that sends puts to /dev/null (disappears it)
mercwithamouth has quit [Ping timeout: 248 seconds]
<becom33> awww
<charlie_> lewix: both Kernel.methods.include?(:puts) and Kernel.singleton_methods.include?(:puts) are true
<havenwood> becom33: Just an example of changing $stdout to an IO object and back (line 2, IO in this case is File).
<havenwood> becom33: Sec, i'll do one to OS X clipboard.
<lewix> charlie_: the method 'methods' return both the singleton method and instance methods
<charlie_> lewix: doh
tjbiddle has joined #ruby
Honeycomb has quit [Quit: Leaving.]
Honeycomb has joined #ruby
yugui_zzz has joined #ruby
jborica has joined #ruby
taoru has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
Honeycomb has quit [Client Quit]
<lewix> charlie_: what led you to that
<havenwood> becom33: Okay, this sends puts to the clipboard on OS X: https://gist.github.com/havenwood/5105232
<charlie_> lewix: i'm just trying to figure out how this works, and now I can't solve the problem it's frustrating me and i'd like to resolve it
<charlie_> lewix: there's no particular wider problem that I'm trying to solve
<becom33> aww now I get havenwood
<havenwood> lectrick: Yeah, heh, offensive is harsh. Was just being silly trying to mirror the vitriol that i hear towards non-testers from a few BDD folk..
<havenwood> becom33: Just checked it on OS X, and it indeed copies puts to clipboard.
<havenwood> becom33: So just modify it to puts to both STDOUT and IO.popen and g2g.
cmdr-prmpt has joined #ruby
<lectrick> havenwood: it is wrong to force anyone to do anything. unfortunately, the best way for people to realize what is better is for them to keep trying what is worse for long enough until they realize. unfortunate, because it takes time.
<havenwood> lectrick: aye
alexim has quit [Quit: sleep]
mercwithamouth has joined #ruby
<havenwood> lectrick: And like pajamas, can be awesome but not always perfect for the situation.
apeiros_ has quit [Ping timeout: 245 seconds]
echobinary has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
ffranz has quit [Quit: Leaving]
sporangiola56 has quit [Remote host closed the connection]
trichloronitrome has joined #ruby
hybris has quit [Quit: hybris]
<lectrick> havenwood: LOL, when my gf asked me to get her these kid-like adult pajamas for xmas, I was like, errrr... uhhh... do they have g-string pajamas?
etcetera has joined #ruby
<lewix> charlie_: I know it is
<havenwood> becom33: Avdi's RubyTapas has something just like what you need. He proxies puts output and has really good explanation of modifying $stdout. Can't remember the episodes.
robbyoconnor has joined #ruby
<becom33> ok bro let me check into it
sirish_ has joined #ruby
<havenwood> lectrick: hehe
<lewix> charlie_: I've already accepted it as exception until proved otherwise
sirish has quit [Ping timeout: 256 seconds]
tjbiddle has quit [Quit: tjbiddle]
twoism has joined #ruby
<lectrick> ok i gotta leave ruby and this channel or I will never decompress this evening. off to play Borderlands 2... /afk
pac1 has quit [Ping timeout: 252 seconds]
<charlie_> lewix: I've figured it out: module methods are defined using module_function, http://ruby-doc.org/core-2.0/Module.html#method-i-module_function, so it's not an exception in the vm, it's that the methods go into more places than just either the singleton or the object
<charlie_> lewix: thanks for helping me think it through
v0n has joined #ruby
<XVirus> Why isn't Object#methods(boolean) documented here http://ruby-doc.org/core-1.9.3/Object.html#method-i-methods ?
sayan has joined #ruby
<charlie_> lewix: and it looks like the vm code for that function basically copies the method into both locations...
robbyoconnor has quit [Ping timeout: 248 seconds]
Michae___ has joined #ruby
g0tcha has quit [Ping timeout: 256 seconds]
vagmi has joined #ruby
tealmage has joined #ruby
<lewix> charlie_: what explain that you don't see it as a method in Object then?
tealmage has quit [Read error: Connection reset by peer]
<lewix> charlie_: i believe it has something to do with private* methods.
tealmage has joined #ruby
drale2k has quit [Quit: Leaving...]
ryanf has joined #ruby
drale2k has joined #ruby
jerius has quit []
jbueza has quit [Quit: Leaving.]
<lewix> charlie_: and I'm right
<lewix> charlie_: Object.private_methods.include?(:puts) => true
<charlie_> lewix: yeah, it also sets some properties on it
<charlie_> lewix: wow, it's certainly a hell of a lot more complicated than method Foo; def self.foo; end; end
sam113101 has quit [Quit: WeeChat 0.3.8]
yacks has joined #ruby
sam113101 has joined #ruby
<lewix> charlie_: actually now it makes sense. the fact that it's private
DaltonUS has joined #ruby
DaltonUS has quit [Client Quit]
<lewix> charlie_: It seems we have both the singleton and the private instance methods define in Kernel, which explain it
<lewix> defined*
gyre007 has joined #ruby
Rioji has quit [Remote host closed the connection]
Emplitz has joined #ruby
<lewix> charlie_: Object.puts "lewis" doesn't work for a reason
twoism has quit [Read error: Connection reset by peer]
danman has quit [Quit: danman]
ryanf has quit [Ping timeout: 255 seconds]
twoism_ has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
<charlie_> lewix: i couldn't see this because the docs don't say what imperative actions, such as module_method, have been run after the methods have been defined, so you have no way of knowing that stuff without reading the source code
twoism_ has quit [Remote host closed the connection]
squidBits has quit [Quit: whoops]
<lewix> charlie_: knowing what?
jjbohn has joined #ruby
twoism_ has joined #ruby
<lewix> charlie_: I didn't read the source code, it's all deduction. take what I say with a grain of salt, but so far it seems reasonable to me
cmdr-prmpt has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
DrShoggoth has joined #ruby
<charlie_> lewix: the docs don't say that module_function has been applied to puts, but if you look at the C code, you can see that it has
<lewix> charlie_: ok
<charlie_> lewix: this has solved my problem anyway, so i'm happy
<lewix> charlie_: thanks. I learned in the process
charlie_ has quit [Quit: Page closed]
Michae___ has quit [Remote host closed the connection]
admitted_limited has quit [Quit: admitted_limited]
joofsh has quit [Remote host closed the connection]
pen has joined #ruby
cmdr-prmpt has joined #ruby
Kichael has joined #ruby
XVirus has quit [Ping timeout: 256 seconds]
carlyle has joined #ruby
huoxito has quit [Ping timeout: 248 seconds]
Michae___ has joined #ruby
XVirus has joined #ruby
jjbohn has quit [Quit: Leaving...]
unlimiter has quit [Quit: unlimiter]
dmiller has quit [Ping timeout: 256 seconds]
SegFaultAX has quit [Ping timeout: 240 seconds]
chendo_ is now known as chendo
tish has quit [Quit: Leaving.]
nfk has joined #ruby
_maes_ has joined #ruby
joofsh has joined #ruby
neurone-1337 has quit [Ping timeout: 240 seconds]
mibitzi has quit [Ping timeout: 245 seconds]
admitted_limited has joined #ruby
SegFaultAX has joined #ruby
marwinism has quit [Ping timeout: 272 seconds]
io_syl has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
bricker`LA has joined #ruby
froy has quit [Ping timeout: 255 seconds]
twoism has joined #ruby
ryanf has joined #ruby
twoism has quit [Remote host closed the connection]
gothicsouth has joined #ruby
neurone-1337 has joined #ruby
dmiller has joined #ruby
becom33 has quit [Ping timeout: 248 seconds]
twoism_ has quit [Ping timeout: 276 seconds]
marwinism has joined #ruby
huoxito has joined #ruby
averiso has joined #ruby
vagmi has quit [Quit: vagmi]
mritr_ has joined #ruby
hbpoison has quit [Ping timeout: 245 seconds]
kofno has quit [Remote host closed the connection]
vagmi has joined #ruby
joofsh has quit [Remote host closed the connection]
mattbl has quit [Quit: This computer has gone to sleep]
kofno has joined #ruby
mattbl has joined #ruby
admitted_limited has quit [Quit: admitted_limited]
dougireton has joined #ruby
rakl has joined #ruby
tealmage has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 276 seconds]
kofno has quit [Ping timeout: 248 seconds]
XVirus has quit [Quit: I was somebody who, is no business of yours ...]
admitted_limited has joined #ruby
browndawg has joined #ruby
JohnBat26 has joined #ruby
postmodern has quit [Quit: Leaving]
Honeycomb has joined #ruby
uris has quit [Quit: Leaving]
postmodern has joined #ruby
kofno has joined #ruby
becom33 has joined #ruby
becom33 has quit [Changing host]
becom33 has joined #ruby
echobin25 has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
gyre007 has quit [Remote host closed the connection]
sam113101 has quit [Quit: WeeChat 0.3.8]
ebobby has quit [Quit: leaving]
mritr_ has quit [Ping timeout: 240 seconds]
kofno has quit [Remote host closed the connection]
postmodern has quit [Remote host closed the connection]
admitted_limited has quit [Quit: admitted_limited]
_br_ has quit [Read error: Operation timed out]
apeiros_ has joined #ruby
KRF has quit [Read error: Operation timed out]
philcrissman has joined #ruby
Pandaen has quit [Remote host closed the connection]
Bry8Star has joined #ruby
heidar has quit [Ping timeout: 248 seconds]
eval-in has quit [Ping timeout: 245 seconds]
Ontolog_ has quit [Remote host closed the connection]
R_Macy has quit [Quit: Computer has gone to sleep.]
end_guy has quit [Ping timeout: 276 seconds]
Bracki has quit [Ping timeout: 276 seconds]
ohcibi has quit [Ping timeout: 246 seconds]
ccooke has quit [Ping timeout: 276 seconds]
Bry8Star_ has quit [Ping timeout: 276 seconds]
verysoftoiletppr has quit []
faoiseamh has quit []
end_guy has joined #ruby
sirish_ has quit [Ping timeout: 248 seconds]
IceDragon has quit [Quit: Space~~~]
cantonic has quit [Quit: cantonic]
postmodern has joined #ruby
philcrissman has quit [Remote host closed the connection]
joeycarmello has joined #ruby
a_a_g has joined #ruby
cmdr-prmpt has quit [Quit: Done-zo]
DrShoggoth has quit [Ping timeout: 256 seconds]
g0tcha has joined #ruby
generalissimo has joined #ruby
averiso has quit [Ping timeout: 240 seconds]
gabrielrotbart has quit [Read error: Connection reset by peer]
ilyam has joined #ruby
cantonic has joined #ruby
sam113101 has joined #ruby
browndawg has quit [Quit: Leaving.]
pavilionXP has joined #ruby
apeiros_ has quit [Ping timeout: 248 seconds]
sam113101 has quit [Client Quit]
KRF has joined #ruby
ohcibi has joined #ruby
Takehiro has joined #ruby
Takehiro has quit [Remote host closed the connection]
_br_ has joined #ruby
UberNerdGirl has joined #ruby
mritr_ has joined #ruby
jurassic has quit [Quit: jurassic]
ccooke has joined #ruby
eval-in has joined #ruby
Bracki has joined #ruby
reset has quit [Ping timeout: 245 seconds]
sam113101 has joined #ruby
mockra has joined #ruby
heidar has joined #ruby
_br_ has quit [Excess Flood]
gabrielrotbart has joined #ruby
ryanf has joined #ruby
rcj_ has quit [Ping timeout: 264 seconds]
MrZYX|off has quit [Ping timeout: 260 seconds]
Sigma00 has quit [Ping timeout: 245 seconds]
newUser1234 has quit [Remote host closed the connection]
sam113101 has quit [Client Quit]
newUser1234 has joined #ruby
telling has quit [Ping timeout: 245 seconds]
sam113101 has joined #ruby
hashmal has quit [Quit: Textual IRC Client: www.textualapp.com]
_br_ has joined #ruby
dougireton has quit [Quit: Leaving.]
Takehiro has joined #ruby
jurassic has joined #ruby
_br_ has quit [Excess Flood]
wormwood has joined #ruby
_br_ has joined #ruby
newUser1234 has quit [Ping timeout: 248 seconds]
icole has joined #ruby
twoism has joined #ruby
ryanf has quit [Ping timeout: 245 seconds]
sam113101 has quit [Quit: WeeChat 0.3.8]
sam113101 has joined #ruby
DrShoggoth has joined #ruby
freakazoid0223 has quit [Ping timeout: 272 seconds]
Gu_______ has joined #ruby
Gu_______ is now known as hashmal
_br_ has quit [Excess Flood]
etcetera has quit []
dougireton has joined #ruby
Michae___ has quit [Remote host closed the connection]
twoism has quit [Read error: Connection reset by peer]
twoism has joined #ruby
rocket has quit [Ping timeout: 248 seconds]
MrZYX|off has joined #ruby
Sigma00 has joined #ruby
MrZYX|off is now known as MrZYX
rcj_ has joined #ruby
etcetera has joined #ruby
_br_ has joined #ruby
_br_ has quit [Excess Flood]
telling has joined #ruby
_br_ has joined #ruby
<UberNerdGirl> hai room… o/
<UberNerdGirl> so quiet in here...
<sam113101> hi
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
* UberNerdGirl watches the wind rustling through the trees
* UberNerdGirl shivers
<UberNerdGirl> hai!
rocket has joined #ruby
phantasm66 has quit [Client Quit]
robbyoconnor has joined #ruby
<havenwood> hi
DrShoggoth has quit [Ping timeout: 276 seconds]
etcetera has quit []
<Boohbah> iya
apeiros_ has joined #ruby
_br_ has quit [Excess Flood]
<UberNerdGirl> hi havenwood ! :)
Domon has quit [Remote host closed the connection]
<UberNerdGirl> anyone doing some Ruby coding at the moment/
clooth has quit [Quit: clooth]
<UberNerdGirl> ?
<Boohbah> not atm
<UberNerdGirl> I just came home from Hacker School (htto://hackerschool.com) and I am lounging on the bed fiddling with Euler
<hemanth> meow
<Es0teric> :o a nerd girl?
<Es0teric> thats intresting
<havenwood> UberNerdGirl: Yup... ha. Playing around with puts and clipboard: https://gist.github.com/havenwood/5105232
<hemanth> RomyonRuby "D
<UberNerdGirl> hemanth: wow
<hemanth> UberNerdGirl, ;)
_br_ has joined #ruby
<UberNerdGirl> hemanth: are you from Hacker School?
<Es0teric> UberNerdGirl where in NY is the hackerschool at?
<UberNerdGirl> havenwood: I must say your handle/username is so soothing to look at
h4mz1d has quit [Ping timeout: 276 seconds]
<hemanth> UberNerdGirl, yes
<UberNerdGirl> Es0teric: it is in downtown NY
<havenwood> UberNerdGirl: I like Project Euler! Haven't done one in a while, get my 25 badge with one more. :) Never took math after high school so I have to look em up a lot!
<sam113101> what about mine?
<hemanth> UberNerdGirl, i'm in there team, but not in ny
<UberNerdGirl> sam113101: sorry yours is … (voice lowers to a whisper) … (drumroll)… generic!!! :O
<Es0teric> wow how did i not know about hackerschool and i've been living in NYC for awhile
<Es0teric> i feel... deprived
<sam113101> fits my personality
<sam113101> I'm just a man
<UberNerdGirl> hemanth: orly? i iz confuzzled. do we know each other in person?
<sam113101> a generic guy
<UberNerdGirl> uh oh
<havenwood> Look up the definitions of math terms i mean, not the answers. >.>
<UberNerdGirl> that's a tragedy
<UberNerdGirl> havenwood: what did you study in college, if i may ask?
<hemanth> UberNerdGirl, yes kina, check that out http://nyhacker.org/~hemanth.hm/hacks/l33t.html
<UberNerdGirl> Es0teric: hacker school is where my WILDEST UNBRIDLED programming fantasies come true!!!!!!!!!
<havenwood> UberNerdGirl: Philosophy in undergrad then law school.
<UberNerdGirl> havenwood: holy hell
_br_ has quit [Excess Flood]
<UberNerdGirl> english && philosophy here
<UberNerdGirl> i got accepted to law school
<havenwood> UberNerdGirl: I applied to Hack School and was accepted, but I'm doing contracting and I couldn't get away. :(
gabrielrotbart has quit [Remote host closed the connection]
<UberNerdGirl> attended orientation, hacked on a website during a lecture, and asked myself, "what the F*** am i doing here"
<UberNerdGirl> havenwood: OMG
jpfuentes2 has joined #ruby
<UberNerdGirl> havenwood: that means we could have MET!!!!!!!!
<UberNerdGirl> havenwood: and I would be following you around innocuously!!! :D
<Es0teric> lol
<Es0teric> who knew?
<havenwood> Hehe, yup prolly!
pseudonymous has joined #ruby
<hemanth> UberNerdGirl, if intrested in those you better checkout http://www.hackerunion.org/
<Es0teric> girl programmers are pretty cool... very hard to come by them though
Honeycomb has quit [Quit: Leaving.]
<UberNerdGirl> hemanth: i visited your flickr
<Es0teric> very rare
<UberNerdGirl> Es0teric: that makes me depressed
<UberNerdGirl> i wish i had more girl friends
_br_ has joined #ruby
<hemanth> UberNerdGirl, heh heh ok, checkout my site as well...
<UberNerdGirl> i am so obsessed with programming i am so seriously confused as to why more girls are not ecstatically flocking to such lush pastures of paradise
<Es0teric> lol well UberNerdGirl it happens... i mean i have a friend that has her CCNA and Linux admin cert
<Es0teric> which is wierd, because i have never seen a girl have that
<UberNerdGirl> hemanth: i saw your flickr pic and you look familiar! did we meet through LispNYC?
<UberNerdGirl> I loooove Lisp
<havenwood> UberNerdGirl: My little sis applied, would have been there too...! But she didn't get in, she'd just started programming and they told her to keep studying and reapply.
<UberNerdGirl> Scheme and Racket are my favorites. Here in New York, hackers love playing with Clojure
pdamer has quit [Quit: pdamer]
<UberNerdGirl> havenwood: so you had the video interviews? with whom did you interview?
<hemanth> UberNerdGirl, nope
rburton- has joined #ruby
<UberNerdGirl> i'll have to talk to the co-founders tomorrow saying we crossed paths and you helped me earlier on IRC. They would wear a huge grin on their face :)
<hemanth> UberNerdGirl, you can make friend like you here -> http://www.girlswhocode.com/
<havenwood> UberNerdGirl: Yeah, I'm terrible with names though, let me look and see who it was.
<UberNerdGirl> hemanth: actually, I am the most UBER NERDY girl I know, and I am so lucky b/c I am in Hacker School surrounded by very exciting, fun, cute, charming, silly, intelligent, girls
R_Macy has joined #ruby
banjara has joined #ruby
Banistergalaxy has quit [Ping timeout: 250 seconds]
mattbl has quit [Quit: This computer has gone to sleep]
<hemanth> UberNerdGirl, good for you.
<Es0teric> lol
Banistergalaxy has joined #ruby
<UberNerdGirl> yes, i am extremely puzzled as to why more people aren't wildly neurotically obsessed with programming
_br_ has quit [Excess Flood]
* hemanth poke Es0teric
<Es0teric> sup, hemanth
<UberNerdGirl> i did web design / graphic design / light front-end web development for 10+ years
<UberNerdGirl> then 1.5 years ago
<Es0teric> UberNerdGirl some people find it intimidating
<havenwood> UberNerdGirl: Allison and David
echobin25 has quit [Remote host closed the connection]
<UberNerdGirl> I discovered Ruby, functional programming, Lisp.
<UberNerdGirl> I felt I had died and gone to heaven
<hemanth> Es0teric, nothing new, just pawing at some Ruby2.0
<Es0teric> UberNerdGirl last month i discovered ruby... made the switch from PHP
<UberNerdGirl> Now all my unbridled nerdy fantasies are slowly coming true
<UberNerdGirl> havenwood: David is criminally adorable
<Es0teric> hemanth yeah whats new in ruby 2.0 anyway?
<UberNerdGirl> He wears a red little winter cap and he looks like a charming lawn gnome
<UberNerdGirl> it kills me every time i see it
<UberNerdGirl> so awesome
apeiros_ has quit [Ping timeout: 256 seconds]
<UberNerdGirl> and he gives such encouraging, empowering, inspiring speeches to us at Hacker School :D :D
chendo has quit [Ping timeout: 240 seconds]
<hemanth> Es0teric, many things! I liked to_h ....read more http://h3manth.com/content/to_h-ruby-2.0
<UberNerdGirl> hemanth: what other languages do you like?
mattbl has joined #ruby
sandGorgon has joined #ruby
<Es0teric> whattttt to_h
<Es0teric> is nice
<UberNerdGirl> oh that's exciting
<UberNerdGirl> some hash mischief!!!!!!!!!
<hemanth> UberNerdGirl, python, ruby, javascript, node.js, perl ....
<havenwood> Es0teric: Good TL;DR list here (and links): http://www.ruby-lang.org/en/news/2013/02/24/ruby-2-0-0-p0-is-released/#label-2
<hemanth> Es0teric, read https://github.com/marcandre/ruby/blob/news/NEWS.rdoc for all the new features
ryanf has joined #ruby
danman has joined #ruby
_br_ has joined #ruby
chendo_ has joined #ruby
<hemanth> UberNerdGirl, Es0teric you must get into writing gems for ruby, https://rubygems.org/profiles/hemanth are some silly gems i wrote
<UberNerdGirl> oh i like these gems!
<Es0teric> yeah, i'll get into that soon
<shevy> UberNerdGirl programming can be boring
_br_ has quit [Excess Flood]
<UberNerdGirl> they sound great!
twoism has quit [Remote host closed the connection]
_br_ has joined #ruby
FuzaiDesktop has joined #ruby
<hemanth> shevy, :D
<UberNerdGirl> shevy: well not unless you choose the exciting ones
<hemanth> UberNerdGirl, shevy is a good programmer! [ he is alluding something else here :D]
<shevy> well
<shevy> take fixing bugs for instance
<Es0teric> hemanth i am mostly doing work with rails now
<Es0teric> but i'll probably get into rubyMotion
<UberNerdGirl> hemanth: oh i know he is an excellent programmer
<shevy> I've only found that specific part to be boring and a waste of time :(
<FuzaiDesktop> return = ["1","2","3","4","5"].shift normally equals 1. Is there a way to shift and return the rest of the array instead?
<UberNerdGirl> in fact, i remember when i discovered ruby 1.5 years ago i went on irc and asked some basic questions
<hemanth> Es0teric, kool
<UberNerdGirl> shevy: answered tsome of them
<hemanth> UberNerdGirl, heh heh ok
<UberNerdGirl> i never forgot his name because i think his name === chevy cars
<UberNerdGirl> lolz
<hemanth> FuzaiDesktop, did you read the docs?
<shevy> UberNerdGirl yeah but that's when things work, when they can be creative etc... etc..
<FuzaiDesktop> yes thats why i came and asked
* hemanth drove my shevy to the levy, but the levy was dry
<UberNerdGirl> LMAO
<hemanth> *chevy ;}
<UberNerdGirl> FuzaiDesktop: you can write your own
<UberNerdGirl> i sometimes feel mischievous
freeayu has quit [Ping timeout: 245 seconds]
<UberNerdGirl> and hack the classes
<UberNerdGirl> class Array
vlad_starkov has quit [Remote host closed the connection]
<UberNerdGirl> def first
<UberNerdGirl> self[0]
<shevy> FuzaiDesktop array = ["1","2","3","4","5"]
<UberNerdGirl> def cdr
<shevy> array.pop array.size-1 # => ["2", "3", "4", "5"]
<shevy> array # => ["1"]
Gwyxx has joined #ruby
<FuzaiDesktop> interesting
danman has quit [Quit: danman]
<havenwood> FuzaiDesktop: array[1..-1]
<UberNerdGirl> array[1..-1]
<UberNerdGirl> end
v0n has quit [Ping timeout: 264 seconds]
<UberNerdGirl> cdr as in
<shevy> hemanth yeah, everyone makes fun of that nick, but it has nothing to do with a chevy, yet still everyone associates it with a car :(
<UberNerdGirl> 'contents of the decrement part of the register'
<UberNerdGirl> which is a nerdy Lisp, fabulous dreamy way of saying the rest of the list :D
<Es0teric> well i will be getting back to coding in rails
<shevy> and neither with chevy chase, just to clear that up in advance...
<shevy> Es0teric nooo man stay with us!!!
<Es0teric> o.O
<shevy> :(
_br_ has quit [Excess Flood]
<shevy> rails the programming language
<shevy> no more need for ruby
<Es0teric> well i am making a web app
<Es0teric> so i need rails
<UberNerdGirl> Es0teric: no rails!
<UberNerdGirl> do not turn to the dark side!
<shevy> hehe
girija has joined #ruby
<hemanth> shevy, :)
<UberNerdGirl> shevy: is right! stay with us!
<UberNerdGirl> maintain purity!
<Es0teric> LOL
<UberNerdGirl> don't sell your soul!
* UberNerdGirl is a hypocrite, as she is studying rails at hacker school
<shevy> !!!
<Es0teric> HA
apok has joined #ruby
<Es0teric> you're in the deeper darkside than i am UberNerdGirl :P
<Es0teric> can we say... iiiiiiiiiiirony?
<Es0teric> lol
<hemanth> May the force be with you!
<UberNerdGirl> UberNerdGirl: well...
<Es0teric> these are not the gems you are looking for...
<UberNerdGirl> my roots are in Ruby and Scheme
<shevy> the ruby force
<UberNerdGirl> so the roots are pure
zenguy_pc has quit [Quit: Leaving]
<shevy> ack
<shevy> (scheme(
<Es0teric> no but seriously, i have to get back to this
<Es0teric> catch you guys later
<UberNerdGirl> (def love scheme)
<shevy> (the(roots(are(pure
<UberNerdGirl> hasta la vista mamacita
<Es0teric> que fue?
<shevy> mi gato es un perro
<havenwood> FuzaiDesktop: Another option that I think I like better :P: array.tap &:shift
<havenwood> tap 'n shift
<shevy> yay finally ... array.tapdance!
<shevy> tap 'n dance
_br_ has joined #ruby
hogeo has quit [Remote host closed the connection]
<hemanth> mi perro es un gato
<UberNerdGirl> havenwood: awww i wish you came to hacker school :)
<shevy> he is too old for it
<havenwood> UberNerdGirl: Me too..!!
icole has quit [Remote host closed the connection]
<UberNerdGirl> array.jiggle!
<UberNerdGirl> array.hiccup!
gyre007 has joined #ruby
<UberNerdGirl> array.snooze!
<UberNerdGirl> :D
icole has joined #ruby
<hemanth> array.laugh!
_br_ has quit [Excess Flood]
<havenwood> FuzaiDesktop: [1, 2, 3].tap &:shift; #=> [2, 3]
_br_ has joined #ruby
<hemanth> >> [1, 2, 3].tap &:shift;
<eval-in> hemanth => [2, 3] (http://eval.in/12077)
Amnesthesia has joined #ruby
<FuzaiDesktop> hmmmm
Amnesthesia has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 255 seconds]
<shevy> the & is really weird
<FuzaiDesktop> that looks more like what i'm trying to do
<UberNerdGirl> wow that looks awesome
<UberNerdGirl> .tap &:shift
<UberNerdGirl> lmao
<UberNerdGirl> i loves it
<havenwood> FuzaiDesktop: #tap can be handy, and to_proc is always fun :P
<hemanth> shevy, yes & is weird
<FuzaiDesktop> how do i use that inside a hash?
hogeo has joined #ruby
tish has joined #ruby
<UberNerdGirl> oh i have an array question to. say I have defined an integer.prime? which returns 'true' or 'false' depending on whether the number is prime
<UberNerdGirl> if I have a range upwards to infinity, like
<FuzaiDesktop> hash = { "sayings" => JSON.parse(`cat file`) } and i seem get the name of the file on the front of the return
<UberNerdGirl> 2.upto(1/0.0)
banjara has quit [Quit: Leaving.]
<UberNerdGirl> or, as my favorite Rubyist Spooner would write 2.upto(Float::INFINITY)
banjara has joined #ruby
<havenwood> Float::INFINITY
<FuzaiDesktop> nm i think i see whats going on
<havenwood> haha, was gunna say
<UberNerdGirl> havenwood: when i first saw that
<UberNerdGirl> i exclaimed
<UberNerdGirl> OH YES, I would like to float to infinity!
<UberNerdGirl> upon the cottony pillows of clouds! :D
<shevy> man
<shevy> that's some enthusiasm there
<UberNerdGirl> anyways if I have a range upwards to infinity like 2.upto(infinity).bring_me_the_first(10) { |x| x.prime? }
<UberNerdGirl> how do i do that?
<UberNerdGirl> shevy: you should see me in person. I jump up and down
cflux has quit []
gyre007 has quit [Ping timeout: 252 seconds]
<UberNerdGirl> my question is worded in a ghastly way, sorry
browndawg has joined #ruby
<shevy> it would scare me too much, I am more like a hermit in a cave with a computer
browndawg has quit [Max SendQ exceeded]
<UberNerdGirl> how do I take the first instances in which the .prime? was true?
_br_ has quit [Excess Flood]
<UberNerdGirl> so basically, the first 10 prime numbers in the range I pass it in ( 2 up to infinity )
<UberNerdGirl> i looked at take_while, and step
pyx has joined #ruby
<UberNerdGirl> and i couldn't make sense of it :(
<UberNerdGirl> that and i am sleepy
mahmoudimus has joined #ruby
browndawg has joined #ruby
banjara has quit [Client Quit]
<shevy> only chuck norris can count to infinity without falling asleep
<shevy> he did so even twice
banjara has joined #ruby
<UberNerdGirl> shevy: quit watching adventure movies and answer my question
banjara has quit [Client Quit]
stopbit has quit [Quit: Leaving]
<UberNerdGirl> ;)
banjara has joined #ruby
<shevy> well I am not sure about that prime method
banjara has quit [Client Quit]
pyro111 has joined #ruby
banjara has joined #ruby
<UberNerdGirl> shevy: oh i said, assuming I have already created it
<havenwood> 2.upto(∞).slice(10) would be groups of 10.
<UberNerdGirl> i wrote my own prime boolean that tells me whether a number is prime
<shevy> oh slicing
girija has quit [Ping timeout: 248 seconds]
<UberNerdGirl> so 2.upto( wow! how did you make that symbol? ).slice(10) would return the first group of 10?
mpfundstein has joined #ruby
<sam113101> >not using the prime lib
dougireton has quit [Quit: Leaving.]
_br_ has joined #ruby
<havenwood> UberNerdGirl: On OS X, ∞ is option-5
banjara has quit [Client Quit]
<shevy> UberNerdGirl don't you just return an array here anyway?
banjara has joined #ruby
<havenwood> UberNerdGirl: I like to do: ∞ = Float::INFINITY
<shevy> (2..50).select {|x| x > 33 }[0,3] # => [34, 35, 36]
<UberNerdGirl> here are some cyber sunglasses for free! ∞
freeayu has joined #ruby
banjara has quit [Client Quit]
_br_ has quit [Excess Flood]
sandGorgon has quit [Quit: Leaving]
banjara has joined #ruby
sandGorgon has joined #ruby
<lushious> UberNerdGirl: you pinged me earlier?
<UberNerdGirl> UberNerdGirl: oh I did????
<sam113101> for my tiny eyes ;_;
<UberNerdGirl> :O
<lushious> "lush pastures of paradise"
<lushious> here I am, baby
<UberNerdGirl> LMAO
<havenwood> 2.upto(∞).slice(10).first; #=> [2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
<UberNerdGirl> the lush pastures of paradise == lush landscapes of functional programming & beautiful object orientation
<lushious> I know, 'twas a joke ;)
dougireton has joined #ruby
<shevy> ok now combine this with primes!!!
r4um has quit [Read error: Connection reset by peer]
<shevy> wow
<shevy> is there Math.primes?
maycon_ has joined #ruby
<UberNerdGirl> hmmm havenwood i got an error when i tried running that
<UberNerdGirl> [200] pry(main)> INF = 1/ 0.0
<UberNerdGirl> => Infinity
<UberNerdGirl> [201] pry(main)> 2.upto(INF).slice(10).first
<UberNerdGirl> NoMethodError: undefined method `slice' for #<Enumerator: 2:upto(Infinity)>
<shevy> hey
<UberNerdGirl> shevy: here's my prime thingamajig!!!
<shevy> is 1 / 0.0 really infinity?
<havenwood> UberNerdGirl: Ooops, my mistake. #each_slice not #slice
<UberNerdGirl> crap!
<UberNerdGirl> i only meant to show the bottom left quadrant!
<UberNerdGirl> now my whole personal life is on display for the internet!
DrCode has quit [Remote host closed the connection]
<UberNerdGirl> too bad DrCode let the chatroom. i think that's an exciting name
<shevy> that's ok
<UberNerdGirl> havenwood: great it works now :)
<shevy> in 10.000 years noone will remember :(
<aedornm> shevy: I'll remember.
lorn has quit [Quit: ZNC - http://znc.sourceforge.net]
_br_ has joined #ruby
tomzx_mac has quit [Read error: Operation timed out]
DrCode has joined #ruby
_br_ has quit [Excess Flood]
lorn has joined #ruby
<UberNerdGirl> shevy: shucks.
maycon has quit [Ping timeout: 248 seconds]
elico has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
ocnam has joined #ruby
jurassic has quit [Quit: jurassic]
<havenwood> shevy: I just cheat and: require 'mathn'; Prime.each and Prime.prime? :P
<UberNerdGirl> havenwood: ooooh but i get such pleasure crafting them with my bare handsies
<shevy> havenwood ah that is cool
<aedornm> hmmm lower = (self/2).floor .. self >> 1
DrCode has quit [Remote host closed the connection]
<shevy> UberNerdGirl that's the enthusiasm of youth, the old ones become lazy
<UberNerdGirl> shevy: i am slowly becoming a mummified fossil
<UberNerdGirl> i will leave my 20's very soon
<UberNerdGirl> :(
<havenwood> UberNerdGirl: Yeah, I had fun doing it myself on ones that weren't too slow. I didn't actually implement sieves of eratosthenes, but.. that would actually be a fun challenge.
<UberNerdGirl> havenwood: how exciting!!
* lushious pastures
<UberNerdGirl> i was gazing at sieves of eratosthenes like 14 ago!!!!
<UberNerdGirl> i loved it!
<UberNerdGirl> so many different sieves and tricks with primes! :D
<UberNerdGirl> 14 mos
DrCode has joined #ruby
apeiros_ has joined #ruby
_br_ has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
DrCode has quit [Remote host closed the connection]
heyitsdave has quit [Ping timeout: 276 seconds]
elico has quit [Quit: elico]
DrCode has joined #ruby
girija has joined #ruby
sepp2k has joined #ruby
<lewix> 20:56 UberNerdGirl: yes, i am extremely puzzled as to why more people aren't wildly neurotically obsessed with programming : lol
<UberNerdGirl> lewix: so what?
<UberNerdGirl> i want to tattoo the metacircular evaluator in Scheme on my back
lorn has quit [Quit: ZNC - http://znc.sourceforge.net]
apeiros_ has quit [Ping timeout: 248 seconds]
<UberNerdGirl> or a Lisp quine on the back of my neck
<havenwood> lewix: Why doesn't everyone code?
<aedornm> havenwood: because someone needs to serve me fries
R_Macy has quit [Quit: Computer has gone to sleep.]
<lewix> UberNerdGirl: it's just hilarious
<UberNerdGirl> :D :D
<UberNerdGirl> i am more hilarious in person
<aedornm> It just won't be the same when fry serving is automated.
cyong has joined #ruby
<lewix> UberNerdGirl: how long have you been coding
lorn has joined #ruby
<havenwood> UberNerdGirl: I think this is the most epic quine: http://mamememo.blogspot.com/2010/09/qlobe.html
<UberNerdGirl> i discovered it 1.5 years ago but coding seriously for a few months
banjara has quit [Quit: Leaving.]
divout has joined #ruby
_br_ has quit [Excess Flood]
<havenwood> UberNerdGirl: The quine rotates when run. :O
banjara has joined #ruby
takeru_ has joined #ruby
* UberNerdGirl faints with love
ryanf has joined #ruby
<lewix> loooool
<lewix> you remind me of that show
banjara has quit [Client Quit]
banjara has joined #ruby
banjara has quit [Client Quit]
Mattix has quit [Ping timeout: 255 seconds]
banjara has joined #ruby
* lewix laughs out loud
rocket has quit [Ping timeout: 248 seconds]
<UberNerdGirl> lewix: what show!!!!
<UberNerdGirl> tell me!
<UberNerdGirl> my friends and i have Nerd Showdowns
mattbl has quit [Quit: This computer has gone to sleep]
<lewix> UberNerdGirl: big bang, I thought it was obvious
<UberNerdGirl> yay!
<UberNerdGirl> i love that show!
<UberNerdGirl> those nerds are so cute!
<lewix> lol
<UberNerdGirl> i even have a picture of me HACKING LISP on the new york subway!!!
* lewix believes there's many degrees of nerdness in this world
<hemanth> lewix, is Penny here? :D
_br_- has joined #ruby
<lewix> I'm level 0
<lewix> hemanth: penny? I don't remember names
takeru_ has quit [Ping timeout: 260 seconds]
_br_- has quit [Excess Flood]
<hemanth> lewix, big bang, I thought it was obvious!
Domon has joined #ruby
pen has quit [Remote host closed the connection]
<hemanth> ;)
<lewix> UberNerdGirl: so you've just started to learn programming
<lewix> hemanth: lol
<UberNerdGirl> yep
<UberNerdGirl> lewix: how long have you been coding?
<lewix> UberNerdGirl: I discovered it when I was ten, played around with the syntax of a few languages and took it seriously recently myself.
sayan has quit [Quit: Leaving]
_br_ has joined #ruby
<lewix> UberNerdGirl: I was pretty into it back then until I discovered girls, it slowed me down for a while
<UberNerdGirl> boring boring boring
<hemanth> :D
<lewix> haha
<UberNerdGirl> people who get distracted by boys/girls are so boring to me
mattbl has joined #ruby
<havenwood> Wow, i guess i've been coding for 2 and a half years. Doesn't seem that its been that long.
<UberNerdGirl> i never got distracted by boys
<havenwood> Had to look at Github join date to remember. Heh.
t-mart has joined #ruby
<aedornm> you people make me feel old.
<UberNerdGirl> wat
<lewix> havenwood: UberNerdGirl: if you /nick info lewix you'll see how long I've been on IRC playing with different languages
havenwood is now known as info
<lewix> But i ended up 'mastering' none
Michae___ has joined #ruby
info is now known as havenwood
<lewix> havenwood: lol /nickserv info*
_br_ has quit [Excess Flood]
<havenwood> :P
<UberNerdGirl> awwww
<aedornm> I've been programming for 30 years. Hence you people make me feel old.
<UberNerdGirl> havenwood: did you get into the current batch?
<lewix> UberNerdGirl: havenwood : aedornm : how old are you
<UberNerdGirl> aedorn: the guy I have a crush on has been programming for about that length of time too
_br_ has joined #ruby
<hemanth> aedorn, kool, what is the one thing you regret for not doing it 30 years ago?
<lewix> aedornm: what languages
hbpoison has joined #ruby
<lewix> UberNerdGirl: so you do get distracted..
Jalada has quit [Read error: Operation timed out]
<UberNerdGirl> nope
<UberNerdGirl> he helps me code
<UberNerdGirl> he helps me with a lot of Lisp
<UberNerdGirl> in fact, he *wrote* dialects of Lisp
<havenwood> UberNerdGirl: Hrm, I interviewed in Sept. I guess that'd be this one or?
<lewix> sounds nice
<lewix> nobody answered the age question
<aedornm> hemanth: Regret? There's no time for that!
* lewix smiles
artofraw has joined #ruby
<UberNerdGirl> awww
<hemanth> aedorn, wow! ok
<lewix> aedornm: agreed!
<UberNerdGirl> havenwood: that was the previous batch
<havenwood> UberNerdGirl: ahh, kk
<UberNerdGirl> lewix: who gives a crap, grow up
<havenwood> UberNerdGirl: Yeah, they said if my sched cleared i could come to the current one then, but it didn't.
<UberNerdGirl> you're making this sound like the 90's
<havenwood> UberNerdGirl: I still wanna go though.
<UberNerdGirl> a/s/l ?
<UberNerdGirl> places
<UberNerdGirl> havenwood: you should, people change in profound ways
carlyle has quit [Remote host closed the connection]
Michae___ has quit [Ping timeout: 250 seconds]
<lewix> I can't stand disrespectful people
<havenwood> lewix: just turned 34
ryanf has quit [Ping timeout: 276 seconds]
rippa has joined #ruby
<lewix> havenwood: I see.
tish has quit [Quit: Leaving.]
<aedornm> lewix: I started with a TRS-80 doing machine code, and followed the "natural" progression of BASIC, 8086/8088 assembly, C, C++, and everything else.
* hemanth is more intrested in what aedorn and havenwood are doing, rather than how old they are ....
<havenwood> UberNerdGirl: I'd love to get exposed to people who code in different languages that immersively.
_br_ has quit [Excess Flood]
* UberNerdGirl agrees with hemanth
<lewix> aedornm: impressive! what's your favorite
<UberNerdGirl> havenwood: i see you are from socal
<UberNerdGirl> I
<UberNerdGirl> I used to live in West LA and Cerritos :) :) :)
ananthakumaran has joined #ruby
<UberNerdGirl> i only moved to NYC 1.5 years ago
<havenwood> UberNerdGirl: Nice! I've been in LA for 1.5 years.
<havenwood> Moved here from Minnesota. Way more Rubyists in LA.
<UberNerdGirl> if you visit, please let me know, I will show you some nice things and introduce you to awesome hackers
<havenwood> Guess nothing like San Francisco, but..
<UberNerdGirl> havenwood: my relatives are in Minnesota :D
Eiam has quit [Read error: Connection reset by peer]
<UberNerdGirl> anyways, regarding Ruby… .taint never made any sense to me
<UberNerdGirl> it always made me laugh
<UberNerdGirl> like… i would feel guilty to use that
<lewix> okay guys nice talking to you. It reminded me if I have still a lot to learns.going back to do some more coding
<aedornm> lewix: They're all interesting, but still Ruby. At least until the next great thing comes along.
<lewix> aedornm: I was amazed by Ruby elegance. It blew me away
<UberNerdGirl> aedorn: have you been seduced yet?
<UberNerdGirl> by...
<UberNerdGirl> the Lispsssssssss
Jalada has joined #ruby
_br_ has joined #ruby
<havenwood> UberNerdGirl: From Ruby man page: "[If you] like the concept of LISP, but don't like too many parentheses, Ruby might be your language of choice."
<aedornm> UberNerdGirl: If I have to look at another function that ends with a million parenthesis I'll scream. =)
<havenwood> hrm, i guess manpage is one word?
<UberNerdGirl> aedornm: I iz severely disappoint to hear that, sir
_br_ has quit [Excess Flood]
<UberNerdGirl> havenwood: have you played with Lisps?
<UberNerdGirl> Hacker Schoolers tend to love meddling with Lisps
<UberNerdGirl> especially Scheme and Clojure
<havenwood> UberNerdGirl: Nope, not at all! Most recently been playing with Elixir but Scheme particularly looks nice to me.
artofraw has quit [Remote host closed the connection]
<UberNerdGirl> havenwood: oh wow!!! a few people are playing with Elixir here! :D
<aedornm> havenwood: Yeah, Elixir is pretty nice
<havenwood> Yeah, i've been really impressed. Fun to explore with iex REPL, definitely some interesting concepts.
<havenwood> I get kinda used to seeing method arity like: puts/1
iamjarvo has quit [Quit: Leaving.]
_br_ has joined #ruby
<aedornm> Psuedo off-topic, but also been liking Felix and Go.
apeiros_ has joined #ruby
<havenwood> aedornm: Yeah, I liked going through the basic Go tutorials. Have you looked at Ilya Grigorik's Agent gem?: https://github.com/igrigorik/agent
_br_ has quit [Excess Flood]
etcetera has joined #ruby
<havenwood> aedornm: What is Felix? What are its strong suits?
<havenwood> aedornm: Fun to see Erlang and Go concurrency ideas come to Ruby!
noop has joined #ruby
<havenwood> I think tarcieri said he was considering upstreaming Celluloid concepts to Erlang.
<felixjet> Felix is me
<felixjet> xD
<aedornm> havenwood: I have not, but I'll check it out. And Felix is basically a scripting language on top of C++.
<felixjet> really?
<havenwood> aedornm: ahh
<felixjet> im the owner of a scripting language and i dont have the rights?
<felixjet> ha
<aedornm> felixjet: and a website about it, too! http://felix-lang.org/
<hemanth> to taint or not...
_br_ has joined #ruby
<lewix> aedornm: kind of like Objective-C?
<lewix> which is built on top of C
elico has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<lewix> oh I see
Choobie has quit [Read error: Operation timed out]
<felixjet> oh, bah...
_br_ has quit [Excess Flood]
<lewix> There's too many languages out there
iamjarvo has joined #ruby
<felixjet> there is a "felix" language, and appears felix the cat
<felixjet> how original.. xD
_br_- has joined #ruby
<lewix> lol
jalcine has quit [Excess Flood]
_br_- is now known as _br_
sailias has joined #ruby
becom33 has quit [Ping timeout: 248 seconds]
r4um has joined #ruby
<aedornm> lewix: hmmm, I don't think so. Objective C is more like an extension of syntax to C. I can't recall for sure, since I never used it myself. (Never used NeXT or Apple products!)
<lewix> aedornm: you're right
<aedornm> I bet on the other underdog, and lost (OS/2 and REXX, etc)
a_a_g has quit [Quit: Leaving.]
codecop has joined #ruby
<aedornm> I did that again with WebOS ... yup, I pick all the winners.
mahmoudimus has quit [Quit: Computer has gone to sleep.]
tommyvyo has quit [Quit:]
<lewix> lol
_br_ has quit [Excess Flood]
nachtwandler has joined #ruby
toekutr has joined #ruby
apeiros has joined #ruby
apeiros has quit [Remote host closed the connection]
<aedornm> Rooting for Firefox OS. Everyone might want to stay away from that knowing my streak!
apeiros_ has quit [Ping timeout: 252 seconds]
_br_ has joined #ruby
ngotho has quit [Ping timeout: 245 seconds]
codecop has quit [Remote host closed the connection]
codecop has joined #ruby
mockra has quit [Remote host closed the connection]
* lewix takes note
* lewix downloads google chrome
<lewix> waiting for google OS
ryanf has joined #ruby
<lewix> android?
MrSamuel has joined #ruby
<bean> chromebooks run as close to a "google OS" as you'll ever get
<aedornm> Chrome OS.. but they're talking about long term plans of ChromeOS and Android merging together.
<aedornm> Next time I'm at Google maybe I'll go take a peak.
_br_ has quit [Excess Flood]
a_a_g has joined #ruby
_br_- has joined #ruby
a_a_g has quit [Client Quit]
_br_- is now known as _br_
rezzack has quit [Quit: Leaving.]
averiso has joined #ruby
dougireton has quit [Quit: Leaving.]
Choobie has joined #ruby
carlyle has joined #ruby
becom33 has joined #ruby
becom33 has quit [Changing host]
becom33 has joined #ruby
averiso has quit [Read error: Connection reset by peer]
UberNerdGirl has left #ruby [#ruby]
pyx has quit [Quit: WeeChat 0.4.0]
_br_ has quit [Excess Flood]
timonv has joined #ruby
coderhs has joined #ruby
ngotho has joined #ruby
_br_ has joined #ruby
averiso has joined #ruby
_br_ has quit [Excess Flood]
averiso has quit [Read error: Connection reset by peer]
carlyle has quit [Ping timeout: 245 seconds]
ryanf has quit [Ping timeout: 245 seconds]
carraroj has joined #ruby
_br_ has joined #ruby
pseudonymous has quit [Read error: Operation timed out]
quazimodo has quit [Ping timeout: 245 seconds]
quazimodo has joined #ruby
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
timonv has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Leaving.]
_br_ has quit [Excess Flood]
<lewix> 21:37 <#ruby> havenwood: lewix: Why doesn't everyone code? I missed that lol
_br_- has joined #ruby
_br_- is now known as _br_
<hemanth> Hanmac, meow?
<lewix> havenwood: they're too busy using our apps
<Hanmac> huch?
justsee has quit [Quit: Leaving...]
chrishunt has quit [Quit: ZzZzZz...]
rippa has quit [Ping timeout: 240 seconds]
whitedawg has joined #ruby
cyong has quit [Quit: Leaving.]
fixl has joined #ruby
jurassic has joined #ruby
<hemanth> Hanmac, wasssup
sambio_ has quit []
<Hanmac> i because i need to goto bath an then goto work
_br_ has quit [Excess Flood]
jborica has quit [Ping timeout: 276 seconds]
averiso has joined #ruby
SirWolfgang has joined #ruby
<SirWolfgang> So, whats a good time to use object.send(:func) rather then object.func ?
_br_ has joined #ruby
rippa has joined #ruby
* SirWolfgang is trying to understand the use of send
<hemanth> Hanmac, okies! cya soon then
<felixjet> anyone recommends a ruby starting tutorial?
jborica has joined #ruby
<felixjet> something like php handbook :p
<hemanth> SirWolfgang, when you want to invoke a function that invokes a function
dhruvasagar has joined #ruby
<SirWolfgang> ok, makes sense
<hemanth> Hanmac++
<Hanmac> felixjet i recomend "Ruby in Twenty Minutes" and "Ruby from Other Languages" for the very first begining
<SirWolfgang> http://www.codecademy.com/tracks/ruby isnt too bad for starting out
jacky has joined #ruby
<felixjet> ill take a look at those Hanmac ty
<Hanmac> SirWolfgang: and when func is private you may need send to call it
_br_ has quit [Excess Flood]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
<felixjet> codeacademy
<felixjet> looks nice
<felixjet> is translated to my language
<SirWolfgang> Hanmac: but doesnt that really just break the pinceples of OOP, if you need external access your doing something wrong, or it should be accessable
<felixjet> ah no, just the UI lol
icole has quit [Remote host closed the connection]
<SirWolfgang> then tehre is teh case of public_send
<felixjet> yea, 11 years in php could help for that tutorial
<felixjet> thanks for all the tips
<Hanmac> SirWolfgang if you are evil enough you could do something very wrong in ruby :P
browndawg has quit [Ping timeout: 248 seconds]
<felixjet> codeacademy looks great
_br_ has joined #ruby
<SirWolfgang> Hanmac: Ruby is too loose for my liking. I am more of a C++ person
<SirWolfgang> that and I love pointers
<Hanmac> SirWolfgang then you may like that ruby has a C interface :P where you can write C++ gems for it :P
eliasp has quit [Ping timeout: 256 seconds]
<SirWolfgang> i may have to look into that after I get more settled with ruby itself
jborica has quit [Ping timeout: 252 seconds]
<Hanmac> about codeacademy ... its fucking anoying than everyone wants you to join with a fakebook acount ...
chrishunt has joined #ruby
<SirWolfgang> meh, you dont have too
<SirWolfgang> i did codecademny to cut my teeth with ruby, then jumped over to codeschool to get more indepth
SCommette has joined #ruby
<Hanmac> but after every page reload it ask me about ... what if i want to try this page without any form of login or tracking?
rippa has quit [Ping timeout: 240 seconds]
_br_ has quit [Excess Flood]
SCommette has quit [Client Quit]
chrishunt has quit [Client Quit]
<SirWolfgang> idk, didnt have that issue
braoru has joined #ruby
joeycarmello has quit [Remote host closed the connection]
_br_ has joined #ruby
<SirWolfgang> Oh, i got a question. aimed at any "Rubyist" when refuring to using class vars in methods, which is perfer'd? @var or self.var ?
<felixjet> yea... they want to fb data :P
<felixjet> ur*
grn has joined #ruby
<felixjet> SirWolfgang dunno if you saw this already https://github.com/styleguide/ruby
<SirWolfgang> havnt had a chance to look at it yet, thanks
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
jborica has joined #ruby
<felixjet> i dont think it helps for this, as i dont see it there
<felixjet> but maybe for another style questions
Honeycomb has joined #ruby
hemanth_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
_br_ has quit [Excess Flood]
nachtwandler has quit [Remote host closed the connection]
averiso has quit [Ping timeout: 255 seconds]
<SirWolfgang> felixjet: Ya, i dont see it either
hbpoison has quit [Ping timeout: 276 seconds]
<SirWolfgang> the C programmer me says @var since this.var is more typing
<SirWolfgang> but i also would use {} rather then do end, in every case
_hemanth has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
_hemanth has quit [Read error: Connection reset by peer]
* SirWolfgang doesnt like needless typing.
<felixjet> sirecote well yea
<felixjet> its covered in the style guide
<felixjet> just scroll to the very bottom :P
_hemanth has joined #ruby
<felixjet> above all else
<SirWolfgang> heh
Skylab has joined #ruby
_hemanth has quit [Read error: Connection reset by peer]
<SirWolfgang> I am trying to keep with the "rubyist" style and be nice to the lang. I dont like to write my own styles until I know the lang inside and out
hemanth_ has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
<SirWolfgang> a good style prevents errors
hemanth_ has joined #ruby
Mon_Ouie has quit [Ping timeout: 276 seconds]
mootpointer has quit [Quit: Computer has gone to sleep.]
<lewix> SirWolfgang: plain send can call an object private method and public_send can't
_br_ has joined #ruby
_br_ has quit [Excess Flood]
<SirWolfgang> ya, i get that. I just dont get a good case when to use send
<SirWolfgang> to get access to private method seems like bad OOP design to me
apok has quit [Quit: apok]
<SirWolfgang> the entire point of private/protected methods is people dont use them...
<lewix> SirWolfgang: it works well in cases where you need to pass a method without the dot operator - when you don't know the method name and you have to pass it as an argument
browndawg has joined #ruby
<lewix> SirWolfgang: private/protected does not mean the same thing in ruby
<lewix> as in C
<lewix> do*
mattbl has quit [Quit: This computer has gone to sleep]
_br_ has joined #ruby
<Hanmac> rubys protected is like friend in C
statarb3 has joined #ruby
averiso has joined #ruby
<SirWolfgang> Wait, so your telling me that Ruby is in fact not C! :p
<Paradox> SirWolfgang, erm ah gerd
hogeo has quit [Read error: Connection reset by peer]
elkclone has joined #ruby
_br_ has quit [Excess Flood]
hogeo has joined #ruby
<lewix> SirWolfgang: if name.respond_to?(lewix) ; puts name.send(lewis) ; else puts "How come lewix is not in your database" end
<SirWolfgang> Hanmac: that reminds me, the whole nil == false, but 0 == true is going to take a long time for me to keep stright
mattbl has joined #ruby
pen has joined #ruby
<Hanmac> SirWolfgang ... i think its more clear
pepper_chico has quit [Quit: Computer has gone to sleep.]
cantonic has quit [Quit: cantonic]
_br_ has joined #ruby
_br_ has quit [Excess Flood]
r4um has quit [Ping timeout: 255 seconds]
JohnBat26 has quit [Read error: Operation timed out]
_br_ has joined #ruby
<SirWolfgang> Hanmac: I see the reason behind it, it makes testing if valid easier in somecases, but i think in C and Bin, which means 0/Null/False are all the same, and are tested with accordingly. if(NULL) to me should be false
mattbl is now known as MattRB
Honeycomb has quit [Quit: Leaving.]
dmiller has quit [Ping timeout: 245 seconds]
havenwood has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
<SirWolfgang> but I like ruby simply becouse you can do things like this:
charliesome has joined #ruby
goganchic has joined #ruby
<Hanmac> then you may land in php where you need to be really really sure that the method returns FALSE and not 0 ... something like: func() ===== FALSE :P
<SirWolfgang> [:each, :map, :select].each do |method| define_method(method) do |&block| games.send(method, &block) end end
pseudonymous has joined #ruby
<Hanmac> yeah ... but i think this whould be a job for method_missing
_br_ has quit [Excess Flood]
<goganchic> SirWolfgang, may be delegate :each, :map, :select, :to => :games will be better?
<Hanmac> goganchic delegate looks after a fails .. äh i mean rails method
<goganchic> Hanmac, yep
JohnBat26 has joined #ruby
<Hanmac> this is the non-rails channel
Doc_X has joined #ruby
Doc_X_ has quit [Read error: Connection reset by peer]
brandon|_ has joined #ruby
* SirWolfgang is on to learn rails soon..
Hanmac has quit [Quit: Leaving.]
tagrudev has joined #ruby
brandon|work has quit [Ping timeout: 260 seconds]
_br_- has joined #ruby
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
joeycarmello has joined #ruby
_br_- has quit [Excess Flood]
Elhu has joined #ruby
m3pow has quit [Ping timeout: 250 seconds]
hbpoison has joined #ruby
<charliesome> hackeron: delegate is in the stdlibn
r4um has joined #ruby
<charliesome> fuck wrong mention
<charliesome> Hanmac1: delegate is in the stdlib
_br_ has joined #ruby
eAlchemi_ has joined #ruby
<lewix> SirWolfgang: how's codeschool material
_br_ has quit [Excess Flood]
ilyam has quit [Quit: ilyam]
mercwithamouth has quit [Ping timeout: 245 seconds]
SCommette has joined #ruby
eAlchemist has quit [Ping timeout: 272 seconds]
<SirWolfgang> lewix: I like it, its fast paced.
dekroning has quit [Ping timeout: 245 seconds]
_br_- has joined #ruby
goganchic has quit []
<SirWolfgang> lewix: its for people who already know how to atleast do some basic programing
pseudonymous has quit [Ping timeout: 245 seconds]
bnjamin has quit [Remote host closed the connection]
mafolz has joined #ruby
chendo_ has quit [Ping timeout: 248 seconds]
<SirWolfgang> the frist leason in every course is free, so you can check it out
predator217 has quit [Ping timeout: 248 seconds]
predator117 has joined #ruby
sailias has quit [Quit: Leaving.]
chendo_ has joined #ruby
_br_- has quit [Excess Flood]
<lewix> SirWolfgang: i know, I was just wondering..
r4um has quit [Ping timeout: 256 seconds]
a_a_g has joined #ruby
horofox_ has joined #ruby
threesome has quit [Remote host closed the connection]
Hanmac has joined #ruby
_br_ has joined #ruby
Morkel has joined #ruby
Hanmac2 has joined #ruby
toekutr has quit [Read error: Connection reset by peer]
horofox_ has quit [Client Quit]
testingb0t has joined #ruby
_br_ has quit [Excess Flood]
peterhellberg has joined #ruby
Hanmac has quit [Ping timeout: 255 seconds]
_br_ has joined #ruby
Hanmac2 is now known as Hanmac
Skylab has quit [Quit: Skylab]
becom33 has quit [Ping timeout: 248 seconds]
Mo0O has quit [Quit: WeeChat 0.4.0]
hasimo has quit [Remote host closed the connection]
whitedawg has quit [Quit: Leaving.]
rismoney has quit [Read error: Connection reset by peer]
huoxito has quit [Quit: Leaving]
steeve1 has joined #ruby
_br_ has quit [Excess Flood]
hasimo has joined #ruby
etcetera has quit []
<lewix> do we still need to require 'time' , 'date' in ruby 2.0
filipe_ has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
_br_ has joined #ruby
tonini has joined #ruby
<peterhellberg> lewix: Not, it doesn’t look like you need to do that. (I just did a quick check 1.9.3-p392/2.0.0-p0)
SCommette has quit [Quit: SCommette]
<lewix> peterhellberg: can you use Date.parse?
<peterhellberg> Nope
<peterhellberg> Not without require 'date'
<Hanmac> :P Date is in core, but Date.parse is in stdlib :P
<peterhellberg> Hanmac: Yeah, makes total sense ;)
_br_ has quit [Excess Flood]
generalissimo has quit [Remote host closed the connection]
<peterhellberg> lewix: Do you have a reason for not wanting to require the libs you depend on?
steeve1 is now known as Mo0O
generalissimo has joined #ruby
<Hanmac> peterhellberg: in one of my ruby gems i use require at want-time :P
_br_ has joined #ruby
<Hanmac> https://github.com/Hanmac/tmx-ruby/blob/master/lib/tiled_tmx/tilelayer.rb#L70 when data is "gzip" then require StringIO and zlib ... not before
<peterhellberg> Great… getting `const_missing': uninitialized constant YAML (NameError) when running rake under 2.0.0 and 1.9.3-p392, did I miss the memo on that while being away on vacation?
atyz has joined #ruby
lolmaus has joined #ruby
<peterhellberg> Hanmac: Heh, "nasty" but effective :)
<Hanmac> peterhellberg ... yaml is not in core ... did you forget to require it?
hasimo has quit [Remote host closed the connection]
horofox_ has joined #ruby
becom33 has joined #ruby
becom33 has quit [Changing host]
becom33 has joined #ruby
DrCode has quit [Ping timeout: 276 seconds]
aganov has joined #ruby
<peterhellberg> I absolutely need to require yaml, but I just wondered about the change between the 1.9.3 patch levels
_br_ has quit [Excess Flood]
<becom33> can I ask ruby thor framework question or is there a channel for that ?
<peterhellberg> becom33: Just ask, someone might be able to answer :)
DrCode has joined #ruby
_br_ has joined #ruby
razibog has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<peterhellberg> becom33: I hope that you looked at http://whatisthor.com/ first?
rburton- has quit [Quit: Linkinus - http://linkinus.com]
icole has joined #ruby
<becom33> petecheslock, yes I did
Sargun has quit [Ping timeout: 264 seconds]
<becom33> I have it open in my left monitor
Sargun has joined #ruby
flexd has quit [Ping timeout: 264 seconds]
_br_ has quit [Excess Flood]
mpfundstein has quit [Remote host closed the connection]
<Hanmac> hm maybe loki is interfering thats why thor is not working :P
vlad_starkov has joined #ruby
andikr has joined #ruby
carraroj has quit [Ping timeout: 276 seconds]
malte_ has joined #ruby
icole has quit [Ping timeout: 252 seconds]
ilyam has joined #ruby
_br_ has joined #ruby
vipjun has joined #ruby
dekroning has joined #ruby
flexd has joined #ruby
hasimo has joined #ruby
ilyam has quit [Client Quit]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
_br_ has quit [Excess Flood]
Mchl has quit [Quit: ZNC - http://znc.sourceforge.net]
tvw has joined #ruby
lewix has quit [Remote host closed the connection]
<peterhellberg> How about odin?
horofox_ has quit [Quit: horofox_]
brianpWins has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
keepguessing has joined #ruby
_br_- has joined #ruby
mntzn has joined #ruby
<keepguessing> Hi I was going through this http://www.artima.com/rubycs/articles/patterns_sexp_dsls.html and found that this is a little obselete definition of pattern matching in ruby
<keepguessing> Could not find on my anything that maps to it in ruby 1.9.3
<keepguessing> Anyone can help me here
DrCode has quit [Remote host closed the connection]
Demux has joined #ruby
jborica has quit [Ping timeout: 248 seconds]
DrCode has joined #ruby
monkegjinni has joined #ruby
greenarrow has quit [Read error: Connection reset by peer]
_br_- has quit [Excess Flood]
greenarrow has joined #ruby
zigomir has joined #ruby
<mntzn> Hi, what's the nicest wait of setting $log.level = Logger::something via a variable? log_level = 'Logger::ERROR' $log.level = log_level doesnt seem to work
monkegjinni has quit [Remote host closed the connection]
_br_ has joined #ruby
pseudonymous has joined #ruby
anderse has joined #ruby
Mattix has joined #ruby
punkrawkR has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
sayan has quit [Read error: Connection reset by peer]
<peterhellberg> mntzn: Why do you use a string instead of the actual constant?
<mntzn> I dont know )
<mntzn> I will be passed as a string later on I think
<peterhellberg> log_level = Logger::ERROR and then $log.level = log_level
<mntzn> yeah, removing the quotes works
hbpoison has quit [Ping timeout: 255 seconds]
_br_ has quit [Excess Flood]
horofox_ has joined #ruby
<peterhellberg> I’d probably write a method that sets the log level
<peterhellberg> Especially if you need to set it based on a string/parameter
timonv has joined #ruby
apeiros_ has joined #ruby
_br_- has joined #ruby
pseudonymous has quit [Ping timeout: 276 seconds]
timonv has quit [Remote host closed the connection]
blaxter has joined #ruby
jimeh has joined #ruby
elico has quit [Quit: elico]
atyz has quit [Quit: Leaving...]
hasimo has quit [Remote host closed the connection]
_br_- has quit [Excess Flood]
tonini has quit [Remote host closed the connection]
atyz has joined #ruby
<mntzn> yeah I probably will
lkba has quit [Ping timeout: 245 seconds]
<mntzn> do you need to reqire something for const_get to work?
tonini has joined #ruby
horofox_ has quit [Quit: horofox_]
_br_ has joined #ruby
rakl has quit [Quit: sleeping]
nomenkun has joined #ruby
TheFuzzball has joined #ruby
<Hanmac> mntzn hm no ... const_get is build in
<mntzn> yeah I was doing it wrong, thanks
mritr_ has quit [Ping timeout: 240 seconds]
jgrevich has quit [Remote host closed the connection]
<Hanmac> i like this:: "Logger::ERROR".split("::").inject(Object,:const_get)
axhlf has joined #ruby
_br_ has quit [Excess Flood]
anderse has quit [Quit: anderse]
timonv has joined #ruby
_br_- has joined #ruby
_br_- is now known as _br_
<peterhellberg> Hanmac: Why not just use Kernel.const_get "Logger::Error"?
hasimo has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
kevinfagan has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
<Hanmac> hm okayy ... that const_get can solv :: is a bit new
kevinfagan has quit [Client Quit]
ss13 has joined #ruby
<peterhellberg> mntzn: Logger::ERROR is just a Fixnum btw, so you could just send 3 instead
ephemerian has joined #ruby
eAlchemi_ has quit [Remote host closed the connection]
ss13 has quit [Client Quit]
Mchl has joined #ruby
ferdev has quit [Quit: ferdev]
eAlchemist has joined #ruby
_br_ has quit [Excess Flood]
Choobie has quit [Ping timeout: 250 seconds]
<mntzn> debug being 0 and fatal 4 then?
_br_ has joined #ruby
jrendell has joined #ruby
<peterhellberg> Right
<Hanmac> using constants is better than using the numbers directly
monkegjinni has joined #ruby
znode has joined #ruby
aqabiz has joined #ruby
ozgura has quit [Remote host closed the connection]
mpfundstein has joined #ruby
_br_ has quit [Excess Flood]
eAlchemist has quit [Ping timeout: 276 seconds]
<becom33> I'm having a problem in thor framework https://gist.github.com/anonymous/4825d24bd89bee39c536
ozgura has joined #ruby
maxmanders has joined #ruby
<bw_> hmm, i'm quite new to ruby, could anyone point me to a overview how the several webservers/webstacks .. well stack on each other?
<peterhellberg> Absolutely, the constants are there for a reason :)
<becom33> in speak task I want to have ither --file option or the argvment and second problem is i get a exception error if I didnt mention the file path after I mention the --file option
<bw_> i read about rack, thin, unicorn, sinatra and some of those seems to sit on top of another
<peterhellberg> bw_: Do you have a decent understanding of how Rack works?
<bw_> nope
Emmanuel_Chanel has joined #ruby
_br_ has joined #ruby
blackcat has joined #ruby
lkba has joined #ruby
<peterhellberg> bw_: Rack is pretty much the de facto standard for servers to implement when it comes to serving Ruby applications.
blackcat has left #ruby ["No boundaries on the net!"]
rzs has joined #ruby
<bw_> peterhellberg: its like wsgi in the python world?
<peterhellberg> You might think of it like WSGI for Ruby
<peterhellberg> Yes
bubdan has joined #ruby
<peterhellberg> (There is enough similarities for Phusion Passenger to support both Rack and WSGI)
slainer68 has quit [Remote host closed the connection]
hbpoison has joined #ruby
bubdan has left #ruby [#ruby]
_br_ has quit [Excess Flood]
znode has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
<bw_> peterhellberg: so every other project is a layer on top of rack and in some cases middleware?
<peterhellberg> The different servers (webrick, thin, unicorn, puma, passenger, etc.) are just different solutions to the same problem, serving Ruby (Rack) applications
haxrbyte has joined #ruby
<peterhellberg> bw_: Pretty much, Rack isn’t the _only_ way to serve Ruby applications on the web
<peterhellberg> bw_: But it is by far the most popular
<peterhellberg> Frameworks like Sinatra and Rails implement Rack on the other end
<peterhellberg> So it is possible to run a Sinatra app on all the different servers
QaDeS has joined #ruby
<bw_> ahh, now i see
matrixise has quit [Read error: Operation timed out]
<bw_> rack beening more like a interface not a server must have slipped me
txdv has joined #ruby
matrixise has joined #ruby
<bw_> and started the confusion
<bw_> peterhellberg: many thanks for the elaborate explaination :)
_br_ has joined #ruby
_br_ has quit [Excess Flood]
<peterhellberg> bw_: You are welcome :)
<peterhellberg> bw_: There you have some more info about Rack
<peterhellberg> 4 years old, but the gist of it remains the same
rzs has quit [Quit: Leaving]
<bw_> perfect, i'll work from there
_br_ has joined #ruby
<bw_> i like to understand what i'm doing instead of just using some stack/framework :)
<peterhellberg> That is a good way to approach things :)
aqabiz has quit [Ping timeout: 256 seconds]
Choobie has joined #ruby
<peterhellberg> bw_: Here is the Rack introduction post by Christian: http://chneukirchen.org/blog/archive/2007/02/introducing-rack.html
ferdev has joined #ruby
aqabiz has joined #ruby
SirWolfgang has left #ruby [#ruby]
tish has joined #ruby
Elhu has joined #ruby
<peterhellberg> It has also inspired the development of PSGI/Plack http://plackperl.org/
apod has joined #ruby
_br_ has quit [Excess Flood]
aqabiz has quit [Remote host closed the connection]
kevinfagan has joined #ruby
lkba has quit [Quit: Bye]
wreckimnaked has joined #ruby
_br_ has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
_br_ has quit [Excess Flood]
ocnam has quit [Quit: Quit: Textual IRC Client: http://www.textualapp.com/]
dekroning has quit [Ping timeout: 252 seconds]
<bw_> peterhellberg: thanks, i'll have a look at this as well
ryanf has quit [Quit: leaving]
unflores has joined #ruby
mahmoudimus has joined #ruby
_br_- has joined #ruby
grn has quit [Read error: Connection reset by peer]
phretor has joined #ruby
elico has joined #ruby
_br_- has quit [Excess Flood]
elkclone has quit [Quit: It's never too late to unplug and run.]
hoelzro|away is now known as hoelzro
_br_ has joined #ruby
samphippen has joined #ruby
eka has joined #ruby
kevinfagan has quit [Quit: Linkinus - http://linkinus.com]
kevinfagan has joined #ruby
_br_ has quit [Excess Flood]
blacktulip has joined #ruby
lemonsparrow has joined #ruby
felipe has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
jurassic has quit [Quit: jurassic]
nari has quit [Ping timeout: 245 seconds]
plantseeker has joined #ruby
_br_ has joined #ruby
coderhs has quit [Ping timeout: 256 seconds]
_br_ has quit [Excess Flood]
vlad_starkov has quit [Remote host closed the connection]
freeayu has quit [Ping timeout: 264 seconds]
whitedawg has joined #ruby
freeayu has joined #ruby
TheFuzzball has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
sonda has joined #ruby
monkegjinni has quit [Remote host closed the connection]
kevinfagan has quit [Quit: Linkinus - http://linkinus.com]
_br_ has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
staafl has quit [Read error: Connection reset by peer]
emergion has joined #ruby
robbyoconnor has joined #ruby
staafl has joined #ruby
brianpWins has quit [Quit: brianpWins]
_br_ has quit [Excess Flood]
elico has quit [Ping timeout: 256 seconds]
yshh has quit [Remote host closed the connection]
whitedawg has quit [Quit: Leaving.]
yshh has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
dpn` has quit [Excess Flood]
tessi has quit [Remote host closed the connection]
phretor has left #ruby [#ruby]
_br_ has joined #ruby
Xeago has joined #ruby
phretor has joined #ruby
ozgura has quit [Remote host closed the connection]
dpn` has joined #ruby
nomenkun has joined #ruby
_br_ has quit [Excess Flood]
tessi has joined #ruby
coderhs has joined #ruby
_br_- has joined #ruby
elaptics`away is now known as elaptics
Emmanuel_Chanel has joined #ruby
Vainoharhainen has joined #ruby
drale2k has quit [Quit: Leaving...]
_br_- has quit [Excess Flood]
jurassic has joined #ruby
DrCode has quit [Ping timeout: 276 seconds]
_br_ has joined #ruby
mengu has joined #ruby
pskosinski has joined #ruby
end_guy has quit [Ping timeout: 276 seconds]
nomenkun has quit [Ping timeout: 245 seconds]
Criztian has joined #ruby
daniel_- has joined #ruby
end_guy has joined #ruby
kristofers has joined #ruby
_br_ has quit [Excess Flood]
_br_ has joined #ruby
duosrx has joined #ruby
browndawg has quit [Quit: Leaving.]
takeru_ has joined #ruby
_br_ has quit [Excess Flood]
francisfish has joined #ruby
Criztian has quit [Remote host closed the connection]
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
_br_ has joined #ruby
heidar has quit [Quit: leaving]
heidar has joined #ruby
eAlchemist has joined #ruby
takeru_ has quit [Ping timeout: 276 seconds]
jrendell has quit [Quit: jrendell]
swoosh has joined #ruby
slainer68 has joined #ruby
_br_ has quit [Excess Flood]
haxrbyte has quit [Remote host closed the connection]
_br_ has joined #ruby
heidar has quit [Client Quit]
heidar has joined #ruby
nomenkun has joined #ruby
haxrbyte has joined #ruby
eAlchemist has quit [Ping timeout: 252 seconds]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
wreckimnaked has quit [Read error: Connection reset by peer]
malkomalko has joined #ruby
wreckimnaked has joined #ruby
_br_ has quit [Excess Flood]
bean__ has joined #ruby
_br_ has joined #ruby
wf2f has quit [Ping timeout: 245 seconds]
xpen has joined #ruby
brijesh_ has joined #ruby
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
DrCode has joined #ruby
_br_ has quit [Excess Flood]
bean__ has quit [Ping timeout: 252 seconds]
monkegjinni has joined #ruby
bean__ has joined #ruby
Al____ has joined #ruby
keepguessing has quit [Ping timeout: 245 seconds]
lewix has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
<JonnieCache> oh hell yeah
<JonnieCache> dont you just love it when you change one LoC and suddenly all your tests pass unexpectedly
<JonnieCache> tbh it usually means you have crappy tests
<peterhellberg> So you have one code path that is exercised by _all_ your tests? :)
_br_ has joined #ruby
<JonnieCache> yeah because i practice separation of concerns and i compose my apps from small gems :P
mark9 has joined #ruby
<JonnieCache> but youre right, its only because im at a realatively early stage
ozgura has joined #ruby
emocakes has joined #ruby
_br_ has quit [Excess Flood]
<peterhellberg> I just pushed an update to the hazel gem :) Now time for lunch…
AndChat| has joined #ruby
slainer68 has quit [Remote host closed the connection]
_br_ has joined #ruby
fixl has joined #ruby
chussenot has joined #ruby
ngotho has quit [Ping timeout: 252 seconds]
slainer68 has joined #ruby
aedornm has quit [Ping timeout: 248 seconds]
Banistergalaxy has quit [Ping timeout: 248 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
timmow has joined #ruby
aedornm has joined #ruby
_br_ has quit [Excess Flood]
coderhs has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
lmx has joined #ruby
_br_ has joined #ruby
axhlf has quit [Remote host closed the connection]
dEPy has joined #ruby
vipjun has quit [Ping timeout: 245 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
hbpoison has quit [Ping timeout: 252 seconds]
Emplitz has quit [Quit: Leaving]
Es0teric has joined #ruby
_br_ has quit [Excess Flood]
_br_- has joined #ruby
_br_- is now known as _br_
hasimo has quit [Remote host closed the connection]
Es0teric has quit [Client Quit]
lemonsparrow has quit [Quit: Page closed]
testingb0t has quit [Read error: Connection reset by peer]
testingb0t1 has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
_br_ has quit [Excess Flood]
<becom33> I want to get the "test.rb help speak" output when non of the paramters are passed . for a example when "test.rb speak"
_br_ has joined #ruby
<becom33> https://gist.github.com/anonymous/25dad605f1b119652a15 since I had put nil as the default parameter it goes comes that way
Kuifje has joined #ruby
gregorg_taf has joined #ruby
dahood has joined #ruby
* becom33 anyone ?
hbpoison has joined #ruby
gregorg has quit [Read error: Connection reset by peer]
monkegjinni has quit [Remote host closed the connection]
_br_ has quit [Excess Flood]
postmodern has quit [Quit: Leaving]
S1kx has quit [Ping timeout: 245 seconds]
strk has joined #ruby
elico has joined #ruby
_br_ has joined #ruby
S1kx has joined #ruby
S1kx has joined #ruby
S1kx has quit [Changing host]
_br_ has quit [Excess Flood]
_br_ has joined #ruby
emocakes has quit [Quit: emocakes]
marr has joined #ruby
ExxKA has joined #ruby
brijesh_ has quit [Read error: Connection reset by peer]
oposomme has joined #ruby
elico has quit [Quit: elico]
rzs has joined #ruby
<rzs> Im getting the error 'cannot load such file -- rack'. When i do bundle show rack i get '/usr/local/rvm/gems/ruby-1.9.3-p385/gems/rack-1.4.5' which means rack is already installed
whitedawg has joined #ruby
<rzs> The ruby version on my system is ruby 1.9.3p362
<rzs> Whats causing this error ?
_br_ has quit [Excess Flood]
nomenkun has quit [Ping timeout: 252 seconds]
strk has left #ruby [#ruby]
xpen has quit [Remote host closed the connection]
fixl has quit [Remote host closed the connection]
nomenkun has joined #ruby
_br_- has joined #ruby
emergion has joined #ruby
_br_- has quit [Excess Flood]
_br_ has joined #ruby
<unflores> :rzs when do you get the error 'cannot load such file -- rack' ?
nari has joined #ruby
tonini has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
Mattix has quit [Quit: Leaving]
<rzs> unflores: im installing redmine, a bug tracking tool written in rails. When i do rake generate_secret_token , that is when i get this error
<rzs> Any reason why it says cannot load the file even though the gem is already installed ?
<Hanmac> it feels that using bundle with rvm looks after a bad idea ...
gregorg_taf has quit [Changing host]
gregorg_taf has joined #ruby
gregorg_taf is now known as gregorg
<Hanmac> rzs what does gem list shows you? does it list rake?
<rzs> The complete trace is http://pastie.org/6410787
<unflores> not sure, I've had a similar issue with rvm before. are you using sudo to install redmine?
dayepa has quit [Quit: dayepa]
<rzs> unflores: yeah i tried the same by logging in as root user but i get the same error
dayepa has joined #ruby
wreckimnaked has quit [Read error: Operation timed out]
chussenot has quit [Quit: chussenot]
Bry8Star has quit [Quit:]
<unflores> yeah, rvm is particular to the user
io_syl has joined #ruby
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
daniel_- has quit [Ping timeout: 240 seconds]
<unflores> you're not on dreamhost by any chance are you?
lewix has joined #ruby
malte___ has joined #ruby
<rzs> unflores: no
<rzs> the machine is running CentOS v5.6
tonini has joined #ruby
charliesome has joined #ruby
includex has joined #ruby
gyre007 has joined #ruby
chussenot has joined #ruby
malte_ has quit [Ping timeout: 264 seconds]
malte___ is now known as malte_
vipjun has joined #ruby
<unflores> Sorry bro, not exactly sure of the problem. It is most likely a conflict somewhere in your paths/environment
lewix has quit [Ping timeout: 260 seconds]
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 245 seconds]
axhlf has joined #ruby
<unflores> you might be able to hit someone up on rvm irc channel, they
* Hanmac is wondering why everyone wants to use centos ... its from ancient "cent"uries :P
Bry8Star has joined #ruby
<unflores> har
yshh has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
e-dard has left #ruby [#ruby]
dhruvasagar has quit [Ping timeout: 260 seconds]
coderhs has joined #ruby
yewton has quit [Excess Flood]
yewton has joined #ruby
Spooner_ has joined #ruby
monkegjinni has joined #ruby
tish has quit [Quit: Leaving.]
dahood has quit [Quit: Linkinus - http://linkinus.com]
daxim has joined #ruby
tonini has quit [Remote host closed the connection]
malkomalko has quit [Remote host closed the connection]
<daxim> hello, I have an installation problem with charlock_holmes, which is part of gitlab: http://paste.scsys.co.uk/233966?tx=on how do I solve it?
daniel_- has joined #ruby
yacks has quit [Ping timeout: 245 seconds]
Domon has quit [Remote host closed the connection]
splud has quit [Quit: splud]
linusoleander has joined #ruby
<linusoleander> Does anyone know what a terminated object is?
<whitequark> linusoleander: context?
<linusoleander> whitequark: method `<=>' called on terminated object
<whitequark> linusoleander: ruby version?
<Hanmac> an object that meets Arnold :P
<linusoleander> 1.9.3
<linusoleander> Hehe
<whitequark> as far as I can tell, you've called <=> on an object which was already garbage-collected
<whitequark> try to update to latest 1.9.3 patchleve.
<whitequark> try to figure out if a binary extension could be a problem.
<linusoleander> Isn't 1.9.3p385 enough ?
* Hanmac points you to the topic of the channel
keymone has joined #ruby
<Hanmac> "method `%s' called on hidden T_DATA object" have i allready seen before, but the terminated object is new for me ...
hasimo has joined #ruby
Amnesthesia has joined #ruby
lkba has joined #ruby
Michae___ has joined #ruby
coderhs has quit [Read error: Connection reset by peer]
Criztian has joined #ruby
ozgura has quit [Read error: Connection reset by peer]
ozgura has joined #ruby
backjlack has joined #ruby
whitedawg has quit [Quit: Leaving.]
<JonnieCache> calling methods on GCd objects? something has gone badly wrong my friend
woolite64_ has quit [Read error: Connection reset by peer]
woolite64_ has joined #ruby
hasimo has quit [Ping timeout: 276 seconds]
nomenkun has quit [Read error: Connection reset by peer]
haxrbyte_ has joined #ruby
nomenkun has joined #ruby
takeru_ has joined #ruby
haxrbyte has quit [Ping timeout: 245 seconds]
skum has joined #ruby
philcrissman has joined #ruby
chussenot has quit [Quit: chussenot]
bonhoeffer has joined #ruby
echobinary has joined #ruby
vlad_starkov has joined #ruby
<peterhellberg> linusoleander: “called on terminated object” just means that the object in question were garbage collected too soon.
araujo has quit [Quit: Leaving]
whitedawg has joined #ruby
philcrissman has quit [Remote host closed the connection]
<linusoleander> Aha
Michae___ has quit [Remote host closed the connection]
<rzs> Hanmac: yes
<linusoleander> thanks
Vainoharhainen has quit [Ping timeout: 245 seconds]
<apeiros_> or that ObjectSpace._id2ref was used
wallclockbuilder has joined #ruby
skattyadz has joined #ruby
rdark has joined #ruby
takeru_ has quit [Ping timeout: 255 seconds]
azm has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
splud has joined #ruby
objectivemo has quit [Ping timeout: 240 seconds]
m3pow has joined #ruby
ozgura has quit [Read error: Connection reset by peer]
philcrissman has joined #ruby
ozgura has joined #ruby
himsin has quit [Remote host closed the connection]
himsin has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
nomenkun has quit [Ping timeout: 248 seconds]
vlad_starkov has joined #ruby
MehLaptop has joined #ruby
tonini has joined #ruby
nomenkun has joined #ruby
linusoleander has quit [Quit: linusoleander]
ferdev_ has joined #ruby
ferdev has quit [Ping timeout: 252 seconds]
ferdev_ is now known as ferdev
pac1 has joined #ruby
divout has quit [Remote host closed the connection]
skattyadz has quit [Quit: skattyadz]
<whitequark> apeiros_: doesnt _id2ref check the object before returning it?
<whitequark> >> ObjectSpace._id2ref rand
<eval-in> whitequark => false (http://eval.in/12102)
<whitequark> >> ObjectSpace._id2ref rand
<eval-in> whitequark => false (http://eval.in/12103)
<whitequark> >> rand
<eval-in> whitequark => 0.8990814615597442 (http://eval.in/12104)
<whitequark> oh
<whitequark> >> ObjectSpace._id2ref rand(100000000)
<eval-in> whitequark => /tmp/execpad-8698f6b26dec/source-8698f6b26dec:2:in `_id2ref': 0x2a06b4a is not symbol id value (RangeError)
<eval-in> from /tmp/execpad-8698f6b26dec/source-8698f6b26dec:2:in `<main>' (http://eval.in/12105)
<whitequark> >> ObjectSpace._id2ref rand(100000000)
<eval-in> whitequark => /tmp/execpad-b278fd9a7722/source-b278fd9a7722:2:in `_id2ref': 0xbe26d2 is not symbol id value (RangeError)
<eval-in> from /tmp/execpad-b278fd9a7722/source-b278fd9a7722:2:in `<main>' (http://eval.in/12106)
<whitequark> well, like this.
eka has quit [Quit: Computer has gone to sleep.]
echobinary has quit [Read error: Connection reset by peer]
skattyadz has joined #ruby
echobinary has joined #ruby
<apeiros_> whitequark: not sure. but iirc, the last time I heard about "terminated object" was with _id2ref in play
Stilo has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<apeiros_> but that's been quite a while ago, so a) chances of misremembering, and b) might have been in 1.8 and no longer apply
unflores has quit [Ping timeout: 260 seconds]
malkomalko has joined #ruby
mikecmpbll has joined #ruby
unflores has joined #ruby
pabloh has joined #ruby
locriani has quit [Remote host closed the connection]
browndawg has joined #ruby
chussenot has joined #ruby
hasimo has joined #ruby
yshh has joined #ruby
aep has joined #ruby
<aep> is there a way to compile ruby with plugins built into the binary?
sk87 has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
carloslopes has joined #ruby
hogeo has quit [Remote host closed the connection]
tonini has quit [Remote host closed the connection]
generalissimo has quit [Remote host closed the connection]
<apeiros_> plugins?
generalissimo has joined #ruby
<aep> bigdecimal.so continuation.so coverage.so curses.so ...
rzs has quit [Ping timeout: 252 seconds]
<aep> abour 133 of them
yshh has quit [Ping timeout: 264 seconds]
oposomme is now known as oposomme|away
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
generalissimo has quit [Ping timeout: 248 seconds]
rickmasta has quit [Quit: Leaving...]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<peterhellberg> >> foo = ["bar", "baz"][0.99999999999999999]
<eval-in> peterhellberg => "baz" (http://eval.in/12108)
<peterhellberg> Y U MAD Ruby? ;)
<becom33> https://gist.github.com/anonymous/25dad605f1b119652a15 since I had put nil as the default parameter it goes comes that way
* becom33 anyone ?
<apeiros_> peterhellberg: not mad, just 0.99999999999999999 == 1.0
daniel_- has quit [Ping timeout: 245 seconds]
<peterhellberg> apeiros_: Yeah, floats are a bit tricky like that… especially since:
<peterhellberg> >> foo = ["bar", "baz"][0.9999999999999999]
<eval-in> peterhellberg => "bar" (http://eval.in/12109)
kofno has joined #ruby
<apeiros_> tbh, I'd expect ruby to raise
<becom33> anyone ?
<becom33> I want to get the "test.rb help speak" output when non of the paramters are passed . for a example when "test.rb speak"
<becom33> https://gist.github.com/anonymous/25dad605f1b119652a15 since I had put nil as the default parameter it goes comes that way
<becom33> anyone ?
<apeiros_> I find it sad, that ruby just coerces the value
<apeiros_> becom33: you don't have to repeat your question every 2 minutes. once every half hour is enough
oposomme|away is now known as oposomme
<becom33> I forgot to repeat the question before . so I had to say the whole thing again
monkegjinni has quit [Remote host closed the connection]
MehLaptop has quit [Remote host closed the connection]
<Hanmac> "had to" ... where is the guy that forced you to do that? :P
wreckimnaked has joined #ruby
<becom33> missing question forced me . 1/2 of the question won't make much sense
<peterhellberg> becom33: You don’t have a file variable… (line 17)
<becom33> petecheslock, wait
rzs has joined #ruby
<peterhellberg> becom33: And you don’t use the words variable
<becom33> petecheslock, this is just a example for my question
<peterhellberg> becom33: And you open the file read only, is that what you want?
shirokuro11 has joined #ruby
haxrbyte has joined #ruby
<becom33> petecheslock, well yea . thats not my problem if u run the script "test.rb help speak" it will give u the options
<peterhellberg> becom33: Yes, then it will print the help
S1kx has quit [Ping timeout: 255 seconds]
haxrbyte_ has quit [Read error: Connection reset by peer]
includex has quit [Ping timeout: 245 seconds]
ferdev has quit [Quit: ferdev]
<becom33> ok what I want to do is to pass the parameter or give a path to speak . but the when u do just "test.rb speak" it won't do anything coz words param is eq to nil
<Hanmac> becom33 why do you use File.open in this from? didnt we told you not to do that?
<becom33> what I want is to give a warning or a message when there are no parameters passed
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
vagmi has quit [Quit: vagmi]
NiteRain has quit [Ping timeout: 246 seconds]
DrCode has quit [Ping timeout: 276 seconds]
<becom33> Hanmac, just a demo
<becom33> I used file read as a example
<peterhellberg> becom33: http://whatisthor.com/ Just read the documentation about the usage of :required
DrCode has joined #ruby
<peterhellberg> becom33: I told you to read it earlier today :)
nkr has joined #ruby
sailias has joined #ruby
<becom33> yes I did
threesome has joined #ruby
<becom33> hold on
gregorg_taf has joined #ruby
<becom33> required is for the option . if the option is required
wallclockbuilder has quit [Read error: Connection reset by peer]
hybris has joined #ruby
<becom33> thats not what I want
wallclockbuilder has joined #ruby
<becom33> I wan't get a error if parameter OR the option is not passed
linusoleander has joined #ruby
linusoleander has quit [Read error: Connection reset by peer]
gregorg has quit [Read error: Connection reset by peer]
<peterhellberg> Then you are actively trying to do something Thor doesn’t support out of the box
<becom33> hmm then I get I have pass both as options right ?
hemanth has joined #ruby
<becom33> I guess *
malte_ has quit [Quit: malte_]
dustint has joined #ruby
<becom33> is there a method or somthing where I can get the message which displays when the "help speak" is called ?
<becom33> inside the script ofc
adT has joined #ruby
Es0teric has joined #ruby
<adT> hi
<adT> I have a string like this "0A" (always a byte in hexadecimal). How can I convert that to a integer (10 in this case)
hasimo has quit [Remote host closed the connection]
kristofers has quit [Read error: Connection reset by peer]
<hoelzro> >> '0A'.hex
<eval-in> hoelzro => 10 (http://eval.in/12110)
<hoelzro> adT: String#hex
grayson has joined #ruby
S1kx has joined #ruby
<adT> hoelzro: thank you. do you know any other way
<hoelzro> what's wrong with String#hex?
<adT> in the enviroment I'm I can not use it
<hoelzro> what environment would that be?
kristofers has joined #ruby
<hoelzro> if you're in some curated environment, just implement it yourself
tonini has joined #ruby
<adT> yes I think that's gonna be the solution, but thank you so much
Es0teric has quit [Client Quit]
ananthakumaran1 has quit [Quit: Leaving.]
jurassic has quit [Quit: jurassic]
Elhu has quit [Quit: Computer has gone to sleep.]
rzs has quit [Ping timeout: 248 seconds]
tonini has quit [Remote host closed the connection]
tonini has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
dhruvasagar has joined #ruby
skattyadz has quit [Quit: skattyadz]
yalue has joined #ruby
<Hanmac> adT:
<Hanmac> >> ['0A'.to_i(16),Integer('0x' + '0A'), Integer('0A',16)]
<eval-in> Hanmac => [10, 10, 10] (http://eval.in/12111)
dekroning has joined #ruby
swingha has joined #ruby
daxim has left #ruby ["pro quo, Agent Starling"]
chussenot has quit [Quit: chussenot]
yewton has quit [Excess Flood]
yewton has joined #ruby
yewton has quit [Excess Flood]
lolmaus has quit [Read error: Connection reset by peer]
yewton has joined #ruby
yewton has quit [Excess Flood]
lolmaus has joined #ruby
yewton has joined #ruby
otherj has joined #ruby
Udom0 has joined #ruby
skattyadz has joined #ruby
shirokuro11 has quit [Ping timeout: 272 seconds]
<adT> Hanmac: thank you so much I'm gonna try it
sailias has quit [Ping timeout: 248 seconds]
chussenot has joined #ruby
rzs has joined #ruby
ikst has joined #ruby
<adT> Hanmac: it seems It works correctly, thank you so much.
haxrbyte_ has joined #ruby
<adT> just a doubt. If I had "\x0A" instead, using "\x0A".to_i(16) returns 0
m8 has joined #ruby
<adT> I'm trying to know the reason
Elhu has joined #ruby
Gues_____ has joined #ruby
Gues_____ is now known as Guest1234
haxrbyte has quit [Ping timeout: 248 seconds]
echobinary has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
ozgura_ has joined #ruby
ozgura has quit [Ping timeout: 252 seconds]
fire has joined #ruby
mark_locklear has joined #ruby
iamjarvo has joined #ruby
dekroning has quit [Ping timeout: 264 seconds]
mootpointer has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
yacks has joined #ruby
tonini has quit [Remote host closed the connection]
<oposomme> hi, I need to thumbnails image is it possible to do it with ruby built in library or do I have to use RMagick?
<keymone> there is minimagick - rmagick without bloat
skattyadz has quit [Quit: skattyadz]
mark9 has left #ruby [#ruby]
rippa has joined #ruby
<oposomme> keymone: thx I will have a look
robustus has quit [Ping timeout: 255 seconds]
emocakes has joined #ruby
robustus has joined #ruby
Targen has quit [Ping timeout: 255 seconds]
yshh has joined #ruby
sambio has joined #ruby
gyre008 has joined #ruby
sandGorgon has quit [Read error: Connection reset by peer]
banjara has quit [Quit: Leaving.]
atyz has quit [Quit: Leaving...]
swingha has quit [Quit: WeeChat 0.4.0]
sandGorgon has joined #ruby
gyre007 has quit [Ping timeout: 248 seconds]
gyre008 has quit [Read error: Connection reset by peer]
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
Whoop has quit [Quit: Gone]
gyre007 has joined #ruby
chichou has quit [Remote host closed the connection]
ffranz has joined #ruby
Whoop has joined #ruby
gebbione has joined #ruby
MrSamuel has quit [Quit: MrSamuel]
<gebbione> hi all, an suggested eclipse plugin to work with ruby?
<gebbione> hi all, do you know any suggested eclipse plugin to work with ruby?
geekbri has joined #ruby
sirfilip has joined #ruby
lemonsparrow has joined #ruby
<Zelest> *reads lemonparty* :(
dblack_ has joined #ruby
<sirfilip> morning
<Hanmac> gebbione: when you look in the eclipse plugins repo you find one, but it may not work with ruby1.9 syntax
whowantstolivef1 has joined #ruby
tjbiddle has joined #ruby
eka has joined #ruby
<Hanmac> hm and there is also a little bug than you cant "debug" an project wich has the "wrong" type ... one of my project is C++ and ruby at the same time
beiter has joined #ruby
tjbiddle has quit [Read error: Connection reset by peer]
emocakes has quit [Quit: emocakes]
axhlf has quit [Remote host closed the connection]
apod has quit []
<gebbione> Hanmac: i installed something to help with dynamic languages, for Ruby but no highlights or changes after restarting ... do you just use a text editor?
NiteRain has joined #ruby
takeru has joined #ruby
freeayu has quit [Remote host closed the connection]
mootpointer has quit [Quit: Computer has gone to sleep.]
dorei has joined #ruby
v0n has joined #ruby
<dorei> is there any ruby data structure for handling bitfields?
akhet has joined #ruby
otherj has quit []
ebouchut has joined #ruby
tonini has joined #ruby
skattyadz has joined #ruby
wmoxam has joined #ruby
vagmi has joined #ruby
<JonnieCache> gebbione: its not common to use a heavy ide like eclipse with ruby
<JonnieCache> gebbione: because of the dynamic nature of the language you cant reliably do code completion or navigation
gregorg_taf has quit [Read error: Connection reset by peer]
`gregorg` has joined #ruby
<JonnieCache> gebbione: most people use a text editor
rzs has quit [Quit: Leaving]
slainer68 has quit [Read error: Connection reset by peer]
tonini has quit [Ping timeout: 248 seconds]
girija has quit [Ping timeout: 276 seconds]
slainer68 has joined #ruby
<wmoxam> gebbione: RubyMine is popular for folk who desire IDEs
verysoftoiletppr has joined #ruby
whitedawg has quit [Quit: Leaving.]
VinceThePrince has joined #ruby
<Hanmac> JonnieCache i use Eclispe for my gems ... but they are in C++ and have > 100 *.cpp files
hasimo has joined #ruby
drale2k has joined #ruby
tommyvyo has joined #ruby
pdamer has joined #ruby
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
ddd has quit [Read error: Connection reset by peer]
tealmage has joined #ruby
hasimo has quit [Ping timeout: 260 seconds]
tonini has joined #ruby
newUser1234 has joined #ruby
daniel_- has joined #ruby
johnnygoodmancpa has joined #ruby
krawchyk has joined #ruby
breakingthings has joined #ruby
johnnygoodmancpa has left #ruby [#ruby]
ddd has joined #ruby
tomzx_mac has joined #ruby
<tommylommykins> hmm
<tommylommykins> does anyone use netbeans for Ruby?
* tommylommykins really liked the netbeans plugin
<tommylommykins> seemed less buggy than other ruby IDEs
<breakingthings> using an ide for anything but a compiled language is sillypants
<tommylommykins> shame it's unmaintained now, I guess :s
<tommylommykins> breakingthings: But if you're doing staticish things in your dynamic language, which you probably are, then there's no reason not to use an IDE?
echobin86 has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<tommylommykins> at the very least, parsing and syntax hilighting as you type helps with brakect mismatching
becom33 has quit [Read error: Operation timed out]
<breakingthings> any fancy text editor can do that
pdamer has quit [Quit: pdamer]
<Hanmac> "staticsh" ... there is not such thing in ruby :P
<breakingthings> ^
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
monkegjinni has joined #ruby
<tommylommykins> staticish :s
<breakingthings> anyway point is
<breakingthings> TextMate, Sublime Text (which is the best thing an editor can be without being an IDE), y'know.
<breakingthings> Notepad++...
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<breakingthings> all dem have syntax highlighting, and bracket stuff, and...
pdamer has joined #ruby
VinceThePrince has left #ruby [#ruby]
pdamer has quit [Client Quit]
<tommylommykins> sublime text doesn't parse your code though... if you get a "you're missing a end", sublime doesn't offer tools to help you with that?
<breakingthings> packages
kevinfagan has joined #ruby
oposomme is now known as oposomme|away
<gebbione> how about ruby mine
<tommylommykins> gebbione: But it has all the bugs!
<tommylommykins> and its options window is almost as unnavigable as eclipse
<tommylommykins> and it wants all your money
solidoodlesuppor has joined #ruby
jerius has joined #ruby
<gebbione> after 30 days
Mattix has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
* tommylommykins installs sublimelinter
<breakingthings> Now you're thinking with packages
idkazuma has joined #ruby
cmdr-prmpt has joined #ruby
<tommylommykins> breakingthings: But it can't give me a convenient squiggly red line under the error as I type?
carraroj has joined #ruby
<breakingthings> tommylommykins: sublimelinter highlights the line on save
<tommylommykins> ooh
<tommylommykins> that'll do :D
uris has joined #ruby
Targen has joined #ruby
<breakingthings> you have package control, yea?
newUser1234 has quit [Remote host closed the connection]
<breakingthings> that's the most important important thing to be important about.
<tommylommykins> yeah
newUser1234 has joined #ruby
oposomme|away is now known as oposomme
jerius_ has joined #ruby
<JonnieCache> sublimelinter is great
<JonnieCache> especially for js
jgarvey has joined #ruby
jerius has quit [Ping timeout: 252 seconds]
jerius_ is now known as jerius
pac1 has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
hemanth has quit [Quit: This computer has gone to sleep]
Criztian has quit [Remote host closed the connection]
takeru has quit [Remote host closed the connection]
newUser1234 has quit [Ping timeout: 248 seconds]
becom33 has joined #ruby
becom33 has quit [Changing host]
becom33 has joined #ruby
browndawg has quit [Ping timeout: 276 seconds]
azm has quit [Ping timeout: 276 seconds]
hasse has joined #ruby
jrajav has joined #ruby
philcrissman has quit [Remote host closed the connection]
johnnygoodmancp1 has joined #ruby
wallclockbuilder has quit [Remote host closed the connection]
johnnygoodmancp1 has left #ruby [#ruby]
joofsh has joined #ruby
bean__ has quit [Ping timeout: 264 seconds]
adkron__ has joined #ruby
<hasse> My app uses a Client to connect to an API. The app uses the client on different places. Im thinking of doing the client to an singleton class and do the setup in an init file. Is that a bad idea?
jtharris has joined #ruby
huoxito has joined #ruby
SCommette has joined #ruby
joofsh has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 276 seconds]
joofsh has joined #ruby
ikst has quit [Remote host closed the connection]
sandGorgon has quit [Ping timeout: 252 seconds]
Vert has joined #ruby
Gwyxx has quit [Ping timeout: 245 seconds]
eik3 has joined #ruby
miskander has joined #ruby
justsee has quit [Quit: Leaving...]
<becom33> anyone for me ?
gebbione has quit [Quit: Page closed]
AlSquire has quit [Quit: This computer has gone to sleep]
v0n has quit [Ping timeout: 276 seconds]
<eik3> How can I avoid gets() emitting a \n character? I want to read an input but stay on the same line..
<apeiros_> it's not gets which emits the \n
<apeiros_> you'd have to take control over the IO
<apeiros_> in 1.9, you can use require 'io/console', see IO docs. you want noecho
<Hanmac> eik3 just strip the \n from gets
<flam_> /w 33
garbagecollectio has joined #ruby
AlSquire has joined #ruby
eik3_ has joined #ruby
garbagecollectio has left #ruby [#ruby]
<breakingthings> eik3: gets().chomp
<apeiros_> I don't think that's his issue @ Hanmac & breakingthings
adkron has quit [Ping timeout: 240 seconds]
<apeiros_> eik3: the ugly thing about noecho - you have to manually reimplement any line editing
tealmage has quit [Remote host closed the connection]
cmdr-prmpt has quit [Quit: Done-zo]
adkron_ has quit [Ping timeout: 276 seconds]
eik3 has quit [Ping timeout: 248 seconds]
carlyle has joined #ruby
<eik3_> sorry had a disconnect, first line i got was "<breakingthings> eik3: gets().chomp"
Xeago has quit [Remote host closed the connection]
<apeiros_> 15:23 apeiros_: it's not gets which emits the \n
<apeiros_> 15:23 apeiros_: you'd have to take control over the IO
<apeiros_> 15:24 apeiros_: in 1.9, you can use require 'io/console', see IO docs. you want noecho
<apeiros_> the part about noecho is wrong, though. it's insufficient.
oposomme has quit [Quit: Linkinus - http://linkinus.com]
<apeiros_> while it will avoid the newline, it also shuts down all displaying of what the user enters, without giving you a way to emulate that.
kofno has quit [Remote host closed the connection]
<eik3_> I'd like to see what user inputs, but just stay on the same line
blueOxigen has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
nick_h has quit [Read error: Operation timed out]
<apeiros_> I understood. sadly that's rather complicated.
VinceThePrince has joined #ruby
shevy has quit [Read error: Operation timed out]
EzeQL has joined #ruby
<apeiros_> $stdout.sync=true; $stdin.noecho { |i| until (c = i.getch) == "\n"); print c; end } # incomplete, but should give you the basic idea
philcrissman has joined #ruby
<EzeQL> hi, is it same to use "&&" and "and"?
<apeiros_> line editing (backspace e.g.) etc. will get lost
<apeiros_> EzeQL: precedence
<EzeQL> whats the diff
<breakingthings> precedence is.
<breakingthings> && holds the one true ring
<breakingthings> and is it's little brother who helps out but && will punch him right in the face given the chance
bluOxigen has quit [Ping timeout: 240 seconds]
kofno has joined #ruby
keymone has quit [Quit: keymone]
<Hanmac> "&&" + "||" are more mighty than "and" + "or
<Hanmac> "
apod has joined #ruby
<eik3_> apeiros_, I get in `<main>': undefined method `noecho' for #<IO:<STDIN>> (NoMethodError)
codecop has quit [Remote host closed the connection]
R_Macy has joined #ruby
<apeiros_> 15:24 apeiros_: in 1.9, you can use require 'io/console', see IO docs. you want noecho
<apeiros_> eik3_: ^
vlad_starkov has joined #ruby
hemanth has joined #ruby
end_guy has quit [Ping timeout: 276 seconds]
<eik3_> ok
end_guy has joined #ruby
<becom33> how can I run a system command and get the result into a variable ?
pepper_chico has joined #ruby
<eik3_> hm, kinda works, but my 'trap INT' is broken now
<apeiros_> more than just that
<apeiros_> I didn't store the result anywhere, line editing is gone, etc.
<apeiros_> as I said, it's rather complicated :-/
pseudonymous has joined #ruby
<eik3_> I'm surprised that such a quite simple thing has to be complicated in ruby.. :/
browndawg has joined #ruby
<apeiros_> eik3_: you don't understand.
browndawg has quit [Max SendQ exceeded]
<apeiros_> this problem isn't about ruby.
<apeiros_> with a plain `gets`, ruby has *no* control over the input device
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<apeiros_> it just waits until it gets the data back
<pseudonymous> Is there a way to bind a method to a variable ? It's just a regular ol' method and I'd rather wait before I apply it
<apeiros_> but if you take over control over the input device, then you're responsible for handling *every* input on that device.
browndawg has joined #ruby
<eik3_> do you know of any library that handles that?
<dblack_> pseudonymous: m = object.method(method_name)
<apeiros_> you might check whether curses, highline or readline provide facilities for what you want
<apeiros_> but I doubt it
<apeiros_> it's not really a common usecase what you want
bluOxigen has joined #ruby
xbob has joined #ruby
DaltonUS has joined #ruby
DaltonUS has quit [Client Quit]
<eik3_> ok so I'll work around it - thanks for your time!
DrShoggoth has joined #ruby
blueOxigen has quit [Ping timeout: 245 seconds]
eik3_ has quit [Quit: connection reset by beer]
bluOxigen has quit [Client Quit]
generalissimo has joined #ruby
cek has joined #ruby
pdamer has joined #ruby
<cek> what's the best way to define method dynamically? I'd like the debugger to "see" them.
dhruvasagar has joined #ruby
nick_h has joined #ruby
<cek> self.class_eval etc doesn't quite work
Virunga has joined #ruby
vlad_starkov has quit [Ping timeout: 255 seconds]
daniel_- has quit [Quit: WeeChat 0.3.9.2]
phantasm66 has joined #ruby
xbob has quit [Quit: Leaving]
<walbert> cek: self.define_method might be what you're looking for
<sirfilip> why class_eval dont work ?
newUser1234 has joined #ruby
<cek> debugger doesn't step in
pdamer has quit [Quit: pdamer]
a_a_g has quit [Quit: Leaving.]
nsxt has joined #ruby
vlad_starkov has joined #ruby
stopbit has joined #ruby
<nsxt> So I'm writing my first gem, but I'm having a little trouble deciding where best to put some mustache templates that will be parsed by the library itself... Is it best to put them in a /templates folder at the project root?
<whitequark> nsxt: for example
BizarreCake has joined #ruby
_jc has joined #ruby
<cek> A.instance_exec { (class << self; self; end).send(:define_method, :bb){'crap2'} }
<cek> seems to be working now :/
dsferreira has joined #ruby
hemanth has quit [Quit: This computer has gone to sleep]
__Big0__ has joined #ruby
<whitequark> cek: replace that with A.class_exec { def ... }
failshell has joined #ruby
<cek> def would open a new context
<apeiros_> A.define_singleton_method(:bb) { … }
<whitequark> *def self.foo ...
<whitequark> or what apeiros_ said
<cek> ruby187
dsferreira has quit [Remote host closed the connection]
<whitequark> cek: ruby1.8 is EOL.
<whitequark> stop using it, please.
theRoUS has joined #ruby
<apeiros_> `A.instance_exec { (class << self; self; end)` --> `(class << A; self; end)`
<nsxt> whitequark: Hm?
chrishough has joined #ruby
gothicsouth has quit [Ping timeout: 245 seconds]
dsferreira has joined #ruby
wallerdev has joined #ruby
<whitequark> nsxt: ruby 1.8 is approaching end of life. in 3 months there will be no more updates, including security
<whitequark> it's also ancient.
<whitequark> use 1.9.
<nsxt> No, I was referring to your "for example" response to my question.
slainer68 has quit [Ping timeout: 248 seconds]
<whitequark> nsxt: ah. yes, you can use, for example, /templates in the root of your gem
sirish has joined #ruby
echobin86 has quit [Read error: Connection reset by peer]
gothicsouth has joined #ruby
echobinary has joined #ruby
<nsxt> whitequark: Great. What's the best way, then, to require those templates without doing a "../../templates" sort of thing? Is there a common idiom to load paths in something like a Config class, and then refer to that?
slainer68 has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
enebo has joined #ruby
vlad_starkov has joined #ruby
swex_ has quit [Read error: Connection reset by peer]
aaronmcadam has joined #ruby
swex has joined #ruby
<aaronmcadam> anyone use tmux and rvm? I'm having really annoying issues trying to run rails server, it keeps looking in @global gemset instead of my @project one
<aaronmcadam> "...ruby-1.9.3-p392@global/gems/bundler-1.3.1/lib/bundler/rubygems_integration.rb:214:in `block in replace_gem': rail│* 7a001a4 Merge pull request #6 from crowdlab-uk/update-factory-girl Aaron Mc Adam, 24h ago
<aaronmcadam> ties is not part of the bundle. Add it to Gemfile. (Gem::LoadError) "
<aaronmcadam> whoops soz
frem has joined #ruby
<walbert> nsxt: You probably don't want to use strictly relative paths - because you probably don't have too much control over the pwd - especially from a gem. I don't know of any idiomatic way of doing it other than File.dirname(__FILE__) + "../relative/path/to/file"
includex has joined #ruby
ananthakumaran has joined #ruby
ttt has quit [Remote host closed the connection]
wf2f has quit []
Illusioneer has joined #ruby
ttt has joined #ruby
<whitequark> nsxt: yeah, what walbert said
QaDeS_ has joined #ruby
<nsxt> Right, but I'd rather not litter the source with relative path requires - is it considered a 'good practice' to set that once in some sort of Config class? Or does that have its own drawbacks as well?
AxisOfEval has joined #ruby
<walbert> nsxt: Of course. If you're duplicating code, it's "good practice" to avoid duplicating code . If you need that path more than once, you should tuck it away somewhere.
QaDeS has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
joofsh has quit [Remote host closed the connection]
<nsxt> walbert: Sure. Makes sense... thanks!
caveat- has joined #ruby
<apeiros_> the good practice for requires is to properly set up $LOAD_PATH
ttt has quit [Ping timeout: 276 seconds]
quazimodo has quit [Read error: No route to host]
choclo1 has quit [Ping timeout: 252 seconds]
choclo has joined #ruby
<nsxt> apeiros_: but if these files are not rb files?
<walbert> apeiros_: Even for a gem? I don't really want my $LOAD_PATH tainted by a third party
interactionjaxsn has joined #ruby
adambeynon has joined #ruby
<walbert> Especially if the third party is going to "win" if there's a filename collision
averiso has quit [Ping timeout: 260 seconds]
jrajav has quit [Quit: I tend to be neutral about apples]
drale2k has quit [Quit: Leaving...]
<apeiros_> nsxt: when you say "require", I assume Kernel#require
beiter has quit [Quit: beiter]
<nsxt> apeiros_: Poor word choice. I was referring to mustache templates.
<apeiros_> walbert: for a gem you don't have to do anything, because rubygems properly sets up $LOAD_PATH for you
ExxKA has quit [Quit: This computer has gone to sleep]
<apeiros_> nsxt: ah. Gem.datadir is what I use. though the method to retrieve the datadir seems to be due for deprecation.
averiso has joined #ruby
xbayrockx has joined #ruby
drale2k has joined #ruby
xbayrockx is now known as wf2f
<apeiros_> walbert: if you require_relative in a gem, "you're doing it wrong"™ ;-) (all requires relative to 'lib' will work automatically)
<nsxt> apeiros_: I'll take a look anyway, thanks.
<apeiros_> nsxt: the mechanism is not being deprecated. only the way to retrieve the datadir.
mntzn has quit [Quit: leaving]
<apeiros_> an oddity of the datadir is that the gemname is repeated in the path. e.g. YOURGEM/data/YOURGEM/
astegman has joined #ruby
<nsxt> apeiros_: I'm trying to find an example of its usage, I'm not having much luck.
<apeiros_> hm, not exactly easily understandable - but here https://github.com/apeiros/swissmatch-location I use it
joofsh has joined #ruby
<nsxt> apeiros_: Understood, thanks.
johannesbodannes has joined #ruby
chrishough has quit [Read error: Connection reset by peer]
chrishough has joined #ruby
<johannesbodannes> Why would...
<johannesbodannes> "'hi'".gsub(/'/, "\\'")
_nitti has joined #ruby
<johannesbodannes> just give me "hi'hi"?
<johannesbodannes> I was looking to prepend each apostrophe with a backslash
Zolo has joined #ruby
<apeiros_> because \' is special
v0n has joined #ruby
<johannesbodannes> Oh yes? Hm...
<apeiros_> "'hi'".gsub(/'/, "\\\\'")
<apeiros_> ugly, but necessary
wallerdev has quit [Quit: wallerdev]
danneu has joined #ruby
<johannesbodannes> Fantastic, thanks!
girija has joined #ruby
johnnygoodmancpa has joined #ruby
filipe_ has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 252 seconds]
hemanth has joined #ruby
PigDude has joined #ruby
<VinceThePrince> I'm having some difficulty starting foreman: http://pastie.org/6412223 I'm not using ruby 1.8.7 and he's complaining about it?
pavilionXP has quit [Remote host closed the connection]
huoxito has quit [Quit: Leaving]
pavilionXP has joined #ruby
Targen has quit [Read error: Connection reset by peer]
jjbohn has joined #ruby
Targen has joined #ruby
Rioji has joined #ruby
nomenkun has joined #ruby
pdamer has joined #ruby
Morkel has quit [Quit: Morkel]
joshman_ has joined #ruby
samphippen has joined #ruby
sambao21 has joined #ruby
jlast has joined #ruby
<PigDude> I need help with using the -r option to `irb` and `ruby`. Why can I require 'foo' from the shell, invoked by `irb -rubygems`, but `irb -rubygems -rfoo` does not locate foo?
johnnygoodmancpa has left #ruby [#ruby]
carloslopes has quit [Remote host closed the connection]
danman has joined #ruby
maycon_ has quit [Changing host]
maycon_ has joined #ruby
maycon_ is now known as maycon
brandon|_ has quit [Remote host closed the connection]
braoru has quit [Quit: Leaving]
bean__ has joined #ruby
bean__ has quit [Max SendQ exceeded]
<walbert> VinceThePrince: Perhaps when your json gem was compiled, it found ruby 1.8.7's headers rather than 1.9.3's - and compiled/linked against it? That's not a normal error, regardless. Try "gem uninstall json -v 1.7.7", and try a fresh bundle install for foreman.
brandon|work has joined #ruby
_maes_ has joined #ruby
wyhaines has joined #ruby
<VinceThePrince> walbert, i'm doing that :) hope it will work
bean__ has joined #ruby
bean__ has quit [Max SendQ exceeded]
maycon is now known as Inseto_Verde
girija has quit [Ping timeout: 264 seconds]
Inseto_Verde is now known as maycon
bean__ has joined #ruby
nari has quit [Ping timeout: 250 seconds]
_nitti has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
<VinceThePrince> walbert, same bug but now with eventmachine :s
_nitti has joined #ruby
mmitchell has joined #ruby
<walbert> Yeah - it's defintiely related to your json gem, and not local to foreman.
Targen has quit [Ping timeout: 255 seconds]
sirfilip has quit [Quit: Leaving]
flakrat has joined #ruby
tonini has quit [Remote host closed the connection]
terrorpup has joined #ruby
<Hanmac> .... isnt json in stdlib so you dont need an json gem??
thone has joined #ruby
pyro111 has quit [Quit: Leaving]
AndChat| has quit [Ping timeout: 248 seconds]
chrishunt has joined #ruby
Banistergalaxy has joined #ruby
<walbert> Hanmac: The json in stdlib is pure ruby, but there's a gem of the same name which relies heavy on C extensions for a speed advantage.
Choobie has quit [Quit: End]
akashj87 has joined #ruby
C0deMaver1ck has joined #ruby
atyz has joined #ruby
drale2k has quit [Quit: Linkinus - http://linkinus.com]
<C0deMaver1ck> does anybody have any suggestions about working with the google webmaster tools api?
<C0deMaver1ck> all the gems seem to be 3+ years old
thone_ has quit [Ping timeout: 245 seconds]
drale2k has joined #ruby
pdamer has quit [Quit: pdamer]
<withnale> I've got a list of hashes.. Is there any clean way to just output a table of them based on hash keys?
<Hanmac> walbert liar ... the json i have in my ruby is an C extension too
pencilcheck has joined #ruby
bean__ has quit [Ping timeout: 276 seconds]
<withnale> list.table([ :name, :value1, :value2 ]) --- ?
Guest6054 is now known as ixx
gothicsouth has quit [Ping timeout: 245 seconds]
whowantstolivef1 has quit [Ping timeout: 248 seconds]
Xeago has joined #ruby
<flakrat> I have a variable populated by an ldap search that results in "dn", my code then does a pattern match of: next if attribute =~ /dn/ this successfully skips on one system, but on another it's fails and continues the loop
blaxter is now known as iblaxter
bean__ has joined #ruby
angle has joined #ruby
_jc has quit [Quit: Computer has gone to sleep.]
pen has quit [Ping timeout: 248 seconds]
angle has quit [Max SendQ exceeded]
<flakrat> I've done a puts on that variable and it only contains dn, any idea why the pattern match wouldn't work? If I hard code it, it does work, but populating the variable from ldap.search the pattern match fails
gothicsouth has joined #ruby
angle has joined #ruby
angle has quit [Read error: Connection reset by peer]
<walbert> Hanmac: You've got me there. Though what I said certainly used to be the case.
lolmaus has quit []
<flakrat> Here's the code: http://pastebin.com/J1jpyakF
<Hanmac> withnale: hash.values_at(*keys)
<flakrat> I've tried /dn/ /^dn/ and == 'dn', all of those work on my Fedora 18 workstation, but fail on a CentOS 5.8
jjbohn is now known as jjbohn|afk
baba has joined #ruby
fire has quit [Ping timeout: 245 seconds]
jjbohn|afk is now known as jjbohn
malte_ has joined #ruby
swoosh has quit [Quit: Computer has gone to sleep.]
Vert has quit [Remote host closed the connection]
<Hanmac> walbert: ruby does ship the json gem inside too same for rdoc, rake, bigdecimal and others
eldariof has joined #ruby
girija has joined #ruby
angle has joined #ruby
anonymuse has joined #ruby
angle has quit [Max SendQ exceeded]
nateberkopec has joined #ruby
<VinceThePrince> walbert, reinstall of rvm did the trick :)
angle has joined #ruby
drale2k has quit [Quit: Leaving...]
mattbl has joined #ruby
angle has quit [Max SendQ exceeded]
razibog has quit [Ping timeout: 250 seconds]
drale2k has joined #ruby
j^2 has joined #ruby
whitedawg has joined #ruby
mercwithamouth has joined #ruby
Virunga has quit [Remote host closed the connection]
tagrudev has quit [Quit: Me = Awesome]
gothicsouth has quit [Ping timeout: 245 seconds]
Elhu has quit [Ping timeout: 252 seconds]
<flakrat> hmm, strange, I had to add to_s to get it to work: next if attribute.to_s =~ /^dn/
Elhu has joined #ruby
apeiros_ has quit [Remote host closed the connection]
locriani has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
skattyadz has quit [Quit: skattyadz]
forrest has joined #ruby
testingb0t1 has quit [Quit: Leaving.]
echobinary has joined #ruby
gothicsouth has joined #ruby
ebouchut has quit [Quit: Quitte]
<Hanmac> flakrat ... i think is a difference between 1.8 and 1.9+ ... =~ works for symbol on 1.9 ... on 1.8 it does not
drumond19 has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
_andre has joined #ruby
<_andre> hello
<_andre> does anyone know how to create a File object from a file descriptor in a C extension?
carloslopes has joined #ruby
<flakrat> Hanmac, thanks, that explains it then
spider-mario has joined #ruby
<Hanmac> _andre: ... so you have a FILE or and int of the fd?
<flakrat> I was thinking something along the lines of non printable characters, but attempting stuff like attribute.chomp produced an undefined method, this lead to the realization that it was a symbol and not a string :-)
<_andre> Hanmac: an int
forced_request has quit [Remote host closed the connection]
sambao21 has quit [Quit: sambao21]
<walbert> _andre: I believe you can instantiate an object of the IO class with just a fd - is it imperative that you create a File object?
mikecmpbll has joined #ruby
<_andre> walbert: 'imperative' is a strong word :) but i would like to be able to call #lstat on the object
<_andre> which is available in File but not in IO
joshman_ has quit [Ping timeout: 264 seconds]
nomenkun has quit [Ping timeout: 252 seconds]
daniel_- has joined #ruby
<Hanmac> _andre: rb_funccall(rb_cIO,rb_intern("for_id"),INT2NUM(fd)) .... but you cant get lstat for it :(
hbpoison has quit [Ping timeout: 276 seconds]
joshman_ has joined #ruby
sambao21 has joined #ruby
carloslopes has quit [Ping timeout: 252 seconds]
takeru has joined #ruby
PigDude has left #ruby [#ruby]
caveat- has quit [Ping timeout: 245 seconds]
chrishunt has quit [Quit: ZzZzZz...]
chrishunt has joined #ruby
nomenkun has joined #ruby
BizarreCake has quit [Quit: Leaving]
alex__c2022 has joined #ruby
aed has joined #ruby
puppeh has quit [Remote host closed the connection]
girija has quit [Read error: Operation timed out]
miskander has quit [Read error: Connection reset by peer]
io_syl has quit [Quit: Computer has gone to sleep.]
miskander has joined #ruby
takeru has quit [Ping timeout: 255 seconds]
ttt has joined #ruby
sambao21 has quit [Quit: sambao21]
ferdev has joined #ruby
io_syl has joined #ruby
<becom33> I know what I have done here is wrong https://gist.github.com/anonymous/b670d337896c0ac75a25, what I wanted to do is get the array string/strings which has (deleted) in it and get the value (in this script "26")
peterhellberg has left #ruby [#ruby]
rubarlion has joined #ruby
geggam_wk has joined #ruby
Coolhand|laptop has joined #ruby
echobinary has quit [Quit: -a-]
Ageo_ has joined #ruby
<Ageo_> Hello all
echobinary has joined #ruby
<Ageo_> I have a little problem with ruby, can you help me plz ?
<Ageo_> i don't find a solution on internet, 2h i test -_-
d2dchat has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
<dblack_> Ageo_: if you have a question just ask it :-)
<Ageo_> ok :)
ttt has quit [Ping timeout: 256 seconds]
baba has quit [Quit: WeeChat 0.4.0]
<Ageo_> i try to install sql3-ruby-1.3.3.gem
jonahR has joined #ruby
<Ageo_> i have installed gem, and dll sqlite on C:\Ruby200\bin
<Ageo_> but when i try to "gem install sql3-ruby-1.3.3.gem"
hbpoison has joined #ruby
<becom33> nvm I got it done
<Ageo_> i have this error: unable to resolve dependencies sqlite3-ruby require sqlite3
cek has quit [Quit: жопа диридай диридиридай]
io_syl has quit [Read error: Operation timed out]
huoxito has joined #ruby
<Ageo_> i have look all google on this problem but anithing resolv this -_-
rubarlion has quit [Ping timeout: 255 seconds]
garbagecollectio has joined #ruby
Targen has joined #ruby
<garbagecollectio> what is a rack app vs a rails app
<walbert> Ageo_: First of all, you shouldn't download the gem file. Rubygems (the gem command) will work much better if you allow it to find and install the packages you want by itself. "gem install sqlite3-ruby" should suffice without the gem file.
etcetera has joined #ruby
vereteran has quit [Quit: ZNC - http://znc.in]
a_a_g has joined #ruby
tcstar has joined #ruby
<walbert> Ageo_: Second of all, make sure that the sqlite dll is in a directory your PATH environment variable contains. On windows, that's probably something you'll have to double-check.
<Ageo_> same error walbert and if i try to gem install sqlite3 i have "unable to download data from rubygem.org"
Takehiro has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 240 seconds]
jonahR has quit [Quit: jonahR]
aganov has quit [Quit: aganov]
<Ageo_> on my path, i have this: C:\Ruby200\bin
<Ageo_> where my sqlite dll is stocked
naquad has joined #ruby
Morkel has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
Bira has joined #ruby
vagmi is now known as bitcoinnoob
bitcoinnoob is now known as vagmi
<Ageo_> and i have sqlite3.dll & sqlite3.def on the folder
vagmi is now known as bitcoin00b
girija has joined #ruby
<walbert> Ageo_: I don't think I can help you any further. It looks like this issue on github might have some answers: https://github.com/luislavena/sqlite3-ruby/issues/82
jurassic has joined #ruby
Zolo has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
<Ageo_> gem install sqlite3 --platform=ruby -- --with-sqlite3-dir=C:\Ruby200\bin
<Ageo_> same problem unable to download
pencilcheck has quit []
nachtwandler has joined #ruby
pen has joined #ruby
aaronmcadam has quit [Quit: Linkinus - http://linkinus.com]
<Spooner_> You probably don't want to use the ruby version (rather than the binary version) and you don't need to specify the directory since it will find it since that will be on the path already.
shevy2 has joined #ruby
<Spooner_> You want the x86-mingw32 version (which will be the one it downloads by defaut).
<Ageo_> no need to compile sqlite3 -_- WTF
locriani has quit [Remote host closed the connection]
adayzdone has joined #ruby
<Spooner_> "gem install sqlite3" would be fine.
Zolo has joined #ruby
walbert has left #ruby [#ruby]
walbert has joined #ruby
chussenot has joined #ruby
skattyadz has joined #ruby
baroquebobcat has joined #ruby
monkegjinni has joined #ruby
Gwyxx has joined #ruby
hbpoison has quit [Ping timeout: 276 seconds]
hbpoison has joined #ruby
joeycarmello has quit [Remote host closed the connection]
carloslopes has joined #ruby
joeycarmello has joined #ruby
cmdr-prmpt has joined #ruby
crised has joined #ruby
VinceThePrince has quit [Quit: Leaving]
<crised> Do I need rails to make a contact form?
<Spooner_> Ageo_, The -ruby version is pure source, so you'd have to compile it. In this case, of course, you can just download the pre-compiled version.
idkazuma has quit [Remote host closed the connection]
Stilo has joined #ruby
<Spooner_> crised, You can create a contact form with Rails, but no, you could use any framework to make it.
<Ageo_> i have installed this ruby http://rubyinstaller.org/
idkazuma has joined #ruby
jamesfung14 has joined #ruby
radic_ has quit [Quit: Verlassend]
samphippen has quit [Quit: Computer has gone to sleep.]
<crised> Spooner_: Which is the easiest way to do this?
<Spooner_> I'd recommend using 1.9.3 if you are having problems of any kind (or are new to Ruby). 2.0 has only been released for a few weeks and not all gems work with it yet.
radic has joined #ruby
<Ageo_> how ok
<Ageo_> i test tomorrow with 1.9.3 :) my day is done now
mattbl has quit [Quit: This computer has gone to sleep]
<Spooner_> crised, Sinatra is a much lighter-weight framework than Rails. Might suit you.
<Ageo_> RubyInstaller 1.9.3-p392 released
<Spooner_> Ageo_, You can use "pik" to manage multiple versions of Ruby on one machine.
<Spooner_> *one Windows machine.
<Ageo_> ok thx spooner i try tomorrow
<Ageo_> i leave my work
<Ageo_> i have nice day all and thx :)
<Ageo_> bb
Targen has quit [Ping timeout: 264 seconds]
jjbohn is now known as jjbohn|afk
mahmoudimus has joined #ruby
Ageo_ has quit [Quit: Page closed]
mahmoudimus has quit [Client Quit]
mockra has joined #ruby
Targen has joined #ruby
averiso has quit [Quit: Quit.]
<shevy2> dumdedum
shevy2 is now known as shevy
ckrailo has joined #ruby
monkegjinni has quit [Remote host closed the connection]
hasse has quit [Ping timeout: 245 seconds]
apod has quit []
zigomir has quit [Quit: zigomir]
danneu has quit [Quit: WeeChat 0.3.8]
Takehiro has joined #ruby
<splud> I'm having lots of grief working with an array of arrays...
<breakingthings> splud how so
<splud> Currently, want to delete (delete_if seems appropriate) elements where there's another with a duplicate value, but I want to be selective about which gets deleted:
<splud> a = [[1,"string1],[4,"string1"],[1,"string2"]]
dougireton has joined #ruby
<splud> the numbers represent signal strength, the strings, an essid.
<splud> (actual list is much larger)
DrShoggoth has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 264 seconds]
<splud> (and contains many other elements in the array)
hoelzro is now known as hoelzro|away
<Spooner_> That doesn't look too complex. Depends on your criteria for deletion though.
cmdr-prmpt has quit [Quit: Done-zo]
froy has joined #ruby
huoxito has quit [Quit: Leaving]
<breakingthings> splud: well, give an example of what you want to do with your example array there
huoxito has joined #ruby
a_a_g has quit [Quit: Leaving.]
<splud> delete only if count of elements where the string matches is >1, and where the numeric is less than or equal to the max.
<Spooner_> Max of what?
<splud> max of the elements where the strings match.
khismetix has joined #ruby
EzeQL has left #ruby [#ruby]
a_a_g has joined #ruby
mattbl has joined #ruby
a_a_g has quit [Client Quit]
<splud> I desire to end up with a = [[4,"string1"],[1,"string2"]]
Davey has joined #ruby
<splud> (given the above example).
epta has quit [Ping timeout: 248 seconds]
<Spooner_> The number is _always_ going to be less than or equal to the max.
<splud> yes, as long as there are MORE THAN 1 matching string.
<Spooner_> What you mean is "delete the element with the lowest value until there is only one left"?
epta has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
<splud> a = [[4,"string1"],[4,"string1"],[1,"string1"]]
becom33 has quit [Ping timeout: 248 seconds]
echobinary has joined #ruby
<shevy> hmm there is funny character in the middle
<splud> Spooner : that'd work, though "lowest" needs to accomodate equal.
<Spooner_> Does the order of the outer array matter?
mattbl is now known as MattRB
<splud> may not be ordered.
<splud> I can re-order afterwards.
jpfuentes2 has joined #ruby
joeycarmello has quit [Remote host closed the connection]
markalanevans has quit [Quit: markalanevans]
<splud> This operation is to remove same-named ESSIDs from a network scan and retain just the strongest one, as the association would be with the ESSID (textual name of the network), not the BSSID (basically MAC of the individual AP)
<whitequark> splud: didn't read all of the backlog, but it seems that you need `sort_by`
girija has quit [Ping timeout: 264 seconds]
crised has left #ruby [#ruby]
jbueza has joined #ruby
timonv has quit [Remote host closed the connection]
hemanth has quit [Quit: This computer has gone to sleep]
<splud> Still wondering how I match and delete here...
_nitti has quit [Remote host closed the connection]
danneu has joined #ruby
eAlchemist has joined #ruby
<whitequark> splud: don't delete. a.sort_by { |(a,*),(b,*)| a <=> b }.first
<splud> I can sort the array fine (on a single element at least). Not sure how I'd sort on essid and subsort on strength...
<splud> dpm
<splud> don't ?
sepp2k1 has joined #ruby
<whitequark> splud: yes. don't delete elements, replace the whole array with one of its elements
<whitequark> as per essid/strength
robbyoconnor has joined #ruby
mercwithamouth has quit [Ping timeout: 276 seconds]
<whitequark> you can sort by two factors like this: [ssid1, rssi1] <=> [ssid2, rssi2]
<whitequark> arrays delegate sorting to their elements
Zolo has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 250 seconds]
arturaz_ has joined #ruby
Hanmac has joined #ruby
sepp2k has quit [Ping timeout: 248 seconds]
<Spooner_> whitequark, Sorting isn't the messy bit.
bigoldrock has joined #ruby
includex has quit [Ping timeout: 245 seconds]
sirish has quit [Ping timeout: 250 seconds]
chussenot has quit [Quit: chussenot]
robbyoconnor has quit [Max SendQ exceeded]
<Spooner_> whitequark, Also, #sort_by is orders of magnitude faster than #sort
hbpoison has joined #ruby
<splud> Spooner: you rock. Thanks.
<whitequark> Spooner_: I've suggested sort_by
brianpWins has joined #ruby
robbyoconnor has joined #ruby
elux has joined #ruby
brianpWins has quit [Client Quit]
chrishough has quit [Quit: chrishough]
<Spooner_> Yes, but it should just be a.sort_by {|a, b| a }; it would be a.sort {|(a,*),(b,*)| a <=> b}
<whitequark> Spooner_: oh right, I've screwed that up
fermion has quit [Quit: Textual IRC Client: www.textualapp.com]
<Hanmac> Spooner_ what about .sort_by(&:first)
<dblack_> what about just sort?
<dblack_> a.sort
<dblack_> => [[1, "string1"], [4, "string1"], [4, "string1"]]
<Spooner_> Yes, that would do it to. However, I found #max_by was fine in this case ;)
astegman has quit [Quit: Computer has gone to sleep.]
mafolz has quit [Ping timeout: 276 seconds]
becom33 has joined #ruby
becom33 has quit [Changing host]
becom33 has joined #ruby
<splud> now, if there are other elements .... [bssid, channel, strength, features, essid]
<Spooner_> I've updated the gist with that nicer suggestion by Hanmac.
mpfundstein has quit [Remote host closed the connection]
Inoperable has quit [Quit: ZNC - http://znc.in]
<splud> what do the keys become?
Faris has joined #ruby
banjara has joined #ruby
<Spooner_> You remind me of every employer in the world. Change the spec just after you submit ;)
dougireton has quit [Quit: Leaving.]
<shevy> splud just can not make up his mind :(
pdamer has joined #ruby
_nitti has joined #ruby
<splud> the {|n,s| s} in the group_by for instance -- I see examples in the ruby book with {|lang| lang[0]}
<Guest1234> has anyone successfully used the zk gem?
<Spooner_> In that case, |n, s| is the number and string in each of the arrays.
Voodoofish430 has joined #ruby
_nitti has quit [Read error: Connection reset by peer]
mahmoudimus has joined #ruby
<splud> so [0] and [1]
<Spooner_> You could just use {|arr| arr[3] } if that is more appropriate for your data.
Vert has joined #ruby
chrishough has joined #ruby
<splud> how would I say [2] and [4] ?
<Spooner_> Without having to extract all the elements.
_nitti has joined #ruby
<splud> snap. thanks.
joeycarmello has joined #ruby
tommyvyo has quit [Quit:]
k610 has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
fermion has joined #ruby
<k610> i am looking for a gem that can help build an app like the one found in the cisco routers aka cisco cli
<whitequark> k610: like if we know how cisco cli looks like
malte_ has quit [Quit: malte_]
<k610> you launch the command then in the command you can tab complete everything
<whitequark> readline
<whitequark> it's not gem, it's stdlib
<k610> available commands , sub commands and argumetns
robbyoconnor has quit [Excess Flood]
hashtree has joined #ruby
pskosinski has quit [Ping timeout: 252 seconds]
<Mon_Ouie> You can just add a command line option parser for that (e.g. optionparser, slop)
<k610> i used this egg before in python : https://code.google.com/p/squires/
<k610> and it's really awsome hacked it to add in some colors too
gaahrdner has joined #ruby
<Mon_Ouie> Hidden commands, for debug <- Yeah, let's hide debugging features! :p
<k610> i was looking at gems such as : thor, sub, gli, mixlib-cli , etc ...
pskosinski has joined #ruby
robbyoconnor has joined #ruby
sambao21 has joined #ruby
etcetera has quit []
Mattix has quit [Quit: Leaving]
_nitti_ has joined #ruby
<Spooner_> splud, Should be clearer for the more general case: https://gist.github.com/Spooner/c0a753f0dad2f2c78bd9
<k610> https://code.google.com/p/squires/wiki/SquiresHowto this page shows quite well how it works with an example
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
<Mon_Ouie> Well, Readline can do that, you just need to write the completion proc yourself
BizarreCake has joined #ruby
<k610> atm i found this for ruby : http://h3rald.com/articles/inline-introduction/
banjara has quit [Client Quit]
rafacv has joined #ruby
banjara has joined #ruby
luckyruby has quit [Remote host closed the connection]
<k610> which handles tab_completion , ctrl+c-x-d-e already
<k610> i presume
sailias has joined #ruby
* Hanmac giggles everytime someone thought they could do tabcomplete on an dynamic language like ruby :D
<shevy> I hate the readline completion proc API
<k610> rawline seems so outdated though
banjara has quit [Client Quit]
<Spooner_> Hanmac, It works out fine if your editor is psychic and knows what the object class will be.
banjara has joined #ruby
_nitti has quit [Ping timeout: 276 seconds]
banjara has quit [Client Quit]
Eiam has joined #ruby
jbueza has quit [Quit: Leaving.]
hbpoison has quit [Ping timeout: 255 seconds]
banjara has joined #ruby
etcetera has joined #ruby
dankest has joined #ruby
banjara has quit [Client Quit]
<Hanmac> yeah let call it "Pri" "Psychic ruby interpreter" :P
jurassic has quit [Quit: jurassic]
ozgura_ has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
<shevy> cool
banjara has joined #ruby
jonahR has joined #ruby
hbpoison has joined #ruby
<k610> on a side note how can i find gems ? "rubygems.org" only searches in gem name & "gem query --remote x" doens't show gem descriptions
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
rakl has joined #ruby
apeiros_ has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
ilyam has joined #ruby
yekta has joined #ruby
luckyruby has joined #ruby
sk87 has quit [Quit: sk87]
banjara has quit [Client Quit]
<splud> afk while I was testing stuff...
banjara has joined #ruby
drale2k has quit [Quit: Leaving...]
<Spooner_> I prefer "gem list --remote zz"
francisfish has quit [Remote host closed the connection]
DrShoggoth has joined #ruby
<k610> y but again you need to have a partial match of the gem name
banjara has quit [Client Quit]
<Spooner_> But yeah, get the gem name from gem list and look it up on rubygems.org. Never been a huge problem that I can't do more in-depth searches.
banjara has joined #ruby
<Spooner_> I just search in google if I can't guess part of the name.
<splud> hrm...
banjara has quit [Client Quit]
idkazuma has quit [Remote host closed the connection]
banjara has joined #ruby
phretor has quit [Quit: phretor]
motto has joined #ruby
banjara has quit [Client Quit]
<k610> e.g i'd like to search for gems that do something with readline "gem query --remote readline" is the closest i can get but i have to script the result and search description for each. Does everyone really does that each time ?
banjara has joined #ruby
<shevy> no, I dont even use query at all
banjara has quit [Client Quit]
adT has quit [Ping timeout: 240 seconds]
cpruitt has joined #ruby
<shevy> I have 145 .gem files locally from other people here, of which I use about 20% regularly
banjara has joined #ruby
<shevy> and readline comes with standard ruby
jetblack_ has joined #ruby
<splud> how to accomplish .max on an array of quoted values? f = ["-35", "5", "10"] ? f.max returns "5"...
<shevy> the highline gem may be useful http://highline.rubyforge.org/ and Mon_Ouie has something related to io-console, but I always forget the name
m8 has quit [Read error: Operation timed out]
banjara has quit [Client Quit]
alvaro_o has joined #ruby
`p has quit [Remote host closed the connection]
<splud> (which is evaluated as string)
slainer68 has quit [Remote host closed the connection]
banjara has joined #ruby
bricker`1A has joined #ruby
artofraw has joined #ruby
<shevy> how to you use .max on strings
feedbackloop has joined #ruby
jmeeuwen_ has joined #ruby
<Mon_Ouie> Coolline. But still, t doesn't help more than Readline in his case.
dasdasdas has joined #ruby
banjara has quit [Client Quit]
<shevy> f = ["-35", "5", "10"] # => ["-35", "5", "10"]; f.map(&:to_i).max # => 10
banjara has joined #ruby
<shevy> *do you, not to you
<Spooner_> splud, f.max_by {|n| n.to_i } #=> "10" or f.map(&to_i).max #=> 10
yxhuvud has joined #ruby
alx- has joined #ruby
banjara has quit [Client Quit]
<Spooner_> f.map(&:to_i).max (oops)
banjara has joined #ruby
KRF_ has joined #ruby
robbyoconnor has quit [Max SendQ exceeded]
banjara has quit [Client Quit]
cantonic has joined #ruby
banjara has joined #ruby
dblack_ has quit [Quit: dblack_]
banjara has quit [Client Quit]
robbyoconnor has joined #ruby
tetsu_ has joined #ruby
banjara has joined #ruby
pietr0_ has joined #ruby
cmarques has joined #ruby
banjara has quit [Client Quit]
Weazy_ has joined #ruby
banjara has joined #ruby
crankyco1er has joined #ruby
banjara has quit [Client Quit]
unflores has quit [Quit: unflores]
pdamer has quit [Quit: pdamer]
banjara has joined #ruby
<k610> i'll dig deeper in highline & look into coolline & readline ... thanks
<splud> trying to wedge that into the dupe remover...
banjara has quit [Client Quit]
banjara has joined #ruby
malkomalko has quit [Read error: Connection reset by peer]
threesome has quit [Ping timeout: 252 seconds]
<k610> i mean are cisco like cli apps bad and should be replaced by gem like apps ?
malkomalko has joined #ruby
<Spooner_> splud You probably want to learn a bit more Ruby rather than needing to ask at every step of your development.
<k610> whateva im making some squires port if i can
Villadelfia_ has joined #ruby
geggam__wk has joined #ruby
dougireton has joined #ruby
sn0wb1rd has joined #ruby
<Mon_Ouie> They're not bad. See e.g. Pry which has similar a
<alx-> Hi, I have a paperclip question: how can i pass auto_orient => false when using a proc to calculate image size: :styles => lambda { |p| { :medium => Proc.new { |instance| instance.resize_image } }
<Mon_Ouie> a similar command system*
idkazuma has joined #ruby
<k610> true that pry is awsome
<Mon_Ouie> (It just also evaluates Ruby code)
<splud> would love to have the time to sit down and learn more, but need to add some code to an existing framework.
r0bby has joined #ruby
adayzdone has quit [*.net *.split]
geggam_wk has quit [*.net *.split]
stopbit has quit [*.net *.split]
yalue has quit [*.net *.split]
nkr has quit [*.net *.split]
crankycoder has quit [*.net *.split]
KRF has quit [*.net *.split]
walbert has quit [*.net *.split]
jmeeuwen has quit [*.net *.split]
bricker`LA has quit [*.net *.split]
jetblack has quit [*.net *.split]
noop has quit [*.net *.split]
feedbackloop_ has quit [*.net *.split]
musl has quit [*.net *.split]
Villadelfia has quit [*.net *.split]
felixjet has quit [*.net *.split]
gogiel has quit [*.net *.split]
Weazy has quit [*.net *.split]
jwang has quit [*.net *.split]
pietr0 has quit [*.net *.split]
tetsu has quit [*.net *.split]
mattp_ has quit [*.net *.split]
yxhuvud2 has quit [*.net *.split]
marienz has quit [*.net *.split]
anekos has quit [*.net *.split]
Villadelfia_ is now known as Villadelfia
jmeeuwen_ is now known as jmeeuwen
wallclockbuilder has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
skum is now known as Vainoharhainen
Vainoharhainen has joined #ruby
Vainoharhainen has quit [Changing host]
arietis has joined #ruby
Xeago has quit [Remote host closed the connection]
<Spooner_> splud, Subcontract :D
banjara has quit [Ping timeout: 256 seconds]
jerius has quit [Ping timeout: 255 seconds]
sirish has joined #ruby
Virunga has joined #ruby
g0tcha has quit []
<splud> I sorted the placement of the to_i to get what I needed. Thanks for your assist.
hbpoison has quit [Ping timeout: 264 seconds]
a_a_g has joined #ruby
jamesfung14 has quit [Ping timeout: 250 seconds]
etcetera has quit []
a_a_g has quit [Client Quit]
techlife has quit [Ping timeout: 256 seconds]
r0bby has quit [Remote host closed the connection]
r0bby_ has joined #ruby
mattp_ has joined #ruby
marienz has joined #ruby
scriabin has joined #ruby
stopbit has joined #ruby
musl has joined #ruby
tcstar has quit [Quit: Leaving]
jwang has joined #ruby
yalue has joined #ruby
noop has joined #ruby
tcstar has joined #ruby
locriani has joined #ruby
jjbohn|afk is now known as jjbohn
Astralum has quit [Ping timeout: 240 seconds]
<scriabin> guys I have two csv files which ought to map to sets (they contain rows which have two attributes: a unique identifier, and a version number)
jamesfung14 has joined #ruby
<scriabin> these csv files ought to contain the same lines, but the versions may differ
walbert has joined #ruby
banjara has joined #ruby
techlife has joined #ruby
anekos has joined #ruby
Astralum has joined #ruby
artofraw has quit [Remote host closed the connection]
<scriabin> I'm wondering how to create a ruby script to detect the differences in the two files so I can list "identifiers in the first file but not in the second", "identifiers in the second file but not in the first", etc.
failshell has quit [Remote host closed the connection]
<scriabin> I was thinking of reading the files with the CSV library in 1.9.3, then bringing the data structure into a hash
timmow has quit [Ping timeout: 252 seconds]
<scriabin> from there can I perform set functions on the two hashes?
r0bby_ has quit [Remote host closed the connection]
verysoftoiletppr has quit []
robbyoconnor has joined #ruby
markalanevans has joined #ruby
markalanevans has quit [Read error: Connection reset by peer]
markalanevans has joined #ruby
alexim has joined #ruby
sirish_ has joined #ruby
idkazuma has quit [Remote host closed the connection]
wreckimnaked has quit [Read error: Operation timed out]
_br_ has quit [Excess Flood]
freakazoid0223 has joined #ruby
sirish has quit [Ping timeout: 252 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
statarb3 has quit [Ping timeout: 245 seconds]
robbyoconnor has quit [Max SendQ exceeded]
etcetera has joined #ruby
<Guest1234> is anyone familiar with a good process for software deliveries with respect to managing configuration properties?
<Guest1234> I know of an am using Puppet
<Guest1234> but I'm trying to figure out a good way to get parameters presented in a more manageable fashion for multiple data centers
echobinary has quit [Read error: Connection reset by peer]
otherj has joined #ruby
echobinary has joined #ruby
otherj has quit [Client Quit]
danneu has quit [Quit: WeeChat 0.3.8]
_br_ has joined #ruby
<Spooner_> scriabin, You can just load the identifiers into Set and do set ops (& for intersection and | for intersection).
jerius has joined #ruby
drale2k has joined #ruby
chrishough has quit [Quit: chrishough]
halogenandtoast has joined #ruby
Vainoharhainen has quit [Ping timeout: 245 seconds]
etcetera has quit [Client Quit]
<Spooner_> (or -, of course).
etcetera has joined #ruby
robbyoconnor has joined #ruby
_br_ has quit [Excess Flood]
brianpWins has joined #ruby
kevinfagan has quit [Quit: Leaving...]
mityaz has joined #ruby
skattyadz has quit [Quit: skattyadz]
nga4 has joined #ruby
rupee has joined #ruby
_br_ has joined #ruby
etcetera has quit []
_nitti_ has quit [Ping timeout: 245 seconds]
_nitti has joined #ruby
hadees has joined #ruby
whowantstolivef1 has joined #ruby
browndawg has quit [Quit: Leaving.]
vbbgggb has joined #ruby
jrendell has joined #ruby
Spooner_ has quit [Remote host closed the connection]
azm has quit [Ping timeout: 264 seconds]
takeru has joined #ruby
hbpoison has joined #ruby
gaahrdner has quit [Ping timeout: 260 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
adT has joined #ruby
Ontolog has joined #ruby
jjbohn has quit [Read error: Connection reset by peer]
_br_ has quit [Excess Flood]
Eldariof-ru has joined #ruby
takeru has quit [Ping timeout: 250 seconds]
<lectrick> Is it possible to capture a non-matching group in regex?
dougireton has quit [Quit: Leaving.]
k610 has quit [Ping timeout: 245 seconds]
drale2k has quit [Ping timeout: 255 seconds]
Ontolog_ has joined #ruby
eldariof has quit [Read error: Operation timed out]
<halogenandtoast> lectrick: Do you just mean text that doesn't match a given expression?
twoism has joined #ruby
breakingthings has quit []
<lectrick> I want to capture a string that is not the next match in sequence
_br_ has joined #ruby
Phibs has left #ruby [#ruby]
Ontolog has quit [Ping timeout: 264 seconds]
<lectrick> Like, if the next character is a 0 (detected via forward-lookahead), I want to consume it but then actually capture a 1
<halogenandtoast> You can tell an expression not to include a capture
<halogenandtoast> (?:0)
swex_ has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
zeade has joined #ruby
_br_ has quit [Excess Flood]
pandawarrior1 has joined #ruby
<lectrick> yes, I know that, but in this case I want TO capture something, but not have it match
<halogenandtoast> can you give me a more explicit string example.
mrsolo has joined #ruby
alexim has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
dougireton has joined #ruby
swex has quit [Ping timeout: 248 seconds]
_br_ has joined #ruby
<lectrick> basically, I want a regex that when set upon a string 'a', $1 returns 'b'
_nitti has quit [Remote host closed the connection]
<halogenandtoast> I see
pepper_chico has quit [Quit: Computer has gone to sleep.]
joshman_ has quit [Remote host closed the connection]
<lectrick> is that even possible?
joshman_ has joined #ruby
<lectrick> "if the next character is a, capture a b"
Virunga has quit [Remote host closed the connection]
ilyam has quit [Read error: Connection reset by peer]
mrsolo has left #ruby [#ruby]
Virunga has joined #ruby
ilyam has joined #ruby
<halogenandtoast> Nothing I know of will allow you to do this, but gsub allows you to give it a block where you can mutate the string contents.
threesome has joined #ruby
tommyvyo has joined #ruby
heliumsocket has joined #ruby
<halogenandtoast> 'alli baba'.gsub(/a/) { |f| f = 'b' } # => "blli bbbb"
tvw has quit []
dougireton has quit [Client Quit]
<halogenandtoast> so you could match your case with that expression and do replacement?
verysoftoiletppr has joined #ruby
<lectrick> halogenandtoast: yeah, that would work, but i was just wondering if there was a pure-regex way
<russfrank> 'alli baba'.gsub(/([a-z])/) { |f| f.succ }
Virunga_ has joined #ruby
Virunga has quit [Read error: No route to host]
petecheslock has left #ruby ["Leaving..."]
bricker`1A has quit [Ping timeout: 245 seconds]
iblaxter has quit [Quit: foo]
<pandawarrior1> russfrank: cool, i didn't know gsub takes blocks...
<halogenandtoast> Sure pandawarrior1 thank russfrank even though I just said it
dblack_ has joined #ruby
<halogenandtoast> lectrick: I don't think that problem falls under the wheelhouse of what regex was designed for.
whitedawg has quit [Quit: Leaving.]
<pandawarrior1> halogenandtoast: you did? soz, mate...
<lectrick> halogenandtoast: I realize that, I am just wondering what is possible :O
<halogenandtoast> At a basic level regex is designed to determine if a lexeme fits into a defined language
jerius has quit []
<halogenandtoast> mmm state machines
<lectrick> Well, it is already able to capture, but captures have to match, I can't see it being that hard to implement a non-matching capture :O
maletor has joined #ruby
maletor has quit [Max SendQ exceeded]
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
jerius has joined #ruby
<halogenandtoast> lectrick: You'd have to extend the regex language itself, which is already altered by perl regular expressions (which are not true regular expressions).
pseudonymous has quit [Ping timeout: 260 seconds]
<halogenandtoast> It might not be "hard" but you'd have to come up with a syntax for it.
maletor has joined #ruby
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
maletor has quit [Max SendQ exceeded]
<russfrank> lol
<halogenandtoast> At the same time I think you'd be cross pollinating concerns.
<russfrank> halogenandtoast: sorry for stealing your credit buddy hahaha
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
<halogenandtoast> I know right!
tomzx_mac has quit [Ping timeout: 255 seconds]
maletor has joined #ruby
<halogenandtoast> I was crushed for 5.23 seconds, it was horrible.
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
mengu has quit [Quit: Konversation terminated!]
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
kirun has joined #ruby
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
AxisOfEval has quit [Quit: Leaving...]
pepper_chico has joined #ruby
nsxt has quit [Ping timeout: 264 seconds]
Mo0O has quit [Quit: WeeChat 0.4.0]
AxisOfEval has joined #ruby
jurassic has joined #ruby
axxT has quit [Quit: ( .Ng Gaming ver.1337 :: www.NinpoGaming.com :: Now Leaving mIRC Teleport +1 )]
mlr has left #ruby [#ruby]
maycon_ has joined #ruby
mrsolo has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
maycon has quit [Read error: Connection reset by peer]
axxT has joined #ruby
etcetera has joined #ruby
Stilo has joined #ruby
Stilo has quit [Max SendQ exceeded]
khismetix has quit [Quit: Computer has gone to sleep.]
horofox_ has joined #ruby
alexim has joined #ruby
maycon_ has quit [Read error: Connection reset by peer]
andikr has quit [Remote host closed the connection]
jamesfung14 has quit [Ping timeout: 245 seconds]
Mo0O has joined #ruby
maycon_ has joined #ruby
brianpWins has quit [Quit: brianpWins]
ilyam has quit [Quit: ilyam]
robbyoconnor has quit [Max SendQ exceeded]
vbbgggb has quit [Quit: Odcházím]
robbyoconnor has joined #ruby
dougireton has joined #ruby
pavilionXP has quit [Quit: Forget progress by proxy. Land on your own moon.]
pavilionXP has joined #ruby
jgrevich has joined #ruby
AxisOfEval has quit [Quit: Linkinus - http://linkinus.com]
varane has joined #ruby
Al____ has quit [Quit: Al____]
timonv has joined #ruby
<varane> why is this possible ? puts "hello" if a > b i just saw that in a book and it really confused me because on the ruby website the 20 minute tutorial doesn't do that
apok has joined #ruby
<banisterfiend> varane: it's just a convenient short-hand
ebobby has joined #ruby
<onewheelskyward> Well, a 20 minute tutorial can't really cover everything.
<banisterfiend> varane: instead of going: if a > b; puts "hello"; end
thone_ has joined #ruby
<banisterfiend> you can just go: puts "hello" if a > b
<varane> banisterfiend: oh okay is there a place where i can learn about all the short hands ? i don't wanna get suprised anymore :P
hbpoison_ has joined #ruby
<banisterfiend> varane: buy a book :P i recommend "the ruby programming language" by o'reilly
chussenot has joined #ruby
marr has quit [Ping timeout: 256 seconds]
<onewheelskyward> And even with that, you'll still get surprised occasionally. Ruby is always evolving.
<varane> banisterfiend: okay awesome thanks
<becom33> how can I get the path from a string like "/this/and/this/and/that/meee.flv"
<varane> onewheelskyward: like perl ? :P
thone has quit [Ping timeout: 252 seconds]
<onewheelskyward> Heh. Absolutely.
skattyadz has joined #ruby
jurassic has quit [Quit: jurassic]
<becom33> anyone ?
gaahrdner has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
<onewheelskyward> becom33 Check out File.dirname.
<lectrick> Is there something like "prev" to do the opposite of "succ"?
_nitti has joined #ruby
xbob has joined #ruby
<shevy> hmm dont think so
<reactormonk> lectrick, try succ -1
atyz has quit [Quit: Leaving...]
<reactormonk> lectrick, ehh, pred
<shevy> hehe
<shevy> where or how is .succ defined btw?
<lectrick> String, in this case
etcetera has quit []
brianpWins has joined #ruby
codecop has joined #ruby
<Hanmac> yeah String succ's :P
Ontolog_ has quit [Remote host closed the connection]
<shevy> oh?
<shevy> but it works on Fixnum as well?
<shevy> 5.succ # => 6
luckyruby has quit [Remote host closed the connection]
chrishough has joined #ruby
<Hanmac> shevy ... it may break your heart ... but it works on Symbol too
<lectrick> Succ is a little weird because in the case of strings, it makes some assumptions around the underlying character set
Ontolog has joined #ruby
ilyam has joined #ruby
<shevy> Hanmac omg
<halogenandtoast> Is there a way to see which copy of OpenSSL ruby linked against?
<lectrick> It would be a little cooler if you could pass it the character set somehow
echobinary has quit [Read error: Connection reset by peer]
Udom0 has quit [Read error: Operation timed out]
etcetera has joined #ruby
<lectrick> Since it is already making assumptions, I mean
dougireton has quit [Quit: Leaving.]
echobinary has joined #ruby
<shevy> halogenandtoast not sure? I would assume OpenSSL::VERSION perhaps?
<Hanmac> >> :a.succ
<eval-in> Hanmac => :b (http://eval.in/12126)
<lectrick> such as 'z'.succ #=> 'aa'
__Big0__ has quit [Remote host closed the connection]
<lectrick> >> 'z'.succ
<eval-in> lectrick => "aa" (http://eval.in/12127)
Udom0 has joined #ruby
bricker`away is now known as bricker
<halogenandtoast> shevy: That returns a string, but it definitely not what's expected
nsxt has joined #ruby
<lectrick> Oooh, lookee. https://github.com/rubyworks/radix
jrajav has joined #ruby
hashmal has quit [Quit: Computer has gone to sleep.]
<shevy> well it returns 1.0.0 for me
<halogenandtoast> 1.1.0 for me
sambio has quit [Ping timeout: 255 seconds]
<halogenandtoast> and that's not an OpenSSL version
hybris has quit [Read error: Connection reset by peer]
thone has joined #ruby
<lectrick> 1.1.0 here
<halogenandtoast> Either that or I need to stop time traveling with my laptop
gothicsouth has quit [Ping timeout: 276 seconds]
<Hanmac> there is OpenSSL::OPENSSL_VERSION
__Big0__ has joined #ruby
<shevy> aha
geggam__wk is now known as geggam_wk
<Hanmac> and OpenSSL::OPENSSL_VERSION_NUMBER
<shevy> returns 1.0.1c for me
jerius has quit [Ping timeout: 276 seconds]
dougireton has joined #ruby
_nitti has quit [Ping timeout: 245 seconds]
thone_ has quit [Ping timeout: 245 seconds]
gothicsouth has joined #ruby
<halogenandtoast> Hanmac thanks
varane has left #ruby [#ruby]
jurassic has joined #ruby
leonardoro has joined #ruby
Stilo has joined #ruby
jbueza has joined #ruby
c0rn has joined #ruby
Guest1234 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
luckyruby has joined #ruby
leonardoro has left #ruby [#ruby]
jtharris has quit [Quit: WeeChat 0.4.0]
jerius has joined #ruby
<Hanmac> shevy so #succ now in the list of function that can fillup your ram :P
breakingthings has joined #ruby
yashshah has joined #ruby
<Hanmac> where "now" is relative
verysoftoiletppr has quit []
<_andre> does this look ok to wrap a struct stat as a File::Stat? http://pastebin.com/5SXyBcuq
artofraw has joined #ruby
<_andre> i'm getting "wrong argument type stat (expected stat) (TypeError)" when trying to inspect the result of stat_new() ...
artofraw has quit [Client Quit]
sambao21 has quit [Quit: sambao21]
dblack_ has quit [Quit: dblack_]
drale2k has joined #ruby
bean__ has quit [Quit: Computer has gone to sleep.]
carraroj has quit [Quit: Konversation terminated!]
Zolo has joined #ruby
johannesbodannes has quit [Ping timeout: 245 seconds]
monkegjinni has joined #ruby
kpshek has joined #ruby
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
drale2k has quit [Ping timeout: 245 seconds]
m8 has joined #ruby
hadees has quit [Quit: hadees]
TheFuzzball has joined #ruby
TheFuzzball has quit [Max SendQ exceeded]
yacks has quit [Read error: Connection reset by peer]
phretor has joined #ruby
TheFuzzball has joined #ruby
motto has quit [Ping timeout: 264 seconds]
lsoa has joined #ruby
<lsoa> Hanmac: hey, are you around?
<shevy> he is always around
<lsoa> heh
<shevy> he is the ghost in the irc matrix
<Hanmac> lsoa is allways there :P ... two times :P
stkowski has joined #ruby
etcetera has quit []
* Hanmac means he is allways there
<lsoa> so I successfully compiled a test C extension
<lsoa> but cannot call new on the defined class
<lsoa> let me paste it somewhere
<lsoa> so this is the error http://pastie.org/6414078
<lsoa> this is the related code: http://pastie.org/6414081
<lsoa> ideas?
postmodern has joined #ruby
_nitti has joined #ruby
<Hanmac> lsoa: you need an alloc function
<Hanmac> the part "person = ALLOC(basic);" should go into the alloc method
etcetera has joined #ruby
<lsoa> let me double-check the docs, guess I missed that
<Hanmac> rb_define_alloc_func
huoxito has quit [Quit: Leaving]
<_andre> Hanmac: any idea about the stat thing?
dhruvasagar has quit [Ping timeout: 276 seconds]
<Hanmac> _andre 1.8 or 1.9 ?
<_andre> 1.9
<_andre> well i have to make it work on both
<_andre> but 1.9 for now
icole has joined #ruby
DrShoggoth has quit [Ping timeout: 252 seconds]
helvete has joined #ruby
rezzack has joined #ruby
<lsoa> rb_define_alloc_func is not even in the tutorial :@
adkron has joined #ruby
<Hanmac> lsoa ... maybe your tutorial is to old :P
<lsoa> but in the second half it shows .new being defined as a singleton method
<lsoa> well, ruby-doc.org :P
dbck has joined #ruby
<Hanmac> lsoa ... yeah it that the two possible ways ... overwrite :new or :alloc + :initialize
<_andre> Hanmac: actually the error i'm getting is wrong argument type File::Stat (expected stat) (TypeError)
dbck has left #ruby [#ruby]
hadees has joined #ruby
<Hanmac> _andre can you show more of your working code?
<_andre> sure
dougireton1 has joined #ruby
dougireton1 has quit [Remote host closed the connection]
dougireton has quit [Remote host closed the connection]
R_Macy has quit [Quit: Computer has gone to sleep.]
adkron_ has joined #ruby
tvw has joined #ruby
helvete has quit [Ping timeout: 264 seconds]
<_andre> Hanmac: this should be all of it: http://pastebin.com/vbJyjNzP
<_andre> i'm trying to wrap the fstatat() function
rdark has quit [Quit: leaving]
wallclockbuilder has quit [Ping timeout: 252 seconds]
<banisterfiend> Hanmac: what music do you listen to?
wallclockbuilder has joined #ruby
Chocobo has joined #ruby
<Chocobo> Total newb here. Where in ruby-doc.org should I look for an explanation of what this is doing: "something.each do |a,b|" ?
phretor has quit [Quit: phretor]
<csmrfx> Chocobo: in Array
<Hanmac> banister currently nothing ... otherwise JPop or RPG-midi music
<halogenandtoast> Depends on what something is
<csmrfx> Chocobo: try $ ri Array.each
<halogenandtoast> it's likely to be an array
<halogenandtoast> csmrfx: *highfive* for ri
<csmrfx> looks bit like key-and value pair next to do, though
<Hanmac> Chocobo or do you mean the |a,b| ?
_nitti has quit [Remote host closed the connection]
drale2k has joined #ruby
dougireton has joined #ruby
<Chocobo> Ok, thanks... |a,b| is what I am most interested in... my guess is that (I may switch to python lingo, pardon me) that it is an array of tuples, and |a,b| are giving those parts a name
luckyruby has quit [Remote host closed the connection]
<Chocobo> Nothing known about Array.each <=== result of # ri Array.each
<yxhuvud> chocobo: it follows the same rules as multiple assignment.
brianpWins has quit [Quit: brianpWins]
_jc has joined #ruby
<Hanmac> hm try Array#each
bitcoin00b has quit [Quit: bitcoin00b]
Davey has quit [Quit: Computer has gone to sleep.]
<Chocobo> Nothing known about Array#each
<Hanmac> :(
DrShoggoth has joined #ruby
<Chocobo> Hmmm, I think ruby-doc might be a good refrence, but I think I have to go on a quest for a good tutorial.
geggam_wk has quit [Ping timeout: 260 seconds]
duosrx has quit [Remote host closed the connection]
<banisterfiend> Chocobo: hi
<banisterfiend> Chocobo: |a, b| is (usually) used to destructure the object passed to the block
<banisterfiend> i.e
Udom0 has quit [Ping timeout: 256 seconds]
<banisterfiend> def hello; yield([1, 2]); end
ananthakumaran has quit [Quit: Leaving.]
<banisterfiend> hello { |x, y| x + y } #=> 3
geggam_wk has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
robbyoconnor has quit [Ping timeout: 250 seconds]
<csmrfx> Chocobo: perhaps something wrong with your ri
<Chocobo> Ahh thanks banisterfiend. That is about what I thought might be going on. I am more familiar with Python, but I am going to learn ruby so I can use Chef effectively.
<csmrfx> try ri<tab>
<csmrfx> and no, those are not tuples
<csmrfx> just an array of objects, supposing it is an array
<Chocobo> ri ri-ruby-2.0.0-p0 ri-ruby-2.0.0-p0@global
jtharris has joined #ruby
<csmrfx> looks like rvm
brianpWins has joined #ruby
<csmrfx> anyway, ri Array.each or ri Array#each should return docs on each
<apeiros_> Chocobo: if you installed ruby via rvm -> `rvm docs generate`
<banisterfiend> >> def hello; yield([1,2]); end; puts hello { |x, y| x + y }
<eval-in> banisterfiend => 3
<eval-in> nil (http://eval.in/12128)
<apeiros_> after that, ri will give output for `ri Array#each`
<halogenandtoast> it's odd that ri has an entry for Foo
khismetix has joined #ruby
wallclockbuilder has quit [Remote host closed the connection]
hadees has quit [Quit: hadees]
<csmrfx> must be an distributed ruby test deak
<csmrfx> *deal
danman has quit [Quit: danman]
<Chocobo> building :)
<banisterfiend> Chocobo: does python allow this kind of thing? x,y = [1, 2]
<banisterfiend> cos that's what's happening inside that block
tetsu_ is now known as tetsus
sam113101 has quit [Quit: WeeChat 0.3.8]
sonda has quit [Remote host closed the connection]
<Chocobo> banisterfiend: yes it does.
<banisterfiend> if you just had { |x| } instead of |x, y| then you'd get the full array, i.e [1, 2] inside the block
bean__ has joined #ruby
_nitti has joined #ruby
<banisterfiend> Chocobo: do you play ff?
<Chocobo> Ok, that makes sense. Now I need to work on symbols! :)
<Hanmac> pah that is nothing ... does python can this: a,(b,c),d = [1,[2,3],4] #too? :P
<_andre> Hanmac: did you have a chance to have a look at that code?
<Chocobo> banisterfiend: Ahh... ff7 made me a happy young boy for many months :)
brianpWins has quit [Client Quit]
<Hanmac> _andre yeah but not way to test it yet :(
AlSquire has joined #ruby
* csmrfx goes back to dwarf fortress
<_andre> this error is crazy "wrong argument type stat (expected stat)"
<interactionjaxsn> Chocobo: I was a huge fan of tactics. just my two cents
<Chocobo> csmrfx: you are my hero. Dwarf fortress is the best! If you ever find a good map that has a surface volcano let me know :)
<bean__> df is a great.
hadees has joined #ruby
<bean__> i want to play it but am at work :(
<Chocobo> interactionjaxsn: Also a great game!
philcrissman has quit [Remote host closed the connection]
<Chocobo> bean__: so? bean ... any relation the "Ender's Game" series of books?
<bean__> of course.
<Chocobo> excellent
<bean__> my other nick is julian-delphiki
<Chocobo> Haha nice. This channel is full of awesome things.
bean__ is now known as julian-delphiki
elaptics is now known as elaptics`away
<julian-delphiki> sadly there is a guy who is using "bean_"
brianpWins has joined #ruby
<julian-delphiki> and he won't let me has it.
<Chocobo> I always liked Bean better than Ender.
brianpWins has quit [Client Quit]
<shevy> Bean is better than Mean, and Gender better than Ender
<banisterfiend> Chocobo: ff12 was the best
<banisterfiend> ;)
<julian-delphiki> gtfo
<banisterfiend> heh heh
<jrajav> ff12? what the hell is that?
<jrajav> I thought they skipped straight from 11 to 13
<Chocobo> banisterfiend: is that the one where girls wear different clothes to give themselves power? or something equally horrible?
<banisterfiend> Chocobo: nah that's 10
<jrajav> 10-2
<Chocobo> Hold on... if I remember XII is pretty good.
<jrajav> It's actually not terrible
<jrajav> It's just a running joke that no one ever acts like it even existed
<banisterfiend> jrajav: y dat
wargasm has quit [Read error: Connection reset by peer]
<Chocobo> I had to look it up, but yeah I played that one. If I remember correctly the most annoying thing was the loading between areas.
aedorn has quit [Quit: Leaving]
axhlf has joined #ruby
<_andre> Hanmac: just realized the 1.8 code works
<jrajav> heck if I know
Michae___ has joined #ruby
<Chocobo> I still think Earthbound may be my favorite RPG
BizarreCake has quit [Remote host closed the connection]
echobin92 has joined #ruby
echobinary has quit [Read error: Connection reset by peer]
Udom0 has joined #ruby
<Chocobo> wow, takes a while to build the documentation.
io_syl has joined #ruby
sk87 has joined #ruby
k610 has joined #ruby
Morkel has quit [Ping timeout: 245 seconds]
<Chocobo> is there a difference between arr.each { |a| print a -= 10, " " } and arr.each do |a| .... end ?
Morkel_ has joined #ruby
io_syl has quit [Client Quit]
dblack__ has joined #ruby
jrendell has quit [Quit: jrendell]
io_syl has joined #ruby
neku has joined #ruby
<whitequark> Chocobo: yes and no
<whitequark> two of your snippets are equivalent
Udom0 has left #ruby [#ruby]
<whitequark> but: `a b { c }` and `a b do c end` parse differently
<whitequark> in the first case the block is bound to the rightmost method, i.e. `b`
<shevy> Chocobo {} is shorter than do end
<whitequark> Chocobo: but in the second one that's `a`
<becom33> how can I fix the syntax pattern in ruby easily
<becom33> code is mess
<whitequark> Chocobo: the general idea is that {} is for 'inline' blocks, and do...end is for bigger, multiline ones
R_Macy has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
<whitequark> becom33: google for "ruby code formatter" or "code beautifier"
<Chocobo> Hmm, ok thanks. Interesting.
theRoUS has quit [Ping timeout: 260 seconds]
sirish_ has quit [Ping timeout: 255 seconds]
dougireton has quit [Quit: Leaving.]
* whitequark places his psychic powers back
<interactionjaxsn> whitequark: how you do that?
jcsims has left #ruby [#ruby]
<whitequark> interactionjaxsn: what in particular?
<interactionjaxsn> places his psychic...
<whitequark> interactionjaxsn: /me
* interactionjaxsn sheds tear of joy
_nitti_ has joined #ruby
rburton- has joined #ruby
jlast has quit [Remote host closed the connection]
_nitti_ has quit [Read error: No route to host]
Eldariof-ru has quit []
TheFuzzball has quit [Ping timeout: 256 seconds]
_nitti_ has joined #ruby
_nitti has quit [Ping timeout: 252 seconds]
jlast has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
takeru has joined #ruby
TheFuzzball has joined #ruby
bigkevmcd has quit [Read error: No route to host]
<Chocobo> I love asking really annoying questions to people who know more than me... so here we go. arr = [[1,2],[2,3],[3,4]]; arr.each { |a,b| print a+b }; 357 => [[1, 2], [2, 3], [3, 4]]
<Chocobo> I get the "357" by why the => [[1, 2], [2, 3], [3, 4]]
samphippen has joined #ruby
<Hanmac> Chocobo .each returns self
<GeekOnCoffee> and rib prints the return value
<GeekOnCoffee> irb even
<Chocobo> ohhh... that would make sense. doh.
kirun_ has joined #ruby
bigkevmcd has joined #ruby
Xeago has joined #ruby
<Chocobo> Thanks, I will go back to my corner now :)
joshman_ has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
aedorn has joined #ruby
cmdr-prmpt_ has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
digifiv5e has joined #ruby
joshman_ has joined #ruby
yashshah has joined #ruby
codecop has quit [Ping timeout: 245 seconds]
tonini has joined #ruby
digifiv5e is now known as Guest8893
takeru has quit [Ping timeout: 272 seconds]
_jc has quit [Quit: Textual IRC Client: www.textualapp.com]
kirun has quit [Ping timeout: 252 seconds]
sepp2k1 has quit [Read error: Connection reset by peer]
_nitti_ has quit [Read error: Connection reset by peer]
chongyu123 has joined #ruby
_nitti has joined #ruby
<Hanmac> shevy i found this error: "undef leaked to the Ruby space" :D
flowerhack has joined #ruby
atyz has joined #ruby
Xeago has quit [Remote host closed the connection]
axl_ has joined #ruby
jrendell has joined #ruby
theRoUS has joined #ruby
kirun__ has joined #ruby
ryanf has joined #ruby
kirun__ has quit [Client Quit]
malte_ has joined #ruby
Guest8893 is now known as guyz
jrendell_ has joined #ruby
jrendell has quit [Read error: Connection reset by peer]
jrendell_ is now known as jrendell
kirun_ has quit [Ping timeout: 250 seconds]
_nitti has quit [Remote host closed the connection]
yshh has quit [Read error: No route to host]
guyz is now known as Guest3957
<Chocobo> huh... symbols are kind of neat.
cmdr-prmpt_ has quit [Quit: Done-zo]
_nitti has joined #ruby
jdunck has joined #ruby
drale2k has quit [Quit: Leaving...]
SCommette has quit [Quit: SCommette]
<julian-delphiki> symbols are very neat
<julian-delphiki> :)
Xeago has joined #ruby
kayloos has joined #ruby
<halogenandtoast> I've never described them as neat.
codecop has joined #ruby
emocakes has joined #ruby
<halogenandtoast> But I came from languages with atoms.
helvete has joined #ruby
<becom33> can anyone tell me how can I get ruby script to play a file in linux default media player ?
rgbdev has joined #ruby
<shevy> Hanmac odd error
rgbdev has left #ruby [#ruby]
nsxt has quit [Ping timeout: 252 seconds]
yshh has joined #ruby
<halogenandtoast> becom33: Kernel.exec or if it has a c-api use that (but I doubt the later).
huoxito has joined #ruby
sirish has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
<Squarepy> becom33, call the process f.i. with system(), I guess it is commandline callable
<csmrfx> becom33: ri system or ri `
<becom33> halogenandtoast, umm sorry I dont thin I understand what you ment
<TTilus> " linux default media player"? theres no such thing
<becom33> TTilus, what ever the OS has it as a default player
<halogenandtoast> csmrfx: why system or ` over exec, I'd assume you'd want to replace the current process.
<Hanmac> _andre: i didnt get the 1.9 version working ... i have ENOUGH !!! i will make a ticket request for stat -> VALUE ... and no one can stop me :D
<TTilus> becom33: once you find out about the desktop env the user has and find the default media player executable name you can run it using system-method
nomenkun has joined #ruby
verysoftoiletppr has joined #ruby
<becom33> TTilus, thats the problem how can I find it
jtharris has quit [Read error: Connection reset by peer]
jtharris has joined #ruby
helvete has quit [Ping timeout: 248 seconds]
sam113101 has joined #ruby
ablemike has joined #ruby
<ablemike> anyone know why bundler keeps storing gems in vendor/cache?
<csmrfx> halogenandtoast: in fact, you want to use `
<csmrfx> it is said to be a bit faster than system
<ablemike> someone on the team did something and now everytime i bundle in this project vendor/cache keeps getting filled up with cache's of the gems
<TTilus> becom33: there are dozen of different preference systems, pick one and use it
<halogenandtoast> csmrfx: I've had problems with media players when they aren't the parent process.
<halogenandtoast> In particular mplayer
davetherat has joined #ruby
<shevy> becom33 is there a "default player" on linux? where would that be stored?
<csmrfx> it just runs in a subshell, I don tsee what the problem could be there
<TTilus> becom33: mime info, debian alternatives, gnome preferenes, kde preferences, ...
<shevy> one million solutions for the same problem
davetherat has quit [Remote host closed the connection]
dougireton has joined #ruby
<halogenandtoast> csmrfx: I don't remember either. It was one of those crazy weekend projects.
nkr has joined #ruby
davetherat has joined #ruby
<csmrfx> linux is just the kernel, as such doesn't use a particular media player solution
nachtwandler has quit [Remote host closed the connection]
marr has joined #ruby
davetherat1 has joined #ruby
davetherat1 has quit [Remote host closed the connection]
davetherat1 has joined #ruby
<TTilus> shevy: dont exaggerate there! couple of dozen at most! =D
mikurubeam has quit [Ping timeout: 256 seconds]
davetherat has quit [Remote host closed the connection]
davetherat1 has quit [Remote host closed the connection]
davetherat has joined #ruby
<shevy> csmrfx right but where would you store that consistently on a distribution, either?
<halogenandtoast> You might be able to use the open command
<shevy> is that graphical-only?
francisfish has joined #ruby
<shevy> hmm I dont even seem to have any binary called "open"
<TTilus> halogenandtoast: that sounds so osx
<shevy> hehe
<halogenandtoast> It does indeed
<halogenandtoast> NextStep and OSX
<csmrfx> shevy isn't such thing afaics
<halogenandtoast> We got 2 down
<shevy> hmm
<shevy> does OSX work in non-graphical mode as well?
<halogenandtoast> shevy: darwin?
<TTilus> becom33: id use mimeinfo to look up a handler program for the media file type at hand
<halogenandtoast> xdg-open, gnome-open, exo-open, kde-open
<shevy> hey, I would not have any idea about the names :) but let's say "the latest apple OS always"
<shevy> ack, never read exo-open before...
pkrnj has joined #ruby
<halogenandtoast> darwin is the kernel, you can boot into single user mode
<shevy> ah ok
<halogenandtoast> which loads the OS sans GUI
sirish has quit [Ping timeout: 276 seconds]
<TTilus> shevy: its a unix, heavens sake!
<shevy> it's quite bastardized on the outside
phinfonet has joined #ruby
<halogenandtoast> osx?
<halogenandtoast> If so, I agree.
<TTilus> osx is more unix than linux distros
<shevy> !!!
Gu_______ has joined #ruby
<TTilus> honest
<shevy> I find no words, only !
<TTilus> see conformance to single unix spec!
<shevy> I must overwrite your nick with !
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
jrendell has quit [Ping timeout: 264 seconds]
<TTilus> my god, it is basically nextstep on top of bsd =D
dougireton has quit [Remote host closed the connection]
R_Macy has quit [Ping timeout: 250 seconds]
_nitti has quit [Remote host closed the connection]
adkron has quit [Ping timeout: 272 seconds]
adkron_ has quit [Ping timeout: 260 seconds]
<lsoa> Hanmac: so, I managed to fix my code, and part of my thought process too :)
_nitti has joined #ruby
banjara has quit [Quit: Leaving.]
eliasp has joined #ruby
helvete has joined #ruby
<lsoa> Hanmac: which got me thinking... let's say I need to encapsulate my C extension logic in a Class. Wouldn't it be easier to create an AbstractClass in ruby, then create a Class < AbstractClass in C just to perform the glue part? keeping struct vars in sync etc?
banjara has joined #ruby
nsxt has joined #ruby
backjlack has quit [Remote host closed the connection]
banjara has quit [Client Quit]
<apeiros_> lsoa: you can have parts in ruby and parts in C without an abstract class
<Hanmac> i dont know
monkegjinni has quit [Remote host closed the connection]
banjara has joined #ruby
<apeiros_> pointless IMO
<lsoa> apeiros_: yes, but I want to avoid the endless rb_iv_set rb_iv_get
statarb3 has quit [Quit: Leaving]
<Hanmac> i prefer, when i make an C(++) gem to write everything in C(++)
cmarques has quit [Ping timeout: 245 seconds]
atyz has quit [Ping timeout: 264 seconds]
<apeiros_> lsoa: then don't. you can use self.foo= on the ruby side instead of ivars.
sam113101 has quit [Quit: WeeChat 0.3.8]
Gu_______ has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros_> lsoa: this problem doesn't go away when you have an abstract class anyway
banjara has quit [Client Quit]
<apeiros_> at least I don't see how it would
Gu_______ has joined #ruby
banjara has joined #ruby
huoxito has quit [Read error: Connection timed out]
atyz has joined #ruby
helvete has quit [Read error: Connection reset by peer]
banjara has quit [Client Quit]
DrShoggoth has quit [Ping timeout: 248 seconds]
<lsoa> ok, then maybe I didn't fully understand it yet.
<lsoa> here's the code
banjara has joined #ruby
philcrissman has joined #ruby
<lsoa> now, let's say you really need to use this amazingly useful gem :)
<lsoa> and assume that I had implemented some email validation code on email=
huoxito has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
<lsoa> you, as a ruby dev, want to check what I'm doing under the table
jrendell has joined #ruby
<lsoa> without C knowledge, how would you do that?
banjara has quit [Client Quit]
banjara has joined #ruby
<lsoa> this is the scenario that I'm trying to paint
<apeiros_> lsoa: how'd that problem be different with an abstract class?
<lsoa> you could have a ruby method that performs the validation
<apeiros_> if you do the validation in C, it's in C, regardless whether you have an abstract class or not
banjara has quit [Client Quit]
adambeynon has joined #ruby
<lsoa> the C class simply calls super.method, then extracts the new value and pastes it in the struct
banjara has joined #ruby
duosrx has joined #ruby
<lsoa> ruby dev can see what's going on, C can also "see" the new value
banjara has quit [Client Quit]
carloslopes has quit [Remote host closed the connection]
<apeiros_> nothing stops you from doing that without using super and abstract class.
<Hanmac> .... when you want to use an abstract Ruby class, that is intherited by a C++ it BITES you
banjara has joined #ruby
<lsoa> Hanmac: how so?
<apeiros_> just have a setter with validation which calls a setter without validation
atyz has quit [Ping timeout: 245 seconds]
aaronmcadam has joined #ruby
banjara has quit [Client Quit]
<gyre007> is it possible to use mongoid outside of rails ?
banjara has joined #ruby
s__dana_ has joined #ruby
<apeiros_> gyre007: of course
<aaronmcadam> should be a standalone gem
<gyre007> or moped or something...I want to avoid creating config files like yaml arrgh
yourmysin has quit [Remote host closed the connection]
banjara has quit [Client Quit]
<apeiros_> mongo for config? o0
<Drewch> Is there a way to get value of array, but it not to be given by reference?
banjara has joined #ruby
<lsoa> argh, I'll think this through and bring a better example of what I'm trying to accomplish
<apeiros_> that sounds like the best fun ever… :)
forced_request has joined #ruby
<gyre007> apeiros_: im only asking because I swear I havent found an example that wouldnt have any reference to rails...
<aaronmcadam> anyone know how to install a gem from github?
khismetix has quit [Quit: Computer has gone to sleep.]
<aaronmcadam> ie without bundler?
<Drewch> such that x = array[1]; x.insert(0, 'hello'); puts array[1] << doesn't modify it
<aaronmcadam> oh, I could just clone the repo and make it, duh
<gyre007> no no mongo for config
<apeiros_> aaronmcadam: clone/download, run `gem build *.gemspec`, then `gem install -l *.gem`
<lsoa> oh
<aaronmcadam> ya, thanks
<lsoa> btw
<aaronmcadam> thanks apeiros_ :)
<lsoa> can I simply add methods to a class I defined in C?
<apeiros_> lsoa: yes
<lsoa> aha
banjara has quit [Client Quit]
<apeiros_> that's why you can do `class Array; def fun; … end; end` too
<becom33> oneof my array is like this arr[[]] i need to check if the array is empty arr.any? won't work
banjara has joined #ruby
<aaronmcadam> apeiros_: just found this: https://github.com/rdp/specific_install
duosrx_ has joined #ruby
statarb3 has joined #ruby
<shevy> becom33 you can still use .flatten before
<lsoa> apeiros_: then my life is so much easier, if I want to write a binding
duosrx has quit [Ping timeout: 264 seconds]
R_Macy has joined #ruby
mootpointer has joined #ruby
ad_r has joined #ruby
banjara has quit [Client Quit]
<ad_r> hi
<shevy> becom33 [[]].flatten.empty? # => true
nazty has quit [Read error: Connection reset by peer]
banjara has joined #ruby
nsxt has quit [Ping timeout: 250 seconds]
drale2k has joined #ruby
<lsoa> I can write the low level stuff in C, then add high level methods in pure ruby
<lsoa> after I can access the structs I need
<apeiros_> exactly
echobin92 has quit [Read error: Connection reset by peer]
banjara has quit [Client Quit]
<lsoa> I think I understand it better now
mmitchel_ has joined #ruby
<lsoa> thanks :D
s__dana has quit [Ping timeout: 276 seconds]
s__dana_ is now known as s__dana
banjara has joined #ruby
echobinary has joined #ruby
<apeiros_> you can also prototype in ruby
<apeiros_> then when you think something is a bottleneck, move that part to C too
<adT> hi
heliumsocket has joined #ruby
banjara has quit [Client Quit]
jrendell has quit [Quit: jrendell]
<lsoa> I see. but it's kind of the reverse I'm trying to do now
<lsoa> I have this lib in C which I want to use in ruby
banjara has joined #ruby
<Hanmac> and when C is bottlenecking move that part to ASM :P
johnnygoodmancp1 has joined #ruby
<lsoa> and then you move it to the *cloud*
<adT> when I do something like "\x00\x11\x22\x33"[1,2].unpack('v*')[0] I get the correct value => 8721 But If I do "\x00\x11\x22\x33"[1,1].unpack('v*')[0] (just offset 1) I get nil
* lsoa ducks :D
banjara has quit [Client Quit]
s__dana_ has joined #ruby
<adT> can I solved that using other way?
_jc has joined #ruby
dblack__ has quit [Quit: dblack__]
johnnygoodmancp1 has left #ruby [#ruby]
<shevy> lsoa ruby needs you!
banjara has joined #ruby
<shevy> ruby needs C people
<lsoa> I'm hardly a C person :D
<shevy> you know C
<apeiros_> adT: why do you even expect that to work?
<lsoa> I'm just a nosy sysadmin
<apeiros_> v needs 2 bytes
soulisson has joined #ruby
<lsoa> eheheheh
<jrajav> Judgmental Asian dad says: Why you C person? Why you no A person?
<shevy> I don't know C but I know ruby a bit
<lsoa> jrajav: haha
<apeiros_> if you want to unpack 1 byte, use the proper template string. e.g. "C"
<shevy> jrajav must be the local entertainer at work
banjara has quit [Client Quit]
<adT> apeiros_: I kwno that that could not work :p but is there any way to add padding to avoid that. My problem is that the offset is a var --> "\x00\x11\x22\x33"[1,i].unpack('v*')[0]
mmitchell has quit [Ping timeout: 252 seconds]
<jrajav> Also I feel very comfortable using that meme because I have several Asian friends (from different countries even), and their dads (or moms filling in for the role) are literally that, exactly.
banjara has joined #ruby
<adT> and I would like to add padding in the case I have just a nible
dougireton has joined #ruby
<lsoa> well thanks guys, let me hammer my problem a lil more then I'll bring some more issues to you :D
banjara has quit [Client Quit]
banjara has joined #ruby
theRoUS has quit [Ping timeout: 276 seconds]
phretor has joined #ruby
s__dana has quit [Ping timeout: 250 seconds]
s__dana_ is now known as s__dana
banjara has quit [Client Quit]
banjara has joined #ruby
Virunga_ is now known as Virunga
<soulisson> hi, sorry about this question but i'm having troubles understanding the concept of attribute in oop, can someone explain as simply as possible ?
Zolo has quit [Remote host closed the connection]
banjara has quit [Client Quit]
banjara has joined #ruby
jrendell has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<apeiros_> soulisson: data associated with an object
<apeiros_> your object is a person - it might have the attributes: first_name, last_name, date_of_birth etc.
samphippen has quit [Ping timeout: 240 seconds]
banjara has quit [Client Quit]
banjara has joined #ruby
<apeiros_> whereas methods do something with the data. your person might have a method `age`, which calculates the age in years
banjara has quit [Client Quit]
<soulisson> so in the following example, the color of the car is red, color is the attribute and red is the value of the attribute ?
banjara has joined #ruby
<apeiros_> yes
banjara has quit [Client Quit]
<soulisson> ok, thanks
banjara has joined #ruby
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
huoxito has quit [Read error: Connection timed out]
alexyz has joined #ruby
banjara has quit [Client Quit]
<alexyz> does rescue always require a begin?
huoxito has joined #ruby
hadees has quit [Quit: hadees]
banjara has joined #ruby
<apeiros_> alexyz: yes. but `def` can also act as `begin`
Onii-san has quit [Ping timeout: 245 seconds]
<shevy> alexyz hmm I think so
samphippen has joined #ruby
<apeiros_> ah, there's also inline rescue
reset has joined #ruby
<apeiros_> but I'd rather disadvise its use
dougireton has quit [Remote host closed the connection]
<alexyz> apeiros_: so one could write: def name <statements> rescue ... end?
<aaronmcadam> anyone know if bundler have dropped the --binstubs flag?
<aaronmcadam> gives an error now
<apeiros_> alexyz: yes
<alexyz> interesting... thanks apeiros_
cheese1756 has quit [Ping timeout: 245 seconds]
<apeiros_> nice for short methods
banjara has quit [Client Quit]
adkron__ has quit [Ping timeout: 240 seconds]
enroxorz is now known as abed-zorz
banjara has joined #ruby
<shevy> but how could such a short method fail?
vierja has joined #ruby
banjara has quit [Client Quit]
Squarepy has quit [Quit: Leaving]
solidoodlesuppor has quit [Remote host closed the connection]
banjara has joined #ruby
<alexyz> shevy: I imagine it could be a 3rd party system call, i/o etc
gothicsouth has quit [Ping timeout: 255 seconds]
banjara has quit [Client Quit]
banjara has joined #ruby
<shevy> hmm
moca has joined #ruby
s0ber_ has joined #ruby
aztak has joined #ruby
dougireton has joined #ruby
etcetera has quit []
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
banjara has quit [Client Quit]
banjara has joined #ruby
gothicsouth has joined #ruby
<apeiros_> shevy: in all ways possible
<apeiros_> sometimes even in some impossible ways
banjara has quit [Client Quit]
Guest45517 has joined #ruby
banjara has joined #ruby
s0ber has quit [Ping timeout: 245 seconds]
s0ber_ is now known as s0ber
jbueza has left #ruby [#ruby]
tonini has quit [Remote host closed the connection]
Gwyxx has quit [Ping timeout: 256 seconds]
jbueza has joined #ruby
hbpoison has joined #ruby
jonathanwallace has joined #ruby
mpfundstein has joined #ruby
<Guest45517> hi all, i'm trying to install redmine 2.2.3 on windows server 2012 x64, with mysql. i have a lot of trouble, mainly with imagemagick and with mysql connector too. is there a "step guide" (i've tried to follow the wiki's one, without success) that can help me? i know that this is not mainly a ruby problem, but i think that the issue is related to the gem installation of the product...
jlast has quit [Remote host closed the connection]
<julian-delphiki> THat sounds god damn terrifying
nsxt has joined #ruby
<julian-delphiki> i'm not sure why anyone trys to do anything ruby on windows.
<Guest45517> julian, i undestand... but my company want it on windows
<Guest45517> i know that this doesn't sound great :'(
rkj has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
etcetera has joined #ruby
Davey has joined #ruby
soulisson has quit [Remote host closed the connection]
banjara has quit [Client Quit]
banjara has joined #ruby
sam113101 has joined #ruby
hbpoison_ has quit [Ping timeout: 252 seconds]
banjara has quit [Client Quit]
robbyoconnor has joined #ruby
banjara has joined #ruby
akashj87 has quit [Ping timeout: 245 seconds]
jtharris has quit [Quit: WeeChat 0.4.0]
banjara has quit [Client Quit]
banjara has joined #ruby
MattRB has quit [Quit: Leaving]
<Guest45517> julian, you think this is not good or that this is not really possible? :(
jtharris has joined #ruby
duosrx_ has quit [Remote host closed the connection]
banjara has quit [Client Quit]
aleph-null has joined #ruby
banjara has joined #ruby
<scriabin> is there any Head|Tail list functionality somewhere in Ruby? (like erlang etc.)
abed-zorz is now known as enroxorz
<scriabin> I have an array of arrays which I need to convert into some set-like data structure
banjara has quit [Client Quit]
samphippen has quit [Quit: Computer has gone to sleep.]
banjara has joined #ruby
<scriabin> trouble is, in at least one case, the arrays inside aren't the same size
Es0teric has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
<whitequark> scriabin: so?
<scriabin> long story, sorry
jtharris has quit [Client Quit]
Bira has quit [Ping timeout: 276 seconds]
yalue has quit [Read error: Connection reset by peer]
<whitequark> scriabin: I don't understand your problem. Anyway, look up Array#flatten
jsonperl has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
sambao21 has joined #ruby
sirish has joined #ruby
banjara has quit [Client Quit]
<jsonperl> ruby c extension question
banjara has joined #ruby
<jsonperl> i have a struct that contains a reference to a VALUE object (a ruby array)
freakazoid0223 has quit [Read error: Connection reset by peer]
huoxito has quit [Ping timeout: 245 seconds]
jgrevich has quit [Ping timeout: 245 seconds]
<jsonperl> how can I make sure that it's marked so the GC does not collect it
krawchyk has quit [Ping timeout: 256 seconds]
banjara has quit [Client Quit]
<jsonperl> it seems that the GC cares not about references to a ruby object from C
<jsonperl> it just collects it anyway
banjara has joined #ruby
jgrevich has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
<Hanmac> jsonperl: rb_global_variable
iamjarvo has quit [Quit: Leaving.]
<jsonperl> and that just slaps it on kernel?
yashshah has quit [Ping timeout: 245 seconds]
banjara has quit [Client Quit]
hbpoison has quit [Ping timeout: 248 seconds]
<scriabin> I can't just iterate and grab |key, value|
banjara has joined #ruby
<apeiros_> |key,value| doesn't sound like an array…
<scriabin> because of the frikkin missaped array [c,3,4]
banjara has quit [Client Quit]
<scriabin> apeiros_: converting to a Hash
<apeiros_> scriabin: maybe you show us input and expected output
<shevy> with .grep I can search in an array, but is there a way to find at which position the entry in the array occurs?
<apeiros_> preferably in a gist
banjara has joined #ruby
<apeiros_> shevy: Array#index with a block
<scriabin> in erlang I can just grab Head|Tail
<shevy> %w( abc def ghi ).grep(/de/) # should give me back "1" eventually
<shevy> ah ok thanks apeiros_
<jsonperl> Hanmac: thanks!
banjara has quit [Client Quit]
banjara has joined #ruby
<apeiros_> scriabin: Hash[ary.map { |k,*v| [k,v] }] if you want it normalized
jtharris has joined #ruby
banjara has quit [Client Quit]
<apeiros_> if you really want this denormalized "once the value is an array, once not" oddball thingy, then add a check for v.size == 1
banjara has joined #ruby
jurassic has quit [Quit: jurassic]
<scriabin> apeiros_: does the *v deal with the irregular tail?
jurassic has joined #ruby
<Hanmac> it turns everything into an array :P
<scriabin> ok I'll *try* it :)
<scriabin> thanks
<apeiros_> irb is your friend
<apeiros_> or pry
sam113101 has quit []
<whitequark> scriabin: note that head|tail in erlang and [h,*t] construct in ruby are very different internally and exist for completely different reasons
Quebert has joined #ruby
jurassic has quit [Client Quit]
whowantstolivef1 has quit [Ping timeout: 264 seconds]
testingb0t has joined #ruby
DrShoggoth has joined #ruby
huoxito has joined #ruby
arturaz_ has quit [Remote host closed the connection]
horofox_ has quit [Quit: horofox_]
<scriabin> ape that's totally awesome - thanks
pkrnj has quit [Quit: Computer has gone to sleep.]
jonahR has quit [Quit: jonahR]
<jsonperl> Hanmac: it seems as if rb_global_variable will never release the memory until the program exits
joofsh has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 260 seconds]
<Hanmac> jsonperl what else did you expect?
<jsonperl> Hanmac: It looks as though rb_gc_register_address and rb_gc_unregister_address should allow me to clean it up
<jsonperl> well i want to hold it… till i no longer want it
<jsonperl> but this is a server… so it will create and reclaim a lot of times
<jsonperl> but that function pointed me to those, so very much appreciate
generalissimo is now known as trollissimo
<halogenandtoast> maybe you don't want a global.
cmarques has joined #ruby
<Hanmac> hm i didnt get rb_gc_register_address working for me ... so i use an hash with rb_global_variable and then store the object like { INT2NUM(obj) => obj } inside the hash
khismetix has joined #ruby
<jsonperl> ill go give it a shot
Stilo has joined #ruby
<Hanmac> PS: you cant use an array for that because it will bite you
<jsonperl> back in 5 :)
horofox_ has joined #ruby
huoxito has quit [Ping timeout: 240 seconds]
<jsonperl> a comprehensive ruby c api doc would be amazing
<jsonperl> i found most info in random forum posts
Spooner has joined #ruby
bradhe has joined #ruby
<Hanmac> jsonperl: that is nothing :P ... i have an lib where an C++ object forces an Ruby Object to stay alive as long the C++ object lives :P
huoxito has joined #ruby
<jsonperl> i started trying to c++ some of my logic
<jsonperl> kinda gave up for the time
<jsonperl> i've got some BEEEFY stuff going on in c
<jsonperl> the api is very powerful, once you know it
<jsonperl> deepworldgame.com
<jsonperl> the backend is all ruby/c
baustin has quit [Read error: Connection reset by peer]
brianpWins has joined #ruby
kpshek has quit []
wf2f has quit []
becom33 has quit [Quit: Leaving]
testingb0t has quit [Quit: Leaving.]
j^2 has quit [Ping timeout: 264 seconds]
chussenot has quit [Quit: chussenot]
<jsonperl> i think rb_gc_unregister_variable is gone
<jsonperl> maybe it was once there
horofox_ has quit [Quit: horofox_]
sparrovv has joined #ruby
huoxito has quit [Ping timeout: 260 seconds]
alexim has quit [Ping timeout: 252 seconds]
mark_locklear has quit [Read error: Operation timed out]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
Chocobo has quit [Quit: leaving]
vierja has quit [Quit: Textual IRC Client: www.textualapp.com]
enebo has quit [Quit: enebo]
kevinfagan has joined #ruby
jlast has joined #ruby
Michae___ has quit [Remote host closed the connection]
arturaz_ has joined #ruby
vipjun has quit [Ping timeout: 256 seconds]
sirish has quit [Ping timeout: 276 seconds]
hbpoison has joined #ruby
theRoUS has joined #ruby
wobblini has joined #ruby
sambio has joined #ruby
<scriabin> when you convert an Array of Arrays to a Hash, if the Array of Arrays has multiple "keys" then some of the records get dropped. Is there any nifty ruby-way of knowing which records got dropped?
pandawarrior1 has quit [Quit: Leaving.]
mootpointer has quit [Quit: Computer has gone to sleep.]
mercwithamouth has joined #ruby
<scriabin> a = [["a",1],["a",2]]
<scriabin> h = Hash[*a]
<scriabin> a.size != h.size
<apeiros_> a) select duplicate values, b) use merge with a block instead of Hash::[]
<apeiros_> there are probably a couple of other ways
<whitequark> scriabin: group_by { |(k,v)| k }.select { |_,v| v.any? }
<whitequark> err, v.count > 1
stkowski has quit [Quit: stkowski]
alexim has joined #ruby
<apeiros_> and with [["a",1],["a",2]], you want Hash[a], not Hash[*a]
jtharris has quit [Quit: WeeChat 0.4.0]
<scriabin> why? what's wrong with Hash[*a] (I'm learning)
<apeiros_> try it
walbert has quit [Remote host closed the connection]
<apeiros_> that very example in irb
tjbiddle has joined #ruby
dougireton has quit [Quit: Leaving.]
<scriabin> I did. ok I didn't try the Hash[a]
<apeiros_> you get ["a",1] as key and ["a",2] as value
mikurubeam has joined #ruby
<apeiros_> with *a, you use it as Hash[k1,v1,k2,v2,…]
xbob has quit [Quit: Leaving]
ebobby has quit [Ping timeout: 245 seconds]
<scriabin> well that's wierd: {["a", 1]=>["a", 2]}
<jsonperl> Hanmac: Hah!
<jsonperl> 420 void
<jsonperl> 423 http://rxr.whitequark.org/mri/ident?i=rb_gc_register_address(http://rxr.whitequark.org/mri/ident?i=var);
<jsonperl> 422 {
<jsonperl> 425
<jsonperl> 424 }
<jsonperl> oops hangon
<jsonperl> 420 void
<jsonperl> 421 rb_global_variable(VALUE *var)
<jsonperl> 423 rb_gc_register_address(var);
<jsonperl> 422 {
<jsonperl> 424 }
<shevy> what
<jsonperl> 425
<shevy> the
<shevy> fuck man
Bira has joined #ruby
<shevy> ah good, it stopped :D
fermion has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> I was worried we would count up to 10000
alx- has quit [Quit: alx-]
<Spooner> jsonperl, Paste not into the channel. Paste onto gist.github.com or pastie.org or well,anywhere else :)
_nitti_ has joined #ruby
<jsonperl> its 6 lines
<jsonperl> well it was more… but because im a dummy
<shevy> but twice
<shevy> haha :D
tommyvyo has quit [Quit:]
echobinary has quit [Read error: Connection reset by peer]
<jsonperl> 6.times do { backspace }
<shevy> this is like good old BASIC man
<shevy> 10 hello world
<shevy> 20 goto 10
<jsonperl> its ruby source
sparrovv has quit [Quit: WeeChat 0.3.4]
echobinary has joined #ruby
<scriabin> heck yeah
<jsonperl> you probably have used it once or twice :)
sparrovv has joined #ruby
Illusioneer has quit [Read error: Connection reset by peer]
<shevy> wait
Gu_______ has quit [Quit: Computer has gone to sleep.]
sailias has quit [Ping timeout: 264 seconds]
<shevy> 6.times do { backspace } <-- what's that!
mmitchel_ has quit [Remote host closed the connection]
k610 has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 264 seconds]
mmitchell has joined #ruby
kpshek has joined #ruby
rkj has quit [Ping timeout: 264 seconds]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
tjbiddle_ has joined #ruby
_nitti has quit [Ping timeout: 248 seconds]
blacktulip has quit [Remote host closed the connection]
DrShoggoth has quit [Ping timeout: 256 seconds]
Morkel_ has quit [Quit: Morkel_]
aztak has quit [Quit: :wq]
huoxito has joined #ruby
danneu has joined #ruby
Faris has quit [Read error: Connection reset by peer]
flashuni has joined #ruby
dougireton has joined #ruby
sparrovv has left #ruby ["WeeChat 0.3.4"]
<jsonperl> hanmac: those methods are there… i was incorrect
ebobby has joined #ruby
<jsonperl> both rb_gc_unregister_address and register… work nicely
tjbiddle has quit [Ping timeout: 272 seconds]
tjbiddle_ is now known as tjbiddle
<jsonperl> thnx again
<scriabin> whitequark: ok so a1.group_by { |(k,v)| k }.select { |_,v| v.count > 1 }.keys tells me the records which are multiple keys - thanks
neku has quit [Quit: Linkinus - http://linkinus.com]
zeta has joined #ruby
<zeta> why does ruby open a shit load of tcp/udp ports much of the time ?
pkrnj has joined #ruby
<Hanmac> zeta ... i think wrong channel ... my ruby doesnt open any tcp connection
<jsonperl> ha, mine either
arturaz_ has quit [Remote host closed the connection]
codecop has quit [Quit: Išeinu]
mityaz has quit [Quit: See ya!]
<julian-delphiki> not mine either
enroxorz has quit [Read error: Connection reset by peer]
<zeta> what?! I have at least 138 known connections using ruby
Myconix has quit [Ping timeout: 245 seconds]
<julian-delphiki> zeta: um, running what
<Hanmac> zeta i think you are looking for #rubyonrails
geekbri has quit [Remote host closed the connection]
<scriabin> ruby?
garbagecollectio has quit [Quit: garbagecollectio]
<zeta> running sending packets to and from all kinds of different ip addresses
<julian-delphiki> zeta: what are you running w/ ruby.
<scriabin> ruby has networking packages, but you gotta use them to get connections opening
Criztian has joined #ruby
<zeta> scriabin: oh well then that might explain it
<apeiros_> zeta: you downloaded ruby from some porn site or something? :)
<scriabin> lol
<zeta> apeiros_: actually no, I don't use this computer for porn
<scriabin> ruby is a good porn name I guess
<zeta> lol
<Hanmac> "ruby - now with more open tcp ports"
<apeiros_> bunga bunga
<breakingthings> rubby
<apeiros_> berlusconi approves, ruby is good…
takeru has joined #ruby
<scriabin> sxomebody get Matz on the phone I think we have a new marketing idea!
<Hanmac> and now he gets to jail :P
_nitti_ has quit [Ping timeout: 264 seconds]
sjkaliski has joined #ruby
garbagecollectio has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
<zeta> hmmm so the ruby language uses networking protocols
<zeta> is this correct ?
mercwithamouth has quit [Ping timeout: 255 seconds]
<scriabin> indeed it does :)
<Hanmac> only if you call them
<julian-delphiki> zeta: well, it can... again, what are you running in ruby
<scriabin> two girls, one ruby
<Hanmac> zeta, question again: did you maybe use RAILS?
jsonperl has left #ruby [#ruby]
<breakingthings> zeta: you am botnet
<zeta> breakingthings: yes i am the botnet
<breakingthings> you have download my trojan ruby
<breakingthings> ha ha
* breakingthings puts on his russian themed russian stuff
<zeta> breakingthings: well how can I get rid of it
<breakingthings> I am bad guy.
<breakingthings> zeta where did you install rubby from
<scriabin> just because you are bad guy, doesn't mean you have ot be bad _guy_
<zeta> I don't remember ever installing ruby i can just see it running from a program i have called little snitch
<breakingthings> wut.
_nitti has joined #ruby
<breakingthings> what os are you on
<apeiros_> zeta: oh dude…
<scriabin> define "i can see it running"
<apeiros_> you are running a ruby script
jpfuentes2 has joined #ruby
<apeiros_> breakingthings: that's osx
<zeta> osx yes
dahood has joined #ruby
takeru has quit [Ping timeout: 272 seconds]
<Hanmac> zeta that was your first failure :P
<zeta> little snitch is network protocol anylizer./monitor
sjkaliski has quit [Ping timeout: 248 seconds]
<apeiros_> zeta: ruby is a programming language.
<apeiros_> not just some program
<zeta> apeiros_: yes i know this
<apeiros_> and some application of yours is probably running a ruby script
<zeta> apeiros_: ahhhh, there we go
<zeta> apeiros_: now we're getting somewhere :)
<apeiros_> and *of course* a ruby script can make network connections. but *ruby* itself won't.
<apeiros_> and if you know that ruby is a programming language, then your initial question was rather misleading and silly.
elaptics`away is now known as elaptics
<scriabin> but if you're worried, unplug it from the wall and put on a hat fashioned from tin foil. Also bag up your poop in ziplocks
<Hanmac> apeiros_ only if its the EA version :P
<apeiros_> Hanmac: the EA version won't run offline
<scriabin> so are there *no* set functions for hashes?
<scriabin> bummer
<Hanmac> yeah that what i meant ;P
<apeiros_> scriabin: ¿que?
<scriabin> hashes seem a lot like sets, right?
francisfish has quit [Remote host closed the connection]
ozgura has joined #ruby
<apeiros_> well, you can express about every data structure as a set
<scriabin> I'm trying to compare two csv files in ruby
dahood has left #ruby [#ruby]
elux has quit [Quit: Leaving...]
<scriabin> the files ought to be identical, if they're not, I want to list what's present in file a but not in file b or vise-versa
<zeta> apeiros_: ok, I think its all good and tell breakingthing I don't have a
emergion has joined #ruby
<zeta> botnet, lol
<Quadlex> scriabin: Is order important?
<scriabin> no it's not
<scriabin> I mean the file should start alphabetized, but I can manipulate it in any order
<breakingthings> zeta ur all the botnets
<Quadlex> So you couldn't use diff
<breakingthings> i am russian hacker
<breakingthings> ha ha
joshman_ has quit [Ping timeout: 256 seconds]
aaronmcadam has quit [Quit: Leaving...]
<zeta> breakingthings: I'm sure you're a hacker but my computer has not become a zombie machine by you
<breakingthings> zeta yes it has
<breakingthings> you do not know
<breakingthings> ha ha
emocakes has quit [Quit: emocakes]
<apeiros_> scriabin: so basically you want to compare rows
<zeta> breakingthings: of course I know bitch, I know what is happening now and if you're such a hacker then go ahead and gain remote access to me
<apeiros_> scriabin: just use Set then
<scriabin> apeiros_: yeah but since ruby is always so amazing I try not to iterate as a first try :)
<apeiros_> a = Set.new(CSV.read(file1)); b = Set.new(CSV.read(file1)); a-b; b-a
<breakingthings> LOL
<breakingthings> zeta
<breakingthings> i'm just screwing around bud
<zeta> give my my location, prove your hackiness because I have tracerouted all the IP addresses and they all come back whitlisted
joshman_ has joined #ruby
<breakingthings> calm yo self
<apeiros_> b should obviously be file2
<breakingthings> can't you tell by the horrible "I AM RUSSIAN" 'accent'
aaronmcadam has joined #ruby
banseljaj is now known as imami|afk
Bira has quit [Ping timeout: 272 seconds]
<scriabin> again: amazing
<scriabin> I didn't know csv could just be read into a set
havenn has joined #ruby
<scriabin> if there are duplicate keys they just get dropped?
jamesfung14 has joined #ruby
<scriabin> silently?
jgrevich_ has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<zeta> breakingthings: lol oh
<zeta> k sorry
<scriabin> boris and natasha ovuh heeya
ablemike has quit [Remote host closed the connection]
jgrevich has quit [Ping timeout: 276 seconds]
jgrevich_ is now known as jgrevich
georgi has joined #ruby
mikurubeam has quit [Quit: +1 (Yes.) -1 (No.) i (WTF?)]
kayloos has quit [Read error: Connection reset by peer]
georgi has quit [Client Quit]
jekotia has joined #ruby
<julian-delphiki> zeta: what software are you running with ruby.
<havenn> scriabin: A duplicate key is the same key with a new valueB but prolly should check if keys are unique as you parse them to Hash, since Hash keys are unique.
<breakingthings> julian-delphiki: it's some OSX internal stuff.
Giorgio has joined #ruby
<julian-delphiki> lol
emmanuelux has joined #ruby
<havenn> Here is a little Ruby script to copy and paste to clipboard in OS X. Anyone see improvements? IO.popen needed?: https://gist.github.com/havenwood/5112407
Giorgio has quit [Client Quit]
georgi_ has joined #ruby
georgi_ has quit [Client Quit]
yekta has quit [Quit: yekta]
<apeiros_> scriabin: duplicate records would only occur once, yes
Giorgio has joined #ruby
Criztian has quit [Remote host closed the connection]
etcetera has quit []
tomku has quit [Ping timeout: 248 seconds]
<apeiros_> if records can be duplicated, I'd use counting hashes instead and compare occurrence counts
<scriabin> so I'm thinking I read csv into a hash and into a set, check if there are dup's in the array (using the nifty group_by) on the array, then proceed with set functions
<apeiros_> a = Hash.new(0); CSV.read(file1).each do |row| a[row] += 1 end
<zeta> julian-delphiki: yes osx running network ruby scripts or some shit like that, nothing malicous because I have tracerouted the ip addresses and everything is whitelisted
<scriabin> apeiros_: if there are dups, then they are in error, but there may be dups.
<julian-delphiki> lol
lewix has quit [Remote host closed the connection]
<scriabin> this ought to be a file of application's on a server, [package_name,version]
<havenn> scriabin: So what is the desired behavior when you're parsing csv to hash and you find a dup? Raise an error? Rename the dup?
DrShoggoth has joined #ruby
<scriabin> it's a report, so I'
<scriabin> I'll just report it
tomku has joined #ruby
chrishough has quit [Quit: chrishough]
invisime has quit [Quit: Leaving.]
<scriabin> "In file a, these records were defined more than once: ..."
garbagecollectio has quit [Quit: garbagecollectio]
pkrnj has quit [Quit: Computer has gone to sleep.]
emergion has joined #ruby
phantasm66 has quit [Quit: *sleeeep….]
phretor has quit [Quit: phretor]
kofno has quit [Remote host closed the connection]
halogenandtoast has quit [Quit: halogenandtoast]
<epta> How can I found unused `require's in ruby file?
<epta> Or unused variables
rocket_ has joined #ruby
mootpointer has joined #ruby
rocket- has joined #ruby
<julian-delphiki> i don't know about requires, but ruby -w would tell you some
<havenn> epta: An unnecessary require will return false. Ruby 2.0 can report assigned but unused variables.
johnnygoodmancpa has joined #ruby
reppard has joined #ruby
<havenn> epta: Oh, by unnecessary require do you mean that it has already been required or that the class or module in the required file isn't used?
tjbiddle_ has joined #ruby
<johnnygoodmancpa> exit will stop the script, break will stop the loop.
<johnnygoodmancpa> Is there a ruby command to stop executing only THIS PASS on a loop?
<havenn> johnnygoodmancpa: next
gyre007 has quit [Ping timeout: 248 seconds]
<johnnygoodmancpa> havenn: hug
Quebert has quit [Ping timeout: 250 seconds]
idkazuma has joined #ruby
<epta> havenn: be unused require I mean `require 'some'' which is useless because non of imported objects are not used
jekotia_ has joined #ruby
<havenn> epta: ah, gotcha
jekotia has quit [Ping timeout: 252 seconds]
jekotia_ is now known as jekotia
rocket_ has quit [Ping timeout: 252 seconds]
<scriabin> havenn ok I've come full circle
<havenn> epta: I guess you've got to decide what used means. If there is a single constant referenced or monkey patch or method on main.
<scriabin> reading a csv file into a set returns a set of arrays (that makes sense I'm sure)
<apeiros_> a row is an array of fields
tjbiddle has quit [Ping timeout: 272 seconds]
tjbiddle_ is now known as tjbiddle
<scriabin> {["apache","2.6.12"],["sshd","1.8.9"]}
<scriabin> etc.
slainer68 has joined #ruby
jpfuentes2 has quit [Ping timeout: 272 seconds]
<scriabin> surely file_a_set < file_b_set won't work in a set-like way?
kristofers has quit []
<havenn> I like that Ruby 2 doesn't report _-prefixed variables if they are assigned an unused. Nice idiom.
dougireton has quit [Quit: Leaving.]
<apeiros_> and what would "set1 smaller than set2" do?
<apeiros_> in a set-like way…
brianpWins has quit [Ping timeout: 255 seconds]
emergion has quit [Ping timeout: 264 seconds]
havenn is now known as havenwood
<apeiros_> havenwood: rubymine was/is clever that way too
gaahrdner has quit [Remote host closed the connection]
<apeiros_> (and yes, good that ruby does that now too)
<scriabin> sorry I used < to mean 'is a subset of"
<apeiros_> scriabin: let me introduce you to ri
<apeiros_> `ri Set` in your bash or whatever shell will give you a list of all methods of Set
khismetix has quit [Ping timeout: 245 seconds]
<apeiros_> I'm sure you'll find the method you're looking for
<havenwood> apeiros_: Nice. I checked out a beta EAP release of RubyMine and it seemed pretty cool. Have you used it for larger projects? Fast enough? Worth it to deal with complexity?
<apeiros_> scriabin: alternatively you could look at the code I gave you, which ends with `a-b` and `b-a`
<scriabin> proper_subset, asliased as <
jpfuentes2 has joined #ruby
jso_ is now known as jso
<apeiros_> havenwood: I don't use it myself. coworker does. seems nice. but make sure you've shitloads of ram ready for it
<scriabin> I'm asking whether that kind of function works for a set of arrays, not a set of primals?
<scriabin> I'll test in irb
emergion has joined #ruby
Progster has joined #ruby
<havenwood> apeiros_: I've got 16GB but just flop between TextMate 2 and VIM.
khismetix has joined #ruby
<havenwood> apeiros_: Tried to get emacs working with xiki but gave up without really trying very hard
axl_ has quit [Quit: axl_]
<aedorn> havenwood: That's like my gaming machine... it has 32GB, but it just sits there collecting dust. *sigh* Okay, not quite like my gaming rig then.
* apeiros_ is switching between sublime and bbedit
<apeiros_> but I think sublime will win
R_Macy has quit [Quit: Computer has gone to sleep.]
johnnygoodmancpa has left #ruby [#ruby]
breakingthings has quit []
mercwithamouth has joined #ruby
<Quadlex> aedorn: Aww, but what do you play FTL on?
dougireton has joined #ruby
khismetix has quit [Client Quit]
<aedorn> Quadlex: my work laptop!
<Quadlex> I like your style.
* Quadlex awards 5 points
<havenwood> apeiros_: mm, i've got a sublime license and actually really like the overview-thingy on the right - tempting to use because of OS X, Linux, Win support. But I like TM2.
<apeiros_> funny, overview-thingy was the first thing I disabled
<shevy> hehehe
brnrdbrk has joined #ruby
<brnrdbrk> exit
<havenwood> apeiros_: That is the think I like! >.>
brnrdbrk has quit [Quit: leaving]
<havenwood> s/think/thing
<apeiros_> I should probably search for a plugin which enables a focus mode like eiffel's IDE had
<apeiros_> it showed you only the current method
<havenwood> tooling ftw
huoxito has quit [Ping timeout: 272 seconds]
SCommette has joined #ruby
<apeiros_> well, bed time for me
<apeiros_> gn8
<havenwood> later
<Spooner> I turned off the code thumbnail thing in Sublime. It was pretty, but I didn't find it actually useful.
brianpWins has joined #ruby
<havenwood> Spooner: I found i recognized the shape of spots in the code from the overview. Thats how i do written pages too though. Maybe kinda a synesthesia thing.
<aedorn> I use the overview to find empty spaces. If there's too much space then there's room for more obfuscation to torture the future with.
<havenwood> Spooner: Just for larger files.
echobinary has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
Michae___ has joined #ruby
otherj has joined #ruby
<Spooner> havenwood, I usually edit in a half-width window and it just stopped me seeing 80 columns. It needed to be more useful ;)
<havenwood> I'd love to have more visualization tools for code. :)
<havenwood> Spooner: Space is precious.
julian-delphiki has quit [Quit: Computer has gone to sleep.]
<Spooner> Now Rubymine's Git integration colouring on the sidebar; that is useful!
__Big0__ has quit [Remote host closed the connection]
jimeh has quit [Quit: Computer has gone to sleep.]
_jc has quit [Quit: Textual IRC Client: www.textualapp.com]
Michae___ has quit [Read error: Connection reset by peer]
Micha____ has joined #ruby
etcetera has joined #ruby
<aedorn> Spooner: so how much RAM does RubyMine really eat?
<Spooner> I also hard-code a 80 column code width, so my code isn't so obviously raggedy as it might be (so doesn't look so interesting in an overview).
forrest has quit [Quit: Leaving]
<Spooner> It is chunky, but I've never worried about it. Why do I need RAM while I'm editing?
alanp_ has joined #ruby
alanp has quit [Disconnected by services]
__Big0__ has joined #ruby
<havenwood> Spooner: I sometimes have a twinge of guilt over 78
<aedorn> You don't ... but I have so many VMs running, I tend to worry about it.
alanp_ is now known as alanp
Coolhand|laptop has quit [Ping timeout: 264 seconds]
emergion has quit [Ping timeout: 264 seconds]
etcetera has quit [Client Quit]
<havenwood> aedorn: I think i'd be willing to spare a few gig of ram if the coding experience was substantially improved, but yeah for portability whatev you cant count on resources
tylersmith has joined #ruby
<Spooner> aedorn, Right. I do use VMs a bit, but only one or two at a time. There was a time when I was developing in Windows when I used to edit with Rubymine in Windows and run tests in a Lubuntu VM because they ran faster!
c0rn has quit [Ping timeout: 252 seconds]
interactionjaxsn has quit [Remote host closed the connection]
emmanuelux has quit [Remote host closed the connection]
cmarques has quit [Ping timeout: 260 seconds]
<havenwood> <3 Vagrant
<Spooner> I just (finally) got a free open-source license for Rubymine. I will buy it if I need it for a large Ruby project though (I'm just using Sublime for short Python&Ruby scripts at the mo).
nari has joined #ruby
<aedorn> Well, let me quantify "many". An average day requires about 13 to be up. Now doing this on one system is "A Dumb Idea", but some jerk in the cube over likes to keep the temperature at a constant 75, and sitting around a bunch of machines makes my immediate area around 85. I'm trying to avoid local warming.
<Spooner> Ouch! That is a lot.
horofox has joined #ruby
c0rn has joined #ruby
<havenwood> Virtualize ALL THE THINGS! \o/
markalanevans_ has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
heliumsocket has quit [Quit: heliumsocket]
dougireton has quit [Quit: Leaving.]
skattyadz has quit [Quit: skattyadz]
<aedorn> Yeah... testing network devices becomes a whole different type of beast.
markalanevans has quit [Read error: Operation timed out]
markalanevans_ is now known as markalanevans
horofox has quit [Client Quit]
stkowski has joined #ruby
jerius has quit [Ping timeout: 250 seconds]
theRoUS has quit [Ping timeout: 276 seconds]
<Spooner> aedorn, At least you don't have to recursively virtualise 13 times. The last VM would run as fast as if it was running on a calculator from 1980 ;)
R_Macy has joined #ruby
horofox_ has joined #ruby
<aedorn> Spooner: hmmm... I do love me some HP48g action.
jgarvey has quit [Quit: Leaving]
adkron has joined #ruby
adkron_ has joined #ruby
moted has quit [Ping timeout: 245 seconds]
<Spooner> havenwood, Ubernerdgirl says "hello!"
garbagecollectio has joined #ruby
<havenwood> Spooner: Are you in NYC??
emocakes has joined #ruby
<Spooner> Nope, but I have Skype :D
dougireton has joined #ruby
<havenwood> Spooner: Aha!
moted has joined #ruby
heliumsocket has joined #ruby
nonotza has joined #ruby
<shevy> hmm
Xeago has quit [Remote host closed the connection]
etcetera has joined #ruby
SCommette has quit [Quit: SCommette]
kpshek has quit []
<Spooner> Ubernerdgirl: "Hello " * 5 + ", Havenwood!"
newUser1234 has quit [Remote host closed the connection]
ebobby has quit [Ping timeout: 276 seconds]
garbagecollectio has left #ruby [#ruby]
newUser1234 has joined #ruby
dmiller has joined #ruby
<shevy> man Spooner
<shevy> you are like the ruby-teleprompter
<shevy> "gimme a call, I'll translate your thoughts into ruby code"
pandawarrior1 has joined #ruby
scriabin has quit [Quit: Page closed]
<Spooner> That was just a paste. One day humanity will link Skype with IRC, but for today, there is cut-and-paste Spooner :D
emocakes has quit [Quit: emocakes]
<pandawarrior1> can anyone give an instance when they would use a proc/lambda/block?
tvw has quit []
<wildcard1> pandawarrior1: command pattern
hasimo has joined #ruby
<pandawarrior1> i'll look up what that is...
<aedorn> hmmm.. Skype message redirect
<aedorn> I could see it
brianpWins has quit [Ping timeout: 272 seconds]
<havenwood> pandawarrior1: I'd use block unless there is a compelling reason to do something else. Matz gives block syntactic sugar to make its use sweet.
<shevy> pandawarrior1 a block is ubiquitous to a method in ruby man
newUser1234 has quit [Ping timeout: 255 seconds]
<shevy> I use blocks all the time and almost never any procs
<havenwood> pandawarrior1: If you need to assign a var to your closure, lambda. If you need proc's return, proc.
<pandawarrior1> is this stuff covered anywhere?
aaronmcadam has quit [Quit: Leaving...]
rgbdev has joined #ruby
bwulf has joined #ruby
<pandawarrior1> i this in the relms of meta type thinking?
mpfundstein has quit [Remote host closed the connection]
wyhaines has quit [Remote host closed the connection]
<havenwood> pandawarrior1: Yeah, there are some good screencasts and blog posts. The best thorough comparison I can think of is a talk Wycatz gave. Sec, i'll find.
<pandawarrior1> havenwood: cheers
<wildcard1> most of the time i use procs is to name blocks
<wildcard1> in case you want to pass/call them out of scope
j^2 has joined #ruby
<pandawarrior1> 1 hour plus :) nice
<havenwood> wildcard1: Yeah, that is what Yehuda argues for. I'd prefer to use lambda for same return functionality as block. If you need named + loose arity or procs return then proc. Guess it is just preference.
adkron_ has quit [Ping timeout: 276 seconds]
adkron has quit [Ping timeout: 276 seconds]
<havenwood> wildcard1: Wycatz goes as far as to say he'd prefer lambda be deprecated.
<Quadlex> Delicious closures
<wildcard1> hmm
walbert has joined #ruby
<wildcard1> that's interesting. mostly the reason i differentiate is based on the return behavior like you said
<havenwood> wildcard1: I like lambda. Named block, stabby syntax, win.
<wildcard1> i'll have to look at the reasons he suggest deprecation
pepper_chico has quit [Quit: Computer has gone to sleep.]
<wildcard1> i should look at the way they're implemented too. it maybe give some insight into further differences
m8 has quit [Quit: Sto andando via]
kofno has joined #ruby
luckyruby has joined #ruby
<havenwood> wildcard1: His point was just that block and proc are sufficient as to what he was discussing. He touched on lambda being odd-man-out with strict arity, but I think since he was discussing tenet's correspondence principle lambda was really irrelvant.
<wildcard1> ah
geggam_wk has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
reppard has quit [Ping timeout: 264 seconds]
<havenwood> wildcard1: On the other hand, proc and lambda varying from each other in two non-conflicting ways is the Ruby-way. Wycatz's recommendation of proc could be an interesting debate, since Matz seems to prefer -> unless proc is needed.
malkomalko has quit [Remote host closed the connection]
julian-delphiki has joined #ruby
ebobby has joined #ruby
c0rn has quit [Ping timeout: 276 seconds]
<havenwood> wildcard1: Actually, I'm more sure that Avdi is in the lambda court than Matz. But I'd like to hear Avdi and Wycatz discuss the issue.
<wildcard1> i've always looked at them as farly synonymous except for the return behavor. im not sure that i'd develop a strong opinion either way unless i found out that there's some other drastic difference i've overlooped
<wildcard1> *overlooked
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> wildcard1: strict versus loose arity and return behavior are the only two differences (other than each's pairs of syntax varying) that i know of
halogenandtoast has joined #ruby
c0rn has joined #ruby
<havenwood> wildcard1: { lambda: [->, lambda], proc: [proc, Proc.new] }
<havenwood> pseudo-code^
flashuni has quit [Quit: Computer has gone to sleep.]
* wildcard1 nods
Roa has quit [Ping timeout: 250 seconds]
k3rn3lito has quit [Ping timeout: 276 seconds]
Choobie has joined #ruby
Choobie has quit [Changing host]
Choobie has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
k3rn3lito has joined #ruby
pepper_chico has joined #ruby
dustint has quit [Quit: Leaving]
carlyle has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 245 seconds]
jrajav has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
sambao21 has quit [Quit: sambao21]
hbpoison has quit [Ping timeout: 245 seconds]
martxel has joined #ruby
mmitchell has quit [Read error: Operation timed out]
julian-delphiki has quit [Ping timeout: 260 seconds]
jpfuentes2 has quit [Ping timeout: 256 seconds]
jrendell has quit [Quit: jrendell]
jlast has quit [Remote host closed the connection]
julian-delphiki has joined #ruby
stopbit has quit [Quit: Leaving]
jpfuentes2 has joined #ruby
drale2k has quit [Ping timeout: 276 seconds]
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
TheFuzzball has quit [Quit: Leaving...]
_nitti has quit [Ping timeout: 260 seconds]
QaDeS_ has quit [Quit: Ex-Chat]
<pandawarrior1> nigght!
pandawarrior1 has quit [Quit: Leaving.]
frem has quit [Quit: Computer has gone to sleep.]
aed has quit []
miskander has quit [Quit: miskander]
drale2k has joined #ruby
wormwood has quit [Quit: leaving]
tomzx_mac has joined #ruby
wormwood has joined #ruby
havenwood has quit [Remote host closed the connection]
icole has quit [Remote host closed the connection]
Targen has joined #ruby
jsonperl has joined #ruby