apeiros changed the topic of #ruby to: Ruby 2.1.0; 2.0.0-p353; 1.9.3-p484: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
jonah_k has quit [Remote host closed the connection]
ledestin has joined #ruby
pitzips has quit [Quit: Leaving]
bovi has quit [Ping timeout: 272 seconds]
dx7 has quit [Ping timeout: 248 seconds]
jobewan has quit [Ping timeout: 260 seconds]
Al___ has quit [Quit: Al___]
Yahkob has joined #ruby
angusiguess has quit [Ping timeout: 260 seconds]
habanany has joined #ruby
jonah_k has joined #ruby
habanany1 has quit [Read error: Connection reset by peer]
soulcake has quit [Ping timeout: 260 seconds]
RoryHughes has quit []
rootshift_ has joined #ruby
bovi has joined #ruby
clov3r_ has quit [Remote host closed the connection]
danman has joined #ruby
clov3r has joined #ruby
bricker_ is now known as bricker
mrevd has quit [Quit: Leaving.]
mary5030 has joined #ruby
<mojjojo> can anyone give me some code example for web scraping javascript/dynamic website?
angusiguess has joined #ruby
whomp has quit [Quit: leaving]
damien__ has joined #ruby
Aryasam has joined #ruby
<damien__> greetings!
predator217 has joined #ruby
nisstyre has quit [Quit: WeeChat 0.4.2]
asteros has joined #ruby
jobewan has joined #ruby
<dingus_khan> asked in #ruby-lang: is there some reason the last value in a CSV is being read as nil in the following?: http://codepad.org/h7rTvAtJ
clov3r has quit [Ping timeout: 260 seconds]
<damien__> Working with a vagrant config file, I am trying to output the name of the ssh user, but I simply get an Object address, i.e. the code 'puts "Username: #{config.ssh.username}"' is producing this as the output: 'username: #<Object:0x000000026a9ee0>' everything I seem to do just keeps showing the object memory address instead of the value that I set (which was config.ssh.username = "ubuntu") I'm expecting to see "ubuntu", not an address.... any ideas/help?
blackmesa has quit [Ping timeout: 240 seconds]
jobewan has quit [Read error: Connection reset by peer]
kpshek has quit []
mando_ has joined #ruby
predator117 has quit [Ping timeout: 245 seconds]
Kricir has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 272 seconds]
gr33n7007h has quit [Ping timeout: 260 seconds]
whowantstolivef1 has joined #ruby
gr33n7007h has joined #ruby
binaryhat has quit [Read error: Connection reset by peer]
habanany has quit [Ping timeout: 248 seconds]
whowantstolivef2 has quit [Ping timeout: 250 seconds]
Kricir has joined #ruby
thumpba has quit [Remote host closed the connection]
Skylab has quit [Quit: Skylab]
blackmesa has joined #ruby
zB0hs has quit [Quit: Textual IRC Client: www.textualapp.com]
duggiefresh has joined #ruby
estebanr1les has joined #ruby
habanany has joined #ruby
Guest8697 has quit [Changing host]
Guest8697 has joined #ruby
Guest8697 is now known as seekwill
razibog has quit [Ping timeout: 260 seconds]
estebanrules has quit [Ping timeout: 260 seconds]
iamjarvo has quit [Ping timeout: 260 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
gr33n7007h has quit [Read error: Operation timed out]
duggiefresh has quit [Ping timeout: 260 seconds]
sparrovv has quit [Remote host closed the connection]
sailias has joined #ruby
bthesorceror has joined #ruby
yarou has quit [Remote host closed the connection]
thesheff17 has quit [Read error: Operation timed out]
mikecmpbll has quit [Quit: i've nodded off.]
kitak has joined #ruby
iamjarvo has joined #ruby
mikepack has joined #ruby
wald0 has quit [Ping timeout: 272 seconds]
kitak has quit [Read error: Connection reset by peer]
meatherly has joined #ruby
kitak has joined #ruby
stonevil has quit [Quit: Computer has gone to sleep.]
clov3r has joined #ruby
loliveira has quit [Quit: loliveira]
fedesilva has joined #ruby
<Collin> What's the best way to wrap some data in ruby?
nateberkopec has quit [Quit: Leaving...]
<platzhirsch> Collin: Curly brackets? { }
<Collin> i.e. I have a string "0.21.56" and I want to wrap it in a class that lets me do something like version.major
stonevil has joined #ruby
<platzhirsch> Collin: oh :) Structs, or OpenStructs
Noldorin has quit [Read error: Connection reset by peer]
cashnguns has joined #ruby
fedesilv_ has quit [Ping timeout: 260 seconds]
<Collin> Thanks, I'll look that up
habanany has quit [Quit: Leaving.]
soulcake has joined #ruby
habanany has joined #ruby
mikepack has quit [Ping timeout: 260 seconds]
Bumptious has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
<terrellt> Collin: Or write a class.
baroquebobcat has quit [Quit: baroquebobcat]
aspires_ has quit []
evilbug has joined #ruby
rootshift_ has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
Kricir has quit [Remote host closed the connection]
pranny has joined #ruby
danshultz has joined #ruby
razrunelord has joined #ruby
gtsiftsis has quit [Quit: Leaving]
Aryasam has quit [Ping timeout: 272 seconds]
Noldorin has joined #ruby
<razrunelord> Hey guys, if an argument passed to a method is &foo, does it mean that it creates a proc called foo?
gregf has quit [Quit: WeeChat 0.4.2]
clov3r has quit [Remote host closed the connection]
<xybre> razrunelord: no
clov3r has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.2]
<xybre> razrunelord: if foo is already a proc it will get passed as a block though.
danshultz has quit [Ping timeout: 248 seconds]
<razrunelord> what is the use of ampersand in method args?
<razrunelord> xybre:
madb055 has quit [Ping timeout: 248 seconds]
danman has quit [Quit: danman]
<Collin> Is there any reason not to use an openstruct?
<xybre> Collin: when you really want a class
<razrunelord> Collin: Struct is mainly used to create a class with no responsibilities as far as I know
<xybre> razrunelord: it passes a proc as the methods block
<Noldorin> I know almost nothing about ruby, but am debugging somethign... what's wrong with this?
<Noldorin> print "foo: " + ENV['PYTHONPATH'] + "\n"
<Noldorin> looks perfectly fine to me
clov3r has quit [Ping timeout: 245 seconds]
Sammael has joined #ruby
bthesorceror has quit [Remote host closed the connection]
<razrunelord> Noldorin: try interpolation
<xybre> If there's no environment variable with that name it will be nil
SilentHobo has joined #ruby
<xybre> You can't add strings (or anything) to a nil
asmodlol has quit [Remote host closed the connection]
nisstyre has joined #ruby
clov3r_ has joined #ruby
MatthewsFace has quit [Quit: Leaving]
pietr0 has quit [Quit: pietr0]
Shidash has joined #ruby
<xybre> razrunelord: yeah that
<xybre> >> [1,2,3].map(&:to_s)
<eval-in> xybre => ["1", "2", "3"] (https://eval.in/100699)
<xybre> razrunelord: what that article is talking about is in the method signature, not the method call, just fyi
Hobogrammer_ has quit [Ping timeout: 260 seconds]
<s2013> shit i forgot this. but how do i do something like a != b || c
<s2013> >> a = 10; a != 11 || 10;
<eval-in> s2013 => true (https://eval.in/100701)
<razrunelord> xybre: what is a method signature?
<Noldorin> ok thanks xybre
<xybre> razrunelord: where a method is defined. starts with "def"
<s2013> anyone?
dingus_khan has quit [Remote host closed the connection]
larissa has quit [Quit: Leaving]
<xybre> s2013: thats not really a question
<s2013> ok what part is confusing
<xybre> s2013: what is the desired output?
<s2013> if a = 10 and i do a != 11 || 10 it should return false
<s2013> i am basically trying to remember how to do it properly cause i know in ruby its a bit odd
<xybre> I can't see a way that could possibly return false
<xybre> Except to drop the last condition
<s2013> forget my syntax
<s2013> i want to know how to do a is not equal to b or c
<xybre> >> a = 10; (a == 11)
<eval-in> xybre => false (https://eval.in/100703)
top4o has quit [Ping timeout: 260 seconds]
<s2013> ?
<xybre> >> a = 10; a == 11
<eval-in> xybre => false (https://eval.in/100704)
<xybre> Now it returns false
parzo has quit [Remote host closed the connection]
<razrunelord> xybre: Thanks for your help
<s2013> but i need to check it against 2 conditions
Aryasam has joined #ruby
<xybre> >> a = 10; [10,11].include? a
<eval-in> xybre => true (https://eval.in/100705)
parzo has joined #ruby
<s2013> k thanks
<xybre> >> a = 10; ![10,11].include?(a)
<eval-in> xybre => false (https://eval.in/100706)
<razrunelord> xybre: Can you think of a real life situation where I might need to send a proc to a method?
<razrunelord> xybre: isn't a method a first class object in ruby? I might pass that around
thams has quit [Quit: thams]
nanoyak has quit [Quit: Computer has gone to sleep.]
danman has joined #ruby
top4o has joined #ruby
<xybre> razrunelord: yes to both, but its more an exceptional case, its not needed as often as you'd think
b00stfr3ak has quit [Ping timeout: 248 seconds]
Hobogrammer_ has joined #ruby
whatasunnyday has joined #ruby
<xybre> razrunelord: typically you jsut pass a normal block to a method and then yield to it.
nanoyak has joined #ruby
<xybre> There are absolutely reasons to do it other ways, but they are much more rare.
<Collin> Is overloading nil? frowned upon
<xybre> Collin: try it and let me know, I'm guessing its a bad plan
parzo has quit [Ping timeout: 250 seconds]
burlyscudd has quit [Quit: Leaving.]
sensen has joined #ruby
<xybre> >> nil = 5
<eval-in> xybre => /tmp/execpad-cc5575baeb04/source-cc5575baeb04:2: Can't assign to nil ... (https://eval.in/100707)
Aryasam has quit [Ping timeout: 260 seconds]
SilentHobo has quit [Ping timeout: 272 seconds]
meatherly has quit []
kcombs has quit [Remote host closed the connection]
<xybre> >> def nil; p 'y u do dis'; end; self.send :nil
<eval-in> xybre => "y u do dis" ... (https://eval.in/100708)
<razrunelord> xybre: Oh wait, methods are not objects in ruby
<xybre> razrunelord: they are
<xybre> >> Array.instance_method(:first)
<eval-in> xybre => #<UnboundMethod: Array#first> (https://eval.in/100709)
kevind has quit [Quit: kevind]
fedesilva has quit [Remote host closed the connection]
<razrunelord> actually, no. If I have a method def foo; "bar"; end
Hobogrammer_ has quit [Ping timeout: 272 seconds]
v0n has joined #ruby
<razrunelord> and assign foo to an x
<razrunelord> x returns bar
<razrunelord> not an object of the method
sdwrage has quit [Quit: This computer has gone to sleep]
<xybre> razrunelord: setters are different than getters
<razrunelord> I need to do x.method(:foo)
meatherly has joined #ruby
jonno11 has quit [Quit: Textual IRC Client: www.textualapp.com]
weems has joined #ruby
tvw has quit []
<Collin> Is there a Ruby way to do 'x = y or b if y is nil' or do I just use the ternary operator like other languages?
<xybre> >> Array.method(:new).class
<eval-in> xybre => Method (https://eval.in/100710)
tjbiddle has quit [Ping timeout: 248 seconds]
[gmi] has quit [Read error: Connection reset by peer]
sdwrage has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
tkuchiki has joined #ruby
robustus has quit [Ping timeout: 245 seconds]
<xybre> They are a special case like Numerics and Symbols.
<xybre> Collin: yo ucan have trailing if clauses in Ruby
<xybre> >> x = 1 if defined? x
<eval-in> xybre => 1 (https://eval.in/100711)
<Collin> So x = 1 if 1 is defined, otherwise x?
gr33n7007h has joined #ruby
<xybre> A less confusing example
<xybre> >> puts('hi') if true
<eval-in> xybre => hi ... (https://eval.in/100712)
<xybre> >> puts('hi') unless false
<eval-in> xybre => hi ... (https://eval.in/100713)
<Collin> I know I can do that
robustus has joined #ruby
<xybre> >> y = nil; b = 5; x = y || b
<Collin> It's just the 'use x if true, otherwise y' part
<eval-in> xybre => 5 (https://eval.in/100714)
<Collin> But there's no way to do it in one statement (aside from the ternary operator?)
<Collin> It seems like a common case, so I figured Ruby would have something more Englishy
i_s has joined #ruby
<xybre> That's a single statement
<xybre> >> x = nil || 5
<eval-in> xybre => 5 (https://eval.in/100715)
<Collin> Oh, cool
<Collin> Thanks
danman has quit [Quit: danman]
evenix has joined #ruby
<xybre> np
i_s_ has quit [Ping timeout: 260 seconds]
Yahkob has left #ruby [#ruby]
recurrence has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
burgess has joined #ruby
bthesorceror has joined #ruby
sdelmore has quit [Quit: Leaving.]
gr33n7007h has quit [Ping timeout: 260 seconds]
marr has quit [Ping timeout: 260 seconds]
sdelmore has joined #ruby
gr33n7007h has joined #ruby
stonevil has quit [Quit: Computer has gone to sleep.]
<Nyyx> >> y = nil; b = 5; x = if y.nil? then b else y end
<eval-in> Nyyx => 5 (https://eval.in/100716)
<Collin> I'm so bad at Ruby
Tomasso has joined #ruby
<Collin> Is there a way to prevent 'new' from being called outside of a class?
<Nyyx> why would you want that
saarinen has quit [Quit: saarinen]
carif_ has joined #ruby
mary5030 has joined #ruby
<Collin> I can initialize something with either an array or string, google tells me the correct way to do this is to create 'initialize_with_x' methods to call new
<Collin> Is there a better way?
pixelgremlins has joined #ruby
Nanuq has joined #ruby
meinside has joined #ruby
<platzhirsch> Collin: I don't quite understand that. You want to do: YourClass.new([1,2,3]) ?
<Collin> I could do YourClass.new([1,2,3]) or YourClass.new("1.2.3")
<Collin> Both should have equivalent behavior
<platzhirsch> Collin: Then write the code for that logic in the method def initialize(input)
dingus_khan has joined #ruby
Wolland has joined #ruby
pixelgremlins_ba has quit [Ping timeout: 272 seconds]
zxd has quit []
<platzhirsch> if input.is_a?(Array) ... elsif input.is_a?(String) ...
iamjarvo has quit [Ping timeout: 260 seconds]
damien__ has quit [Quit: Leaving]
petey has joined #ruby
baroquebobcat has joined #ruby
Tomasso has quit [Ping timeout: 245 seconds]
lmickh has quit [Remote host closed the connection]
ukd1 has quit [Remote host closed the connection]
Skylab has joined #ruby
pixelgremlins_ba has joined #ruby
ukd1 has joined #ruby
<Collin> This sucks
<Collin> I have no idea what I'm doing
<Collin> I have a generic class with a function 'get_list_of_things(klass)' that iterates Klass.objects and appends their JSON representation to a string
<Collin> Actually nevermind
snath has quit [Ping timeout: 260 seconds]
pranny has quit [Quit: Leaving.]
havenwood has quit [Remote host closed the connection]
burlyscudd has joined #ruby
burlyscudd has quit [Changing host]
burlyscudd has joined #ruby
havenwood has joined #ruby
Jdubs has quit [Remote host closed the connection]
havenwood has quit [Read error: Connection reset by peer]
pixelgremlins has quit [Ping timeout: 272 seconds]
pranny has joined #ruby
havenwood has joined #ruby
fella6s has quit [Read error: Connection reset by peer]
ukd1 has quit [Ping timeout: 245 seconds]
burlyscudd has quit [Read error: Connection reset by peer]
burlyscudd has joined #ruby
someword has joined #ruby
mansi has joined #ruby
ukd1 has joined #ruby
<lethjakman> is there an easy way to check if it's wedsnesday in ruby?
parzo has joined #ruby
<lethjakman> wednesday
jfoy has quit [Quit: jfoy]
pranny has quit [Ping timeout: 272 seconds]
burlyscudd has quit [Ping timeout: 245 seconds]
mansi has quit [Remote host closed the connection]
Solnse has quit [Ping timeout: 252 seconds]
glisignoli has joined #ruby
tylersmith has joined #ruby
someword has quit [Ping timeout: 260 seconds]
<terrellt> lethjakman: Time.current.wednesday?
<terrellt> Bah
<glisignoli> I've got a weird issue where gem is looking for ruby.h in /usr/lib64/ruby/ruby.h, but mine is in: /usr/local/lib/ruby/1.8/x86_64-linux/ruby.h
<terrellt> Rails, Time.now.wednesday?
danshultz has joined #ruby
<havenwood> lethjakman: require 'date'; Date::DAYNAMES[Time.now.wday] #=> "Tuesday"
estebanr1les has quit [Read error: Operation timed out]
Solnse has joined #ruby
parzo has quit [Ping timeout: 245 seconds]
<lethjakman> terrellt: returns false for tuesday...which is today.
clov3r_ has quit []
<lethjakman> havenwood: I'm using something similar to that. th anks!
<terrellt> lethjakman: You mean #tuesday? returns false?
<lethjakman> terrellt: oh my system clock is off.
<lethjakman> somehow....
<lethjakman> not quite sure what's going on there
<terrellt> lethjakman: Quite.
<lethjakman> good to know t hough
mary5030 has quit [Remote host closed the connection]
ukd1 has quit [Remote host closed the connection]
ukd1 has joined #ruby
<lethjakman> is there perhaps a way to temporarily change the day of the week for an rspec test? that for an rspec test?
<lethjakman> whoops ignore the last part.
mojo619 has quit [Quit: mojo619]
sdelmore has quit [Quit: Leaving.]
ukd1_ has joined #ruby
mlpinit has joined #ruby
dx7 has joined #ruby
jonah_k has quit [Remote host closed the connection]
sdelmore has joined #ruby
speakingcode has joined #ruby
ukd1 has quit [Ping timeout: 265 seconds]
burlyscudd has joined #ruby
tris has quit [Ping timeout: 250 seconds]
Lewix has joined #ruby
nobitanobi has quit [Quit: Leaving]
jonno11 has joined #ruby
i_s has quit [Remote host closed the connection]
stonevil has joined #ruby
Shidash has quit [Ping timeout: 250 seconds]
dx7 has quit [Ping timeout: 248 seconds]
sailias has quit [Ping timeout: 260 seconds]
gr33n7007h has quit [Quit: Leaving]
binaryhat has joined #ruby
vlad_starkov has joined #ruby
habanany1 has joined #ruby
habanany has quit [Ping timeout: 248 seconds]
yarou has joined #ruby
dingus_khan has quit [Read error: Connection reset by peer]
<Collin> I need to call one function or another, depending on whether a method returns true or false
centrx has joined #ruby
<Collin> Is there a good way to do this?
dingus_khan has joined #ruby
Jetchisel has joined #ruby
mehlah has quit [Quit: Leaving...]
nihils has joined #ruby
vlad_starkov has quit [Ping timeout: 265 seconds]
hamakn has quit [Remote host closed the connection]
oso96_2000 has quit [Ping timeout: 252 seconds]
habanany1 has quit [Ping timeout: 248 seconds]
nichtdiebohne has quit [Ping timeout: 272 seconds]
ephemerian has quit [Quit: Leaving.]
habanany has joined #ruby
Wolland has quit [Remote host closed the connection]
mojjojo has quit [Quit: mojjojo]
Kamilion has quit [Read error: Connection reset by peer]
estebistec has joined #ruby
oso96_2000 has joined #ruby
estebanrules has joined #ruby
waxjar has quit [Ping timeout: 252 seconds]
i8igmac has quit [Ping timeout: 265 seconds]
stonevil has quit [Ping timeout: 260 seconds]
dawkirst has quit [Ping timeout: 260 seconds]
evenix has quit [Remote host closed the connection]
yarou has quit [Remote host closed the connection]
evenix has joined #ruby
lethjakman has quit [Ping timeout: 265 seconds]
razrunelord has quit []
Collin has quit [Ping timeout: 250 seconds]
mercwithamouth has joined #ruby
snath has joined #ruby
<AntelopeSalad> what's the most reasonable way to "move all files from /foo to /foo/bar"?
waxjar has joined #ruby
<AntelopeSalad> you would be surprised at how difficult this problem really is
evenix_ has joined #ruby
splud has joined #ruby
<splud> lame question time!
evenix has quit [Ping timeout: 250 seconds]
<splud> I have an array, populated from a readlines()
<splud> I have a number of pieces of information I need to extract from this (is is a map file, from a cross compiler link operation)
thesheff17 has joined #ruby
hamakn has joined #ruby
Aryasam has joined #ruby
<splud> if I use a block, I can't seem to return JUST the matching items from the arrray: contents.index do |i| if i +~ /some regex/ then c.push(i) ; end; c ; end
cburyta has quit [Remote host closed the connection]
<splud> I need the regexp on each individual element, but I don't want nils for all the non-matching lines.
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<centrx> splud, Array#select
<platzhirsch> splud: post-process with .compact?
xue has joined #ruby
<splud> I'll check select, thanks!
mikepack has joined #ruby
<splud> sweet. That's what I was looking for.
palantir_ has joined #ruby
brennanMKE has joined #ruby
dawkirst has joined #ruby
Kricir has joined #ruby
freggles has quit [Remote host closed the connection]
* platzhirsch waves his hand: "This is not the method you are looing for"
* splud slings centrx a virtual brew.
burlyscudd has quit [Quit: Leaving.]
<splud> thanks for the suggest platzhirsch, but returning a concise set is better than cleaning a too-large one, in my book.
estebistec has quit [Remote host closed the connection]
<pontiki> there's a dual kegerator in the office where i work
cburyta has joined #ruby
mikepack has quit [Ping timeout: 250 seconds]
<splud> I'm just up the street from Lagunitas brewery. Another company I worked for ages ago was across the street from Moylan's brewpub.
<splud> I
<splud> v
benzrf has joined #ruby
<benzrf> hello ruby people
<platzhirsch> What's with beer brewing in software engineering, I don't approve
<benzrf> hows it goin
<splud> I've a kegerator in my barn though.
<splud> and a 100L cookpot.
mlpinit has quit [Remote host closed the connection]
<platzhirsch> benzrf: Not good, splud disapproved my suggestion to his question and now the topic is beer brewing, how original
<pontiki> their premier showcase product is a recipe network for home brewing enthusiasts
<benzrf> awesome
<benzrf> man its kinda a Paradox
<splud> platzhirsch: don't take it wrong - I appreciate the suggestion, and it probably would have worked fine, but select is indeed what I was looking for.
<benzrf> oops caps
<platzhirsch> splud: this is personal man
<benzrf> the simpler a syntax is, the more conducive it is to macros
<benzrf> but the simpler it is the more annoying it tends to be
<platzhirsch> centrx is an imposter
<benzrf> i.e. lisp has ultimately simple syntax and it is the original language w/ AST macros
<benzrf> but also, dem parens
* centrx
<splud> make things as simple as possible, but not too simple...
pierre1_ has joined #ruby
<platzhirsch> As concise as that the code gives you a bleeding nose at first look
<diegoviola> what do you guys think of Debian going with systemd by default?
slowcon has joined #ruby
x77686d has quit [Quit: x77686d]
<pontiki> i hate it
<centrx> diegoviola, I thought it was a good idea until I read an article linked by a troll
cburyta has quit [Ping timeout: 250 seconds]
<diegoviola> what article
werdnativ has quit [Quit: werdnativ]
ner0x has joined #ruby
<diegoviola> Debian has lots of forks, Linux Mint, etc, I wonder if systemd will also make it there
RoxasShadowRS has quit [Read error: Connection reset by peer]
<platzhirsch> Event based is always better. Debian you are drunk, go home
gregf has joined #ruby
joey1 has joined #ruby
<benzrf> man ruby is so dumb
<benzrf> pols violation errywhere
charliesome has joined #ruby
<benzrf> *pola i guess
<benzrf> man in python shit works the way youd expect
werdnativ has joined #ruby
<platzhirsch> wat?
<benzrf> like
<benzrf> look @ constants
<benzrf> hold on
<centrx> A variable with @ is not a constant
<benzrf> the @ is 'at'
mrsolo has joined #ruby
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
glisignoli has left #ruby [#ruby]
Naoe-Kanno has quit [Quit: ネウロイを負かさなきゃならないね]
<platzhirsch> Who uses constants
<centrx> Array#at or Time#at ?
gja has joined #ruby
<benzrf> who can tell me what http://bpaste.net/show/178259 prints
baroquebobcat has quit [Quit: baroquebobcat]
pranny has joined #ruby
<platzhirsch> 3?
<benzrf> just 1 line?
<centrx> "One and one half"
<benzrf> platzhirsch: there are 2 puts'
troyready has quit [Ping timeout: 260 seconds]
<pontiki> well, it should print 3 and 10
<platzhirsch> hm, 3 then 3?
<benzrf> platzhirsch: wrong
<benzrf> 3 then 10
<benzrf> because...
<benzrf> constant lookup is FUCKING WEIRD
nateberkopec has joined #ruby
<benzrf> constant scopes are lexical
<pontiki> well, name spaces aren't all that weird, really
nari has joined #ruby
<benzrf> i.e. the order in which scopes are searched is in order of lexical nesting
<benzrf> BUT
<pontiki> but it can be confusing, i guess
whatasunnyday has quit [Quit: whatasunnyday]
<benzrf> within a scope, lookup is dynamic-ish
<platzhirsch> I agree, you get similar behavior when using @@static_variables, but still this is a bit contrived example
krz has joined #ruby
<pontiki> it wouldn't be any sort of rant if the examples weren't contrived to be rantworthy, now would it?
<centrx> benzrf, module Foo::Bar is not the same as class Bar < Foo
<pontiki> be a sport
<benzrf> centrx: im aware
<platzhirsch> benzrf: post it on Hacker News with the title "This is why Ruby sucks"
<benzrf> but youd expect it to be either fully lexical or fully dynamic, no?
<benzrf> not some kind of weird hybrid
mrsolo has left #ruby ["Leaving"]
<benzrf> reasonable: the former and the latter both see A from the outermost scope
<benzrf> reasonable: the latter prints 3 because it searches Foo because dynamic in both ways
<benzrf> fucking weird: how it actually is
<benzrf> in python all names are either vars or attrs
werdnativ has quit [Ping timeout: 250 seconds]
<benzrf> and vars are scoped predictably and consistenyl
<benzrf> *consistently
bovi has quit [Ping timeout: 245 seconds]
<centrx> This seems pretty predictable and consistent as is?
pranny1 has joined #ruby
<benzrf> nnnnot really...
<pontiki> blahblah
<platzhirsch> But Python is also conservative
<pontiki> sound and fury
<centrx> The latter prints 10..
<benzrf> if I saw the first puts by itself, id assume the second one works the other way
<benzrf> and vice versa
mansi has joined #ruby
bovi has joined #ruby
Skylab has quit [Quit: Skylab]
<platzhirsch> Well the reasoning should be built around scoping and not about logics derived from experimenting
<benzrf> yes...
<benzrf> and it isnt lexical
<benzrf> it's dynamic, it looks in the scope that you're in
<benzrf> but then THOSE are nested lexically
mneorr has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
mneorr has joined #ruby
hobodave has joined #ruby
Hanmac has quit [Read error: Operation timed out]
<centrx> A = 10, except where it is overridden in module Foo
<platzhirsch> CONSTANTS — very dynamic — many scope — wow
danman has joined #ruby
<benzrf> platzhirsch: stop beating a dead Doge
<platzhirsch> dynamic is an adjective, I failed the meme shit
sumark has quit [Ping timeout: 246 seconds]
sumark has joined #ruby
pranny has quit [Ping timeout: 265 seconds]
<platzhirsch> sorry for trolling :) good night
platzhirsch has left #ruby [#ruby]
mansi has quit [Ping timeout: 265 seconds]
mlpinit has joined #ruby
Sawbones has joined #ruby
<RubyPanther> we don't have Perl-like lexical nesting for 2 reasons: it lets people like me be too expressive and build giant procedural WTFs instead of short clean methods, and also the implementation is expensive because we closures all over the place
mneorr has quit [Ping timeout: 245 seconds]
tkuchiki_ has joined #ruby
pranny1 has quit [Ping timeout: 250 seconds]
<benzrf> ok, so then go the whole dynamic and look in Foo::Bar, then Foo, then ::
<RubyPanther> I'd vote to have it, but that is why I can't have nice things. That is why an expressive language like Perl is bad for me.
evenix_ has quit [Remote host closed the connection]
Raboo has quit [Ping timeout: 245 seconds]
zarul has quit [Read error: Connection reset by peer]
Sawbones has quit [Remote host closed the connection]
<centrx> Foo::Bar does not inherit from Foo
<centrx> What do you expect it to do
evenix has joined #ruby
<benzrf> ~_~
<benzrf> if I do:
<benzrf> module Foo
<benzrf> module Bar
<benzrf> then it works as I would expect
tkuchiki has quit [Ping timeout: 260 seconds]
zarul has joined #ruby
<benzrf> i say that Foo::Bar should be considered nested in Foo
pranny has joined #ruby
parzo has joined #ruby
benzrf is now known as ballzrf
<ballzrf> bbloom:
<ballzrf> *bbl
<ballzrf> tagpro woo
danshultz has quit [Remote host closed the connection]
evenix has quit [Ping timeout: 265 seconds]
s2013 has quit [Ping timeout: 248 seconds]
Spami has quit [Quit: This computer has gone to sleep]
Sawbones has joined #ruby
zerun0_ has quit [Read error: Operation timed out]
tylersmith has quit [Read error: Connection reset by peer]
parzo has quit [Ping timeout: 272 seconds]
<ballzrf> fyi it is my birthday in about a week so i expect SOMEBODY to get me a present k
Senjai has quit [Ping timeout: 245 seconds]
tylersmith has joined #ruby
eshy has quit [Quit: Changing server]
Sawbones_ has joined #ruby
mlpinit has quit [Remote host closed the connection]
Atrumx has quit [Quit: Leaving]
mary5030 has joined #ruby
bovi has quit [Ping timeout: 248 seconds]
nari has quit [Ping timeout: 260 seconds]
joey1 has quit [Quit: WeeChat 0.3.7]
danman has quit [Quit: danman]
bovi has joined #ruby
Sawbones has quit [Ping timeout: 260 seconds]
asteros has quit [Quit: asteros]
zerun0_ has joined #ruby
mikepack has joined #ruby
Jdubs has joined #ruby
mary5030 has quit [Ping timeout: 272 seconds]
mansi has joined #ruby
Sleepee has quit [Quit: Leaving]
burlyscudd has joined #ruby
Sawbones_ has quit [Ping timeout: 260 seconds]
Kamilion has joined #ruby
eshy has joined #ruby
mlpinit has joined #ruby
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has quit [Read error: Connection reset by peer]
Senjai has joined #ruby
mansi has joined #ruby
<RubyPanther> how old are you gonna be ballzrf?
<centrx> 5
<centrx> or 99
<centrx> Hard to tell
<ballzrf> 17
<centrx> Are you related to benzrf
jh_ has joined #ruby
<splud> beh. readlines array doesn't dup nicely.
jh_ is now known as Guest22471
<ballzrf> i am benzrf but playing tagpro
<ballzrf> ball puns are mandatory
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
subbyyy_ has quit [Ping timeout: 245 seconds]
<splud> if I take an array populated by readlines, and select from that, I get arrays populated with my matches. If I then dup one of those arrays and gsub elements in it, the other arrays are modified. I presume the individual array elements are not duplicated, but instead references are copied during dup.
ixti has quit [Ping timeout: 252 seconds]
<RubyPanther> ballzrf: I didn't forget you, here you go: class Present; attr_accessor :size; def initialize size=99; @size=size end ; def open; a = ('a'..'z').to_a+('A'..'Z').to_a+(0..9).to_a ; p=''; size.times{p+=a[rand(a.size)]} ; p end end ; Present.new(5)
marcgg has quit [Read error: Connection reset by peer]
marcgg has joined #ruby
oso96_2000 is now known as oso|away
<splud> arrays each have a different object_id.
eka has joined #ruby
_maes_ has joined #ruby
rezzack has quit [Quit: Leaving.]
<ballzrf> i got an arg err
<splud> sure enough if I iterate through the array elements they're the same between the two arrays...
<RubyPanther> fine I'll even open it for you
<RubyPanther> >> class Present; attr_accessor :size; def initialize size=99; @size=size end ; def open; a = ('a'..'z').to_a+('A'..'Z').to_a+(0..9).to_a ; p=''; size.times{p+=a[rand(a.size)]} ; p end end ; Present.new(5).open
<eval-in> RubyPanther => no implicit conversion of Fixnum into String (TypeError) ... (https://eval.in/100728)
<splud> what use are dup and clone if they don't actually make separate instances?
<RubyPanther> what?!
<ballzrf> toldja
pranny has quit [Ping timeout: 245 seconds]
<RubyPanther> Works for me
<RubyPanther> >> RUBY_VERSION
<eval-in> RubyPanther => "2.1.0" (https://eval.in/100729)
cj3kim has joined #ruby
vpretzel has joined #ruby
<ballzrf> oh it works now
<ballzrf> wait
<RubyPanther> lol
<ballzrf> looks like sometimes works sometimes not
<ballzrf> o-o
<centrx> >> RUBY_PANTHER
<eval-in> centrx => uninitialized constant RUBY_PANTHER (NameError) ... (https://eval.in/100730)
<ballzrf> oh lol
<ballzrf> ur usin 0..9 not '0'..'9'
mojo619 has joined #ruby
<splud> ah, deep copy using map...
<ballzrf> >> 'abc'.sample 3
<eval-in> ballzrf => undefined method `sample' for "abc":String (NoMethodError) ... (https://eval.in/100731)
<ballzrf> oop
<RubyPanther> >> RUBY_PANTHER rescue 'Puma concolor rubyensis'
<eval-in> RubyPanther => "Puma concolor rubyensis" (https://eval.in/100732)
<ballzrf> >> 'abc'.to_a.sample 3
<eval-in> ballzrf => undefined method `to_a' for "abc":String (NoMethodError) ... (https://eval.in/100733)
<ballzrf> >> 'abc'.chars.to_a.sample 3
ballzrf is now known as benzrf
<eval-in> benzrf => ["b", "c", "a"] (https://eval.in/100734)
<benzrf> ok
<centrx> >> exit
<eval-in> centrx => exit (SystemExit) (https://eval.in/100735)
nari has joined #ruby
<benzrf> just do a.sample(size).each &:display
codezomb has quit [Read error: Connection reset by peer]
sailias has joined #ruby
<benzrf> no need for p
<benzrf> no need for a class even o-o
failshell has joined #ruby
binaryhat has quit [Quit: Leaving]
sepp2k has quit [Read error: Connection reset by peer]
ukd1_ has quit [Quit: Leaving...]
habanany1 has joined #ruby
carif_ has quit [Read error: Connection reset by peer]
habanany has quit [Ping timeout: 245 seconds]
carif has joined #ruby
sailias has quit [Ping timeout: 265 seconds]
<lpvn> >> 2+2
<eval-in> lpvn => 4 (https://eval.in/100736)
<lpvn> :33
<splud> 32
<splud> er, 42!
thomasxie has joined #ruby
<splud> okay, link validator seems to function. Woot.
ner0x has quit [Quit: Leaving]
aspires has joined #ruby
<splud> having to work around a problem with KEIL compiler and linker. Ugh.
failshell has quit [Remote host closed the connection]
dkamioka has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<splud> gnite
splud has quit [Quit: splud]
reset has quit [Quit: Leaving...]
reset has joined #ruby
kevinykc_ has joined #ruby
sensen has quit [Ping timeout: 248 seconds]
<benzrf> gnite
<benzrf> o 2late
kitak has quit [Remote host closed the connection]
sensen has joined #ruby
kevinykchan has quit [Read error: Operation timed out]
kitak has joined #ruby
yfeldblum has quit [Remote host closed the connection]
asteros has joined #ruby
asteros has quit [Client Quit]
mocfive has quit [Remote host closed the connection]
Aryasam has quit [Ping timeout: 248 seconds]
reset has quit [Ping timeout: 248 seconds]
aleiphoenix has joined #ruby
pfg has joined #ruby
mocfive has joined #ruby
mocfive has quit [Remote host closed the connection]
failshel_ has joined #ruby
Noldorin has quit [Ping timeout: 248 seconds]
aleiphoenix has quit [Client Quit]
mocfive has joined #ruby
yacks has joined #ruby
burgess has quit [Quit: ^zzz]
sski has quit [Remote host closed the connection]
bovi has quit [Quit: bovi]
FailDrain has joined #ruby
sski has joined #ruby
dx7 has joined #ruby
<FailDrain> well done to the designers of ruby you fucking rock compared to the bullocks that is c++ even though I use both I still feel ruby is vastly visually appealing and userfriendly and how I wish it could be more like not exactly but almost :D if there is a donation ability for ruby you can garentee that I'll do so
mocfive has quit [Ping timeout: 250 seconds]
carif has quit [Ping timeout: 260 seconds]
<FailDrain> and python is an abomination
<centrx> PHP is an abomination and a scourge on the face of the earth.
<FailDrain> PHP is fantastic : D abit vague tho I must admit
danman has joined #ruby
parzo has joined #ruby
<FailDrain> centrix: why is php an abomination by the way :P?
Noldorin has joined #ruby
sski has quit [Ping timeout: 272 seconds]
dx7 has quit [Ping timeout: 265 seconds]
krisbulman is now known as [krisbulman]
sfroehler has quit [Quit: Connection closed for inactivity]
danman has quit [Client Quit]
binaryhat has joined #ruby
mikepack has quit [Remote host closed the connection]
danman has joined #ruby
<FailDrain> centrix: I truely believe you can put the complexity of maximum in the most simplest formulas but some people seem to disagree If I could battle through the disgusting garbage that is man made abstraction of technicality and the amount of effort and time that goes into that Id have created it without a doubt
mikepack has joined #ruby
[krisbulman] is now known as krisbulman
<FailDrain> Create Window at 0,0 then when window is created make the titlebar red how fucking hard is it to make a computer understand that from binary umm let me think probably not that hard surely
axsuul has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
<FailDrain> hats of to the gosu developer who put the hole creation of a gl context in one word "gl" that is probably the most amazing thing I've seen in programming
havenwood has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
browndawg has joined #ruby
mikepack has quit [Ping timeout: 265 seconds]
aspires has quit []
baggypants has joined #ruby
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
angusiguess has quit [Ping timeout: 260 seconds]
Aryasam has joined #ruby
radic has quit [Ping timeout: 252 seconds]
nateberkopec has quit [Quit: Leaving...]
kobain has quit [Ping timeout: 248 seconds]
whatasunnyday has joined #ruby
iamjarvo has joined #ruby
kobain has joined #ruby
radic has joined #ruby
whatasunnyday has quit [Client Quit]
vlad_starkov has joined #ruby
jackal has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
jackal is now known as Guest50536
habanany1 has quit [Ping timeout: 272 seconds]
failshel_ has quit [Remote host closed the connection]
iamsean has joined #ruby
silicong has joined #ruby
<Guest50536> why does it sometimes fail to get my nick
vlad_starkov has quit [Ping timeout: 272 seconds]
binaryhat has quit [Quit: Leaving]
maletor has quit [Quit: Computer has gone to sleep.]
Davey has quit [Quit: Computer has gone to sleep.]
danshultz has joined #ruby
Guest50536 has quit [Quit: Leaving]
maletor has joined #ruby
v0n has quit [Read error: Connection reset by peer]
e^0 has joined #ruby
jzig has quit [Remote host closed the connection]
<FailDrain> sign up to freenode and get a real account first of all if there is still issues then I have no idea ;<
danman has quit [Ping timeout: 272 seconds]
jzig has joined #ruby
centrx has quit [Quit: Leaving]
PLejeck has quit [Ping timeout: 250 seconds]
terrellt_ has quit [Read error: Connection reset by peer]
aspires has joined #ruby
danshultz has quit [Read error: Operation timed out]
alvaro_o has quit [Ping timeout: 250 seconds]
PLejeck has joined #ruby
beakr has joined #ruby
maletor has quit [Ping timeout: 250 seconds]
whatasunnyday has joined #ruby
sski has joined #ruby
alvaro_o has joined #ruby
<beakr> Getting a segfault for JSON in Ruby 2.0.0-p247: https://gist.github.com/beakr/8949906
<havenwood> beakr: what code causes it?
someword has joined #ruby
<beakr> Appears when I run `rake db:create` (PostgreSQL database) in Rails.
jzig has quit [Ping timeout: 265 seconds]
habanany has joined #ruby
<slowcon> having trouble using split. i have a href attribute that displays "forumdisplay.php?f=78&amp;s=b8fced1719726fa29ff923e4702ec80b" i am trying to extract the unique forum selector, in this case 78. i split at 1- "?f" and 2 - "&" but can't get the end of the block right
<havenwood> beakr: try recompiling gems, they may have been built against a lib that was since updated
<beakr> I presumed it was an error with my PostgreSQL setup, but I don't get errors like that often.
e^0 has quit [Quit: WeeChat 0.4.2]
braincrash has joined #ruby
<havenwood> beakr: gem update --system && gem pristine --all
<beakr> I'll try that out...
Aryasam has quit [Read error: Connection reset by peer]
yarou has joined #ruby
<n88> slowcon: wheres your code
<havenwood> slowcon: require 'cgi'; CGI.parse("forumdisplay.php?f=78&amp;s=b8fced1719726fa29ff923e4702ec80b".split('?').first)
<havenwood> slowcon: err
agent_white has joined #ruby
sski has quit [Ping timeout: 260 seconds]
<havenwood> slowcon: I mean something like: CGI.parse("forumdisplay.php?f=78&amp;s=b8fced1719726fa29ff923e4702ec80b".split('?').last)["f"].first
<havenwood> slowcon: dunno
<slowcon> havenwood: haven't used cgiparse before
aspires has quit []
clindsay is now known as BraddPitt
whatasunnyday has quit [Quit: whatasunnyday]
angusiguess has joined #ruby
<havenwood> slowcon: require 'cgi'; require 'uri'; CGI.parse(URI.parse("forumdisplay.php?f=78&amp;s=b8fced1719726fa29ff923e4702ec80b").query)['f'][0].to_i #=> 78
<beakr> havenwood: `gem pristine --all` did it
whatasunnyday has joined #ruby
<havenwood> beakr: \o/
Noldorin has quit []
<beakr> havenwood: ヽ(^。^)丿
marcdel has joined #ruby
<slowcon> havenwood: the url is in a variable, so would i be able to do CGI.parse(URI.parse(variable).query)['f'][0].to_i
<havenwood> slowcon: yup
jack_rabbit has quit [Quit: SIGSEGV (core dumped)]
silicong has quit [Ping timeout: 250 seconds]
<havenwood> `[0].to_i` or `first.to_i` is optional, depends whether you want an array with a string in it, a string, or an integer.
parzo has quit [Read error: Connection reset by peer]
parzo has joined #ruby
<slowcon> havenwood: what about the [f]
<slowcon> havenwood: how does just that pull the id
<havenwood> slowcon: CGI.parse(URI.parse("forumdisplay.php?f=78&amp;s=b8fced1719726fa29ff923e4702ec80b").query) #=> {"f"=>["78"], "amp"=>[], "s"=>["b8fced1719726fa29ff923e4702ec80b"]}
fuhgeddaboudit has joined #ruby
<havenwood> slowcon: so `CGI.parse(URI.parse(variable).query)['f']` is `["78"]` (an Array with a single String in it)
<havenwood> >> ["78"].first.to_i
<eval-in> havenwood => 78 (https://eval.in/100742)
marcdel has quit [Client Quit]
mansi has quit [Read error: Connection reset by peer]
marcdel has joined #ruby
mansi has joined #ruby
PLejeck has quit [Changing host]
PLejeck has joined #ruby
PLejeck is now known as nuck
<benzrf> bye im sleeping dthx
benzrf has left #ruby [#ruby]
Kricir has quit [Remote host closed the connection]
petey has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 245 seconds]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest22471 has quit [Ping timeout: 260 seconds]
silicong has joined #ruby
silicong has quit [Max SendQ exceeded]
sparrovv has joined #ruby
silicong has joined #ruby
silicong has quit [Max SendQ exceeded]
silicong has joined #ruby
silicong has quit [Max SendQ exceeded]
Auid has joined #ruby
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
marcdel has quit []
marcdel has joined #ruby
BraddPitt has quit [Quit: Leaving]
BraddPitt has joined #ruby
BraddPitt has left #ruby [#ruby]
BraddPitt has joined #ruby
yfeldblum has joined #ruby
sparrovv has quit [Ping timeout: 260 seconds]
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblu_ has joined #ruby
JohnBat26 has quit [Ping timeout: 260 seconds]
mansi has quit [Client Quit]
bkparso has joined #ruby
Auid has quit [Quit: WeeChat 0.4.3]
yfeldblum has quit [Read error: Connection reset by peer]
palantir_ has quit [Ping timeout: 248 seconds]
stryek has quit [Ping timeout: 272 seconds]
bthesorceror has quit [Remote host closed the connection]
pdtpatrick has joined #ruby
JohnBat26 has joined #ruby
aspires has joined #ruby
bthesorceror has joined #ruby
sski has joined #ruby
<slowcon> havenwood: could you check this out http://pastebin.com/CACLqhRN
Shidash has joined #ruby
<slowcon> getting bad uri,not sure if I'm using it right
jack_rabbit has joined #ruby
<diegoviola> what's the point of transcribing old documents into text, what are people doing with that data?
Megtastique has joined #ruby
<havenwood> slowcon: What is `cuts`? Like `p cuts`.
<slowcon> havenwood: it was just a variable i made
nobitanobi has joined #ruby
<slowcon> havenwood: genreslink is an array of links. cuts takes just the href attribute out of them.
<havenwood> slowcon: i mean what string is it producing?
<slowcon> havenwood: forumdisplay.php?f=78&amp;s=12d609e531cd0d8db73d4f9be4ecf22f
<slowcon> havenwood: forumdisplay.php?f=184&amp;s=12d609e531cd0d8db73d4f9be4ecf22f
thams has joined #ruby
<slowcon> havenwood: could be any, but that is the pattern
<slowcon> havenwood: f= "XX" &
danijoo has quit [Read error: Connection reset by peer]
<slowcon> havenwood: looking to grab just that XX and input it to the database
<havenwood> slowcon: those #parse with URI
<havenwood> slowcon: so what it is when parsing fails?
danijoo has joined #ruby
<slowcon> havenwood: in `split': bad URI(is not URI?): (URI::InvalidURIError)
<havenwood> slowcon: I mean what is `cuts` when it fails.
shadoi has joined #ruby
AlexRussia has quit [Read error: Operation timed out]
<slowcon> havenwood: trying to get it to print to screen
<havenwood> slowcon: `p cuts` or better yet use Pry with `binding.pry` or better yet Pry with pry-rescue. :P
pfg has quit [Quit: Textual IRC Client: www.textualapp.com]
yasushi has joined #ruby
Fin1te has joined #ruby
jarjar_prime has quit [Quit: Sleep time.]
shadoi has quit [Client Quit]
jarjar_prime has joined #ruby
NaStYdoG has quit [Ping timeout: 272 seconds]
dingus_khan has quit [Remote host closed the connection]
NaStYdoG has joined #ruby
NaStYdoG is now known as Guest60299
mando_ has quit [Remote host closed the connection]
dingus_khan has joined #ruby
mando_ has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
kevinykc_ has quit [Read error: Connection reset by peer]
mocfive has joined #ruby
batman has joined #ruby
kevinykchan has joined #ruby
<batman> hi where can I learn more about the <=> operator?
batman is now known as Guest96010
mando_ has quit [Ping timeout: 245 seconds]
sski has quit []
io_syl has joined #ruby
brennanMKE has quit [Remote host closed the connection]
jamto11 has joined #ruby
<jamto11> "Under the hood, Ruby uses Marshal to to convert the hash to something it can write to disk. Marshal returns a byte stream; regardless of other issues, this fact is enough for it to be unsuitable for some applications." Why is using a byte-stream bad?
brennanMKE has joined #ruby
Megtastique has quit []
brycesenz has joined #ruby
browndawg has quit [Quit: Leaving.]
Fin1te has quit [Quit: Later tater.]
browndawg has joined #ruby
parduse has quit [Ping timeout: 250 seconds]
browndawg1 has joined #ruby
kate_r has joined #ruby
browndawg has quit [Client Quit]
kate_r has quit [Max SendQ exceeded]
mikepack has joined #ruby
browndawg has joined #ruby
Deele has joined #ruby
pdtpatrick has joined #ruby
dingus_khan has quit [Remote host closed the connection]
shadoi has joined #ruby
brennanMKE has quit [Ping timeout: 272 seconds]
nisstyre has quit [Quit: WeeChat 0.4.2]
diegoviola has quit [Quit: WeeChat 0.4.3]
Megtastique has joined #ruby
seekwill has quit [Read error: Operation timed out]
seekwill has joined #ruby
browndawg1 has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
seekwill is now known as Guest42117
ElCapitanMarklar has joined #ruby
Norrin has quit [Ping timeout: 272 seconds]
failshell has joined #ruby
ElCapitanMarklar has quit [Client Quit]
ElCapitanMarklar has joined #ruby
Norrin has joined #ruby
aagdbl has joined #ruby
dingus_khan has joined #ruby
<brycesenz> Hello fellow rubyists. I have a question on ruby best practices/preferences that I would love someone's opinion on. It's a bit long, so I just wrote it out here - https://gist.github.com/brycesenz/e51123d77e8b541eb833
cj3kim has quit [Remote host closed the connection]
makara has joined #ruby
failshell has quit [Ping timeout: 245 seconds]
thomasxie has left #ruby [#ruby]
x77686d has joined #ruby
pietr0 has joined #ruby
pietr0 has quit [Client Quit]
kpshek has joined #ruby
thesheff17 has quit [Ping timeout: 260 seconds]
kpshek has quit [Client Quit]
Zesty has joined #ruby
someword has quit [Quit: Leaving.]
Aryasam has joined #ruby
nisstyre has joined #ruby
parduse has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
Zesty has quit [Client Quit]
kevinykchan has joined #ruby
slowcon has quit [Read error: Connection reset by peer]
tkuchiki_ has quit [Remote host closed the connection]
angusiguess has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
yfeldblu_ has quit [Remote host closed the connection]
mlpinit has quit [Quit: Leaving...]
slowcon has joined #ruby
bklane has joined #ruby
sambao21 has joined #ruby
<havenwood> brycesenz: I agree with your impression that using modules is proper unless instantiating actually makes sense.
slowcon has quit [Client Quit]
Aryasam has quit [Ping timeout: 250 seconds]
kate_r has joined #ruby
postmodern has quit [Quit: Leaving]
dx7 has joined #ruby
<brycesenz> havenwood - thanks for taking the time to respond. I'm glad I'm not the only one who at least has that impression.
angusiguess has quit [Ping timeout: 260 seconds]
krisbulman is now known as [krisbulman]
Megtastique has quit []
sambao21 has quit [Ping timeout: 248 seconds]
slowcon has joined #ruby
ping-pong has quit [Ping timeout: 240 seconds]
kevinykchan has quit [Read error: Connection reset by peer]
Vivekananda has joined #ruby
dx7 has quit [Ping timeout: 272 seconds]
kevinykc_ has joined #ruby
brennanMKE has joined #ruby
[krisbulman] is now known as krisbulman
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mando_ has joined #ruby
brycesenz has quit [Quit: Leaving]
diegoviola has joined #ruby
brennanMKE has quit [Ping timeout: 248 seconds]
bthesorceror has quit [Remote host closed the connection]
Cache_Money has joined #ruby
jack_rabbit has quit [Ping timeout: 248 seconds]
bthesorceror has joined #ruby
jbueza has joined #ruby
marcdel has quit [Ping timeout: 265 seconds]
kevinykc_ has quit [Read error: Connection reset by peer]
kevinykchan has joined #ruby
Aryasam has joined #ruby
cj3kim has joined #ruby
bthesorceror has quit [Ping timeout: 245 seconds]
ping-pong has joined #ruby
<lagweezle> havenwood / brycesenz: I'm only just starting to wrap my brain around module stuff, having ignored it as I had thought it was just a namespace thing.
<lagweezle> I would think that a class does not make sense if you aren't going to be working on an instance of that class...
m104 has joined #ruby
ElCapitanMarklar has quit [Ping timeout: 260 seconds]
iamjarvo has joined #ruby
yasushi has quit [Remote host closed the connection]
baggypants has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cj3kim has quit [Ping timeout: 265 seconds]
iamjarvo has quit [Ping timeout: 260 seconds]
x77686d has quit [Quit: x77686d]
browndawg has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 272 seconds]
io_syl has quit []
aagdbl has quit [Quit: Leaving]
JacobHayes has joined #ruby
aagdbl has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
krisbulman is now known as [krisbulman]
gja has quit [Quit: This computer has gone to sleep]
Aryasam has quit [Ping timeout: 250 seconds]
diegoviola has quit [Quit: WeeChat 0.4.3]
kate_r has quit [Quit: Textual IRC Client: www.textualapp.com]
kate_r has joined #ruby
kate_r has quit [Remote host closed the connection]
kate_r has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
mando_ has quit []
yasushi has joined #ruby
yfeldblum has joined #ruby
iamsean has quit [Quit: iamsean]
browndawg has joined #ruby
Kricir has joined #ruby
ItSANgo has quit [Quit: Leaving...]
JacobHayes has quit []
JacobHayes has joined #ruby
yasushi has quit [Remote host closed the connection]
JacobHayes has quit [Client Quit]
JacobHayes has joined #ruby
gja has joined #ruby
Jdubs has quit [Remote host closed the connection]
grs has quit [Ping timeout: 250 seconds]
MACscr has joined #ruby
JasmeetQA has joined #ruby
habanany has quit [Ping timeout: 272 seconds]
sambao21 has joined #ruby
kenneth has joined #ruby
Aryasam has joined #ruby
ledestin has quit [Ping timeout: 260 seconds]
bricker`LA has quit [Quit: leaving]
JacobHayes has quit []
angusiguess has joined #ruby
browndawg has quit [Ping timeout: 245 seconds]
wildroman2 has joined #ruby
oso|away is now known as oso96_2000
sambao21 has quit [Ping timeout: 260 seconds]
petey has joined #ruby
kitak_ has joined #ruby
ItSANgo_ has joined #ruby
m104 has quit [Quit: bye]
angusiguess has quit [Ping timeout: 248 seconds]
wildroman2 has quit [Remote host closed the connection]
Al___ has joined #ruby
funburn has quit [Quit: funburn]
sdwrage has quit [Quit: This computer has gone to sleep]
kitak has quit [Ping timeout: 245 seconds]
wallerdev has quit [Quit: wallerdev]
dingus_khan has quit [Remote host closed the connection]
petey has quit [Ping timeout: 272 seconds]
brennanMKE has joined #ruby
browndawg has joined #ruby
tiguser has quit [Ping timeout: 248 seconds]
bkparso has quit [Quit: bkparso]
Cache_Money has quit [Quit: Cache_Money]
yano has quit [Quit: WeeChat, The Better IRC Client -- http://weechat.org/]
Macaveli has joined #ruby
brennanMKE has quit [Ping timeout: 250 seconds]
heftig has quit [Quit: Quitting]
tiguser has joined #ruby
tagrudev has joined #ruby
lemonsparrow has joined #ruby
tonni has quit [Remote host closed the connection]
nuck has quit [Ping timeout: 250 seconds]
aspires has quit []
tonni has joined #ruby
yano has joined #ruby
IceDragon has quit [Quit: Space~~~]
Solnse has quit [Ping timeout: 252 seconds]
Guest42117 has quit [Changing host]
Guest42117 has joined #ruby
Guest42117 is now known as seekwill
noop has joined #ruby
tonni has quit [Ping timeout: 248 seconds]
sumark has quit [Ping timeout: 272 seconds]
sumark has joined #ruby
Cache_Money has joined #ruby
whatasunnyday has quit [Quit: whatasunnyday]
baroquebobcat has quit [Quit: baroquebobcat]
gja has quit [Quit: This computer has gone to sleep]
DanBoy has quit [Ping timeout: 240 seconds]
PLejeck has joined #ruby
jonah_k has joined #ruby
phansch has joined #ruby
sdwrage has joined #ruby
jamto11 has quit [Remote host closed the connection]
browndawg1 has joined #ruby
browndawg has quit [Read error: Operation timed out]
jamto11 has joined #ruby
Ch4rAss has joined #ruby
Kricir has quit [Remote host closed the connection]
kenndel has joined #ruby
msuszczy has quit [Ping timeout: 245 seconds]
i_s has joined #ruby
subbyyy_ has joined #ruby
<agent_white> All these globals in Puppet are making me cringe. ._.
Xeago_ has joined #ruby
Aryasam has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
jamto11 has quit [Remote host closed the connection]
coder_neo has joined #ruby
coder_neo has quit [Client Quit]
browndawg1 has quit [Ping timeout: 248 seconds]
browndawg has joined #ruby
i_s has quit [Remote host closed the connection]
beakr has quit [Quit: beakr]
Hobogrammer has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
axsuul has quit [Ping timeout: 245 seconds]
tonni has joined #ruby
vlad_starkov has quit [Ping timeout: 272 seconds]
axsuul has joined #ruby
yacks has quit [Ping timeout: 260 seconds]
msuszczy has joined #ruby
Ch4rAss has quit [Read error: Operation timed out]
<shevy> globals are a sign of love
tkuchiki has joined #ruby
Cache_Money has joined #ruby
dawkirst has quit [Ping timeout: 260 seconds]
ioNull has joined #ruby
ioNull has quit [Max SendQ exceeded]
Ch4rAss has joined #ruby
jackneill has joined #ruby
<RubyPanther> like a black eye
bal has joined #ruby
maletor has joined #ruby
ioNull has joined #ruby
mary5030 has joined #ruby
dx7 has joined #ruby
<nobitanobi> good night my lovely rubyists
ayaz_ has joined #ruby
Aryasam has joined #ruby
mojo619 has quit [Quit: mojo619]
bcz has joined #ruby
nobitanobi has quit [Quit: Leaving]
nfk has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
Aryasam_ has joined #ruby
dx7 has quit [Ping timeout: 250 seconds]
sski has joined #ruby
makara has quit [Remote host closed the connection]
yarou has quit [Remote host closed the connection]
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
Monk_code has joined #ruby
bklane has quit [Quit: Leaving...]
angusiguess has joined #ruby
evenix has joined #ruby
evenix has quit [Remote host closed the connection]
tjr9898 has joined #ruby
maletor has quit [Ping timeout: 265 seconds]
slowcon has quit [Quit: slowcon]
mocfive has quit [Ping timeout: 272 seconds]
lxsameer has joined #ruby
lxsameer has joined #ruby
aganov has joined #ruby
tobago has joined #ruby
maletor has joined #ruby
mary5030 has quit [Remote host closed the connection]
dingus_khan has joined #ruby
slowcon has joined #ruby
jamto11 has joined #ruby
angusiguess has quit [Ping timeout: 265 seconds]
kiri has joined #ruby
<shevy> what would we do without globals!
* Nilium punches shevy
<Nilium> Don't you start that.
ace_striker has joined #ruby
<shevy> I notice a lot of violence here lately
Xeago_ has quit [Remote host closed the connection]
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
<shevy> first centrx now Nilium, I get beat up :(
<shevy> it's like fightclub
<Nilium> It's like fight club but the only one who feels good is me.
slowcon has quit [Read error: Connection reset by peer]
subbyyy_ has quit [Ping timeout: 260 seconds]
* Nilium oils himself up
<Nilium> Yeah.
dagobah has joined #ruby
brennanMKE has joined #ruby
* agent_white dances
slowcon has joined #ruby
<shevy> and agent_white still dances
jamto11 has quit [Ping timeout: 260 seconds]
<agent_white> Can't stop the dance!
Cache_Money has quit [Quit: Cache_Money]
vlad_starkov has joined #ruby
dr0ff has left #ruby [#ruby]
OdNairy has joined #ruby
brennanMKE has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
marcdel has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
iamdoo2 has joined #ruby
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
bal has quit [Quit: bal]
bal has joined #ruby
cj3kim has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
abra has quit [Ping timeout: 246 seconds]
slowcon has quit [Quit: slowcon]
Macaveli has quit [Read error: Connection reset by peer]
jonah_k has quit [Remote host closed the connection]
abra has joined #ruby
mikepack has quit [Ping timeout: 260 seconds]
compleatang has joined #ruby
nihils has quit [Quit: Leaving...]
gja has joined #ruby
Al___ has quit [Quit: Al___]
Astralum has joined #ruby
havenwood has quit [Remote host closed the connection]
gja has quit [Client Quit]
havenwood has joined #ruby
Macaveli has joined #ruby
alexherbo2 has joined #ruby
tylersmith has quit [Remote host closed the connection]
<RubyPanther> now I'm going to have to listen to Placebo
tylersmith has joined #ruby
yacks has joined #ruby
Davey has joined #ruby
jprovazn has joined #ruby
<pontiki> you come on like special k
havenwood has quit [Ping timeout: 245 seconds]
cj3kim has quit [Remote host closed the connection]
lemonsparrow has quit [Ping timeout: 245 seconds]
tylersmith has quit [Ping timeout: 245 seconds]
Xeago_ has joined #ruby
LekeFly has joined #ruby
ultraflash3 has joined #ruby
ktosiek has joined #ruby
gtsiftsis has joined #ruby
jamo___ has quit [Quit: leaving]
sdwrage has quit [Quit: This computer has gone to sleep]
dingus_khan has quit [Remote host closed the connection]
JacobHayes has joined #ruby
dingus_khan has joined #ruby
_tpavel has joined #ruby
joker____ has quit []
rismoney has quit [Read error: Connection reset by peer]
itsgg has joined #ruby
cj3kim has joined #ruby
dingus_khan has quit [Ping timeout: 272 seconds]
Astralum has quit [Ping timeout: 250 seconds]
shredding has joined #ruby
JacobHayes has quit []
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
compleatang has left #ruby [#ruby]
compleatang has joined #ruby
compleatang has quit [Remote host closed the connection]
_Andres has joined #ruby
Al___ has joined #ruby
claymore has joined #ruby
xIzIv has joined #ruby
crus has quit [Remote host closed the connection]
crus has joined #ruby
marr has joined #ruby
Aryasam_ has quit [Ping timeout: 260 seconds]
angusiguess has joined #ruby
cj3kim has quit [Remote host closed the connection]
andikr has joined #ruby
xIzIv has left #ruby ["WeeChat 0.4.2"]
marcgg has quit [Ping timeout: 272 seconds]
yellow5 has quit [Quit: time to go!]
petey has joined #ruby
benatkin has quit [Ping timeout: 250 seconds]
marcdel has quit [Ping timeout: 260 seconds]
yellow5 has joined #ruby
benatkin has joined #ruby
jclrb has quit [Quit: jclrb]
angusiguess has quit [Ping timeout: 260 seconds]
einarj has joined #ruby
Al___ has quit [Quit: Al___]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
oso96_2000 is now known as oso|away
LekeFly has joined #ruby
hostess has quit [Ping timeout: 260 seconds]
decoponio has joined #ruby
claymore has quit [Ping timeout: 260 seconds]
Tarential has quit [Ping timeout: 260 seconds]
petey has quit [Ping timeout: 250 seconds]
LekeFly has quit [Client Quit]
<Nilium> Well, memory/opengl doc written, back to nobody actually using my gems
axsuul has quit [Ping timeout: 260 seconds]
Tarential has joined #ruby
<agent_white> What gems Nilium?
jackneill has quit [Ping timeout: 250 seconds]
hostess has joined #ruby
brennanMKE has joined #ruby
<Nilium> OpenGL bindings and some stuff for 3D math and memory management
claymore has joined #ruby
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
barratt has joined #ruby
brennanMKE has quit [Ping timeout: 245 seconds]
<Nilium> https://rubygems.org/profiles/Nilium ⇐ The top four on there are the main ones
omegahm has joined #ruby
<Nilium> Though stb-image is also really useful and oaktree is just my stupid blog thing.
reset has joined #ruby
reset has quit [Remote host closed the connection]
bal has quit [Quit: bal]
yacks has quit [Ping timeout: 260 seconds]
itsgg has quit []
Raboo has joined #ruby
bal has joined #ruby
relix has joined #ruby
blaxter_ has joined #ruby
greenarrow has joined #ruby
PLejeck has quit [Changing host]
PLejeck has joined #ruby
PLejeck is now known as nuck
stonevil has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
bovi has joined #ruby
yellow5 has quit [Ping timeout: 250 seconds]
Norrin has quit [Ping timeout: 246 seconds]
robbyoconnor has joined #ruby
poulson has joined #ruby
monkegjinni has joined #ruby
seekwill has quit [Ping timeout: 260 seconds]
<agent_white> Nilium: If I had the capability, I would use your gems... if that counts! :D
<Nilium> Should use 'em anyway so I can irrationally inflate my ego.
yacks has joined #ruby
<Nilium> I say that, but actually I just want to take Ruby away from the Rails majority.
evilbug has quit [Quit: Leaving]
<agent_white> I didn't know the two tribes were at war D:
<Nilium> They aren't.
gnephiak has joined #ruby
<Nilium> I just don't like Rails being automatically attached to the Ruby name.
bovi has quit [Ping timeout: 245 seconds]
<Nilium> I get job offers for Rails jobs because I do Ruby stuff even though I've never touched Rails.
<Nilium> That, to me, says Rails can die.
<agent_white> Nilium: Fair enough :) And also, I actually might take you up on that for oaktree. I use Jekyll currently, and by use I mean "one poast forever ago".
vlad_starkov has joined #ruby
<agent_white> But I've been meaning to start making more.
<Nilium> I would be careful about oaktree
<Nilium> It should actually work fine off the bat, but OakTree's a huge disaster that I've been slowly rewriting
mikepack has joined #ruby
<Nilium> You can look at the code on github. It's horrifying.
srji has joined #ruby
phansch has quit [Remote host closed the connection]
<agent_white> Nilium: I wouldn't know the difference, I probably write horrifying code ;)
<Nilium> I wrote it years ago and then rammed it through to working status so I could use it to build a site for a project and have just been slowly tacking things on since then
yellow5 has joined #ruby
roolo has joined #ruby
bovi has joined #ruby
troessner has joined #ruby
<agent_white> Ahhhh. Well the name sounds kewl, so I'll check it out :D
<agent_white> Nilium: And no Rails? Why not?
mikecmpbll has joined #ruby
sk87 has joined #ruby
<Nilium> It's actually kind of funny since an early version of OakTree accidentally had YAML headers for posts before it actually used a YAML library to read it.
mikecmpbll has quit [Max SendQ exceeded]
<Nilium> OakTree is static content. No reason for rails.
Norrin has joined #ruby
<DefV> I think everyone writes horrifying code in their own mind
nisstyre has quit [Quit: WeeChat 0.4.2]
<Nilium> My blog is basically just `oak -r && ./sync.sh` (which runs rsync)
mikecmpbll has joined #ruby
seekwill has joined #ruby
seekwill is now known as Guest79451
stkowski has quit [Quit: stkowski]
vlad_starkov has quit [Ping timeout: 272 seconds]
mikepack has quit [Ping timeout: 250 seconds]
shredding has quit [Quit: shredding]
<agent_white> Nilium: Oh I mean, why haven't you touched Rails? And that's actually what I was looking for when I chose Jekyll! So I'll definitely give it a shot :)
<agent_white> DefV: Oh no, I'm a dev-in-training. I DO write horrible code! :D
[gmi] has joined #ruby
<agent_white> It's wonderfully terrifying.
bovi has quit [Client Quit]
heftig has joined #ruby
timonv has joined #ruby
<Nilium> I have no reason to use rails.
<Nilium> What would I even do with it?
Aryasam has joined #ruby
<Nilium> I have no websites I want to make, I have zero interest in building web apps, etc.
dx7 has joined #ruby
mercwithamouth has quit [Ping timeout: 260 seconds]
monkegjinni has quit [Remote host closed the connection]
ephemerian has joined #ruby
monkegjinni has joined #ruby
Hobogrammer has quit [Ping timeout: 260 seconds]
tylersmith has joined #ruby
ayaz_ has quit [Quit: Textual IRC Client: www.textualapp.com]
ace_striker has quit [Ping timeout: 245 seconds]
top4o has quit [Quit: ChatZilla 0.9.90.1 [Firefox 27.0/20140127194636]]
dx7 has quit [Ping timeout: 260 seconds]
ayaz_ has joined #ruby
kil0byte has joined #ruby
monkegjinni has quit [Ping timeout: 260 seconds]
tylersmith has quit [Ping timeout: 265 seconds]
Shidash has quit [Ping timeout: 245 seconds]
LekeFly has joined #ruby
obs_ has joined #ruby
stonevil has quit [Quit: Computer has gone to sleep.]
kobain has quit []
romain_t has joined #ruby
axsuul has joined #ruby
Aryasam has quit [Ping timeout: 260 seconds]
<romain_t> Hello
arturaz has joined #ruby
Al___ has joined #ruby
<romain_t> I'am having trouble converting an image magick command for minimagick
<romain_t> "convert -transparent white -size 580x240 -font Courier-bold -pointsize 24 caption:'Foo.' text.png"
agent_white has quit [Quit: gnight]
ona has joined #ruby
dingus_khan has joined #ruby
<romain_t> Do you know how to do that with the DSL of minimagick
Aryasam has joined #ruby
pixelgremlins has joined #ruby
virtualize has quit []
stonevil has joined #ruby
skaflem has joined #ruby
timonv_ has joined #ruby
pixelgremlins_ba has quit [Ping timeout: 245 seconds]
timonv has quit [Ping timeout: 250 seconds]
shabgard has joined #ruby
jamto11 has joined #ruby
dingus_khan has quit [Ping timeout: 245 seconds]
marcgg has joined #ruby
marcgg has quit [Remote host closed the connection]
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
angusiguess has joined #ruby
Guest79451 has quit [Changing host]
Guest79451 has joined #ruby
Guest79451 is now known as seekwill
tkuchiki has quit [Remote host closed the connection]
Monk_code has quit [Remote host closed the connection]
tkuchiki has joined #ruby
elaptics`away is now known as elaptics
mojjojo has joined #ruby
Monk_code has joined #ruby
jamto11 has quit [Ping timeout: 245 seconds]
marcgg has joined #ruby
iamdoo2 has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 272 seconds]
funburn has joined #ruby
ledestin has joined #ruby
heftig has quit [Quit: Quitting]
vlad_starkov has joined #ruby
Monk_code has quit [Ping timeout: 248 seconds]
gja has joined #ruby
mneorr has joined #ruby
heftig has joined #ruby
brennanMKE has joined #ruby
Monk_code has joined #ruby
rdark has joined #ruby
ahawkins has joined #ruby
marr has quit [Ping timeout: 250 seconds]
brennanM_ has joined #ruby
brennanMKE has quit [Read error: Connection reset by peer]
mosez has quit [Ping timeout: 246 seconds]
timonv_ has quit [Read error: Connection reset by peer]
decoponio has quit [Quit: PC restart]
jzig has joined #ruby
mosez has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stonevil has quit [Quit: Computer has gone to sleep.]
mneorr has quit [Ping timeout: 272 seconds]
arctaruz has joined #ruby
Astralum has joined #ruby
brennanM_ has quit [Ping timeout: 245 seconds]
ona has quit [Quit: Me'n vaig]
browndawg has quit [Quit: Leaving.]
gja has quit [Quit: This computer has gone to sleep]
gja has joined #ruby
einarj has quit [Read error: Connection reset by peer]
einarj has joined #ruby
ktun has joined #ruby
greenarrow has quit [Quit: 500]
yasushi has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
TMM has joined #ruby
terlar has joined #ruby
sski has quit [Remote host closed the connection]
sski has joined #ruby
JasmeetQA has quit [Quit: Leaving.]
JasmeetQA has joined #ruby
Hiall has quit [Quit: hiall]
greenarrow has joined #ruby
sensen has quit [Quit: leaving]
yasushi has quit [Ping timeout: 250 seconds]
emergion_ has joined #ruby
nvrch has quit [Quit: nvrch]
claymore has quit [Ping timeout: 250 seconds]
sski has quit [Ping timeout: 260 seconds]
JasmeetQA has quit [Ping timeout: 250 seconds]
claymore has joined #ruby
workmad3 has joined #ruby
_Andres has quit [Read error: Connection reset by peer]
mehlah has joined #ruby
axsuul has quit [Ping timeout: 265 seconds]
timonv has joined #ruby
JasmeetQA has joined #ruby
bluenemo has joined #ruby
zeeraw has joined #ruby
marcdel has joined #ruby
axsuul has joined #ruby
iamdoo2 has joined #ruby
shaunbaker has joined #ruby
karupanerura is now known as zz_karupanerura
Monk_code has quit [Remote host closed the connection]
decoponio has joined #ruby
monkegjinni has joined #ruby
marcdel has quit [Ping timeout: 260 seconds]
ioNull has quit [Ping timeout: 260 seconds]
alvaro_o has quit [Ping timeout: 260 seconds]
Monk_code has joined #ruby
iamdoo2 has quit [Ping timeout: 245 seconds]
axsuul has quit [Ping timeout: 260 seconds]
marcdel has joined #ruby
ioNull has joined #ruby
claymore has quit [Quit: Leaving]
jonno11 has joined #ruby
yfeldblum has quit [Remote host closed the connection]
alvaro_o has joined #ruby
dawkirst has joined #ruby
_Andres has joined #ruby
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
krz has quit [Ping timeout: 265 seconds]
jzig has quit [Remote host closed the connection]
jzig has joined #ruby
monkegjinni has quit [Read error: No route to host]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
krz has joined #ruby
razibog has joined #ruby
greenarrow has quit [Quit: 500]
jzig has quit [Ping timeout: 260 seconds]
poulson has quit [Ping timeout: 272 seconds]
Lewix has quit [Remote host closed the connection]
jarjar_prime has quit [Ping timeout: 260 seconds]
Patteh has quit [Ping timeout: 248 seconds]
poulson has joined #ruby
lpvn has quit [Ping timeout: 245 seconds]
dubsteph has joined #ruby
lpvn has joined #ruby
stonevil has joined #ruby
DaniG2k has joined #ruby
axsuul has joined #ruby
Zai00 has joined #ruby
kil0byte has quit [Remote host closed the connection]
jamto11 has joined #ruby
mavcunha has quit [Quit: Computer has gone to sleep.]
angusiguess has joined #ruby
ndrei has quit [Ping timeout: 248 seconds]
Lewix has joined #ruby
petey has joined #ruby
braincra- has joined #ruby
klaut has joined #ruby
braincrash has quit [Ping timeout: 248 seconds]
braincra- is now known as braincrash
iamdoo2 has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
jamto11 has quit [Ping timeout: 260 seconds]
zoscoy has joined #ruby
wildroman2 has quit [Remote host closed the connection]
fella5s has joined #ruby
axsuul has quit [Ping timeout: 260 seconds]
ferr has joined #ruby
angusiguess has quit [Ping timeout: 250 seconds]
Hiall has joined #ruby
petey has quit [Ping timeout: 260 seconds]
canton7-mac has joined #ruby
stonevil has quit [Quit: Computer has gone to sleep.]
marcdel has left #ruby [#ruby]
marcdel has joined #ruby
mneorr has joined #ruby
troessner has quit [Ping timeout: 245 seconds]
marcdel has quit []
Patteh has joined #ruby
brennanMKE has joined #ruby
dweeb_ has joined #ruby
mneorr has quit [Read error: Operation timed out]
marcgg_ has joined #ruby
thomasxie has joined #ruby
itadder has joined #ruby
<itadder> hi
xue has quit [Quit: Leaving]
dangerousdave has joined #ruby
brennanMKE has quit [Ping timeout: 260 seconds]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
shaunbaker has quit [Remote host closed the connection]
wildroman2 has joined #ruby
marcgg has quit [Ping timeout: 248 seconds]
aep_ is now known as aep
rm_ has joined #ruby
mikepack has joined #ruby
zoscoy has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
stonevil has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
ndrei has joined #ruby
stonevil has quit [Client Quit]
grs has joined #ruby
<maxmanders_> I have foo = %w(bar baz), in a `case` I'll want to iterate over foo in each `when`; but with an additional item added depending on the case. Can I do a one liner to inject an additional element to foo and then iterate over the union of the original foo + new element?
troessner has joined #ruby
greenarrow has joined #ruby
shaunbaker has joined #ruby
rm_ has quit [Ping timeout: 245 seconds]
mikepack has quit [Ping timeout: 248 seconds]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
vlad_starkov has quit [Remote host closed the connection]
ghr has joined #ruby
ghr has quit [Excess Flood]
ghr has joined #ruby
<canton7-mac> something like [*foo, 'other'].each ....
<canton7-mac> (foo + ['other']).each ...
phansch has joined #ruby
shaunbak_ has joined #ruby
<workmad3> maxmanders_: if you really want a union, you want '(foo | ['other']).each
dx7 has joined #ruby
noarthur has joined #ruby
<maxmanders_> Thanks, I'm maybe over complicating it - just keen to minimise lines of array manipulation code for a single differing element based on a conditional
<maxmanders_> But that works perfectly in this case, thank you very much!
nvrch has joined #ruby
<workmad3> maxmanders_: btw, a 'case' statement returns the value
Astralum has quit [Ping timeout: 250 seconds]
tedstriker has joined #ruby
<maxmanders_> Ah yeah, but the case statement is wrapping some other logic; Chef recipes switching on node platform; and based on platform, I want to install a slightly different set of packages.
DaniG2k has quit [Quit: leaving]
<workmad3> maxmanders_: still, it would make sense to return the value or arrays from the case statement
<workmad3> maxmanders_: and then have the iteration once
<itadder> is pupet also going to node
<workmad3> maxmanders_: rather than the iteration in each branch of the case statement ;)
shaunbaker has quit [Ping timeout: 245 seconds]
<workmad3> itadder: chef isn't going to node
<itadder> oh I thought
<maxmanders_> Fair point - I'll send a quick Gist for review in a sec if you could cast your eyes over it.
<workmad3> itadder: 'node platform' in this case means the chef attribute 'node["platform"]' (the platform of the server)
Xeago_ has quit [Remote host closed the connection]
phansch has quit [Ping timeout: 252 seconds]
<itadder> ahhh
<workmad3> maxmanders_: will do... #chef is a good place for that sort of advice too btw (I idle in there along with in here :) )
dx7 has quit [Ping timeout: 250 seconds]
<maxmanders_> Gist: https://gist.github.com/maxmanders/8953408 - hopefully this illustrates my aims and you can educate me further?
<maxmanders_> workmad3 yeah - I would go to #chef, but this was more specifically about Ruby manipulation ;-)
kiba` is now known as kiba
<workmad3> maxmanders_: I'd probably do something like https://gist.github.com/workmad3/8953423
ocx has joined #ruby
<ocx> hello all, i have 3 partitions http://pastebin.com/AZRdcZke , i would like to mount .the biggest partition to /mnt/big the second one to /mnt/medium and third to /mnt/small noting that the the partitions sizes can be different each time, like sda can be the smaller sometimes etc... how can i do that in ruby?
<maxmanders_> workmad3: ah much nicer - makes perfect sense. In my defence I have the cold weather lurgy affecting my poor brain ;-)
<workmad3> maxmanders_: bleh, a lurgified brain is never good :(
<workmad3> maxmanders_: btw, if I was doing this in normal ruby or in a custom chef resource, I'd pull 'platform_packages' out as a method :)
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3> maxmanders_: and in a 'traditional' cookbook, I'd probably move the case statement out into attributes/default.rb and set a node attribute
<maxmanders_> Aye, for more general purposes a custom LWRP to install per-platform python dev dependencies would make sense -
<ocx> anyone?
<ocx> how can i extract the partition size in an easy way
<maxmanders_> workmad3: Good shout.
Aryasam has quit [Ping timeout: 260 seconds]
Aryasam_ has joined #ruby
Monk_code has quit [Read error: Connection reset by peer]
Monk_code has joined #ruby
LekeFly has joined #ruby
marr has joined #ruby
nari has quit [Ping timeout: 245 seconds]
chipotle has quit [Ping timeout: 260 seconds]
<certainty> ocx: cat /proc/partitions |sort -nk 3
tvw has joined #ruby
ndrei has quit [Ping timeout: 248 seconds]
<certainty> oh you want to extract the size, sorry read that wrong :p
duggiefresh has joined #ruby
<certainty> cat /proc/partitions |awk '{ print $3 }'
yfeldblum has joined #ruby
<workmad3> certainty: bah, are you giving sensible command line sysadmin answers in a ruby channel again? :P
gja has quit [Quit: This computer has gone to sleep]
stonevil has joined #ruby
<certainty> workmad3: damn, must have taken the wrong road. I meant to go to #bofh
DariusPHP has joined #ruby
<workmad3> certainty: isn't #bofh all discussions about how to connect car batteries up to keyboards without people noticing?
mavcunha has joined #ruby
ndrei has joined #ruby
<certainty> workmad3: only when you insist to stay on topic
gja has joined #ruby
<workmad3> certainty: I wouldn't risk going off-topic in #bofh without double-checking my keyboard first...
yfeldblum has quit [Ping timeout: 245 seconds]
duggiefresh has quit [Ping timeout: 260 seconds]
funburn has quit [Quit: funburn]
Aryasam_ has quit [Ping timeout: 250 seconds]
<certainty> workmad3: always good advice ... i try to stay away from these neckbeards until i have grown my own
Aryasam has joined #ruby
davorb has quit [Ping timeout: 272 seconds]
relix has joined #ruby
phansch has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
rootshift_ has joined #ruby
wildroman2 has quit [Remote host closed the connection]
davorb has joined #ruby
GinoMan_ has joined #ruby
GinoMan has quit [Ping timeout: 250 seconds]
ayaz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stonevil has quit [Quit: Computer has gone to sleep.]
stonevil has joined #ruby
asmodlol has joined #ruby
ioNull has quit [Ping timeout: 260 seconds]
JasmeetQA has quit [Quit: Leaving.]
Xeago_ has joined #ruby
angusiguess has joined #ruby
jamto11 has joined #ruby
dubsteph has quit [Ping timeout: 260 seconds]
omegahm is now known as omegahm^
omegahm^ has quit []
ioNull has joined #ruby
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jamto11 has quit [Ping timeout: 245 seconds]
shaunbak_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
LekeFly has joined #ruby
yfeldblum has joined #ruby
angusiguess has quit [Ping timeout: 260 seconds]
brennanMKE has joined #ruby
vlad_starkov has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
nari has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
stonevil has quit [Quit: Computer has gone to sleep.]
bleak has quit [Ping timeout: 250 seconds]
alexherbo2 has joined #ruby
brennanMKE has quit [Ping timeout: 248 seconds]
Guest433 has joined #ruby
<Guest433> is there any fiddle available for ruby & perl like jsfiddle.net?
dkamioka has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has joined #ruby
<canton7-mac> eval.io, codepad, ideone, etc etc
stonevil has joined #ruby
mojjojo has quit [Quit: mojjojo]
<canton7-mac> (I assume that's the sort of thing you mean)
emergion_ has quit [Ping timeout: 260 seconds]
Guest433 has quit [Ping timeout: 245 seconds]
ixti has joined #ruby
shaunbaker has joined #ruby
zeeraw has joined #ruby
mojjojo has joined #ruby
blaxter_ has quit [Quit: foo]
browndawg has joined #ruby
stonevil has quit [Quit: Computer has gone to sleep.]
Davey has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
banister has joined #ruby
Davey has joined #ruby
parzo has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
parzo has joined #ruby
wildroman2 has joined #ruby
klaut has quit [Remote host closed the connection]
<ocx> how can i easily extract the uid in " " from /dev/sdj1: UUID="FEAA0B09AA0ABDE1" TYPE="ntfs" \
catphish has joined #ruby
omegahm has joined #ruby
<catphish> does anyone know why Gem::Package::TarWriter is expecting tar files to be seekable? :(
DaniG2k has joined #ruby
razibog has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Ping timeout: 248 seconds]
parzo has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
xXxRosexXxEE_ has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
FailDrain has quit [Ping timeout: 272 seconds]
loliveira has joined #ruby
omegahm has quit [Read error: Connection reset by peer]
loliveira has quit [Client Quit]
omegahm has joined #ruby
fella5s has quit [Ping timeout: 260 seconds]
RoxasShadowRS has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
chrisseaton has quit []
ferr has quit [Ping timeout: 265 seconds]
tedstriker has quit [Ping timeout: 248 seconds]
tjr9898 has quit [Remote host closed the connection]
dweeb_ has quit [Quit: Computer has gone to sleep.]
<catphish> fixed it, you have to use add_file_simple to specify the filesize in advance and prevent seeking
Speed has joined #ruby
krz has quit [Quit: WeeChat 0.4.2]
itadder has quit [Remote host closed the connection]
rootshift_ has quit [Quit: rootshift_]
sameerynho has joined #ruby
Xeago_ has quit [Remote host closed the connection]
rootshift_ has joined #ruby
lxsameer has quit [Read error: Connection reset by peer]
rmorello has joined #ruby
claymore has joined #ruby
parzo has joined #ruby
axsuul has joined #ruby
petey has joined #ruby
ayaz_ has joined #ruby
ayaz_ has quit [Remote host closed the connection]
parzo has quit [Read error: Connection reset by peer]
parzo has joined #ruby
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
angusiguess has joined #ruby
lkba has joined #ruby
ayaz_ has joined #ruby
DouweM has joined #ruby
mikepack has joined #ruby
shaunbaker has quit [Remote host closed the connection]
dweeb_ has joined #ruby
petey has quit [Ping timeout: 265 seconds]
axsuul has quit [Ping timeout: 272 seconds]
pixelgremlins_ba has joined #ruby
zeeraw has joined #ruby
parzo has quit [Ping timeout: 245 seconds]
sepp2k has joined #ruby
jonno11 has joined #ruby
omegahm is now known as omegahm^
omegahm^ has quit []
obs_ has quit [Quit: Konversation terminated!]
pixelgremlins has quit [Ping timeout: 265 seconds]
mikepack has quit [Ping timeout: 272 seconds]
brennanMKE has joined #ruby
obs_ has joined #ruby
romain_t has quit [Quit: Page closed]
Monk_code has quit [Read error: Connection reset by peer]
thisirs has joined #ruby
dx7 has joined #ruby
Monk_code has joined #ruby
dubsteph has joined #ruby
omegahm has joined #ruby
popl has quit [Read error: Operation timed out]
brennanMKE has quit [Ping timeout: 260 seconds]
greenarrow has quit [Quit: 500]
ffranz has joined #ruby
anshin has joined #ruby
dx7 has quit [Ping timeout: 248 seconds]
anshin has quit [Client Quit]
anshin has joined #ruby
tjr9898 has joined #ruby
tjr9898 has quit [Remote host closed the connection]
ocx has quit [Quit: Page closed]
akemrir has joined #ruby
Aryasam has quit [Ping timeout: 250 seconds]
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<akemrir> hi, I want to write gui in linux with newest ruby for application. Which toolkits are well supported?
ghr has quit [Quit: Computer has gone to sleep.]
blaxter_ has joined #ruby
Astralum has joined #ruby
jamto11 has joined #ruby
jamto11 has quit [Remote host closed the connection]
zoscoy has joined #ruby
zoscoy has quit [Client Quit]
ferr has joined #ruby
ndrei has joined #ruby
nateberkopec has joined #ruby
razibog has joined #ruby
braincrash has quit [Ping timeout: 260 seconds]
dx7 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
Aryasam has joined #ruby
wald0 has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
gr33n7007h has joined #ruby
fella5s has joined #ruby
mengu has quit [Remote host closed the connection]
Aryasam has joined #ruby
_HolyCow has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
tkuchiki has quit [Ping timeout: 250 seconds]
sk87 has joined #ruby
ep3static has joined #ruby
ferr has quit [Ping timeout: 248 seconds]
dblessing has joined #ruby
ioNull has quit [Quit: Computer has gone to sleep.]
Aryasam has quit [Ping timeout: 260 seconds]
Megtastique has joined #ruby
mark_locklear has joined #ruby
Al___ has quit [Quit: Al___]
workmad3 has quit [Quit: leaving]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
GinoMan_ has quit [Ping timeout: 248 seconds]
Aryasam has joined #ruby
[krisbulman] is now known as krisbulman
craigp has joined #ruby
craigp has quit [Remote host closed the connection]
bal has quit [Quit: bal]
klaut has joined #ruby
raphaelivan has joined #ruby
ndrei has quit [Read error: No route to host]
vlad_starkov has quit [Ping timeout: 250 seconds]
rootshift_ has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
fella5s has quit [Ping timeout: 265 seconds]
fella5s has joined #ruby
jamto11 has joined #ruby
bal has joined #ruby
ep3static has quit [Quit: WeeChat 0.4.2]
jzig has joined #ruby
burlyscudd has joined #ruby
kaliya has joined #ruby
weems has quit [Read error: Connection reset by peer]
dkamioka has joined #ruby
Al___ has joined #ruby
thomasxie has quit [Ping timeout: 245 seconds]
sdwrage has joined #ruby
sdwrage has quit [Remote host closed the connection]
rootshift_ has joined #ruby
pico-pete has joined #ruby
thomasxie has joined #ruby
parzo has joined #ruby
Monk_code has quit []
workmad3 has joined #ruby
maasha has joined #ruby
mojjojo has quit [Quit: mojjojo]
agjacome has joined #ruby
pdtpatrick has joined #ruby
yacks has quit [Quit: Leaving]
parzo has quit [Ping timeout: 250 seconds]
Xeago_ has joined #ruby
yfeldblum has joined #ruby
Davey has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
fenicks has joined #ruby
<akemrir> someone using xdialog with ruby?
Davey has joined #ruby
krz has joined #ruby
tjr9898 has joined #ruby
brennanMKE has joined #ruby
stonevil has joined #ruby
Xeago_ has quit [Ping timeout: 246 seconds]
shaunbaker has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
greenarrow has joined #ruby
Nowaker has quit [Ping timeout: 245 seconds]
ioNull has joined #ruby
mojjojo has joined #ruby
Nowaker has joined #ruby
jamto11 has quit [Remote host closed the connection]
brennanMKE has quit [Ping timeout: 260 seconds]
Aryasam has quit [Ping timeout: 260 seconds]
Aryasam_ has joined #ruby
bthesorceror has joined #ruby
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jamto11 has joined #ruby
jackneill has joined #ruby
kaldrenon has joined #ruby
nateberkopec has quit [Quit: Leaving...]
m8 has joined #ruby
m8 has quit [Changing host]
m8 has joined #ruby
angusiguess has quit [Ping timeout: 248 seconds]
bthesorceror has quit [Ping timeout: 272 seconds]
JBreit has quit [Quit: Leaving]
sailias has joined #ruby
JBreit has joined #ruby
yasushi has joined #ruby
Nowaker has quit [Ping timeout: 250 seconds]
jprovazn has quit [Quit: Leaving]
jprovazn has joined #ruby
<aep> i'm confused how hashes work. i have a method that calls foo.provider, and i pass a hash, but i get:
<aep> undefined method `provider' for {:provider=>"me", :uid=>nil}:Hash
jamto11 has quit [Remote host closed the connection]
<aep> soo if hash.member is not how it works, how do i construct the thing the method expects?
<tobiasvl> you pass a hash to foo.provider?
<tobiasvl> looks like foo IS a hash
Aryasam_ has quit [Read error: Connection reset by peer]
<tobiasvl> please paste your code at http://gist.github.com
<DouweM> aep: have you read up on hashes at all? hashes use hash[key], in your case hash[:provider]
<canton7-mac> you access hashes like foo[:provider] not foo.provider
<DouweM> aep: if you want methods for keys, use Struct
<tobiasvl> ah, you guys read better than i do :)
Aryasam has joined #ruby
fenicks has quit [Ping timeout: 260 seconds]
<aep> uh so the thing expects a struct? ok
<canton7-mac> well, it expects a class
<canton7-mac> (with a #provider method)
<tobiasvl> what's "the thing"
<canton7-mac> but you can make a struct which has a #provider method, and all will be well
<aep> devise, some rails auth stuff. its calling thethingyoupass.provider
<aep> err actually it's calling it like something = thethingyoupass.provider
<tobiasvl> maybe #RubyOnRails is better
dkamioka has quit [Remote host closed the connection]
<DouweM> aep: is there no object you can use with those methods? is probably more appropriate
wallerdev has joined #ruby
<aep> nope. its actually passing a hash in an example :(
<tobiasvl> for all i know you can access members of hashes with hash.member in rails…
<aep> which is why i'm confused about how hashes work
<aep> oooh, they did some extra thing again? blarg
<DouweM> tobiasvl: you can't
<DouweM> aep: show the example
pierre1_ has quit [Ping timeout: 260 seconds]
<AntelopeSalad> do you guys often use blocks to visually show that a group of commands belong to a certain "thing"?
jsilver_ has joined #ruby
jsilver has quit [Read error: Connection reset by peer]
bogeyd6 has joined #ruby
<DouweM> AntelopeSalad: example?
<tobiasvl> AntelopeSalad: what do you mean by "block"? i don't use actual ruby blocks for that, no
Nowaker has joined #ruby
<AntelopeSalad> DouweM: like if you were to build a mini DSL, similar to some of the chef resources if you're familiar with that
pedda has joined #ruby
Aryasam_ has joined #ruby
GranadoEspanda has joined #ruby
GranadoEspanda has left #ruby [#ruby]
<AntelopeSalad> that clearly (to me) says that we're creating a user and then those 3 commands being ran are associated to the action of creating the user
<AntelopeSalad> so it's kind of using a block as a group/namespace in the DSL sense?
<DouweM> AntelopeSalad: I don't like that way to specify values
<DouweM> AntelopeSalad: methods should be methods
<AntelopeSalad> the alternative is to have an options hash or a million args right?
Sawbones has joined #ruby
<DouweM> AntelopeSalad: but sometimes it can look nice, with FactoryGirl for example
bthesorceror has joined #ruby
<AntelopeSalad> in this case he's using methods tho
<DouweM> AntelopeSalad: right, Hash is the way to go
jefflyne has joined #ruby
Aryasam has quit [Ping timeout: 265 seconds]
vlad_starkov has joined #ruby
<DouweM> aep: looks like the example code is wrong, the auth.provider should definitely be auth[:provider]
<AntelopeSalad> what if you were running arbitrary methods tho that you just want to enforce a visual aide on?
<aep> DouweM: yeah, but it works :(
catphish has left #ruby ["Leaving"]
<aep> i don't understand why
<AntelopeSalad> maybe it's a sign that a method i wrote is doing too much if i need to visually group things?
jzig_ has joined #ruby
jzig has quit [Read error: No route to host]
stryek has joined #ruby
jzig_ is now known as jzig
yacks has joined #ruby
mojjojo has quit [Quit: mojjojo]
Wolland has joined #ruby
vlad_starkov has quit [Ping timeout: 265 seconds]
Bumptiou_ has joined #ruby
lfox has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<slowcons> morning guys
Bumptious has quit [Ping timeout: 250 seconds]
Kricir has joined #ruby
<maasha> I am looking for a good way unit testing this method: https://gist.github.com/maasha/27761c571e7f5000e125. @input and @output are IO objects, @options[:input] is a filename.
Squarepy has joined #ruby
danshultz has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
shabgard has quit [Ping timeout: 265 seconds]
Aryasam has joined #ruby
angusigu1ss has joined #ruby
chrisseaton has joined #ruby
JustMozzy has joined #ruby
mikepack has joined #ruby
Aryasam_ has quit [Ping timeout: 260 seconds]
sdwrage has joined #ruby
tejas has joined #ruby
tejas has joined #ruby
tejas has quit [Changing host]
Aryasam has quit [Read error: Connection reset by peer]
rootshift_ has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
grs has quit [Ping timeout: 260 seconds]
ioNull has quit [Read error: Connection reset by peer]
ktun has quit [Remote host closed the connection]
gja has quit [Ping timeout: 248 seconds]
ioNull has joined #ruby
tejas has quit [Client Quit]
Squarepy has quit [Read error: Connection reset by peer]
jzig has quit [Remote host closed the connection]
jinie has quit [Ping timeout: 246 seconds]
jzig has joined #ruby
Squarepy has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Aryasam has joined #ruby
angusigu1ss has quit [Ping timeout: 250 seconds]
sk87 has joined #ruby
mikepack has quit [Ping timeout: 245 seconds]
jerius has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
msmith_ has joined #ruby
araujo has quit [Read error: Connection reset by peer]
caiofilipini has joined #ruby
araujo has joined #ruby
jzig has quit [Ping timeout: 260 seconds]
caiofilipini has quit [Client Quit]
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
parzo has joined #ruby
yasushi has quit [Remote host closed the connection]
Port3M5[Work] has joined #ruby
timonv has quit [Remote host closed the connection]
cburyta has joined #ruby
parzo has quit [Read error: Connection reset by peer]
caiofili_ has joined #ruby
parzo has joined #ruby
dkamioka has joined #ruby
mrevd has joined #ruby
jinie has joined #ruby
mrevd has quit [Read error: Connection reset by peer]
caiofili_ has quit [Client Quit]
mrevd has joined #ruby
kcombs has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
mrevd1 has joined #ruby
mrevd1 has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
caiofili_ has joined #ruby
parzo has quit [Ping timeout: 265 seconds]
mrevd1 has joined #ruby
blaxter_ is now known as blaxter
Squarepy has joined #ruby
mrevd2 has joined #ruby
mrevd2 has quit [Read error: Connection reset by peer]
asmodlol has quit [Read error: Connection reset by peer]
burlyscudd has quit [Quit: Leaving.]
dweeb_ has quit [Quit: Textual IRC Client: www.textualapp.com]
mrevd has quit [Ping timeout: 248 seconds]
browndawg has quit [Ping timeout: 245 seconds]
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
timonv has joined #ruby
xXxRosexXxEE_ has quit [Quit: Easy as 3.14159265358979323846...]
yfeldblum has quit [Ping timeout: 250 seconds]
petey has joined #ruby
poikon_ has left #ruby [#ruby]
Squarepy has quit [Read error: Connection reset by peer]
wald0 has quit [Ping timeout: 250 seconds]
mrevd1 has quit [Ping timeout: 272 seconds]
Squarepy has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
kristiandelay has quit [Remote host closed the connection]
Squarepy has joined #ruby
wald0 has joined #ruby
Tachoh has joined #ruby
mansi has joined #ruby
shaunbaker has quit [Remote host closed the connection]
petey has quit [Remote host closed the connection]
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
petey has joined #ruby
aryaching has joined #ruby
Aryasam has quit [Quit: Bye]
failshell has joined #ruby
knutster has joined #ruby
mary5030 has joined #ruby
danman has joined #ruby
petey has quit [Ping timeout: 248 seconds]
jhass|off is now known as jhass
DaniG2k has quit [Quit: Lost terminal]
failshell has quit [Read error: Connection reset by peer]
shaunbaker has joined #ruby
zachallett has joined #ruby
failshell has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
raphaelivan has quit [Quit: Leaving.]
Squarepy has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
rootshift_ has joined #ruby
failshel_ has joined #ruby
iamjarvo has quit [Ping timeout: 272 seconds]
thesheff17 has joined #ruby
momomomomo has joined #ruby
gbt has joined #ruby
Xeago_ has joined #ruby
msmith_ has quit [Remote host closed the connection]
duggiefresh has joined #ruby
yasushi has joined #ruby
LekeFly has joined #ruby
gr33n7007h has quit [Quit: Leaving]
brennanMKE has joined #ruby
petey has joined #ruby
sambao21 has joined #ruby
failshell has quit [Ping timeout: 260 seconds]
msmith_ has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
vlad_starkov has joined #ruby
kiri has quit [Quit: Leaving]
krz has quit [Quit: WeeChat 0.4.2]
vlad_starkov has quit [Remote host closed the connection]
thomasxie has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
jle` has quit [Ping timeout: 250 seconds]
meatherly has quit [Remote host closed the connection]
rootshift_ has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
meatherly has joined #ruby
iamjarvo has joined #ruby
wallerdev has quit [Quit: wallerdev]
stonevil has quit [Quit: Computer has gone to sleep.]
andikr has quit [Remote host closed the connection]
rootshift_ has joined #ruby
Sawbones_ has joined #ruby
randomnick_ has joined #ruby
sameerynho has quit [Quit: Leaving]
Sawbones has quit [Ping timeout: 245 seconds]
noop has quit [Ping timeout: 245 seconds]
bean has joined #ruby
heftig has quit [Quit: Quitting]
zeeraw has quit [Remote host closed the connection]
meatherly has quit [Ping timeout: 272 seconds]
poulson has quit [Ping timeout: 245 seconds]
jlast has joined #ruby
poulson has joined #ruby
caiofili_ has quit [Quit: Leaving...]
x77686d has joined #ruby
kiba` has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
lmickh has joined #ruby
speakingcode has quit [Ping timeout: 265 seconds]
rootshift_ has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
Xuisce1 has joined #ruby
_Andres has joined #ruby
rootshift_ has joined #ruby
kiba has quit [Ping timeout: 250 seconds]
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
browndawg has joined #ruby
kiba` is now known as kiba
shaunbaker has quit [Remote host closed the connection]
angusigu1ss has joined #ruby
jackbewley has joined #ruby
jackbewley has left #ruby [#ruby]
Ch4rAss has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
Zai00 has quit [Read error: No route to host]
v0n has joined #ruby
duggiefresh has joined #ruby
zoscoy has joined #ruby
<Xuisce1> Hey all
zoscoy has quit [Client Quit]
<Xuisce1> anyone here used learnRUbythehardway?
<zeroXten> what is the better way of doing: if myhash.has_key?('mykey') then myhash['mykey'].each ...
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<Xuisce1> hiya zeroXten
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<Xuisce1> How do you guys suggest I start to learn ruby
<Xuisce1> ?)
<Xuisce1> Im on learnrubythehardway
<jhass> zeroXten: depends a lot on your context but you could set the default of your hash to an empty array or use somthing like hash.fetch('key') { [] }.each
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
Macaveli has quit [Ping timeout: 272 seconds]
thams has quit [Quit: thams]
mforrester has joined #ruby
<Xuisce1> jhass: How do you suggest I get started with Ruby ?
<Xuisce1> :)
<jhass> what's your prior experience?
tobago has quit [Remote host closed the connection]
lmickh has quit [Remote host closed the connection]
<Xuisce1> jhass: well totally new to programming
<Xuisce1> I'm using this ^ jhass
Vovko has joined #ruby
<Xuisce1> :)
<Xuisce1> it seems to be well and the author Zed is well known too
<jhass> sure, just pick something and carry on, you can always start a new search if it doesn't work for you
<Xuisce1> ah ok
<Xuisce1> thanks
<Xuisce1> jhass: is ruby your main language ?
sk87 has joined #ruby
burlyscudd has joined #ruby
jkamenik has joined #ruby
<jhass> it's the one I know the best atm
<Xuisce1> ah nice
<Xuisce1> yeah Im doing it because the IRC client I use is based off it
<Xuisce1> :)
<Xuisce1> and its well better
<zeroXten> jhass: hmm, fetch looks nice :)
rippa has joined #ruby
chipotle has joined #ruby
rootshift_ has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<slowcons> hey jhass: getting closer with my script. i installed pry and i see how it works now to basically stop the script and let you test things. when testing in pry i used the get_attribute("href") method on the string to grab the href and pass it to a new string. problem is when i test in my script im using ::Node through Nokogiri, and in the script im using ::Nodeset. ::Nodeset doesnt have get_attribute,
<slowcons> only attribute. i threw a binding.pry right around that part of my script so that i can view the avail methods on the variable.
angusigu1ss has quit [Ping timeout: 260 seconds]
<jhass> great
<Xuisce1> yeah I like ruby
<Xuisce1> jhass: btw What do you use ruby for?
<Xuisce1> the Python guys were a bit crabby
<Xuisce1> :P
<jhass> all sort of things
<slowcons> jhass: in my editor, it brings up the prompt for me to test, but any of my commands arent successful(shows nothing) question is, how can i load the .rb in pry directly and check that way?
<Xuisce1> also as I said my cleitn is based on RUby
<Xuisce1> cleint*
<Xuisce1> client*
<jhass> slowcons: hm, I'd say just run your script with ruby foo.rb on your terminal if you have a bindind.pry in it
tylersmith has joined #ruby
tagrudev has quit [Quit: Me = Awesome]
<Xuisce1> awesome jhass I love ruby
nuba_ is now known as nuba
IceDragon has joined #ruby
parzo has joined #ruby
ndrei has joined #ruby
xIzIv_ has joined #ruby
Lewix has quit [Remote host closed the connection]
brycesenz has joined #ruby
iamjarvo has quit [Ping timeout: 272 seconds]
zachallett has quit [Remote host closed the connection]
DaniG2k has joined #ruby
mengu has quit [Remote host closed the connection]
thesheff17 has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
iamjarvo has joined #ruby
parzo has quit [Ping timeout: 248 seconds]
pdtpatrick has quit [Quit: pdtpatrick]
duggiefresh has quit [Read error: Connection reset by peer]
duggiefresh has joined #ruby
ruisantos has joined #ruby
<slowcons> jhass: when i run it in terminal, its not pulling the binding.pry
stonevil has joined #ruby
meatherly has joined #ruby
omegahm is now known as omegahm^
omegahm^ has quit []
ndrei has quit [Ping timeout: 260 seconds]
geggam has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
thisirs has quit [Remote host closed the connection]
pabloh has joined #ruby
mjs2600 has joined #ruby
<jhass> slowcons: hm, it just ignores it? did you add a require 'pry' ?
wallerdev has joined #ruby
<Xuisce1> jhass: thanks for the help
<Xuisce1> I'll start on the site and come here for help if I need any
dubsteph has quit [Ping timeout: 250 seconds]
xIzIv_ has quit [Quit: leaving]
<Xuisce1> Rylee: why the CTCP :P
<Rylee> qwebirc is rb?
ultraflash3 has quit [Remote host closed the connection]
<Rylee> this is news to me
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Rylee> Xuisce1, interested in an rb client tbh
<Xuisce1> huehue
<Xuisce1> ah
<Xuisce1> yeah its lightweight
<slowcons> jhass: its throwing a sql error, so i dont even think its getting to the bind.
deception has joined #ruby
<slowcons> jhass: C:/Ruby193/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.8-x86-mingw32/lib/sqlite3/database.rb:91:in `initialize': SQLite3::SQLExcepti
<slowcons> on: no such table: genres (Sequel::DatabaseError)
<Rylee> 1[VPS] rylai@wisp:~/code/qwebirc $ find -name '*.rb'
<Rylee> [VPS] rylai@wisp:~/code/qwebirc $
<Rylee> :(
xxpor_ has joined #ruby
felixjet_ has joined #ruby
mven_ has joined #ruby
awarner_ has joined #ruby
Sp4rKy has quit [Read error: Operation timed out]
jsilver has joined #ruby
yourmysin has joined #ruby
scarolan_ has joined #ruby
motto has joined #ruby
matled- has joined #ruby
danshult_ has joined #ruby
Sawbones has joined #ruby
meatherl_ has joined #ruby
<Xuisce1> Rylee: wassup?
spyderma_ has joined #ruby
petey_ has joined #ruby
aryaching_ has joined #ruby
rudisimo has joined #ruby
danman_ has joined #ruby
jkamenik1 has joined #ruby
mattp__ has joined #ruby
<jhass> slowcons: so your database isn't initialized with the right schema or the path it searches for the db is different than when you start it with your editor
Asher1 has joined #ruby
tjr9898_ has joined #ruby
Chris- has joined #ruby
zachallett has joined #ruby
wallerdev_ has joined #ruby
savage-__ has joined #ruby
Phrohdoh has joined #ruby
ahuman_ has joined #ruby
einarj_ has joined #ruby
bamdad has joined #ruby
<Phrohdoh> I'd like to finally learn Ruby correctly to contribute and give back in some way but with every time I try it seems like such a horrible mess and terribly difficult to get setup and running. Does anyone know of any good (dummy) guides to getting started?
<Tachoh> Phrohdoh: are you already a programmer?
<Phrohdoh> Tachoh: yes
<Phrohdoh> I've dabbled (with no success) in Python, but am pretty proficent with the .NET framework.
rmorello_ has joined #ruby
jxport_ has joined #ruby
sawtooth1 has joined #ruby
<Phrohdoh> I have other small-time experience in general languages such as js css html etc.
klipeto has joined #ruby
pimpthin1 has joined #ruby
jprovazn has quit [Quit: Leaving]
miah_ has joined #ruby
kyle___ has joined #ruby
<jhass> Phrohdoh: with setup you mean plain ruby dev? what's your OS?
kaliya_ has joined #ruby
seekwill_ has joined #ruby
<Phrohdoh> OSX 10.8
<Tachoh> what do you need to get setup? an IDE? the intrepreter? rails?
seekwill_ is now known as Guest95692
<Phrohdoh> Tachoh: Everything now. I've just got a new system so I'd like to start fresh and correct.
ItSANg___ has joined #ruby
mnemon2 has joined #ruby
<Phrohdoh> Tachoh: I'll probably use XS/MD or Sublime Text as my IDE.
<Phrohdoh> I don't know any good IDEs for Ruby and don't like bloating my system.
<jhass> okay, just install sublime and don't bother further. For ruby install RVM as said on http://rvm.io (as user, not as root)
<Tachoh> jetbrain's rubymine is pretty good
<Phrohdoh> Is RVM the best ruby management?
moshee has joined #ruby
epsylon` has joined #ruby
De`off has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
cgore has joined #ruby
nemesit|- has joined #ruby
jso_ has joined #ruby
steinsgate has joined #ruby
adamholt_ has joined #ruby
wallerdev has quit [*.net *.split]
meatherly has quit [*.net *.split]
IceDragon has quit [*.net *.split]
rippa has quit [*.net *.split]
jkamenik has quit [*.net *.split]
petey has quit [*.net *.split]
Sawbones_ has quit [*.net *.split]
danman has quit [*.net *.split]
aryaching has quit [*.net *.split]
danshultz has quit [*.net *.split]
jsilver_ has quit [*.net *.split]
m8 has quit [*.net *.split]
jackneill has quit [*.net *.split]
tjr9898 has quit [*.net *.split]
kaliya has quit [*.net *.split]
ayaz_ has quit [*.net *.split]
rmorello has quit [*.net *.split]
einarj has quit [*.net *.split]
seekwill has quit [*.net *.split]
barratt has quit [*.net *.split]
ItSANgo_ has quit [*.net *.split]
jbueza has quit [*.net *.split]
Vivekananda has quit [*.net *.split]
Deele has quit [*.net *.split]
Soliah has quit [*.net *.split]
Asher has quit [*.net *.split]
scarolan has quit [*.net *.split]
awarner has quit [*.net *.split]
forced_request has quit [*.net *.split]
marienz has quit [*.net *.split]
bbloom has quit [*.net *.split]
nemesit|znc has quit [*.net *.split]
joonty has quit [*.net *.split]
klip has quit [*.net *.split]
lotherk has quit [*.net *.split]
epsylon has quit [*.net *.split]
matled has quit [*.net *.split]
ahuman has quit [*.net *.split]
sawtooth has quit [*.net *.split]
miah has quit [*.net *.split]
mattp_ has quit [*.net *.split]
adamholt has quit [*.net *.split]
spyderman4g63 has quit [*.net *.split]
elektronaut has quit [*.net *.split]
yxhuvud has quit [*.net *.split]
felixjet has quit [*.net *.split]
savage-_ has quit [*.net *.split]
mnemon has quit [*.net *.split]
jso has quit [*.net *.split]
p8952 has quit [*.net *.split]
dreamchaser has quit [*.net *.split]
kyle__ has quit [*.net *.split]
mosheee has quit [*.net *.split]
WillAmes has quit [*.net *.split]
jxport has quit [*.net *.split]
pimpthink has quit [*.net *.split]
mven has quit [*.net *.split]
xxpor has quit [*.net *.split]
wallerdev_ is now known as wallerdev
matled- is now known as matled
danman_ is now known as danman
jso_ is now known as jso
elektronaut has joined #ruby
snath has quit [Ping timeout: 260 seconds]
xIzIv_ has joined #ruby
adamholt_ is now known as adamholt
<slowcons> jhass: got it, added the absolute path to the DB. running some tests with pry now
lmickh has joined #ruby
lotherk has joined #ruby
savage-__ is now known as savage-_
araujo has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
_tpavel has quit [Quit: Leaving]
Xeago_ has joined #ruby
rootshift_ has joined #ruby
brennanMKE has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
IceDragon has joined #ruby
brennanMKE has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
p8952 has joined #ruby
<jsilver> hi all
joonty has joined #ruby
<jsilver> Phrohdoh: I think so
yxhuvud has joined #ruby
<jsilver> no server-side but yea
Vivekananda has joined #ruby
marienz has joined #ruby
pedda has quit [Quit: Textual IRC Client: www.textualapp.com]
Xeago_ has joined #ruby
dangerousdave has joined #ruby
<Phrohdoh> Alright thank you.
VTLob has joined #ruby
<jsilver> np
jackneill has joined #ruby
kevind has joined #ruby
bal has quit [Quit: bal]
clov3r has joined #ruby
zoscoy has joined #ruby
mordocai has joined #ruby
pwh has quit [Ping timeout: 265 seconds]
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
xIzIv_ has quit [Quit: leaving]
mikepack has joined #ruby
brennanMKE has quit [Ping timeout: 272 seconds]
zoscoy has quit [Client Quit]
xIzIv_ has joined #ruby
ArchBeOS-work has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sailias1 has joined #ruby
ArchBeOS-work has quit [Read error: Connection reset by peer]
shaunbaker has joined #ruby
someword has joined #ruby
sailias has quit [Ping timeout: 272 seconds]
lpvn has quit [Quit: Saindo]
xIzIv_ has quit [Client Quit]
pwh has joined #ruby
beakr has joined #ruby
beakr has quit [Client Quit]
tvw has quit []
mehlah has quit [Quit: Leaving...]
wildroman2 has quit [Remote host closed the connection]
mlpinit has joined #ruby
mupkoo has joined #ruby
aganov has quit [Remote host closed the connection]
TheMoonMaster has quit [Excess Flood]
BrianJ has joined #ruby
mikepack has quit [Ping timeout: 272 seconds]
TheMoonMaster has joined #ruby
<slowcons> jhass: question, will a array always be displayed as NodeSet?
ndrei has joined #ruby
bamdad has quit [Quit: bamdad]
ioNull has quit [Ping timeout: 272 seconds]
rootshift_ has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
brennanMKE has joined #ruby
<jhass> jhass: no, that's just nokogiris special case of a array like structure
iamjarvo has quit [Ping timeout: 272 seconds]
<jhass> er, slowcons ^
mojo619 has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
<slowcons> jhass: i see, yeah i meant when using nokogiri
tjsousa has joined #ruby
<slowcons> jhass: having trouble grabbing the href attribute, returning nil
phansch has quit [Quit: Leaving]
gtsiftsis has quit [Quit: Leaving]
<jhass> try to grab the element first, that is extract it from the NodeSet
ioNull has joined #ruby
stryek has quit [Ping timeout: 260 seconds]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
<slowcons> jhass: is there a way to display this more readable? or maybe only grab the first element and work from there http://snag.gy/cPPNK.jpg
jh_ has joined #ruby
supersym has joined #ruby
jh_ is now known as Guest17745
<jhass> no too easy one, grabbing the first element should be easy
mlpinit has quit [Quit: Leaving...]
crus has quit [Read error: Connection reset by peer]
<jhass> as said NodeSet is an array like structure, so it most likely includes Enumerable and thus responds to first
<slowcons> .first
<slowcons> got it
tjr9898_ has quit [Remote host closed the connection]
Vampire has joined #ruby
Vampire has left #ruby [#ruby]
knutster has quit [Quit: Lost terminal]
maletor has joined #ruby
tjr9898 has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<supersym> sigh... why does rvm need to touch *every* single startup file and still complains non-stop ><
nszceta has joined #ruby
tedstriker has joined #ruby
<jsilver> because fuck you
<lagweezle> Actually, on the subject of Sublime Text, any one know how to work with the build interface and make it handle things like executing 'bundle exec guard' or 'bundle exec rspec'?
_HolyCow1 has joined #ruby
<jsilver> lagweezle: you're doing it wrong
charliesome has joined #ruby
_HolyCow1 is now known as _HolyCow
alessandro1997 has joined #ruby
<Phrohdoh> lagweezle: unfortunately no
angusigu1ss has joined #ruby
OdNairy has joined #ruby
LuvLinuxOS has joined #ruby
<lagweezle> jsilver: wat?
beakr has joined #ruby
<jsilver> lagweezle: i dont use that part of sublime
<jsilver> lolo
<jsilver> lemme know if u get it working
<jhass> lagweezle: hm tried just adding a foo.sublime-build to your user directory with {"cmd": ["command", "param", "param", ...] } ?
jonah_k has joined #ruby
<lagweezle> jsilver: Nor do I, as I hadn't found the magic, but jhass looks like he might have info that will lead me there.
<jsilver> nice
jonno11 has joined #ruby
jfoy has joined #ruby
baroquebobcat has joined #ruby
<slowcons> jhass: ahh i see, its in a child element, not the main!
<lagweezle> Praise be to jhass! jhass the light bringer!
<jsilver> why do you need to use sublime to build so bad
<jsilver> is it really that much eazer
alexherbo2 has quit [Quit: WeeChat 0.4.2]
<jhass> jsilver: everyone the right to his own workflow!
bthesorceror has quit [Remote host closed the connection]
<jsilver> lol k
axsuul has joined #ruby
alexherbo2 has joined #ruby
maasha has quit [Ping timeout: 245 seconds]
<lagweezle> 'build' isn't the right term, really. It would be nice to be able to exec my specs w/o swapping to a command shell.
bthesorceror has joined #ruby
angusigu1ss has quit [Ping timeout: 260 seconds]
<jsilver> ah
pu22l3r_ has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
bthesorceror has quit [Read error: Connection reset by peer]
<jsilver> I still consider running rspec building but thats just me and my own retardedness conforming to the general retardity
JasmeetQA has joined #ruby
msuszczy has quit [Quit: leaving]
havenwood has joined #ruby
<jsilver> and not at all correct in any way
pu22l3r has joined #ruby
bthesorceror has joined #ruby
someword1 has joined #ruby
stryek has joined #ruby
dubsteph has joined #ruby
sambao21 has joined #ruby
joelbrewer has joined #ruby
beakr has quit [Quit: beakr]
<slowcons> jhass: so genreslink.first.children.attribute("href") displays the name and value. i used get_attribute before so i tried to pass the results to a string, and run get_attribute("href") on that one, but still returning nil
jfoy has quit [Quit: jfoy]
someword has quit [Ping timeout: 260 seconds]
<jhass> I think .children returns another NodeSet
gnephiak has quit [Remote host closed the connection]
parzo has joined #ruby
<jhass> so genreslink.first.children.first['href'] ? I think you should improve your css selector if so
<slowcons> jhass: i did jhass = genreslink.first.children.attribute("href")
<lagweezle> jsilver: lmao 'retardity'
<jsilver> lol
<slowcons> and ls jhass returned just Node::
<slowcons> jhass: ah i see what you did
axl_ has joined #ruby
xIzIv has joined #ruby
omegahm has joined #ruby
<lagweezle> jsilver: I'm try to stick to TDD for my own projects, and the less work I have to do in order to trigger a test run, or have a test run handy, the better.
<slowcons> jhass: this is the website http://www.clublandlv.com/forum.php what selector would you use for grabbing the href of "Dirty House Music"?
akemrir has quit [Quit: WeeChat 0.4.3]
yfeldblum has joined #ruby
dawkirst has quit [Ping timeout: 250 seconds]
kpshek has joined #ruby
parzo has quit [Ping timeout: 250 seconds]
<jsilver> lagweezle: hm.. but you use rspec for tdd?
<jsilver> yeah makes sense
<jsilver> I agree
<jsilver> fully
<slowcons> jhass: im using (.forumtitle)
mneorr has joined #ruby
<jhass> slowcons: what's the current base?
<slowcons> cat#10
<slowcons> only looking to grab from that section
pavilionXP has joined #ruby
<jhass> okay, all you want all of the forumtitles?
ahawkins has quit [Quit: leaving]
<slowcons> all of the main titles and their unique href(?f=)
<slowcons> and then i will use that info to populate the subgenres of each genre
jonah_k has quit [Remote host closed the connection]
<jhass> I'd probably do links = category.css(".forumtitle a").map {|link| link['href'] }
oz has quit [Quit: EOF]
yfeldblum has quit [Ping timeout: 250 seconds]
<slowcons> jhass: im using genreslink = grab.css(".forumtitle"){[:href]}
beakr has joined #ruby
x77686d has quit [Quit: x77686d]
<jhass> I think .css just ignores the block you're passing it there
JasmeetQA has quit [Quit: Leaving.]
thams has joined #ruby
JasmeetQA has joined #ruby
mneorr has quit [Ping timeout: 250 seconds]
sailias1 has quit [Ping timeout: 272 seconds]
beakr has quit [Client Quit]
<lagweezle> jsilver: I do.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrei has quit [Read error: No route to host]
thumpba has joined #ruby
<jsilver> ah
yasushi has quit [Remote host closed the connection]
sailias has joined #ruby
<jsilver> i thought if its explained in a sentence in the tests its BDD
<jsilver> what the test does
Dreamer3 has quit [Quit: Leaving...]
Es0teric has joined #ruby
beakr has joined #ruby
<lagweezle> BDD is a subset of TDD. Not sure if I'm all the way to BDD.
bluenemo has quit [Remote host closed the connection]
<jsilver> whats the diff, in your mind?
tylersmith has quit [Remote host closed the connection]
bthesorceror has quit [Remote host closed the connection]
tylersmith has joined #ruby
bthesorceror has joined #ruby
alessandro1997 has quit [Quit: Sto andando via]
omegahm has quit []
charliesome has joined #ruby
pel_daniel has joined #ruby
momomomomo has joined #ruby
<jsilver> because the difference in my mind is "the thing that says this should be that'
<jsilver> should do* thay
<jsilver> that*
tylersmith has quit [Ping timeout: 245 seconds]
bthesorceror has quit [Ping timeout: 260 seconds]
Monk_code has joined #ruby
spyderma_ has quit []
jonah_k has joined #ruby
thesheff17 has joined #ruby
Phrohdoh has quit [Quit: Page closed]
x77686d has joined #ruby
mjs2600 has quit [Remote host closed the connection]
evilbug has joined #ruby
stkowski has joined #ruby
tedstriker has quit [Quit: Anti-Fraping status set.]
snath has joined #ruby
aspires has joined #ruby
Hanmac1 has quit [Quit: Leaving.]
pel_daniel has quit [Ping timeout: 250 seconds]
<shevy> lol
<lagweezle> SEGFAULT
<shevy> how often will you correct your sentence man
stryek has quit [Ping timeout: 260 seconds]
ktun has joined #ruby
<lagweezle> I guess, BDD would be 'acceptance test' and TDD would be 'unit test'?
beakr has quit [Quit: beakr]
stonevil has quit [Quit: Computer has gone to sleep.]
Xeago_ has quit [Remote host closed the connection]
<jsilver> im confused about what "unit test" means
<jsilver> it means i test every object, or does it mean i test every function of every object
arctaruz has quit [Ping timeout: 260 seconds]
gbt has quit [Quit: Leaving...]
stonevil has joined #ruby
s2013 has joined #ruby
Wolland has quit []
IceDragon has quit [Ping timeout: 265 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
Wolland has joined #ruby
phansch has joined #ruby
pel_daniel has joined #ruby
ConstantineXVI has quit [Ping timeout: 265 seconds]
Xeago_ has joined #ruby
pfg has joined #ruby
sdwrage has joined #ruby
sambao21 has joined #ruby
bthesorceror has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<jsilver> guess nobody knows
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_HolyCow has quit [Quit: Leaving.]
ConstantineXVI has joined #ruby
obs_ has quit [Quit: Konversation terminated!]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030_ has joined #ruby
iamjarvo has joined #ruby
<slowcons> jhass: finally got it! i used CGI.parse and URI.parse to pull the selector from href (?f=). problem now, is there isnt anything to tell the DB what ID matches what. i thought that the script would import the 17 Forum names(which it does) and then insert the urls into the adjacent column. 17 names matching 17 urls in order. but the script is importing 17 urls for each forum name. i moved the end
<slowcons> tag up and that gave me the names 1-17. so i guess question is how can i start my second insert at row 1
Collin has joined #ruby
Hobogrammer_ has joined #ruby
mary5030 has quit [Ping timeout: 250 seconds]
<jhass> insert always creates a new row
<jhass> collect all names and urls first, then build the records to insert
dagobah has quit [Quit: Leaving...]
nomenkun has joined #ruby
obs has joined #ruby
mjs2600 has joined #ruby
Solnse has joined #ruby
pwh has quit [Ping timeout: 245 seconds]
mary5030_ has quit [Remote host closed the connection]
thesheff17 has quit [Remote host closed the connection]
mary5030 has joined #ruby
mityaz has joined #ruby
<lagweezle> jsilver: The problem is that most terms describing test scope are still somewhat vague. A unit test should be able to execute in fractional seconds. Should be able to run hundreds of them in a minute. Should not require other real classes, generally.
trhodes has joined #ruby
<lagweezle> a unit test often is testing a function, but not necessarily
<lagweezle> As for whether it tests ALL the functions, that is more the realm of code coverage metrics.
<b00stfr3ak> options[:foo] = bar || 2 comes back with nil still for optparse
troyready has joined #ruby
<lagweezle> 100% coverage, however, is a waste of time and effort.
iamjarvo has quit [Ping timeout: 272 seconds]
petey_ has quit [Remote host closed the connection]
pwh has joined #ruby
pwh has quit [Max SendQ exceeded]
timonv has quit [Remote host closed the connection]
petey has joined #ruby
pwh has joined #ruby
pwh has quit [Max SendQ exceeded]
<shevy> guys can http://pastie.org/8726739 be rewritten shorter, without using ; and without using ternary operator?
ace_striker has joined #ruby
stryek has joined #ruby
pwh has joined #ruby
pwh has quit [Max SendQ exceeded]
ace_striker is now known as Guest62073
Guest62073 has quit [Client Quit]
beakr has joined #ruby
[gmi] has quit [Read error: Connection reset by peer]
sailias has quit [Quit: Leaving.]
Bira has joined #ruby
pwh has joined #ruby
IceDragon has joined #ruby
<lagweezle> Bad shevy.
burlyscudd has joined #ruby
<shevy> lol
hackeron has quit [Remote host closed the connection]
<shevy> 2014 is not my year in this channel
<shevy> I got beat by centrx I got beat by Nilium and now even lagweezle says bad shevy
timonv_ has joined #ruby
<slowcons> jhass: are you suggesting combining results and only using one insert statement?
arctaruz has joined #ruby
troessner has quit [Quit: Leaving]
<jhass> slowcons: yes
razrunelord has joined #ruby
mikepack has joined #ruby
Noldorin has joined #ruby
<shevy> :\
petey has quit [Ping timeout: 260 seconds]
timonv_ has quit [Remote host closed the connection]
<lagweezle> There. Added mah comment to it, now, aswell.
<certainty> shevy: why do you want it shorter? it's pretty clear. you could do it in one line like so: if closed? then open else close end
axsuul has quit [Ping timeout: 272 seconds]
<shevy> hmm let me think
<shevy> certainty right now I use 5 lines
noop has joined #ruby
<shevy> that is like longer than the rest of the code
subbyyy_ has joined #ruby
rippa has joined #ruby
<shevy> certainty can the 'then' be dropped?
<lagweezle> shevy: go take a quick peek at the gist link :p
lethjakman has joined #ruby
[gmi] has joined #ruby
<shevy> lagweezle I did before already! It was a proud 100% copy paste
<certainty> shevy: nope
s2013_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
s2013 has quit [Ping timeout: 260 seconds]
<certainty> without it you have to resort to using ;
<shevy> hmm
<lagweezle> shevy: I added in a comment a "shorter" version. I'm with certainty though; I don't see the point in shortening it. While you might get it shorter, I'm not certain you'd get it as easily readable.
msmith_ has quit [Remote host closed the connection]
<shevy> yeah
<shevy> that is what I am worrying as well now
<shevy> no matter how I turn it, that won't become more readable or really shorter :(
<lagweezle> readability > short; maintanable > short
pabloh has quit [Ping timeout: 245 seconds]
<shevy> I love shortness!
ocx has joined #ruby
angusigu1ss has joined #ruby
<shevy> perhaps I can live with 'then' hmm
Hanmac has joined #ruby
<certainty> another way but even less readable is closed? and open or close
diegoviola has joined #ruby
momomomomo has joined #ruby
lfox has quit [Quit: ZZZzzz…]
<waxjar> i'd spread it out over 5 lines or just use the ternary. they're both more readable then if and else on a single line
<ocx> hi all , i am runing a bash script that reads the files from a directory and stores them in an array, after that work is done on each file at a time, now my issue is having the directory updated after the bash script executes, i end up with new files non processed, for this i thought of using a ruby script to call the bash script every second and work on the result in a seperate thread, this way i would have an updated array of file to wo
<shevy> so many choices...
yfeldblum has joined #ruby
<shevy> how about this
<Xuisce1> whats a good complier for Ruby?
<shevy> if condition
<shevy> foo
<shevy> else
<shevy> bla; end # omg
adamnbowen has joined #ruby
jonno11 has quit [Quit: Textual IRC Client: www.textualapp.com]
<lagweezle> return open if closed?
<lagweezle> close
<lagweezle> That is my "shorter" version.
Sp4rKy has joined #ruby
<ocx> like the bashscript variable will get updated everysecond with a new value to work upon
hackeron has joined #ruby
<waxjar> shevy, if closed? returns true, should you attempt to close it again?
nvrch has quit [Quit: nvrch]
<DouweM> Xuisce1: what are you looking to do? :/
<waxjar> the naming implies you shouldn't have to, imo, in which case open if closed? would be enough
<Xuisce1> I'm off to class
<Xuisce1> :)
TMM has quit [Quit: Ex-Chat]
<shevy> waxjar ah, in this context it is just a container which you can toggle, so when it is open, it will be closed if you call toggle, and if it already was closed, you will open it if you toggle
petey has joined #ruby
<shevy> waxjar hmm lemme think
someword1 has quit [Quit: Leaving.]
<certainty> actually the second example is incorrect. It behaves wrong in case open returns a falsy value
Hobogrammer_ is now known as Hobogrammer
adamnbowen has quit [Remote host closed the connection]
<slowcons> jhass: trying to figure out how to grab the .each results from the do block. im exploring with .collect but running into some problems. on the right track?
jfoy has joined #ruby
pietr0 has joined #ruby
JZTech101 has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Remote host closed the connection]
angusigu1ss has quit [Ping timeout: 265 seconds]
<jhass> slowcons: yeah, I'd probably just map everything in two arrays (.collect is an alias of .map) and .zip them together, then .each do |name, link|
zoscoy has joined #ruby
zoscoy has quit [Client Quit]
<waxjar> shevy: ah, i see. what about (closed? && open) || close? :p
<shevy> hmm
<shevy> not sure
<shevy> the thing is, I need it to be simple on my poor mind when reading
wildroman2 has quit [Ping timeout: 272 seconds]
<certainty> waxjar: that wont work if open returns a falsy value
<certainty> if will go on and close it again
<shevy> the 5 lines is actually best for reading because my brain does not have to think
<shevy> but it is 5 lines!!!!
s2013_ is now known as s2013
Collin has quit [Read error: Connection reset by peer]
<waxjar> certainty: that's what supposed to happen right?
Collin has joined #ruby
JZTech101 has joined #ruby
Xuisce1 has quit [Ping timeout: 245 seconds]
<certainty> waxjar: if open returns a falsy value then there is nothing to close
<shevy> the ternary is short, which is good in principle, but I noticed that I spend more time understanding ternary construct than if/else structure
<shevy> the worst are regexes
Collin has quit [Read error: Connection reset by peer]
<shevy> especially the long ones
<certainty> waxjar: as i understand it it should open if it is closed and close otherwise
parzo has joined #ruby
Collin has joined #ruby
<waxjar> >> (false && nil) || true
<eval-in> waxjar => true (https://eval.in/100967)
<shevy> perhaps I have to go with ternary
<shevy> foo? ? bla : ble
<shevy> I don't like that :\
Shidash has joined #ruby
<certainty> shevy: i'd go with ternary too. Most programmers are used to it and your example is actually a good case since the too arms are short
<shevy> in ruby you can sometimes condense to two lines
<shevy> def check_condition
<shevy> # hmm bad example... but still, let me continue
<jhass> if you'd represent the state with a simple true / false you could open = !open
<shevy> return false if game_over?
<shevy> true
bleak has joined #ruby
<shevy> end
fenicks has joined #ruby
<shevy> jhass hmm that might be best, let me think
adamnbowen has joined #ruby
greenarrow has quit [Quit: 500]
<shevy> open would be a method that stores a (boolean) value?
arctaruz has quit [Remote host closed the connection]
<jhass> open would be attr_accessor
<jhass> @open = !@open
adamnbowen has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
<certainty> i don't see how that helps. Maybe i still don't understand what toggle's semantics are
DaniG2k has quit [Quit: leaving]
<certainty> i assume #open and #close actually do something more than just setting the value of such a state variable?
parzo has quit [Ping timeout: 260 seconds]
roolo has quit [Quit: Leaving...]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
pmullin has joined #ruby
<shevy> well right now they keep track of it into an @ivar
Jdubs has joined #ruby
mneorr has joined #ruby
<certainty> ok if that's all then i'm with jhass
pfg has quit [Read error: Connection reset by peer]
pfg has joined #ruby
mikecmpbll has quit [Ping timeout: 245 seconds]
<waxjar> open if closed?; close if opened?
timonv has joined #ruby
wildroman2 has joined #ruby
dkamioka_ has joined #ruby
rubyracer has joined #ruby
<certainty> waxjar: if the first branch succeeds the second will undo it
<waxjar> shit, yeah.
<shevy> hehe
nism has joined #ruby
<shevy> yeah, I can easily change it to jhass's solution, then it would be just to toggle, and a simple ! would suffice
i_s has joined #ruby
<waxjar> im done thinking about this, i gotta go. just go with the 5 lines :p
<shevy> wat!!!
<certainty> the problem with state :) it does matter *when* you do stuff :)
<shevy> 5 lines!
<shevy> we reduced it down to: ! open
mikepack has quit [Remote host closed the connection]
dkamioka has quit [Ping timeout: 260 seconds]
<shevy> yeah, you gotta go waxjar :)))
mansi has quit [Ping timeout: 245 seconds]
danshult_ has quit []
mneorr has quit [Ping timeout: 245 seconds]
rootshift_ has joined #ruby
spider-mario has joined #ruby
canton7-mac has quit [Quit: Leaving]
nhhagen has joined #ruby
someword has joined #ruby
pabloh has joined #ruby
claymore has quit [Ping timeout: 265 seconds]
timonv_ has joined #ruby
wildroman2 has quit [Read error: Connection reset by peer]
art-solopov has joined #ruby
ktun_ has joined #ruby
msmith_ has joined #ruby
ktun has quit [Ping timeout: 272 seconds]
jonahR has joined #ruby
<slowcons> jhass: got the forum titles in an array, but having trouble passing the results of the do block that extracts the ID (?f=) from the href to an array.
mechanicles has joined #ruby
mikepack has joined #ruby
<slowcons> jhass:http://pastebin.com/ebqkx428
nomenkun has quit [Ping timeout: 260 seconds]
<art-solopov> Hi! =)
<mechanicles> Hi all
timonv has quit [Ping timeout: 250 seconds]
jonahR has quit [Client Quit]
einarj_ has quit [Remote host closed the connection]
tjbiddle has joined #ruby
sailias has joined #ruby
tjbiddle has quit [Remote host closed the connection]
<jhass> slowcons: just map it, forum_ids = forum_links.map {|forum_link| parse_forum_link_and_extract_id }
kyle___ is now known as kyle__
tjbiddle has joined #ruby
pmlarocque has joined #ruby
sailias has quit [Client Quit]
<Collin> Is there a reason 'hash' isn't used as a variable name
mechanicles has left #ruby ["Leaving"]
oso|away is now known as oso96_2000
kaliya_ has quit [Quit: Lost terminal]
mikepack_ has joined #ruby
lfox has joined #ruby
<jhass> Collin: in most case you should describe your data, not your structure
<AntelopeSalad> what do you guys think is the fastest way to determine if a gem installed binary is on the user's system path?
beakr has quit [Quit: beakr]
mojo619 has quit [Quit: mojo619]
<AntelopeSalad> doing foo -v to get the version is ok, but the things i want to check take a few seconds to spin up, i thought maybe there would be an instant way
<jhass> AntelopeSalad: which foo
tjsousa has quit [Quit: Computer has gone to sleep.]
<AntelopeSalad> jhass: does that guarantee it's on their path and runnable tho?
Spami has joined #ruby
<jhass> iirc yes
wildroman2 has joined #ruby
noarthur has quit [Ping timeout: 246 seconds]
<AntelopeSalad> the condition i'm trying to pass is "is it guaranteed that i can call foo without supplying a path and it will run as planned"
<pmlarocque> AntelopeSalad: which foo +1
<AntelopeSalad> i thought of using which foo before but isn't that only going to check that it exists?
JustMozzy has quit [Remote host closed the connection]
saarinen has joined #ruby
ebwise has joined #ruby
mary5030_ has joined #ruby
fenicks has quit [Remote host closed the connection]
tylersmith has joined #ruby
<pmlarocque> which is a Unix command used to identify the location of executables.
browndawg has left #ruby [#ruby]
<AntelopeSalad> yeah i know, but knowing it exists is only half the story, i'm trying to determine if it's also loaded on their system path
<certainty> pmlarocque: which(1)
tylersmith has quit [Read error: Connection reset by peer]
blaxter has quit [Quit: foo]
tylersmith has joined #ruby
<certainty> pmlarocque: sorry misread
mikepack_ has quit [Ping timeout: 260 seconds]
ConstantineXVI has quit [Ping timeout: 265 seconds]
claymore has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
<pmlarocque> if it's not in the system path it won't find it
koalallama has quit [Remote host closed the connection]
<AntelopeSalad> pmlarocque: i mean available to be ran without supplying a full path
mary5030 has quit [Ping timeout: 272 seconds]
G has quit [Ping timeout: 272 seconds]
Kamilion has quit [Excess Flood]
ephemerian has quit [Quit: Leaving.]
_HolyCow has joined #ruby
koalallama has joined #ruby
<pmlarocque> well which search the paths defined in PATH
jcarouth has quit [Excess Flood]
cout has quit [Ping timeout: 260 seconds]
<AntelopeSalad> ah
<pmlarocque> so if which foo find foo you can call foo
<pmlarocque> without full p[ath
<AntelopeSalad> that will be perfect then, thanks -- i didn't know it checked against the PATH
<pmlarocque> np
<AntelopeSalad> i guess that's why it's so fast to execute, it doesn't need to do a full search
<havenwood> AntelopeSalad: Or `command -v foo` is a bit more portable than `which foo`.
<AntelopeSalad> havenwood: i'm only going after standard linux distros and macs
iamjarvo has joined #ruby
<havenwood> AntelopeSalad: zsh
<AntelopeSalad> i hope macs have which?
<workmad3> AntelopeSalad: they do
<AntelopeSalad> i never used one haha
<pmlarocque> yes
<havenwood> AntelopeSalad: They do.
<pmlarocque> mac got which
jcarouth has joined #ruby
<workmad3> AntelopeSalad: however, they don't have 'wget'...
<havenwood> AntelopeSalad: Portable in the sense it works with more shells.
<havenwood> AntelopeSalad: A posix command.
<AntelopeSalad> havenwood: oh, does zsh and "which" not work?
<AntelopeSalad> workmad3: interesting, i didn't know that
<certainty> workmad3: that's because it's a bsd, they have fetch
<workmad3> certainty: unless you install wget manually ;)
<certainty> true
<workmad3> they do also have curl
<workmad3> so I tend to do curl url > foobar nowadays
<AntelopeSalad> curl with a redirect to a file is about the same as wget
<AntelopeSalad> yeah
<havenwood> AntelopeSalad: Can cause bugs. I prefer `command -v`. We've moved entirely to `command -v` for ruby-install.
<havenwood> AntelopeSalad: just a nit though, prolly no thing
<AntelopeSalad> havenwood: what kind of bugs have you seen?
<AntelopeSalad> because command -v is 3-4 seconds vs instant for which
<certainty> june bugs
<havenwood> ^ yup, june bus
<certainty> only accur in june
<havenwood> bugs
<AntelopeSalad> those are the best
nism has quit [Quit: Leaving]
Columcille has quit [Ping timeout: 272 seconds]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
siwica has joined #ruby
<havenwood> AntelopeSalad: `command -v foo` is taking 3-4 seconds?!? :O
<certainty> belong to the heisenbug family
Columcille has joined #ruby
klaut has quit [Remote host closed the connection]
ConstantineXVI has joined #ruby
G has joined #ruby
zz_jrhorn424 is now known as jrhorn424
pranny has joined #ruby
<AntelopeSalad> havenwood: on a low end machine yeah
* certainty &
jsilver-ipod has joined #ruby
jsilver-ipod has quit [Client Quit]
<AntelopeSalad> havenwood: they are ruby binaries that i'm detecting the presence of
<AntelopeSalad> gems to be precise
jsilver-ipod has joined #ruby
iamjarvo has quit [Ping timeout: 260 seconds]
pmlarocque has quit [Ping timeout: 245 seconds]
cout has joined #ruby
Kamilion has joined #ruby
pmlarocque has joined #ruby
x77686d has quit [Quit: x77686d]
shaunbaker has quit [Remote host closed the connection]
<shevy> lstrip is a standard ruby method?
iamjarvo has joined #ruby
<DouweM> shevy: probably
Bira has quit [Remote host closed the connection]
pwh has quit [Ping timeout: 245 seconds]
petey has quit [Remote host closed the connection]
<certainty> String defines #lstrip for example. Don't know if that's the one you want though
jonah_k has quit [Remote host closed the connection]
duggiefresh has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 260 seconds]
<jsilver> roger that lagweezle
petey has joined #ruby
<shevy> hmm
<lagweezle> jsilver: huhwhat?
bklane has joined #ruby
<shevy> as long as it only kills leading ' ' and leaves alone trailing ones, I am happy
<jsilver> lagweezle: about the test terms being vague
<jsilver> thanks for the info though
<jsilver> brb
yfeldblum has joined #ruby
<certainty> >> " foo ".lstrip
<eval-in> certainty => "foo " (https://eval.in/100976)
Lewix has joined #ruby
<jsilver> roger that means "affirmative" sry im sorta in the military sorta not
iamjarvo has quit [Ping timeout: 250 seconds]
zachallett has quit [Remote host closed the connection]
carif has joined #ruby
Lewix has quit [Remote host closed the connection]
mityaz has quit [Quit: See ya!]
pwh has joined #ruby
x77686d has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
<razrunelord> hey guys, I know that when .fetch is called on a hash, I can pass a default value in a block like eg: foo.fetch(:bar) {false}. Can we do something like that on objects?
Xeago_ has quit [Remote host closed the connection]
mark_locklear has quit [Read error: Operation timed out]
petey has quit [Ping timeout: 250 seconds]
chipotle_ has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
Sawbones has quit []
Guest17745 has quit [Quit: Textual IRC Client: www.textualapp.com]
timonv_ has quit [Remote host closed the connection]
<shevy> dont think so, objects dont have .fetch
yacks has quit [Read error: Operation timed out]
<DouweM> razrunelord: a default value if the method doesn't exist? or if the method's result is nil?
havenwood has quit [Remote host closed the connection]
<razrunelord> DouweM: yes, something liek that
<DouweM> razrunelord: they're very different, which are you looking for? :p
havenwood has joined #ruby
axl_ has quit [Remote host closed the connection]
jsilver-ipod has quit [Ping timeout: 265 seconds]
shabgard has joined #ruby
Megtastique has quit []
<razrunelord> basically DouweM, I am talking about active record objects. If foo's association object is nil, dont do a call to get foo's associations attribute
shabgard has quit [Changing host]
shabgard has joined #ruby
<razrunelord> DouweM: maybe I should ask it in the Ruby on Rails channel
<DouweM> razrunelord you should,but you're looking for .try()
siwica has quit [Ping timeout: 245 seconds]
petey has joined #ruby
mikecmpbll has joined #ruby
<DouweM> razrunelord: object.relation.try(:name) will either return the reltations name, or nil if relation is nil
<lagweezle> jsilver: AH! Absolutely, also. I just had no clue what it was in response to.
<razrunelord> DouweM: thanks man
firefly20131 has joined #ruby
firefly2013 has quit [Ping timeout: 246 seconds]
benzrf has joined #ruby
tjr9898 has quit [Remote host closed the connection]
<benzrf> hey yo
<benzrf> im tryna work out openid and this does not work right:
<benzrf> ^it prints nil on the confirm page
<benzrf> i checked the response and it looks like google is not sending a name o-o
kpshek has quit []
havenwood has quit [Ping timeout: 245 seconds]
axl_ has joined #ruby
jonah_k has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wildroman2 has quit [Read error: Connection reset by peer]
angusigu1ss has joined #ruby
gregf has quit [Quit: WeeChat 0.4.2]
centrx has joined #ruby
mando_ has joined #ruby
mocfive has joined #ruby
<jokke> hi
<benzrf> hello jokke
<benzrf> hows it goin
<jokke> following regex: /(?<!%)(%%)*%a/
mikepack has quit [Remote host closed the connection]
pmullin has left #ruby ["Textual IRC Client: www.textualapp.com"]
<benzrf> whoa
<benzrf> those look like literal percents to me
<benzrf> or do percent signs do something in regex?
joelbrewer has quit [Ping timeout: 272 seconds]
<jokke> this works the way i want but i only want the _last_ % to appear in my match
ktun_ has quit [Remote host closed the connection]
kidoz has joined #ruby
<benzrf> make it its own group and use that group
<jokke> i know that variable length lookbehinds aren't possible but maybe theres another way
<jokke> benzrf: it's for replacing
Lewix has joined #ruby
<jokke> and coffescript
<jokke> not ruby :)
vpretzel has quit [Remote host closed the connection]
<jokke> but i thought #ruby is where the clever guys are :)
<pontiki> pffft
<pontiki> lies
<jokke> :D
<pontiki> LIES
<xybre> Not when you're here ;)
<pontiki> benzrf is the only clever one
nanoyak has joined #ruby
vpretzel has joined #ruby
<benzrf> jokke: put the %%* in a positive lookahead
<benzrf> done B)
chrisseaton has quit []
<benzrf> (i assume)
<jokke> benzrf: aaah
<jokke> yeah
bogeyd6 has quit [Ping timeout: 245 seconds]
<benzrf> /(?<!%)(?=(%%)*)%a/
angusigu1ss has quit [Ping timeout: 265 seconds]
<benzrf> oh wait that doesnt work
<benzrf> ~_~
<jokke> nope
<jokke> :)
<benzrf> because the greedy lookbehind
<benzrf> dang u greedy look behind
<jokke> damn
<benzrf> mando_:
<benzrf> *man
<benzrf> ok, soluoin 2:
<benzrf> - replace with the matching (%%) group + the actual replacement
momomomomo has quit [Quit: momomomomo]
<jokke> yeaha
<jokke> *yeah
havenwood has joined #ruby
<jokke> that's the way to go i guess
compleatang has joined #ruby
sepp2k1 has joined #ruby
fedesilva has joined #ruby
whatasunnyday has joined #ruby
parzo has joined #ruby
razibog has quit [Ping timeout: 272 seconds]
nhhagen has quit [Remote host closed the connection]
Jonah11_ has joined #ruby
mikepack has joined #ruby
decoponio has quit [Quit: Leaving...]
<Jonah11_> why does this relatively simple regex take 2 mins to run? https://eval.in/100978
sepp2k has quit [Ping timeout: 265 seconds]
lethjakman has quit [Quit: WeeChat 0.4.0]
nhhagen has joined #ruby
sparrovv has joined #ruby
Jdubs has quit [Remote host closed the connection]
<DouweM> Jonah11_: because you have (....*)*
evilbug has quit [Quit: Leaving]
b00stfr3ak has quit [Read error: Operation timed out]
zoscoy has joined #ruby
werdnativ has joined #ruby
<slowcons> jhass: still having a little trouble figuring out how to pass these results to an array
parzo has quit [Ping timeout: 272 seconds]
cburyta has quit [Remote host closed the connection]
<Jonah11_> DouweM, someone posted this example to HN, it just seemed curious to me. apparently the same example runs in a tenth of a second on php's engine. that seems odd to me, as i generally expect ruby to be not much slower
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
cburyta has joined #ruby
hobodave has joined #ruby
<DouweM> Jonah11_: this, without the *)* runs in 0.036 secs: https://eval.in/100979
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
b00stfr3ak has joined #ruby
<DouweM> Jonah11_: I'm not even sure what (...*)* is supposed to do
jrhorn424 is now known as zz_jrhorn424
oz has joined #ruby
<jsilver> fuck my klout score
<jsilver> high: 40
<jsilver> low: 27
<Jonah11_> DouweM, I think it's trying to capture each piece of the path after the url, like "example.com/some/dir/structure"
<jsilver> so unfamous
<DouweM> Jonah11_: that makes sense, but in the case the regex is simply wrong
<Jonah11_> DouweM, yeah perhaps, but it still doesn't explain why ruby would choke on something php can handle?
havenwood has quit [Remote host closed the connection]
kidoz has quit [Quit: Ухожу я от вас]
<DouweM> Jonah11_: in regex terms, (...*)* is like an infinite loop. It's unhandlable, so I have no idea what PHP would even do with it
<Jonah11_> DouweM, original link, with java benchmarks as well: https://gist.github.com/salimane/8958411
Megtastique has joined #ruby
havenwood has joined #ruby
<DouweM> Jonah11_: that is my interpretation of the regex, anyway
tjsousa has joined #ruby
<DouweM> Jonah11_: I'm probably wrong, but to me that regex doesn't make sense
<Jonah11_> DouweM, ok thanks
<jhass> slowcons: I'm not sure how to help you further, I basically already gave you the pseudocode. maybe you should read another tutorial about rubys basics
timonv has joined #ruby
<DouweM> Jonah11_: which is also what python complains about in that gist
codezomb has joined #ruby
<DouweM> Jonah11_: PHP and Java probably catch that same exception and return false
<DouweM> Jonah11_: ruby gets into an infinite loop, apparently
matthalliday has joined #ruby
pranny has quit [Quit: Leaving.]
<codezomb> When using inheritance, is there a way for the parent class to get the child class file path? __FILE__ doesn't work.
matthalliday has quit [Client Quit]
<DouweM> codezomb: why'd you want that?
whatasunnyday has quit [Quit: whatasunnyday]
LookingForMopman has joined #ruby
<Jonah11_> DouweM, ruby does return eventually tho
<DouweM> Jonah11_: it does? I didn't check, just saw eval-in timed out
mansi has joined #ruby
LookingForMopman has left #ruby [#ruby]
<Jonah11_> DouweM, if you run it in irb or check out the orig link i posted you'll see it returns after about 2 mins
axsuul has joined #ruby
havenwood has quit [Ping timeout: 245 seconds]
<DouweM> Jonah11_: interesting, must be a limit inside Ruby or its regex engine. Either way, I remain convinced the regex itself is faulty
<Jonah11_> DouweM, maybe i will post to SO. i am pretty curious now
DrShoggoth has joined #ruby
jprovazn has joined #ruby
nhhagen has quit [Remote host closed the connection]
mjs2600 has quit [Remote host closed the connection]
<DouweM> Jonah11_: but you know regex, right? you understand how ([...]*)* wouldn't make sense?
<Jonah11_> DouweM, i could see it making sense if the inner was... whatever you call the opposite of greedy
wald0_ has joined #ruby
mjs2600 has joined #ruby
mjs2600 has quit [Read error: Connection reset by peer]
<jsilver> hey guys just so you know... WebDAV is pronounced "WebDave"
bean has joined #ruby
<jsilver> it's short for WebDAVID
mjs2600 has joined #ruby
axl_ has quit [Quit: axl_]
nomadic has quit [Ping timeout: 260 seconds]
<DouweM> Jonah11_: right, but even then, if the inner part "returned" because there was nothing else to catch, the * would just send us to the beginning of the capture group as well, where'd we still have nothing to catch, ad infinitum
<DouweM> Jonah11_: this makes more sense: (\/[\w \.-]*)*
<codezomb> DouweM: nvm, I actually found a better way to handle it, with less magic.
<DouweM> codezomb: :)
<DouweM> jsilver: lol
<jsilver> :D
vlad_starkov has joined #ruby
compleatang has quit [Remote host closed the connection]
palantir_ has joined #ruby
slashpipe is now known as epochslash
s2013 has quit [Ping timeout: 272 seconds]
<Jonah11_> DouweM, yeah yours makes more sense, but i'm not seeing your infinite loop argument. why woudn't a start applied to a no match just be a no match?
cburyta has quit [Ping timeout: 250 seconds]
<Jonah11_> star*
burlyscudd has quit [Quit: Leaving.]
<Jonah11_> as in splat
<DouweM> Jonah11_: yeah, that does make sense
whatasunnyday has joined #ruby
ktun has joined #ruby
_Andres has quit [Read error: Connection reset by peer]
pranny has joined #ruby
<DouweM> Jonah11_: I have no idea, it just stood out to me as weird. note that python raises an exception, so there's definitely something wrong with the regex.
<Jonah11_> DouweM, what is the exception?
nomadic has joined #ruby
<DouweM> Jonah11_: it's in the original link: https://gist.github.com/salimane/8958411
<DouweM> Jonah11_: "sre_constants.error: nothing to repeat"
<shevy> guys, it's the time of the day again
<shevy> get undressed!
<jhass> how do you know we're dressed?
<Jonah11_> DouweM, ok, my curiosity is satisfied then
<Jonah11_> weird regex is werid
<DouweM> I'm wearing a tux. It's after six. What am I, a farmer?
Hiall has quit [Ping timeout: 272 seconds]
<certainty> the problem is the ? .. it causes the engine to backtrack there, i wonder what oniguruma does ther
<certainty> shouldn't generally be a problem
<DouweM> certainty: the ? after \/ ? you sure?
<DouweM> certainty: removing the second asterisk fixes it
<certainty> DouweM: pretty sure
<DouweM> certainty: ([...]*)* seems like unspecified behavior to me, but you don't think that's it?
<benzrf> DouweM: 30rock-five
<DouweM> benzrf: :)
<benzrf> DouweM: you could say that certainty is...
* benzrf puts on glasses
<benzrf> certain
Noldorin has quit []
kpshek has joined #ruby
timonv has quit [Remote host closed the connection]
<benzrf> YEAAAHH
<DouweM> I can't but always laugh about those
<DouweM> *hel
<DouweM> p
<DouweM> I accidentally a word theree
<DouweM> damn, my typing has gotten bad
nomadic has quit [Ping timeout: 260 seconds]
tjbiddle has quit [Quit: tjbiddle]
<shevy> ruby question
<shevy> begin
<shevy> require 'something_that_may_not_exist'
<shevy> rescue; end
<shevy> versus
<shevy> the same, but this instead:
<shevy> rescue LoadError; end
burlyscudd has joined #ruby
<shevy> I used to think that the two are equal?
<DouweM> never catch everything
<DouweM> *rescue
<certainty> if you allow ? the match succeeds and you don't need to go back and maintain the choices. I'm currently reading up on this
snuffeluffegus has joined #ruby
<DouweM> be as specific as possible
<shevy> oh damn
jsaak has quit [Remote host closed the connection]
<DouweM> certainty: keep us posted
zachallett has joined #ruby
<shevy> yeah, I see that now
mansi has quit [Read error: Connection reset by peer]
<shevy> so the extra "LoadError" is vital information
<DouweM> shevy: yup
nomadic has joined #ruby
mansi has joined #ruby
<shevy> I learned that the hard way at work when I have to use a windows machine :(
<shevy> but now I am sure, thanks
<shevy> hey benzrf did you create any more gems?
tjr9898 has joined #ruby
tjr9898 has quit [Remote host closed the connection]
tjr9898 has joined #ruby
Hanmac has quit [Quit: Leaving.]
s2013 has joined #ruby
freezey has joined #ruby
kirun has joined #ruby
mforrester has quit [Quit: Leaving]
reset has joined #ruby
hukl has joined #ruby
benzrf has quit [Read error: No route to host]
FScottFitzgerald has joined #ruby
mneorr_ has joined #ruby
sparrovv has quit [Remote host closed the connection]
estebanrules has quit [Read error: No route to host]
pwh has quit [Ping timeout: 245 seconds]
nari has quit [Ping timeout: 245 seconds]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
rdark has quit [Quit: leaving]
mojo619 has joined #ruby
qrohlf has joined #ruby
pabloh has quit [Remote host closed the connection]
pwh has joined #ruby
iamjarvo has joined #ruby
qrohlf has quit [Client Quit]
chipotle_ has quit [Quit: cya]
sk87 has joined #ruby
kpshek has quit []
ukd1 has joined #ruby
momomomomo has joined #ruby
sk87 has quit [Client Quit]
mneorr_ has quit [Remote host closed the connection]
mojo619 has quit [Ping timeout: 260 seconds]
mneorr has joined #ruby
ephemerian has joined #ruby
mojo619 has joined #ruby
chipotle has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
obs has quit [Quit: Konversation terminated!]
vlad_starkov has joined #ruby
iamjarvo has quit [Ping timeout: 265 seconds]
kenneth has joined #ruby
dubsteph has quit [Ping timeout: 272 seconds]
dangerousdave has joined #ruby
mneorr has quit [Ping timeout: 250 seconds]
nhhagen has joined #ruby
<certainty> DouweM: i think you're right. I've just checked with CHICKEN scheme's irregex system. "Error: duplicate repetition (e.g. **) in pattern". .... that's an edge case.
vlad_starkov has quit [Ping timeout: 260 seconds]
mneorr has joined #ruby
kewubenduben has quit []
mary5030_ has quit [Read error: Connection reset by peer]
<DouweM> certainty: :)
mary5030 has joined #ruby
vlad_starkov has joined #ruby
<DouweM> certainty: strange that CHICKEN and Python raise an error while Ruby just runs for a long time and then returns false
arg0sy has quit [Ping timeout: 245 seconds]
<xybre> What raises an error?
nhhagen has quit []
<DouweM> xybre: Jonah11_ posted about the regex here: https://gist.github.com/salimane/8958411
<DouweM> xybre: runs for 2 minutes on Ruby, returns false immediately on PHP and Java, raises an error with Python and CHICKEN scheme
chipotle_ has joined #ruby
Jdubs has joined #ruby
angusigu1ss has joined #ruby
<xybre> DouweM: Hmm. PHP and Ruby are both using PCRE aren't they?
Xeago_ has joined #ruby
Sc0rp10n has joined #ruby
<DouweM> xybre: as in perl-compatible, mostly, but with its own ideosyncrasies
vlad_starkov has quit [Ping timeout: 260 seconds]
chipotle has quit [Ping timeout: 260 seconds]
carraroj has joined #ruby
wildroman2 has joined #ruby
Jdubs has quit [Remote host closed the connection]
<xybre> DouweM: No, I mean the libpcre itself.
kpshek has joined #ruby
<certainty> DouweM: yeah. CHICKEN detects the error during the compilation phase. I think python does the same. That's good as they wont choke on that particular somehow pathological regex
<certainty> xybre: mri uses oniguruma, don't know about the others
timonv has joined #ruby
<xybre> Ah yeah Oniguruma, I forgot about that.
<xybre> That would likely be the reason for the different behaviour then.
<DouweM> probably
claymore has quit [Ping timeout: 245 seconds]
angusigu1ss has quit [Ping timeout: 250 seconds]
Xeago_ has quit [Ping timeout: 260 seconds]
chipotle_ is now known as chipotle
gigetoo has quit [Remote host closed the connection]
claymore has joined #ruby
dik_dak has joined #ruby
yarou has joined #ruby
poulson has quit [Read error: Connection reset by peer]
shaunbaker has joined #ruby
pel_daniel has quit [Read error: Connection timed out]
vlad_starkov has joined #ruby
gigetoo has joined #ruby
parzo has joined #ruby
supergeek has joined #ruby
supergeek has quit [Max SendQ exceeded]
fedesilv_ has joined #ruby
supergeek has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
shaunbaker has quit [Remote host closed the connection]
fedesilva has quit [Ping timeout: 250 seconds]
<RubyPanther> it should run a long time
<RubyPanther> it is specially constructed to have to.
<centrx> >> sleep(200)
<eval-in> centrx => (https://eval.in/101004)
parzo has quit [Ping timeout: 245 seconds]
tyfighter has joined #ruby
beakr has joined #ruby
arianit has joined #ruby
supergeek has quit [Quit: Goodbye, cruel world.]
jonah_k has quit [Remote host closed the connection]
<DouweM> RubyPanther: right, but other languages detect its pointlessness and raise
zeade has joined #ruby
kewubenduben has joined #ruby
sergicles has quit [Quit: sergicles]
<RubyPanther> I'm not convinced that is correct. Maybe the programmer intended to be pointless?
einarj has joined #ruby
mikepack_ has joined #ruby
<RubyPanther> Maybe it is a simulation
<DouweM> RubyPanther: I have no idea where it's from, Jonah11_ found it
<xybre> It's not the language, its the library the language uses.
raphaelivan has joined #ruby
mocfive has quit [Remote host closed the connection]
burgess has joined #ruby
RichardRaseley has joined #ruby
mocfive has joined #ruby
<RubyPanther> In the old days Ruby didn't even have zero-width look-behind.
<DouweM> xybre: of course, but which is behavior is more "correct"?
weems has joined #ruby
lachesis has quit [Ping timeout: 264 seconds]
<RichardRaseley> I am having issues with Ruby's OptionParser. It tells me the option I defined in https://gist.github.com/richardraseley/c5445f37f581fb92a532 is an invalid option. It seems pretty straight forward - not sure where i went wrong...
Collin has quit [Ping timeout: 272 seconds]
trofk has joined #ruby
mikepack_ has quit [Ping timeout: 260 seconds]
<RichardRaseley> If anyone could provide some feedback it would be much appreciated.
cjk101010 has quit [Ping timeout: 245 seconds]
wildroman2 has quit [Remote host closed the connection]
mojjojo has joined #ruby
trofk has quit [Read error: Connection reset by peer]
<certainty> RichardRaseley: you didn't invoke the option parser
noop has quit [Ping timeout: 245 seconds]
geggam has quit [Remote host closed the connection]
mocfive has quit [Ping timeout: 265 seconds]
<RubyPanther> RichardRaseley: http://ruby-doc.org/stdlib-2.1.0/libdoc/optparse/rdoc/OptionParser.html also see "mandatory argument"
danshultz has joined #ruby
<RichardRaseley> @certainty - Yeah, I was fiddling with that. Even if I change my code to https://gist.github.com/richardraseley/e7a6ace5409a49955599 I get the same error.
geggam has joined #ruby
Jetchisel has joined #ruby
arianit has quit [Quit: Leaving]
vlad_starkov has quit [Remote host closed the connection]
<FScottFitzgerald> Hey, all. So I'm interviewing for a RoR bootcamp next week, and I'll need to be able to demonstrate my ability to solve word problems via ruby -- does anyone know where to find these kinds of word problems so I can get some extra practice?
nisstyre has joined #ruby
<centrx> RichardRaseley, Your change has nothing to do with mandatory vs optional argument
<centrx> ...
<RubyPanther> yeah but his option isn't a bool
<xybre> DouweM: Probably bailing out, unless that means the other libs miss things.
<RichardRaseley> centrx: But it shouldn't report it is invalid whether or not it is required or optional, right?
<momomomomo> FScottFitzgerald: Real world problems? Not too sure about that, you could do https://projecteuler.net/ or http://rubykoans.com/
rezzack has joined #ruby
<centrx> RichardRaseley, You should really show us the error message and what command line you ran to get it
<RichardRaseley> OK, one sec.
<centrx> RichardRaseley, And I notice you don't ever run #parse
moted has quit [Quit: moted]
havenwood has joined #ruby
axl_ has joined #ruby
jsilver-ipod has joined #ruby
jsilver-ipod has quit [Client Quit]
omegahm has joined #ruby
<RichardRaseley> OK, so creating the OptionParse.new is not enough, I have to ".parse!" at the "end" statement.
jsilver-ipod has joined #ruby
<RichardRaseley> Just learning this as I go...
<RichardRaseley> (apologies)
<momomomomo> ruby 1.8?
<jsilver-ipod> Hey baby
<jsilver-ipod> I'm on a mother fucking iPod
<jsilver-ipod> Sick
<bricker> :O
Bira has joined #ruby
<centrx> RichardRaseley, yes, parse or parse!
<jsilver-ipod> :D
<momomomomo> anyways RichardRaseley it's because your'e using a lower case c
<jsilver-ipod> Sent from my iPod
tyfighter has quit [Quit: tyfighter]
<momomomomo> to specify a config with sinatra, you must use -C
<RichardRaseley> momomomomo: This should be agnostic of sinatra.
<RichardRaseley> I am using optparse to load a yaml file. Unless '-c' is reserved somehow.
iamjarvo has joined #ruby
<havenwood> FScottFitzgerald: +1 project euler, seems that type of algorithmic question comes up a lot in interviews
<shevy> god I hate optparse
<certainty> i like it
<shevy> end.parse! ARGV
<havenwood> FScottFitzgerald: For fun might want to use job_interview gem >.> https://github.com/ruby-jokes/job_interview#readme
<shevy> how can you like this certainty
<certainty> dunno, i just do
<momomomomo> oh i'm sorry RichardRaseley I thought you were running a sinatra app due to the stack trace.
<certainty> i know getopt and that's worse
<havenwood> shevy: slop, cocaine or trollup ftw!
cjk101010 has joined #ruby
<shevy> yeah havenwood but I'd want one of them to replace the default! :(
<RichardRaseley> I am running a sinatra app, but that shouldn't have anything to do with optparse...
<certainty> it doesn't
<RichardRaseley> Or at least I am not seeing the relationship
<havenwood> shevy: there was an Issue opened for slop-like syntax in favor of optparse
epochslash is now known as someslash
<RichardRaseley> So, I've updated this gist (https://gist.github.com/richardraseley/bbbac61d5c9533fdc6ef) to show that even after adding end.parse! I am getting the invalid option error
<havenwood> shevy: i said that poorly, i mean deprecate optparse in favor of slip-like syntax
<RichardRaseley> (see first comment)
sailias has joined #ruby
freezey has quit [Remote host closed the connection]
<shevy> havenwood now that sounds much better, here you will see me cheering suddenly \o/
<havenwood> slop-like**
<FScottFitzgerald> havenwood: Thank you! Ruby jokes seems perfect :P
<RichardRaseley> Sorry - fixed the formatting in https://gist.github.com/richardraseley/bbbac61d5c9533fdc6ef
gregf has joined #ruby
<RichardRaseley> (first comment)
dkamioka_ has quit [Remote host closed the connection]
hukl_ has joined #ruby
<havenwood> FScottFitzgerald: correct tool for the job :P
<havenwood> >.
ocx has quit [Ping timeout: 245 seconds]
ultraflash3 has joined #ruby
<havenwood> FScottFitzgerald: though actually the knapsack isn't trivial, others are
iamjarvo has quit [Client Quit]
<certainty> RichardRaseley: have you checked the link that RubyPanther gave you? it's all in there
<slowcons> i found this really cool tool also, dont know if you guys use it already or have opinions. helps to visually grab css selectors, can just drop it right in your bookmarks bar. http://selectorgadget.com/
mocfive has joined #ruby
<shevy> wow
<shevy> havenwood: "RDoc and RubyGems both depend on OptionParser so it cannot be removed."
<havenwood> shevy: yup
<havenwood> shevy: but that can be changed
momomomomo has quit [Quit: momomomomo]
aspires has quit []
<havenwood> shevy: someone just has to bother to do it... (not it!!)
<bricker> nose goes
* bricker nose
<shevy> all I know is
<shevy> that I will not bother to use optparse
<havenwood> shevy: deprecate RDoc, fixes that part
<havenwood> shevy: :P
<certainty> shevy: what's so bad about it?
<shevy> also fine in my book to do away with rdoc
<RichardRaseley> certainty: Yes, I did look at it. Unfortunately there is too much extra code in the long example for me to figure out where I went wrong.
<RichardRaseley> certainty: Read as it isn't clear to me.
<havenwood> certainty: it is more verbose than necessary
<havenwood> certainty: and more complex
<certainty> RichardRaseley: you need to tell it that you want an argument there "--config=config-file"
chipotle_ has joined #ruby
<havenwood> certainty: slop, trollup and cocaine gems are all nicer DSLs
<shevy> certainty it is an underdocumented ugly piece of API crap. whoever came up with the idiocy to end.parse! ARGV must be sought out and eliminated in reallife before he could do more damage. Every time I want to use optparse, unlike many other projects in ruby, I have to lookup at the documentation to try and remember how to use the fucking shit like banner and flags and more of the crap it "offers!"
hukl has quit [Ping timeout: 260 seconds]
<havenwood> certainty: but they are easy to use gems, so most people just do that rather than use stdlib options
chipotle has quit [Ping timeout: 245 seconds]
<RichardRaseley> certainty: Ahhh. If I add it in the long version, is it implicit in the short version?
<shevy> OptionParser::OctalInteger guess what this does
<certainty> alright i don't know any of the alternatives you mentioned. I will check them out. Personally i never had problems with optparse
tjsousa has quit [Quit: Computer has gone to sleep.]
<RubyPanther> shevy: GetoptLong :) GNU options are the same everywhere
rob_ has quit [Quit: rob_]
<shevy> opts.separator('') <--- wheeeeee a super cool separator in optparse
<certainty> RichardRaseley: yes
nateberkopec has joined #ruby
<shevy> the thing with stdlib is that it is available without having to do anything extra
<shevy> that is a big plus
mjs2600 has quit []
CJD14 has joined #ruby
philcrissman has quit [Remote host closed the connection]
alvaro_o_ has joined #ruby
<havenwood> shevy: less important than it used to be though since RubyGems works so nicely
<RubyPanther> that is why stdlib includes a thin wrapper around gnu, and also a more modern option (optparse)
CJD14 has quit [Client Quit]
cpruitt has joined #ruby
<shevy> havenwood perhaps but if I write something then I can not 100% be sure that it can be installed
AlexRussia has joined #ruby
<shevy> for instance, on a debian system who knows how they modified ruby
<shevy> the server at work uses debian :)
<shevy> I can only connect to it via putty on a windows machine .......
claymore has quit [Quit: Leaving]
<havenwood> shevy: still, even with debian's janky setup can't you install and use gems?
claymore has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
stonevil has quit [Quit: Computer has gone to sleep.]
<shevy> with --user-install I can
nisstyre has quit [Ping timeout: 245 seconds]
lethjakman has joined #ruby
<havenwood> shevy: ah, no sudo?
DrShoggoth has quit [Ping timeout: 272 seconds]
<lethjakman> hey, is there a way to turn this "(555) 555-5555" into this "5555555555" ?
<shevy> haha they won't give me superpowers anywhere
Noldorin has joined #ruby
<havenwood> shevy: bastages...
<shevy> but I can at least connect to the main server, putty is actually quite ok, shell stuff works for the most part, and I can then use ruby 1.9.3 something
florentferry has joined #ruby
<shevy> once I have ruby I am happy
florentferry has quit [Client Quit]
<certainty> lethjakman: yes
sambao21 has joined #ruby
<havenwood> lethjakman: "(555) 555-5555".gsub /\D/, '' #=> "5555555555"
<shevy> lethjakman just delete it!
<shevy> oh wow
mojo619 has quit [Ping timeout: 250 seconds]
<shevy> \D is even cooler
<shevy> wow
<shevy> >> "555) 555-5555".delete ')- '
<eval-in> shevy => invalid range ")- " in string transliteration (ArgumentError) ... (https://eval.in/101005)
<RichardRaseley> certainty: There is obviously something I am still not getting here. Still getting the same "invalid option" (https://gist.github.com/richardraseley/a60db7ed8cc9ad4aeee9). The long example is so bloated (from my perspective) that it is hard for me to understand what is wrong.
<RichardRaseley> BRB
<shevy> >> "555) 555-5555".delete ' )-'
<eval-in> shevy => "5555555555" (https://eval.in/101006)
<shevy> hahahaha
nichtdiebohne has joined #ruby
DrShoggoth has joined #ruby
mojo619 has joined #ruby
freezey has joined #ruby
Hobogrammer has quit [Ping timeout: 245 seconds]
pfg has quit [Quit: Textual IRC Client: www.textualapp.com]
brycesenz has quit [Quit: Leaving]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
nisstyre has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
Sawbones has joined #ruby
gcds has joined #ruby
<razrunelord> >> obj = def foo; "Bar"; end
<eval-in> razrunelord => :foo (https://eval.in/101007)
<certainty> RichardRaseley: works here. see https://gist.github.com/certainty/3ce0787c2772da96ac7c
<gcds> Hello, could somebody explain my that means character ' ? ' mean in if equation like if text == ?\0 ?
whatasunnyday has quit [Quit: whatasunnyday]
hukl has joined #ruby
timonv has quit [Remote host closed the connection]
nisstyre has quit [Quit: WeeChat 0.4.3]
hearit has joined #ruby
timonv has joined #ruby
CJD14 has joined #ruby
burlyscudd has quit [Quit: Leaving.]
CJD14_ has joined #ruby
CJD14_ has quit [Client Quit]
mark_locklear has joined #ruby
vlad_starkov has joined #ruby
aspires has joined #ruby
trickyhero_ has joined #ruby
JasmeetQA has quit [Read error: Connection reset by peer]
hukl_ has quit [Ping timeout: 245 seconds]
ktun has quit [Remote host closed the connection]
<havenwood> gcds: that is a character literal
<shevy> it looks like a donut
<havenwood> gcds: like `'h'` is a string literal and `?h` is a character literal
<havenwood> putc ?x
<havenwood> >> putc ?x
<eval-in> havenwood => x"x" (https://eval.in/101009)
<gcds> oh ok thanks :)
platzhirsch1 has joined #ruby
jle` has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<platzhirsch1> This is why I love Ruby gems: Domainatrix "A cruel mistress that uses the public suffix domain list to dominate URLs by canonicalizing, finding the public suffix, and breaking them into their domain parts."
mneorr has quit [Remote host closed the connection]
mojjojo has quit [Quit: mojjojo]
<certainty> gcds: note that in ruby 1.8.x, it used to return the ascii numeric code for that character
mneorr has joined #ruby
<gcds> certainty: ok thanks :)
zB0hs has joined #ruby
jonah_k has joined #ruby
<RubyPanther> That's why perl.rb only runs in 1.8 :( http://stuff.rubypanther.com/perl.rb
vlad_starkov has quit [Ping timeout: 260 seconds]
danijoo has quit [Read error: Connection reset by peer]
bklane has quit [Remote host closed the connection]
Al___ has quit [Quit: Al___]
danijoo has joined #ruby
<platzhirsch1> RubyPanther: You have your old form back
<certainty> platzhirsch1: i never understood though why this gem works on URIs rather than domains
<RubyPanther> lol no that IS my old form
<platzhirsch1> yes
<certainty> where domain is just a string
mmoretti has joined #ruby
ocx has joined #ruby
<ocx> hi all , i am runing a bash script that reads the files from a directory and stores them in an array, after that work is done on each file at a time, now my issue is having the directory updated after the bash script executes, i end up with new files non processed, for this i thought of using a ruby script to call the bash script every second and work on the result in a seperate thread, this way i would have an updated array of file to wo
<platzhirsch1> certainty: Because you want to parse URIs?
mmoretti has quit [Remote host closed the connection]
zB0hs has quit [Client Quit]
<platzhirsch1> or I didn't get what you mean
thesheff17 has joined #ruby
<certainty> platzhirsch1: nope i don't. I want to parse domain names
<havenwood> >> !????!:??
<eval-in> havenwood => /tmp/execpad-142a881979db/source-142a881979db:2: warning: string literal in condition ... (https://eval.in/101010)
zB0hs has joined #ruby
zB0hs has quit [Max SendQ exceeded]
sambao21 has quit [Quit: Computer has gone to sleep.]
<havenwood> shevy: string literals with ternary condition for readable code
zB0hs has joined #ruby
kpshek has quit []
<havenwood> char literals*
<ocx> anyone ?
nichtdiebohne has quit [Quit: Linkinus - http://linkinus.com]
FScottFitzgerald has quit []
mneorr has quit [Ping timeout: 260 seconds]
Bira has quit [Remote host closed the connection]
<platzhirsch1> certainty: But that does it anyway, you can pass a complete domain name, too
Es0teric has quit [Ping timeout: 250 seconds]
<certainty> domain name as in rfc1035
<RubyPanther> ocx: get a better IRC client, you got cut off at: ...an updated array of file to wo
<havenwood> ocx: I'd probably use just bash or just ruby, but certainly ruby makes it easy and pleasant to shell out.
<certainty> platzhirsch1: you can? wait let me check
<ocx> havenwood: but mainly my strategy is fine? to use a thread to keep doing an ls on a directory updatding an array and another thread to do work on 1 element at a time?
hukl_ has joined #ruby
<havenwood> ocx: If you've got a lot to say, give us a link to a Gist! I don't know how much of what you said was cut off.
nichtdiebohne has joined #ruby
<havenwood> ocx: `Dir['*']` instead of ``ls``
<ocx> havenwood: hi all , i am runing a bash script that reads the files from a directory and stores them in an array, after that work is done on each file at a time, now my issue is having the directory updated after the bash script executes, i end up with new files non processed, for this i thought of using a ruby script to call the bash script every second and work on the result in a seperate thread, this way i would have an updated array of
art-solopov has quit [Quit: Konversation terminated!]
<ocx> awouch
<certainty> platzhirsch1: ok it works new. It didn't work a while back. And even now you see that it stuffed the domain into an URI with http-scheme.
<havenwood> >.>
predator217 has quit [Ping timeout: 260 seconds]
<ocx> feasible*
<certainty> s/new/now/
<havenwood> ocx: https://gist.github.com/
<platzhirsch1> certainty: what's the example?
<RubyPanther> ocx: it sounds like you should just use cron with the script you have already
<havenwood> ocx: irc doesn't allow that much text to be pasted
<RubyPanther> you could be done in under a minute
chipotle_ has quit [Read error: Connection reset by peer]
adamnbowen has joined #ruby
<certainty> platzhirsch1: Domainatrix.parse("example.com")
parzo has joined #ruby
eFeXeN has joined #ruby
Es0teric has joined #ruby
Sawbones has quit []
chipotle has joined #ruby
<havenwood> ocx: A nice Ruby gem for cronjobs is whenever: https://github.com/javan/whenever#readme
<ocx> RubyPanther: so mainly a crontab to run every minute update a variable that mainly looks for "ls in a directory" and another script to use that variable elements?
burgess has quit [Quit: ^zzz]
<platzhirsch1> certainty: It comes in handy for me, because I want to build a web crawler that stays on a certain domain, so I avoid regexp
<platzhirsch1> It's either that or querying a DNS
hearit has quit [Ping timeout: 272 seconds]
kpshek has joined #ruby
<certainty> platzhirsch1: yeah makes sense there. It stroke me as odd whan i used it in a program dealing with DNS where i needed to extract subdomains. I had to wrap my into into "http://my-domain.tld"
<RubyPanther> ocx: yeah, I would have a bash script that is run by cron that just pipes ls to xargs and then there is just one step where the work is done on one file at a time
hukl has quit [Ping timeout: 260 seconds]
jonah_k has quit [Remote host closed the connection]
aryaching_ has quit [Ping timeout: 272 seconds]
mando__ has joined #ruby
<RubyPanther> that way you never have a variable
<ocx> havenwood: like i have a find . -name etc... that returns many elements in a directory for instance file1,file2,file2, now i do some work on each element, in the meantime some file4 arrive, i need to add this file to the element list too next to file1,2,3 to be able to work on it too
<platzhirsch1> I am so excited, in March or so the .berlin domains will be released
ktun has joined #ruby
mocfive has quit [Remote host closed the connection]
<havenwood> ocx: simple tools, single responsibility, pipe all the things \o/
zz_jrhorn424 is now known as jrhorn424
platzhirsch1 is now known as platzhirsch
* platzhirsch roars…
<ocx> sorry?
<ocx> how would you do it
mocfive has joined #ruby
<certainty> same thing when i implemented a binding to denic's RRI
fandrade has joined #ruby
<RubyPanther> ocx: normally the most you would do is skip files already processed. For example by renaming them after processing
parzo has quit [Ping timeout: 245 seconds]
mclee has quit [Ping timeout: 245 seconds]
<RubyPanther> Then you can just run repeatedly and blindly
nhmood_ is now known as nhmood
<havenwood> ocx: In bash or ruby?
mclee has joined #ruby
<ocx> RubyPanther: this is what i am doing
mando_ has quit [Ping timeout: 245 seconds]
<ocx> but i mean i would overwrite by the cronjob the array storign the files?
<slowcons> still struggling with this. trying to pass the results of this block to a new array http://pastebin.com/xCAE2g74
skaflem has quit [Quit: Leaving]
shabgrd has joined #ruby
shabgrd has joined #ruby
shabgrd has quit [Changing host]
<zB0hs> rabl vs jbuilder? anyone have any preferences?
werdnativ has quit [Quit: werdnativ]
mando__ has quit [Ping timeout: 245 seconds]
shabgrd has quit [Client Quit]
sambao21 has joined #ruby
rootshift_ has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<RubyPanther> ocx: ls -1 /foo/bar/*.in | xargs -i{} stupid_worker --blah-blah='{}'
iMe is now known as iMe_away
<eFeXeN> Zb0hs, rabl with OJ
<RubyPanther> ocx: You shouldn't need an array anywhere
mocfive has quit [Ping timeout: 250 seconds]
<RubyPanther> unless you do, and then you have to do a bunch of other stuff, too
<RubyPanther> hopefully you can do ^ :)
Aryasam has joined #ruby
Hanmac has joined #ruby
shabgard has quit [Ping timeout: 265 seconds]
mary5030 has quit [Ping timeout: 245 seconds]
<ocx> RubyPanther: http://pastie.org/8727363
<havenwood> slowcons: Can you show example input and desired output? Like: #Input; `{aim: true}` #Output; `{"aim" => "true"}`
<ocx> this is my bash script that works but is not aware of the new files coming in into the direcotry
fandrade has quit []
mneorr has joined #ruby
<RubyPanther> for me find -exec is a PITA and I've never spent the time to learn its details because I can just pipe the filenames to xargs instead
<ocx> did you get what i mean?
fandrade has joined #ruby
<slowcons> havenwood: sure one sec
<havenwood> slowcons: Or I guess in this case, example of what `main_genre` is, what `link_cut` is, and what you want? (I think.)
<RubyPanther> but find -exec can surely do it. Dunno if that is right though.
<ocx> how can i map that command to work on updated dir? can i use ruby somehow?
fandrade has quit [Client Quit]
hukl has joined #ruby
jkamenik1 has quit [Quit: Leaving.]
rootshift_ has joined #ruby
fedexo has joined #ruby
lethjakman has quit [Ping timeout: 245 seconds]
<havenwood> ocx: If you're going to use Ruby I'd just start over in Ruby. If you're going to use bash the bashers are in #bash.
aryaching has joined #ruby
charliesome has joined #ruby
Aryasam has quit [Client Quit]
<ocx> havenwood: i was thinking of running bash from rby
predator117 has joined #ruby
<ocx> or if you guys can help me map that command into ruby dunno
<certainty> do some perl inbetween
<RubyPanther> ocx: your choices are to either do it one of the ways somebody suggested, or read all the manuals to learn how to do it whatever way you're choosing
jackneill has quit [Ping timeout: 250 seconds]
ktun has quit [Ping timeout: 250 seconds]
<ocx> what is the suggestion?
krisbulman is now known as [krisbulman]
mikepack has quit [Remote host closed the connection]
someperson has joined #ruby
lachesis has joined #ruby
ballPointPenguin has joined #ruby
<slowcons> havenwood: http://pastebin.com/66WrWtP8
hukl_ has quit [Ping timeout: 252 seconds]
werdnativ has joined #ruby
thesheff17 has quit [Read error: Connection reset by peer]
dapz has joined #ruby
dapz has quit [Max SendQ exceeded]
pranny has quit [Quit: Leaving.]
dapz has joined #ruby
vlad_starkov has joined #ruby
subbyyy_ has quit [Quit: none 0.4.2]
<havenwood> ocx: Either go with bash and take RubyPanther's suggestion and ask #bash. Or I'd suggest start with Ruby by looking at something like `Dir["/home/data/*.txt{t,tt,ttt}"]`: http://www.ruby-doc.org/core-2.1.0/Dir.html#method-c-glob
shredding has joined #ruby
<zB0hs> eFeXeN thanks
adamnbowen has quit [Remote host closed the connection]
<havenwood> ocx: glob patterns should do the trick for your file finding
mikepack has joined #ruby
thesheff17 has joined #ruby
kpshek has quit []
GinoMan has joined #ruby
<certainty> find is recursive though (unless you specify otherwise)
freezey has quit [Remote host closed the connection]
aryaching has quit []
pel_daniel has joined #ruby
pranny has joined #ruby
pel_daniel has quit [Max SendQ exceeded]
<slowcons> havenwood: ignore the main_genre part, that is sequel connecting to the db which isnt being used right now
<certainty> slowcons: if you want an arry you probably want to #map?
<havenwood> certainty: mm, maybe `require 'find'; Finx.find` then
<havenwood> ocx: I don't know what you need to accomplish with your dir structure, so either Dir#[] or Find#find or something.
sambao21 has quit [Quit: Computer has gone to sleep.]
<havenwood> ocx: Then `Queue` is in the stdlib or there are many gems that deal in this domain.
<slowcons> certainty: you mean something like ids = genreslink.map do |g_link|
tyfighter has joined #ruby
vlad_starkov has quit [Ping timeout: 250 seconds]
<certainty> slowcons: of course i'm only guessing. I don't know what genreslink is
dubsteph has joined #ruby
beakr has quit [Quit: beakr]
<ocx> havenwood: i have a directory with files in it, i would like to capture all the files that dont have a .gz with them in dir, for example: if i have file1.txt and file1.txt.gz dont capture it, if you have file2.txt alone , capture it
<slowcons> certainty: genrelink is an array
<certainty> slowcons: yeah if genreslink supports map. That's only half of it, you probably want to do something like [link_id,link_cut] at the end of the block
<certainty> slowcons: alright then it can map
<havenwood> slowcons: I meant show me what `link_id` returns as a value and what `link_cut` return, not how you built them.
TMM has joined #ruby
<havenwood> slowcons: link_id.zip link_cut
pmlarocque has quit [Quit: pmlarocque]
<havenwood> slowcons: I dunno, need an example of the return values of the input and example of expected return values of the output.
dodofxp has joined #ruby
mocfive has joined #ruby
<dodofxp> Hi. I wrote/am writing a lib in Java to handle JSON serialization into the Collection+JSON format. As an excercise I wanted to port it to ruby. What is the equivalent of 'reflection' or 'annotations' in Ruby or how would one 'introspect' an instance in ruby to get things like field names and such?
jonah_k has joined #ruby
miah_ is now known as miah
hukl_ has joined #ruby
<havenwood> Hanmac: haha, (really is addictive) was playing this one: https://github.com/ellisonleao/clumsy-bird
<certainty> ocx: find . -name '*[!.gz]'
<certainty> ah sorry
aagdbl has quit [Ping timeout: 245 seconds]
<certainty> i need to read the questions more carefully
<centrx> dodofxp, Ruby has ample reflection/metaprogramming capability. I do not know what these Java terms mean though.
hukl_ has quit [Client Quit]
top4o has joined #ruby
chipotle_ has joined #ruby
aryaching has joined #ruby
chipotle has quit [Ping timeout: 260 seconds]
<havenwood> dodofxp: I'd suggest cross posting in #jruby!
<centrx> dodofxp, Object#instance_variables might be what you mean by "field names"
<dodofxp> ah that sounds like it
<dodofxp> is #jruby a channel for 'Java converts'? n00bs coming from java?
burlyscudd has joined #ruby
aagdbl has joined #ruby
santiago has joined #ruby
santiago is now known as loc22
<havenwood> dodofxp: It the Ruby programming language on the JVM!
<havenwood> dodofxp: http://jruby.org/
<centrx> dodofxp, JRuby is a Ruby interpreter
<havenwood> It is*
beakr has joined #ruby
hukl has quit [Ping timeout: 260 seconds]
<RichardRaseley> certainty: I think maybe something else in my script is interfering with the parsing of arguments (perhaps Sinatra?). Because as you pointed out the code, in a vacuum, does work.
klaut has joined #ruby
<dodofxp> does it make sense to start there as a middle ground? I thought I take a project I already know and port it to not have to worry about 'domain knowlege' and really get into the language aspec
<dodofxp> *aspect
DrShoggoth has quit [Read error: Connection reset by peer]
Xuisce1 has joined #ruby
palantir_ has left #ruby [#ruby]
kpshek has joined #ruby
vlad_starkov has joined #ruby
<certainty> RichardRaseley: yeah, sounds likely
philcrissman has joined #ruby
Hobogrammer has joined #ruby
<ocx> so let me explain my problem, i have a directoryA with files A.txt , A.txt.gz , B.txt B.txt.gz , C.txt and D.txt, i need to find a way to retrieve all files like C.txt and D.txt that dont have any ,txt,gz so for instance i want to ignore A.txt and B.txt how can i do it in ruby
<shevy> dodofxp you wanna use java or you wanna use ruby
<havenwood> dodofxp: You can use Java from JRuby, or using Red Bridge you can use JRuby from Java. JRuby is excellent and has momentum.
mojjojo has joined #ruby
<dodofxp> I know Java and I want to get into Ruby
<Xuisce1> hi dodofxp
<shevy> ocx get everything first. Dir['*.txt'], next apply .reject on it to filter away what you dont need
<Xuisce1> yo shevy
<shevy> ocx in your case, reject based on A. and B. as matcher
kpshek has quit [Client Quit]
<centrx> dodofxp, I would use the standard Ruby MRI unless you have specific performance/concurrency needs
<shevy> hi Xuisce are you the MUD guy
<ocx> shevy: i have like 100 files its not only A and B
<centrx> dodofxp, I think he was recommending that the #jruby channel might have more people who know Java
<shevy> ocx ok but you need to have a matching criteria man
burlyscudd has quit [Ping timeout: 250 seconds]
<centrx> dodofxp, Thus: cross-post
<shevy> ocx the point is - formulate your matching criteria so that it can be translated into ruby code
<dodofxp> yeah that probably makes sense
Kricir has quit [Remote host closed the connection]
<havenwood> dodofxp: JRuby should give you access to the best of both worlds (except the slow startup time >.> PS. use the jruby-launcher gem to help with that: `gem install jruby-launcher`)
<dodofxp> I guess I'll approach it like any other 'project' and write some simple tests to get a feel for it. Thank you guys!!! :)
<Xuisce1> Im totally new to programming and learning Ruby by
klaut has quit [Ping timeout: 245 seconds]
msmith_ has quit [Remote host closed the connection]
<Xuisce1> or is there a better way?
<Xuisce1> Whats an easier way to learn Ruby guys?
<Xuisce1> :)
<ebwise> rubykoans
<ocx> shevy: my matching critiria in english is "exclude all files that do have in the same directory a samefilename.gz "
<eFeXeN> Xuisce1, if you haven't already started have a look at http://tryruby.org :)
<eFeXeN> Xuisce1, gives you a nice soft intro
<Xuisce1> thaks!
dodofxp has quit [Remote host closed the connection]
kcombs has quit [Remote host closed the connection]
beakr has quit [Quit: beakr]
omegahm has quit []
<havenwood> +1 tryruby.org
<havenwood> Xuisce1: Learn to Program by Chris Pine: http://it-ebooks.info/book/36/
<shevy> ocx ok good, now you have an objective criteria. the way I would write is is to write a method that acts as a filter, and that can return true or false
vlad_starkov has quit [Ping timeout: 265 seconds]
<Xuisce1> actually of
shaunbaker has joined #ruby
<havenwood> Xuisce1: ^ free ebook
<Xuisce1> I want something more textbook like
<shevy> oxc to check whether the same file exists, you can do: if File.exist? 'bla.gz'
<Xuisce1> ok
<shevy> def does_same_file_exist?(i); if File.exist? i; return false; else; return true; end; end
<Xuisce1> havenwood: is it about Ruby only ?
stonevil has joined #ruby
<havenwood> Xuisce1: The examples are all in Ruby or in a fictional subset of Ruby that the author imagines.
<havenwood> Xuisce1: But it is a primer for programming in general.
msmith_ has joined #ruby
<Xuisce1> well I want specific ruby
<havenwood> Xuisce1: There is a lot of overlap with tryruby.org.
<Xuisce1> :)
<Xuisce1> is there anything more Ruby ?
kpshek has joined #ruby
<Xuisce1> oh..
<havenwood> Xuisce1: It is Ruby.
<Xuisce1> well haven wood I want more textbook like stuff
<Xuisce1> ok
<Xuisce1> :)
<Xuisce1> so its really learn to program ruby?
<Xuisce1> :D
<certainty> ocx: be aware of the possible race conditions though. The file may have existed when you tested it, but it could be gone when you process the list of files later
<ocx> certainty: exactly!
<Xuisce1> what about learn Ruby the hwardway ?
<Xuisce1> hard way/
<havenwood> Xuisce1: It isn't idiomatic Ruby. The other books mentioned are.
Al___ has joined #ruby
jprovazn has quit [Quit: Odcházím]
<havenwood> Xuisce1: The hard way isn't the Ruby way.
omegahm has joined #ruby
<Xuisce1> huh?
xIzIv has quit [Ping timeout: 240 seconds]
jsilver-ipod has quit [Remote host closed the connection]
<Xuisce1> what do you mean :) ?
<RubyPanther> Xuisce1: _why's poignant guide to Ruby
msmith_ has quit [Read error: Connection reset by peer]
<slowcons> havenwood: input: http://snag.gy/OzhaW.jpg output:http://snag.gy/UuxQT.jpg code: http://pastebin.com/Bd7AatrU
<RubyPanther> is the easiest way, because it is fun.
msmith_ has joined #ruby
<Xuisce1> k
rjnienaber has joined #ruby
sambao21 has joined #ruby
<rjnienaber> is it possible to alias_method defined?
<havenwood> Xuisce1: Zed Shaw created a series of books about learning to code "The Hard Way". He picks a certain subset of programming and chooses it as his generic style. He then shows examples of that style in various languages. Some people just grok his style but one of the downsides is that his version of Ruby doesn't look like the Ruby in open source projects.
<Xuisce1> sorry
<Xuisce1> its too basic
<Xuisce1> oh
<Xuisce1> well then
<Xuisce1> havenwood: I'll use that website
<ocx> certainty: how can i treat the rac econdition
timonv has quit [Remote host closed the connection]
Xusice1 has joined #ruby
hukl has joined #ruby
<Xusice1> sorry this
<Xusice1> I'll use that
RichardRaseley has quit [Quit: Page closed]
<Xusice1> is that easy ?
<Xusice1> :)
<Xusice1> havenwood: ^
freezey has joined #ruby
<havenwood> Xusice1: Learn to Program is more basic. But sure, easy enough.
<Xusice1> havenwood: but should that be easy?
<b00stfr3ak> has any one used flog before?
<havenwood> Xusice1: In the normative sense?
lethjakman has joined #ruby
<certainty> RubyPanther: DouweM: i can imagine cases where not erroring out would make sense. For example regexes that have been generated by some algorithm (re on the regex question)
<Xusice1> yes
<Xusice1> havenwood: ?
Xuisce1 has quit [Ping timeout: 245 seconds]
bubu has joined #ruby
<Xusice1> :)
beakr has joined #ruby
bean has quit [Ping timeout: 260 seconds]
<certainty> ocx: locks, but i don't think it's feasable. The question is if it they really hurt you. Are they even likely to happen in the majority of cases
<ocx> certainty: i need a way to solvethis
<havenwood> Xusice1: With some meditation its content lies near not far. In that it is easy. Also it is free.
<certainty> and if they happen, what does it mean? just an exception that can be caught and you can go on?
<Xusice1> awesome havenwood
<Xusice1> thanks
sdwrage has quit [Quit: This computer has gone to sleep]
iamsean has joined #ruby
<certainty> anyway. wife is waiting for me and giving me that look. so i better stop for today
* certainty &
banister has joined #ruby
postmodern has joined #ruby
* centrx looks at certainty
Al___ has quit [Quit: Al___]
<shevy> come on, get the kisses
Hanmac has quit [Ping timeout: 265 seconds]
<slowcons> havenwood: that the info you were looking for?
mclee has quit [Ping timeout: 260 seconds]
tjr9898 has quit [Remote host closed the connection]
<havenwood> slowcons: yes, looks like it
hobodave has quit [Quit: Computer has gone to sleep.]
sdwrage has joined #ruby
<havenwood> slowcons: so `link_id` is a String that you parse into the `link_cut` Array which has one element, itself a String representing an Integer.
ktosiek has quit [Read error: Operation timed out]
chipotle has joined #ruby
chipotle_ has quit [Ping timeout: 260 seconds]
sdwrage has quit [Remote host closed the connection]
<rjnienaber> can you override an operator like defined? in ruby?
<havenwood> slowcons: And `genreslink` is an Array of Nokogiri::HTMLS.
<slowcons> havenwood: correct
bklane has joined #ruby
<slowcons> havenwood: yupp
bean has joined #ruby
mikepack_ has joined #ruby
<havenwood> slowcons: And you want to find the genrelink that corresponds to the `link_cut` Integer? Or something else?
<slowcons> havenwood: i want the output of each item in the block added to an array
<havenwood> slowcons: Or you want to add a new `genrelink`?
pranny has quit [Ping timeout: 272 seconds]
Shidash has quit [Quit: Leaving.]
<havenwood> slowcons: okay, so first convert `genrelink` into a generic Ruby object, like an Array of Hashes.
<slowcons> havenwood: so the array i will end up with will look like [10,15,155,32,43,88]
tjr9898 has joined #ruby
Shidash has joined #ruby
<jhass> rjnienaber: no, why would you?
<shevy> rjnienaber dont think you can overwrite defined?
dik_dak has quit [Quit: Leaving]
sdwrage has joined #ruby
<havenwood> slowcons: so convert `genrelink` into an Array of integers, then append your link_cut int.
mclee has joined #ruby
i_s_ has joined #ruby
<platzhirsch> Just thinking, how would I do concurrent processing in a web crawler? Plain old threads? It's not something for Resque or Sidekiq I reckon
Hanmac has joined #ruby
freggles has joined #ruby
oetjenj has joined #ruby
Oog has joined #ruby
shredding has quit [Quit: shredding]
hobodave has joined #ruby
cpruitt has quit [Quit: cpruitt]
clov3r has quit [Remote host closed the connection]
<havenwood> slowcons: `genrelink.map { |genre| genre.children.first.attributes.value ... CGI.parse ... URI.parse ...first.to_int}` to get your Array if Integers.
<Oog> anyone have experience with the mail gem (https://github.com/mikel/mail) ? trying to figure out how to get/set the mail from name - NOT the address - e.g., "John Doe" <jdoe@doe.com> - m.from return ["jdoe@doe.com"] how do i just change John Doe
<rjnienaber> i'm trying to get two badly written libraries to play nicely with each other
clov3r has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
<havenwood> slowcons: (and pluralize `genrelink` to `genrelinks`)
<jhass> platzhirsch: you could do it with something like sidekiq, each job inserting new jobs. The clear downside is the roundtrip through redis. The upside is that you could easily scale it and even distribute it across several machines
beakr has quit [Quit: beakr]
<rjnienaber> and the only why i can think of doing it without writing a heap of code is overriding defined? temporarily
<havenwood> slowcons: genre_links << link_cut.first.to_i
mikepack_ has quit [Ping timeout: 260 seconds]
parzo has joined #ruby
<platzhirsch> jhass: still a bit bloated I think, the crawler should stay in one domain anyway
<jhass> platzhirsch: but some threads and typhoeus hydra would be much faster I guess
<platzhirsch> ah right typhoeus and callback handler
raphaelivan has quit [Quit: Leaving.]
<havenwood> slowcons: So first massage your Nokogiri object into an Array of Integers. Then append your link Integer into the Array.
i_s has quit [Ping timeout: 250 seconds]
<havenwood> s/into/onto
<bubu> Hey guys I want to check is a dir that begins with ip exists in another dir. I'd think it is this but its not working. Dir.exists?("/opt/#{(/^ip/)}")
beakr has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
DrShoggoth has joined #ruby
<shevy> ip exists?
<bubu> shevy: yes
<shevy> your_dir = '/tmp/yo_man/'; puts 'It exists!' if Dir.exist? your_dir
<havenwood> bubu: I'd have expected: Dir.exists?('/opt/#{ip}")
<shevy> there. that works. if you want to use regex matches, you must use Dir[] first
mando_ has joined #ruby
<slowcons> havenwood: reading over it
<havenwood> bubu: oops, typo: Dir.exists?("/opt/#{ip}")
Jdubs has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
iamsean has quit [Quit: iamsean]
rm_ has joined #ruby
<bubu> shevy: havenwood: I want to check if a dir beginning with ip, is in opt.
echevemaster has quit [Read error: Connection reset by peer]
<shevy> bubu yes, I understand it. your syntax is totally wrong. you must first obtain a list of entries there, then apply further checks on it
<bubu> thus trying to use a reg exp
Shidash has quit [Ping timeout: 260 seconds]
thesheff17 has quit [Read error: Connection reset by peer]
echevemaster has joined #ruby
<shevy> "/opt/#{(/^ip/)}" does not make any sense, #{} wants a variable or method call, you give it a regex, that does not make sense
habanany has joined #ruby
<havenwood> bubu: Replace #exists? with #exist? since the former is deprecated in the latest stable Ruby.
clov3r has quit [Ping timeout: 272 seconds]
MattStratton has joined #ruby
<bubu> ah oki
parzo has quit [Ping timeout: 250 seconds]
intuxicated has joined #ruby
<bubu> I'd have thought that File.exists? "/opt/#{(/^ip/)}" would work o_0
mando_ has quit [Client Quit]
pranny has joined #ruby
<shevy> that can not work
<shevy> ruby does not understand what you are trying to convey here
<shevy> "#{(/^ip/)}"
<shevy> (/^ip/)
<shevy> I dont even know why you have the () there
<bubu> but thats a valid ruby regexp no?
<shevy> the /^ip/ would be a valid regex
<shevy> and () if you want group match into $1
sparrovv has joined #ruby
chrisseaton has joined #ruby
<centrx> bubbajones, Did you check that File.exist? supports regexes?
<bubu> ah no, fair point
yarou has quit [Remote host closed the connection]
<shevy> >> File.exist? /abc/
<eval-in> shevy => no implicit conversion of Regexp into String (TypeError) ... (https://eval.in/101022)
<bubu> ah oki, thanks guys. being stupid again
<shevy> get your entries via Dir[], then apply further checks on the result
<bubu> yup gotcha
<shevy> you can apply the regex filter you used above
shredding has joined #ruby
bklane has quit [Ping timeout: 265 seconds]
<shevy> but on the array result
<bubu> yup
nszceta has quit [Remote host closed the connection]
<shevy> Dir[] also does not accept regexes :\
pierre1_ has joined #ruby
<shevy> that one I wonder
araujo has joined #ruby
<shevy> Dir[/^abc/]
<shevy> would that be sensible to assume that entries starting with abc get matched into a result?
rjnienaber has quit [Quit: Lost terminal]
Spami has joined #ruby
<centrx> I think you have to use glob
<shevy> hmm
<havenwood> bubu: Dir['*'].grep(/^ip/).any?
nobitanobi has joined #ruby
<shevy> >> Dir.glob(/^abc/)
sdwrage has quit [Quit: This computer has gone to sleep]
<eval-in> shevy => no implicit conversion of Regexp into String (TypeError) ... (https://eval.in/101023)
agent_white has joined #ruby
<centrx> glob has a special patterns
<centrx> not regex
<shevy> huh
<jhass> why not Dir['/opt/#{ip}*'].any?
<agent_white> Good afternoon
<jhass> (er, double qoutes)
<centrx> Actually I guess yo ucan use them in Dir[] too
<jhass> and yes, please stop calling glob patterns regexps
<platzhirsch> When writing a gem, how do I require the library files from /lib in bin/gem_name properly?
LekeFly has joined #ruby
<jhass> platzhirsch: when installed gem should add your lib/ path to the load path, so you should be able to just require them
rootshift_ has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<havenwood> jhass: yeah, that seems simplest - a simple glob
dik_dak has joined #ruby
starfox21 has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
<Xusice1> thanks again havenwood
<havenwood> interpolate and glob versus glob and grep :P
<bricker> okay, I know this is a vague question, but here goes: If I install 2.1.0 on top of 1.9.3 while an application is running, and restart the application, will that cause any problems? I don't mean in the application code, I mean related to gem paths or the new ruby binary or passenger paths or anything like that.
asmodlol has joined #ruby
asmodlol has quit [Max SendQ exceeded]
mavcunha has quit [Quit: Computer has gone to sleep.]
<jhass> most likely
asmodlol has joined #ruby
<havenwood> bricker: by "on top of" you mean somewhere else along side, right? Or no?
<platzhirsch> jhass: Yeah, but I have to build it before and then install it. What's a solution when developing it, I don't want to go through these two steps all the time
<bricker> havenwood: sorry, that was unclear. I mean just flat-out replacing the existing binary
ktosiek has joined #ruby
<shevy> centrx quite unexpected to have // work elsewhere and Dir.glob treat them in regular string input
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mlpinit has joined #ruby
<bricker> I'm trying to update ruby without having to take the server offline at all
blackmesa has joined #ruby
beakr has quit [Quit: beakr]
<havenwood> bricker: you'll need to rebuild the gems with your new Ruby, and set env vars appropriately
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LekeFly has quit [Client Quit]
kindjal has joined #ruby
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
<DouweM> certainty: (Re: the regex thing) but wouldn't immediately returning nil be a suitable solution? The current 2 minute "loop" isn't very useful either
<jhass> bricker: 1.9 and 2.1 are ABI incompatible and since iirc passenger uses C extensions you'll run into troubles there already when you try to reuse the existing installation of it
dx7 has quit [Remote host closed the connection]
<havenwood> bricker: are you building Ruby yourself?
<DouweM> certainty: this seems to be PHP's and Java's behaviour
<centrx> shevy, It probably uses the shell to find the files, which has its own syntax
<bricker> havenwood: yeah]
<bricker> yeah
<shevy> hmm
_Andres has joined #ruby
DrShoggoth has quit [Read error: Connection reset by peer]
<bricker> jhass: thanks for the information. I think I'm just going to take this server out of the mix for a few minutes.
<jhass> platzhirsch: I tend to just do ruby -Ilib bin/foo or write a wrapper if that's too much type work and don't include that wrapper in the actual gem but only in the repo
<bricker> each server I mean
charliesome has joined #ruby
mojjojo has quit [Quit: mojjojo]
bthesorceror has quit [Remote host closed the connection]
<centrx> PHP is an abomination and a scourge on the face of the earth.
<platzhirsch> jhass: thanks, the only gem I wrote was last year and I forgot about that :)
<havenwood> bricker: I'd suggest using chruby, build your new version alongside and build the gems, then swap over cleanly.
dvarrui has joined #ruby
beakr has joined #ruby
bthesorceror has joined #ruby
<kyle__> Is there a z-ordering to prawn?
mojjojo has joined #ruby
<bricker> havenwood: I use it in development, nothing in production though
<bricker> I think eventually we may use it in production
<bricker> not today though
wsandin has left #ruby [#ruby]
<havenwood> bricker: seeing a lot of chef and puppet folks using it in production
mojo619 has quit [Ping timeout: 260 seconds]
<bricker> havenwood: yeah
axsuul has quit [Ping timeout: 265 seconds]
<havenwood> bricker: gem pristine --all
Oog has quit []
mando has joined #ruby
pranny has quit [Read error: Connection reset by peer]
aef has quit [Remote host closed the connection]
pranny has joined #ruby
<havenwood> bricker: also set `--env-shebang` in your .gemrc for reasons discussed here: https://github.com/postmodern/chruby/issues/163
clov3r has joined #ruby
deception has quit [Quit: Goodbye]
pranny1 has joined #ruby
mando is now known as Guest85750
Hobogrammer_ has joined #ruby
blandflakes has quit [Quit: Page closed]
<havenwood> though `--no-rdoc --no-ri` is now `--no-document`
mihirrege has joined #ruby
pranny1 has quit [Read error: Connection reset by peer]
pranny2 has joined #ruby
jbueza has joined #ruby
mando has joined #ruby
clamstar has quit [Quit: ZNC - http://znc.in]
heftig has joined #ruby
mihirrege has left #ruby [#ruby]
<havenwood> or just `-N`
<bricker> havenwood: nice, thanks
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
axsuul has joined #ruby
pranny2 has quit [Read error: Connection reset by peer]
pranny1 has joined #ruby
<havenwood> bricker: no prob - oh, and `-E` is alternative for `--env-shebang` as well
lkba has quit [Ping timeout: 245 seconds]
<havenwood> so `-N -E` for short and cryptic \o/
<havenwood> >.>
mojo619 has joined #ruby
burgess has joined #ruby
kirun has quit [Quit: Client exiting]
cpruitt has joined #ruby
pranny has quit [Ping timeout: 265 seconds]
Hobogrammer has quit [Ping timeout: 265 seconds]
<havenwood> `gem pristine --all` can only be shortened to `gem pr --all` :P
cschneid has quit [Ping timeout: 265 seconds]
bthesorceror has quit [Ping timeout: 260 seconds]
cpruitt has quit [Client Quit]
evilbug has joined #ruby
<havenwood> i like `gem i -g` for `gem install --file`
<shevy> wat
LookingForMopman has joined #ruby
iMe_away is now known as iMe
<havenwood> shevy: instead of `bundle`
<shevy> how does -g become --file
sambao21 has quit [Read error: Connection reset by peer]
mojo619 has quit [Read error: Connection reset by peer]
cout has quit [Ping timeout: 260 seconds]
LookingForMopman has left #ruby [#ruby]
<shevy> oh that reminds me
Jonah11_ has quit [Ping timeout: 245 seconds]
hukl_ has joined #ruby
koalallama has quit [Ping timeout: 260 seconds]
<shevy> can I install a different ruby installation into my home dir through gems + --user-install ?
<havenwood> shevy: just is!
Guest85750 has quit [Read error: Connection timed out]
<havenwood> shevy: "-g, --file [FILE] Read from a gem dependencies API file and install the listed gems"
<shevy> when I am not superuser (on windows)
<shevy> hmmm
<shevy> that boggles the mind how -g becomes --file
cout has joined #ruby
mlpinit has quit [Remote host closed the connection]
mando_ has joined #ruby
rmorello_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Jonah11_ has joined #ruby
SHyx0rmZ has joined #ruby
jlast has quit [Remote host closed the connection]
chipotle has quit [Ping timeout: 272 seconds]
<havenwood> shevy: g for `gem.deps.rb` or `Gemfile` and uhh file for file. >.>
dblessing has quit [Quit: dblessing]
chipotle has joined #ruby
koalallama has joined #ruby
cpruitt has joined #ruby
<havenwood> shevy: mmm hungry, off to lunch!
havenwood has quit [Remote host closed the connection]
<shevy> lol
stonevil has quit [Quit: Computer has gone to sleep.]
jlast has joined #ruby
kaldrenon has quit [Remote host closed the connection]
havenwood has joined #ruby
vlad_starkov has joined #ruby
hukl has quit [Ping timeout: 245 seconds]
kaldrenon has joined #ruby
cschneid has joined #ruby
sailias has quit [Quit: Leaving.]
bklane has joined #ruby
shredding has quit [Quit: shredding]
havenwood has quit [Ping timeout: 260 seconds]
xyzzyx has joined #ruby
mojjojo has quit [Quit: mojjojo]
vlad_starkov has quit [Ping timeout: 260 seconds]
kaldrenon has quit [Ping timeout: 245 seconds]
failshel_ has quit [Remote host closed the connection]
anshin has quit [Quit: WeeChat 0.4.2]
failshell has joined #ruby
petey has quit [Remote host closed the connection]
petey has joined #ruby
stonevil has joined #ruby
jhass is now known as jhass|off
tjr9898 has quit [Remote host closed the connection]
mando has quit [Remote host closed the connection]
jack_rabbit has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
lkba has joined #ruby
einarj has quit [Remote host closed the connection]
mehlah has joined #ruby
zachallett has quit [Remote host closed the connection]
cgore has quit [Remote host closed the connection]
einarj has joined #ruby
Shidash has joined #ruby
shaunbaker has quit [Remote host closed the connection]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
petey has quit [Ping timeout: 272 seconds]
gcds has quit [Ping timeout: 245 seconds]
mando_ has quit [Ping timeout: 272 seconds]
mary5030 has joined #ruby
Kricir has joined #ruby
JBreit has quit [Read error: Connection reset by peer]
cpruitt has quit [Quit: cpruitt]
einarj has quit [Read error: Operation timed out]
bamdad has joined #ruby
bamdad has quit [Client Quit]
cpruitt has joined #ruby
braincrash has joined #ruby
dapz has quit [Ping timeout: 272 seconds]
<platzhirsch> shevy: I have a Parteiauftrag for you.
<platzhirsch> You need to build a gem that monitors twitter.com/platzhirsch and sends me an e-mail if the nickname becomes available
<shevy> omg
<shevy> twitter
<shevy> why don't you ask me to just die
CaptainKnots has quit [Quit: bazinga!]
danman has quit [Quit: danman]
mojo619 has joined #ruby
CaptainKnots has joined #ruby
freezey has quit [Remote host closed the connection]
angusiguess has joined #ruby
<platzhirsch> This is not a drill.
DrShoggoth has joined #ruby
Fire-Dragon-DoL has joined #ruby
* Nilium pulls out a drill
<Nilium> Yes it is.
petey has joined #ruby
* shevy pulls out his "sledgehammer"
dvarrui has quit [Read error: Operation timed out]
<platzhirsch> Fight!
<shevy> make love, not war!
nichtdiebohne has quit [Quit: Linkinus - http://linkinus.com]
burgess has quit [Quit: ^zzz]
<Nilium> This world is made of peace and love.
<platzhirsch> Anyway, I will record that as desertion shevy. Stand at ease
jlast has quit [Remote host closed the connection]
DrShoggoth has quit [Read error: Connection reset by peer]
eFeXeN has quit []
loc22 has quit [Quit: Konversation terminated!]
<shevy> hey that is too harsh
<shevy> I am just on vacation as long as I have to work
jlast has joined #ruby
SilentHobo has joined #ruby
meatherl_ has quit [Remote host closed the connection]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
meatherly has joined #ruby
sdwrage has joined #ruby
kenneth has joined #ruby
Hiall has joined #ruby
Hobogrammer_ has quit [Ping timeout: 250 seconds]
SilentHobo is now known as Hobogrammer
dubsteph has quit [Ping timeout: 260 seconds]
mojjojo has joined #ruby
Kricir has quit [Remote host closed the connection]
meatherly has quit [Ping timeout: 250 seconds]
fayimora has quit [Ping timeout: 245 seconds]
beneggett has joined #ruby
fayimora has joined #ruby
mupkoo has quit [Remote host closed the connection]
silicong has joined #ruby
someperson has quit [Ping timeout: 245 seconds]
<RubyPanther> When twitter was fresh and young, before they spent $ on marketing and hype, before anybody even knew what it did... when somebody linked to it as a new site using rails... I said, it looks really pointless. And now looking back, I have to say, it looks like usenet through a trash compactor
phansch has quit [Quit: Leaving]
dr0ff has joined #ruby
DariusPHP has quit [Remote host closed the connection]
havenwood has joined #ruby
<platzhirsch> URI.parse("www.google.de").relative? => true, gnaaah
msmith_ has quit []
<RubyPanther> "reality TV" in text
dkamioka has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
havenwood has joined #ruby
<platzhirsch> > URI.parse("www.google.de").relative?
eFeXeN has joined #ruby
<platzhirsch> eval-in: wat
freggles has quit [Remote host closed the connection]
<platzhirsch> >> URI.parse("www.google.de").relative?
<eval-in> platzhirsch => uninitialized constant URI (NameError) ... (https://eval.in/101028)
ffranz has quit [Quit: Leaving]
gengis has joined #ruby
<platzhirsch> >> require 'open-uri'; URI.parse("www.google.de").relative?
<eval-in> platzhirsch => true (https://eval.in/101029)
mavcunha has joined #ruby
<gengis> is there a debbuger like python ipdb in ruby?
rubyracer has quit [Quit: Konversation terminated!]
<platzhirsch> gengis: pry!
ikaros has joined #ruby
rudisimo has quit []
habanany has quit [Ping timeout: 245 seconds]
<gengis> ok will try that, thanks platzhirsch
petey has quit []
<platzhirsch> It's a lot better than ipdb
shaunbaker has joined #ruby
mansi has quit [Quit: Leaving...]
ikaros has quit [Client Quit]
ikaros has joined #ruby
Al___ has joined #ruby
james_woods has quit [Remote host closed the connection]
JBreit has joined #ruby
ikaros has quit [Remote host closed the connection]
dr0ff has left #ruby [#ruby]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ikaros has joined #ruby
mikepack has quit [Remote host closed the connection]
sski has joined #ruby
mark_locklear has quit [Ping timeout: 250 seconds]
aryaching_ has joined #ruby
itadder has joined #ruby
freezey has joined #ruby
breakingthings has quit []
Xusice1 has quit [Ping timeout: 245 seconds]
<gengis> i see. can you explain in what way platzhirsch? just switching to ruby from python
<platzhirsch> gengis: no, but this talk will http://www.youtube.com/watch?v=D9j_Mf91M0I
omegahm is now known as omegahm^
<gengis> cool thx :)
aryaching has quit [Ping timeout: 260 seconds]
claymore has quit [Ping timeout: 260 seconds]
bubu has quit [Remote host closed the connection]
nycjv321 has joined #ruby
kenneth has joined #ruby
pranny1 has quit [Quit: Leaving.]
LuvLinuxOS has quit [Quit: Leaving]
charliesome has joined #ruby
mengu has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
mikepack has joined #ruby
Al___ has quit [Read error: Connection reset by peer]
Al___ has joined #ruby
jmau5 has joined #ruby
CaptainKnots has quit [Quit: bazinga!]
CaptainKnots has joined #ruby
mando_ has joined #ruby
pranny has joined #ruby
ikaros has quit [Quit: Ex-Chat]
freezey has quit [Read error: Operation timed out]
platzhirsch has left #ruby [#ruby]
platzhirsch has joined #ruby
mando_ has quit [Remote host closed the connection]
zoscoy has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
burlyscudd has joined #ruby
shaunbaker has quit [Remote host closed the connection]
rm_ has quit [Remote host closed the connection]
rm_ has joined #ruby
prc has joined #ruby
thams has quit [Quit: thams]
<platzhirsch> certainty: The PublicSuffix gem is maybe more suitable
jonah_k has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 265 seconds]
slowcons has left #ruby [#ruby]
jerius has quit [Ping timeout: 250 seconds]
slowcons has joined #ruby
whomp has joined #ruby
<whomp> how do i compute the sine of a number? i tried sin(2) but it doesn't work
thams has joined #ruby
xyzzyx has quit [Remote host closed the connection]
workmad3 has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<platzhirsch> whomp: Math.sin(2)
yfeldblum has quit [Remote host closed the connection]
yasushi has joined #ruby
yfeldblum has joined #ruby
Kricir has joined #ruby
lfox has quit [Quit: ZZZzzz…]
crus has joined #ruby
<whomp> thx
slowcons has quit []
pranny1 has joined #ruby
pranny has quit [Read error: Connection reset by peer]
batman has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
batman is now known as Guest34251
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pranny1 has quit [Read error: Connection reset by peer]
pranny has joined #ruby
Guest96010 has quit [Read error: Operation timed out]
Wolland has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 260 seconds]
habanany has joined #ruby
einarj has joined #ruby
s2013 has quit [Ping timeout: 260 seconds]
shaunbaker has joined #ruby
<workmad3> whomp: just remember to work in radians ;)
Vovko has quit []
timonv has joined #ruby
pranny has quit [Read error: Connection reset by peer]
silicong has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pranny has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dingus_khan has joined #ruby
jonno11 has joined #ruby
marr has quit [Ping timeout: 265 seconds]
vlad_starkov has joined #ruby
evilbug has quit [Quit: This computer has gone to sleep]
einarj has quit [Ping timeout: 245 seconds]
Zackio has quit [Ping timeout: 272 seconds]
hukl_ has quit [Quit: Leaving...]
ws2k3 has quit [Ping timeout: 245 seconds]
gr33n7007h has joined #ruby
timonv has quit [Ping timeout: 272 seconds]
ws2k3 has joined #ruby
jack_rabbit has quit [Quit: SIGSEGV (core dumped)]
dr0ff has joined #ruby
raphaelivan has joined #ruby
fgo has joined #ruby
eshy has quit [Quit: leaving]
snath has quit [Ping timeout: 245 seconds]
heftig has quit [Ping timeout: 245 seconds]
Aristata has joined #ruby
<Aristata> I have a model that is defining 'def as_json(some_args)' for the instances of a collection. I am returning @model_intances.to_json(some_args). My client has requested that the json also have the position of the instance in the json. How might I go about defining a Model.all.as_json_with_index(args) method?
Al___ has quit [Quit: Al___]
habanany has quit [Quit: Leaving.]
<Nilium> I wonder if there's a better way to handle wrapping a bunch of files in a module
eshy has joined #ruby
Zackio has joined #ruby
thams has quit [Read error: Connection reset by peer]
<Nilium> Maybe use prefixes instead of putting stuff in a big module.
<Nilium> But then I pollute the global namespace
jaxxstorm has quit [Ping timeout: 245 seconds]
Tomasso has joined #ruby
binaryhat has joined #ruby
dx7 has joined #ruby
jack_rabbit has joined #ruby
freezey has joined #ruby
heftig has joined #ruby
jaxxstorm has joined #ruby
maroloccio has joined #ruby
nvll has quit [Ping timeout: 245 seconds]
nvll has joined #ruby
jonah_k has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
tvw has joined #ruby
jaxxstorm has quit [Ping timeout: 245 seconds]
tobiasvl has quit [Ping timeout: 245 seconds]
tvl has joined #ruby
burlyscudd has quit [Quit: Leaving.]
tvl is now known as tobiasvl
Azure has quit [Read error: Connection reset by peer]
Jb___ has quit [Read error: Operation timed out]
carif has quit [Ping timeout: 265 seconds]
geggam has quit [Remote host closed the connection]
Azure has joined #ruby
hobodave has joined #ruby
Jb__ has joined #ruby
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
kpshek has quit []
habanany has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
patronus_ has joined #ruby
axl_ has quit [Quit: axl_]
patronus has quit [Ping timeout: 245 seconds]
gengis has quit [Remote host closed the connection]
benzrf has joined #ruby
<benzrf> hey, how do sessions work?
<benzrf> well no thats the wrong question
<workmad3> benzrf: I believe they work by a group of musicians coming together and just trying stuff out...
<benzrf> nvm
<itadder> hi
<benzrf> clap clap much humor
<itadder> LOL
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<itadder> oh codeschool.com is not free
sambao21 has joined #ruby
mneorr has quit [Remote host closed the connection]
ctp has joined #ruby
mneorr has joined #ruby
aloitius_ has joined #ruby
sdwrage has joined #ruby
v0n has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.2]
motto has quit [Quit: Sto andando via]
<pontiki> no
dingus_khan has quit [Read error: Connection reset by peer]
danijoo has quit [Read error: Connection reset by peer]
ktosiek has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
danijoo has joined #ruby
dingus_khan has joined #ruby
<aloitius_> Hey, all. I am still stuck on a bundler issue: "Bundler::GemspecError: Could not read gem at ~/whatever/ builder-3.2.2.gem. It may be corrupted." I've reinstalled using Radar's instructions, which have always worked in the past. I've got a brand new Ubuntu install and am getting the same error. I tried using rbenv but it seems to want to use bundler as well. And up till now for the past year, I've had NO trouble.
MyStartx has joined #ruby
<Radar> Radar has instructions to that.
<pontiki> hum, is that actually a space in the file path?
<Radar> aloitius_: what is the exact error?
mneorr has quit [Ping timeout: 272 seconds]
funburn has joined #ruby
failshell has quit [Remote host closed the connection]
<aloitius_> Radar: It's the message in quotes, only with "~/whatever/" filling in for my directory ("home/me/.rbenv (or .rvm)/" etc.)
Beoran_ has quit [Ping timeout: 250 seconds]
<aloitius_> Radar:Oh! And then it says:
vlad_starkov has quit [Ping timeout: 272 seconds]
<aloitius_> Radar: "An error occurred while installing builder (3.2.2), and Bundler cannot continue. Make sure that `gem install builder -v '3.2.2'` succeeds before bundling."
<Radar> aloitius_: You're failing to show me the exact error message, as I asked :)
dx7 has quit [Remote host closed the connection]
<Radar> aloitius_: This is slightly annoying.
carif has joined #ruby
wald0_ has quit [Ping timeout: 260 seconds]
<Radar> No replacing things with "whatever", ok? because the whatever part might be important.
<Radar> Show me exactly everything that you are seeing.
dx7 has joined #ruby
wald0 has quit [Ping timeout: 272 seconds]
<havenwood> My mind to your mind, my thoughts to your thoughts.
msmith_ has joined #ruby
<aloitius_> Radar: You want .rbenv or .rvm? (I currently have .rbenv installed.)
<Radar> aloitius_: exactly as it is broken now
<Radar> imo it's not a hard request ;(
aryaching has joined #ruby
<aloitius_> Radar: No, of course not. Here:
<aloitius_> Bundler::GemspecError: Could not read gem at /home/aloitius/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/cache/builder-3.2.2.gem. It may be corrupted. An error occurred while installing builder (3.2.2), and Bundler cannot continue. Make sure that `gem install builder -v '3.2.2'` succeeds before bundling.
<Radar> Thank you.
<havenwood> yup, cache
<Radar> And that's literally all the output that you have to share?
<Radar> aloitius_: !gist
<helpa> aloitius_: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
<Radar> Put the entire output ^ there please
dingus_khan has quit [Remote host closed the connection]
<Radar> aloitius_: rm /home/aloitius/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/cache/builder-3.2.2.gem
<Radar> then try again
dx7 has quit [Ping timeout: 250 seconds]
parzo has joined #ruby
trickyhero_ has quit [Ping timeout: 260 seconds]
ebwise has quit [Ping timeout: 265 seconds]
aryaching_ has quit [Ping timeout: 265 seconds]
<aloitius_> Radar: OK, deleted. Ran again. Identical errors.
<RubyPanther> aloitius_: rbenv: ruby: command not found lol
shaunbaker has quit [Remote host closed the connection]
<Radar> I have no idea how that could be happening then.
<RubyPanther> aloitius_: looks like you borked your .rbenv
<Radar> nuke it from orbit and start afresh
<RubyPanther> or mixed running as user and root
<aloitius_> Radar: I started by deleting the folder, then the entire cache, on-and-on until I actually wipe the entire machine.
<Radar> aloitius_: Just remove the entire ~/.rbenv directory and try again
<aloitius_> Radar: And got the exact same errors. So at least I'm consistent with whatever I'm screwing up.
<RubyPanther> wiping $HOME should be sufficient ;)
<pontiki> ease up, hey?
<havenwood> aloitius_: maybe time to chruby ;) https://github.com/postmodern/chruby#readme
<RubyPanther> rbenv isn't hard, I'm not sure switching is really the best learning experience compared to fixing it
axsuul has quit [Ping timeout: 250 seconds]
<aloitius_> Should I do .rbenv or .rvm? I'm more used to the latter.
<havenwood> RubyPanther: Plenty of other good things to do to learn other than battling shims. :P
whatasunnyday has joined #ruby
parzo has quit [Ping timeout: 250 seconds]
<RubyPanther> You should never, ever be battling the shims
<philcrissman> I like rvm, but I don't really have anything _against_ rbenv. I think rvm is easier to use.
Megtastique has quit []
<RubyPanther> rvm has a history of introducing features
_bob has joined #ruby
<RubyPanther> features == change. change == bad
batman has joined #ruby
batman is now known as Guest66066
<lagweezle> You sound like the folks in the core dev group from my job, 2 companies ago.
<RubyPanther> aloitius_: did you check which ruby and rbenv which ruby
<lagweezle> Mostly in that change is bad.
Beoran_ has joined #ruby
fedesilv_ has quit [Remote host closed the connection]
jmau5 has quit [Remote host closed the connection]
someword has quit [Quit: Leaving.]
<workmad3> you can't improve things without changing them
* workmad3 runs away
<RubyPanther> Change in the application is good. New features == better dog food. Change in the toolchain is bad, it means somebody else is spending your time for you.
<benzrf> RubyPanther: i demand that you admit that monads are niftylettuce_
<benzrf> *nifty
mary5030 has quit [Remote host closed the connection]
<aloitius_> RubyPanther: Oh, in case there was a stray ruby/rbenv lying around?
reactormonk has quit [Ping timeout: 265 seconds]
<RubyPanther> aloitius_: in case you didn't do the init stuff correctly :) or in case your shims are broken
<RubyPanther> you don't battle shims, you just make sure they give you the right ruby :)
<havenwood> >.>
Guest34251 has quit [Ping timeout: 260 seconds]
<aloitius_> RubyPanther: Switching between Ruby versions (whether in rvm or rbenv) hasn't seemed to be a problem.
<RubyPanther> aloitius_: when I see an error like: rbenv: ruby: command not found # I think you blew something up, or didn't finish installing eg rbenv rehash
mikepack has quit [Remote host closed the connection]
<lagweezle> I'm mostly kidding, but that same core dev group absolutely HATED git, and wanted to stay on their achingly slow svn repo as they were having trouble wrapping their minds around using git... even though the basic git operations are pretty damned simple.