apeiros changed the topic of #ruby to: Ruby 2.0.0-p353: http://ruby-lang.org (Ruby 1.9.3-p484) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
cosmicpanda has quit [Ping timeout: 272 seconds]
Faris has joined #ruby
dima__ has joined #ruby
jlast has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
flame_ has quit [Quit: Computer has gone to sleep.]
dima__ has quit [Read error: Operation timed out]
tahzeem has joined #ruby
mojjojo has joined #ruby
pushpak has quit [Quit: Linkinus - http://linkinus.com]
flame_ has joined #ruby
Landshark753 has joined #ruby
Landshark753 has quit [Max SendQ exceeded]
Landshark753 has joined #ruby
Landshark753 has quit [Max SendQ exceeded]
klaut has quit [Remote host closed the connection]
coca_rails has joined #ruby
pen has quit [Remote host closed the connection]
Landshark753 has joined #ruby
peneconleche is now known as peneconleche|awa
Kilo`Byte has quit [Quit: kilobyte22.de]
okinomo has joined #ruby
autumn has quit [Ping timeout: 246 seconds]
Kilo`Byte has joined #ruby
threesome has quit [Ping timeout: 260 seconds]
mmitchell has quit []
mikemac has quit [Ping timeout: 245 seconds]
Liothen has joined #ruby
ahawkins has joined #ruby
zombiebi_ has joined #ruby
autumn has joined #ruby
flubba has joined #ruby
zombiebit has quit [Ping timeout: 260 seconds]
bamdad has joined #ruby
mikemac has joined #ruby
bamdad has quit [Client Quit]
cj3kim has quit [Remote host closed the connection]
rickruby has quit [Remote host closed the connection]
<shevy> mgberlin yeah. several ways. you could ask drbrain on #rubygems or #ruby-lang - he tries to ensure that the quality gets better
<shevy> mgberlin another way is to file an issue at the https://bugs.ruby-lang.org/ site, just showing where the error is. someone else will most likely make a patch then
aryaching has joined #ruby
<mgberlin> will do, thanks
VTLob has quit [Quit: VTLob]
maletor has joined #ruby
havenwood has joined #ruby
phipes has quit [Remote host closed the connection]
landon__ has joined #ruby
afhammad has quit [Remote host closed the connection]
phipes has joined #ruby
eka has joined #ruby
ChristianMarks has joined #ruby
ChristianMarks has left #ruby [#ruby]
okinomo has quit [Ping timeout: 265 seconds]
afhammad has joined #ruby
ebobby has quit [Ping timeout: 260 seconds]
RoryHughes has quit []
sailias has joined #ruby
rjhunter has joined #ruby
mzdravkov has left #ruby [#ruby]
autumn has quit [Ping timeout: 245 seconds]
waxjar_ has quit [Ping timeout: 252 seconds]
waxjar has joined #ruby
mojjojo has quit [Quit: mojjojo]
Xiti has joined #ruby
autumn has joined #ruby
RoryHughes has joined #ruby
<sts> apeiros: thank you
pen has joined #ruby
<apeiros> sts: ah, forgot the passing on example:
<apeiros> class Foo; def each(&block); @internal_datastructure.each(&block); end; end
Asher has joined #ruby
pen has quit [Read error: Connection reset by peer]
pen has joined #ruby
aspires has quit []
kcombs has joined #ruby
mojjojo has joined #ruby
bogeyd6 has quit [Ping timeout: 245 seconds]
nisstyre has joined #ruby
bogeyd6 has joined #ruby
mojjojo has quit [Client Quit]
bogeyd6 has quit [Read error: Connection reset by peer]
pen has quit [Ping timeout: 272 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
mikeric has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
predator117 has joined #ruby
mklappstuhl has joined #ruby
robustus has quit [Ping timeout: 252 seconds]
serp` has joined #ruby
predator217 has quit [Ping timeout: 252 seconds]
pagioss has quit [Excess Flood]
eka has quit [Quit: Computer has gone to sleep.]
robustus has joined #ruby
pagioss has joined #ruby
mklappstuhl has quit [Ping timeout: 245 seconds]
emocakes has joined #ruby
nowthatsamatt has joined #ruby
ebobby has joined #ruby
benzrf has joined #ruby
croaky has quit [Ping timeout: 252 seconds]
<benzrf> hi, i previously asked for constructive criticism on my code but then declined to share it because the guy who had me write it might not have wanted it publicly available
<benzrf> DouweM: you offered to look at it right ?
tylersmith has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
timonv has joined #ruby
<apeiros> benzrf: so you can share the code now?
z has joined #ruby
<benzrf> yeah
habanany has joined #ruby
_zxq9_ has quit [Quit: Konversation terminated!]
<benzrf> http://benzrf.com/border_wars.rb <- a minecraft server plugin using a jruby + extra api plugin
zxq9 has joined #ruby
LexicalScope has joined #ruby
ebobby has quit [Ping timeout: 272 seconds]
geggam has quit [Ping timeout: 272 seconds]
psyl0n has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 245 seconds]
psyl0n has joined #ruby
yshh has joined #ruby
coca_rails has quit [Remote host closed the connection]
afhammad has quit [Remote host closed the connection]
lyanchih has joined #ruby
afhammad has joined #ruby
larissa has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
afhammad has quit [Ping timeout: 252 seconds]
tkuchiki has joined #ruby
marr has quit [Ping timeout: 272 seconds]
totalmajor has joined #ruby
ewnd9 has joined #ruby
croaky has joined #ruby
banghouse has joined #ruby
banghouse is now known as Guest22909
estebistec has quit [Remote host closed the connection]
totalmajor has quit [Remote host closed the connection]
Faris has quit [Ping timeout: 245 seconds]
mneorr has joined #ruby
Guest22909 has quit [Ping timeout: 272 seconds]
threesome has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
<benzrf> any comments?
mdpatrick has quit [Quit: No Ping reply in 180 seconds.]
vongrippen has quit [Quit: No Ping reply in 180 seconds.]
sailias has quit [Quit: Leaving.]
sailias1 has joined #ruby
sailias1 is now known as sailias
<shevy> yeah
<shevy> can you use a pastie
<shevy> I must download this
falood has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
tkuchiki has quit [Remote host closed the connection]
<Jamo> lets see
<shevy> what is that? org.bukkit.Location.new
tkuchiki has joined #ruby
<benzrf> jruby
<benzrf> its part of the bukkit api
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
iliketurtles has joined #ruby
Faris has joined #ruby
iliketurtles has quit [Excess Flood]
yshh has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 245 seconds]
serp` has quit [Quit: serp`]
butblack has joined #ruby
Kricir has joined #ruby
afhammad has joined #ruby
ambushsabre has quit [Quit: rip]
ambushsabre has joined #ruby
fschuindt has joined #ruby
LexicalScope has quit [Ping timeout: 265 seconds]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yshh has joined #ruby
<benzrf> well?
<benzrf> verdict?
<benzrf> :|
totalmajor has joined #ruby
Seich has joined #ruby
<apeiros> sry, too sleepy
<apeiros> looks quite good on a cursory glance
<apeiros> @ benzrf
<shevy> dunno
<shevy> I have no idea what this mysterious jruby thing does so I can't pass verdict on it
<Rennex> looks pretty clean to me
phipes has quit [Remote host closed the connection]
estebistec has joined #ruby
<benzrf> woot
<benzrf> shevy: jruby is a ruby impl in java
dayepa has quit [Quit: dayepa]
<benzrf> which can interface with java classes and objects
<shevy> that sounds scary
<benzrf> it is
<benzrf> minecraft and its server are written in java, so bukkit is written in java (bukkit is a wrapper around minecraft's server that adds a nice api for plugins)
<benzrf> so to write a minecraft plugin in ruby, you need to be able to interface with ajva
<benzrf> *java
<benzrf> hence, the code has to run on jruby
<benzrf> *to write a bukkit plugin
<shevy> hmmm
<shevy> beautiful beautiful java
psyprus has quit [Read error: Connection reset by peer]
kitak has joined #ruby
psyprus has joined #ruby
Guedes0 has quit [Ping timeout: 245 seconds]
flubba has quit [Read error: Connection reset by peer]
LexicalScope has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
<JustinAiken> jruby :)
bricker`LA has joined #ruby
flubba has joined #ruby
<shevy> well it has "ruby" in its name so that makes it prettier
<benzrf> jruby has some nice bits
<benzrf> it does name conversion for one
<benzrf> so if a java class defines the methods 'getFoo' and 'setFoo', the ruby object that you cna use will have those but also 'foo' and 'foo='
<benzrf> as aliases
<shevy> hmmmm
<benzrf> isFoo will be translated to foo?
<benzrf> and camelCase is translated to snake_case in general
ebobby has joined #ruby
ewnd9 has quit [Ping timeout: 260 seconds]
Seich has quit [Ping timeout: 246 seconds]
<shevy> omg
<benzrf> wha
<shevy> this makes me sad benzrf
yshh has quit [Remote host closed the connection]
fschuindt has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> all the poor people who have to stare at
<shevy> SetFoo
Sawbones has joined #ruby
<shevy> QueryBar
<shevy> and the millions of line with "public"
<benzrf> no thats c# case
<shevy> hehe
<benzrf> java uses PascalCase for classes but camelCase for methods
Seich has joined #ruby
<benzrf> while c# uses PascalCase for both
<shevy> class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); } }
<benzrf> ew
<benzrf> haskell's hello world is 'main = putStrLn "Hello World!"
<benzrf> ignore that apostrophe
ebobby has quit [Ping timeout: 264 seconds]
<benzrf> haskell uses camelCase unfortunately
<benzrf> python uses the same case conventions as ruby
<shevy> hmm
<shevy> putStrLn is rather excessive
<benzrf> i.e. PascalCase for class names, snake_case for everything else
<benzrf> shevy: what do you prefer then?
<shevy> snake_case for methods
<benzrf> haskell doesnt have methods
<benzrf> well
<benzrf> it sort of does
Sawbones has quit [Remote host closed the connection]
<benzrf> but they aren't members, exactly
<shevy> class names is a bit harder... because I think classes that are like FooBarBlaBle are rather annoying
<benzrf> more like multiple-dispatch functions
Sawbones has joined #ruby
<shevy> well ok see
dayepa has joined #ruby
<shevy> I'd rather try and learn haskell than java
<benzrf> haskell does have print
<benzrf> but it's the equivalent of p
<benzrf> not print
<shevy> what is p in haskell?
<benzrf> print
<benzrf> wait, hm?
<shevy> wat
<benzrf> haskell has putStr, putStrLn, and print
kitak has quit [Read error: Connection reset by peer]
phipes has joined #ruby
<shevy> k
kitak_ has joined #ruby
<benzrf> which are the same as print, puts, and p
<shevy> bit long
<benzrf> in that order
phipes has quit [Remote host closed the connection]
<benzrf> yeah
<benzrf> haskell tends to be a little verbose in its naming sometimes
<benzrf> otoh it tends to be v concise in many other ways
<shevy> main = p "Hello World!"
<shevy> would this work
<benzrf> no, haskell doesnt have p
<benzrf> you could do 'p = putStrLn' though
<shevy> ah yes
<shevy> now I remember you said that
<benzrf> and since you can define any operator you like, that lets you do some nice stuff
<benzrf> i.e.
<benzrf> _1 .~ "foo"
<benzrf> ^that returns a function that replaces the first element in a tuple with "foo"
AlSquire has quit [Quit: This computer has gone to sleep]
<benzrf> if you have imported Control.Lens
<benzrf> btw an awesome person made do-notation in ruby
<benzrf> which is amazing
<benzrf> not sure how useful itd be though
<shevy> I dont even know what do-notations are
<benzrf> do-notation is a haskell syntactial sugar
<shevy> I am like a farmer who sometimes goes to sit in front of a computer and does simple ruby scripts
<benzrf> haskell has monads which can be used to sequence computations like in imperative programming
<shevy> oh
<shevy> monads
randomnick_ has quit [Quit: Leaving]
<shevy> I understood it so far that monads are truly awesome and wonderful yet elusive
<benzrf> so it has a special syntax that lets you leave out certain repetetive bits write code with monads
<benzrf> monads are like variables
<benzrf> they are fairly simple but may be tricky to grasp at first sight
<benzrf> and useful in a number of ways
<benzrf> maybe more like objects in that regard
emocakes has quit [Quit: Leaving...]
TomRone has quit [Ping timeout: 240 seconds]
<benzrf> anyway monads are actually really not that complicated
mercwithamouth has joined #ruby
afhammad has quit [Read error: No route to host]
<benzrf> but you would not understand what is useful about them unless you know some haskell
afhammad has joined #ruby
<shevy> yeah, it's like smoking a joint
<benzrf> the basic idea is that given a type that contains values of another type, like a list or something
<shevy> as long as you didn't, you won't understand why people smoke them
<benzrf> if you have a bunch of functions that take a value of type a and return a value that wraps a value of type a
<benzrf> you can define a way to stick functions like that together
zz_CripperZ has quit [Quit: ZNC - http://znc.sourceforge.net]
<benzrf> so like if your wrapped type is 'maybe', where values of type maybe can be a value or they can be Nothing, then to chain functions that take a value and give you a maybe, just stop running the chain if one returns a maybe and otherwise feed the result along
<benzrf> *returns a nothing
TomRone has joined #ruby
<benzrf> in ruby that might look something like:
<benzrf> class Object
<benzrf> def bind
<benzrf> if self.nil?
<benzrf> nil
<benzrf> else
<benzrf> yield self
<benzrf> end
vpretzel has joined #ruby
<benzrf> end
<benzrf> end
<benzrf> now you can do this:
w4y has quit [Ping timeout: 246 seconds]
<benzrf> 3.bind {|n| n + 2}.bind {|n| n / 2}.bind {|n| nil}.bind {|n| n + 1}
zz_CripperZ has joined #ruby
<benzrf> in haskell that would look like:
maletor has quit [Quit: Computer has gone to sleep.]
Hanmac has joined #ruby
<benzrf> Just 3 >>= \n -> Just n + 2 >>= \n -> Just n / 2 >>= \n -> Nothing >>= \n -> Just n + 1
Hanmac1 has quit [Ping timeout: 264 seconds]
mneorr has quit [Remote host closed the connection]
<shevy> well
sensen has joined #ruby
<jle`> parentheses, but i'll let it pass
<shevy> your ruby code scares me as well ;)
<benzrf> :P
afhammad has quit [Ping timeout: 272 seconds]
mneorr has joined #ruby
yshh has joined #ruby
<jle`> shevy: basically it prevents you from accidentally doing something to a nil
estebistec has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
<jle`> normally you would do the .nil? checking yourself, on every method
<jle`> but bind handles the nil checking for you
estebistec has joined #ruby
<jle`> so it'll evaluate the block *only if* the value isn't nil already
tahzeem has quit [Ping timeout: 240 seconds]
<jle`> if it's already nil, it leaves it alone
<benzrf> except that in haskell, a value that can be something or that can be nothing has to be of type Maybe <something>
<benzrf> a value of type Int cant be nothing
<shevy> oh man
<benzrf> it can only be an int
<shevy> I am gonna break those nils down
<benzrf> so nil cant run around like in rubt
<benzrf> *ruby
<benzrf> unless you specify that your function can take Nothings, youll get a type error at compiling if you try to give it one
<benzrf> which is nice
<jle`> return 3 >>= return . (+2) >>= return . (/2) >>= return . const Nothing >>= return . (+1)
<jle`> is slightly more clear on what's going on
<benzrf> yes but people think return is doing something different from what it is doing
maletor has joined #ruby
<benzrf> should rly be called unit
<benzrf> or pure
Kricir has quit [Remote host closed the connection]
<jle`> well in this case, it is analogous to ruby's "return"/"next" ^.^
mneorr has quit [Ping timeout: 245 seconds]
<benzrf> hmmmmm ish
Kricir has joined #ruby
emocakes has joined #ruby
<jle`> if you squint, you can almost imagine doing a ctrl+f
samsonasu has quit [Quit: samsonasu]
<jle`> well. the currying gets in the way admittedly.
<jle`> maybe lambdas are more similar.
<jle`> { |n| next n+2 }
<jle`> \n -> return (n+2)
<jle`> come on it's basically the same thing :)
<benzrf> it really really isnt
<benzrf> because taking out the next changes nothing
<jle`> well because in ruby there is an implicit next
<benzrf> there is in haskell too
<benzrf> the next aborts execution and gives back a value
<benzrf> return turns a plain value into a monadic one
<benzrf> they are nothing alike
<jle`> well...it's not the same thing. but i was trying to maybe make things as lexically similar as possible
<benzrf> ok, but semantics are generally more important than syntax
<benzrf> ;p
kitak_ has quit [Remote host closed the connection]
<benzrf> lexically similar is BAD if the semantics arent similar
<benzrf> causes confusion
ahawkins has quit [Ping timeout: 252 seconds]
<jle`> but i like waving my hands :/
<benzrf> hah
Sawbones has quit [Remote host closed the connection]
Sawbones has joined #ruby
Kricir has quit [Ping timeout: 272 seconds]
Landshark753 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mercwithamouth has quit [Ping timeout: 252 seconds]
agent_white has quit [Quit: leaving]
mneorr has joined #ruby
mneorr_ has joined #ruby
Sawbones has quit [Ping timeout: 264 seconds]
Sawbones has joined #ruby
serp` has joined #ruby
mneorr has quit [Read error: No buffer space available]
Nahra has quit [Ping timeout: 245 seconds]
predator117 has quit [Ping timeout: 240 seconds]
Sawbones has quit [Remote host closed the connection]
clarknoah has joined #ruby
Nahra has joined #ruby
Sawbones has joined #ruby
Inoperable has quit [Ping timeout: 272 seconds]
predator117 has joined #ruby
Inoperable has joined #ruby
guardianx_ has joined #ruby
mikeric has quit []
Sawbones_ has joined #ruby
Sawbones has quit [Read error: Connection reset by peer]
Seich has quit [Ping timeout: 240 seconds]
ambushsabre has quit [Quit: rip]
Sawbones_ has quit [Remote host closed the connection]
benzrf has quit [Quit: fzzz]
pen has joined #ruby
Sawbones has joined #ruby
RoryHughes has quit []
Seich has joined #ruby
abramovic has joined #ruby
larissa has quit [Quit: Leaving]
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
mneorr_ has quit [Remote host closed the connection]
pen has quit [Ping timeout: 245 seconds]
Sawbones has quit [Ping timeout: 272 seconds]
phipes has joined #ruby
mneorr has joined #ruby
weirdpercent has joined #ruby
<weirdpercent> I have a list of URLs to forum posts and I want to chop off all characters after a certain point. I could do it with regex but there are several different kinds, what's the most efficient way to do this?
timonv has joined #ruby
centipedefarmer has joined #ruby
mdpatrick has joined #ruby
vongrippen has joined #ruby
danshultz has quit [Ping timeout: 246 seconds]
phipes has quit [Ping timeout: 264 seconds]
mneorr has quit [Ping timeout: 265 seconds]
guardianx_ has quit [Remote host closed the connection]
ambushsabre has joined #ruby
timonv has quit [Ping timeout: 272 seconds]
<shevy> jle` what else do you like doing with your hands
maletor has quit [Quit: Computer has gone to sleep.]
totalmajor has quit [Remote host closed the connection]
agjacome has quit [Ping timeout: 246 seconds]
serp` has quit [Quit: serp`]
Seich has quit [Quit: Lingo - http://www.lingoirc.com]
Sawbones has joined #ruby
<apeiros> weirdpercent: "after a certain point" is rather vague
* apeiros off
apeiros has quit [Remote host closed the connection]
ebobby has joined #ruby
jgrevich has joined #ruby
freerobby has quit [Quit: Leaving.]
maletor has joined #ruby
<weirdpercent> apeiros: you're right, I was being too vague. I'm zapping the excess characters with map gsub
<weirdpercent> apeiros: thanks
Jeticus has joined #ruby
ebobby has quit [Ping timeout: 245 seconds]
retrofade has joined #ruby
CaptainJet has quit [Ping timeout: 260 seconds]
S0da has quit [Read error: Connection reset by peer]
weirdpercent has quit [Quit: Leaving]
lewix has quit [Remote host closed the connection]
mikeric has joined #ruby
zxq9 has quit [Quit: Konversation terminated!]
jhn has joined #ruby
alvinsj has joined #ruby
afhammad has joined #ruby
Blizzik has joined #ruby
Blizzik has quit []
habanany has quit [Ping timeout: 260 seconds]
zipper has quit [Ping timeout: 260 seconds]
Dude007 has joined #ruby
vlad_starkov has joined #ruby
blz37 has joined #ruby
afhammad has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
law has joined #ruby
decoponio has joined #ruby
<law> hey all, quick and easy question for you:
<law> so, I'm iterating over an array. nothing fancy, just a 'somearray.each do |element| <whatever> end'
<law> how do I pull my current element position while I'm in the loop?
axl_ has joined #ruby
<law> I would do an .each_index, but I need the contents of the array too
vlad_starkov has joined #ruby
<Dude007> each_with_index ?
<Dude007> array.each_with_index {|item, index| #code} profit
<law> is each_with_index in Ruby 2?
aryaching has quit []
fire has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
dogweather has joined #ruby
<law> oh, rock on
banghouse has joined #ruby
<law> I was looking in Array
<law> many thanks, thats exactly what I was looking for!
banghouse is now known as Guest69426
<Dude007> You're welcome
TomRone has joined #ruby
okinomo has joined #ruby
Guest69426 has quit [Ping timeout: 260 seconds]
Tearan has joined #ruby
<Dude007> I got a question as well. File.open(path, 'r+') { |file| file.write Base64.encode64(file.read) } This code appends the base64 encoded string after the binary itself. Do somebody know why?
psyl0n has quit [Remote host closed the connection]
mgberlin has quit [Quit: mgberlin]
maletor has quit [Quit: Computer has gone to sleep.]
Dude007 has left #ruby [#ruby]
Dude007 has joined #ruby
Dude007 has quit []
Dude007 has joined #ruby
mikeric has quit []
axl_ has quit [Quit: axl_]
parduse is now known as Guest39231
parduse has joined #ruby
Guest39231 has quit [Ping timeout: 252 seconds]
axl_ has joined #ruby
cj3kim_ has joined #ruby
Wolland has quit []
burlyscudd has quit [Quit: Leaving.]
phipes has joined #ruby
asteve has joined #ruby
<law> you can't write to a file you've opened for reading?
zhouitpro has joined #ruby
grep_away is now known as grep_awesome
<law> and I suspect file.write needs its arguments in parens
<law> i.e. 'file.write(Base64.encode(blargh))'
pen has joined #ruby
mary5030 has joined #ruby
<pontiki> well, you *can*, but you probably shouldn't
Mars` has joined #ruby
<pontiki> not there, it doesn't, law
alvinsj has quit [Remote host closed the connection]
<pontiki> Dude007: after you've read the file, where do you think the file pointer is going to be?
tylersmith has quit [Remote host closed the connection]
mr_red has quit [Quit: Bye :)]
<Dude007> pontiki: I have absolutely no idea
<law> how can I get my quick n' dirty ruby script to accept both a file argument and STDIN for its input?
estebistec has quit [Remote host closed the connection]
<Dude007> I managed it to get working like this:
<Dude007> encoded_string = Base64.encode64(File.read(path))
<Dude007> File.open(path, "w") { |file| file.write(encoded_string) }
<Dude007> I just thought I could make it in one line :P
pen has quit [Ping timeout: 245 seconds]
mr_red has joined #ruby
freerobby has joined #ruby
<pontiki> that'd work. the point is, after you've read the file, the pointer will be at the end of file.
<pontiki> you can rewind it to the beginning
vlad_starkov has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
<Dude007> pontiki: Aah ok, I get it
rm__ has quit [Remote host closed the connection]
<pontiki> but it will require an intermediate variable in any case
croaky has quit [Ping timeout: 252 seconds]
<pontiki> you can reduct File.open in that line to just File.write(path,encoded_string)
Sawbones has quit [Remote host closed the connection]
<Dude007> yeah, I get your point. Thank you, did not know that
vlad_starkov has joined #ruby
<Dude007> I will, thanks
<pontiki> this on one line, should work, with an anonymous intermediate buffer: File.write(path,Base64.encode(File.read(path)))
prc1 has quit [Quit: Leaving.]
flame_ has quit [Quit: Computer has gone to sleep.]
zhouitpro has quit [Quit: Ex-Chat]
zhouitpro has joined #ruby
zz_karupanerura is now known as karupanerura
freerobby has quit [Ping timeout: 245 seconds]
sisco_dream has joined #ruby
JustinAiken has left #ruby [#ruby]
mneorr has quit [Ping timeout: 246 seconds]
Sawbones has joined #ruby
<Dude007> pontiki: works like a charm
<Dude007> Thank you
<Dude007> again :P
mr_red has quit [Quit: Bye :)]
<law> oh, here we go. ARGF is my friend
wallerdev has joined #ruby
<zhouitpro> Hi
<zhouitpro> who can help me!
<emocakes> she's cute zhouitpro
<pontiki> NOONE
<emocakes> you are cute pontiki
<emocakes> how old are you again?
yeltzooo has quit [Remote host closed the connection]
<pontiki> old enough to be your great-great-grandmother
<emocakes> yum
agent_white has joined #ruby
<emocakes> love those grey flaps
lewix has joined #ruby
radic has quit [Ping timeout: 245 seconds]
<emocakes> ocation?
danshultz has joined #ruby
yeltzooo has joined #ruby
radic has joined #ruby
gquental has quit [Ping timeout: 252 seconds]
<sisco_dream> hi guys
<sisco_dream> i need your help
braincra- has quit [Quit: bye bye]
<pontiki> emocakes is your person, sisco_dream
ebobby has joined #ruby
<emocakes> hey sisco_dream
<emocakes> how can I help
<sisco_dream> hi
<sisco_dream> here
<emocakes> I'm a professional ruby developer from india
<emocakes> my company is in top 5 development companies
danshultz has quit [Ping timeout: 240 seconds]
<emocakes> ahh, problem i see, you are using ubuntu
<emocakes> ask pontiki how to change that
<emocakes> and then ask me once you have changed
dogweather has quit []
law has left #ruby [#ruby]
phansch has joined #ruby
braincrash has joined #ruby
<pontiki> sorry, i haven't used God. I'm an atheist
ambushsabre has quit [Quit: rip]
L8D has quit [Ping timeout: 246 seconds]
<pontiki> sisco_dream: obvious first step: does /restream/test.rb exist? (And why do you have a /restream directory?)
mr_red has joined #ruby
<sisco_dream> i just create a restream directory
centipedefarmer has quit [Remote host closed the connection]
ebobby has quit [Ping timeout: 272 seconds]
<pontiki> in the root directory, though?
intuxicated has quit [Ping timeout: 252 seconds]
intuxicated has joined #ruby
afhammad has joined #ruby
<sisco_dream> yes
vpretzel has quit [Remote host closed the connection]
kcombs has quit [Remote host closed the connection]
gquental has joined #ruby
geggam has joined #ruby
rjhunter has quit [Remote host closed the connection]
rickruby has joined #ruby
freerobby has joined #ruby
kate_r has joined #ruby
beaudette has quit [Remote host closed the connection]
lewix has quit [Read error: Connection reset by peer]
lewix has joined #ruby
kate_r has quit [Client Quit]
croaky has joined #ruby
kate_r has joined #ruby
<pontiki> so then i'd have to ask, as i don't know, does what ever is running that God recipe use the same environment your command line does?
<sisco_dream> anyone work with GOD script?
bayhonan has joined #ruby
<sisco_dream> pintiki
<sisco_dream> this code God.watch do |xds|
<sisco_dream> xds.name = "com"
<sisco_dream> xds.interval = 3550.seconds
<sisco_dream> xds.start = "ffmpeg -i 'input' -vcodec copy -ar 22050 -f flv 'output'"
<sisco_dream> xds.keepalive
<sisco_dream> end
<sisco_dream> works
<pontiki> which isn't what you pasted
<sisco_dream> but i wanna add variable to the end of the input that i get from a variable
<sisco_dream> no this method works too
<pontiki> never mind
<sisco_dream> but im stuck to get variable from text file and add it to end of the input
kate_r has quit [Client Quit]
Faithmuse has joined #ruby
browndawg has joined #ruby
w|t has quit [Ping timeout: 246 seconds]
<sisco_dream> any idea?
peneconleche|awa has quit [Ping timeout: 260 seconds]
w|t has joined #ruby
w|t has quit [Changing host]
w|t has joined #ruby
heidi has joined #ruby
croaky has quit [Ping timeout: 260 seconds]
Dude007 has quit [Remote host closed the connection]
w|t has quit [Ping timeout: 245 seconds]
axl_ has quit [Quit: axl_]
w|t has joined #ruby
iliketurtles has joined #ruby
Jeticus has quit []
CaptainJet has joined #ruby
zxq9 has joined #ruby
timonv has joined #ruby
momomomomo has quit [Quit: momomomomo]
pen has joined #ruby
timonv has quit [Ping timeout: 245 seconds]
afhammad has quit [Ping timeout: 252 seconds]
browndawg has quit [Ping timeout: 240 seconds]
lkba has quit [Ping timeout: 240 seconds]
totalmajor has joined #ruby
lkba has joined #ruby
pen has quit [Ping timeout: 272 seconds]
<sisco_dream> pontiki
<sisco_dream> or any one want to help
vpretzel has joined #ruby
mneorr has joined #ruby
<sisco_dream> im executing ffmpeg via ruby
<sisco_dream> so how can i append variable to input
kate_r has joined #ruby
kate_r has quit [Client Quit]
<sisco_dream> like this exec "ffmpeg -i "input"$variable
mneorr has quit [Read error: No buffer space available]
mneorr has joined #ruby
totalmajor has quit [Ping timeout: 264 seconds]
kitak has joined #ruby
<agent_white> Damned fancybox not living up to it's namesake
<agent_white> mt
<agent_white> seeothertred
croaky has joined #ruby
chrisan has quit [Ping timeout: 252 seconds]
mary5030_ has joined #ruby
havenwood has quit [Remote host closed the connection]
tylersmith has joined #ruby
mneorr has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby
sensen has quit [Ping timeout: 245 seconds]
mary5030_ has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 240 seconds]
tylersmith has quit [Ping timeout: 252 seconds]
havenwood has quit [Ping timeout: 245 seconds]
ebobby has joined #ruby
juarlex has quit [Remote host closed the connection]
cads has joined #ruby
juarlex has joined #ruby
clarknoah has quit [Quit: clarknoah]
agent_white has quit [Quit: gnight]
croaky has quit [Ping timeout: 245 seconds]
sheap has joined #ruby
sheap has left #ruby [#ruby]
ebobby has quit [Ping timeout: 245 seconds]
stryek has quit [Quit: Leaving]
Lingo has joined #ruby
chomskiii has joined #ruby
Lingo has left #ruby [#ruby]
butblack has quit [Quit: butblack]
IceDragon has quit [Quit: Space~~~]
afhammad has joined #ruby
LexicalScope has quit [Ping timeout: 260 seconds]
guest456 has joined #ruby
cj3kim_ has quit [Remote host closed the connection]
jayferd has joined #ruby
russt_ has joined #ruby
rjhunter has joined #ruby
hellome has quit [Remote host closed the connection]
geggam has quit [Remote host closed the connection]
<jayferd> hey all, i'm trying to write a regex to match valid ecmascript identifiers, and i'm coming across some weird behavior
afhammad has quit [Ping timeout: 260 seconds]
<jayferd> i'm not sure where it's getting the /
<jayferd> (it's actually ecmascript identifiers that don't contain lambda, to lex Roy code)
subbyyy has joined #ruby
rjhunter has quit [Ping timeout: 245 seconds]
<jayferd> doh, i needed a (?= instead of (?, nevermind
<jayferd> that was a confusing error though :\
elux has quit [Quit: Bye!]
browndawg has joined #ruby
momomomomo has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
Mars` has quit [Remote host closed the connection]
L8D has joined #ruby
Xiti` has joined #ruby
banghouse has joined #ruby
banghouse is now known as Guest81365
vlad_starkov has quit [Remote host closed the connection]
<jayferd> errr i mean (?: but yeah
zxd has joined #ruby
vlad_starkov has joined #ruby
Xiti has quit [Ping timeout: 240 seconds]
sensen has joined #ruby
Mars` has joined #ruby
L8D has quit [Ping timeout: 252 seconds]
clarknoah has joined #ruby
sisco_dream has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Xiti` has quit [Quit: Leaving]
sailias has quit [Ping timeout: 245 seconds]
Guest81365 has quit [Ping timeout: 252 seconds]
mneorr has joined #ruby
bluOxigen has joined #ruby
havenwood has joined #ruby
zxd has quit [Ping timeout: 264 seconds]
sepp2k1 has quit [Read error: Connection reset by peer]
cgcardona_ has joined #ruby
Monie has joined #ruby
okinomo has quit [Ping timeout: 245 seconds]
heidi has quit [Quit: Leaving.]
ddd has quit [Quit: to fix something]
croaky has joined #ruby
elux has joined #ruby
ddd has joined #ruby
<WJW> sisco_dream, Ruby code can read from a file and use the result wherever it currently uses a constant.
jayferd has left #ruby [#ruby]
CaptainJet has quit []
elux has quit [Client Quit]
burlyscudd has joined #ruby
mneorr has quit [Remote host closed the connection]
lyanchih has quit [Ping timeout: 245 seconds]
yacks has joined #ruby
mdel has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mdel> does sprockets handle imports within sass files differently than say compiling with Grunt or directly with Sass or Compass?
<mdel> im seeing weird behavior where im missing some mixins that are imported be earlier files that I have required with the sprockets manifest
yshh has quit [Read error: Connection reset by peer]
pen has joined #ruby
yshh has joined #ruby
phansch has quit [Quit: Leaving]
burlyscudd has quit [Ping timeout: 272 seconds]
havenwood has quit [Ping timeout: 245 seconds]
pen has quit [Read error: Connection reset by peer]
<jrobeson> mdel, generally one doesn't use sprockets to manage multiple sass files
pen has joined #ruby
<jrobeson> just the main one that imports all the others.. otherwise variables won't be available to the other ones
pen has quit [Client Quit]
lewix has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
fixl has joined #ruby
araujo has quit [Quit: Leaving]
Wolland has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
clarknoah has quit [Quit: clarknoah]
<mdel> jrobeson, yeah understood, I'm having this problem I think due to using an outside library that I perhaps havent included properly
lewix has joined #ruby
sisco_dreamber has joined #ruby
<jrobeson> where does _settings supposed to come from?
<sisco_dreamber> hi all again
Tearan has quit []
<jrobeson> also i see that you're missing a space between require and _self
<jrobeson> you should likely include //= require ../components/foundation/scss/normalize this directly in your sass file and not in that
<mdel> jrobeson, _settings.scss and _layout.scss are alongside the application.scss
<mdel> and require_self is correct for sprockets according to the docs
<jrobeson> that's what i'm sauing you can't do
<jrobeson> you have to @import them in the application.scss
<jrobeson> i don't even have an application.css at all.. only application.scss and i handle it all there
<mdel> yeah that's my plan as well, but I wanted to split up my files into components
<mdel> and include them all with application.scss
<jrobeson> well do that now..ignore sprockets
<sisco_dreamber> could any one correct my code?
zombiebi_ has quit [Quit: go go power rangers...]
<sisco_dreamber> i can past it here its only 2 lines
nism has joined #ruby
<sisco_dreamber> #!/usr/bin/env ruby
<sisco_dreamber> exec ("ffmpeg -i http://<server-ip>/live/playlist.m3u8?#{data} -vcodec copy -ar 22050 -f flv rtmp://<server-2>/live/livestream")
<sisco_dreamber> data = File.read("variable.txt")
Hanmac has joined #ruby
<sisco_dreamber> here the error : At least one output file must be specified
<sisco_dreamber> sh: line 1: -vcodec: command not found
<sisco_dreamber> it seems doesnt read the rest of the line
<mdel> jrobeson, ok I won't try to force sprockets then. I was just trying to utilize it as much as possible so that it can best handle stuff like precompilation
<sisco_dreamber> what am i doing wrong?
<jrobeson> well it'll still do that
<jrobeson> sisco_dreamber, first i'd look for a library that works with ffmpeg instead of trying to parse the params yourself..
<jrobeson> see if a gem like that exists
Mars` has quit [Remote host closed the connection]
clarknoah has joined #ruby
<jrobeson> otherwise why bother doing a ruby script.. just write a shell script
BrixSat_ has quit [Remote host closed the connection]
<sisco_dreamber> i did a shell script before
<mdel> im using sprockets in sinatra, so I wanted to do it the rails way. I prefer handling includes in scss anyway
Hanmac1 has quit [Ping timeout: 252 seconds]
Mars` has joined #ruby
<sisco_dreamber> but it doesnt work with ruby because i use GOD script
<sisco_dreamber> the shell works great
<jrobeson> sisco_dreamber, well change exec to puts .. and then make sure the command still works
BrixSat has joined #ruby
jacderida has quit [Quit: Leaving]
<sisco_dreamber> it gets the variable and append to the line
<jrobeson> that is.. echo the command and test it
<sisco_dreamber> puts work but doesnt execute
<sisco_dreamber> ok
<jrobeson> of course not
<sisco_dreamber> i will do echo now
<jrobeson> just make sure that you actually composed it correctly
<sisco_dreamber> ok
<jrobeson> cuz it sounds like you didn't build it correctly and i don't know ffmpeg well enough to suggest what it is you're doing wrong
<jrobeson> also you should generally try to make sure you escape stuff you pass to shell commands to prevent all sorts of nasty exploits
<jrobeson> so look into that
<sisco_dreamber> puts works
<sisco_dreamber> i got output like expected
<sisco_dreamber> thats what i dont understand
<sisco_dreamber> put gives me output correct
<sisco_dreamber> when i switch puts to exec
<sisco_dreamber> then it cant read the rest of the file
<sisco_dreamber> -vcodec command not know
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sisco_dreamber> when i use directly ffmpeg it works and shell it works
<sisco_dreamber> is there any command to execute then exec?
<jrobeson> probably.. but i've never used exec.. i generally look for any alternative to calling an external program form my ruby scripts
<jrobeson> perhaps somebody else will know better
<sisco_dreamber> hope so
<sisco_dreamber> :(
Mars` has quit [Ping timeout: 265 seconds]
timonv has joined #ruby
freerobby has quit [Quit: Leaving.]
<cgcardona_> I want to use this gem to encrypt an auth_token and refresh token for each user in my app (https://github.com/attr-encrypted/encryptor). The gem readme docs say that we need to use an initialization vector, secret_key, and salt to encrypt/decrypt. My question is do the initialization vector, secret_key, and salt need to be unique for each user? And if so where should I store them after using them to encrypt so that I can have them
<cgcardona_> again when I need to decrypt at a different place in the app? If the initialization vector, secret_key, and salt don't need to be unique to each user would the suggested route be to store them as env vars? Thanks in advance for any help.
OdNairy has joined #ruby
ebobby has joined #ruby
lewix has quit [Remote host closed the connection]
mneorr has joined #ruby
Yarou has quit [Quit: This computer has gone to sleep]
clarknoah has quit [Quit: clarknoah]
JohnBat26 has joined #ruby
clarknoah has joined #ruby
ebobby has quit [Ping timeout: 246 seconds]
brunops has quit [Quit: leaving]
<jrobeson> sisco_dreamber, the quick solution in the moment is just create a shell script and exec() that
Inoperable has quit [Ping timeout: 240 seconds]
iliketurtles has quit [Ping timeout: 260 seconds]
Wolland has quit [Remote host closed the connection]
<sisco_dreamber> jrobeson
<sisco_dreamber> well i have it already
<sisco_dreamber> but the problem is : i use god to monitor my shell (run ffmpeg)
<sisco_dreamber> so if ffmpeg stops it will relaunch it again
afhammad has joined #ruby
iliketurtles has joined #ruby
<sisco_dreamber> if i have an alternative to this of course i will use shell, i was thinking about cron job, but i want ffmpeg to restart only if it goes down
iliketurtles has quit [Excess Flood]
Inoperable has joined #ruby
<jrobeson> that's what i' msaying.. is use your ruby script.. but instead of execting ffmpeg directly.. exec your shell script
<jrobeson> which does exec ffmpeg
<jrobeson> or do some more reading to figure out where you went wrong with exec.. it's likely a tiny oversight
mengu has joined #ruby
<sisco_dreamber> yes it does
<sisco_dreamber> but
existensil has joined #ruby
<sisco_dreamber> if i try to append variable to the input like ffmpeg -i "input"$variable
<sisco_dreamber> shell works great
tylersmith has joined #ruby
<sisco_dreamber> but not ruby
rjhunter has joined #ruby
<jrobeson> that doesn't change my suggesting in any way
vlad_starkov has quit []
vlad_starkov has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
<sisco_dreamber> my problem is the variable id dynamic
rjhunter has joined #ruby
<sisco_dreamber> i have to change it every 24 hours
<sisco_dreamber> so i put into a file text
<sisco_dreamber> and all my script get the variable from it
<WJW> sisco_dreamer, if you want to use Ruby, it cal also get the value from the file.
<WJW> "can also", I meant.
<sisco_dreamber> yes i did
<sisco_dreamber> it works
<WJW> Cool.
<sisco_dreamber> if i use puts
<sisco_dreamber> it output all correct
<sisco_dreamber> when i use exec
<WJW> Well, maybe something is broken about 'exec'.
<sisco_dreamber> i got error -vcodec unknow
<sisco_dreamber> hmmm
rjhunter has quit [Ping timeout: 252 seconds]
<WJW> So, what jrobeson said.
<sisco_dreamber> At least one output file must be specified
<sisco_dreamber> sh: line 1: -vcodec: command not found
<sisco_dreamber> shell script
<sisco_dreamber> bash
<sisco_dreamber> i did also it works
<WJW> Yes, shell script, bash.
<sisco_dreamber> when i call it from ruby (god script)
<sisco_dreamber> it doesnt work
<WJW> You can't make your god script call the shell on the shell file?
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jrobeson> maybe you're missing some sort of escaping that exec requires
<jrobeson> i'd suggest rereading the docs on exec and then try execing something less complex that ffmpeg until you get that working
<WJW> I have used backticks; I suppose they are semantically the same as exec.
<jrobeson> s/that/than
Tearan has joined #ruby
<WJW> >> "running?"
<jrobeson> or you can use %x{} i think
<jrobeson> which doesn't require quoting
Kiba has quit [Ping timeout: 260 seconds]
<sisco_dreamber> now im using exec ("ffmpeg...............")
<jrobeson> as long as you're not using ruby 1.8.x i think
grep_awesome is now known as grep_away
<sisco_dreamber> im using ruby 1.8
<jrobeson> that ruby is EOL
* jrobeson doesn't touch it with a 10 foot pole
<sisco_dreamber> aha means?
r0bby_ has quit [Read error: No route to host]
<sisco_dreamber> im new to this
mclee has joined #ruby
r0bby_ has joined #ruby
clarknoah has quit [Quit: clarknoah]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<WJW> In exec, you have to use separate arguments for the shell arguments??
<WJW> No, it's more complex than that.
fire has quit [Quit: WeeChat 0.4.1]
<WJW> Oh, exec really does sys exec, and so the Ruby goes away. Is that what you want?
mclee has quit [Client Quit]
<sisco_dreamber> whats the link for pastbin
fire has joined #ruby
<sisco_dreamber> i will post the command to have a better idea
L8D has joined #ruby
<sisco_dreamber> got it
clarknoah has joined #ruby
clarknoah has quit [Client Quit]
<WJW> irb(main):001:0> exec "echo this is a long string that I am going to type here and now until I get tired of typing it now is the time for every good man to come to the aid of his party."
<WJW> That worked and killed the IRB.
mclee has joined #ruby
dayepa has quit [Quit: dayepa]
Sawbones has quit []
aagdbl has joined #ruby
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
<sisco_dreamber> i think its a syntax error
pu22l3r_ has joined #ruby
<sisco_dreamber> coz i put the variable directly
<sisco_dreamber> and i get unknow copy command
<sisco_dreamber> ok
<sisco_dreamber> it works when i put the command as well
iliketurtles has joined #ruby
<sisco_dreamber> check this
<sisco_dreamber> so its the syntax im sure
pu22l3r_ has quit [Client Quit]
<WJW> Does 'exec' go through shell so that '<' and '>' get shelly interpretation?
<sisco_dreamber> yes
<sisco_dreamber> even my command
<sisco_dreamber> ffmpeg works
<sisco_dreamber> but when i put back the variable #{data}
<sisco_dreamber> it doesnt work
<sisco_dreamber> it i puts all the command, i get what i want
<sisco_dreamber> however exec doesnt
<WJW> Your "<" and ">" are being interpreted as redirectors; is that what you want?
<sisco_dreamber> problem with syntax when adding variable #{data}
zz_CripperZ is now known as CripperZ
<sisco_dreamber> wjw what i want exatly is simple i want exec ffmpeg the link i gave it google.com?123456 where variable is stored into #{data}
havenwood has joined #ruby
<sisco_dreamber> if i use puts it works
<sisco_dreamber> but when i use exec it doesnt
<sisco_dreamber> weird
<WJW> sisco_dreamber, do you want "<" and ">" interpreted as redirectors?
<sisco_dreamber> what u mean?
nism has left #ruby ["Leaving"]
<WJW> sisco_dreamber, what should happen to the <> symbols in your example?
mclee has quit [Quit: WeeChat 0.4.1]
havenwood has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
<sisco_dreamber> <server > its just an example real value is an address ip
CripperZ is now known as N00D
timonv has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
mengu has quit [Remote host closed the connection]
saarinen has joined #ruby
<sisco_dreamber> exec ("ffmpeg -i "192.168.2.1/playlist.m3u8?#{data} -vcodec copy -ar 22050 -f flv rtmp://192.168.2.3/live/livestream")
afhammad has quit [Ping timeout: 264 seconds]
<sisco_dreamber> you see the variable doesnt let exec finish the line as well
havenwood has quit [Ping timeout: 265 seconds]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
yshh has quit [Remote host closed the connection]
totalmajor has joined #ruby
<WJW> Works for me; sounds like a personal problem.
yacks has quit [Quit: Leaving]
totalmajor has quit [Ping timeout: 265 seconds]
w|t has quit [Ping timeout: 272 seconds]
<sisco_dreamber> but this is echo
<sisco_dreamber> not exec
OdNairy has joined #ruby
noop has joined #ruby
w|t has joined #ruby
pskosinski has quit [Remote host closed the connection]
pskosinski has joined #ruby
<sisco_dreamber> ok
<sisco_dreamber> i see to did exec too
mengu has joined #ruby
<sisco_dreamber> WJW however when i use echo_it = "echo " + orig
<sisco_dreamber> doesnt echo for me
<sisco_dreamber> i finished the command and i got
<sisco_dreamber> sh: line 1: -vcodec: command not found
<sisco_dreamber> so you right something wrong from my part
<sisco_dreamber> what version of ruby you have ?
<pipecloud> ruby-3.2 rails edition™
<sisco_dreamber> wooooow
<sisco_dreamber> i have 1.8
<sisco_dreamber> btw
saarinen has quit [Quit: saarinen]
<sisco_dreamber> whats the difference btw ruby and ruby rail
<prophile> ruby on rails is on rails
<prophile> plain ruby is more built for roads
<prophile> rubber tyres rather than things with flanges, you know
w|t has quit [Ping timeout: 246 seconds]
dayepa has joined #ruby
subbyyy has quit [Ping timeout: 245 seconds]
Barrin6 has quit [Quit: Leaving]
<guest456> rubies are red rocks in the eart and rails are for trains
guest456 has quit [Quit: Page closed]
<sisco_dreamber> even if i didnt get it anyways both of them are to good to have
<sisco_dreamber> lol
<sisco_dreamber> hahahha
<sisco_dreamber> got it
afhammad has joined #ruby
<sisco_dreamber> the rail and rocks = good combination
<emocakes> i have ruby version 4.1
afhammad has quit [Read error: Operation timed out]
<emocakes>  master ●  ruby -v
<emocakes> Ruby 4.1.0.beta1
<sisco_dreamber> still installing here
<sisco_dreamber> gem install rails ========> it takes a long time still didnt finish
nisstyre has quit [Quit: Leaving]
anshin has quit [Quit: WeeChat 0.4.2]
<sisco_dreamber> is it normal that it stuck at : Installing ri documentation for rails-4.0.2
<sisco_dreamber> ??
Jetchisel has quit [Ping timeout: 260 seconds]
<sisco_dreamber> sh: line 1: -vcodec: command not found
<sisco_dreamber> still the same error even after updat
rjhunter has joined #ruby
w|t has joined #ruby
<sisco_dreamber> i just put data = "123456" and it works
<sisco_dreamber> so reading data from file coz this erro
<sisco_dreamber> error
banghouse has joined #ruby
levity_island has quit [Quit: levity_island]
banghouse is now known as Guest97624
rjhunter has quit [Ping timeout: 265 seconds]
<sisco_dreamber> i found the error is the data from file
w|t has quit [Ping timeout: 245 seconds]
fire has quit [Quit: WeeChat 0.4.1]
fire has joined #ruby
maddog_ has quit [Ping timeout: 246 seconds]
maddog_ has joined #ruby
Guest97624 has quit [Ping timeout: 272 seconds]
senayar has joined #ruby
abra has quit [Ping timeout: 245 seconds]
dayepa has quit [Ping timeout: 246 seconds]
abra has joined #ruby
mclee has joined #ruby
dayepa has joined #ruby
vlad_starkov has quit [Ping timeout: 272 seconds]
sensen has quit [Ping timeout: 264 seconds]
banister has joined #ruby
vlad_starkov has joined #ruby
Azure has quit [Quit: My MBP went to sleep.]
dayepa has quit [Ping timeout: 246 seconds]
noop has quit [Read error: No buffer space available]
iliketurtles has quit [Ping timeout: 272 seconds]
noop has joined #ruby
dayepa has joined #ruby
iliketurtles has joined #ruby
Tearan has quit []
vlad_starkov has quit [Ping timeout: 252 seconds]
Tearan has joined #ruby
Tearan has quit [Client Quit]
sensen has joined #ruby
Tearan has joined #ruby
tylersmith has quit [Remote host closed the connection]
Tearan has quit [Client Quit]
Tearan has joined #ruby
noop has quit [Ping timeout: 240 seconds]
dayepa has quit [Ping timeout: 246 seconds]
dayepa has joined #ruby
<WJW> sisco_dreamber, now that you say that, I imagine your file has a newline character at the end. That would explain the problem.
<WJW> Maybe trim the newline inside your program.
<sisco_dreamber> hmm
<sisco_dreamber> if i do like you did
<sisco_dreamber> WJW
<sisco_dreamber> i mean data = 123456 it works
<sisco_dreamber> but if i try to read the file then it doenst work
<WJW> Did you read what I just wrote?
<sisco_dreamber> the reason why i use file ( dynamic variable alive for 24 hours)
<sisco_dreamber> so i manually change it
<sisco_dreamber> yes i did
alvinsj has joined #ruby
Tearan has quit [Ping timeout: 245 seconds]
<sisco_dreamber> and i explained to you just now why i use file
<sisco_dreamber> its a token
<WJW> I say read the file and trim the newline off the data.
<sisco_dreamber> valid for 24 hours max
<sisco_dreamber> give me an example plz
<sisco_dreamber> or correct my example
noop has joined #ruby
mengu has quit [Remote host closed the connection]
cads has quit [Quit: Leaving]
cads has joined #ruby
dseitz has joined #ruby
dayepa has quit [Ping timeout: 246 seconds]
<sisco_dreamber> to make it simple
Jetchisel has joined #ruby
<sisco_dreamber> variable.txt containt only 1 line = 1235654665a651a651d651s65165d165d65f165d16f5165d
phipes has quit [Remote host closed the connection]
fire has quit [Ping timeout: 245 seconds]
kitak_ has joined #ruby
kitak has quit [Read error: Connection reset by peer]
yshh has joined #ruby
dayepa has joined #ruby
hoelzro_ is now known as hoelzro
flubba has quit [Remote host closed the connection]
<WJW> sisco_dreamber, "foo \n".gsub(/ *\n */, "")
zegerjan has joined #ruby
rfx86 has quit [Ping timeout: 264 seconds]
Tearan has joined #ruby
Tearan has quit [Client Quit]
yshh has quit [Ping timeout: 240 seconds]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<sisco_dreamber> WJW i sent you a pm of real command
dayepa has quit [Ping timeout: 246 seconds]
robertjpayne has joined #ruby
jhn has quit [Ping timeout: 272 seconds]
noop has quit [Ping timeout: 265 seconds]
dayepa has joined #ruby
ehaliewicz has joined #ruby
zxd has joined #ruby
noop has joined #ruby
<pipecloud> prophile: You're a funny cookie.
mneorr has quit [Remote host closed the connection]
S0da has joined #ruby
afhammad has joined #ruby
dayepa has quit [Ping timeout: 246 seconds]
aagdbl has quit [Quit: Leaving.]
dayepa has joined #ruby
aagdbl has joined #ruby
kitak_ has quit [Remote host closed the connection]
wildroman2 has joined #ruby
kitak has joined #ruby
<sisco_dreamber> WJW are you there ?
aagdbl has left #ruby [#ruby]
Guest78940 has joined #ruby
aagdbl has joined #ruby
aagdbl has quit [Client Quit]
afhammad has quit [Ping timeout: 246 seconds]
leprechaun has joined #ruby
lyanchih has joined #ruby
wildroman2 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
fire has joined #ruby
diegoviola has joined #ruby
dayepa has quit [Ping timeout: 246 seconds]
cads has quit [Ping timeout: 246 seconds]
rjhunter has joined #ruby
dayepa has joined #ruby
skaflem has joined #ruby
<WJW> sisco_dreamber, all questions resolved?
lyanchih has quit [Quit: lyanchih]
<sisco_dreamber> nop
<sisco_dreamber> i sent you a pm
<sisco_dreamber> when my real command
<sisco_dreamber> to correct , coz i couldnt make it work
<WJW> I didn't really understand your PM.
noop has quit [Ping timeout: 252 seconds]
cgcardona_ has quit [Quit: cgcardona_]
charliesome has joined #ruby
<WJW> Read the data from the file and then do to them what I show above with my gsub example.
<sisco_dreamber> if you see the pm, if i replace {text} with {data} it works
<sisco_dreamber> would you give me the example with my command
<WJW> So if it works, then what is the problem?
<sisco_dreamber> well
aagdbl has joined #ruby
<sisco_dreamber> if i use {text} witch's get data from file
<sisco_dreamber> then it doesnt work
<sisco_dreamber> and the file has only 1 line
<sisco_dreamber> i guesss you have a better idea now specially you have the pm
spider-mario has joined #ruby
<WJW> Please paste your whole Ruby script into a pastebin, with no commentary in it, just code (comments with # are OK).
<sisco_dreamber> ok
rjhunter has quit [Ping timeout: 272 seconds]
az has joined #ruby
dayepa has quit [Ping timeout: 246 seconds]
<WJW> Paste the data file into another pastebin.
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sisco_dreamber> WJW
<sisco_dreamber> i prefer to send it to via pm
<sisco_dreamber> i dont wanna google index it
<sisco_dreamber> its ok?
<WJW> I do not want to receive a PM.
<sisco_dreamber> ok
sayan has joined #ruby
<Jamo> personalli Id recommend using own pastebin and denying google to find it :)
<WJW> It puts stuff to the left of your code. I want to be able to copy and paste.
<WJW> I have been using Github's.
<Jamo> or gist.github.com as secret gist
flubba has joined #ruby
<sisco_dreamber> is it ok now ?
intuxicated has quit [Ping timeout: 265 seconds]
ephemerian has joined #ruby
specious has joined #ruby
dayepa has joined #ruby
tvw has joined #ruby
kitak has quit [Remote host closed the connection]
thiago__ has joined #ruby
kitak has joined #ruby
MonsieurApple has left #ruby ["Textual IRC Client: www.textualapp.com"]
user258467 has joined #ruby
noop has joined #ruby
blackmesa has joined #ruby
subbyyy has joined #ruby
horofx has quit [Ping timeout: 260 seconds]
<WJW> One moment, please.
dayepa has quit [Ping timeout: 246 seconds]
<sisco_dreamber> yes of course
workmad3 has joined #ruby
weems has quit [Read error: Connection reset by peer]
dayepa has joined #ruby
<WJW> Sisco_dreamber, http://pastebin.com/C5sBmvHf
weems has joined #ruby
wildroman2 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
lurch_ has joined #ruby
DouweM has quit [Quit: Leaving...]
<sisco_dreamber> it works, i just want to use it with god, but after the update , god wont run
<sisco_dreamber> :(
olivier_bK has joined #ruby
<WJW> I never install a system Ruby; I install in user space using 'rbenv'.
totalmajor has joined #ruby
<sisco_dreamber> rubygems (LoadError)
<sisco_dreamber> from /usr/local/bin/god:9
dayepa has quit [Ping timeout: 246 seconds]
<WJW> Anyone else want to help sisco_dreamber with gem problems? I don't get into that.
<sisco_dreamber> ty so much for your help
wildroman2 has quit [Ping timeout: 252 seconds]
arietis has joined #ruby
afhammad has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
zxd has quit [Ping timeout: 240 seconds]
iliketurtles has quit [Quit: zzzzz…..]
totalmajor has quit [Ping timeout: 240 seconds]
zxd has joined #ruby
dayepa has joined #ruby
<pontiki> are they still trying to execute a bash script with ruby inside a God recipe?
<WJW> Yes, and killed God by reinstalling Ruby and who knows what else.
<sisco_dreamber> script rb works
<sisco_dreamber> buy now god doesnt run at all
<pontiki> lol
<sisco_dreamber> no such file to load -- rubygems
<sisco_dreamber> hahahaha
dayepa has quit [Read error: Connection reset by peer]
_5kg has quit [Read error: Connection reset by peer]
<WJW> The problem with the script was that a newline was read in from the data file and it got into the exec string and so the shell saw two commands.
<sisco_dreamber> ohhh
<sisco_dreamber> you are the right man
_5kg has joined #ruby
tylersmith has joined #ruby
yshh has joined #ruby
<WJW> I don't know about your gems; mine are in /home/jack/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1
<sisco_dreamber> it works now
<sisco_dreamber> fixed
<WJW> Wonderful!
moneydouble has joined #ruby
<sisco_dreamber> yeah
<sisco_dreamber> but there's one issue
<WJW> You revived God.
banghouse has joined #ruby
<sisco_dreamber> god couldnt run the rb process
banghouse is now known as Guest16703
<sisco_dreamber> com [ok] process is not running (ProcessRunning)
<WJW> I don't know anything about God.
frxx has joined #ruby
<sisco_dreamber> monitoring script
dayepa has joined #ruby
<WJW> I know what it is for, but I have never used it.
croaky has quit [Ping timeout: 264 seconds]
flubba has quit [Remote host closed the connection]
<sisco_dreamber> its weird
<sisco_dreamber> now the bash is 100% ruby code
<sisco_dreamber> so why it wont start it
<WJW> Any priests here?
<WJW> Theologians?
<WJW> Taelibaan?
dayepa has quit [Client Quit]
yshh has quit [Ping timeout: 260 seconds]
tylersmith has quit [Ping timeout: 272 seconds]
<WJW> I guess you have to read the Bible.
noop has quit [Ping timeout: 260 seconds]
frx has quit [Ping timeout: 245 seconds]
timonv_ has joined #ruby
falood has quit []
falood has joined #ruby
<sisco_dreamber> hahaha
klaut has joined #ruby
nfk has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
<WJW> What does Koran say about how to pray to God for execution of process?
Mon_Ouie has quit [Ping timeout: 272 seconds]
<sisco_dreamber> 5 times a day
<sisco_dreamber> lol
weems has quit [Read error: Connection reset by peer]
weems has joined #ruby
weems has quit [Changing host]
weems has joined #ruby
<sisco_dreamber> whyyyyyyyyyyyyyyyyyyyy it wont start
<sisco_dreamber> i did allllll this research for nothing o.O
araujo has joined #ruby
alvinsj has quit [Remote host closed the connection]
<WJW> Does God require a native machine executable, or can it work with a script?
<WJW> Does it give a diagnostic, "not found" or something?
<sisco_dreamber> can wortk with script
<WJW> Hm.
levity_island has joined #ruby
<sisco_dreamber> actually it does the both
<WJW> Are you sure the you are telling God the correct location of the script?
<sisco_dreamber> i even run ffmpeg from it
<sisco_dreamber> [2013-12-30 04:18:02] INFO: com [ok] process is not running (ProcessRunning)
<sisco_dreamber> yes
<WJW> Does God produce a log with a more detailed error message?
<sisco_dreamber> is com
<sisco_dreamber> hmm
<WJW> Have you ever seen it work with a file of yours instead of one installed in the system?
<sisco_dreamber> no idea if so and where is located
<sisco_dreamber> yes
<sisco_dreamber> i run with it now many files
subbyyy has quit [Ping timeout: 272 seconds]
<sisco_dreamber> different
<sisco_dreamber> some bash some direct ffmpeg
<WJW> What is the difference between a case that worked and the current case that fails?
<sisco_dreamber> plus this one rb
<sisco_dreamber> the load file and put into data
<sisco_dreamber> i guess the line that you split
<sisco_dreamber> i dont know
<WJW> That doesn't explain it.
cosmicpanda has joined #ruby
burlyscudd has joined #ruby
relix has joined #ruby
<sisco_dreamber> well the ruby script
<sisco_dreamber> that you make it work for me
<WJW> You saw it work with a shell script?
<sisco_dreamber> yes
<sisco_dreamber> it work now like a charm
<sisco_dreamber> so i guess not sure
claymore has joined #ruby
<sisco_dreamber> into god its like a new line
<sisco_dreamber> but i have to know how to get log file
specious has quit [Ping timeout: 245 seconds]
<WJW> Go back to the configuration that worked with a shell script. In the shell script, make it run the Ruby script you want.
<WJW> But first reconfirm that it works with the shell script.
<sisco_dreamber> the same issue
<WJW> Change only one thing at a time.
<sisco_dreamber> look
<sisco_dreamber> the only script with getting data from file ( i made one with shell and this one that you fixed for me with ruby)
<WJW> I don't know what ffmpeg is. Does that keep running once you start it?
<sisco_dreamber> both of them works independly
<sisco_dreamber> but when i use them with god
<sisco_dreamber> it doesnt work
Hanmac1 has joined #ruby
noop has joined #ruby
<sisco_dreamber> the rest of bash files works ( didnt use the command to get variable from file)
<sisco_dreamber> god keep ffmpeg running if it fail
<WJW> But normally it keeps running? It's a server and is not designed to just do something and exit?
burlyscudd has quit [Ping timeout: 272 seconds]
rjhunter has joined #ruby
<sisco_dreamber> its a live stream
<sisco_dreamber> it will output the log to a file
Hanmac has quit [Ping timeout: 272 seconds]
<WJW> I suggest you restore the state where you saw God successfully execute a shell script.
<WJW> I suggest you test it again and see that success again.
<WJW> Did you chmod 775 the Ruby script?
<sisco_dreamber> yes
<sisco_dreamber> output of log
<sisco_dreamber> from /restream/com.rb:3
rjhunter has quit [Ping timeout: 272 seconds]
<sisco_dreamber> restream/com.rb:3:in `read': No such file or directory - variable.txt (Er
marr has joined #ruby
<WJW> Try full pathname for variable.txt.
drago777 has quit [Ping timeout: 240 seconds]
<sisco_dreamber> woooooooooooorks
popl has joined #ruby
popl has joined #ruby
drago777 has joined #ruby
wallerdev has quit [Quit: wallerdev]
alexherbo2 has joined #ruby
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
<sisco_dreamber> you are amazing bro
<sisco_dreamber> thx thx thx
<WJW> I just know Unix and Ruby. That's not amazing.
<sisco_dreamber> WJW can you plz delete your pastbin
<sisco_dreamber> it containt my code
<sisco_dreamber> links
<sisco_dreamber> or just edit the links
<WJW> I think you didn't need Ruby but could have just used a shell script to do what it does.
<WJW> I didn't log in to pastebin, and I don't know whether I can do anything about that.
<WJW> I pasted it as a guest.
mehlah has joined #ruby
<sisco_dreamber> ok
<sisco_dreamber> i think i failed in shell as in ruby so problem was the path i guess
<sisco_dreamber> because at least shell works for me
wildroman2 has joined #ruby
wildroman2 has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
ping-pong has quit [Read error: Operation timed out]
zxd has quit [Ping timeout: 264 seconds]
<WJW> To interpolate string from data file in a shell script, you could say ffmpeg blah blah `cat file` blah blah.
<sisco_dreamber> but buy the way
<sisco_dreamber> you saw the token
<sisco_dreamber> dynamic numbers
<sisco_dreamber> is there any way to decode it
<sisco_dreamber> i see always the last 10 digit change
<sisco_dreamber> the rest is stable
<WJW> I don't know how the token is being generated.
<sisco_dreamber> so im not sure what it is, timestamp or math encrypted
flubba has joined #ruby
RaviTezu has joined #ruby
RaviTezu has left #ruby [#ruby]
lurch_ has quit [Ping timeout: 240 seconds]
<sisco_dreamber> is it ruby close to python?
<WJW> I'm not a Python expert.
<sisco_dreamber> lol ok i see
<WJW> I think in Python you have to put parentheses after a method or function name to call the method or function. In Ruby, you don't have to.
robertjpayne has quit [Remote host closed the connection]
<WJW> So if I'm remembering right, Python is more like Javascript in that regard.
krz has joined #ruby
alvinsj has joined #ruby
timonv_ has quit [Remote host closed the connection]
<sisco_dreamber> alright
retrofade has quit [Ping timeout: 240 seconds]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
N00D is now known as zz_N00D
alvinsj has quit [Remote host closed the connection]
xiphias has quit [Ping timeout: 240 seconds]
drumusician has joined #ruby
ping-pong has joined #ruby
xiphias has joined #ruby
xiphias has quit [Changing host]
xiphias has joined #ruby
kitak has quit [Ping timeout: 245 seconds]
dayepa has joined #ruby
_4V_Away has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
drago777 has quit [Ping timeout: 240 seconds]
_honning_ has joined #ruby
yshh has joined #ruby
xiphias has joined #ruby
_4V_Away is now known as _4V_
drago777 has joined #ruby
yshh has quit [Read error: No route to host]
yshh has joined #ruby
_honning_ has quit [Ping timeout: 260 seconds]
mojjojo has joined #ruby
chopmo has joined #ruby
noop has quit [Ping timeout: 272 seconds]
alvinsj has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mengu has quit [Remote host closed the connection]
apeiros has joined #ruby
phansch has joined #ruby
bgy_ has quit [Changing host]
bgy_ has joined #ruby
bgy_ is now known as bgy
relix has joined #ruby
lkba has quit [Ping timeout: 272 seconds]
codezomb has quit [Quit: Textual IRC Client: www.textualapp.com]
sisco_dreamber has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
larssmit has joined #ruby
lurch_ has joined #ruby
noop has joined #ruby
timonv has joined #ruby
<jokke> hey
chopmo has quit [Remote host closed the connection]
<jokke> i'm using popen3 and was wondering if i can read from stderr only if there's something there at that moment
rjhunter has joined #ruby
<jokke> so that it won't block
jgrevich has quit [Quit: jgrevich]
<WJW> Not sure what the best solution for that is.
chopmo_ has joined #ruby
rjhunter has quit [Ping timeout: 272 seconds]
fire has quit [Quit: WeeChat 0.4.1]
ejnahc has quit [Ping timeout: 252 seconds]
ejnahc has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.2]
chopmo_ has quit [Remote host closed the connection]
mzdravkov has joined #ruby
ewnd9 has joined #ruby
fire has joined #ruby
gregoriokusowski has joined #ruby
drumusician has quit [Ping timeout: 252 seconds]
<apeiros> jokke: Kernel#select, IO#read_nonblock
<jokke> yeah
alvinsj has quit [Remote host closed the connection]
<jokke> i'm using read_nonblock now
<jokke> does my whole process exit, if i exit in a popen3 block?
fire has quit [Quit: WeeChat 0.4.1]
zxd has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
specious has joined #ruby
DouweM has joined #ruby
sjohn3 has joined #ruby
krz has quit [Ping timeout: 240 seconds]
RoryHughes has joined #ruby
totalmajor has joined #ruby
melfy has quit [Ping timeout: 245 seconds]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
timonv has quit [Read error: Connection reset by peer]
shime has joined #ruby
blackmesa has joined #ruby
totalmajor has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
dross has quit [Ping timeout: 272 seconds]
ozgun has joined #ruby
Wolland has joined #ruby
cid404 has joined #ruby
kitak has joined #ruby
Advocation has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
kitak has quit [Ping timeout: 245 seconds]
m8 has joined #ruby
GZ has joined #ruby
<Advocation> I'm fairly new to ruby - just wondering if there was a better way to do this? https://gist.github.com/Advocation/85e65958d3425480dd72
Bumptious has joined #ruby
GZ is now known as Guest83839
dr_bob has joined #ruby
postmodern has quit [Quit: Leaving]
<jokke> Advocation: you're shadowing an outer variable with x
zhouitpro has quit [Remote host closed the connection]
wildroman2 has quit [Remote host closed the connection]
<jokke> also x is a bad name for a variable
RoryHughes has quit []
<jokke> you can do puts instead of write
<Advocation> jokke: so x should really be within the File.open?
<jokke> it will append the \n automatically
<Advocation> ok, didn't know about using puts instead of write :)
<Advocation> ah perfect!
prc has joined #ruby
Bumptious has quit [Remote host closed the connection]
Bumptious has joined #ruby
<Advocation> ok, so puts outputs it into terminal as well
sayan_ has joined #ruby
Guest83839 has quit [Quit: Page closed]
<Advocation> does that look better?
kate_r has joined #ruby
<DouweM> Advocation: also, although they can be omitted, parentheses are generally preferred around method arguments. so `File.open('AoM Booklist.txt', 'w')`
<jokke> Advocation: no puts is an IO method
<Advocation> agh, makes sense
<jokke> but yeah like DouweM said
<DouweM> Note that the puts on line 17 is the same puts as on line 13, both are the method on IO, only the former is on your main object which includes Kernel which includes IO, so it writes to standard out, and the latter is on `f` explicitly
<jokke> i omit parentheses only when the method has no arguments or when it has one but nothing comes after the method invocation in that line
<DouweM> I only omit parantheses when there are no args, or if we're working with a DSL
<Advocation> DouweM: ok, sounds cool
<jokke> yeah
psyl0n has joined #ruby
blackmesa has joined #ruby
sayan has quit [Ping timeout: 265 seconds]
<DouweM> I always include parentheses with one argument, except with #puts
flubba has quit [Remote host closed the connection]
eka has joined #ruby
Advocation has quit [Quit: Advocation]
<apeiros> DouweM: "on your main object which includes Kernel which includes IO"
<apeiros> close, but not correct like that
<apeiros> IO is a class, not a module and can't be included
<apeiros> Kernel#puts is simply defined as $stdout.puts, and $stdout is an IO
<DouweM> Ah, right you are. For some reason I was under the impression that Kernel had all IO methods
Zai00 has joined #ruby
<DouweM> Thanks
rjhunter has joined #ruby
dross has joined #ruby
<apeiros> yw :-)
chopmo has joined #ruby
threesome has quit [Ping timeout: 245 seconds]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rjhunter has quit [Ping timeout: 240 seconds]
sensen has quit [Quit: leaving]
max96at has joined #ruby
fire has joined #ruby
dross has quit [Ping timeout: 265 seconds]
chopmo has quit [Remote host closed the connection]
lurch_ has quit [Quit: lurch_]
ehaliewicz has quit [Remote host closed the connection]
levity_island has quit [Quit: levity_island]
blackmesa has quit [Ping timeout: 240 seconds]
mojjojo has quit [Quit: mojjojo]
mojjojo has joined #ruby
retrofade has joined #ruby
fire has quit [Ping timeout: 240 seconds]
eka has quit [Quit: Computer has gone to sleep.]
mojjojo has quit [Client Quit]
mojjojo has joined #ruby
fire has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
mzdravkov has quit [Ping timeout: 245 seconds]
mzdravkov has joined #ruby
afhammad has quit []
kep has joined #ruby
<kep> /cl/cl
<zxd> what does the # mean in #{foo}
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
<kep> zxd: string interpolation
lurch_ has joined #ruby
Speed has joined #ruby
<zxd> which means
<zxd> ?
<zxd> does this exist in ruby ${foo} ?
Hanmac has joined #ruby
<zxd> replace a variable with its value ?
<kep> yes
arietis has quit [Quit: Computer has gone to sleep.]
sjohn3 has quit [Quit: leaving]
Hanmac1 has quit [Ping timeout: 246 seconds]
aagdbl has quit [Ping timeout: 272 seconds]
blackmesa has joined #ruby
arietis has joined #ruby
weeems has joined #ruby
retrofade has quit [Ping timeout: 245 seconds]
hakunin_ has joined #ruby
aagdbl has joined #ruby
awarner has joined #ruby
leprechaun has left #ruby [#ruby]
joaoh82_ has joined #ruby
matled- has joined #ruby
mzdravkov has quit [Remote host closed the connection]
<zxd> kep: thanks
psyl0n_ has joined #ruby
deever_ has joined #ruby
Zhwazi- has joined #ruby
Kilo`Byte has quit [Ping timeout: 245 seconds]
drago777 has quit [Ping timeout: 240 seconds]
jaredrhine_ has joined #ruby
blarghmatey__ has joined #ruby
Gnubie__ has joined #ruby
BrixSat_ has joined #ruby
mehlah_ has joined #ruby
robmozart_ has joined #ruby
robbyoconnor has joined #ruby
RoryHughes has joined #ruby
fire has quit [Quit: WeeChat 0.4.1]
michael_imac has joined #ruby
maddog__ has joined #ruby
epic__ has joined #ruby
fearoffish_ has joined #ruby
krainbol1greene has joined #ruby
raddazong has joined #ruby
ping_pong has joined #ruby
Boohbah_ has joined #ruby
TheNumb_ has joined #ruby
sarlalian has joined #ruby
edwardly_ has joined #ruby
jellow_ has joined #ruby
cjk101010_ has joined #ruby
orionstez has joined #ruby
orionstez is now known as orionstein
Boohbah_ is now known as Guest97918
jmaister_ has joined #ruby
Davedo1 has joined #ruby
jmaister_ has quit [Changing host]
jmaister_ has joined #ruby
undert_ has joined #ruby
sts_ has joined #ruby
kate_r_ has joined #ruby
xybr_ has joined #ruby
destruct1re has joined #ruby
Kilo`Byte has joined #ruby
sts_ is now known as Guest70869
jcarouth` has joined #ruby
jibi_ has joined #ruby
Zhwazi has quit [Ping timeout: 272 seconds]
hunterr986 has quit [Ping timeout: 272 seconds]
undert has quit [Ping timeout: 272 seconds]
joast has quit [Ping timeout: 272 seconds]
edwardly has quit [Ping timeout: 272 seconds]
Kruppe has quit [Ping timeout: 272 seconds]
jcarouth has quit [Ping timeout: 272 seconds]
psyl0n has quit [Ping timeout: 272 seconds]
ping-pong has quit [Ping timeout: 272 seconds]
kate_r has quit [Ping timeout: 272 seconds]
tvw has quit [Ping timeout: 272 seconds]
olivier_bK has quit [Ping timeout: 272 seconds]
maddog_ has quit [Ping timeout: 272 seconds]
joaoh82 has quit [Ping timeout: 272 seconds]
hakunin has quit [Ping timeout: 272 seconds]
jibi has quit [Ping timeout: 272 seconds]
blarghmatey_ has quit [Ping timeout: 272 seconds]
krainboltgreene has quit [Ping timeout: 272 seconds]
matled has quit [Ping timeout: 272 seconds]
mburns has quit [Ping timeout: 272 seconds]
CaptainKnots has quit [Ping timeout: 272 seconds]
cjk101010 has quit [Ping timeout: 272 seconds]
xybre has quit [Ping timeout: 272 seconds]
nadley has quit [Ping timeout: 272 seconds]
sarlalia1 has quit [Ping timeout: 272 seconds]
fearoffish has quit [Ping timeout: 272 seconds]
Boohbah has quit [Ping timeout: 272 seconds]
TheNumb has quit [Ping timeout: 272 seconds]
awarner_ has quit [Ping timeout: 272 seconds]
farn has quit [Ping timeout: 272 seconds]
sfiggins has quit [Ping timeout: 272 seconds]
epic has quit [Ping timeout: 272 seconds]
weems has quit [Ping timeout: 272 seconds]
mehlah has quit [Ping timeout: 272 seconds]
r0bby_ has quit [Ping timeout: 272 seconds]
BrixSat has quit [Ping timeout: 272 seconds]
waxjar has quit [Ping timeout: 272 seconds]
deever has quit [Ping timeout: 272 seconds]
jellow has quit [Ping timeout: 272 seconds]
Davedo has quit [Ping timeout: 272 seconds]
michael_mbp has quit [Ping timeout: 272 seconds]
voodoofish has quit [Ping timeout: 272 seconds]
madhatter has quit [Ping timeout: 272 seconds]
jaredrhine has quit [Ping timeout: 272 seconds]
shevy has quit [Ping timeout: 272 seconds]
KK4MGV has quit [Ping timeout: 272 seconds]
jmaister has quit [Ping timeout: 272 seconds]
destructure has quit [Ping timeout: 272 seconds]
sts has quit [Ping timeout: 272 seconds]
Gnubie_ has quit [Ping timeout: 272 seconds]
Cork has quit [Ping timeout: 272 seconds]
orionstein_away has quit [Ping timeout: 272 seconds]
robmozart has quit [Ping timeout: 272 seconds]
avelldiroll has quit [Ping timeout: 272 seconds]
waxjar has joined #ruby
hunterr986 has joined #ruby
matled- is now known as matled
fearoffish_ is now known as fearoffish
mburns_ has joined #ruby
olivier_bK has joined #ruby
Cork has joined #ruby
shevy has joined #ruby
farn has joined #ruby
avelldiroll has joined #ruby
Kruppe- has joined #ruby
Davedo1 is now known as Davedo
michael_imac is now known as michael_mbp
farn is now known as Guest49077
shime has quit [Ping timeout: 260 seconds]
drago777 has joined #ruby
nadley has joined #ruby
robmozart_ is now known as robmozart
Guest49077 is now known as farn
CaptainKnots has joined #ruby
TomRone has quit [Ping timeout: 258 seconds]
KK4MGV has joined #ruby
atno_ has quit [Quit: Leaving]
falood has quit [Remote host closed the connection]
relix has joined #ruby
L8D has quit [Ping timeout: 240 seconds]
sharms has quit [Ping timeout: 240 seconds]
browndawg has quit [Ping timeout: 246 seconds]
falood has joined #ruby
L8D has joined #ruby
krz has joined #ruby
jibi_ has quit [Quit: bb.]
jibi has joined #ruby
ace_striker has joined #ruby
chrisan has joined #ruby
cjk101010_ is now known as cjk101010
sharms has joined #ruby
voodoofish has joined #ruby
<robwilliamsuk> vvliivclhjthhlibhntveffldldhkddffibvffrjfici
<shevy> robwilliamsuk I agree
<robwilliamsuk> shevy good :)
falood has quit [Ping timeout: 252 seconds]
TomRone has joined #ruby
jibi has quit [Client Quit]
<ace_striker> robwilliamsuk: provide hashfunction to decrypt it too !!
jibi has joined #ruby
mehlah_ is now known as mehlah
<shevy> hmmm
<shevy> did #RubyOnRails lose people? I thought I could remember around 600 folks, now it's at a bit more than 320
dorei has joined #ruby
browndawg has joined #ruby
dross has joined #ruby
Advocation has joined #ruby
<Hanmac> yeah #RubyOnRails is dying ;P
pen has joined #ruby
rjhunter has joined #ruby
Signum has joined #ruby
danshultz has joined #ruby
jibi has quit [Ping timeout: 264 seconds]
Advocation has quit [Quit: Advocation]
danshult_ has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
rickruby has quit [Remote host closed the connection]
Zackio has quit [Quit: ZNC - http://znc.in]
krz has quit [Ping timeout: 245 seconds]
rjhunter has quit [Ping timeout: 264 seconds]
jibi has joined #ruby
ewnd9 has quit [Ping timeout: 264 seconds]
JohnBat26 has quit [Remote host closed the connection]
krz has joined #ruby
Zackio has joined #ruby
rippa has joined #ruby
geekbri has joined #ruby
St_Marx has joined #ruby
drumusician has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
kirun has joined #ruby
<pipecloud> Finally.
popl has quit [Quit: And then there are people who prefer to look their fate in the eye.]
Azulinho has joined #ruby
vlad_starkov has joined #ruby
rippa has quit [Ping timeout: 248 seconds]
drumusician has quit [Read error: No buffer space available]
jellow_ is now known as jellow
jellow has quit [Changing host]
jellow has joined #ruby
drumusician has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
chopmo has joined #ruby
mercwithamouth has joined #ruby
arietis has joined #ruby
drago777 has joined #ruby
veterinarian has joined #ruby
<ace_striker> shevy: Hanmac : what's your point there ?
chopmo has quit [Ping timeout: 246 seconds]
<DouweM> If I have two dates, say Date.new(2013,12,26) and Date.new(2014,1,5), how can I get the number of nights between them *per year* ? In this case I'd want { 2013 => 6, 2014 => 2}. Note that the dates can also be in the same year, or more than one year apart
lurch_ has quit [Quit: lurch_]
<DouweM> whoops, 2014 => 4
lewix has joined #ruby
Azulinho has quit [Quit: WeeChat 0.4.2]
<Hanmac> ace_striker: rails users are like apple users ... think that they are superior than others ... and most of the time really annoying
Wolland has quit []
tyl has joined #ruby
<ace_striker> Hanmac: it's not like that !!
<ace_striker> people do prove the point ..
lewix has quit [Remote host closed the connection]
lurch_ has joined #ruby
senayar has quit [Remote host closed the connection]
Azure has joined #ruby
<Hanmac> my biggest problem with rails users is that they learn rails before ruby and then think that each method they learned from rails exist in ruby too
totalmajor has joined #ruby
browndawg has quit [Ping timeout: 240 seconds]
<pipecloud> Mine is that they never learn ruby.
<pipecloud> "Please to handle file uploads a gem?" look at the request, it's a damn IO object.
ae-r has joined #ruby
Azulinho has joined #ruby
fixl has quit [Remote host closed the connection]
karupanerura is now known as zz_karupanerura
Azulinho has quit [Client Quit]
Azulinho has joined #ruby
parduse has quit [Read error: Connection reset by peer]
ged__ is now known as ged
predator117 has quit [Ping timeout: 264 seconds]
lurch_ has quit [Quit: lurch_]
totalmajor has quit [Ping timeout: 246 seconds]
burlyscudd has joined #ruby
<zxd> what does intern mean?
<zxd> "hello world".intern
<pipecloud> It makes the string immutable and persistent in heap.
<pipecloud> Wait, sorry thinking of something else.
<shevy> ace_striker that like 50% of the irc folks are gone
parduse has joined #ruby
<pipecloud> It returns the symbolized version of your string.
<Hanmac> DouweM:
<Hanmac> >> require "date"; a=Date.new(2013,12,26);b=Date.new(2014,1,5);y=a.year;while(y < b.year);h[y]=Date.new(y+1,1,1) - a;a = Date.new(y+1,1,1);y += 1;end;h[b.year] = b - a;h
<Hanmac> zxd: String#intern == String#to_sym #=> makes a Symbol from a String
<DouweM> Hanmac: thanks! I had already figured out something similar myself
mengu has quit [Remote host closed the connection]
<ace_striker> shevy: everyone is celebrating new year ..i guess..shopping spree might be !!
<Hanmac> DouweM: let me guess ... my code is better? ;P
<shevy> nono, even weeks ago
retrofade has joined #ruby
<ace_striker> shevy: so you means RoR trend is dying ?
lkba has joined #ruby
senayar has joined #ruby
<Hanmac> ace_striker: thats we all hope for
<shevy> ace_striker could be or it could not be, my comment was mostly in regards to the amount of people who are there. where did they go?
<shevy> what happened to them!
<shevy> WHERE ARE THEY NOW!!!
EngierkO has joined #ruby
<DouweM> Hanmac: my code now gives [Thu, 26 Dec 2013..Wed, 01 Jan 2014, Wed, 01 Jan 2014..Thu, 01 Jan 2015] for start_date Date.new(2013,12,26) end_date Date.new(2015,1,1) which is actually more useful to me ;)
burlyscudd has quit [Ping timeout: 260 seconds]
<ace_striker> Hanmac: don't say that !
<Hanmac> oh you wanted ranges, i could make that too
drumusician has quit [Ping timeout: 246 seconds]
diegoviola has joined #ruby
<Hanmac> shevy: they are all banished into the Nevermore ;P
<DouweM> Hanmac: I wanted either, went with ranges myself
predator117 has joined #ruby
<ace_striker> shevy: Hanmac : maybe all are working onsite instead of online !!
specious has quit [Ping timeout: 245 seconds]
* Hanmac is still angry that rails/activesupport doesn't get human file sizes right ... and that after so many years
<zxd> status = "peace" buggy_logger = status why isn't it required to use #{status} to get value stored in the variable status?
Azulinho_ has joined #ruby
Azulinho_ has quit [Client Quit]
Azulinho_ has joined #ruby
<Hanmac> zxd where do you think you would need that?
Azulinho has quit [Quit: Leaving]
bayhonan has quit [Read error: Connection reset by peer]
Azulinho_ has quit [Client Quit]
<Hanmac> >> 1+2 #test
Azulinho has joined #ruby
Neomex has joined #ruby
matchaw has quit [Ping timeout: 240 seconds]
matchaw has joined #ruby
Guest42481 has quit [Ping timeout: 272 seconds]
<shevy> zxd you need #{} only in a string man
brunetti has joined #ruby
<shevy> zxd #{} is equivalent to do .to_s
raar has joined #ruby
predator117 has quit [Ping timeout: 246 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
Azulinho has quit [Client Quit]
raar is now known as Guest91611
Wolland has joined #ruby
predator117 has joined #ruby
<Hanmac> shevy did you know that ruby parses "12#{ "str" }34" as "12str34" ? ;P
securitycrush has joined #ruby
<shevy> dunno
<Hanmac> apeiros: you can look too: RubyVM::InstructionSequence.compile('"12#{"str"}34"').disasm.lines[2] #=> "0002 putstring \"12str34\"\n"
<shevy> I dont use #{} much really
Azulinho has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
Azulinho has quit [Client Quit]
Azulinho has joined #ruby
jhaig has joined #ruby
ae-r has quit [Remote host closed the connection]
drago777 has joined #ruby
<Hanmac> shevy i mean the fun is when you use a string literal inside another string literal with #{} ruby parses as only one string
jibi has quit [Read error: Connection reset by peer]
ae-r has joined #ruby
predator117 has quit [Ping timeout: 272 seconds]
retrofade has quit [Ping timeout: 245 seconds]
ewnd9 has joined #ruby
Azulinho has quit [Client Quit]
ekarlso has quit [Changing host]
ekarlso has joined #ruby
Azulinho has joined #ruby
dorei has quit []
breakingthings has joined #ruby
<shevy> ya well
<shevy> will hit only folks who use #{}
jibi has joined #ruby
Neomex has quit [Ping timeout: 264 seconds]
figgleberry has joined #ruby
Neomex has joined #ruby
aryaching has joined #ruby
bogeyd6 has joined #ruby
OdNairy has joined #ruby
mojjojo has quit [Quit: mojjojo]
dagen has quit [Ping timeout: 272 seconds]
rjhunter has joined #ruby
mojjojo has joined #ruby
<jhaig> Hello. I'm trying to access an https page with 'net/http'. I have set http.use_ssl as true and http.cert to the certificate file: http.cert = OpenSSL::X509::Certificate.new(File.read('file.cer')) but it is getting an 'sslv3 alert handshake failure' error.
<jhaig> I can use 'file.cer' to get the page with curl.
krz has quit [Ping timeout: 252 seconds]
mojjojo has quit [Client Quit]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
predator117 has joined #ruby
rickruby has joined #ruby
rjhunter has quit [Ping timeout: 272 seconds]
<jhaig> This is an edited version of what i have: http://pastebin.com/1uYwapXQ
ae-r has quit [Remote host closed the connection]
veterinarian has left #ruby [#ruby]
az has left #ruby [#ruby]
Guest56273 has joined #ruby
rm_ has joined #ruby
mojjojo has joined #ruby
tyl has quit [Ping timeout: 246 seconds]
ae-r has joined #ruby
tyl has joined #ruby
sayan_ has quit [Quit: Leaving]
sayan has joined #ruby
mojjojo has quit [Client Quit]
chopmo has joined #ruby
devdazed has quit [Quit: Bye]
mmitchell has joined #ruby
Guest56273 has quit [Ping timeout: 272 seconds]
Sp4rKy has quit [Ping timeout: 252 seconds]
Sp4rKy has joined #ruby
Hanmac1 has joined #ruby
<WJW> shevy, what will hit folks who use #{}?
Hanmac has quit [Ping timeout: 245 seconds]
mlpinit has joined #ruby
ae-r has quit [Remote host closed the connection]
<shevy> WJW what Hanmac described
relix has joined #ruby
haken29a has left #ruby [#ruby]
sepp2k has joined #ruby
parduse has quit []
sailias has joined #ruby
mojjojo has joined #ruby
Neomex has quit [Quit: Neomex]
Guest56273 has joined #ruby
Guest56273 has quit [Client Quit]
drago777 has quit [Ping timeout: 240 seconds]
krzkrz has joined #ruby
mmitchell has quit [Ping timeout: 240 seconds]
mmitchell has joined #ruby
sharms has quit [Ping timeout: 240 seconds]
totalmajor has joined #ruby
grep_away is now known as grep_awesome
retrofade has joined #ruby
drago777 has joined #ruby
parduse has joined #ruby
habanany has joined #ruby
shime has joined #ruby
carraroj has joined #ruby
sharms has joined #ruby
carraroj has quit [Changing host]
carraroj has joined #ruby
peta_ has joined #ruby
Neomex has joined #ruby
centipedefarmer has joined #ruby
jerius has joined #ruby
Neomex has quit [Client Quit]
shime has quit [Ping timeout: 240 seconds]
shime has joined #ruby
sharms has quit [Ping timeout: 240 seconds]
jcarouth` is now known as jcarouth
browndawg has joined #ruby
byprdct has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
sharms has joined #ruby
krzkrz has quit [Quit: WeeChat 0.4.2]
devdazed has joined #ruby
krzkrz has joined #ruby
maroloccio has joined #ruby
krzkrz has quit [Client Quit]
krz has joined #ruby
shime has quit [Ping timeout: 246 seconds]
shime has joined #ruby
alexherbo2 has quit [Quit: WeeChat 0.4.2]
mojjojo has quit [Quit: mojjojo]
wildroman2 has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
eka has joined #ruby
wildroman2 has joined #ruby
rubyracer has joined #ruby
aagdbl has quit [Quit: Leaving]
blarghmatey__ has quit [Read error: Operation timed out]
aryaching has quit [Ping timeout: 272 seconds]
kcombs has joined #ruby
jinbin__ has joined #ruby
<jinbin__> ruby is good
<pipecloud> shevy: "#{String.new("")}"
retrofade has quit [Ping timeout: 272 seconds]
<shevy> pipecloud awful
lkba has quit [Ping timeout: 246 seconds]
<apeiros> pipecloud: you forgot .to_s
<apeiros> twice, even
aryaching has joined #ruby
<apeiros> oh, thrice, actually
<apeiros> "#{String.new("".to_s).to_s}".to_s
tahzeem has joined #ruby
<shevy> here is a shortcut
<shevy> ""
<apeiros> that's unreadable black magic!
starship has joined #ruby
prc has quit [Quit: Leaving.]
timonv has quit [Remote host closed the connection]
blarghmatey has joined #ruby
timonv has joined #ruby
ludar has joined #ruby
chiel has joined #ruby
rjhunter has joined #ruby
ace_striker has quit [Ping timeout: 272 seconds]
timonv has quit [Ping timeout: 265 seconds]
timonv has joined #ruby
alexherbo2 has joined #ruby
aryaching has quit [Ping timeout: 252 seconds]
<WJW> Has nil.to_s always been ""?
rjhunter has quit [Ping timeout: 245 seconds]
<apeiros> can't comment on "always", but for more than 8 years, yes
psyprus has quit [Ping timeout: 240 seconds]
nfk has quit [Quit: yawn]
psyprus has joined #ruby
AlSquire has joined #ruby
allsystemsarego has joined #ruby
lkba has joined #ruby
aryaching has joined #ruby
figgleberry has quit [Ping timeout: 260 seconds]
dpaulus has joined #ruby
krz has quit [Ping timeout: 240 seconds]
fuhgeddaboudit has joined #ruby
<shevy> I guess it could not be anything else when cast to a string
burlyscudd has joined #ruby
<shevy> "".to_nil
<shevy> NoMethodError: undefined method `to_nil' for "":String
<shevy> :(
<apeiros> shevy: it could be "nil", just like false.to_s is "false"
<shevy> ohhhh
<shevy> weird
<apeiros> or it could be "#<NilClass:0x00000000000008>", like Object#to_s
<WJW> Since nil.to_s is "", then "foo#{}bar" evaluates to "foobar", even if you insert a line break and some other whitespace in the {}
flame_ has joined #ruby
<apeiros> the linebreak part is unrelated, though
<apeiros> since #{} contains code, not a string, and in code, the linebreaks don't matter
<apeiros> (apart from separating statements)
TheNumb_ has quit [Quit: ZNC - http://znc.in]
vlad_starkov has quit [Remote host closed the connection]
<WJW> I usually break string literals in source code with closing the string, +, opening another string.
browndawg has quit [*.net *.split]
rm_ has quit [*.net *.split]
matchaw has quit [*.net *.split]
dayepa has quit [*.net *.split]
z has quit [*.net *.split]
snath has quit [*.net *.split]
bgy has quit [*.net *.split]
pipecloud has quit [*.net *.split]
lupine has quit [*.net *.split]
vlad_starkov has joined #ruby
<WJW> I like programs not to be so wide I can't read them on the left or right half of my screen.
TheNumb has joined #ruby
alexherb1 has joined #ruby
<apeiros> you can use the fact that `"foo" "bar"` is "foobar" and escape the newline, like so:
<WJW> I believe that the emptiness in {} evaluates to nil and so if nil.to_s returned "nil", then using {} to insert whitespace for readability wouldn't work.
samsonasu has joined #ruby
<shevy> hmm
lewix has joined #ruby
<shevy> "long string is very long"
cgcardona_ has joined #ruby
cgcardona_ has quit [Client Quit]
<DouweM> >> def nil.to_s; "nil"; end; "foo#{}bar"
<shevy> oh man, it's too early in the day for elementary truths like that
<DouweM> => "foonilbar", so WJW, you're right :)
<apeiros> that variant doesn't invoke a method, i.e. it's processed at parse time
mengu has joined #ruby
<DouweM> you mean my code? it works in irb anyway
<WJW> Hmm, I didn't know the syntax would allow you to juxtapose two string constructors/literals.
jinbin__ has quit [Ping timeout: 272 seconds]
TomRone has quit [Ping timeout: 240 seconds]
<apeiros> WJW: I do ruby for over 8 years and still occasionally discover new things :)
<Hanmac1> DouweM: nice Question: when you do "def nil.meth;end" where will the method defined? ;P
_4VW has joined #ruby
z has joined #ruby
rm_ has joined #ruby
browndawg has joined #ruby
lupine has joined #ruby
snath has joined #ruby
dayepa has joined #ruby
pipecloud has joined #ruby
matchaw has joined #ruby
bgy has joined #ruby
z has quit [Ping timeout: 246 seconds]
<shevy> I do ruby for a long time and I constantly discover new things especially things I once knew years ago but already forgot
<WJW> Hanmac1, it will be defined on the real class of nil.
z has joined #ruby
TomRone has joined #ruby
<Hanmac1> yeah, because nil,true and false does cheat about #singleton_class
_4V_ has quit [Ping timeout: 252 seconds]
<shevy> so much cheating
_4VW is now known as _4V_
<DouweM> makes sense when NilClass, TrueClass and FalseClass are singletons already
pengunix has joined #ruby
Shayan_ has joined #ruby
<WJW> I guess there's no need to care.
<pengunix> What is the difference between gem 'bundle' and gem 'bundler'? Because both are installed when installing 'bundle'...
snath has quit [Ping timeout: 246 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
<shevy> Hanmac1, now it's your time to shine, a bundler question arose
Hanmac1 is now known as Hanmac
<DouweM> pengunix: you're looking for "bundler", but because you're not the first to make that typo, "bundle" exists as well as a no-op, except for requiring the real "bundler"
<Hanmac> bundler is the new rails ... everyone wants to use it, even if its not necessary ...
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
<WJW> How else you keep track of what gem versions you need?
_4V_ has quit []
<shevy> Hanmac hehehe
clamstar has joined #ruby
<shevy> WJW always the latest and greatest
cbetta is now known as cbetta_afk
cbetta_afk is now known as cbetta
<pengunix> ah
<Hanmac> WjW i just uses the newest version possible and if its not working i update my own code (otherwise you may bet diamond depending problem and THEN it bites you in your ass)
<pengunix> this makes things clear, thank you
vlad_starkov has quit [Remote host closed the connection]
<WJW> Don't like the idea of a project changing its behavior when I haven't changed the code.
<shevy> you don't want to get your ass bitten!
freerobby has joined #ruby
wmoxam_ has quit [Quit: leaving]
wmoxam has joined #ruby
JZTech101 has joined #ruby
retrofade has joined #ruby
ludar has quit [Ping timeout: 245 seconds]
coca_rails has joined #ruby
Xiti has joined #ruby
vlad_starkov has joined #ruby
Hanmac1 has joined #ruby
Shayan_ has quit [Quit: Page closed]
ace_striker has joined #ruby
Hanmac has quit [Ping timeout: 260 seconds]
juarlex has quit [Remote host closed the connection]
xiphias has quit [Ping timeout: 240 seconds]
agjacome has joined #ruby
<apeiros> Hanmac1: bundler gets integrated into rubygems, so needless usage might drop a bit
Hanmac1 is now known as Hanmac
roadt has joined #ruby
xiphias has joined #ruby
jerius has quit []
<Hanmac> apeiros: i might not have a problem with that when they do it right ... but the diamond depending problem still exist
rickruby has quit [Remote host closed the connection]
bsdbeard has joined #ruby
Kruppe- has quit [Ping timeout: 240 seconds]
pengunix has left #ruby [#ruby]
krz has joined #ruby
coca_rails has quit [Remote host closed the connection]
<shevy> ack
<shevy> bundler will be assimilated into rubygems?
mary5030 has joined #ruby
<Hanmac> apeiros: my current problem with bundler (and also a bit with rvm & others) is that its users update their ruby version but forget to reinstall all the native gems ... the last time i got such a problem was because all "#nil?" tests does fail
Bumptious has quit [Remote host closed the connection]
<shevy> bundler helps lazy users and newbies
chopmo has quit [Remote host closed the connection]
_maes_ has joined #ruby
<apeiros> Hanmac: native gems?
<apeiros> there's no such thing :)
Bumptious has joined #ruby
<apeiros> also, #nil? is core, that does not require any gem…
Kruppe has joined #ruby
juarlex has joined #ruby
<apeiros> got to go, bye
<Hanmac> apeiros: i mean C-extensions
apeiros has quit []
tahzeem has quit [Ping timeout: 240 seconds]
sharms has quit [Ping timeout: 240 seconds]
juarlex has quit [Remote host closed the connection]
tahzeem has joined #ruby
chopmo_ has joined #ruby
russt_ has quit [Quit: russt_]
_maes_ has quit [Client Quit]
sharms has joined #ruby
jerius has joined #ruby
bean has joined #ruby
starship has left #ruby ["WeeChat 0.4.3-dev"]
TomRone has quit [Ping timeout: 240 seconds]
<shevy> Hanmac will bundler really become integrated?
<Hanmac> i dont know, we will see
<DrOwl> Hi All, i am having confusions with a gem "HTTPClient/SSLConfig" i am trying to get it not to report an error/warning becouse of a self signed sert
smathieu has joined #ruby
clarknoah has joined #ruby
<DrOwl> I have tried verify_mode = 0 and "options = OpenSSL::SSL::VERIFY_NONE" and a few other things i forget, but can not get it to stop wanrning,
<DrOwl> and suggestions?
TomRone has joined #ruby
<DrOwl> ^any
workmad3 has joined #ruby
lyanchih_ has joined #ruby
bean has quit [Ping timeout: 240 seconds]
totalmajor has quit [Remote host closed the connection]
totalmajor has joined #ruby
mercwithamouth has joined #ruby
[0x1a] has joined #ruby
Wolland has quit []
asteve has joined #ruby
devdazed has quit [Quit: Bye]
sayan has quit [Quit: Leaving]
devdazed has joined #ruby
krnflake has quit [Ping timeout: 252 seconds]
mlpinit_ has joined #ruby
Wolland has joined #ruby
totalmajor has quit [Ping timeout: 240 seconds]
interactionjaxsn has joined #ruby
sambao21 has joined #ruby
ambushsabre has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mlpinit has quit [Ping timeout: 260 seconds]
bean has joined #ruby
bean has quit [Max SendQ exceeded]
larssmit has quit [Quit: Leaving.]
[0x1a] has quit [Changing host]
[0x1a] has joined #ruby
[0x1a] has quit [Changing host]
[0x1a] has joined #ruby
bean has joined #ruby
ludar has joined #ruby
larissa has joined #ruby
elux has joined #ruby
iamjarvo has joined #ruby
krz has quit [Read error: Operation timed out]
kevind_ has joined #ruby
krnflake has joined #ruby
psyl0n_ has quit [Remote host closed the connection]
krz has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
russt has joined #ruby
russt has quit [Remote host closed the connection]
mengu has quit []
russt has joined #ruby
russt has quit [Client Quit]
<bsdbeard> Trying to install a ruby project, did bundle install, now it says "Xapian version 1.2.15 or higher required", even though bundle install installed xapian-ruby 1.2.15.1
* bsdbeard knows nothing about ruby/gem/bundle
retrofade has quit [Ping timeout: 272 seconds]
rjhunter has joined #ruby
butblack has joined #ruby
russt has joined #ruby
<Hanmac> bsdbeard: #bundler
clamstar has quit [Ping timeout: 252 seconds]
<bsdbeard> alright
IceDragon has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
interactionjaxsn has quit [Remote host closed the connection]
joast has joined #ruby
smathieu has joined #ruby
clamstar has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
rjhunter has quit [Ping timeout: 240 seconds]
noop has quit [Ping timeout: 252 seconds]
predator117 has quit [Ping timeout: 265 seconds]
iamjarvo has quit [Remote host closed the connection]
predator117 has joined #ruby
iamjarvo has joined #ruby
smathieu has quit [Ping timeout: 252 seconds]
drago777 has quit [Ping timeout: 240 seconds]
jerius has quit [Ping timeout: 245 seconds]
chopmo_ has quit [Remote host closed the connection]
krz has quit [Ping timeout: 245 seconds]
iamjarvo_ has joined #ruby
drago777 has joined #ruby
smathieu has joined #ruby
MindfulMonk has joined #ruby
iamjarvo has quit [Ping timeout: 246 seconds]
assurbanipal has joined #ruby
psyl0n has joined #ruby
psyl0n has quit [Changing host]
psyl0n has joined #ruby
centipedefarmer has joined #ruby
psyl0n has quit [Remote host closed the connection]
clarknoah has quit [Quit: clarknoah]
alexherb1 has quit [Quit: WeeChat 0.4.3-dev]
geggam has joined #ruby
clarknoah has joined #ruby
psyl0n has joined #ruby
psyl0n has quit [Changing host]
psyl0n has joined #ruby
butblack has quit [Quit: butblack]
butblack has joined #ruby
_br_ has quit [Ping timeout: 252 seconds]
<shevy> RUBY_VERSION # => "1.9.3"
<shevy> but on the commandline "ruby -v"
<shevy> ruby 1.9.3p448 (2013-06-27 revision 41675) [i686-linux]
<shevy> is there a way to get the full string from within a ruby file or irb like that?
Blue_Ice_ has quit [Ping timeout: 272 seconds]
chopmo has joined #ruby
Blue_Ice has joined #ruby
psyl0n has quit [Remote host closed the connection]
krzkrz has joined #ruby
<yasu> RUBY_PATCHLEVEL or RUBY_DESCRIPTION
_br_ has joined #ruby
aryaching_ has joined #ruby
<yasu> RUBY_REVISION is also available.
aryaching has quit [Ping timeout: 252 seconds]
interactionjaxsn has joined #ruby
kure_ has joined #ruby
<shevy> cool thanks yasu
axl_ has joined #ruby
krnflake has quit [Ping timeout: 246 seconds]
tylersmith has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
SHyx0rmZ has joined #ruby
iamjarvo has joined #ruby
figgleberry has joined #ruby
lmickh has joined #ruby
nateberkopec has joined #ruby
kure has quit [Ping timeout: 252 seconds]
krzkrz has quit [Ping timeout: 240 seconds]
Advocation has joined #ruby
<Hanmac> shevy: beware RUBY_PATCHLEVEL can be negative ;P
nomenkun has joined #ruby
bluenemo has joined #ruby
<shevy> I will use RUBY_DESCRIPTION
SHyx0rmZ has quit [Ping timeout: 248 seconds]
mary5030_ has joined #ruby
burlyscudd has quit [Quit: Leaving.]
Astralum has joined #ruby
bluenemo has quit [Max SendQ exceeded]
SHyx0rmZ has joined #ruby
bluenemo_ has joined #ruby
abra has quit [Quit: Textual IRC Client: www.textualapp.com]
bluenemo has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
peta_ has quit [Quit: peta_]
<shevy> hmmm
bluenemo_ has quit [Max SendQ exceeded]
<shevy> rails shows on localhost:3000
<shevy> "Ruby version1.9.3 (i686-linux)"
krzkrz has joined #ruby
mary5030 has quit [Ping timeout: 252 seconds]
bluenemo_ has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
chopmo has quit [Remote host closed the connection]
lewix has quit [Remote host closed the connection]
BuGo_ has joined #ruby
<BuGo_> Hi
drago777 has joined #ruby
<BuGo_> Previously kill -2 PID used to throw Interrupt exception. How to do it now?
aryaching_ has quit [Ping timeout: 272 seconds]
oddalot has quit [Ping timeout: 260 seconds]
workmad3 has quit [Read error: Operation timed out]
psyl0n has joined #ruby
<BuGo_> Previously kill -2 PID used to throw Interrupt exception. How to do it now?
havenwood has joined #ruby
meatherly has joined #ruby
<meatherly> rails testing question. Should you ever do an assert in a loop? Something like User.all.each{ |user| page.should have_content user.name }
weeems is now known as weems
weems has quit [Changing host]
weems has joined #ruby
danshult_ has quit []
aryaching has joined #ruby
krzkrz has quit [Ping timeout: 272 seconds]
<shevy> ack
<shevy> is that not better for #RubyOnRails channel
<meatherly> lol going there now. sorry about that
roadt has quit [Ping timeout: 245 seconds]
jhaig_ has joined #ruby
Megtastique has joined #ruby
<shevy> no worries, many people here in #ruby don't know rails
cgore has joined #ruby
_maes_ has joined #ruby
mlpinit_ has quit [Remote host closed the connection]
<meatherly> I mean I could also just ask is good to do an assert in a loop?
jhaig has quit [Ping timeout: 264 seconds]
jhaig_ is now known as jhaig
mlpinit has joined #ruby
pagioss is now known as pagios
habanany has quit [Ping timeout: 252 seconds]
meatherly has quit [Remote host closed the connection]
meatherly has joined #ruby
drim has joined #ruby
<drim> : Im using em-websocket and im trying to read websocket request headers. I can access it throw ws.handshake.headers but is it an easy way to parse it to get the cookie?
<terrellt> meatherly: That seems silly to me. Test states, not all users. Especially since you should probably only have one user for a test.
gja has joined #ruby
clamstar has quit [Ping timeout: 252 seconds]
<meatherly> true true.
jerius has joined #ruby
ace_striker has quit [Ping timeout: 272 seconds]
clamstar has joined #ruby
lyanchih_ has quit [Quit: lyanchih_]
psyl0n has quit [Read error: Connection reset by peer]
chomskiii has quit [Ping timeout: 265 seconds]
burlyscudd has joined #ruby
<ForceMultiplier> can ya'll help me
<ForceMultiplier> i tested some simple code in IRB
<WJW> Depends.
<ForceMultiplier> and it works there
butblack has quit [Quit: butblack]
<ForceMultiplier> but when i use it across two .rb's it doesnt work
<ForceMultiplier> and im confused
<olivier_bK> i have a question about how to get the output of script
AlSquire has quit [Quit: This computer has gone to sleep]
<WJW> ForceMultiplier, does one of the .rb's load the other?
<olivier_bK> i need to execute one script in the server A by server B and i would want to know if he make a good job or bad job ?
alex88 has joined #ruby
<ForceMultiplier> thats the code that works, in IRB
oddalot has joined #ruby
<ForceMultiplier> @imdb['Title'] is what I want in the 2nd .rb
<meatherly> shevy: Is the #RubyOnRails channel down? I can't seem to join it :(
<alex88> I've read about duck typing, basically means you don't have to check what the object class name is, but which method it supports, right?
<shevy> meatherly no it is up, but you have to be registered on freenode to join
<WJW> olivier_bK, I guess that's more a question of communication over a network.
<shevy> #ruby requires no such registration
<WJW> alex88, yes.
<meatherly> How would I do this?
<meatherly> Or I could google it lol
<shevy> meatherly I dont remember... it's been years... I am gonna google
drago777 has quit [Ping timeout: 240 seconds]
senj has joined #ruby
<alex88> WJW: thanks ;)
<shevy> look at the part about "register" it should give you links or tell you how
<shevy> basically you somehow have to send some /commands and continue there, then you are registered
<ForceMultiplier> WJW: and here are the two .rb's https://gist.github.com/FPSDavid/5da57cd1807bf62d21d5
<terrellt> alex88: Except usually you don't check, you just call it.
<terrellt> alex88: If it doesn't quack then it'll complain. ;)
interactionjaxsn has quit [Remote host closed the connection]
<shevy> if it does not quack
<WJW> alex88, you use a design to assure yourself that you are doing the right thing.
<shevy> it's a dead duck ready for cooking
Advocation has quit [Quit: Advocation]
interactionjaxsn has joined #ruby
<WJW> alex88, think about interfaces even if the language doesn't provide a way to define them.
clarknoah has quit [Quit: clarknoah]
<WJW> alex88, I want this object to conform to duck behavior, so it has to know how to quack.
ambushsabre has quit [Quit: rip]
<WJW> ForceMultiplier, so when you try the same thing from a script, it fails?
drago777 has joined #ruby
<ForceMultiplier> WJW: IRB works, the .rb + two .erb's = doesnt work
Tearan has joined #ruby
<terrellt> ForceMultiplier: Post the code that doesn't work. I bet this is a scoping problem.
interactionjaxsn has quit [Ping timeout: 272 seconds]
aryaching has quit [Ping timeout: 260 seconds]
olivier_bK has quit [Ping timeout: 252 seconds]
<terrellt> Lol
alexherb1 has joined #ruby
AlSquire has joined #ruby
<ForceMultiplier> oh duh
* ForceMultiplier smacks self
<shevy> ohhh
<terrellt> We all do it, no worries.
<shevy> an imdb movie database reader
alexherb1 has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
<shevy> I wanna search for The Hobbit ForceMultiplier!
HD_ has joined #ruby
<terrellt> ForceMultiplier: https://github.com/ariejan/imdb This looks like it may save you some time
<ForceMultiplier> i'm doing it more for a learning experience
<ForceMultiplier> not to just have one
mneorr has joined #ruby
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
<ForceMultiplier> dont even want it, just thought it'd be an easy way to learn
<ForceMultiplier> simple app
<terrellt> Seems reasonable.
<alex88> WJW: yeah that's the idea, thanks for explaining ;)
Wolland has quit [Remote host closed the connection]
cgore has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<ForceMultiplier> okay, it works for 1-word movie titles now
<ForceMultiplier> but i have no clue how to make it work for multi-word ones...
totalmajor has joined #ruby
grep_awesome is now known as grep_away
TomRone has joined #ruby
<terrellt> ForceMultiplier: You probably have to parse the string to be URL friendly.
drago777 has quit [Ping timeout: 240 seconds]
nomenkun has quit [Read error: Operation timed out]
drago777 has joined #ruby
<BuGo_> Previously kill -2 PID used to throw Interrupt exception. How to do it now?
croaky has joined #ruby
peregrine81 has joined #ruby
burlyscudd has quit [Quit: Leaving.]
kraljev0 has joined #ruby
geekbri has quit []
<kraljev0> How to transform ruby expression to expression tree
<kraljev0> something like this:
<kraljev0> "func(3+2, 4) + 2 * 5" -> [:+, [:func, [:+, 3, 2], 4], [:*, 2, 5]]
retrofade has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<ForceMultiplier> terrellt, having difficulty making that work properly
meatherly has quit [Read error: Connection reset by peer]
<kraljev0> so, if we have a string that is valid if you eval() it:
<kraljev0> "func(3+2, 4) + 2 * 5"
<kraljev0> produce this array:
<kraljev0> [:+, [:func, [:+, 3, 2], 4], [:*, 2, 5]]
meatherly has joined #ruby
havenwood has quit [Remote host closed the connection]
Guest16703 is now known as banghouse
havenwood has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
<kraljev0> if you call .flatten on that, you get prefix notation
wallerdev has joined #ruby
<kraljev0> also called polish notation: https://en.wikipedia.org/wiki/Polish_notation
tylersmith has quit [Remote host closed the connection]
croaky has quit [Ping timeout: 252 seconds]
simplyaubs has joined #ruby
kate_r_ has quit [Ping timeout: 272 seconds]
meatherly has quit []
drago777 has joined #ruby
meatherly has joined #ruby
ehc has joined #ruby
clarknoah has joined #ruby
kate_r has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<apeiros> kraljev0: Ripper, whitequark's parser (don't know the name), zenspiders parser (ruby_parser I think)
zipper has joined #ruby
zipper has quit [Client Quit]
<kraljev0> thanks, going to look into that
zipper has joined #ruby
<apeiros> also, what you have is an AST, not polish notation.
<apeiros> polish notation is flat
user258467 has quit [Quit: Quitte]
ambushsabre has joined #ruby
<kraljev0> if you call .flatten on that,
<kraljev0> :)
<kraljev0> also: How to transform ruby expression to expression tree
joaoh82_ has quit [Remote host closed the connection]
alexherb1 has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
wildroman2 has joined #ruby
Jake232 has joined #ruby
retrofade has quit [Ping timeout: 252 seconds]
clarknoah has quit [Quit: clarknoah]
mneorr has quit [Remote host closed the connection]
jhaig has quit [Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]]
clamstar has quit [Quit: Computer has gone to sleep.]
mneorr has joined #ruby
assurbanipal has quit [Remote host closed the connection]
clarknoah has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
ozgun has quit [Quit: Leaving]
clarknoah has quit [Client Quit]
grep_away is now known as grep_awesome
TomRone has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
ArchSurf has joined #ruby
mneorr has quit [Ping timeout: 272 seconds]
vismay has joined #ruby
TomRone has joined #ruby
ylluminate has joined #ruby
mklappstuhl has joined #ruby
<ericwood> ugh, maintainer of this Gem hasn't touched it in 3 years, won't respond to my emails asking if I can take over it as a maintainer
<ericwood> won't touch pull requests, no commits in 3 years
<havenwood> ericwood: fork eet!@
<ericwood> havenwood: currently have a fork used for my work, but I'm annoyed that none of my changes are available for anyone else who uses the gem :(
grep_awesome is now known as grep_away
<ericwood> plus I'd like to maintain an OSS project that people use
rjhunter has joined #ruby
<havenwood> ericwood: can maintain the fork, a good number of popular projects started as forks of an unmaintained code spike or the like
<ericwood> havenwood: right, but if you do "gem install pygmentize" you'll get the shitty one
<havenwood> ericwood: ah, a known gem
<ericwood> yeah, lots of people use it
ArchSurf has quit [Quit: Leaving]
<ericwood> emailed the maintainer again today, maybe this time he won't ignore me
ArchSurf has joined #ruby
<havenwood> ericwood: did you try both the owners?
krnflake has joined #ruby
guiocavalcanti has joined #ruby
<ericwood> oh good point, there's multiple
<ericwood> I guess they'd have to give me access to the rubygems account too
<ericwood> idk how that stuff works
deception has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
danshultz has quit [Read error: Connection reset by peer]
ArchSurf has quit [Client Quit]
<ericwood> havenwood: wait, how are you seeing the maintainers?
<havenwood> ericwood: well, for the purpose of being able to push the newly cut gem, need a person in the spec.authors Array in the gem's .gemspec
jonathanwallace has quit [Ping timeout: 272 seconds]
<havenwood> oops, L8
bsdbeard has quit [Quit: :wqa[ll]!]
<ericwood> ah cool, thanks!
<havenwood> L7 for the corresponding email addys :P
<havenwood> ericwood: np
rjhunter has quit [Ping timeout: 246 seconds]
maletor has joined #ruby
clamstar has joined #ruby
maletor has quit [Remote host closed the connection]
kevind__ has joined #ruby
blandflakes has joined #ruby
ziggles has joined #ruby
croaky has joined #ruby
interactionjaxsn has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
yshh has quit [Read error: Connection reset by peer]
interactionjaxsn has joined #ruby
<ericwood> well, fingers crossed
yshh has joined #ruby
<ziggles> I'm using faraday to communicate with a flakey 3rd party API and manually checking response codes/exceptions… Does anyone know if this sort of thing belongs in a faraday middleware?
meatherly has quit [Read error: Connection reset by peer]
drago777 has joined #ruby
meatherly has joined #ruby
timonv has quit [Remote host closed the connection]
iamjarvo has quit []
iamjarvo has joined #ruby
maletor has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
danshultz has joined #ruby
kevind_ has quit [Ping timeout: 272 seconds]
txdv has quit [Ping timeout: 245 seconds]
jonathanwallace has joined #ruby
estebistec has joined #ruby
Wolland has joined #ruby
interactionjaxsn has quit [Ping timeout: 245 seconds]
silent_root has joined #ruby
flame_ has quit [Quit: Computer has gone to sleep.]
kidoz has joined #ruby
krainbol1greene is now known as krainboltgreene
croaky has quit [Ping timeout: 240 seconds]
croaky has joined #ruby
vismay has quit [Ping timeout: 240 seconds]
guiocava_ has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
interactionjaxsn has joined #ruby
pushpak has joined #ruby
flubba has joined #ruby
relix has joined #ruby
TomRone has joined #ruby
guiocavalcanti has quit [Ping timeout: 272 seconds]
mzdravkov has joined #ruby
m8 has quit [Quit: Sto andando via]
bsdbofh has joined #ruby
sambao21 has joined #ruby
mzdravkov has quit [Read error: Connection reset by peer]
mzdravkov has joined #ruby
croaky has quit [Ping timeout: 240 seconds]
CaptainJet has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
HD_ has quit [Ping timeout: 248 seconds]
bluenemo_ has quit [Remote host closed the connection]
bluenemo has quit [Remote host closed the connection]
<kraljev0> What is the best way to search for a subsequence in array
jerius has quit []
<kraljev0> example: [1,2,3,;a,4], [2,3]
<kraljev0> that would return 1
jerius has joined #ruby
<kraljev0> [:a,4] would return 4
<kraljev0> 3
arietis has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.2]
arietis has quit [Client Quit]
soobus has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
Czupa has joined #ruby
<havenwood> kraljev0: i don't get what you're trying to do
agent_white has joined #ruby
arietis has joined #ruby
<kraljev0> [1,2,3,4,5,6,7,8,9,"x","y",5]
<kraljev0> that is an example array
echevemaster has quit [Ping timeout: 260 seconds]
<kraljev0> i want the position of the [9, "x", "y"] subsequenc
<kraljev0> nil if not present
<shevy> and what is the query condition
<shevy> why is it not 6,7,8
<canton7> array.each_cons(2).to_a.index([:a,4]) is a slightly expensive way of doing it
dru has joined #ruby
echevemaster has joined #ruby
drago777 has joined #ruby
<canton7> he's trying to find the position of a subarray in another array
<kraljev0> input: main array A, child array C
ziggles has quit [Quit: ziggles]
<kraljev0> output: position of C in A
TomRone has quit [Ping timeout: 240 seconds]
<kraljev0> current idea is
vpretzel_ has joined #ruby
<kraljev0> use find for the first element
<kraljev0> then take subarray starting at that position, C.size long
grep_away is now known as grep_awesome
<kraljev0> see if they are equal
cbetta is now known as cbetta_afk
<havenwood> kraljev0: you want only the first match?
<kraljev0> not sure yet
<havenwood> canton7: nice, i was thinking #each_cons with #with_index but #to_a.index is neat
vpretzel has quit [Disconnected by services]
lukec has joined #ruby
vpretzel_ is now known as vpretzel
TomRone has joined #ruby
<kraljev0> canton your solution is slow and wrong
<havenwood> kraljev0: >> [1,2,9,"x","y",3,4,5,6,7,8,9,"x","y",5].each_cons(3).with_index.with_object([]) { |(group, index), result| result << index if group == [9, "x", "y"] }
<kraljev0> it finds array only if at the boundary
<havenwood> => [2, 11]
<canton7> kraljev0, "... is a slightly expensive way of doing it"
<havenwood> kraljev0: good point on boundary
lukec has quit [Client Quit]
<kraljev0> >> [1,2,9,"x","y",3,4,5,6,7,9,"x","y",5].each_cons(3).with_index.with_object([]) { |(group, index), result| result << index if group == [9, "x", "y"] }
lukec has joined #ruby
vismay has joined #ruby
grep_awesome is now known as grep_away
<canton7> hmm? #each_cons(2) returns [[1, 2], [2, 3], [3, 4], etc]
guiocava_ has quit []
ankov has joined #ruby
guiocavalcanti has joined #ruby
<kraljev0> oh, each_cons works
<havenwood> >> [9, "x", "y"].each_cons(3).with_index.with_object([]) { |(group, index), result| result << index if group == [9, "x", "y"] }
<havenwood> #=> [0]
<kraljev0> I think this is just great idea
<kraljev0> thanks guys
<canton7> kraljev0, so it's correct and I listed the caveats :) I don't like the #to_a though - havenwood's is better on that count
blackmesa has joined #ruby
ambushsabre has quit [Quit: rip]
bean has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
jerius has quit []
jerius has joined #ruby
croaky has joined #ruby
dima has joined #ruby
vpretzel_ has joined #ruby
vpretzel has quit [Disconnected by services]
vpretzel_ is now known as vpretzel
ankov has quit [Ping timeout: 245 seconds]
burlyscudd has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubyracer has quit [Ping timeout: 272 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
FANATIK has joined #ruby
<FANATIK> RUBY IS NASTY
sambao21 has joined #ruby
<devdvd> yep, nasty like a hot chic that loves to get down
<FANATIK> ASDJ;ADFSJ;K;JKLSDFJKL;SDAFJ;LKJAFSD;KLJ;LKASFDJ;LKJ LDSJAKLJA;KLFDS ASDJ;ADFSJ;K;JKLSDFJKL;SDAFJ;LKJAFSD;KLJ;LKASFDJ;LKJ LDSJAKLJA;KLFDS
olivier_bK has joined #ruby
<FANATIK> ASDJ;ADFSJ;K;JKLSDFJKL;SDAFJ;LKJAFSD;KLJ;LKASFDJ;LKJ LDSJAKLJA;KLFDS ASDJ;ADFSJ;K;JKLSDFJKL;SDAFJ;LKJAFSD;KLJ;LKASFDJ;LKJ LDSJAKLJA;KLFDS
<FANATIK> ASDJ;ADFSJ;K;JKLSDFJKL;SDAFJ;LKJAFSD;KLJ;LKASFDJ;LKJ LDSJAKLJA;KLFDS ASDJ;ADFSJ;K;JKLSDFJKL;SDAFJ;LKJAFSD;KLJ;LKASFDJ;LKJ LDSJAKLJA;KLFDS
FANATIK has quit [Killed (idoru (Spam is off topic on freenode.))]
securitycrush has quit [Quit: Leaving]
drago777 has quit [Ping timeout: 240 seconds]
iliketurtles has joined #ruby
<havenwood> apeiros: ^ find your ssh key yet? :P
rubyracer has joined #ruby
joaoh82 has joined #ruby
g0bl1n has joined #ruby
<havenwood> hmm, looks like take BigDecimal math in 2.1 with a grain of salt until 2.1.1: https://bugs.ruby-lang.org/issues/9316
drago777 has joined #ruby
rm_ has quit [Remote host closed the connection]
flubba has quit [Remote host closed the connection]
rm_ has joined #ruby
<havenwood> hmm, although target is currently set at 2.2.0
cid404 has quit [Quit: cid404]
subbyyy has joined #ruby
flubba has joined #ruby
DouweM has quit [Quit: Leaving...]
rm_ has quit [Remote host closed the connection]
arietis has joined #ruby
rm_ has joined #ruby
DanKnox has left #ruby [#ruby]
joaoh82 has quit [Ping timeout: 260 seconds]
clamstar has quit [Quit: Computer has gone to sleep.]
alexherb1 has quit [Quit: WeeChat 0.4.3-dev]
linduxed has quit [Read error: Connection reset by peer]
clamstar has joined #ruby
ankov has joined #ruby
flubba has quit [Ping timeout: 272 seconds]
<zzak> havenwood: we can do a gem release for BD
ssvo has joined #ruby
<havenwood> zzak: oh sweet!
<havenwood> zzak: that is certainly convenient :D
bean has quit [Ping timeout: 240 seconds]
g0bl1n has quit [Ping timeout: 260 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
grep_away is now known as grep_awesome
kidoz has quit [Quit: Ухожу я от вас]
bean has joined #ruby
Jake232 has joined #ruby
tylersmith has joined #ruby
zxd has quit [Ping timeout: 264 seconds]
Urocyon has joined #ruby
Tearan has quit []
drago777 has quit [Ping timeout: 240 seconds]
Guest82348 has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
drago777 has joined #ruby
rm_ has quit [Remote host closed the connection]
rm_ has joined #ruby
silent_root has quit [Quit: leaving]
<apeiros> havenwood: not my ssh key, my keychain
<havenwood> apeiros: ah, right
<apeiros> and I know where it is, it's just not accessible
ankov has quit [Ping timeout: 248 seconds]
Jake232 has quit [Ping timeout: 240 seconds]
exelens has joined #ruby
<apeiros> I could probably make it accessible, but I didn't want to spend the effort, since my laptop was expected to return after 3-5 days. which it hasn't :(
cj3kim_ has joined #ruby
rm_ has quit [Read error: No route to host]
burlyscudd has quit [Quit: Leaving.]
rm_ has joined #ruby
<havenwood> ouch, the idea of a more-than-five-day repair makes me want to have a clone of my laptop as backup
Tearan has joined #ruby
<havenwood> but too $$
sailias has quit [Ping timeout: 272 seconds]
havenwood has quit [Remote host closed the connection]
centipedefarmer has quit [Remote host closed the connection]
exelens has quit [Remote host closed the connection]
heidi has joined #ruby
<apeiros> oh, havenwood is gone…
* apeiros wanted to reply
centipedefarmer has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
Tearan has quit [Ping timeout: 252 seconds]
cj3kim_ has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
TomRone has joined #ruby
burlyscudd has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
Jake232 has joined #ruby
arietis has joined #ruby
lewix has joined #ruby
Wolland has quit [Remote host closed the connection]
carraroj has quit [Ping timeout: 260 seconds]
nestula has joined #ruby
drago777 has joined #ruby
nestula has quit [Remote host closed the connection]
mneorr has joined #ruby
rubyracer has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 246 seconds]
rubyracer has joined #ruby
lukec has quit [Quit: lukec]
HD_ has joined #ruby
<shevy> oh man your laptop is still held as a hostage?
alex88 has quit [Quit: Leaving...]
drago777 has quit [Ping timeout: 240 seconds]
aspiers has joined #ruby
shime has quit [Ping timeout: 264 seconds]
flubba has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
ace_striker has joined #ruby
mneorr has quit [Remote host closed the connection]
drago777 has joined #ruby
blindingdawn has joined #ruby
mneorr has joined #ruby
seemant has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
HD_ has quit [Ping timeout: 272 seconds]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drumusician has joined #ruby
jkamenik has joined #ruby
TomRone has joined #ruby
cj3kim_ has joined #ruby
<blindingdawn> I'm trying to install Calabash-Cucumber and get the following error message: https://gist.github.com/anonymous/6908f154b00cc8083a16 Any suggestions?
Mars` has joined #ruby
cj3kim__ has joined #ruby
glosoli has joined #ruby
<glosoli> Hey, any resources where one could read on lazy evaluation in the recent releases of Ruby ?
subbyyy has quit [Ping timeout: 272 seconds]
ewnd9 has quit [Ping timeout: 264 seconds]
Mars has joined #ruby
Mars` has quit [Read error: Connection reset by peer]
Mars is now known as Guest49643
RoryHughes has quit []
cj3kim_ has quit [Ping timeout: 246 seconds]
alexherb1 has joined #ruby
mordocai has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
retrofade has joined #ruby
Guest82348 has quit [Ping timeout: 252 seconds]
DanKnox has joined #ruby
shadoi has joined #ruby
meatherly has quit [Read error: Connection reset by peer]
duracrisis has joined #ruby
RoryHughes has joined #ruby
gregoriokusows-1 has joined #ruby
Zai00 has quit [Quit: Zai00]
duracrisis has quit [Changing host]
duracrisis has joined #ruby
meatherly has joined #ruby
gregoriokusowski has quit [Ping timeout: 264 seconds]
Guest78940 has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
ankov has joined #ruby
kraljev0 has left #ruby [#ruby]
mordocai has joined #ruby
vismay has quit [Quit: Leaving]
linduxed has joined #ruby
glosoli has left #ruby ["Textual IRC Client: www.textualapp.com"]
interactionjaxsn has quit [Remote host closed the connection]
ankov has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
interactionjaxsn has joined #ruby
ace_striker_ has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
St_Marx has quit [Remote host closed the connection]
<platzhirsch> How would I design interfaces in Ruby? Simply with a base class I guess
jhn has joined #ruby
blueOxigen has joined #ruby
<apeiros> platzhirsch: why'd you "design interfaces" in ruby?
ankov has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
<apeiros> what problem do you want to solve?
ace_striker_ has quit [Client Quit]
<platzhirsch> Mh, I want to structure my code...
<platzhirsch> Harvester, CkanHarvester, FallbackCkanHarvester, SocrataHarvester. Maybe I should modulize it to Harvester::
bluOxigen has quit [Read error: Connection reset by peer]
<apeiros> if those are all toplevel - yes. any lib should IMO have only a single toplevel module (or class)
dima has quit [Remote host closed the connection]
bricker`work has joined #ruby
<platzhirsch> yeah, currently I have MetadataHarvester as the toplevel module, it's the name of the project
browndawg has left #ruby [#ruby]
bluOxigen has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
interactionjaxsn has quit [Ping timeout: 252 seconds]
ankov has quit [Ping timeout: 240 seconds]
clamstar has quit [Ping timeout: 246 seconds]
blueOxigen has quit [Ping timeout: 272 seconds]
txdv has joined #ruby
drago777 has joined #ruby
ambushsabre has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
ZoanthusR has joined #ruby
clamstar has joined #ruby
end_guy has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.2]
S0da has quit [Read error: Connection reset by peer]
ankov has joined #ruby
hellome has joined #ruby
TomRone has joined #ruby
meatherly has quit [Read error: Connection reset by peer]
senj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
meatherly has joined #ruby
mary5030_ has quit [Remote host closed the connection]
drago777 has quit [Ping timeout: 240 seconds]
indstry has joined #ruby
ozkan has joined #ruby
fire has joined #ruby
senj has joined #ruby
ace_striker has quit [Ping timeout: 272 seconds]
retrofade has quit [Ping timeout: 252 seconds]
mlpinit_ has joined #ruby
drago777 has joined #ruby
destruct1re is now known as destructure
blackmesa has quit [Ping timeout: 240 seconds]
diegoviola has joined #ruby
havenwood has joined #ruby
blackmesa has joined #ruby
Guest49643 has quit [Remote host closed the connection]
nowthatsamatt has joined #ruby
mlpinit has quit [Ping timeout: 246 seconds]
TomRone has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
mansi has joined #ruby
mansi has quit [Read error: Connection reset by peer]
Megtastique has quit []
senj has quit [Ping timeout: 240 seconds]
mlpinit_ has quit [Remote host closed the connection]
nanoyak has joined #ruby
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joaoh82 has joined #ruby
shadoi has quit [Read error: Connection reset by peer]
ambushsabre has quit [Quit: rip]
shadoi has joined #ruby
ambushsabre has joined #ruby
blindingdawn has quit [Remote host closed the connection]
ankov has quit [Ping timeout: 246 seconds]
kewubenduben has joined #ruby
freezey has joined #ruby
TomRone has joined #ruby
rubyracer has quit [Remote host closed the connection]
joaoh82 has quit [Ping timeout: 272 seconds]
clarknoah has joined #ruby
rm_ has quit [Remote host closed the connection]
Bumptious has quit [Remote host closed the connection]
<shevy> that name alone makes me horny
Bumptious has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> MetadataHarvester
Bumptious has quit [Remote host closed the connection]
rm_ has joined #ruby
soobus has quit [Ping timeout: 245 seconds]
indstry has quit []
smathieu has quit [Remote host closed the connection]
centipedefarmer has quit [Read error: Connection reset by peer]
centipedefarmer has joined #ruby
flame_ has joined #ruby
iliketurtles has joined #ruby
lukec has joined #ruby
iliketurtles has quit [Excess Flood]
clamstar has quit [Ping timeout: 245 seconds]
<platzhirsch> lol
ankov has joined #ruby
fuhgeddaboudit has quit [Remote host closed the connection]
subbyyy has joined #ruby
saarinen has joined #ruby
clamstar has joined #ruby
rm_ has quit [Ping timeout: 265 seconds]
clarknoah has quit [Quit: clarknoah]
kofno has joined #ruby
cj3kim__ has quit [Remote host closed the connection]
mansi has joined #ruby
momomomomo has joined #ruby
cong has joined #ruby
DanKnox has quit [Disconnected by services]
DanKnox has joined #ruby
clarknoah has joined #ruby
ludar has quit [Ping timeout: 272 seconds]
pskosinski has quit [Remote host closed the connection]
croaky has quit [Ping timeout: 265 seconds]
<cong> I compiled ruby 2.1 and did the tests. On the tests I got a few failures and errors. Aside from all that, I get this error when ruby encounters Kernel.gets: http://cxg.de/_d0b7ee.htm I'm missing something maybe another library for reading lines, ex: readline. if so how do I configure these libraries for ruby on mingw?
timonv has quit [Remote host closed the connection]
ankov has quit [Ping timeout: 260 seconds]
advorak has joined #ruby
<advorak> https://gist.github.com/advorak/7b21d93271a786588fe4 -- I am having trouble with this regex .. any suggestions are appreciated :-)
blackmesa has quit [Ping timeout: 240 seconds]
diegoviola has quit [Ping timeout: 240 seconds]
mansi has quit [Ping timeout: 272 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
saarinen has quit [Quit: saarinen]
pskosinski has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Guest83910 has joined #ruby
nanoyak has joined #ruby
ddd has quit [Quit: to fix shell]
mneorr_ has joined #ruby
Tearan has joined #ruby
decoponio has quit [Quit: Leaving...]
ddd has joined #ruby
lurch_ has joined #ruby
Guest83910 has quit [Changing host]
Guest83910 has joined #ruby
Guest83910 is now known as diegoviola
timonv has joined #ruby
<cong> i think this is what you want: /[a-zA-Z]+$\d$|\.$/m
<cong> anyway i'm not sure
HD_ has joined #ruby
colonolGron has joined #ruby
levity_island has joined #ruby
mneorr has quit [Ping timeout: 245 seconds]
senayar has quit [Remote host closed the connection]
Kricir has joined #ruby
nanoyak has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
Monie_ has joined #ruby
<Hanmac> advorak: i tryed this: string.scan(/[A-Za-z]+[^\d\n]*$/) #=> ["MyTest", "MyTest.", "MyTest testing testing"]
Monie_ has quit [Max SendQ exceeded]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
HD_ has quit [Ping timeout: 272 seconds]
Monie_ has joined #ruby
Mars has joined #ruby
Monie has quit [Ping timeout: 245 seconds]
nanoyak has joined #ruby
Solnse has quit [Remote host closed the connection]
St_Marx has joined #ruby
Mars is now known as Guest73489
zegerjan has quit [Ping timeout: 260 seconds]
mansi has joined #ruby
interactionjaxsn has joined #ruby
<advorak> oh .. the other thing I forgot to mention .. I had [A-Z]+[a-z]+ and not [A-Za-z]+ because i don't want it to work with MTest or MT ..
sailias has joined #ruby
<Hanmac> or: .scan(/[A-Za-z]+\D*?$/) #=> ["MyTest", "MyTest.", "MyTest testing testing"]
chopmo has joined #ruby
burlyscudd has joined #ruby
burlyscudd has quit [Changing host]
burlyscudd has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
ozkan has quit [Ping timeout: 248 seconds]
alexherb1 has quit [Quit: WeeChat 0.4.3-dev]
Bumptious has joined #ruby
cid404 has joined #ruby
bean has joined #ruby
axl_ has quit [Quit: axl_]
iliketurtles has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
benzrf has joined #ruby
blackmesa has joined #ruby
<benzrf> hellome:
drago777 has joined #ruby
<benzrf> *hello
agjacome has quit [Quit: leaving]
<benzrf> what exactly are the semantics of constant lookup?
<benzrf> and why does ruby needlessly overcomplicate namespacing?
ankov has joined #ruby
meatherly has quit [Remote host closed the connection]
smathieu has joined #ruby
meatherly has joined #ruby
mneorr has joined #ruby
nadley has quit [Ping timeout: 245 seconds]
TomRone has quit [Ping timeout: 240 seconds]
psyl0n has joined #ruby
<shevy> hehe
<shevy> nice way to greet benzrf
<shevy> hello me
<canton7> benzrf, more detail? a constant lookup generally means that, no matter how large the collection gets, it always takes the same amount of time to fetch a particular element
<shevy> !!!
<Hanmac> benzrf: look at Kernel#nesting
<benzrf> canton7: v funny ;p
<shevy> Hanmac knows it all
<benzrf> also, what exactly is 'main' and what context is the top level running in?
<canton7> benzrf, glad you find me so amusing :P what *were* you asking, then?
<benzrf> constant lookup...
phansch has quit [Quit: Leaving]
<benzrf> as in, how is the expression 'Foo' evalled?
<Hanmac> benzrf: hm no its defined in Module http://www.ruby-doc.org/core-2.0.0/Module.html#method-c-nesting
lurch_ has quit [Quit: lurch_]
mneorr_ has quit [Ping timeout: 240 seconds]
TomRone has joined #ruby
<canton7> benzrf, ooh, lookups of constants, rather than constant-time lookups (e.g. hashes)
<benzrf> oh i thought you were just punning
<benzrf> not a real misunderstanding
burlyscudd has quit [Quit: Leaving.]
<canton7> yeah. thought you were asking two unrelated questions
meatherly has quit [Ping timeout: 272 seconds]
<Hanmac> benzrf: Module::nesting is also the different in "module A; module B;end;end" and "module A::B;end"
vlad_starkov has quit [Remote host closed the connection]
<benzrf> Hanmac: huh?
<Hanmac> benzrf: you need to remember that when you want to access constants in from a specific namespace
<Hanmac> >> "test"
<benzrf> is there a way to include just one or two members from a module
weems has quit [Read error: Connection reset by peer]
weeems has joined #ruby
<benzrf> [2] pry(main)> Foo::Bar.nesting
<benzrf> NoMethodError: undefined method `nesting' for Foo::Bar:Module
axl_ has joined #ruby
<Hanmac> module A; module B; Module::nesting; end;end #=> [A::B, A]
<Hanmac> module A::B; Module::nesting; end #=> [A::B]
<benzrf> oh
<benzrf> alright o:
iliketurtles has quit [Quit: zzzzz…..]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Hanmac> as you can see, in the second way it cant access other constants defined in the A namespace
cid404 has quit [Quit: cid404]
<benzrf> so constant lookup is lexically scoped?
drago777 has quit [Ping timeout: 240 seconds]
chopmo has quit []
randomnick_ has joined #ruby
ankov has quit [Ping timeout: 265 seconds]
<benzrf> oh huh o_O
<benzrf> i always thought it was scoped to the location of the method
<benzrf> dynamically i guess is what im saying
<benzrf> well no, not dynamically exactly
<Hanmac> now you got *exp* ;P
lethjakman has joined #ruby
ambushsabre has quit [Quit: rip]
<benzrf> so module/class DEFINITION BLOCKS are scopes, not the modules/classes themselves?!
<benzrf> *for constants
sambao21 has joined #ruby
mansi has joined #ruby
agjacome has joined #ruby
drago777 has joined #ruby
agjacome has quit [Client Quit]
<benzrf> ugh, everything in ruby has to act subtly differently doesnt it
<benzrf> fft
clamstar has quit [Quit: Textual IRC Client: www.textualapp.com]
ZoanthusR has quit [Quit: Linkinus - http://linkinus.com]
ambushsabre has joined #ruby
Megtastique has joined #ruby
meatherly has joined #ruby
<benzrf> methods are scoped to modules/classes... constants are scoped to module/class definition blocks... blocks have lexical scoping on lvars, but methods dont...
<benzrf> ick
cid404 has joined #ruby
<TTilus> well, ruby is not a lisp, right?
<Hanmac> apeiros: what is your mighty comment about that?
axl_ has quit [Ping timeout: 240 seconds]
<benzrf> TTilus: python is less lispy than ruby, and it has pleasantly minimal and consistent scoping & variable rules
<benzrf> :)
<benzrf> it also has my favorite import system ever
<benzrf> ^mention #23
<TTilus> i like it too
senayar has joined #ruby
<TTilus> the import system
figgleberry has quit []
<benzrf> is self lexically scoped in blocks? it is,right?
Tearan has quit []
figgleberry has joined #ruby
axl_ has joined #ruby
agjacome has joined #ruby
<havenwood> So nice to see Ruby 2.0 and 2.1 flourishing with wide adoption. I feel sad for Python 3.
wallerdev has quit [Quit: wallerdev]
<benzrf> i feel like with just a few tweaks to the basic semantics and a complete syntax overhaul, python could be like ruby but better
<benzrf> o_o
<TTilus> but i always forget if it was foo.len() or len(foo) ;)
burlyscudd has joined #ruby
<benzrf> TTilus: yeah thats one of python's nasty bits
mansi has quit [Ping timeout: 265 seconds]
<benzrf> the one thing i like about python's indecision between methods and functions is that it lets you teach basic procedural programming to people without even touching objects
<havenwood> Also uhhg! Ruby's object model may be more complex but it is also more lovely. And I think a nicer heritage than Python.
<havenwood> Crush the snake!!
<benzrf> u kiddin m8
<shevy> notice what benzrf wrote
<benzrf> python ftw
<shevy> "and a complete syntax overhaul"
<havenwood> benzrf: Do you use Python 3?
<benzrf> when i use python i attempt to use 3
<Hanmac> benzrf: yes and no, self can also be block scoped, look at instance_eval/instance_exec
<shevy> he did not write " a little bit" or "a few changes"
mlpinit has joined #ruby
<shevy> a COMPLETE syntax overhaul
<TTilus> uhh, don't crush the snake
<benzrf> i like a lot of parts of python's syntax
<shevy> like perl 6
<benzrf> particularly the indentation
<havenwood> benzrf: When I use Python it's during the porting-to-Ruby process. :P
<benzrf> but i find 90% of ruby's to be superior
<benzrf> at least...
<benzrf> for the style of coding i prefer
<shevy> but indentation means that the parser is crippled and needs your help to show where tokens start and end
<benzrf> the thing is, i like ruby's day-to-day usage significantly more than python's
<benzrf> but otoh i much prefer almost all of python's core semantics
Liothen has quit [Quit: System of a down……]
<shevy> he is a torn man
<havenwood> benzrf: I thought Alex Gaynor's recent post was interesting: http://alexgaynor.net/2013/dec/30/about-python-3/
<shevy> it's like having two girlfriends at the same time
<havenwood> benzrf: he is the implementor of Topaz (RPython Ruby implementation)
<benzrf> so i feel like my ideal language would be one that handles like ruby at the surface, but looks more like python when you go deeper
senayar has quit [Ping timeout: 246 seconds]
<havenwood> i hope Topaz doesn't peter out
<TTilus> shevy: no, it's not!
<havenwood> benzrf: My ideal language is Ruby on the surface, then Ruby when you go deeper. :P
<shevy> lol
<TTilus> shevy: more like having two good colleagues
Megtastique has quit []
<shevy> benzrf you are young, you could create the perfect new language that can replace both python and ruby
<Hanmac> havenwood: like "turtles all the way down"? ;P
<TTilus> turtles, turtles, turtles, turtles, turtles, turtles!
<benzrf> shevy: hue
<Hanmac> shevy: lets name it "puby" ;P
guiocavalcanti has quit [Read error: Connection reset by peer]
joaoh82 has joined #ruby
<miah> lets create the perfect language and call it lisp?
aspires has quit []
<benzrf> i enjoy much of io's semantics too
dima has joined #ruby
<TTilus> Hanmac: way too close to https://github.com/tenderlove/phuby
<havenwood> miah: Chicken Scheme or Clojure? :P
<benzrf> feel like python's is more practical tho
<miah> either of those is fine =)
guiocavalcanti has joined #ruby
<havenwood> TTilus: yeah, maybe fuby to not be confusing - fuby on fails
<miah> pythons oop is weeeeeeeeeeeeeeeeeeird
aspires has joined #ruby
saarinen has joined #ruby
<TTilus> havenwood: reminds me of https://github.com/jayferd/balls
levity_island has quit [Quit: levity_island]
mlpinit has quit [Ping timeout: 252 seconds]
<miah> i havent seen much beautiful oop python. compared to ruby.
drago777 has quit [Ping timeout: 240 seconds]
<benzrf> yeah
<miah> maybe im weird for liking oop.
estebistec has quit [Remote host closed the connection]
<benzrf> like i said, ruby is nicer on the surface
<TTilus> Hanmac: thats what i said, didnt i?
<benzrf> i just like python's language semantics more
<miah> Go ?
<benzrf> omg balls
<benzrf> this looks promising
<havenwood> miah: i actually really like Clojure's manner of sidestepping oo complexity and insisting on terseness, if only it wasn't Java underneath...
<TTilus> benzrf: platform of choise for your next web app! :D
cid404 has quit [Quit: cid404]
<benzrf> havenwood: i enjoy haskell's manner of doing the same thing
<shevy> miah lisp has so many parens
<TTilus> havenwood: it is not that much java underneath, more jvm
zipper is now known as broken_toy
<shevy> benzrf ruby is too complex
<havenwood> TTilus: right, but for using it for any real world purpose you end up calling out to Java all the time
OdNairy has joined #ruby
<shevy> python not flexible enough
<havenwood> TTilus: i mean for stripping a string and whatnot
<TTilus> and imo jvm is not totally evil
* miah puts on her Java Ring
<havenwood> TTilus: I don't mind the JVM, and I love how tiny Clojure is
<havenwood> TTilus: Just you end up having to use Java... >.>
joaoh82 has quit [Ping timeout: 260 seconds]
<benzrf> shevy: yep
<havenwood> TTilus: I guess you could RedBridge to JRuby, but seems Java is the usual goto.
<benzrf> ruby's surface fits my style of programming better than python, but god are the inner semantics ugly
<TTilus> havenwood: that might be the case, im not so deep in clojure at all
ozkan has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<shevy> benzrf python documentation is better than ruby's
<havenwood> TTilus: If it wasn't for the Java, I think I'd be pretty into Clojure actually.
drago777 has joined #ruby
<shevy> hehe
<shevy> I think havenwood does not love Java much
mklappstuhl has joined #ruby
<shevy> benzrf actually you have quite a task ahead of you
<havenwood> shevy: too true, but mostly due to ignorance - i don't have any Java chops and don't feel like investing the time to learn just for Clojure at this point
<shevy> benzrf create a useful, nice language mixing in Python Ruby Io and perhaps also Erlang
<havenwood> shevy: maybe it is worth it, but a hard pill to swallow :O
broken_toy is now known as zipper
<havenwood> shevy: Have you looked at Potion?
<shevy> is that the thing that required Java?
<shevy> because I am Java free!
rm_ has joined #ruby
<havenwood> shevy: I think it was heavily Io and Matz influenced.
<benzrf> it was made by why_
<benzrf> wait is it _why
<benzrf> shit
<havenwood> shevy: It is its own VM.
<wmoxam> benzrf: what's scary about it?
<shevy> benzrf the problem with _why projects is that they often were not finished
<benzrf> wmoxam: scary about what?
<havenwood> shevy: And the future platform for Perl2 or Perl11, I can't remember which.
<apeiros> Hanmac: my comment on rubys scoping? there are some rare regretable things, the rest: mix & match, mostly it's quite useful the way it is
<wmoxam> 20:10 < benzrf> ruby's surface fits my style of programming better than python, but god are the inner semantics ugly
<havenwood> shevy: http://perl11.org/potion/
assurbanipal has joined #ruby
<shevy> benzrf like his sandbox in ruby, I asked him for the source, he never published it despite promising to release it eventually
pskosinski has quit [Remote host closed the connection]
<benzrf> wmoxam: there are like 5 kinds of names
<benzrf> scoping works differently for all of them
<benzrf> lambdas and blocks are different
totalmajor has quit [Remote host closed the connection]
<benzrf> basically my issue is that for every kind of thing, ruby has 3 different things that fill different niches in that category and all act just slightly differently
<havenwood> benzrf: The differences are necessary to preserve tennet's correspondence priciple, it is technically superior thought admittedly not as easy to initially understand.
platzhirsch has left #ruby [#ruby]
<benzrf> and regular code will use all of them and itll work fine, until you have a strange bug that happens because you dont understand the subtle differences
totalmajor has joined #ruby
<shevy> benzrf yeah but with experience you come to understand that some things are utter shit
<havenwood> benzrf: The subtle differences are a pain to learn, but powerful.
<shevy> benzrf like Pathname. so you stop using it :>
ejnahc has quit [Ping timeout: 252 seconds]
mzdravkov1 has joined #ruby
<havenwood> Ruby, you'll shoot your eye out!!
<wmoxam> benzrf: in my decade+ of Ruby I can't say I've encountered an error because of those things :p
<benzrf> w/e
mzdravkov1 has quit [Max SendQ exceeded]
sandelius has joined #ruby
<shevy> wmoxam did you have to port a lot of ruby code written by someone else, usually a lazy idiot? :)
<benzrf> havenwood: well python gets along fine by using one thing for each category, and making it flexible enough to server all of the purposes you need
burlyscudd has joined #ruby
<benzrf> ;p
mzdravkov has quit [Quit: Leaving.]
mzdravkov1 has joined #ruby
<benzrf> *serve
<shevy> benzrf but where is the creativity in python!
<havenwood> benzrf: I disagree. Simpler maybe. Probably why more oft used as a teaching language. More powerful, I don't think so.
devdvd has quit [Ping timeout: 272 seconds]
<benzrf> i didnt say MORE powerful
<wmoxam> shevy: I've had to fix a lot of bad code, but it was bad for lots of other reasons that weren't related to the language used :p
<benzrf> but sufficiently so
<benzrf> i feel like python is intentionally crippled tho
<havenwood> benzrf: okay, okay, sufficiently powerful true - just not my cup of tea when Ruby is an option :)
<benzrf> like, nothing about it except maybe the syntax really precludes things like blocks
<shevy> that's how I feel about class vs. module distinction in ruby
ejnahc has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
<havenwood> benzrf: but certainly pleasant
mneorr has quit [Remote host closed the connection]
alexherb1 has joined #ruby
<benzrf> they wouldnt require a major difference to add
<benzrf> but no
Hanmac has joined #ruby
<shevy> benzrf guido is an old man by now, he can't take anymore real changes
<benzrf> and classes act very similar to prototypes, but the language forces you to only use them like classes
<benzrf> you cant do prototype OO at all
<benzrf> i mean come on
mzdravkov1 has left #ruby [#ruby]
<shevy> that's understandable
mzdravkov1 has joined #ruby
<shevy> python doesn't care about OOP
<benzrf> you can set __class__, but you're not allowed to set it to anything but instances of type?!
mneorr has joined #ruby
<havenwood> benzrf: also four underspaces :P
<shevy> else why does it require you to declare explicit self all the time
<havenwood> underscores*
<benzrf> shevy: because it allows for nifty tricks
<apeiros> __this_is_very_private__
<shevy> underspace!
<shevy> GIMME SOME UNDERSPACE
<apeiros> ____seriously_dont_touch_____
wildroman2 has quit [Remote host closed the connection]
<benzrf> although if it had proper namespace manipulation...
<havenwood> apeiros: hehe
<shevy> ________me_underspace_is_bigger_than_yours__________
<cout> thunderscore
<benzrf> basically i want ruby's syntax and day-to-day usage, but with inner semantics that are like pythons but with first-class namespace manipulation
<agent_white> ohsnap
<benzrf> and then i will be happy
<shevy> we get it we get it
<benzrf> sorry
<shevy> you want a mix of everything
<benzrf> i like repeating myself
totalmajor has quit [Ping timeout: 272 seconds]
<shevy> you want like the perfect language
pskosinski has joined #ruby
<shevy> pubyio
superscott[8] has joined #ruby
rm_ has quit [Ping timeout: 248 seconds]
<shevy> and it must come with a great web framework by default
<cout> benzrf: you want Mython :)
<benzrf> kek
<havenwood> Ruby is the best i've found, but i admit severe Clojure and Haskell envy for some problems that are elegantly solved functionally
<shevy> what is Mython? python on myspace?
<benzrf> havenwood: heck yeah
figgleberry has quit [Ping timeout: 245 seconds]
<cout> shevy: macros for python
<benzrf> cout: i meant runtime namespace manip, fool
<benzrf> havenwood: for example, i love parens-less calling, but then how do you have javascript/python style methods-as-attrs?
Wolland has joined #ruby
<benzrf> havenwood: except in haskell that's not a significant difference because there is no difference between values and argless funcs
<benzrf> problem solved!
<shevy> ack now you mentioned javascript
<cout> benzrf: sure, you could do that with Mython
sailias has quit [Ping timeout: 246 seconds]
<shevy> the solution would be to specify your own language and then code in that
<cout> right
vlad_starkov has joined #ruby
<shevy> I wanted that for the different desktop environments
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> like use them like lego building blocks and reassemble them
<shevy> I loved the old winamp snap-like behaviour
flubba has quit [Remote host closed the connection]
<shevy> who gave me the potion link ... http://perl11.org/potion/download.html
snath has joined #ruby
<shevy> it has perl in its URL :(
saarinen has quit [Quit: saarinen]
postmodern has joined #ruby
<havenwood> shevy: it was their community that decided to continues _why's seminal work!
<shevy> but it has better documentation than ruby already lol
senayar has joined #ruby
<shevy> benzrf, you should have seen ruby documentation 6 years ago
iliketurtles has joined #ruby
<shevy> iframes all over the place... 4 colours maximum...
robbyoconnor has quit [Ping timeout: 245 seconds]
<benzrf> ew
<havenwood> I do really like Potion though, so nice to see it getting some love!
nemesit|znc has quit [Ping timeout: 252 seconds]
<havenwood> Ruby just caught up with Potion on the generational gc front. :P
mklappstuhl has quit [Remote host closed the connection]
clarknoah has quit [Quit: clarknoah]
<cong> does anyone know how to read these? http://cxg.de/_d0b7ee.htm
banghouse has quit [Remote host closed the connection]
specious has joined #ruby
guiocavalcanti has quit [Ping timeout: 240 seconds]
Astralum has quit [Ping timeout: 260 seconds]
<cong> i take that as a no.
Liothen has joined #ruby
mlpinit has joined #ruby
nemesit|znc has joined #ruby
Guest73489 has quit [Remote host closed the connection]
hakunin_ has quit [Remote host closed the connection]
hakunin has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
Astralum has joined #ruby
mneorr has quit [Remote host closed the connection]
<benzrf> cong: nope :[
TomRone has quit [Ping timeout: 240 seconds]
mneorr has joined #ruby
assurbanipal has quit [Ping timeout: 246 seconds]
Dreamer3 has joined #ruby
psyl0n has quit []
kate_r has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
assurbanipal has joined #ruby
TomRone has joined #ruby
retrofade has joined #ruby
Guest97918 is now known as Boohbah
flame_ has quit [Quit: Computer has gone to sleep.]
freezey has quit [Remote host closed the connection]
psyl0n has joined #ruby
hakunin has quit [Ping timeout: 272 seconds]
mneorr has quit [Ping timeout: 245 seconds]
matchaw has quit [Ping timeout: 246 seconds]
<lethjakman> is there a way to multi line function calls in a class?
matchaw has joined #ruby
freezey has joined #ruby
<lethjakman> say I have 5 different methods I want to call on a class.
flame_ has joined #ruby
dr_bob has quit [Quit: Leaving.]
<shevy> wat
KaCzY has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
<shevy> you could write a method that bundles these 5
<benzrf> lethjakman: what do you mean multi line them?
<lethjakman> one sec I'll gist it.
meatherly has quit [Remote host closed the connection]
<shevy> tiger.attack :benzrf # combines sneak attack, bite attack, destroy benzrf and eat him up all in one method, then sleep to digest benzrf)
meatherly has joined #ruby
andrewstewart_ is now known as andrewstewart
<lethjakman> like that.
<lethjakman> cause I don't always want that.
<lethjakman> I can have specific use cases.
<WJW> No, that's Smalltalk.
<Hanmac> lethjakman: use ()
chile_andes has joined #ruby
TomRone has joined #ruby
<lethjakman> WJW: that's also php and quite a few other languages.
<lethjakman> Hanmac: if I use ()'s I can multi line like that?
<benzrf> lethjakman: you could use tap
mreiss has joined #ruby
<lethjakman> tap?
drago777 has quit [Ping timeout: 240 seconds]
<benzrf> Object#tap
<benzrf> takes a block, passes self to the block
<benzrf> returns self
<benzrf> foo.tap(&:bar).tap(&:baz)
<benzrf> foo.bar, foo.baz
* benzrf shrugs
matchaw_ has joined #ruby
<cong> like this?: class my_class; class << self; attr_accessor :method1, :method2, :method3; end end
<lethjakman> benzrf: how is that allowing me to put it on multiple lines?
ArchBeOS-work has joined #ruby
<cong> add \n's
<WJW> I commented the gist.
allaire has joined #ruby
matchaw has quit [Ping timeout: 272 seconds]
meatherly has quit [Ping timeout: 240 seconds]
<lethjakman> cong: interesting solution, not bad.
drago777 has joined #ruby
h0rrorvacui has joined #ruby
<lethjakman> I'm surprised there's no easy way to do this in ruby :(
<lethjakman> my methods are getting too long.
<WJW> benzrf, if you are going to chain like that, you have to have a convention that when a method doesn't return an otherwise useful value, it returns self.
<Hanmac> shevy & lethjakman https://gist.github.com/Hanmac/8187856 works in ruby but not irb
workmad3 has joined #ruby
<benzrf> WJW: i know
<benzrf> i was answering lethjakman
<benzrf> oh wait i guess that wasnt his question
<benzrf> my bad >_<
jonathanwallace has quit [Quit: WeeChat 0.4.1]
saarinen has joined #ruby
<lethjakman> Hanmac: seriously?
jonathanwallace has joined #ruby
<lethjakman> hmmm.
<WJW> Never mind, I lied.
JohnBat26 has quit [Ping timeout: 246 seconds]
<shevy> lethjakman cant you let your class bundle methods for you? then you call what you need externally. or you use a special meta class that can call some methods based on a string input you send it
<Hanmac> lethjakman: https://gist.github.com/Hanmac/8187856 updated version
meatherly has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
<lethjakman> you're right.
thumpba has quit [Remote host closed the connection]
<shevy> lethjakman I have one class where I gave 6 methods names, because they must be run in 1 2 3 4 5 6, and sometimes I need to call only 4 5 6. I solved that by simply having a method that can respond to input like '3 5 6'
thumpba has joined #ruby
<lethjakman> shevy: interesting. that's also a good idea. I'll keep that pattern in mind
levity_island has joined #ruby
thumpba has quit [Remote host closed the connection]
thumpba has joined #ruby
Mars has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
<lethjakman> I don't know why I never realized this :/ I guess it's cause of irb
meatherly has quit [Read error: Connection reset by peer]
Mars is now known as Guest65018
<lethjakman> and it doesnt' seem to be popular in ruby
<lethjakman> thank you all :)
chile_andes has quit [Quit: Textual IRC Client: www.textualapp.com]
meatherly has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
<lethjakman> is that only in certain versions of ruby?
TomRone has joined #ruby
drago777 has joined #ruby
mikepack has joined #ruby
freebs has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
croaky has joined #ruby
DouweM has joined #ruby
fire has quit [Quit: WeeChat 0.4.1]
atmosx has joined #ruby
matchaw has joined #ruby
matchaw_ has quit [Ping timeout: 248 seconds]
bogeyd6 has quit [Read error: Connection reset by peer]
saarinen has quit [Quit: saarinen]
shevy has quit [Ping timeout: 272 seconds]
havenwood has quit [Remote host closed the connection]
specious has quit [Ping timeout: 240 seconds]
`MArceLL` has quit []
maletor has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
maletor has joined #ruby
St_Marx has quit [Ping timeout: 240 seconds]
specious has joined #ruby
St_Marx has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
mneorr has joined #ruby
Guest65018 has quit [Remote host closed the connection]
mansi has joined #ruby
shevy has joined #ruby
<lethjakman> hey, another question. is there a way to make a conditional array?
<lethjakman> I'd like to conditionally add items to an array.
<lethjakman> I guess I could just push...I'm just wondering if ruby has some pretty magic for this
<benzrf> you could do what you typed
<benzrf> then compact
Monie_ is now known as Monie
retrofade has quit [Ping timeout: 240 seconds]
<lethjakman> benzrf: compact?
<lethjakman> I tried that and it throws an error
burlyscudd has quit [Ping timeout: 252 seconds]
<benzrf> commas
Tearan has joined #ruby
<Hanmac> shevy did you know in this CSI crime TV series when they say: "lets zoom until we can see the reflection in the retina of the bypasser and we can identify the suspects" ? newest tests says it is possible: http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0083325
<benzrf> >> my_array = ['hey' if true, 'hey you' if false, 'hey you there' if true]
<lethjakman> where do the commas go?
<benzrf> >> my_array = ['hey' if true, 'hey you' if false, 'hey you there' if true]; my_array.compact
<benzrf> ...at the end of the lines?
<benzrf> duh
<Hanmac> what about this:
<Hanmac> my_array=[]; my_array << 'hey' if true; my_array << 'hey you' if false, my_array << 'hey you there' if true; my_array
flubba has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
<lethjakman> I get the error 'unexpected modifier_if, expecting ']''
Zai00 has joined #ruby
<lethjakman> looks like this: my_array = [ 'hey' if true, 'hey you' if false, 'hey you there' if true ]
Czupa has quit [Ping timeout: 260 seconds]
mansi has quit [Ping timeout: 248 seconds]
<benzrf> oh
Jetchisel has joined #ruby
<benzrf> lame
rm_ has joined #ruby
<lethjakman> yeah :/
<lethjakman> not possible?
<benzrf> you could define a method
<benzrf> def cond_array(conds)
<benzrf> oh wait
<benzrf> ok
<benzrf> def cond_array(conds)
drago777 has joined #ruby
skaflem has quit [Quit: Leaving]
<benzrf> conds.map {|cond, value| value if cond}.compact
<benzrf> end
<benzrf> [3] pry(main)> cond_array true => 1, false => 2, 3 > 4 => 7
<benzrf> => [1]
<benzrf> and of course you can stretch that across lines
Guedes0 has joined #ruby
<benzrf> so how exactly does python violate TCP?
lurch_ has joined #ruby
byprdct has quit [Ping timeout: 252 seconds]
prc has joined #ruby
<benzrf> *in a way that ruby does not
Boohbah is now known as Boohbah_
<Hanmac> benzrf: you have a problem because hashs does not allow the same key for multible values
rm_ has quit [Ping timeout: 248 seconds]
mreiss has quit [Quit: mreiss]
Tearan has quit []
peregrine81 has quit []
mikepack has quit [Remote host closed the connection]
byprdct has joined #ruby
byprdct has quit [Client Quit]
jkamenik has quit [Quit: Leaving.]
<benzrf> ohhh
<benzrf> i feel silly -.-
Tearan has joined #ruby
<benzrf> 04:20 < benzrf> so how exactly does python violate TCP?
nanoyak has joined #ruby
blackmes1 has joined #ruby
<cong> i'm compiling readline for ruby so how do i show readline where termcap is?
blackmesa has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
mikepack has joined #ruby
dima has quit [Remote host closed the connection]
<lethjakman> I just did a tap for it
<lethjakman> I think it's the cleanest way.
psyl0n has quit [Remote host closed the connection]
senayar has quit []
psyl0n has joined #ruby
Faris has quit [Ping timeout: 252 seconds]
Czupa has joined #ruby
Guedes0 has quit [Ping timeout: 246 seconds]
Czupa has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
mityaz has quit [Quit: See ya!]
gazarsgo has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kevind__ is now known as kevind
lkba has quit [Ping timeout: 240 seconds]
mansi has quit [Ping timeout: 252 seconds]
Faris has joined #ruby
freezey has quit [Remote host closed the connection]
DouweM has quit [Read error: Connection reset by peer]
DouweM_ has joined #ruby
vlad_starkov has joined #ruby
MindfulMonk has quit [Quit: Leaving]
<benzrf> 04:20 < benzrf> so how exactly does python violate TCP?
<benzrf> oops
<gazarsgo> how can i construct an array with a specified index using map ?
<benzrf> ^awesome game
<Hanmac> gazarsgo: make a sample, what is your given input and what is your wanted output?
<gazarsgo> i don't know the syntax, but this is the idea: [obj, obj, obj] => Array[obj.id] = obj.column
allsystemsarego has quit [Quit: Leaving]
mikepack has quit [Remote host closed the connection]
<gazarsgo> collection.map { |item| { item.id => item.column } } #except with arrays ?
clarknoah has joined #ruby
<Hanmac> are you sure about id ? i mean is it continued? otherwise you leave holes into the Array. or do you only want a sorted array?
<gazarsgo> sparse is ok
<gazarsgo> it's def. not continuous
<txdv> python violates TCP?
danshultz has quit [Remote host closed the connection]
<txdv> benzrf: I thought python would only violate my eyes
<gazarsgo> i guess it's just better to make a hash and push onto it, but i want to know more about ruby arrays too
workmad3 has quit [Ping timeout: 272 seconds]
<Hanmac> gazarsgo: what about: collection.sort_by(&:id) ?
danshultz has joined #ruby
ankov has joined #ruby
<gazarsgo> this is more of a projection operation than a sorting operation
klaut_ has joined #ruby
klaut has quit [Read error: Connection reset by peer]
<benzrf> txdv: wut
<benzrf> python is bootiful
ambushsabre has quit [Quit: rip]
<ericwood> I don't like the way a lot of pythonistas write it
<Hanmac> gazarsgo: there collection.each_with_object([]) {|item,array|array[item.id] = item.column}
<Hanmac> but i warn you it leaves massive holes inside the Array
<txdv> so is BSDM
clarknoah has quit [Quit: clarknoah]
<gazarsgo> Hanmac: aha, so each_with_object is like inject ?
<benzrf> gazarsgo: its the same but instead of passing along the result of the last it always passes along the same object
<Hanmac> yes and no ... inject uses the result of the block as next iteration object ... each_with_object ALLWAYS returns the object that you give
freezey has joined #ruby
danshultz has quit [Ping timeout: 246 seconds]
closer has quit [Ping timeout: 252 seconds]
<gazarsgo> thanks very much
Shayan___ has joined #ruby
mreiss has joined #ruby
<Shayan___> Hi there. I'm a major beginner and am burnt out from doing examples about bank accounts and tickets. I'm trying to practice learning about Classes, Instance Variables and Methods. I am wondering if anyone has any suggestions about what kinds of programs I can create that are more interesting than depositing $ into a 'bank account' and checking my balance.
<shevy> Hanmac yeah i read fefe too
kcombs has quit [Remote host closed the connection]
ssvo_ has joined #ruby
lfox has joined #ruby
lkba has joined #ruby
<shevy> cong do you use debian? if so you must decripple your stuff first
ambushsabre has joined #ruby
jmimi has joined #ruby
<shevy> Shayan___ write code that solves a given need or want you have
iliketurtles has quit [Quit: zzzzz…..]
<shevy> like a game, or some backups or some other utility script
iliketurtles has joined #ruby
ankov has quit [Ping timeout: 265 seconds]
Mars has joined #ruby
iliketurtles has quit [Excess Flood]
<shevy> Shayan___ you could start with methods only for now
Mars is now known as Guest73221
drago777 has quit [Ping timeout: 240 seconds]
<Shayan___> @shevy thanks
<cong> nope. it's mingw.
ssvo has quit [Ping timeout: 252 seconds]
iliketurtles has joined #ruby
<shevy> hmmm
closer has joined #ruby
Shayan___ has quit [Client Quit]
drago777 has joined #ruby
robbyoconnor has joined #ruby
<shevy> my termcap is at /usr/lib/libtermcap.so
<cong> mine is at /local/lib/libtermcap.a
skulker has joined #ruby
dima has joined #ruby
aspiers has quit [Ping timeout: 246 seconds]
<Hanmac> cong: wrong
<Hanmac> cong the "a" file and the "so" file are TWO different purposes
<cong> i'm thinking of static build
diegoviola has quit [Quit: WeeChat 0.4.2]
stryek has joined #ruby
cosmicpanda has quit [Ping timeout: 252 seconds]
tgandrews has joined #ruby
<Hanmac> static is no good ... it can not be changed ... like the political system in the USA ;P
ankov has joined #ruby
DouweM_ has quit [Ping timeout: 272 seconds]
<cong> i don't need it to change i just need it in readline so it can compile and then in ruby so it can function
samsonasu has quit [Quit: samsonasu]
<Hanmac> cong i am sure that it might need to be compiled dynamiclly so ruby can access it thouth readline
tropicalmug has joined #ruby
asteve has joined #ruby
<cong> ruby compiled find without it. wait so ruby needs termcap too?
<lethjakman> cong: you can include a readline gem, but the best method is to recompile
Guest73221 has quit [Remote host closed the connection]
deception has quit [Quit: Goodbye]
<lethjakman> I had to install the readline-dev package
drim has quit [Quit: drim]
shadoi has quit [Ping timeout: 246 seconds]
<cong> typo. ruby compiled fine without it. wait so ruby needs termcap too?
shadoi has joined #ruby
blueOxigen has joined #ruby
ankov has quit [Ping timeout: 272 seconds]
cburyta has joined #ruby
cburyta has quit [Client Quit]
bluOxigen has quit [Ping timeout: 248 seconds]
kofno has quit [Ping timeout: 265 seconds]
jerius has quit [Read error: Operation timed out]
burlyscudd has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
wildroman2 has joined #ruby
<shevy> cong perhaps the readline bindings require the .so file
aspiers has joined #ruby
<shevy> cong did you go into ext/readline subdirectory of your extracted ruby source and try to run there and see what precisely the error output given is?
<shevy> ruby will always compile fine without readline, it's an extension, hence inside of ext/ directory
drago777 has quit [Ping timeout: 240 seconds]
blueOxigen has quit [Ping timeout: 248 seconds]
lurch_ has quit [Quit: lurch_]
joaoh82 has joined #ruby
burlyscudd has quit [Ping timeout: 260 seconds]
burlyscudd has joined #ruby
shadoi has quit [Quit: Leaving.]
joaoh82 has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
joaoh82 has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
allaire has quit []
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drago777 has joined #ruby
mzdravkov1 has left #ruby [#ruby]
mikepack has joined #ruby
fschuindt has joined #ruby
fschuindt has quit [Client Quit]
mansi has joined #ruby
TomRone has joined #ruby
vlad_starkov has joined #ruby
joaoh82 has quit [Ping timeout: 240 seconds]
estebistec has joined #ruby
breakingthings has quit []
iliketurtles has quit [Quit: zzzzz…..]
pskosinski_ has joined #ruby
shime has joined #ruby
totalmajor has joined #ruby
pushpak has quit [Quit: Linkinus - http://linkinus.com]
shadoi1 has joined #ruby
shadoi has quit [Read error: Connection reset by peer]
mansi has quit [Ping timeout: 240 seconds]
timonv has quit [Remote host closed the connection]
nisstyre has joined #ruby
rm_ has joined #ruby
pskosinski has quit [Ping timeout: 240 seconds]
sepp2k has quit [Read error: Connection reset by peer]
gregoriokusows-1 has quit [Quit: gregoriokusows-1]
guiocavalcanti has joined #ruby
Megtastique has joined #ruby
<cong> "shevy, cong did you go into ext/readline subdirectory of your extracted ruby source and try to run there and see what precisely the error output given is?" i don't understand what you're saying.
Jason has joined #ruby
havenwood has joined #ruby
<Jason> what's the difference btween = and =>? hard question to google, haha.
retrofade has joined #ruby
<ericwood> => is only used in hashes
<Jason> ahh
<ericwood> = is an equals sign for assignment
<Jason> that makes sense now
totalmajor has quit [Ping timeout: 272 seconds]
<ericwood> >> {:foo => 'bar'}
<ericwood> also you can do this:
<ericwood> >> {foo: 'bar'}
<havenwood> Jason: `=>` is called a 'hash rocket'
dogweather has joined #ruby
<Jason> hash rocket, huh
<Jason> an appropriate name
rm_ has quit [Ping timeout: 245 seconds]
iliketurtles has joined #ruby
<Hanmac> the "<=>" from Comparable is called space ship operator
timonv has joined #ruby
<ericwood> my fave is the "diamond operator" <=>
Solnse has joined #ruby
danshultz has joined #ruby
ozkan has quit [Quit: Linkinus - http://linkinus.com]
<cong> my favourite is splat *
larissa has quit [Quit: Leaving]
<ericwood> splat is misunderstood and underappreciated for how awesome it is
<Hanmac> splat is outdated ... double-splat "**kargs" is more awesome ! ;P
<shevy> cong if you compile ruby from source, you must have extracted it. cd into the ext/readline directory
phipes has joined #ruby
<benzrf> Hanmac: what does that do
<benzrf> o-o
<cong> shevy i installed it: make install. inside install: bin, lib, include, share
<waxjar> =~ spermy operator \o/
<Hanmac> waxjar: i thought ~> was the spermy operator ;P
<shevy> cong excellent
<cong> okay
<waxjar> lol. they both look very spermy
<shevy> Hanmac, waxjar is in the initial phase still
<benzrf> >~ is syntactically valid !
<Hanmac> benzrf: keyargs rest
<benzrf> oh, i thought ruby didnt have kwargs?
nemesit|znc has quit [Ping timeout: 272 seconds]
<benzrf> *in python kwargs is traditional, also uses **
<shevy> ruby copies python
<Hanmac> benzrf: 2.0 and 2.1does
claymore has quit [Quit: night]
<benzrf> o:
<benzrf> how do they work?
<cong> like hash i suppose
elux has quit [Quit: Bye!]
teenwolf has joined #ruby
banghouse has joined #ruby
nemesit|znc has joined #ruby
banghouse is now known as Guest57609
totalmajor has joined #ruby
<shevy> I only saw syntax and wondered why something as ugly as this made it into ruby
<cong> "shevy i installed it: make install. inside install: bin, lib, include, share" doesn't mean it's working.
<advorak> What should I replace Page.page_name_exists?('asdf') with in https://gist.github.com/advorak/d627aaef8ba47c638b27 to allow the code to work if the model named "Page" is renamed to something else? I've tried self.page_name_exists? ... but it doesn't seem to work?
totalmajor has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
Yu\2 has joined #ruby
<Hanmac> advorak: #rubyonrails
<shevy> cong why don't you say that
totalmajor has joined #ruby
smathieu has joined #ruby
<benzrf> groovy on grails
timonv has quit [Remote host closed the connection]
gstamp has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> cong did you cd into ext/readline
assurbanipal has quit [Remote host closed the connection]
<shevy> there, run ruby extconf.rb
<cong> shevy you said cd into ext/readline which isn't there
<shevy> no, it is there
<shevy> did you download the ruby source tarball
<cong> i'm showing you what is when i installed it
<shevy> how do you install it
_maes_ has quit [Ping timeout: 265 seconds]
<shevy> what is the source tarball you use
<shevy> is it ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.bz2
<shevy> ?
gstamp has joined #ruby
<shevy> is it ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.0.tar.bz2
rickruby has joined #ruby
gazarsgo has left #ruby [#ruby]
aryaching has joined #ruby
<cong> that's a long story. here's the short: ./configure & make & make install
<benzrf> so if I do 'foo(bar, baz, x: y)' in ruby 2, it will NOT arrive in the last variable?
<benzrf> *the hash bit
<benzrf> doesnt that break compatability?
<cong> shevy, i used the newest i could find
<shevy> no that it useless that way. if you do not use the official source then you are on your own apparently. all I can tell you is that the official source has ext/readline and running ruby extconf.rb there is the proper way to install the readline bindings afterwards, even when they were unavailable
Yu\2 has quit [Client Quit]
<shevy> what the heck is "newest". can you not simply give accurate information?
Guest57609 has quit [Ping timeout: 272 seconds]
<cong> 2.1.0
vlad_starkov has quit []
rickruby has quit [Remote host closed the connection]
frxx has left #ruby [#ruby]
<shevy> cd /Depot/jjj/ruby-2.1.0/ext/readline/
<shevy> I have the directory
<shevy> <cong> shevy you said cd into ext/readline which isn't there
<shevy> so you are not writing the truth
joriso_ has joined #ruby
<advorak> Hanmac, yes, wrong window .. thanks :-)
<advorak> sorry!
<benzrf> oh shit
vlad_starkov has joined #ruby
<benzrf> this is really gross
smathieu has quit [Ping timeout: 248 seconds]
<benzrf> *kwargs
<shevy> benzrf does kwargs make you more eager to move away from python to ruby?
vpretzel has quit [Quit: Adios!]
totalmajor has quit [Ping timeout: 248 seconds]
<havenwood> benzrf: nice addition in 2.0, one of the few upgrade caveats that will in the future be a nicety to replace our hash args workaround
<benzrf> this is really really gross
<benzrf> *the way kwargs work
<Hanmac> benzrf: no it does not break compatiblity
marr has quit [Ping timeout: 252 seconds]
mansi has joined #ruby
<havenwood> benzrf: what is gross about it, nice simple syntax it seems to me
<cong> shevy, now what? for the record i was nothing but truthful.
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> cong nah you were not, you said it is not there, I know it is there - sorry, someone else has to help you
<havenwood> benzrf: pretend the Ruby way is what you learned first, and that Python is gross :P
totalmajor has joined #ruby
DouweM has joined #ruby
<cong> shevy, oh.
totalmajor has quit [Remote host closed the connection]
<cong> i'm on my own again.
<benzrf> there are so many things wrong with this kwargs setup
<benzrf> even for ruby
<havenwood> benzrf: like what?
<cong> actually there was no one from the beginning
<shevy> I can feel benzrf likes ruby more and more every day
totalmajor has joined #ruby
<benzrf> likemike:
<benzrf> *like
<benzrf> non duck typing
retrofade has quit [Ping timeout: 240 seconds]
<havenwood> if it types like a duck...
cj3kim has joined #ruby
nemesit|znc has quit [Ping timeout: 248 seconds]
<shevy> if it swims like a duck
kevind has quit [Quit: kevind]
<benzrf> ugh g2g
benzrf has quit [Quit: leaving]
mansi has quit [Ping timeout: 272 seconds]
mmitchell has quit []
Solnse has quit [Quit: Leaving.]
St_Marx has quit [Ping timeout: 240 seconds]
deol has joined #ruby
nemesit|znc has joined #ruby
totalmajor has quit [Ping timeout: 240 seconds]
Mars has joined #ruby
Mars is now known as Guest17191
iliketurtles has quit [Quit: zzzzz…..]
St_Marx has joined #ruby
shedd has joined #ruby
geggam has quit [Remote host closed the connection]
guiocavalcanti has quit [Remote host closed the connection]
Sthebig has quit [Quit: /quit]
apeiros has quit []
kevind has joined #ruby
shadoi1 has quit [Quit: Leaving.]
Seich has joined #ruby
Sthebig has joined #ruby
jhn has quit [Ping timeout: 272 seconds]
adam- is now known as adam12
rankine has joined #ruby
<shevy> guys
<shevy> let's say I have a hash
<shevy> I want to get the third element
<shevy> does not matter what it is
<shevy> how could I do that?
interactionjaxsn has quit [Remote host closed the connection]
<matled> shevy: hash.keys[2]?
<shevy> aaaaah
<shevy> I am so dumb
asteve has joined #ruby
<shevy> yeah matled, thanks
<cong> hash[hash.keys[2]]
interactionjaxsn has joined #ruby
<matled> cong: hash.values[2] should suffice if you don't need the key
St_Marx has quit [Ping timeout: 240 seconds]
rankine has quit [Quit: Leaving]
rankine has joined #ruby
rankine has quit [Changing host]
rankine has joined #ruby
<cong> i'm sure i would know that if i read more about hashes.
phipes has quit [Remote host closed the connection]
heftig has quit [Quit: Quitting]
<Hanmac> shevy: or wihout creating big array: hash.each.with_index {|(k,v),i| break v if i == 2 }
mikepack has quit [Remote host closed the connection]
centipedefarmer has quit [Remote host closed the connection]
<shevy> Hanmac that would be faster?
<shevy> the hash has almost 20.000 keys already
<Hanmac> didnt benchmark it, but i think it would be faster ...
<matled> just thought about that too, could also do hash.each.take(3).last, not sure how fast/slow last(n) is vs with_index with break
<shevy> well
<matled> for n = 3 probably very negligible
<shevy> .keys[position] is so much cleaner than the alternatives so far :<
asteve has quit [Ping timeout: 272 seconds]
interactionjaxsn has quit [Ping timeout: 252 seconds]
<shevy> in ruby we have... short is pretty but slow, ugly is fast
<matled> enumerator doesn't have a metod to get a specific element, right?
retrofade has joined #ruby
thumpba has quit [Remote host closed the connection]
thumpba has joined #ruby
heftig has joined #ruby
<Hanmac> shevy: Hay! we forget this: hash.find.with_index {|(k,v),i| i == 2 }
meatherly has quit [Remote host closed the connection]
<shevy> hmm
<shevy> nah sorry Hanmac
<shevy> any of these 3 things are too ugly
cbetta_afk is now known as cbetta
<shevy> I stick with the prettier but slower one
meatherly has joined #ruby
iliketurtles has joined #ruby
Godd2 has joined #ruby
iliketurtles has quit [Excess Flood]
<havenwood> shevy: sounds shallow if you didn't know what you were talking about
<shevy> havenwood why
<Godd2> Anyone know how to dynamically call class constants?
<havenwood> shevy: looks over brains
centipedefarmer has joined #ruby
thumpba has quit [Remote host closed the connection]
<Hanmac> Godd2: what about const_get?
<havenwood> shevy: preferring the pretty, slow one over the homely, smart one :P
thumpba has joined #ruby
<shevy> ah no
<shevy> I love beautiful
<shevy> if I want ugly I go and use C
<Godd2> Hanmac: I did not know about const_get. works perfectly, thank you :)
<shevy> or Go
<shevy> OR JAVA
<Hanmac> shevy: or PHP ? ;p
<shevy> or perl
<shevy> hmm
<lethjakman> shevy: is Go ugly?
<havenwood> lethjakman: yup
<lethjakman> I want a pretty compiled language.
<alexherb1> how apply a regex on stream?
<shevy> lethjakman don't really know
mlpinit_ has joined #ruby
zipper has quit [Quit: Lost terminal]
<lethjakman> I keep meaning to play with it.
<shevy> lethjakman I think java leads the list, then comes C++... then perhaps perl
<lethjakman> haven't gotten to it yet though.
<lethjakman> I actually like the new c++
<shevy> that template stuff in C++ is so awful
<lethjakman> it's as pretty as a compiled language gets in my opinion.
<havenwood> lethjakman: a nicer-than-C but still fugly lang
<lethjakman> you can make things fairly pretty.
<shevy> not sure lethjakman
<lethjakman> I liked a lot of the code from design patterns by GoF
<shevy> these languages all seem to be rather similar in inspiration from syntax
<shevy> C, C++, Java, Go
danshultz has quit [Remote host closed the connection]
meatherly has quit [Ping timeout: 245 seconds]
<lethjakman> what made ruby so different?
<shevy> they all depend a lot on {} right?
burlyscudd has quit [Quit: Leaving.]
iliketurtles has joined #ruby
<lethjakman> a lot of the time, yes.
<alexherb1> /foo/.parse(STDIN)
danshultz has joined #ruby
<lethjakman> which I would rather not have
<shevy> lethjakman well scripting languages are much more lightweight everywhere
<lethjakman> and rubys function syntax too
<alexherb1> how do that?
<lethjakman> I don't think that's an excuse for syntax.
<shevy> I can write a .rb script, then I set an alias, then I can call it from bash
kevind has quit [Quit: kevind]
allaire has joined #ruby
<shevy> alexherb1 does that work?
<shevy> NoMethodError: undefined method `parse' for //:Regexp
<alexherb1> of course not
BuffyNZ has joined #ruby
<shevy> alexherb1 you can add it... class Regexp; def parse(i = '');end;end
freebs has quit [Read error: Connection reset by peer]
<shevy> lethjakman with C, I would have an additional compile cycle
<shevy> lethjakman then I must carry both the source, and the compiled version, if I want to use it
<alexherb1> shevy: hum how?
<alexherb1> i would parse stdin on stream
<shevy> alexherb1 what do you mean how? just add this line of code into a .rb file
<shevy> on stream?
<shevy> /foo/ is a regex, no?
<alexherb1> yes
pskosinski_ is now known as pskosinski
kevind has joined #ruby
<waxjar> alexherb1: Regexpes have no parse method. what are you trying to do?
mlpinit has quit [Ping timeout: 272 seconds]
mlpinit_ has quit [Ping timeout: 240 seconds]
* Hanmac smells a rails problem
<shevy> hehe
<BuffyNZ> Hi folks, would this be the right channel to ask a question about rake unit tests, or is there a more approprate channel?
<havenwood> #rubyonrails!
<shevy> Hanmac, I went through a rails tutorial today
<havenwood> BuffyNZ: Here'd be good.
<waxjar> rails and STDIN? :O
<shevy> Hanmac I got until the part "Hi Rails!" then I closed the tab again
<BuffyNZ> havenwood: Thanks!
<lethjakman> shevy: you may need an aditional cycle, I don't think so though. it's when it's being parsed to assembly. and then it'd just be built into the language.
<lethjakman> I'm not talking about coffeescripting C, I'm talking about making function syntax different and other things.
<shevy> lethjakman yeah, I mean, I have to do extra steps, as opposed to ruby or other dynamic languages
wildroman2 has quit [Remote host closed the connection]
<shevy> I guess I could keep all .c files in a separate directory
danshultz has quit [Ping timeout: 240 seconds]
heftig has quit [Ping timeout: 240 seconds]
<shevy> and run a batch-script to compile them into /usr/bin or somewhere
heftig has joined #ruby
<shevy> In ruby I just edit the .rb file, that makes me happy
<alexherb1> waxjar: parse stdin on stream means i don’t want block on read until stdin receive eof (STDIN.read.match /foo/)
freezey has quit [Ping timeout: 246 seconds]
burlyscudd has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
<BuffyNZ> I am trying to hack a unit test together for a pull request. The unit tests are using rake. I am having trouble getting my expects() to pass, and would like to see what is actually being invoked. Is there a way to get rake to show what was invoked so I can see what is different from what it is in the expect?
Hanmac1 has joined #ruby
<alexherb1> currently i use STDIN.each_line
<Hanmac1> lethjakman: you dont want to see what i can do with C macros ... shevy did see it ... and he dont what to see it ever again ;P
Zai00 has quit [Quit: Zai00]
<lethjakman> Hanmac1: oh god no.
<shevy> lol
<shevy> lethjakman you can already see that Hanmac's code is weird here in ruby
<shevy> Hanmac why are you here twice
<lethjakman> shevy: that's not really what I'm talking about. I just think that the C style syntax is antiquated, I think it could be prettier.
<lethjakman> he is?
<lethjakman> huh...
joaoh82 has joined #ruby
<havenwood> doppleganger!
kevind has quit [Client Quit]
mikepack has joined #ruby
<shevy> well I meant this mostly as reply to when you wrote this:
<shevy> <lethjakman> what made ruby so different?
<shevy> but yeah syntax plays a big role as well
<WJW> BuffyNZ, check the options on rake.
<Hanmac1> shevy the problem will be solved in no time
simplyaubs has quit [Quit: simplyaubs]
<lethjakman> shevy: I asked you the samet hing. I don't know
<shevy> lethjakman the C-style syntax also often seems to inspire verbosity
<lethjakman> it does
<lethjakman> oh god...java's verbosity.
<lethjakman> I hate it so
Hanmac has quit [Ping timeout: 272 seconds]
<shevy> let me get hello world in java
Hanmac1 is now known as Hanmac
<lethjakman> lol I've done java...not a fan.
<shevy> public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World"); } }
kevind has joined #ruby
<shevy> C++
<shevy> #include <iostream> int main() { std::cout << "Hello World!"; }
<shevy> hmm
<cong> return 0
<shevy> perhaps std:: can be dropped
centipedefarmer has quit [Remote host closed the connection]
<Hanmac> lethjakman: are you good in C/C++? if yes, try to solve that this macro does: https://github.com/Hanmac/rwx/blob/master/ext/wxStaticBitmapBase.cpp#L21
drumusician has quit [Ping timeout: 248 seconds]
<lethjakman> shevy: it can if you namespace yourself
<WJW> Bash: echo Hello, World!
<shevy> oh I remember
<shevy> right
<shevy> something like: using namespace std;
kevind has quit [Remote host closed the connection]
jmimi has quit [Ping timeout: 252 seconds]
<shevy> WJW bash starts to suck a lot if you want to do truly complicated things
<lethjakman> yep.
<lethjakman> seems better than java to me...haven't used go though so I can't compare.
joaoh82 has quit [Ping timeout: 246 seconds]
<waxjar> bash is so weird, i really dont like it.
<shevy> I actually liked php more than shell stuff
<lethjakman> Hanmac: I don't know, I'd have to spend more time with it. what's it do?
<shevy> while php sucked, I was able to do useful things with it!
<lethjakman> bash has its place...
devdazed has quit [Quit: Bye]
<lethjakman> it's not so much a programming language as it is a system language.
<lethjakman> I hated it til I got used to it
<lethjakman> now I love/hate it.
<lethjakman> zsh is nicer
<shevy> one day I will replace bash with a hybrid ruby shell
joaoh82 has joined #ruby
kevind has joined #ruby
<shevy> but one has to use C :(
jmimi has joined #ruby
<waxjar> it's similar to javascript in that you shoot yourself in the foot countless times because of its little quirks when you try to do simple things
<lewix> i hate that i forgot most of my c and java
<lewix> it's like i never used it
<lethjakman> lol
<atmosx> Lewix: awesome
jmimi has quit [Client Quit]
<havenwood> waxjar: so much more so too when you're trying to code portable shell rather than bash
<lethjakman> that'd be nice.
<lethjakman> ugh javascripts querks
<atmosx> Lewix: maybe there is a reason your brain cells choose to burry that down
randomnick_ has quit [Quit: Leaving]
<havenwood> waxjar: total minefield
<Hanmac> lethjakman: "macro_attr(Bitmap,wxBitmap)" => "macro_attr_func(Bitmap,GetBitmap(),SetBitmap,wrap,unwrap<wxBitmap>)"
<shevy> Lewix combining ruby with C is kinda cool
<waxjar> havenwood: i can imagine so :p
max96at has quit [Quit: Textual IRC Client: www.textualapp.com]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<cong> i've been working on a tk/term. http://cxg.de/_1df1ee.htm not finished
<shevy> please Hanmac
<lethjakman> interesting.
<lewix> atmosx: I hope so -) but i wanna relearn it though
<BuffyNZ> WJW: Sorry, I cant see a rake command line option that shows what was invoked. I have tried --trace and -v.
<Hanmac> lethjakman: this line resolves to this: => "DLL_LOCAL VALUE _getBitmap(VALUE self){return wrap(_self->GetBitmap());}DLL_LOCAL VALUE _setBitmap(VALUE self,VALUE other){rb_check_frozen(self);_self->SetBitmap(unwrap<wxBitmap>(other));return other;}"
<shevy> cong the ; is not needed at the end of the line
kaldrenon has joined #ruby
<cong> it's not a crime punishable by death is it?
<shevy> lethjakman now imagine what Hanmac's documentation looks like
<shevy> cong it is unnecessary
rm_ has joined #ruby
<shevy> think of all the bytes you will waste that way in the next 30 years
robbyoconnor has quit [Ping timeout: 252 seconds]
retrofade has quit [Ping timeout: 240 seconds]
centipedefarmer has joined #ruby
<BuffyNZ> WJW: Hmm, sorry, it appears the options I am passing are being stripped. Will keep trying.
<Hanmac> lethjakman: or for short: "macro_attr" generates _get and _set methods incl type conversion & frozen check and maybe latter exception handling. the methods are documented later as attributes
<cong> if i was efficient then i could care.
<lethjakman> very interesting....
<shevy> cong every wasted keystroke could bring you closer to some goal
<shevy> rather, every not wasted one
totalmajor has joined #ruby
<Hanmac> lethjakman: like one of the classes has 27! attributes ... and i am very lazy i dont want to write the nearly same method body for each get and set method when i can use macros for that
sepp2k has joined #ruby
rm_ has quit [Ping timeout: 252 seconds]
phipes has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
zeropx has quit [Ping timeout: 252 seconds]
phipes has quit [Read error: Connection reset by peer]
phipes has joined #ruby
croaky has quit [Ping timeout: 272 seconds]
estebistec has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
relix has joined #ruby
stetho has joined #ruby
croaky has joined #ruby
robbyoconnor has joined #ruby
Guest17191 has quit [Remote host closed the connection]
vlad_sta_ has joined #ruby
John445 has joined #ruby
kofno has joined #ruby
<BuffyNZ> Okay new question. I am running the unit tests for the package using 'bundle exec rake spec', which is eventually invokes rake, but I cant not find a way to pass parameters through, can anyone give me a pointer on where to start?
Hanmac1 has joined #ruby
aryaching_ has joined #ruby
phipes has quit [Ping timeout: 246 seconds]
slash_nick has quit [Quit: leaving]
slash_nick has joined #ruby
estebistec has joined #ruby
slash_nick has quit [Changing host]
slash_nick has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
Hanmac has quit [Ping timeout: 252 seconds]
lfox has quit [Quit: ZZZzzz…]
robbyoconnor has quit [Excess Flood]
aryaching has quit [Ping timeout: 272 seconds]
robbyoconnor has joined #ruby
kep has quit [Quit: WeeChat 0.4.2]
Bosox20051 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
centipedefarmer has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 252 seconds]
baroquebobcat has joined #ruby
estebistec has quit [Remote host closed the connection]
bentonrr has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
lfox has joined #ruby
tommylommykins has quit [Remote host closed the connection]
marr has joined #ruby
robbyoconnor has quit [Ping timeout: 252 seconds]
kirun has quit [Quit: Client exiting]
totalmajor has quit [Remote host closed the connection]
phipes has joined #ruby
mburns_ is now known as mburns
tommylommykins has joined #ruby
kaldrenon has quit [Remote host closed the connection]
Mars has joined #ruby
Mars is now known as Guest84005
zeropx has joined #ruby
pdtpatrick has joined #ruby
olivier_bK has quit [Ping timeout: 246 seconds]
phipes has quit [Ping timeout: 240 seconds]
matchaw has quit [Ping timeout: 272 seconds]
lukec has quit [Quit: lukec]
nanoyak has quit [Quit: Computer has gone to sleep.]
Wolland has quit [Remote host closed the connection]
figgleberry has joined #ruby
nanoyak has joined #ruby
rjhunter has joined #ruby
Seich has quit [Quit: Computer has gone to sleep.]
phipes has joined #ruby
allaire has quit []
drago777 has quit [Ping timeout: 240 seconds]
havenwood has quit [Remote host closed the connection]
drago777 has joined #ruby
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
axl_ has quit [Quit: axl_]
John445 has quit [Quit: John445]
axl_ has joined #ruby
centipedefarmer has joined #ruby
Hanmac has joined #ruby
figgleberry has quit [Ping timeout: 260 seconds]
f0ster has joined #ruby
Hanmac1 has quit [Ping timeout: 260 seconds]
iamjarvo has quit [Ping timeout: 252 seconds]
Seich has joined #ruby
RoryHughes has quit []
ssvo_ has quit [Quit: leaving]
dima has quit [Remote host closed the connection]
sharms has quit [Ping timeout: 240 seconds]