apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
w3pm has quit [Read error: No route to host]
bionoid has joined #ruby
predator117 has quit [Ping timeout: 240 seconds]
rupee has quit [Quit: Leaving]
krainboltgreene has joined #ruby
tonini has joined #ruby
ffio has joined #ruby
_ffio_ has quit [Ping timeout: 240 seconds]
michaeldeol has joined #ruby
[E] has left #ruby [#ruby]
dennisz has joined #ruby
pitzips_ has quit [Ping timeout: 264 seconds]
rezzack has quit [Ping timeout: 246 seconds]
tonini has quit [Ping timeout: 264 seconds]
cj3kim has quit [Remote host closed the connection]
_maes_ has joined #ruby
lemonsparrow has quit [Ping timeout: 250 seconds]
rezzack has joined #ruby
arya__ has joined #ruby
sambao21 has joined #ruby
wmoxam has joined #ruby
reset has joined #ruby
devoldmx has joined #ruby
jmimi has joined #ruby
tobyo1 has quit [Ping timeout: 246 seconds]
jaimef has quit [Excess Flood]
krainboltgreene has quit [Ping timeout: 256 seconds]
ssvo has quit [Ping timeout: 240 seconds]
tricon_ has quit [Quit: Leaving...]
inimit has quit [Quit: inimit]
havenwood has quit [Remote host closed the connection]
BSaboia has joined #ruby
jaimef has joined #ruby
tjbiddle_ has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
fmcgeough has joined #ruby
wmoxam has quit [Ping timeout: 276 seconds]
Zeeraw has quit [Quit: Computer has gone to sleep.]
zenergi has joined #ruby
tjbiddle has quit [Ping timeout: 246 seconds]
tjbiddle_ is now known as tjbiddle
Neomex has quit [Quit: Neomex]
Thoughtworker has joined #ruby
Thoughtworker has quit [Client Quit]
joe_the_engineer has joined #ruby
mikeg has quit [Remote host closed the connection]
Tricon has joined #ruby
marcgg has quit [Ping timeout: 260 seconds]
blitz has quit [Quit: This computer has gone to sleep]
Hanmac1 has joined #ruby
marcgg has joined #ruby
Guest6747 is now known as banghouse
jaimef has quit [Excess Flood]
hogeo has joined #ruby
wmoxam has joined #ruby
marr has quit [Ping timeout: 240 seconds]
wsterling has joined #ruby
Yakko has joined #ruby
arya__ has quit [Ping timeout: 248 seconds]
arya_ has joined #ruby
bigoldrock has quit [Ping timeout: 240 seconds]
Hanmac1 has quit [Ping timeout: 268 seconds]
gildo has quit [Ping timeout: 246 seconds]
goldfax has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
DonRichie has quit [Ping timeout: 260 seconds]
goldfax has left #ruby [#ruby]
wsterling has quit [Ping timeout: 276 seconds]
jaimef has joined #ruby
DonRichie has joined #ruby
jonathanwallace has joined #ruby
niklasb has quit [Ping timeout: 276 seconds]
jonkri has quit [Quit: jonkri]
rsahae has quit [Quit: rsahae]
NiteRain has joined #ruby
rsahae has joined #ruby
mansi has joined #ruby
smathieu has quit [Remote host closed the connection]
tkuchiki has joined #ruby
GeissT has joined #ruby
adeponte has quit [Remote host closed the connection]
ravster has quit [Quit: Leaving.]
dennisz has quit [Quit: dennisz]
smathieu has joined #ruby
shosti has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.0]
iliketurtles has quit [Quit: zzzzz…..]
asgardBSD has quit [Read error: Connection reset by peer]
michaeldeol has quit [Remote host closed the connection]
zomgbie has joined #ruby
sailias has joined #ruby
centr0 has quit [Quit: centr0]
asgardBSD has joined #ruby
robert_ has joined #ruby
hamakn has joined #ruby
bricker has quit [Ping timeout: 264 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
zomgbie has quit [Ping timeout: 268 seconds]
thepumpkin has quit [Remote host closed the connection]
thepumpkin has joined #ruby
emergion has joined #ruby
ultimoo has quit [Ping timeout: 264 seconds]
johnnyfuchs has quit [Remote host closed the connection]
emergion has quit [Max SendQ exceeded]
blitz has joined #ruby
poikon has quit [Read error: Operation timed out]
saarinen has quit [Quit: saarinen]
kofno has joined #ruby
tommyvyo has quit [Quit:]
pitzips has quit [Ping timeout: 256 seconds]
jaimef has quit [Excess Flood]
tacos1de has quit [Remote host closed the connection]
jrendell has quit [Quit: jrendell]
optimusprimem has quit [Excess Flood]
tacos1de has joined #ruby
shosti has quit [Remote host closed the connection]
djbkd has quit [Quit: Leaving]
joe_the_engineer has quit [Quit: leaving]
jaimef has joined #ruby
optimusprimem has joined #ruby
popl has joined #ruby
atyz has quit [Quit: Leaving...]
Yakko_ has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
Yakko has quit [Ping timeout: 248 seconds]
michaeldeol has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
wallerdev has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pipework has joined #ruby
tricon_ has joined #ruby
jaimef has quit [Quit: Emacs must have died]
alvaro_o has joined #ruby
jaimef has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Tricon has quit [Ping timeout: 246 seconds]
henn has joined #ruby
nari has quit [Ping timeout: 240 seconds]
reset has quit [Quit: Leaving...]
Davey has joined #ruby
Spooner has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 248 seconds]
lindenle has quit [Quit: This computer has gone to sleep]
EPIK has joined #ruby
atyz has joined #ruby
<robert_> is there anyone who has had any luck connecting an XMPP library to Google Talk in the last three months? I can't seem to make it happen. :/
Deele has quit [Ping timeout: 240 seconds]
Underhill has joined #ruby
Hoyt has joined #ruby
<Hoyt> Hi Why doesn't it work: print #{var}
<Hoyt> Quote works
<r0bgleeson> Hoyt: #{} is for string interpolation, it doesn't work outside strings, it doesn't look like you need it either, simply print var
<Hoyt> Ah thanks
inimit has joined #ruby
vlad_starkov has joined #ruby
inimit has quit [Client Quit]
renderful has joined #ruby
Godd2 has quit [Quit: Page closed]
pipework is now known as combatwombat
asgardBSD has quit [Ping timeout: 276 seconds]
combatwombat is now known as Guest14949
Hanmac1 has joined #ruby
Guest14949 is now known as pipework
mansi has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 246 seconds]
MrZYX is now known as MrZYX|off
ILoveYou has joined #ruby
ner0x has joined #ruby
kofno has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 248 seconds]
<bnagy> MORNING!
arya_ has joined #ruby
ILoveYou[ has quit [Ping timeout: 245 seconds]
MrZYX|off is now known as MrZYX
<popl> hi bnagy
niklasb has joined #ruby
nari has joined #ruby
<bnagy> how is it friday already
<popl> fml
i_s has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
BSaboia has quit [Ping timeout: 246 seconds]
Voodoofish430 has quit [Quit: Leaving.]
iliketurtles has joined #ruby
graft is now known as Guest1013
brianpWins has quit [Quit: brianpWins]
fridim__ has joined #ruby
lebek has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby
JZTech101 has quit [Ping timeout: 240 seconds]
johnkary has joined #ruby
danshultz has joined #ruby
smathieu has quit [Remote host closed the connection]
rsahae has quit [Ping timeout: 240 seconds]
wmoxam has quit [Ping timeout: 246 seconds]
rodacato has joined #ruby
zomgbie has joined #ruby
skyjumper has quit [Quit: ...]
fmcgeough has quit [Quit: fmcgeough]
tatsuya_o has joined #ruby
Davey has joined #ruby
zeromodu_ has joined #ruby
zeromodulus has quit [Read error: Connection reset by peer]
smathieu has joined #ruby
v0n has joined #ruby
smathieu has quit [Remote host closed the connection]
sleetdrop has joined #ruby
stairmast0r has joined #ruby
<stairmast0r> why do i want to move from PHP to ruby?
adeponte has joined #ruby
krainboltgreene has joined #ruby
<popl> stairmast0r: we don't know the answer to that question.
<r0bgleeson> stairmast0r: impossible to answer
<popl> at least I don't
renderful has quit [Remote host closed the connection]
<popl> stairmast0r: blanket questions like that rarely produce fruitful answers. perhaps you should determine what you are looking to accomplish and then select the best language for the task.
serp` has joined #ruby
tatsuya_o has quit [Ping timeout: 260 seconds]
zomgbie has quit [Ping timeout: 260 seconds]
<stairmast0r> popl: i can't manage that many languages at present
Domon has joined #ruby
<popl> How many is that many?
<stairmast0r> so i wanted to pick one that i can comfortably use in most places
<popl> Most places?
<popl> What places?
<stairmast0r> i should stop talking
<popl> Or you could finish the conversation you initiated.
<popl> It's up to you. :P
tommyvyo has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
<stairmast0r> i shouldn't have started it but..
adeponte has joined #ruby
<stairmast0r> i was trying to build a website that manages some stuff based around SQL
skyjumper has joined #ruby
skyjumper has quit [Client Quit]
stkowski has quit [Quit: stkowski]
<bnagy> everybody should move from PHP to something else
<stairmast0r> that's what i'm trying to do
<stairmast0r> and i wanted to pick a language that can be a fairly general replacement for PHP
<stairmast0r> as well as one moderately comprehensible by a C-family programmer
louism2_ has quit [Quit: This computer has gone to sleep]
Hoyt has quit [Quit: WeeChat 0.4.1]
<bnagy> I'm not sure how much I agree that PHP is a general language in the first place
ILoveYou[ has joined #ruby
<bnagy> but lots of people do web crap in ruby, if you like that kind of thing
zenergi has quit [Ping timeout: 276 seconds]
<stairmast0r> yes, for the most art
<stairmast0r> part
<stairmast0r> i'd use C++ if i could, though...
chrisy2k has joined #ruby
<bnagy> ... ew.
chrisy2k has quit [Client Quit]
adeponte has quit [Remote host closed the connection]
<stairmast0r> :/
<stairmast0r> it's what i know
nfk has quit [Remote host closed the connection]
ILoveYou has quit [Ping timeout: 246 seconds]
<tricon_> I <3 C/C++.
tricon_ is now known as Tricon
tkuchiki has quit [Ping timeout: 268 seconds]
Underhill has quit [Remote host closed the connection]
hogeo has quit [Ping timeout: 264 seconds]
Tricon has quit [Quit: Linkinus - http://linkinus.com]
Tricon has joined #ruby
arya_ has joined #ruby
freakazoid0223 has joined #ruby
Tricon has quit [Client Quit]
Tricon has joined #ruby
Tricon has quit [Client Quit]
Tricon has joined #ruby
i_s has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
TonyMergue has quit [Read error: Connection reset by peer]
lurid has joined #ruby
niklasb has quit [Ping timeout: 246 seconds]
krainboltgreene has quit [Ping timeout: 260 seconds]
<lurid> would anyone out there be able to tell me how to do this in 1.8.7? .scan(/(.*?(?<!\\)(?:\\\\)*)(<.*?>|$)/) do |match|
hogeo has joined #ruby
thams has quit [Quit: thams]
tkuchiki has joined #ruby
radic_ has joined #ruby
zeromodu_ is now known as zeromodulus
zeromodulus has quit [Changing host]
zeromodulus has joined #ruby
<bnagy> lurid: don't
<lurid> :-(
<bnagy> don't use 1.8, don't use regexps, don't use lookaheads
ssvo has joined #ruby
arya_ has quit [Ping timeout: 240 seconds]
<bnagy> actually I am going to log this, print out the logs and then burn them just so I can feel clean again
pr0ggie has joined #ruby
<lurid> if I can make it work on 1.8.7 it can work on OSX mountain lion, by default
wald0 has joined #ruby
<wald0> so its the pragmatic book 4º edition already released ? (not beta version)
Opettaja has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
i_s has quit [Ping timeout: 260 seconds]
sqd_ has quit [Quit: sqd_]
radic__ has quit [Ping timeout: 268 seconds]
lebek has quit [Ping timeout: 246 seconds]
hogeo has quit [Ping timeout: 246 seconds]
<lurid> is Regexp.new("/(.*?(?<!\\)(?:\\\\)*)(<.*?>|$)/",nil,"u") wrong for some reason? It compiles
louism2__ has joined #ruby
tkuchiki has quit [Ping timeout: 260 seconds]
<popl> what do you mean wrong?
robustus has quit [Ping timeout: 248 seconds]
<lurid> behaves differently than expected, from the previous line
hogeo has joined #ruby
arya_ has joined #ruby
<popl> what are you trying to match?
<lurid> I'm trying to make https://github.com/asilano/succubus work, on sox's default ruby, https://gist.github.com/loadedsith/6034624 is the original
<lurid> *osx's*
robustus has joined #ruby
psychouroboros has quit [Excess Flood]
Vivekananda has quit [Ping timeout: 246 seconds]
tkuchiki has joined #ruby
<popl> lurid: good luck
smathieu has joined #ruby
freakazoid0223 has quit [Remote host closed the connection]
<lurid> :-)
deadalus has joined #ruby
tkuchiki_ has joined #ruby
arya_ has quit [Client Quit]
stkowski has joined #ruby
tkuchik__ has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
v0n has quit [Ping timeout: 240 seconds]
kofno has joined #ruby
serp` has quit [Quit: serp`]
tkuchik__ has quit [Remote host closed the connection]
smathieu has quit [Ping timeout: 276 seconds]
<bnagy> that gem displeases me
tkuchiki has joined #ruby
vikhyat has joined #ruby
<bnagy> greatly
tkuchiki_ has quit [Ping timeout: 246 seconds]
Hanmac has joined #ruby
Fire-Dragon-DoL has joined #ruby
Notte has quit [Remote host closed the connection]
<iliketurtles> can someone help me formulate a simple function to run on a string that converts character frequency (percentage) to a Vector object in ruby?
Fuzai has quit [Remote host closed the connection]
<bnagy> >> "this <is> a <test><string>".split(/(<.*?>)/)
<eval-in> bnagy => ["this ", "<is>", " a ", "<test>", "", "<string>"] (https://eval.in/38052)
Hanmac has quit [Ping timeout: 260 seconds]
<bnagy> lurid: ^
<bnagy> that's 95% of the way there
Fuzai has joined #ruby
<iliketurtles> I'm hoping to create a vector, rather than an array
<iliketurtles> and to have each character, not word, represented in percentage
tkuchiki_ has joined #ruby
<iliketurtles> Vector[1.0, 2.0, 3.0] would be the percentages of character frequency for a,b,c
tkuchiki has quit [Read error: Connection reset by peer]
<bnagy> what are you going to do with it afterwards?
<bnagy> as in why do you want it in a vector?
<iliketurtles> compare it to another vector using inner_product and/or norm
<iliketurtles> determining similarity to english using cosine difference, essentially
<bnagy> interesting
<iliketurtles> ^_^
<bnagy> I just use a histogram and do a simple difference
<iliketurtles> been trying to figure out an eloquent way to do this with string
<bnagy> which works fine
mantas322 has joined #ruby
wsterling has joined #ruby
<mantas322> Hi guys!!! can I have a set of number
<mantas322> and then do mySet.contains(10) ?
<mantas322> s2 = Set.new
<mantas322> s2.add(12)
fridim__ has quit [Ping timeout: 240 seconds]
<mantas322> s2.cont5ains(12) ?
<bnagy> anyways, basically create a Hash, run the string char by char ( do you want codepoints? ) and fill the counts
<bnagy> then sort, divide through by n and you're done
<bnagy> mantas322: feel free to read the documentation for Set
bertolo has quit [Quit: Bye]
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
bertolo has joined #ruby
r0bby has joined #ruby
sethetter has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
<bnagy> iliketurtles: the thing I'm not immediately liking about the vector approach is that you have to sort it and stuff
<iliketurtles> bnagy what do you mean sort it?
<bnagy> whereas a hash you can just directly compare by walking hash a and comparing to the same key in hash b
<bnagy> to do the comparison
<iliketurtles> how would I do that same comparison using a hash?
<bnagy> observed.each {|k,v| diff += Math.abs(v - template[k]}
<bnagy> or something
<bnagy> straightline diff per token
<bnagy> in the past I've also done difference of squares, but recently I don't think it is required
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby
<bnagy> I'll look up this coseine difference though, I don't know anything about it
ulius has joined #ruby
<bnagy> if you want to just get a 'rough feel' you can do index of coincidence
<bnagy> but it takes more text to really work
eka has quit [Quit: Computer has gone to sleep.]
<iliketurtles> bnagy: i'm working on very short strings
<iliketurtles> no more than ~75 characters
Anarch has quit [Ping timeout: 240 seconds]
sethetter has quit [Ping timeout: 246 seconds]
<bnagy> yeah I'd try a straight diff then
<iliketurtles> bnagy: how so?
<bnagy> cause you can ignore tokens that are missing in one input
ssvo has quit [Ping timeout: 256 seconds]
<iliketurtles> bnagy: that's your example above? observed.each?
dhruvasagar has joined #ruby
<bnagy> yeah you'd need to jazz it up a little bit
cha1tanya has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
krz has joined #ruby
<bnagy> I'm doing the matasano stuff at the moment, but in Go, so I don't have an exact ruby example
<iliketurtles> bnagy: ah nice, so you know where im coming from with this
mantas322 has quit [Quit: Page closed]
ixti has quit [Quit: WeeChat 0.4.1]
<bnagy> I'd be interested to know if your approach works though
<iliketurtles> my mentor suggested it would
haxrbyte has joined #ruby
<iliketurtles> how far along are you?
<bnagy> but unless I am having math-fail vectors are going to be order sensitive
<iliketurtles> what do you mean
<bnagy> most way through set 2
<bnagy> well [2,3] is not the same as [3,2]
<iliketurtles> right, but would that really matter?
<bnagy> so if that were the whole freq map of characters, it wouldn't make sense to compare them unless they were sorted, no?
zomgbie has joined #ruby
<iliketurtles> true
<bnagy> or does it just use inner product?
haxrbyte_ has quit [Read error: Connection reset by peer]
clintnewsom has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
tkuchiki_ has quit [Remote host closed the connection]
danshultz has quit [Remote host closed the connection]
<iliketurtles> im not sure
<iliketurtles> im confused about my approach now
<bnagy> :D
<bnagy> that's what we're here for!
<iliketurtles> heh
<iliketurtles> so you did it with a hash?
<bnagy> now that I'm reading this again I think you might be right, but I definitely think it's going through the woods
Anarch has joined #ruby
<bnagy> imho write up a simple normalised diff first, there are still plenty of gotchas with that
<iliketurtles> right about what?
<bnagy> right about not having to sort
GeissT has quit [Ping timeout: 276 seconds]
tkuchiki has joined #ruby
<iliketurtles> i dont know why i would have to sort; couldnt i just iterate through a string; first time, count all "a" instances, and add it as the first entry in the vector ie. Vector[#ofA, #ofB] etc
TomRone has joined #ruby
<bnagy> yeah but that's sorting
<iliketurtles> =]
<iliketurtles> touché
<bnagy> like you get an ordered vector at the end
<iliketurtles> correct
<iliketurtles> i thought you meant sorting after the fact, which would be impossibruuuu with a vector
<bnagy> no you'd have to sort the hash and then just take the values in that order
<bnagy> hsh.sort.map &:last
zomgbie has quit [Ping timeout: 260 seconds]
<iliketurtles> oh
<iliketurtles> wait
<iliketurtles> are you saying do a hash so you only have to iterate over string once
<iliketurtles> and then convert it into a vector?
<bnagy> yeah among other reasons
ssvo has joined #ruby
<bnagy> you can easily do both
<iliketurtles> or just deal with hash exclusively
<bnagy> so step 1 - build a hash of normalised value
<iliketurtles> normalized value meaning just each letter as a key?
<bnagy> 'e' => 12.4 or whatever
<iliketurtles> sure
<bnagy> as a %
<iliketurtles> yes
<bnagy> or |0,1| either way
<iliketurtles> got u
<bnagy> once you've done that you can use either or both of the comparisons we just talked about
<bnagy> fairly trivially
<iliketurtles> so one approach is, step 2 convert the hash to vector, step 3 use cosine difference
<bnagy> yep
<iliketurtles> another approach, observed.each {|k,v| diff += Math.abs(v - template[k]}
<bnagy> yep
<iliketurtles> word
Kruppe has quit [Quit: rcirc on GNU Emacs 24.3.1]
dhruvasagar has quit [Ping timeout: 246 seconds]
artemeff has joined #ruby
joe_the_engineer has joined #ruby
<iliketurtles> bnagy: so if i took the observed.each approach, I'd build up another hash of the difference of each character
<iliketurtles> and I'd be looking for the one where the sum of all difference was closest to 0?
<bnagy> no you'll just get a single scalar at the end
Yakko_ has quit [Ping timeout: 276 seconds]
<iliketurtles> OH. diff +=
<iliketurtles> didnt see that lol
<bnagy> like a perfect match would, yes, have a diff of 0
<iliketurtles> hmmmm i feel like thats easier
<bnagy> oh it's WAY easier
<bnagy> I just don't know if it's better :)
alvaro_o has quit [Quit: Ex-Chat]
<bnagy> it's 2 lines max, if I wanted to golf it
<iliketurtles> bnagy: me gusta
<iliketurtles> sorry im ritarded today
twoism has quit [Remote host closed the connection]
rodacato has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
braincrash has joined #ruby
clintnewsom has quit [Quit: clintnewsom]
braincra- has quit [Read error: Operation timed out]
havenwood has joined #ruby
clintnewsom has joined #ruby
AntelopeSalad has quit [Ping timeout: 256 seconds]
arya_ has joined #ruby
monkegji_ has quit [Ping timeout: 240 seconds]
haxrbyte has quit [Remote host closed the connection]
clintnewsom has quit [Client Quit]
haxrbyte has joined #ruby
ulius has quit [Quit: Page closed]
joe_the_engineer has quit [Quit: leaving]
nkts_ has quit [Read error: Connection reset by peer]
nkts has joined #ruby
adeponte has joined #ruby
marcdel has joined #ruby
cyong has joined #ruby
robscomputer has quit [Remote host closed the connection]
adeponte has quit [Ping timeout: 260 seconds]
robscomputer has joined #ruby
mad has left #ruby [#ruby]
arya_ has quit [Ping timeout: 248 seconds]
ssvo has quit [Ping timeout: 240 seconds]
vikhyat_ has joined #ruby
welandB has joined #ruby
smathieu has joined #ruby
vikhyat has quit [Ping timeout: 260 seconds]
jonahR_ has joined #ruby
<welandB> If I have a custom object stored as a hash value, how do I return one of that object's variables by default when I reference the object? For instance, if an Engine object is the value of corvette["engine"], how do I get it to return "V8"?
robscomputer has quit [Ping timeout: 240 seconds]
arya_ has joined #ruby
marcgg has quit [Ping timeout: 276 seconds]
smathieu has quit [Ping timeout: 240 seconds]
jonahR_ is now known as jonahR
jonahR has quit [Ping timeout: 264 seconds]
Goopyo has quit [Quit: Goopyo]
marcgg has joined #ruby
<bnagy> use the block form for your Hash
kofno has joined #ruby
kofno has quit [Remote host closed the connection]
Hanmac has joined #ruby
louism2__ has quit [Quit: This computer has gone to sleep]
<bnagy> oh, ew that will only work as the default
<bnagy> might need to Delegate
<bnagy> or, like, just store the thing you want to retrieve :)
mmitchell has quit [Remote host closed the connection]
<welandB> There's no way to set a default variable as what is returned when the object is simply called?
rickruby has joined #ruby
<bnagy> no, if it exists you'll get it
Hanmac has quit [Read error: Operation timed out]
<bnagy> if it doesn't exist you can play around a lot
<welandB> So the best I could do would be to override to_s in the called class for when I call it from puts?
<bnagy> seems unlikely
kofno has joined #ruby
<welandB> E.g. - puts "Engine: #{corvette["engine"]}" would called the Engine.to_s, right?
r0bby has quit [Read error: No route to host]
Meatant has quit [Quit: yis]
<bnagy> I don't see what's wrong with corvette['engine'].engine_name
artemeff has quit [Remote host closed the connection]
<welandB> Me neither but I'm trying to build flexibility from the ground-up.
<Quadlex> Have you tried yoga?
<bnagy> ok well what you're saying is the opposite of that
<welandB> I mean I want to still be able to access instance variables via an accessor method but return one by default if only the object itself is called.
mary5030 has joined #ruby
swordsmanz has quit [Ping timeout: 268 seconds]
fomatin has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
serp` has joined #ruby
<welandB> So corvette['engine'].volume would return... the volume. But corvette['engine'].name and corvtett['engine'] would both return the name.
lindenle has joined #ruby
<bnagy> no, you can't do that
<welandB> Snap.
flaccid has joined #ruby
<bnagy> but that's different to making "#{corvette['engine']}" print "V8"
<welandB> Yes, that's just overriding to_s, isn't it?
adeponte has joined #ruby
<bnagy> that's just overriding inspect output
<welandB> Ohhhhh.
<welandB> Ok.
<welandB> I'll look into that.
<welandB> Thanks bnagy.
io_syl has quit [Ping timeout: 268 seconds]
<bnagy> it's still imho a bad idea btw :P
robbyoconnor has joined #ruby
<welandB> Why's that?
<bnagy> actually I think I'm just crazy.. I think it _is_ to_s :P
<bnagy> >> class Foo;def to_s;"foo";end;end; "#{Foo.new}"
<eval-in> bnagy => "foo" (https://eval.in/38053)
<bnagy> yeah, nevermind me :)
<bnagy> overriding inspect is bad, to_s is fine
<bnagy> ugh, forget it
eldariof has joined #ruby
<flaccid> this might seem like a silly question, but i am learning oop:) how do i make a def in a class public?
<bnagy> inspect uses to_s
<bnagy> I give up. I'm going back to hacking. :(
fridim__ has joined #ruby
<welandB> Yeah I don't think I want to override inspect.
grainol has quit [Ping timeout: 256 seconds]
<bnagy> >> class Foo;def to_s;"foo";end;end; Foo.new.inspect
<eval-in> bnagy => "#<Foo:0x41601044>" (https://eval.in/38054)
<bnagy> ooh, they changed that?
<bnagy> 19>> class Foo;def to_s;"foo";end;end; Foo.new.inspect
<eval-in> bnagy => "foo" (https://eval.in/38055)
<bnagy> yeah. Nice!
Godd2 has joined #ruby
bionoid has quit [Remote host closed the connection]
<bnagy> flaccid: that happens by default
<flaccid> bnagy: i guess its because the class is within a module and i'm calling with Foo::Bar.foobar
<iliketurtles> anyone know how to initialize a vector with an already existing array?
osvico has joined #ruby
<iliketurtles> never mind
<iliketurtles> Vector.elements array
<bnagy> or Vector[*ary]
<bnagy> flaccid: foobar there would be a class method
sailias has quit [Ping timeout: 248 seconds]
<bnagy> a normal class Foo; def blah is an instance method. Foo.new.blah not Foo.blah
ananthakumaran has joined #ruby
<flaccid> bnagy: oh right yeah i should be doing def self.foobar
<bnagy> possibly
<bnagy> class methods don't usually fit nicely in 'proper' OO
<flaccid> ruby confuses me in oop coz there is a billion ways to do it
lewis has joined #ruby
lewis is now known as Lewix
zomgbie has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
arya_ has joined #ruby
<lurid> so I made a valid regex that returns the values I need /(.*?)(<.*?>|$)/ which is much nicer than /(.*?(?<!\\)(?:\\\\)*)(<.*?>|$)/
<lurid> works in 1.8.7, but the gem still doesn't...
<lurid> just returns null
thepumpk_ has joined #ruby
<bnagy> >> "this <is> a <test><string>".scan /(.*?)(<.*?>|$)/
<eval-in> bnagy => [["this ", "<is>"], [" a ", "<test>"], ["", "<string>"], ["", ""]] (https://eval.in/38056)
<bnagy> >> "this <is> a <test><string>".split(/(<.*?>)/)
<eval-in> bnagy => ["this ", "<is>", " a ", "<test>", "", "<string>"] (https://eval.in/38057)
zomgbie has quit [Ping timeout: 259 seconds]
<lurid> not asking for help, just thought i'd update … gonna give up now
joshu_ has quit [Ping timeout: 240 seconds]
obs has joined #ruby
marcgg has quit [Ping timeout: 256 seconds]
thepumpkin has quit [Ping timeout: 240 seconds]
<bnagy> lurid: it's a really trivial gem, you should just rewrite it
marcgg has joined #ruby
kofno has quit [Remote host closed the connection]
<lurid> you're absolutely right, but its been fun, i've learned a lot
bionoid has joined #ruby
<lurid> I could probably even find a different one that already works
<lurid> I guess I thought i'd fix it faster… big mistake :-)
krainboltgreene has joined #ruby
<lurid> thanks for your help though :)
<bnagy> you should remember the split-with-a-grouping trick, it's a lot nicer than scan in a lot of cases
smoothbutta has quit [Remote host closed the connection]
<bnagy> but still not a substitute for proper tokenising
bigmac has joined #ruby
danshultz has joined #ruby
<bnagy> basically split is a better ersatz tokeniser than scan, scan is good for pulling out just the matches
bionoid has quit [Remote host closed the connection]
ntus1017 has joined #ruby
d3 has joined #ruby
bigmac has quit [Client Quit]
sayan has joined #ruby
danshultz has quit [Ping timeout: 276 seconds]
mary5030 has quit [Remote host closed the connection]
dankest has joined #ruby
ALuk has joined #ruby
ALuk has quit [Client Quit]
mary5030 has joined #ruby
Fuzai has quit [Remote host closed the connection]
lele has quit [Ping timeout: 246 seconds]
i_s has joined #ruby
AndChat|143129 has joined #ruby
prat0318 has quit [Read error: Connection reset by peer]
AndChat-143129 has joined #ruby
fridim__ has quit [Ping timeout: 248 seconds]
io_syl has joined #ruby
AndChat|143129 has quit [Read error: Connection reset by peer]
lele has joined #ruby
arietis has joined #ruby
siera08 has joined #ruby
takezawa has joined #ruby
ILoveYou has joined #ruby
Deele has joined #ruby
Fuzai has joined #ruby
takezawa has quit [Client Quit]
Tricon has quit [Quit: Linkinus - http://linkinus.com]
pr0ggie has quit [Ping timeout: 276 seconds]
sambao21 has joined #ruby
ILoveYou[ has quit [Ping timeout: 276 seconds]
robscomputer has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
siera08 has quit [Ping timeout: 268 seconds]
smathieu has joined #ruby
fomatin has quit [Ping timeout: 246 seconds]
robscomputer has quit [Ping timeout: 268 seconds]
DanKnox is now known as DanKnox_away
renderful has joined #ruby
smathieu has quit [Ping timeout: 268 seconds]
_veer has joined #ruby
ILoveYou[ has joined #ruby
kofno has joined #ruby
renderful has quit [Remote host closed the connection]
Hanmac has joined #ruby
renderful has joined #ruby
AndChat-143129 has quit [Quit: Bye]
huoxito has quit [Quit: Leaving]
browndawg has joined #ruby
lindenle has quit [Quit: This computer has gone to sleep]
ILoveYou has quit [Ping timeout: 256 seconds]
serp` has quit [Quit: serp`]
atyz has quit [Quit: Leaving...]
rezzack has quit [Quit: Leaving.]
lindenle has joined #ruby
pipework has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 264 seconds]
tomzx_mac has quit [Read error: Operation timed out]
kofno has quit [Ping timeout: 264 seconds]
mary5030 has quit [Read error: Connection reset by peer]
passcod has quit [Ping timeout: 256 seconds]
rismoney has quit [Remote host closed the connection]
gstamp has quit [Ping timeout: 256 seconds]
flaccid has quit [Ping timeout: 256 seconds]
cibs has quit [Ping timeout: 256 seconds]
rismoney has joined #ruby
DonRichie has quit [Quit: Verlassend]
flaccid has joined #ruby
flaccid has quit [Changing host]
flaccid has joined #ruby
ehaliewicz has joined #ruby
lebek has joined #ruby
gstamp has joined #ruby
passcod has joined #ruby
krainboltgreene has quit [Ping timeout: 264 seconds]
cmarques has quit [Ping timeout: 264 seconds]
mmitchell has joined #ruby
jalcine has quit [Excess Flood]
xaxxon has joined #ruby
lebek has quit [Client Quit]
dhruvasagar has joined #ruby
<xaxxon> how do you do a non-blocking socket write in ruby? I see accept_nonblock, read_nonblock, but not how to write. Does write just always return 0 immediately if it can't write? that deosn't seem right but i can't find anything one way or another.
tonini has joined #ruby
cibs has joined #ruby
tonini has quit [Remote host closed the connection]
obs has quit [Quit: Konversation terminated!]
<bnagy> can't you set the whole socket to nonblock?
<bnagy> the rescue E_WOULDBLOCK?
mmitchell has quit [Ping timeout: 240 seconds]
sleetdrop has quit [Quit: Computer has gone to sleep.]
<bnagy> I always thread so I'm just guessing
darth_chatri has joined #ruby
<xaxxon> yeah, that doesn't seem to be the "ruby way to do it"...
<bnagy> sorry, which?
<xaxxon> and I'd rather not use the thin wrappers around the C system calls if I can avoid it..
<bnagy> that's what Socket is
<xaxxon> well, there is an "accept_nonblock" and a "read_nonblock"
fredjean has joined #ruby
<xaxxon> how do you set a socket to nonblocking? I'm not seeing anything obvious
ukd1_ has joined #ruby
ukd1_ has quit [Remote host closed the connection]
<xaxxon> I think you can use the fcntl stuff to do it, but it seems like that shouldn't be the best approach
<bnagy> connect_nonblock, by the looks, or you could setsockopts
<xaxxon> this is for an accepted socket on the server
<xaxxon> no the client socket
<xaxxon> *not
wallerdev has quit [Quit: wallerdev]
atyz has joined #ruby
zomgbie has joined #ruby
<xaxxon> it's just weird that there is accept and read variations with nonblock, but not write. I could just call read_nonblock and let it fail.. apparently that sets it nonblocking.. but that seems sily as well
<xaxxon> and there is this: http://apidock.com/ruby/IO/write_nonblock but that doesn't seem to be available for sockets
<bnagy> cause I've definitely setsockopt before
ukd1 has quit [Ping timeout: 264 seconds]
<bnagy> honestly, though, I think most people use threads or select
<xaxxon> I am using select, but I'm not sure that's sufficient
lemonsparrow has joined #ruby
<xaxxon> it's not clear to me exactly what is responsible for causing socket writes to block and if it's a shared resource across all sockets.. or IP or TCP sockets
fredjean has quit [Quit: Computer has gone to sleep.]
eldariof has quit [Ping timeout: 264 seconds]
<xaxxon> and if smoething else can fill it up after select has returned a socket as being writeable
sayan has quit [Ping timeout: 264 seconds]
adeponte has quit [Remote host closed the connection]
<xaxxon> so I prefer to have it be nonblocking regardless. and since you have to handle partial (non-zero but not the full requested write) writes anyhow, there's actually no downside
sodacrunch has joined #ruby
blandflakes has quit [Quit: Leaving]
sambao21 has quit [Quit: Computer has gone to sleep.]
<sodacrunch> if you are on Ubuntu, and you have Ruby 1.9 installed and you want 2.0, can you apt-get update ruby, or remove ruby and then specifically install 2.0?
<xaxxon> I use rvm...
djbkd has joined #ruby
<sodacrunch> xaxxon: all that would require is "rvm install 2.0.0" correct?
kobain has quit [Quit: El motor por excelencia http://www.europio.org/]
zomgbie has quit [Ping timeout: 276 seconds]
axeman- has joined #ruby
<xaxxon> well, but you have to have rvm set up correctly.. and you have to put stuff in your login stuff
<xaxxon> it's a PITA to set up.. but after that it's ncie
osvico has quit [Ping timeout: 260 seconds]
lebek has joined #ruby
<bnagy> chruby or rbenv are much nicer tbh
<xaxxon> bnagy, I'm retarded. there is a write_nonblock.. I was using a hash (of sockets) instead of a socket and that's what was giving me the no-method error
<xaxxon> it's on basicsocket.. I did a socket.public_methods.sort.inspect and saw it.. so I got confused..
<bnagy> xaxxon: yeah I saw a sendmsg_nonblock in BasicSocket
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<darth_chatri> i have seen many newbies run the first command on the rvm installation page and mess things up
<darth_chatri> I think "curl -L https://get.rvm.io | bash -s stable" should be at the top of the list there
<xaxxon> bnagy, yeah, sendmsg is a pain to use with tcp..
<xaxxon> I think you can, but it's annoying
<bnagy> curl | bash should not be on any list anywhere
<bnagy> it makes me stabby
<darth_chatri> is there a better way for a newbie?
djbkd has quit [Read error: Connection reset by peer]
brianpWins has joined #ruby
<bnagy> xaxxon: it's pretty unusual to be messing with sockets directly, though, there are a ton of higher level gems
<bnagy> but who knows what you're doing
brianpWins has quit [Client Quit]
bluOxigen has joined #ruby
bluOxigen has quit [Changing host]
bluOxigen has joined #ruby
<xaxxon> bnagy, oh I know. I'm pretending it's homework :)
mahmoudimus has joined #ruby
marcdel has joined #ruby
djbkd has joined #ruby
EPIK has quit [Ping timeout: 264 seconds]
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adeponte has joined #ruby
djbkd has quit [Client Quit]
djbkd has joined #ruby
sayan has joined #ruby
BizarreCake has joined #ruby
adeponte has quit [Remote host closed the connection]
cyong has quit [Quit: Leaving.]
michaeldeol has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 248 seconds]
sleetdrop has joined #ruby
tommyvyo has quit [Quit:]
ffio has quit [Quit: WeeChat 0.4.1]
ffio has joined #ruby
ntus1017 has quit [Remote host closed the connection]
ayaz has joined #ruby
browndawg has left #ruby [#ruby]
noyb has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
arya_ has joined #ruby
<flaccid> if you do say require "foo/bar" and in this file, there is a class within a module, can i not declare a def initialize ?
<flaccid> it doesn't seem to get run when i require it
cj3kim has joined #ruby
<bnagy> wat?
wsterling has quit [Remote host closed the connection]
<bnagy> foo/bar is the file bar.rb in the directory foo
<flaccid> yeah i don't really make sense
<bnagy> if that's like module Bar class Baz you still have to refer to it as Bar::Baz.new
<flaccid> yeah i am requiring bar.rb which has a module in it
smathieu has joined #ruby
<flaccid> ok create an instance of Baz to initialize
<bnagy> unless you include Bar in toplevel which is not normally recommended
johnnyfuchs has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]
zomgbie has joined #ruby
ayaz has quit [Read error: Connection reset by peer]
lindenle has quit [Quit: This computer has gone to sleep]
tjbiddle has quit [Quit: tjbiddle]
bertolo has quit [Read error: Connection reset by peer]
<flaccid> ok so i can do settings = Forklift::Config.new so my main program can have the dynamically created settings
<bnagy> whatever you say, dude
zz_michael_mbp is now known as michael_mbp
smathieu has quit [Ping timeout: 268 seconds]
b0oh has joined #ruby
corehook has joined #ruby
rshetty has joined #ruby
<flaccid> bnagy: i'm learning :)
<flaccid> making something with methadone..
13WAATBRW has joined #ruby
E23 has joined #ruby
E23 has left #ruby [#ruby]
E23 has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
michael_mbp is now known as zz_michael_mbp
<bnagy> mmm methadone
zz_michael_mbp is now known as michael_mbp
JohnBat26 has joined #ruby
<flaccid> bnagy: are you familiar with it?
mary5030 has joined #ruby
13WAATBRW has quit [Ping timeout: 260 seconds]
zomgbie has quit [Ping timeout: 256 seconds]
MrZYX is now known as MrZYX|off
<bnagy> nah when I quite heroin I just went cold turkey
ntus1017 has joined #ruby
<flaccid> i see
tagrudev has joined #ruby
<cj3kim> bnagy: holy crap. what made you start?
himsin has joined #ruby
<bnagy> PHP
robscomputer has joined #ruby
wesside has joined #ruby
robscomputer_ has joined #ruby
dankest has quit [Quit: dankest]
b0oh has quit [Quit: Leaving.]
rshetty has quit [Quit: Adios]
wesside has quit [Client Quit]
ner0x has quit [Quit: Leaving]
samuel02 has joined #ruby
robscomputer has quit [Ping timeout: 264 seconds]
mary5030 has quit [Remote host closed the connection]
wesside has joined #ruby
<flaccid> hehe
wesside has quit [Client Quit]
sayan has quit [Read error: Connection reset by peer]
jprovazn has joined #ruby
kevinykchan has joined #ruby
julian-delphiki has joined #ruby
<stairmast0r> flaccid: dick
michael_mbp is now known as zz_michael_mbp
poga has joined #ruby
flaccid has quit [Read error: Connection reset by peer]
poga has quit [Remote host closed the connection]
Kar- has joined #ruby
<xaxxon> I need a buffer where I can treat it like an arbitrary data "queue".. where I can read the oldest N bytes and push on M bytes .. I don't think StringIO does what I want, but am open to being wrong
<xaxxon> anyone know of any builtins that do this type of thing?
maxfilipovich has joined #ruby
fredjean has joined #ruby
bean has quit [Ping timeout: 264 seconds]
<xaxxon> I guess a string might work.. but am not sure about how inefficient that is
marsLantern has quit [Remote host closed the connection]
welandC has joined #ruby
atmosx has joined #ruby
<xaxxon> so.. how to remove the first N bytes from a string?
ananthakumaran has joined #ruby
nitish has joined #ruby
welandB has quit [Ping timeout: 240 seconds]
lethjakman has joined #ruby
<xaxxon> preferably without creating a full copy of the remaining bytes.. :\
jwang has joined #ruby
atno has quit [Remote host closed the connection]
<lethjakman> hey, I have this code here that is violating a unique key (as I want it to) but how do I catch this gracefully?
<lethjakman> I don't want it to error out, I want it to just give me a statement saying it's violated
<lethjakman> er a string or a true/false or something
v0n has joined #ruby
<lethjakman> sorry, did those send? my internet shut off
zomgbie has joined #ruby
flaccid has joined #ruby
browndawg has joined #ruby
<xaxxon> what does "violating a unique key" mean?
<xaxxon> is this a rails question?
<bnagy> xaxxon: Queue?
<xaxxon> bnagy, I need to read stuff off in arbitrary chunks, though.. not just how it was added.
sodacrunch has quit [Ping timeout: 250 seconds]
<xaxxon> if I add 4 bytes, then 9 bytes, I then want to pull off 8 bytes
<xaxxon> and have 5 bytes left
<xaxxon> blah.. it's low size and infrquently used, so it doesn't matter if it's efficient
havenwood has quit [Remote host closed the connection]
<bnagy> push em byte by byte? :P
havenwood has joined #ruby
<bnagy> streaming network-based readers are irritating
arya_ has quit [Ping timeout: 248 seconds]
himsin has quit [Quit: himsin]
wesside has joined #ruby
rezzack has joined #ruby
himsin has joined #ruby
<lethjakman> xaxxon: it's an active record question. I couldn't get any help there though.
ntus1017 has quit [Remote host closed the connection]
<lethjakman> I have a table that's a has_and_belongs_to_many and I put a unique constraint on it, but when I try to insert two of the same values it errors out rather than being caught.
havenwood has quit [Ping timeout: 256 seconds]
arya_ has joined #ruby
<atmosx> anyone has experience with any kind of eshops?
<bnagy> xaxxon: I think in general you can just suck strings from the Queue and then keep a buffer in the reassembler
zomgbie has quit [Ping timeout: 264 seconds]
<bnagy> but re your question, str.slice! 0, n
adeponte has joined #ruby
agjacome has joined #ruby
thepumpk_ has quit [Remote host closed the connection]
Opettaja has quit [Remote host closed the connection]
thepumpkin has joined #ruby
michaeldeol has joined #ruby
smathieu has joined #ruby
b0oh has joined #ruby
michaeldeol has quit [Ping timeout: 264 seconds]
lethjakman has quit [Ping timeout: 268 seconds]
smathieu has quit [Ping timeout: 276 seconds]
adeponte has quit [Ping timeout: 276 seconds]
browndawg1 has joined #ruby
b0oh has left #ruby [#ruby]
<oceanbreeze> Sup guys, someone already got the new Ruby 2.0 pickaxe book?
Hanmac2 has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
<flaccid> hmm anyone know how to make an option not require an argument in methadone?
hamakn has joined #ruby
<oceanbreeze> PHP > RUBY
DanKnox_away is now known as DanKnox
atmosx has quit [Ping timeout: 260 seconds]
browndawg has quit [Ping timeout: 276 seconds]
senayar has joined #ruby
wsterling has joined #ruby
dagobah has joined #ruby
tomgrim has joined #ruby
thepumpk_ has joined #ruby
aganov has joined #ruby
Shirakawasuna has joined #ruby
Hanmac2 has quit [Ping timeout: 264 seconds]
apeiros has joined #ruby
dash_ has joined #ruby
ntus1017 has joined #ruby
v0n has quit [Ping timeout: 260 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
echevemaster has quit [Quit: Leaving]
krisfremen-home has quit [Ping timeout: 268 seconds]
wsterling has quit [Ping timeout: 248 seconds]
thepumpkin has quit [Ping timeout: 276 seconds]
bobbyz has quit [Ping timeout: 246 seconds]
zomgbie has joined #ruby
atno has joined #ruby
tkuchiki_ has joined #ruby
sayan has joined #ruby
pranny has joined #ruby
AlHafoudh has joined #ruby
cantonic has quit [Ping timeout: 264 seconds]
cantonic has joined #ruby
chriskk has quit [Quit: chriskk]
<flaccid> with OptionsParser, how do i define an option that does not require an argument?
tkuchiki has quit [Ping timeout: 248 seconds]
bobbyz has joined #ruby
KevinSjoberg has joined #ruby
goodgame has joined #ruby
djbkd has quit [Remote host closed the connection]
noyb has quit [Ping timeout: 276 seconds]
<flaccid> hmm it works. some kind of voodoo heh
JohnBat26|2 has joined #ruby
JohnBat26|3 has joined #ruby
trepidaciousMBR has joined #ruby
i_s has quit [Quit: i_s]
tomgrim has quit [Ping timeout: 260 seconds]
timonv has joined #ruby
JohnBat26 has quit [Ping timeout: 264 seconds]
teddyp1cker has joined #ruby
senayar has quit [Remote host closed the connection]
JohnBat26|2 has quit [Ping timeout: 240 seconds]
krisfremen-home has joined #ruby
xaxxon has quit [Quit: This computer has gone to sleep]
jbpros has joined #ruby
Achalov40-ru has joined #ruby
io_syl_ has joined #ruby
io_syl_ has quit [Changing host]
io_syl_ has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
Hanmac has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
sleetdrop has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
codecop has joined #ruby
Zeeraw has joined #ruby
pedestrian has joined #ruby
threesome has joined #ruby
E23 has quit []
ntus1017 has quit [Ping timeout: 268 seconds]
senayar has joined #ruby
dankest has joined #ruby
robscomputer_ has quit [Ping timeout: 268 seconds]
iliketurtles has joined #ruby
iliketurtles has quit [Max SendQ exceeded]
u- has joined #ruby
iliketurtles has joined #ruby
renderful has quit [Remote host closed the connection]
rdark has joined #ruby
<prsn> Hi! I'm trying to render an ERB template with bindings from a hash, as described here: http://splatoperator.com/2012/07/render-a-template-from-a-hash-in-ruby/
<prsn> however, bindings in the function scope shadow those in the passed in hash
lethjakman has joined #ruby
<prsn> it seems like the author of that page didn't realize this. Is there a more correct way to do this?
tatsuya_o has joined #ruby
jp- has quit [Ping timeout: 240 seconds]
io_syl_ has quit [Quit: Computer has gone to sleep.]
Assurbanipal has joined #ruby
xardas has joined #ruby
apeiros has quit [Remote host closed the connection]
v0n has joined #ruby
dash_ has quit [Quit: Time to beer :)]
jp- has joined #ruby
jprovazn has quit [Quit: Odcházím]
jprovazn has joined #ruby
alup has joined #ruby
nkts has quit [Quit: -]
kizzx2 has joined #ruby
v0n has quit [Ping timeout: 268 seconds]
smathieu has joined #ruby
DanKnox is now known as DanKnox_away
thepumpk_ has quit [Remote host closed the connection]
thepumpkin has joined #ruby
johnkary has quit [Quit: @johnkary]
xardas has quit [Ping timeout: 240 seconds]
browndawg1 has left #ruby [#ruby]
timonv has quit [Remote host closed the connection]
smathieu has quit [Ping timeout: 240 seconds]
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
dankest has quit [Quit: dankest]
Mon_Ouie has joined #ruby
yacks has quit [Ping timeout: 264 seconds]
apeiros has joined #ruby
r0bby has joined #ruby
maxmanders has joined #ruby
maz-dev has joined #ruby
robbyoconnor has quit [Ping timeout: 248 seconds]
lethjakm1 has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
lethjakman has quit [Ping timeout: 276 seconds]
Coffers has joined #ruby
yacks has joined #ruby
ybart has joined #ruby
KevinSjoberg has joined #ruby
cads has joined #ruby
pontiki has joined #ruby
AlHafoudh has quit [Ping timeout: 248 seconds]
zz_michael_mbp is now known as michael_mbp
blitz has quit [Quit: This computer has gone to sleep]
obs has joined #ruby
jbpros has quit [Quit: jbpros]
cha1tanya has quit [Ping timeout: 264 seconds]
cha1tanya has joined #ruby
sqd_ has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elaptics`away is now known as elaptics
Coffers has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ephemerian has joined #ruby
dash_ has joined #ruby
darth_chatri has quit [Ping timeout: 264 seconds]
BizarreCake has quit [Read error: Connection reset by peer]
darth_chatri has joined #ruby
Meatant has joined #ruby
niceguyjames has joined #ruby
sleetdrop has joined #ruby
sleetdrop has quit [Max SendQ exceeded]
cha1tanya has quit [Excess Flood]
<Hanmac> apeiros: look at this http://cheezburger.com/7653087232 in every NO there is a YES ;P
cha1tanya has joined #ruby
timonv has joined #ruby
sleetdrop has joined #ruby
ffio_ has joined #ruby
E23 has joined #ruby
ffio has quit [Ping timeout: 240 seconds]
seriously_random has joined #ruby
noname001 has joined #ruby
<seriously_random> What do I need to do with method 'search' here: http://pastebin.com/w6QezGwS
timonv has quit [Remote host closed the connection]
browndawg has joined #ruby
MetaCosm has left #ruby ["Leaving"]
<popl> that depends on what you want to do.
nemesit|znc has quit [Ping timeout: 264 seconds]
<seriously_random> popl, never mind. I got this: http://pastebin.com/XYSSpxEh
<seriously_random> popl, learning ruby @rubymonk. Thought this is a trick question.
<Mon_Ouie> That's the same code you gave earlier
<popl> leave me alone!
<popl> geez
<seriously_random> Mon_Ouie, sorry. http://pastebin.com/jHHBGWz1
nemesit|znc has joined #ruby
<Hanmac> hm it may still not return what you want
Deele has quit [Ping timeout: 240 seconds]
allsystemsarego has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
DaniG2k has joined #ruby
cha1tanya has quit [Excess Flood]
cha1tanya has joined #ruby
himsin has quit [Quit: himsin]
ichilton_ is now known as ichilton
vlad_starkov has quit [Remote host closed the connection]
Zai00 has joined #ruby
gnagno has joined #ruby
rezzack has quit [Quit: Leaving.]
dash_ has quit [Ping timeout: 240 seconds]
razi has joined #ruby
renderful has joined #ruby
razi has quit [Client Quit]
Deele has joined #ruby
MetaCosm has joined #ruby
smathieu has joined #ruby
maroloccio has joined #ruby
renderful has quit [Ping timeout: 240 seconds]
E23 has quit []
smathieu has quit [Ping timeout: 268 seconds]
MrZYX|off is now known as MrZYX
rickmasta has joined #ruby
blackmesa has joined #ruby
diegoviola has quit [Ping timeout: 240 seconds]
himsin has joined #ruby
Al_ has joined #ruby
timonv has joined #ruby
xardas has joined #ruby
BizarreCake has joined #ruby
gnagno_ has joined #ruby
gnagno has quit [Read error: Connection reset by peer]
Spooner has joined #ruby
DrCode has quit [Remote host closed the connection]
lethjakm1 has quit [Ping timeout: 276 seconds]
timonv has quit [Remote host closed the connection]
hamed_r has joined #ruby
apeiros_ has joined #ruby
DrCode has joined #ruby
cha1tanya has quit [Ping timeout: 240 seconds]
maasha has joined #ruby
apeiros has quit [Ping timeout: 256 seconds]
lkba has quit [Ping timeout: 264 seconds]
shaunbaker has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
jonahR has joined #ruby
<jonahR> Hello
Notte has joined #ruby
<Kelet> hi
<jonahR> If anyone is interested, here is a free hall pass for CodeSchool, cheers! http://go.codeschool.com/9QTYTQ
adambeynon has joined #ruby
<sqd_> jonahR: is it for one person to use?
<jonahR> nope
<sqd_> jonahR: awesome, thanks
<jonahR> :) enjoy!
mneorr has joined #ruby
ferdev has quit [Quit: ferdev]
rickmasta has quit [Quit: Leaving...]
nism has joined #ruby
marr has joined #ruby
nobitanobi has joined #ruby
FUgaRU has quit [Remote host closed the connection]
ayaz has joined #ruby
BRMatt has joined #ruby
Desert_eagle has quit [Remote host closed the connection]
gsorbier has joined #ruby
diegoviola has joined #ruby
apt-get_install has joined #ruby
shaunbaker has quit [Remote host closed the connection]
gsorbier has quit [Remote host closed the connection]
gsorbier has joined #ruby
jonahR has quit [Quit: jonahR]
timonv has joined #ruby
aaronmcadam has joined #ruby
zeromodulus has quit [Read error: Connection reset by peer]
zeromodulus has joined #ruby
mneorr has quit [Remote host closed the connection]
Hanmac2 has joined #ruby
Hanmac has quit [Ping timeout: 260 seconds]
ferdev has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
Myrth has quit [Ping timeout: 264 seconds]
pedestrian has quit [Quit: pedestrian]
blaxter_ is now known as blaxter
jlebrech has joined #ruby
<diegoviola> "Regression testing"? What's that? If it compiles, it is good; if it boots up, it is perfect." -- Linus Torvalds
<diegoviola> what do you guys think of this quote?
<diegoviola> i wonder if it's serious or just joking
<jlebrech> compilation is a test
sevenseacat has joined #ruby
<popl> I think we should put it on t-shirts and stickers
<popl> Linus Torvalds Has a Posse
trepidaciousMBR has quit [Quit: trepidaciousMBR]
<jlebrech> ruby doesn't compile so it's totally different
<diegoviola> right
<diegoviola> ty
sergicles has quit [Quit: sergicles]
nari has quit [Ping timeout: 245 seconds]
<jlebrech> i have a class which is using eventmachine, and it's returning before EM have finished, how do i make it not do that?
sergicles has joined #ruby
browndawg has quit [Ping timeout: 256 seconds]
teddyp1cker has quit [Ping timeout: 276 seconds]
<popl> diegoviola: I think he's obviously being funny there. :)
browndawg has joined #ruby
vlad_starkov has joined #ruby
<slash_nick> Personally, I don't find it funny at all. :|
<popl> slash_nick: maybe you should ask your parents if you are a robot.
<diegoviola> so strong/static typed, compiled languages are safer in this case than dynamic languages?
<popl> of course diegoviola has taken the quote entirely out of context of the email it appeared in
<popl> so I think diegoviola is trolling
vlad_starkov has quit [Remote host closed the connection]
<diegoviola> popl: i'm not trolling
<slash_nick> I was
<diegoviola> let me find the email
<popl> slash_nick: I figured.
<Mon_Ouie> What project was that quote about anyway?
mikecmpbll has joined #ruby
<popl> kernel
<Mon_Ouie> Yeah, a kernel is probably not the easiest kind of software to write regression tests for
<jlebrech> a compiler checks the syntax and sanity, also the kernel needs to run on real hardware directly.
smathieu has joined #ruby
vlad_starkov has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
vlad_starkov has quit [Remote host closed the connection]
sqd_ has quit [Quit: sqd_]
<diegoviola> i ask because it seems like a lot of people take unit tests for granted, especially in communities like ruby, perl, python, etc, and i'm trying to learn about BDD/TDD now, so...
fgo has joined #ruby
<diegoviola> i was just being curious
<seriously_random> linus is a smart guy, what smart guys say can sometimes be interpreted in many ways
<seriously_random> actually, what idiot says can be interpreted in many ways also
smathieu has quit [Ping timeout: 248 seconds]
gnagno_ has quit [Ping timeout: 240 seconds]
gnagno_ has joined #ruby
<diegoviola> sure
Spami has joined #ruby
<jlebrech> in C testing is more gear towards compilation of example code
<jlebrech> if you miss out an edge case hopefully compilation should also cover any other issues.
<jlebrech> also C chucks out all the unused code in compilation, so having tests USE that code will prevent optimization
alex_io has joined #ruby
Anarch has quit [Ping timeout: 276 seconds]
cha1tanya has joined #ruby
ah9 has quit [Quit: leaving]
Shirakawasuna has quit [Ping timeout: 240 seconds]
<diegoviola> sounds right
<diegoviola> thanks
darth_chatri has quit [Quit: Leaving.]
rdark has quit [Ping timeout: 264 seconds]
Kar- has quit [Remote host closed the connection]
rdark has joined #ruby
Astralum has joined #ruby
KevinSjoberg has quit [Ping timeout: 260 seconds]
bluOxigen has quit [Ping timeout: 256 seconds]
KillerFox has quit [Ping timeout: 248 seconds]
apeiros_ has quit [Ping timeout: 256 seconds]
KillerFox has joined #ruby
cha1tanya has quit [Read error: Connection reset by peer]
b0oh has joined #ruby
cha1tanya has joined #ruby
nomenkun has joined #ruby
Hanmac2 has quit [Quit: Leaving.]
nitish has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
nomenkun has joined #ruby
<jlebrech> is returning truthiness a thing in ruby?
<heftig> jlebrech: how do you mean?
alex_io has left #ruby [#ruby]
teddyp1cker has joined #ruby
<jlebrech> def my_method .... if it.worked? return true else return false ...
<heftig> call it "my_method?" then
hamakn has quit [Read error: Connection reset by peer]
<jlebrech> should i be raising a custom error instead?
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
hamakn has joined #ruby
arya_ has joined #ruby
<jlebrech> sound like a pain to create a custom class to just say "yep it failed"
<heftig> huh?
<hoelzro> if you want to return a boolean, I would jsut 'return it.worked?'
<hoelzro> or better yet:
<hoelzro> 'it.worked?' as the last line
bluOxigen has joined #ruby
<hoelzro> (assuming you're not breaking out early)
<heftig> !!it.worked?
<jlebrech> i don't have an it object
<jlebrech> that's a example
<heftig> jlebrech: i'm still missing context here
<sevenseacat> lol
<hoelzro> I'm just saying that 'if cond return true else return false end' is a waste of typing =)
<sevenseacat> 'heres some example code' 'yep thats good' 'but its just an example'
<jlebrech> it's not an example of my code
<jlebrech> just explaining what i meant by returning something
browndawg has quit [Ping timeout: 248 seconds]
<sevenseacat> we know what it means to return something. we're programmers.
<jlebrech> that's good to know
<tobiasvl> jlebrech: what exactly are you wondering? :) yes, returning truthiness is a thing in ruby, you don't have to convert the truthiness to an explicit `true` value if the method name has a ? tacked onto the end, then ruby programmers will know that the return value is truthy
<tobiasvl> or falsy
<tobiasvl> that's the idiom
<heftig> though it should return a boolean, and not 3 or nil
<heftig> even if those have truth value
browndawg has joined #ruby
<jlebrech> so if a method called "do_awesome_action" returned false, you would assume that something didn't work?
joshu has joined #ruby
<heftig> sure, if that's part of the protocol
<tobiasvl> heftig: okay, really? because that's literally the opposite thing of what i said so i guess i was wrong then
mklappstuhl has joined #ruby
trepidaciousMBR has joined #ruby
<sevenseacat> lolway
BizarreCake has quit [Read error: Connection reset by peer]
himsin has quit [Quit: himsin]
<sevenseacat> a ? method should return true or false.
<jlebrech> because i have returning 1 or 0 drilled into my head from C
<sevenseacat> ruby is not C.
<sevenseacat> C also uses 0 as success.
<heftig> sevenseacat: between processes only
<heftig> inside, 0 is false
<jlebrech> i'm using true of false. instead
<heftig> or maybe whatever function you call uses the -errno style error reporting
<jlebrech> thanks
samu has left #ruby [#ruby]
<jlebrech> it using http so success or failure aren't really errors within my app, I don't think i should be raising
clintnewsom has joined #ruby
krzkrz has joined #ruby
krzkrz has quit [Client Quit]
<jlebrech> i'm using sleep to wait for eventmachine callbacks. is this ok?
<jlebrech> maybe I shouldn't be using eventmachine
krzkrz has joined #ruby
<heftig> no, it's not okay
krzkrz has quit [Client Quit]
nism has quit [Ping timeout: 250 seconds]
arya_ has quit []
toddWork_ has quit [Ping timeout: 245 seconds]
apeiros has joined #ruby
krzkrz has joined #ruby
toddWork_ has joined #ruby
krzkrz has quit [Client Quit]
gsorbier has quit [Quit: Computer has gone to sleep.]
krzkrz has joined #ruby
krzkrz has quit [Client Quit]
arya_ has joined #ruby
apeiros_ has joined #ruby
Hanmac2 has joined #ruby
apeiros has quit [Ping timeout: 241 seconds]
monkegjinni has joined #ruby
ismlages has joined #ruby
vlad_starkov has joined #ruby
monkegjinni has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
arya_ has joined #ruby
gnagno__ has joined #ruby
gnagno_ has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 260 seconds]
monkegjinni has joined #ruby
monkegjinni has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
niklasb has joined #ruby
ehaliewicz has quit [Ping timeout: 276 seconds]
hanmac3 has joined #ruby
hanmac3 has quit [Client Quit]
arya_ has quit []
vlad_starkov has joined #ruby
arya_ has joined #ruby
gildo has joined #ruby
sqd_ has joined #ruby
Hanmac2 has quit [Ping timeout: 276 seconds]
realDAB has joined #ruby
hamed_r has quit [Quit: Leaving]
dagen has joined #ruby
cj3kim has quit [Remote host closed the connection]
<jlebrech> heftig, refactored to bubble up fail and success and used it in a run block
nitish has joined #ruby
nitish has joined #ruby
ntus1017 has joined #ruby
yacks has quit [Ping timeout: 240 seconds]
henrysource has joined #ruby
toddWork_ has quit [Read error: Connection reset by peer]
toddWork_ has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
_JamieD_ has quit [Quit: _JamieD_]
michael_mbp is now known as zz_michael_mbp
maxfilipovich has quit [Quit: maxfilipovich]
dhruvasagar has quit [Read error: Operation timed out]
AntelopeSalad has joined #ruby
postmodern has quit [Quit: Leaving]
dhruvasagar has joined #ruby
yacks has joined #ruby
Desert_eagle has joined #ruby
dgfdgf has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
`MArceLL` has quit [Ping timeout: 256 seconds]
realDAB has quit [Quit: realDAB]
nari has joined #ruby
realDAB has joined #ruby
DrCode has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Ping timeout: 246 seconds]
DrCode has joined #ruby
BizarreCake has joined #ruby
monkegjinni has joined #ruby
dhruvasagar has joined #ruby
gyre007 has joined #ruby
sqd_ has quit [Quit: sqd_]
ntus1017 has quit [Remote host closed the connection]
xbob has joined #ruby
gyre007 has quit [Remote host closed the connection]
gyre007 has joined #ruby
blackmesa has joined #ruby
atno has quit [Remote host closed the connection]
anderson has quit [Read error: Connection reset by peer]
himsin has joined #ruby
Domon has quit [Remote host closed the connection]
anderson has joined #ruby
danshultz has joined #ruby
zz_michael_mbp is now known as michael_mbp
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
osvico has joined #ruby
Zeeraw has quit [Quit: Computer has gone to sleep.]
Zeeraw has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.1]
clocKwize has joined #ruby
<DaniG2k> guys im trying to write up a simple crawler with ruby
<DaniG2k> it doesnt seem to work as expected though
<DaniG2k> if anyone is bored can you check out the code plz?
<clocKwize> DaniG2k: "doesn't work as expected" is not very helpful
<DaniG2k> I'll give you more details hold on
<DaniG2k> just gonna push to github
<clocKwize> http://gist.github.com gyour code
corehook has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<clocKwize> and explain
monkegjinni has quit [Remote host closed the connection]
<DaniG2k> basically, its a dumb setup but I'm trying to get it to crawl a single domain
kofno has joined #ruby
<DaniG2k> all the methods work except for the crawl method
<DaniG2k> which i'm trying to implement recursively
<DaniG2k> right now it's just printing to stdout "visiting' + the name of the url its going into
<DaniG2k> and pulls out links form there (of the same domain)
<DaniG2k> and goes into those
<DaniG2k> however, it seems to not crawl a whole lot of links
<DaniG2k> like for the bbc it will stop after a few seconds
poikon has joined #ruby
<DaniG2k> for some reason the recursion part isnt returning a new set of links to crawl
BSaboia has joined #ruby
<zendeavor> cut the problem description down to a one-liner
<DaniG2k> ok
KillerFox has quit [Read error: Connection reset by peer]
<clocKwize> its fine.
<DaniG2k> what's wrong with the self.crawl(next_url) line? it seems to not perform the recursion correctly and instead, I feel like it's only crawling the seed, getting those links and crawling those pages
<clocKwize> why don't you put some puts statements in to see how much it does
<DaniG2k> btw this isn't an important project or anything I'm just coding for fun
<clocKwize> and where it stops
<zendeavor> "right now what it's doing..." can all be derived from the code; you need to state your intention and desire instead. for future reference, being concise is ultimately more helpful for both the reader and yourself (you may work out the solution as you try to eliminate the cruft from the problem)
whowantstolivefo has joined #ruby
agjacome has quit [Quit: leaving]
<zendeavor> lucky for you clocKwize is a nice guy =]
<clocKwize> I can't see any particular problem with the code, but I'm not running it or debugging it, just looking :)
hogeo has quit [Remote host closed the connection]
Meatant has quit [Quit: a]
<DaniG2k> you run it like this: x = Ryouken.new('http://www.bbc.co.uk')
<DaniG2k> x.crawl
<clocKwize> yeah, I don't want to though, I'm going to give you idea of how to fix it and let you work it, that way, you'll know for next time, instead of me just saying change this to that
<DaniG2k> the puts visited part is what shows me that its not visiting many pages
<DaniG2k> ok
<DaniG2k> clocKwize: are you a long-time ruby programmer?
<clocKwize> also, I'm working :)
<clocKwize> yeah
<DaniG2k> me too, "working" hehe
<DaniG2k> ah nice
<DaniG2k> clocKwize: does the code totally suck or is it decent thus far?
<DaniG2k> I'm kind of a n00b programmer
<clocKwize> well, it will never scale
<DaniG2k> of course
<DaniG2k> im not even trying to handle a billion things
<Sp4rKy> I miss something with bundle ... could someone have a loog at https://gist.github.com/maxenced/2738d984783b53b8d0ff and explain me why bundler is not added to vendor/bundle
<DaniG2k> redirects, authentications, javascript calendars, etc
<Sp4rKy> but instead system one is used ?
mklappstuhl has quit [Remote host closed the connection]
<clocKwize> DaniG2k: no i mean, if you want to scrape lots of stuff, it'll explode and be very slow :)
KevinSjoberg has joined #ruby
<DaniG2k> clocKwize: because of the recursion?
<clocKwize> yes, and it'll only ever do 1 at a time
renderful has joined #ruby
<clocKwize> I'd use rescue, have a job that opens a url, gets the links and adds them to the queue. then you can add a job to the queue like scrape:http://www.bbc.co.uk
<clocKwize> and you'll get a big big queue of jobs
<clocKwize> and you can start as many worker processes as you like
<DaniG2k> hmm
<clocKwize> to process them
<zendeavor> mmmm scale
<DaniG2k> not sure how to do that to be honest
<clocKwize> that will fall down quickly too, unless you stop somewhere :)
<clocKwize> your thing is fine, just to scrape 1 level of urls
<DaniG2k> how does google do it??? *amazed*
<clocKwize> or something
<clocKwize> DaniG2k: google is probably 100x more complex than what I said
zomgbie has quit [Read error: Connection reset by peer]
<DaniG2k> for sure
<zendeavor> DaniG2k: don't worry about it; if you are just practicing then this would be premature optimization especially since it's over your head
<clocKwize> yes, I agree, your code is ok, for a small scrape where it will stop soon
zomgbie has joined #ruby
danshultz has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<DaniG2k> I just realized I have @children which I never use -_- this is clearly experimental hehe
<DaniG2k> damn i'm tired
<DaniG2k> from doing nothing
mikecmpbll has joined #ruby
yshh has joined #ruby
cantonic has quit [Quit: cantonic]
intuxicated has joined #ruby
KillerFox has joined #ruby
henrysource has quit [Remote host closed the connection]
sleetdrop has quit [Quit: Computer has gone to sleep.]
clintnewsom has quit [Quit: clintnewsom]
S0da has joined #ruby
Zai00 has quit [Read error: Connection reset by peer]
gildo has quit [Ping timeout: 268 seconds]
clintnewsom has joined #ruby
eka has joined #ruby
avril14th has joined #ruby
S0da has quit [Ping timeout: 260 seconds]
<oceanbreeze> hey DaniG2k, in your script page.css('a').map, what does 'a' mean?
<DaniG2k> the HTML element 'a'
S0da has joined #ruby
tacos1de has quit [Ping timeout: 240 seconds]
nari has quit [Quit: Ex-Chat]
osvico has quit [Ping timeout: 260 seconds]
realDAB has quit [Quit: realDAB]
ntus1017 has joined #ruby
realDAB has joined #ruby
chase-work has joined #ruby
niklasb has quit [Ping timeout: 264 seconds]
danshultz has joined #ruby
gildo has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
BizarreCake has quit [Ping timeout: 268 seconds]
danshultz has quit [Remote host closed the connection]
blaxter has quit [Quit: foo]
workmad3 has joined #ruby
vikhyat_ has quit [Remote host closed the connection]
tacos1de has joined #ruby
sleetdrop has joined #ruby
Evixion has joined #ruby
sleetdrop has quit [Max SendQ exceeded]
sleetdrop has joined #ruby
gyre007 has quit [Remote host closed the connection]
gyre007 has joined #ruby
himsin has quit [Quit: himsin]
yacks has quit [Read error: Operation timed out]
alex_io has joined #ruby
nitish has quit [Remote host closed the connection]
intuxicated has quit [Read error: Connection reset by peer]
nezumi has quit [Ping timeout: 248 seconds]
krz has quit [Quit: krz]
blackmesa has quit [Ping timeout: 240 seconds]
himsin has joined #ruby
blaxter_ has joined #ruby
threesome has quit [Read error: Connection reset by peer]
niceguyjames has quit [Quit: Computer has gone to sleep.]
cha1tanya has quit [Quit: cha1tanya]
clintnewsom has quit [Quit: clintnewsom]
threesome has joined #ruby
himsin has quit [Client Quit]
DonRichie has joined #ruby
mljsimone|away has joined #ruby
mljsimone|away is now known as mljsimone
mljsimone has left #ruby [#ruby]
kizzx2 has quit [Quit: Leaving.]
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
niceguyjames has joined #ruby
blaxter_ has quit [Ping timeout: 276 seconds]
cantonic has joined #ruby
mark_locklear has joined #ruby
arya_ has quit [Ping timeout: 260 seconds]
BSaboia has quit [Quit: Leaving]
sayan has quit [Read error: Connection reset by peer]
arya_ has joined #ruby
nanoxd has quit [Quit: Textual IRC Client: www.textualapp.com]
monkegjinni has joined #ruby
sleetdrop has quit [Ping timeout: 264 seconds]
<_br_> Interesting question. How do different services such as Google Maps and others actually come up with a mapping from Addresses to Geographic Coordinates (long/lat)? Are there databases for that?
jonkri has joined #ruby
<DaniG2k> hmm that is an interesting question
<DaniG2k> never thought about it
danshultz has joined #ruby
<DaniG2k> the coordinates must reprenent a place on the google map visual interface
<DaniG2k> and that map must overlap with address names
<DaniG2k> if the points are on a certain street
<DaniG2k> thats the address
b0oh has quit [Quit: Leaving.]
<senayar> they have database to map lat and long
<DaniG2k> everyone might be using the same convention for geolocation points
kung has joined #ruby
<_br_> Possibly, apparently they call this stuff "geocoding" and "reverse geocoding" http://en.wikipedia.org/wiki/Geocoding
<_br_> Interpolation of know addresses ...
threesome has quit [Ping timeout: 246 seconds]
allsystemsarego_ has joined #ruby
devoldmx3 has joined #ruby
vlad_starkov has joined #ruby
sqd_ has joined #ruby
mmitchell has joined #ruby
allsystemsarego has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Quit: Computer has gone to sleep.]
BrianJ has joined #ruby
devoldmx has quit [Ping timeout: 268 seconds]
<_br_> Interesting, thanks
realDAB has quit [Quit: realDAB]
dEPy has joined #ruby
krainboltgreene has joined #ruby
maxfilipovich has joined #ruby
realDAB has joined #ruby
seriously_random has quit [Quit: Leaving]
Beoran__ has joined #ruby
yshh has quit [Remote host closed the connection]
madd has joined #ruby
<madd> hello
<madd> if hostname.match(/^[i|bg|cz|de|hr|pl|ro|sk]p/) <--- this works not as i expected. I like to filter hostnames starts with ip... bgp... czp... any hints?
enebo has joined #ruby
<DaniG2k> hostnames.start_with?
<DaniG2k> and then pass your regex
<DaniG2k> I think you can do that
<madd> thx, I will try
krainboltgreene has quit [Ping timeout: 256 seconds]
Beoran_ has quit [Ping timeout: 240 seconds]
<DaniG2k> hmm actually i dont think it works with regex
<DaniG2k> madd: all you need to do is
<DaniG2k> names =~ /^patterns here/
<DaniG2k> that will return the position where it matches or nil
enebo has quit [Client Quit]
TIJ has joined #ruby
<bnagy> madd: match returns a weird thing ( matchgroup )
gnagno__ has quit [Ping timeout: 240 seconds]
<DaniG2k> indeed
<bnagy> just =~ is what you want
devoldmx has joined #ruby
<DaniG2k> and you will have to convert that to string or something
<bnagy> cause even an empty matchgroup will be truthy
yacks has joined #ruby
<bnagy> ... wait no it doesn't
threesome has joined #ruby
carloslopes has joined #ruby
cantonic has quit [Quit: cantonic]
devoldmx3 has quit [Ping timeout: 260 seconds]
<bnagy> your problem must be somewhere else
alex_io has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
stairmast0r has quit [Ping timeout: 240 seconds]
devoldmx3 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
gyre007 has quit [Remote host closed the connection]
sambao21 has joined #ruby
jp- has joined #ruby
pipework has joined #ruby
pipework has quit [Remote host closed the connection]
<madd> bnagy: DaniG2k: =~ works fine if hostname is ip... ia... but not with dep... ||||| hostname =~ /^[i|bg|cz|de|hr|pl|ro|sk]p/
kung has quit [Quit: Bye!]
<DaniG2k> its not the operator that's wrong
<DaniG2k> its your regex
finges has quit [Ping timeout: 246 seconds]
sunsh1ne has quit [Ping timeout: 246 seconds]
<DaniG2k> try testing with rubular http://rubular.com/
<bnagy> ohh, yeah that's a charset
lurid has left #ruby [#ruby]
sunsh1ne has joined #ruby
<DaniG2k> ooh i see
<bnagy> change [] to ()
zets2 has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<DaniG2k> yup
<DaniG2k> (a|b) means a or b
<madd> oh rubular is pretty cool. i didn't know that
<madd> thx
zets has quit [Ping timeout: 246 seconds]
<DaniG2k> rubular is sweet
bluOxigen has quit [Read error: Connection reset by peer]
<DaniG2k> np
bluOxigen has joined #ruby
apeiros_ has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
mklappstuhl has joined #ruby
krainboltgreene has joined #ruby
FishermansEnemy has quit [Ping timeout: 276 seconds]
devoldmx3 has quit [Ping timeout: 256 seconds]
ntus1017 has quit [Remote host closed the connection]
Kar- has joined #ruby
wmoxam has joined #ruby
choobie has joined #ruby
gildo has quit [Ping timeout: 246 seconds]
dash_ has joined #ruby
rshetty has joined #ruby
blueOxigen has joined #ruby
vikhyat has joined #ruby
devoldmx has joined #ruby
wallerdev has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
atyz has quit [Quit: Leaving...]
Kruppe has joined #ruby
madd has left #ruby [#ruby]
patronus_ has joined #ruby
atno has joined #ruby
emergion has joined #ruby
mikecmpbll has joined #ruby
avril14th has quit [Ping timeout: 246 seconds]
TIJ has quit [Quit: Konversation terminated!]
patronus has quit [Ping timeout: 246 seconds]
TIJ has joined #ruby
JZTech101 has joined #ruby
emergion has quit [Client Quit]
rickruby has quit [Remote host closed the connection]
gildo has joined #ruby
avril14th has joined #ruby
gnagno__ has joined #ruby
hogeo has joined #ruby
renderful has quit [Remote host closed the connection]
michael_mbp is now known as zz_michael_mbp
DaniG2k has quit [Quit: Leaving.]
gildo has quit [Read error: Operation timed out]
shaunbaker has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
splittingred has joined #ruby
danshultz has joined #ruby
hogeo has quit [Remote host closed the connection]
norm has joined #ruby
realDAB has quit [Quit: realDAB]
fmcgeough has joined #ruby
<norm> i'm dealing with a segfault (https://gist.github.com/normelton/6032741). i figure it's coming either from ruby itself, or the mysql2 library, which includes a native extension
fernandoaleman has joined #ruby
<norm> but am not sure how to tell based on the stacktrace
ldnunes has joined #ruby
wmoxam has quit [Ping timeout: 246 seconds]
<norm> i was expecting to see a reference to mysql2
<norm> any ideas?
Kruppe has quit [Read error: Operation timed out]
londerson has joined #ruby
blaxter_ has joined #ruby
Nisstyre-laptop has joined #ruby
jonkri has quit [Ping timeout: 246 seconds]
dash_ has quit [Quit: Time to beer :)]
Nisstyre-laptop has quit [Client Quit]
noname001 has quit [Read error: Connection reset by peer]
clintnewsom has joined #ruby
<bnagy> you snipped the C backtrace?
noname001 has joined #ruby
jibi has joined #ruby
huoxito has joined #ruby
phantummm has quit [Quit: phantummm]
aaronmcadam has quit [Ping timeout: 248 seconds]
realDAB has joined #ruby
jerius has joined #ruby
phantummm has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
phantummm has quit [Client Quit]
aaronmcadam has joined #ruby
jorge has joined #ruby
emergion has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
jalcine has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
asteve has joined #ruby
atyz has joined #ruby
tobyo1 has joined #ruby
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
gildo has joined #ruby
<norm> bnagy: let me see if i didn't grab all of it
rshetty has quit [Quit: Sleeping]
<norm> mmm those logs are gone
<norm> oh wait, looking in the wrong place
pr0ggie has joined #ruby
mantas322 has joined #ruby
<mantas322> Hi guys
tommyvyo has joined #ruby
<mantas322> I need to create this textfile
<mantas322> but it needs a certain structure
<mantas322> right aligned to a column
wallerdev has quit [Quit: wallerdev]
gnagno__ has quit [Read error: Connection reset by peer]
<mantas322> for example If I need to write 1 it was to be " 1" or 10 " 10"
gnagno__ has joined #ruby
<mantas322> 100 = "100"
<mantas322> whats a clean way to pad spaces uniformly
<bnagy> mantas322: welcome to.. The documentation! YAY!
<mantas322> you again.
<mantas322> thats your answer for everything.
yshh has joined #ruby
jonkri has joined #ruby
<norm> mantas322: convert the integer to a string first, then rjust
jonkri has quit [Changing host]
jonkri has joined #ruby
<norm> 1.to_s.rjust(3)
mneorr has joined #ruby
<mantas322> okay okay, thanks
<mantas322> I will try that
<bnagy> mantas322: yeah actually I help everyone that appears not to just be a lazy ass
blueOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
<mantas322> oooOOOoOOOO.
<mantas322> tough guy.
<zendeavor> don't start crying
<mantas322> yeah bnagy, dont cry
<bnagy> ;.;
csdc has quit [Ping timeout: 264 seconds]
<zendeavor> you're operating on String objects, so use String methods; shockingly they are well documented and you can ascertain for yourself how to justify your output
gnagno__ has quit [Read error: Connection reset by peer]
pr0ggie has quit [Ping timeout: 240 seconds]
Liothen has quit [Quit: System of a down……]
gnagno__ has joined #ruby
<zendeavor> or you can come here and test your luck to see how many times someone will post an lmgtfy link before you get the picture.
fernandoaleman has quit [Quit: Leaving.]
angusiguess has joined #ruby
nezumi has joined #ruby
fernandoaleman has joined #ruby
yshh has quit [Ping timeout: 276 seconds]
<mantas322> so for, no one.
passcod has left #ruby ["Leaving"]
<mantas322> far*
<zendeavor> plonk
Neomex has joined #ruby
sailias has joined #ruby
angusigu1ss has quit [Ping timeout: 240 seconds]
<bnagy> zendeavor: are you 40+ years old?
<zendeavor> nosir.
<bnagy> ok. I didn't know people still said that
<zendeavor> it's the best
<zendeavor> the sound a name makes when it hits a kill file
<zendeavor> (we don't have kill files anymore)
<mantas322> sounds to me like something a pretentious wine connoisseur
<mantas322> would say
<bnagy> we do not have killfiles :)
<bnagy> nor usenet
<bnagy> nor uucp
* bnagy weeps
<zendeavor> stop your blubbering
<bnagy> well I guess there's still usenet, if you like kiddie porn and movies
<zendeavor> i've never been.
pranny has quit [Quit: Leaving.]
devoldmx3 has joined #ruby
noop has quit [Ping timeout: 268 seconds]
Neomex has quit [Client Quit]
Neomex has joined #ruby
arya_ has quit [Ping timeout: 260 seconds]
<zendeavor> i heard it used to be cool before AOL
kofno has quit [Remote host closed the connection]
<bnagy> yeah, also before the WWW
kofno has joined #ruby
<bnagy> god I am old :(
tommyvyo has quit [Quit:]
TheBlackMan_ has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
kevinykchan has joined #ruby
Fire-Dragon-DoL has joined #ruby
<zendeavor> it's okay
<zendeavor> i won't tell you how young i am
<zendeavor> i identify with the greybeards anyway <3
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
Nanuq has quit [Ping timeout: 245 seconds]
b0oh has joined #ruby
mattsgarrison_ has quit [Remote host closed the connection]
TheBlackMan has quit [Ping timeout: 246 seconds]
TheBlackMan_ is now known as TheBlackMan
karl___ has quit [Ping timeout: 250 seconds]
mattsgarrison_ has joined #ruby
wmoxam has joined #ruby
dhruvasagar has joined #ruby
sayan has joined #ruby
nitish has joined #ruby
Nanuq has joined #ruby
<mantas322> Thank you norm
sambao21 has quit [Quit: Computer has gone to sleep.]
<mantas322> you were helpful
<joshu> is there any difference between doing JSON.dump ({"users" => [{"user" => "test", "status"=>"offline"},{"user"=>"test2", "status"=>"online"}]})
jchysk has quit [Ping timeout: 256 seconds]
<mantas322> zendeavor, you werent helpful at all.
<joshu> or this return {"users" => [{"user" => "test", "status"=>"offline"},{"user"=>"test2", "status"=>"online"}]}.to_json
jchysk has joined #ruby
<bnagy> joshu: this is the kind of thing you can test in irb
gnagno__ has quit [Ping timeout: 240 seconds]
<bnagy> but hopefully not
<bnagy> unless the return is important for control flow
asobrasil has joined #ruby
<bnagy> like if it's in the middle of a method etc
<joshu> bnagy I should have said they both work, just which is preferred way of doing it
b0oh has quit [Ping timeout: 246 seconds]
randomperson3089 has joined #ruby
<bnagy> *shrug*
<bnagy> explicit return when not needed isn't idiomatic
<bnagy> other than that, either I guess?
<randomperson3089> Hello. I am not a coder, I just run stuff... Can I make BDB work with Ruby on Windows?
p0wn3d has joined #ruby
<joshu> ok bnagy thanks
<bnagy> randomperson3089: not without divine intervention
mantas322 has left #ruby [#ruby]
<randomperson3089> Damn.
<randomperson3089> What DB would work best?
<randomperson3089> I mean, I have ruby program where I can choose
<randomperson3089> I'd like to choose something that would work on Windows
<bnagy> what's the functional requirement?
interactionjaxsn has joined #ruby
chase-work has quit [Quit: Textual IRC Client: www.textualapp.com]
<bnagy> it makes me barf to say this, but mysql
<randomperson3089> moment, i'll check.. someone proposed me using tokiocabinet, but no idea how to install it, especially since I don't want to compile anything...
<randomperson3089> I hate compiling on windows D:
<bnagy> assuming there's no way at all you could run a postgres DB on a different box and access it over network
<bnagy> I wouldn't use tokyocabinet
tvw has quit []
<bnagy> it's deprecated now anyway
gyre007 has joined #ruby
<bnagy> kyotocabinet is still being developed and it's great, but I don't know about windows impls
wallerdev has joined #ruby
baordog has joined #ruby
jlast has joined #ruby
arya_ has joined #ruby
<mjc_> postgres runs on windows
<bnagy> there's a good jruby / java wrapper for it
<bnagy> (KC)
realDAB has quit [Quit: realDAB]
RubNoob has joined #ruby
viszu has joined #ruby
<randomperson3089> oh no
<randomperson3089> those are only two options
<bnagy> randomperson3089: is it a trivial DB or will it be big?
<randomperson3089> bdb and tokyocabinet
<randomperson3089> trivial
<bnagy> cause there's pstore
<randomperson3089> it's a small irc bot
<bnagy> which is in stdlib
noop has joined #ruby
<randomperson3089> more for fun than serious
tatsuya__ has joined #ruby
gyre007 has quit [Ping timeout: 246 seconds]
<mjc_> sqlite is pretty good for trivial stuff
tommyvyo has joined #ruby
realDAB has joined #ruby
<randomperson3089> as I said, I finally found out tc is the only other option D:
kobain has joined #ruby
<bnagy> uh.. why? but yeah then go pstore
axeman- has quit [Remote host closed the connection]
rndstr has joined #ruby
RubNoob has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
tatsuya_o has quit [Ping timeout: 268 seconds]
apeiros has quit [Remote host closed the connection]
<rndstr> so should I install gems as root or user?
elux has joined #ruby
gnagno__ has joined #ruby
sambao21 has joined #ruby
<bnagy> rndstr: whichever you installed ruby as
<bnagy> basically, imho, you're almost always better off doing a user-only install via chruby / rbenv / rvm in order of preference
<rndstr> bnagy: but if I do `gem install foo` it installs it to /root/.gem/ that can't be right?
niceguyjames has quit [Quit: Textual IRC Client: www.textualapp.com]
<rndstr> sorry, `sudo gem install foo`
tomzx_mac has joined #ruby
<bnagy> if it's a server then most people install ruby via their OS, and then yeah it would be sudo gem install
cmarques has joined #ruby
<rndstr> no it's just for development.. but it's kind of a mess
EPIK has joined #ruby
<bnagy> then, imho go back to using a version manager
vikhyat_ has joined #ruby
<rndstr> rvm that is?
<bnagy> that's the worst of them
pipework has joined #ruby
<rndstr> this thing is more time consuming than i thought
vikhyat has quit [Ping timeout: 264 seconds]
RubNoob has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
binaryplease has joined #ruby
DaniG2k has joined #ruby
s00pcan has quit [Remote host closed the connection]
randomperson3089 has left #ruby [#ruby]
<zendeavor> rvm is the worst of them?
tkuchiki_ has quit [Remote host closed the connection]
huoxito has quit [Quit: Leaving]
<zendeavor> hell i didn't even realize there were others
<zendeavor> noobie noobie
yshh has joined #ruby
<mjc_> I still prefer rvm, seems to be minimal hassle for me so far
<zendeavor> i was rather unenthused with its initial setup
<zendeavor> also quite unhappy that it wants to redefine cd()
danshultz has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
_JamieD_ has joined #ruby
<bnagy> zendeavor: and that the install is basically curl | bash ?
<zendeavor> yes that was equally rousing
<bnagy> it used to be even worse, made you do god-awful things to your .bashrc
v0n has joined #ruby
Squarepy has joined #ruby
<zendeavor> i'm open to suggestions
<bnagy> chruby >= rbenv > rvm
<zendeavor> why had i only heard of rvm before
s00pcan_ has quit [Ping timeout: 264 seconds]
theRoUS has quit [Ping timeout: 264 seconds]
WarChief has joined #ruby
clocKwize has quit [Quit: clocKwize]
<bnagy> *shrug*
<zendeavor> same
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
monkegjinni has quit [Remote host closed the connection]
BillCriswell has joined #ruby
anonymuse has joined #ruby
gsorbier has joined #ruby
Neomex has quit [Quit: Neomex]
<zendeavor> chruby looks nice.
<zendeavor> unfortunately it's fully of moar bash pitfalls
rodacato has joined #ruby
vikhyat has joined #ruby
vikhyat_ has quit [Ping timeout: 276 seconds]
renderful has joined #ruby
realDAB has quit [Quit: realDAB]
shouya has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<rndstr> ok, rbenv set up, but still left with the gems mess
moshee has quit [Ping timeout: 268 seconds]
<rndstr> should i uninstall my distro's ruby and install it through rbenv?
<rndstr> (per user that is)
TIJ has quit [Ping timeout: 276 seconds]
<hoelzro> I wouldn't do that
<bnagy> you don't need to uninstall
<bnagy> path will sort it out
<hoelzro> seeing as some packages my rely on it
mist is now known as jist
<gnagno__> can I declare a method that will be globally available in my application ?
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
rodacato has quit [Remote host closed the connection]
razi has joined #ruby
razi has quit [Client Quit]
ChristianS has quit [Excess Flood]
mattsgarrison_ has quit [Remote host closed the connection]
renderful has quit [Ping timeout: 256 seconds]
danshultz has quit [Read error: Connection reset by peer]
ChristianS has joined #ruby
binaryplease has quit [Ping timeout: 246 seconds]
<rndstr> rails new foo still fails
mattsgarrison_ has joined #ruby
<rndstr> is there a #ruby-install channel :p
danshultz has joined #ruby
<zendeavor> if there is, it probably redirects here
akemrir has joined #ruby
<bnagy> gnagno__: you can just declare it in toplevel
mansi has joined #ruby
<bnagy> but 95% chance that means you're Doing It Wrong
<mjc_> indeed, you probably don't actually want globals like that
realDAB has joined #ruby
gsorbier has quit [Quit: Computer has gone to sleep.]
wmoxam has quit [Read error: Connection reset by peer]
<rndstr> seriously now, how do I install rake 10.1.0?
mattsgarrison_ has quit [Remote host closed the connection]
mattsgarrison_ has joined #ruby
<DaniG2k> hmrmrmrmrmmm
<DaniG2k> does anyone know of any cool software ideas website
<mjc_> rndstr: what platform are you on?
fgo has quit [Remote host closed the connection]
RubNoob has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
buzzybron has joined #ruby
<rndstr> gem wants to put it in /usr/lib/ruby/gems/2.0.0/build_info/rake-10.1.0.info but no permission after I entered the password. when I do `sudo gem install rake` it installs it into /root/.gem/ which means rails won't find it when I'm doing `bundle install` as user
NiteRain has quit [Ping timeout: 264 seconds]
<rndstr> @mjc_ archlinux
blaxter_ is now known as blaxter
senayar has quit [Remote host closed the connection]
<hoelzro> DaniG2k: for getting ideas, or submitting?
enebo has joined #ruby
<bnagy> rndstr: if you're doing anything as a user, do it all as the user
<DaniG2k> hoelzro: for getting
<mjc_> rndstr: use rvm to install it and you'll be fine
<hoelzro> heh
<hoelzro> I've been meaning to create something like that for a long time
<rndstr> bnagy: I want to but `bundle install` wants to install rake to /usr/lib/ruby/gems...
<hoelzro> but not just for software
<hoelzro> DaniG2k: I can give you some ideas if you want =)
<DaniG2k> a software idea pool
<DaniG2k> im a shitty programmer but
<DaniG2k> i'd like to start small
<DaniG2k> and build something cool eventually
<hoelzro> you should build such a site =)
D4T has joined #ruby
<bnagy> rndstr: I can't speak for the insanity of anything related to rails
moshee has joined #ruby
<hoelzro> honestly, the thing that's been getting in my way the most is the lack of a good name
<DaniG2k> hoelzro: that would be cool
RubNoob has joined #ruby
theRoUS has joined #ruby
shaunbaker has quit [Remote host closed the connection]
<bnagy> hoelzro: grindrb
<DaniG2k> hoelzro: start with something like "Project Z" and then name it whatever when you're done
<gnagno__> bnagy, I would like my method to be a kernel method
<hoelzro> grindrb?
<bnagy> gnagno__: that makes zero sense
<hoelzro> what's that mean?
<bnagy> hoelzro: uh.. ok it's not funny if you don't know what grindr is
<hoelzro> heh
wmoxam has joined #ruby
zz_michael_mbp is now known as michael_mbp
burlyscudd has joined #ruby
MrThePlague has joined #ruby
MrThePlague has joined #ruby
MrThePlague has quit [Changing host]
buzzybron has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
<bnagy> ok sleepytime
dash_ has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
DeanH has joined #ruby
mary5030 has joined #ruby
tagrudev has quit [Remote host closed the connection]
shouya has joined #ruby
RubNoob has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
sambao21 has joined #ruby
rodacato has joined #ruby
tomzx_mac has quit [Read error: Operation timed out]
fernandoaleman has quit [Quit: Leaving.]
jprovazn is now known as jprovazn_afk
pothibo has joined #ruby
akemrir has quit [Quit: WeeChat 0.4.1]
PigDude has quit [Remote host closed the connection]
allaire has joined #ruby
jonkri has quit [Ping timeout: 246 seconds]
dash_ has quit [Quit: Time to beer :)]
denver has joined #ruby
TheBay has joined #ruby
TheBay is now known as Mathias__
noop has quit [Remote host closed the connection]
v0n has quit [Read error: Operation timed out]
workmad3 has quit [Ping timeout: 260 seconds]
denver has quit [Remote host closed the connection]
asteve has quit [Ping timeout: 264 seconds]
Mathias__ is now known as TheBay
dash_ has joined #ruby
ixti has joined #ruby
asteve has joined #ruby
sleetdrop has joined #ruby
sleetdrop has quit [Max SendQ exceeded]
trepidaciousMBR has quit [Read error: Operation timed out]
alex__c2022 has joined #ruby
sleetdrop has joined #ruby
tkuchiki has joined #ruby
dash_ has quit [Client Quit]
ffranz has joined #ruby
blackmesa has joined #ruby
Silent__ has quit [Ping timeout: 256 seconds]
KevinSjoberg has quit [Ping timeout: 240 seconds]
wald0 has quit [Quit: Lost terminal]
BizarreCake has joined #ruby
moshee has quit [Ping timeout: 256 seconds]
denver has joined #ruby
pothibo has quit [Ping timeout: 268 seconds]
realDAB has quit [Quit: realDAB]
pothibo has joined #ruby
realDAB has joined #ruby
KevinSjoberg has joined #ruby
finges has joined #ruby
lkba has joined #ruby
<Godd2> Is rubygems.org unpingable for anyone else?
michael_mbp is now known as zz_michael_mbp
jibi has quit [Read error: Connection reset by peer]
<robert_> Godd2: I just pulled it up via http.
<Godd2> Yea me too, but ping keeps timing out
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
<robert_> it's their firewall probably.
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
<robert_> Godd2: a company I'm involved with maintaining IT support for also filters ICMP, so yeah.
<zendeavor> dropping icmp
<robert_> indeed.
<robert_> it's not uncommon to do that.
<Godd2> ah ok
<zendeavor> no ping ddos attacks!
<robert_> indeed
<zendeavor> indeed.
JZTech101 has joined #ruby
<Godd2> But I'll only send 32 bytes of data, I promise!
<Godd2> ;)
gnagno__ has quit [Ping timeout: 240 seconds]
<robert_> so I'm looking to break DATA up into named sections like '@@ section_name' sort of how tilt does. anyone have any good methods for doing that? :p
<robert_> and Godd2: :p
Myrth has joined #ruby
viszu has quit [Ping timeout: 246 seconds]
r0bby_ has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<realDAB> robert_: consider using a hash with appropriately named keys
mikecmpbll has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
Myconix has joined #ruby
sqd_ has quit [Quit: sqd_]
danshultz has joined #ruby
<realDAB> robert_: if you absolutely need class variables, there's class_variable_set
elux has quit [Quit: Bye!]
pitzips has joined #ruby
<robert_> realDAB: @@ is part of the data, not the script.
lebek has joined #ruby
r0bby has quit [Ping timeout: 240 seconds]
Notte has quit [Remote host closed the connection]
<robert_> realDAB: Check out http://www.sinatrarb.com/intro.html#Inline%20Templates
Spami has quit [Quit: This computer has gone to sleep]
DestinyAwaits has joined #ruby
fernandoaleman has joined #ruby
msuszczy has quit [Quit: leaving]
Squarepy has quit [Ping timeout: 240 seconds]
ner0x has joined #ruby
blaxter has quit [Ping timeout: 246 seconds]
zz_michael_mbp is now known as michael_mbp
wchun has quit [Remote host closed the connection]
Guest1013 has quit [Ping timeout: 260 seconds]
Zeeraw has quit [Quit: Computer has gone to sleep.]
maz-dev has quit [Ping timeout: 268 seconds]
johnnyfuchs has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
aganov has quit [Quit: aganov]
Notte has joined #ruby
DestinyAwaits has quit [Read error: Connection reset by peer]
maasha has quit [Quit: Page closed]
himsin has joined #ruby
himsin has quit [Client Quit]
DestinyAwaits has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
danshultz has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
sevenseacat has quit [Quit: Leaving.]
gnagno__ has joined #ruby
_maes_ has joined #ruby
<robert_> realDAB: https://shifteleven.com/articles/2009/02/09/useless-ruby-tricks-data-and-__end__/ <-- and this, too. You don't need to read the whole thing, I'm just providing it for an example of the kind of usage I want.
blackmesa has joined #ruby
theRoUS has quit [Ping timeout: 256 seconds]
carloslopes has quit [Remote host closed the connection]
dross has quit [Read error: Operation timed out]
dross has joined #ruby
<hoelzro> useless?
binaryplease has joined #ruby
<hoelzro> DATA and END are awesome
vikhyat_ has joined #ruby
poikon has quit [Quit: Leaving]
cads has quit [Ping timeout: 248 seconds]
zigomir has joined #ruby
v0n has joined #ruby
nomenkun has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
b0oh has joined #ruby
theRoUS has joined #ruby
vikhyat has quit [Ping timeout: 240 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
icecandy has joined #ruby
mantas322 has joined #ruby
<mantas322> Hello again
<mantas322> so if I have an array [1,2,3,4,5]
<mantas322> can I remove the first element and the last element
mercwithamouth has joined #ruby
_maes_ has quit [Ping timeout: 240 seconds]
vikhyat has joined #ruby
nezumi has quit [Ping timeout: 276 seconds]
<mantas322> lol foudn the same querstion
digitalcake has joined #ruby
lethjakm1 has joined #ruby
burlyscudd has quit [Read error: Connection reset by peer]
vikhyat_ has quit [Ping timeout: 264 seconds]
NiteRain has joined #ruby
burlyscudd has joined #ruby
splittingred has quit [Quit: splittingred]
_veer has quit [Ping timeout: 264 seconds]
viszu1 has joined #ruby
vikhyat has quit [Read error: Connection reset by peer]
carloslopes has joined #ruby
RichardBaker has joined #ruby
goodgame has quit [Quit: Quitte]
vikhyat has joined #ruby
byprdct has quit [Quit: Textual IRC Client: www.textualapp.com]
cads has joined #ruby
D4T has quit [Quit: Textual IRC Client: www.textualapp.com]
sambao21 has joined #ruby
burlyscudd has quit [Ping timeout: 268 seconds]
bdnelson has joined #ruby
bdnelson has quit [Client Quit]
blackmesa has quit [Ping timeout: 240 seconds]
geggam has joined #ruby
ckrailo has joined #ruby
bdnelson has joined #ruby
EPIK has quit [Ping timeout: 260 seconds]
Zeeraw has joined #ruby
io_syl_ has joined #ruby
pranny has joined #ruby
alup has quit [Quit: Leaving]
atno has quit [Remote host closed the connection]
Davey has joined #ruby
BizarreCake has quit [Quit: Leaving]
_bart has joined #ruby
cads has quit [Ping timeout: 274 seconds]
pranny has quit [Client Quit]
ananthakumaran has joined #ruby
<Lewix> if ( foo | blah | gah ) ; end . Am I right that gah is never executed if foo or blah is true
Assurbanipal has quit [Quit: Leaving]
ExxKA has joined #ruby
deanclkclk has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
lethjakm1 is now known as lethjakman
<deanclkclk> folks..need some help
dash_ has joined #ruby
<deanclkclk> setting up rubyonrails on my machine
<deanclkclk> I just got to the point of installing rvm
<deanclkclk> but, could I tell rvm to install the latest version of full ruby?
<deanclkclk> with dev?
<deanclkclk> running on ubuntu
lindenle has joined #ruby
bigoldrock has joined #ruby
<Lewix> I have a similar expression in rails but i can't seem to figure why 'gah' is executed and return an error, even if there is an error it shouldn't parse it . right?
shouya1 has joined #ruby
<Lewix> deanclkclk: rvm install
<deanclkclk> and it will install the latest version of ruby?
<deanclkclk> full?
ckrailo has quit [Read error: Connection reset by peer]
<Lewix> deanclkclk: rvm install 2.0
<deanclkclk> possible to check cache of what the latest version is?
<deanclkclk> @ Lewix
shouya has quit [Ping timeout: 246 seconds]
<canton7> Lewix, is that | or || ?
ckrailo has joined #ruby
<Lewix> canton7: ||
Evixion has joined #ruby
<deanclkclk> meaning probably checking the rvm cache or repository or something
<deanclkclk> is that possible/
<Lewix> deanclkclk: rvm list
burlyscudd has joined #ruby
wsterling has joined #ruby
<Lewix> deanclkclk: you'll have the list of the current ruby versions installed
<canton7> Lewix, and yes that's true
<canton7> >> "yay" || puts("hi")
<eval-in> canton7 => "yay" (https://eval.in/38154)
<deanclkclk> installed but, I'm talking about the latest one..even if it's not installed @ Lewix
<Lewix> canton7>> "yay" || put("
<Lewix> >> "yay" || put("
<eval-in> Lewix => /tmp/execpad-7d57f4a0e28d/source-7d57f4a0e28d:5: syntax error, unexpected tGVAR, expecting ')' ... (https://eval.in/38155)
<Lewix> ok
<Lewix> so i get it now
<Lewix> canton7: no apparently
<Lewix> it still parse it
<canton7> if it's a syntax error, then it can't even begin executing the first expression
dsabanin has joined #ruby
Ry0_ has joined #ruby
skaczor has joined #ruby
<eval-in> Lewix => "yay" (https://eval.in/38156)
<Lewix> >> "yay" || self.method
<Lewix> >> "yay" || self.method_unknown
<eval-in> Lewix => "yay" (https://eval.in/38157)
<Lewix> >> "yay" || self.gah
<eval-in> Lewix => "yay" (https://eval.in/38158)
<Lewix> hmm
<waxjar> "yay" is truthy, it'll always be "yay"
<Lewix> I don't get why rails parse it even though it's not a syntax error
jmimi has quit [Ping timeout: 240 seconds]
krz has joined #ruby
Banistertab has joined #ruby
bigoldrock has quit [Ping timeout: 240 seconds]
<waxjar> i dont understand your question
<ChristianS> Lewix: doesn't the second part of your statement answer the first?
wisconsin has joined #ruby
nezumi has joined #ruby
tomgrim has joined #ruby
Zeeraw has quit [Quit: Computer has gone to sleep.]
<Lewix> waxjar: ChristianS:
<deanclkclk> anyone knows why I am getting this problem? http://pastie.org/8155980
<Lewix> I have a similar expression in rails but i can't seem to figure why 'gah' is executed and return an error, even if there is an error it shouldn't parse it . right?
<Lewix> and in my expression it's not a syntax error
burlyscudd has quit [Read error: Connection reset by peer]
rhys has joined #ruby
<waxjar> the "thingy" on the left hand side evaluates to nil or false then. can you show some code?
<Lewix> if (current_user.nil? || !current_user.admin || current_user.ordered(@book))
dankest has joined #ruby
<Lewix> so current_user.ordered is executed
<Lewix> when it shouldn't
<krz> whats the difference between ruby 2.0.0p0 and 2.0.0p195?
<waxjar> bugfixes, probably krz
<zendeavor> patchlevel
<terrellt> Lewix: Nooo way.
<Lewix> waxjar: it returns an sql error
<krz> waxjar: so 195 is updated, compare to p0 waxjar ?
<krz> compared*
<zendeavor> it's the patchlevel
RichardBaker has quit [Quit: RichardBaker]
<krz> well which is more updated?
<krz> 195 i would assume?
<waxjar> Lewix: both current_user.nil? and !current_user.admin return false or nil then
cupakromer has joined #ruby
<zendeavor> krz: what do you think, patchlevel 0 or patchlevel 195
michaeldeol has joined #ruby
<krz> zendeavor: 0?
<Lewix> waxjar: I checked. they're both true but ill check again for the hundredth time
* zendeavor brain hemorrhage
g0bl1n has joined #ruby
<krz> 0 looks cooler
sayan has quit [Ping timeout: 260 seconds]
<zendeavor> use it then
io_syl_ has quit [Quit: Computer has gone to sleep.]
<krz> nah ill wait for 1
<krz> i changed my mind. 1 is cooler
byprdct has joined #ruby
michaeldeol has quit [Remote host closed the connection]
Appineer has joined #ruby
Appineer has left #ruby [#ruby]
<rndstr> how do I install a gem systemwide?
burlyscudd has joined #ruby
justsee has quit [Ping timeout: 240 seconds]
tjbiddle has joined #ruby
tommyvyo has quit [Quit:]
moshee has joined #ruby
gsorbier has joined #ruby
madison_ has joined #ruby
<heftig> rndstr: what provides your ruby?
<rndstr> hmm, i just decided to try rvm
<rndstr> but pacman @archlinux
Spami has joined #ruby
Spami has joined #ruby
<heftig> rndstr: sudo gem --no-user-install
Banistertab has quit [Ping timeout: 264 seconds]
ssvo has joined #ruby
michaeldeol has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
tjbiddle has quit [Client Quit]
rshetty has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
baroquebobcat has joined #ruby
rodacato has quit [Remote host closed the connection]
avril14th has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
_bart has quit [Remote host closed the connection]
<rndstr> hmm, that complainsi that it's going to overwrite /usr/bin/rake (which belongs to the ruby package i installed through pacman)
<rndstr> i think i'll try rvm, thanks
rodacato has joined #ruby
zeropx has joined #ruby
binaryplease has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby
madison_ has quit [Client Quit]
DaniG2k has quit [Quit: Leaving.]
jsonperl has joined #ruby
<jsonperl> I switched over to jemalloc on a ubuntu machine and saw DRAMATIC improvements in memory consumption but...
noname001 has quit [Remote host closed the connection]
acrussell has joined #ruby
<jsonperl> At massive (simulated) load, I start to see memory allocation errors
<jsonperl> It only starts to happen after the machine has run for a while… any ideas?
michael_mbp is now known as zz_michael_mbp
Astralum has quit [Ping timeout: 246 seconds]
<jsonperl> Has anyone tried jemalloc for their ruby apps
bigoldrock has joined #ruby
_ffio_ has joined #ruby
r4nd0m1 has joined #ruby
<zendeavor> use the source luke
cantonic has quit [Ping timeout: 264 seconds]
ffio_ has quit [Ping timeout: 268 seconds]
devoldmx3 has quit [Read error: Connection reset by peer]
Voodoofish430 has joined #ruby
Ry0_ has quit [Remote host closed the connection]
Eiam has quit [Quit: Textual IRC Client: www.textualapp.com]
atno has joined #ruby
devoldmx has joined #ruby
gsorbier has quit [Quit: Computer has gone to sleep.]
cantonic has joined #ruby
Astralum has joined #ruby
<ChristianS> Lewix: if current_user.nil? is true, why do you even bother to continue?
rpgsimmaster_ has quit [Read error: Operation timed out]
zeade has joined #ruby
krz has quit [Quit: krz]
<wisconsin> anyone tried this? http://rubyluwak.com/
geekles has quit [Read error: Operation timed out]
Ry0_ has joined #ruby
geekles has joined #ruby
rpgsimmaster has joined #ruby
<Lewix> ChristianS: if !true was my mistake
<Lewix> ChristianS: one of them returned a boolean value
jefflyne has quit [Ping timeout: 246 seconds]
jsonperl has left #ruby [#ruby]
acrussell has left #ruby [#ruby]
m8 has joined #ruby
dagen has quit []
grainol has joined #ruby
robscomputer has joined #ruby
jefflyne has joined #ruby
RichardBaker has joined #ruby
krz has joined #ruby
vlad_starkov has joined #ruby
rshetty has quit [Ping timeout: 240 seconds]
tommyvyo has joined #ruby
thepumpkin has quit [Ping timeout: 248 seconds]
Eiam has joined #ruby
digitalcake has quit [Quit: Leaving.]
dagobah has quit [Remote host closed the connection]
tommyvyo has quit [Client Quit]
atno has quit [Remote host closed the connection]
dankest has quit [Quit: dankest]
<havenwood> haven't looked at the code, but `unless current_user` seems nicer than `if current_user.nil?`
mneorr_ has joined #ruby
<havenwood> mind re-linking Gist, i showed up late but am curious? >.>
mikeg has joined #ruby
<havenwood> g'morning! Friday :D :D :D
MrPoT4tO has joined #ruby
realDAB has quit [Quit: realDAB]
lnormous has joined #ruby
mneorr has quit [Ping timeout: 260 seconds]
mrpot4to_ has joined #ruby
thepumpkin has joined #ruby
MrPoT4tO has quit [Client Quit]
burlyscudd has quit [Quit: Leaving.]
vlad_starkov has quit [Ping timeout: 246 seconds]
toddWork_ has quit [Read error: Connection reset by peer]
denver has quit [Read error: Operation timed out]
toddWork_ has joined #ruby
_maes_ has joined #ruby
cha1tanya has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
mrpot4to_ has quit [Read error: Connection reset by peer]
brennanMKE has joined #ruby
BizarreCake has joined #ruby
tomgrim has quit [Ping timeout: 240 seconds]
MrPoT4tO has joined #ruby
g0bl1n has quit [Ping timeout: 240 seconds]
deanclkclk has quit [Read error: Operation timed out]
tatsuya__ has quit [Remote host closed the connection]
io_syl has quit [Quit: io_syl]
denver has joined #ruby
pothibo has quit [Quit: pothibo]
mklappstuhl has quit [Remote host closed the connection]
danbeck has joined #ruby
BizarreCake has quit [Read error: Connection reset by peer]
lunarjar has quit [Ping timeout: 240 seconds]
lunarjar has joined #ruby
dayepa has quit [Quit: dayepa]
jorge has quit [Remote host closed the connection]
YaNakilon has quit [Ping timeout: 240 seconds]
gsorbier has joined #ruby
_ffio_ is now known as ffio
jorge has joined #ruby
b0oh has quit [Quit: Leaving.]
haxrbyte_ has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
mantas322 has quit [Quit: Page closed]
whowantstolivefo has quit [Read error: Connection reset by peer]
geoffw8_ has quit [Ping timeout: 240 seconds]
whowantstolivefo has joined #ruby
anonymuse has quit [Remote host closed the connection]
jorge has quit [Ping timeout: 246 seconds]
tylersmith has quit [Remote host closed the connection]
RichardBaker has quit [Quit: RichardBaker]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
djbkd has joined #ruby
bobbyz has quit [Ping timeout: 256 seconds]
mneorr_ has quit [Ping timeout: 240 seconds]
TonyMergue has joined #ruby
RichardBaker has joined #ruby
locriani has joined #ruby
d3 has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
marko has joined #ruby
<marko> hello i had ruby .exe installed in my computer but for what it is?
TheBay is now known as Mathias__
<canton7> marko, the ruby interpreter? for running ruby scripts?
atmosx has joined #ruby
mansi has quit [Remote host closed the connection]
<marko> when i click ctrl-alt-Del in the procces it show me ruby.exe , i end it aftat i do restart computer i check it and it is there agai
mattsgarrison_ has quit [Remote host closed the connection]
bobbyz has joined #ruby
rodacato has quit [Remote host closed the connection]
mansi has joined #ruby
mattsgarrison_ has joined #ruby
realDAB has joined #ruby
blackmesa has joined #ruby
gildo has quit [Read error: Operation timed out]
tobyo1 has quit [Ping timeout: 240 seconds]
Ry0_ has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
<canton7> then something's starting it
Vivekananda has joined #ruby
rodacato has joined #ruby
corehook has joined #ruby
<marko> in general ruby for what is ?
adeponte has joined #ruby
Fire-Dragon-DoL has left #ruby [#ruby]
<canton7> ruby is a language. it requires an interpreter to run
<canton7> have you heard of python? perl? php?
ybart has quit [Quit: ybart]
dankest has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
bobbyz has quit [Ping timeout: 240 seconds]
<marko> yes php
<marko> and python
<marko> Python Programming Language
ghr has quit [Quit: Computer has gone to sleep.]
<canton7> yes. ruby is like them
<atmosx> and PHP programming language
<atmosx> for bugs
* Eiam takes offense
<Eiam> ruby is like php? you better take that back.
* atmosx supports Eiam hostile behavior
digitalcake has joined #ruby
<canton7> in the most general sense, in that they're both interpreted languages :P
<atmosx> guys, Spree is the only ruby-based eshop out there right?
jlebrech has quit [Quit: Ex-Chat]
<zendeavor> that's certainly unlikely
djbkd has quit [Ping timeout: 240 seconds]
<canton7> hey, I was hoping he'd at least have heard of php :P
<Eiam> ^
<Eiam> unlikely
`p has joined #ruby
<zendeavor> also, it's not fair to claim that php is interpreted
dsabanin has quit [Quit: Leaving...]
tomgrim has joined #ruby
<canton7> it requires an interpreter to run. stop nit-picking, i'm trying to get a very very general idea across
<Eiam> stick with python then
<zendeavor> the php interpreter more just drools on the code you feed it until something short circuits
<canton7> hehe
_maes_ has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 260 seconds]
wallerdev has quit [Read error: Connection reset by peer]
bobbyz has joined #ruby
wallerdev has joined #ruby
dhruvasagar has joined #ruby
smathieu has joined #ruby
gsorbier has quit [Quit: Computer has gone to sleep.]
goshakkk has joined #ruby
ntus1017 has joined #ruby
djbkd has joined #ruby
<robert_> For some reason, I'm unable to parse @@ header from my DATA section. :/ http://codepad.org/onEsvn1F
gsorbier has joined #ruby
brunoro has joined #ruby
huoxito has joined #ruby
digitalcake has quit [Ping timeout: 256 seconds]
monkegjinni has joined #ruby
mark_locklear has quit [Ping timeout: 264 seconds]
bobbyz has quit [Ping timeout: 240 seconds]
brennanMKE has quit [Read error: Connection reset by peer]
brennanMKE has joined #ruby
samuel02 has quit [Remote host closed the connection]
gildo has joined #ruby
Eiam has quit [Quit: Textual IRC Client: www.textualapp.com]
fernandoaleman has quit [Quit: Leaving.]
<robert_> anyone?
`p has quit [Remote host closed the connection]
nomenkun has joined #ruby
mahmoudimus has joined #ruby
ExxKA has quit [Quit: Leaving]
dash_ has quit [Ping timeout: 276 seconds]
rupee has joined #ruby
chrisja has joined #ruby
spider-mario has joined #ruby
robscomputer has quit [Read error: Connection reset by peer]
monkegjinni has quit [Ping timeout: 240 seconds]
iliketurtles has joined #ruby
cantonic has quit [Quit: cantonic]
tjbiddle has joined #ruby
obs has quit [Quit: Konversation terminated!]
BlakeRG has joined #ruby
danshultz has quit [Remote host closed the connection]
graft__ has joined #ruby
timonv_ has joined #ruby
Eiam has joined #ruby
i_s has joined #ruby
bobbyz has joined #ruby
DanKnox_away is now known as DanKnox
danshult_ has joined #ruby
cool has joined #ruby
jprovazn_afk has quit [Quit: Odcházím]
alem0lars has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
tobyo1 has joined #ruby
aaronmcadam has quit [Ping timeout: 276 seconds]
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dsabanin has joined #ruby
danshult_ has quit [Read error: Connection reset by peer]
maxmanders has quit [Quit: Computer has gone to sleep.]
filipe has quit [Ping timeout: 260 seconds]
DestinyAwaits has quit [Quit: Leaving]
twoism has joined #ruby
danshultz has joined #ruby
goshakkk has joined #ruby
nezumi has quit [Ping timeout: 256 seconds]
saarinen has joined #ruby
gsorbier has quit [Quit: Computer has gone to sleep.]
nezumi has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
jonkri has joined #ruby
_JamieD_ has quit [Quit: _JamieD_]
digital-ghost has joined #ruby
realDAB has quit [Quit: realDAB]
swistak35 has quit [Quit: ZNC - http://znc.in]
allaire has quit [Quit: allaire]
krz has quit [Quit: krz]
krz has joined #ruby
reset has joined #ruby
lebek has quit [Ping timeout: 240 seconds]
allaire has joined #ruby
vinnyOcean has joined #ruby
<DylanJ> well
dhruvasagar has quit [Read error: Connection reset by peer]
digitalcake has joined #ruby
<DylanJ> stop using unless else
<havenwood> unless else has never bothered me, but I know the consensus is it can't be understood so i do avoid it
vinnyOcean has quit [Client Quit]
tylersmith has joined #ruby
<DylanJ> it's just a little weird. i do appreciate the unless keyword and use it myself. but only never with an else.
<DylanJ> -only
<atmosx> capital name variable sare like instance variables?
marko has quit []
clintnewsom has quit [Quit: clintnewsom]
<havenwood> atmosx: If it starts with a CAP its a Constant.
Mathias__ has quit [Remote host closed the connection]
<atmosx> havenwood: by constant you mean, I can use the same variable throughout the scope of the application/file?
dhruvasagar has joined #ruby
<DylanJ> havenwood: if it's all caps* it's a constant
<DylanJ> which what im sure you meant
<waxjar> nope
<havenwood> DylanJ: If it starts with a Cap its a constant, ALL_CAP as well.
<DylanJ> for reals?
<waxjar> the only requirement is it should start with a capital letter
tomgrim has quit [Ping timeout: 268 seconds]
<havenwood> DylanJ: Just by convention, Class and Module names are Constants with first letter Cap, whilst normal CONSTANTS are UPCASE>
<DylanJ> neat
<havenwood> DylanJ: There is no difference though.
devoldmx3 has joined #ruby
digitalcake has quit [Ping timeout: 248 seconds]
netQT_ has joined #ruby
<havenwood> Module.constants
pedestrian has joined #ruby
clintnewsom has joined #ruby
<havenwood> #=>[:Array, :Of, :CONSTANTS]
saarinen has quit [Quit: saarinen]
RichardBaker has quit [Quit: RichardBaker]
devoldmx27 has joined #ruby
splittingred has joined #ruby
splittingred has quit [Client Quit]
devoldmx has quit [Read error: Connection reset by peer]
rdark has quit [Quit: leaving]
jorge has joined #ruby
ferdev has quit [Quit: ferdev]
xaxxon has joined #ruby
robbyoconnor has joined #ruby
krz has quit [Quit: krz]
saarinen has joined #ruby
devoldmx3 has quit [Ping timeout: 246 seconds]
tomgrim has joined #ruby
RichardBaker has joined #ruby
RichardBaker has quit [Client Quit]
marcdel has joined #ruby
jorge has quit [Ping timeout: 276 seconds]
r0bby_ has quit [Ping timeout: 276 seconds]
rhys_ has joined #ruby
rhys has quit [Ping timeout: 268 seconds]
xaxxon has quit [Quit: This computer has gone to sleep]
krz has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<apeiros> DylanJ: and not even everybody susbscribes to that convention (I don't, I CamelCase all my constants)
io_syl has joined #ruby
RichardBaker has joined #ruby
netQT_ has quit [Read error: Connection reset by peer]
g0bl1n has joined #ruby
digitalcake has joined #ruby
kirun has joined #ruby
Vivekananda has quit [Quit: Ex-Chat]
pkrnj has joined #ruby
Al_ has quit [Quit: Al_]
louism2_ has joined #ruby
<Kelet> apeiros, But then you don't get the warning on redefinition? :(
blitz has joined #ruby
<apeiros> Kelet: you're mistaken. that one is on constants, not on what kind of object the constant references.
<havenwood> Kelet: You do with This or THIS, same warning.
dhruvasagar has quit [Ping timeout: 246 seconds]
Al_ has joined #ruby
<Kelet> Ah, TIL
MrThePla_ has joined #ruby
MrThePlague has quit [Read error: Connection reset by peer]
mattsgarrison_ has quit [Remote host closed the connection]
Al_ has quit [Client Quit]
krz has quit [Quit: krz]
mattsgarrison_ has joined #ruby
goleldar has joined #ruby
<goleldar> hello
<goleldar> as far as style goes. in a class should attr_reader come before or after constants?
sqd_ has joined #ruby
intuxicated has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
dhruvasagar has joined #ruby
AndChat| has joined #ruby
lkba has quit [Read error: Connection reset by peer]
<havenwood> goleldar: I think constants then attrs.
MrThePla_ has quit [Remote host closed the connection]
<goleldar> havenwood, thanks :)
bricker has joined #ruby
MrThePlague has joined #ruby
iliketurtles has joined #ruby
rhys_ has quit [Read error: Connection reset by peer]
BizarreCake has joined #ruby
ferdev has joined #ruby
rezzack has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
mark_locklear has joined #ruby
blitz is now known as totallynotblitz
johnnyfuchs has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
wolcanus has joined #ruby
denver has quit [Remote host closed the connection]
mansi has joined #ruby
timonv_ has quit [Remote host closed the connection]
jchysk has quit [Read error: Connection reset by peer]
rhys_ has joined #ruby
manutter has quit [Read error: Connection reset by peer]
manutter has joined #ruby
digitalcake has quit [Quit: Leaving.]
eldariof has joined #ruby
RORgasm_ has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
totallynotblitz is now known as blitz
digitalcake has joined #ruby
Godd2 has quit [Quit: Page closed]
tkuchiki has quit [Remote host closed the connection]
interactionjaxsn has quit [Ping timeout: 240 seconds]
mansi has quit [Ping timeout: 268 seconds]
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby
RORgasm has quit [Read error: Connection reset by peer]
realDAB has joined #ruby
digital-ghost has quit [Remote host closed the connection]
mansi has joined #ruby
rupee has quit [Quit: Leaving]
JohnBat26|3 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
r0bby has joined #ruby
hakunin has quit [Ping timeout: 240 seconds]
rodacato has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 240 seconds]
devoldmx27 has quit [Read error: Connection reset by peer]
sleetdrop has quit [Quit: Computer has gone to sleep.]
trepidaciousMBR has joined #ruby
soulcake has quit [Ping timeout: 240 seconds]
rodacato has joined #ruby
devoldmx has joined #ruby
niklasb has joined #ruby
gnagno__ has quit [Ping timeout: 240 seconds]
corehook has quit [Read error: Operation timed out]
S0da has quit [Read error: Connection reset by peer]
brunoro has quit [Ping timeout: 248 seconds]
freerobby has quit [Quit: Leaving.]
chrisja has quit [Quit: leaving]
tomgrim has quit [Read error: No route to host]
mansi_ has joined #ruby
freerobby has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<epitron> finally! someone updated modemmanager's package to 1.0
mansi has quit [Read error: Connection reset by peer]
<wisconsin> anyone tried this? http://rubyluwak.com/
devoldmx has joined #ruby
tommyvyo has joined #ruby
<robert_> For some reason, I'm unable to parse @@ header from my DATA section.. anyone have any ideas? :/ http://codepad.org/onEsvn1F
_veer has joined #ruby
awarner_ has joined #ruby
grillermo has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
workmad3 has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hakunin has joined #ruby
Vivekananda has joined #ruby
awarner has quit [Ping timeout: 248 seconds]
DrCode has quit [Ping timeout: 240 seconds]
asteve has joined #ruby
asteve has joined #ruby
asteve has quit [Changing host]
ukd1 has joined #ruby
jibi has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
Ry0_ has joined #ruby
sleetdrop has joined #ruby
Fire-Dragon-DoL has joined #ruby
realDAB has quit [Quit: realDAB]
peret has quit [Ping timeout: 264 seconds]
interactionjaxsn has joined #ruby
<iliketurtles> bnagy: i ended up going with the cosine similarity solution btw
workmad3 has quit [Ping timeout: 246 seconds]
apt-get_install has quit [Read error: Connection reset by peer]
thenj has joined #ruby
viszu1 has quit [Quit: Leaving.]
vikhyat has quit [Remote host closed the connection]
brunoro has joined #ruby
apt-get_install has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<thenj> what is a good way to loop through a list of ip addresses, ssh command, and evaluate the result of the command?
<thenj> should i use something like Net::SSH ?
brennanMKE has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
digitalcake has quit [Quit: Leaving.]
dsabanin has quit [Quit: Leaving...]
mocfive_ has joined #ruby
DrCode has joined #ruby
erry has quit [Read error: Connection reset by peer]
ukd1_ has joined #ruby
Spami has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
mocfive_ has quit [Client Quit]
erry_ has joined #ruby
fernandoaleman has joined #ruby
_reset has joined #ruby
reset has quit [Read error: Connection reset by peer]
mocfive has joined #ruby
smathieu has quit [Ping timeout: 276 seconds]
jorge__ has joined #ruby
vikhyat has joined #ruby
wmoxam has quit [Quit: Lost terminal]
cupakromer has left #ruby [#ruby]
ukd1 has quit [Ping timeout: 268 seconds]
erry_ is now known as erry
ukd1_ has quit [Ping timeout: 276 seconds]
geoffw8_ has joined #ruby
louism2_ has quit [Quit: This computer has gone to sleep]
yacks has quit [Quit: Leaving]
corehook has joined #ruby
jsatk has joined #ruby
louism2__ has joined #ruby
wmoxam has joined #ruby
jorge__ has quit [Ping timeout: 276 seconds]
dsabanin has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
<atmosx> anyone knows how to filter by date range in sequel?
alvaro_o has joined #ruby
nitish has quit [Remote host closed the connection]
RichardBaker has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
gildo has quit [Ping timeout: 240 seconds]
carloslopes has joined #ruby
corehook has quit [Ping timeout: 246 seconds]
petru has quit [Ping timeout: 264 seconds]
yacks has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
<thenj> hmm. its quiet in here
RichardBaker has quit [Ping timeout: 240 seconds]
brunoro has quit [Ping timeout: 268 seconds]
maxmanders has joined #ruby
dhruvasagar has joined #ruby
swordsmanz has joined #ruby
romdi` has joined #ruby
chriskk has joined #ruby
atno has joined #ruby
mantle has joined #ruby
jonahR has joined #ruby
echevemaster has quit [Quit: Leaving]
wald0 has joined #ruby
<wald0> im trying to decide to use (to learn first) ruby or not for dev some apps, but i would like to know what happens when some lib or ruby updates to a newer version, about maintaining, is there a way to know that my app stills fully compatible or that i need to update/adapt my code ? is there any facility for this?
hydrozen has joined #ruby
goshakkk has quit [Quit: Textual IRC Client: www.textualapp.com]
tobin has joined #ruby
<Kelet> wald0, It depends what they change. Usually some effort is made to retain compatibility. Sometimes there are breakages.
ephemerian has left #ruby [#ruby]
<Kelet> Ruby generally doesn't have too many breakages but as for libraries, it depends on the person or group developing them.
<tobin> Can someone advise me the best way to write a function. I'm writing a helper function, in python i'd do something like def helper(name, value = None).
cj3kim has joined #ruby
lebek has joined #ruby
<tobin> that doesn't seem to be common in ruby, trying to find the best way, or what to google for
icecandy has quit [Remote host closed the connection]
colonolGron has joined #ruby
<Kelet> tobin, I'm not sure if I understand but why don't you just nest the function?
<Eiam> yeah..
<tobin> Is it better to do something like value || nil within the function, rather than defining the argument in def()
<Eiam> i just write the function inside the function
<tobin> Kelet: because I'm new to ruby, and used to python :D
<Eiam> oh
<Eiam> tobin: I define default arguments in the method def ..
<Kelet> tobin, I see functions in functions a fair bit, not sure if it's the most common idiom for helper functions in Ruby but it's what I use.
<Kelet> Either that or I just set it as private
<Kelet> depending on the nesting
jrendell has joined #ruby
digitalcake has joined #ruby
mark_locklear has quit [Quit: Leaving]
<Eiam> Kelet: I don't think he's talking about nesting functions, it looks like he's talking about setting function values in the definition
smathieu has joined #ruby
<digitalcake> Can someone point me in the right direction with thinking sphinx. Cant seem to start it. https://gist.github.com/digitalcake/bf7ee9a745ca448d1d28
<tobin> I'm not talking about nesting, just basically writing a helper function. IE to manage a service. I check the value of the keyword arguments.
Ry0_ has quit [Remote host closed the connection]
rodacato has quit [Remote host closed the connection]
athaeryn has joined #ruby
Nilium has joined #ruby
athaeryn has left #ruby [#ruby]
Hobogrammer has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
ner0x has quit [Ping timeout: 260 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
<thenj> where are there 2 ruby channels? #ruby and #ruby-lang ?
<thenj> #ruby-lang is the official channel. why does this one exist:
niklasb has quit [Read error: Operation timed out]
devoldmx3 has joined #ruby
clintnewsom_ has joined #ruby
clintnewsom has quit [Ping timeout: 268 seconds]
clintnewsom_ is now known as clintnewsom
ner0x has joined #ruby
carloslopes has quit [Remote host closed the connection]
Trudko has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
<atmosx> thenj: so you can ask this question and get no decent answer.
<atmosx> thenj: it's a hoax
<Trudko> guys I have decimal number and i want to remove decimal party only if there is zero at the end so 4.0 will become 4 but 4.5 will stay the same
<thenj> atmosx: thats crazy!
<wald0> Kelet: basically, is there a way to know that my code can have a breakage than waiting for a possible report from an user ?
BizarreCake has quit [Ping timeout: 246 seconds]
<atmosx> Trudko: to_i will make the float integer
<atmosx> an if/else/unless of ?: will do the rest
<Kelet> wald0, First and foremost, before you upgrade a library or Ruby version, check the changelog and they will usually list breakages if there are any, very boldly
carloslopes has joined #ruby
<matled> Trudko: use "%f" and strip of the trailing /[.]?0+\z/
<Kelet> wald0, But there are many test-writing frameworks, and a good set of tests should catch that type of stuff.
<thenj> whats a good way to evaluate the output of a command like 'ssh hostname df | grep /partition' ?
<Trudko> atmosx: to_i will make 4.1 -> 4 which is something I dont want
twoism has quit [Remote host closed the connection]
Ry0_ has joined #ruby
<Trudko> >>
<eval-in> Trudko => nil (https://eval.in/38166)
<thenj> should i use Net::SSH, or is it a good idea to just use the shell?
jrendell has quit [Quit: jrendell]
<Trudko> >> sprintf('%.2f', 4.5)
<eval-in> Trudko => "4.50" (https://eval.in/38167)
<matled> thenj: if you use the shell it becomes hard to tell if ssh failed to connect, df failed on the remote side or grep failed
colonolGron has quit [Quit: Lost terminal]
badquanta has quit [Quit: Leaving]
<thenj> hmm. this is true
<Trudko> >> "%gx" % (4.5 / 100.00)
<eval-in> Trudko => "0.045x" (https://eval.in/38168)
<wald0> Kelet: yeah, thats what im searching for, a "test" thing to check that everything is fine in building (packaging/releasing) time
<thenj> so i could use Net::SSH, store the result of df, and g
michaeldeol has quit [Remote host closed the connection]
<thenj> "grep" it myself in my code
<Eiam> >> 4.5.to_i unless 4.5/4.5.to_i == 1
<eval-in> Eiam => 4 (https://eval.in/38169)
<Eiam> >> 4.5.to_i unless 4.5/4.5.to_i == 1.0
<eval-in> Eiam => 4 (https://eval.in/38170)
ner0x has quit [Quit: Leaving]
<matled> thenj: that would probably be the easiest to detect all kind of low level errors. if you don't care that much using "ssh host df" could be fine too..
Kelet has quit [Read error: Connection reset by peer]
Kelet has joined #ruby
huoxito has quit [Quit: Leaving]
xardas has quit [Read error: Connection reset by peer]
<Trudko> >> 5.to_i if 5 != 5.ceil
<eval-in> Trudko => nil (https://eval.in/38171)
MrPoT4tO has quit [Read error: Connection reset by peer]
teddyp1cker has joined #ruby
MrPoT4tO has joined #ruby
tonini has joined #ruby
dankest has quit [Quit: dankest]
carloslopes has quit [Remote host closed the connection]
ChristianS has quit [Excess Flood]
<Eiam> >> y = 4.5/(4.5.to_i) != 1.0 ? 4.5 : 4.5.to_i
<eval-in> Eiam => 4.5 (https://eval.in/38172)
mattsgarrison_ has quit [Remote host closed the connection]
ChristianS has joined #ruby
<Eiam> >> y = 4.0/(4.0.to_i) != 1.0 ? 4.0 : 4.0.to_i
<eval-in> Eiam => 4 (https://eval.in/38173)
elaptics is now known as elaptics`away
<Eiam> boom.
clintnewsom has quit [Quit: clintnewsom]
allaire has quit [Quit: allaire]
<Eiam> Trudko: ^ see above
hydrozen has quit [Quit: Textual IRC Client: www.textualapp.com]
awarner_ has quit [Read error: Connection reset by peer]
<Nilium> Trudko: Could do something like (((n - n.to_i) < Float::EPSILON) ? n.to_i() : n)
awarner has joined #ruby
<Nilium> Granted that's assuming your non-integer is a Float.
<Nilium> Also, I forgot to do abs on that.
<Nilium> So, more like ((n - n.to_i).abs < Float::EPSILON ? n.to_i : n)
zomgbie has quit [Read error: Connection reset by peer]
zomgbie has joined #ruby
digitalcake has quit [Quit: Leaving.]
<Kelet> tfw when
<Kelet> >> 0.1 + 0.2
<eval-in> Kelet => 0.30000000000000004 (https://eval.in/38174)
nvcexploder has joined #ruby
nvcexploder has left #ruby [#ruby]
<Kelet> atm machine
zacts has joined #ruby
jonkri has quit [Quit: jonkri]
teddyp1cker has quit [Read error: Operation timed out]
<atmosx> is there anything like %w{1 2 3 4 5 6 7 8 9 10 11 12} that will return an array of integers?
<Eiam> Nilium: yours maybe cleaner in that mine will fuck up on 0
mantas322 has joined #ruby
Squarepy has joined #ruby
<Eiam> >> 0/(0.to_i)
<eval-in> Eiam => divided by 0 (ZeroDivisionError) ... (https://eval.in/38176)
<mantas322> Hello, How expensive are .pop or .shift on an array?
rupee has joined #ruby
<Eiam> relative to what
<Nilium> Mine will fuck up on (0.1 + 0.2) * 10, so you might want to adjust the epsilon depending on the precision wanted.
jorge__ has joined #ruby
<Nilium> mantas322: What Eiam said and for what purpose in what situation?
teddyp1cker has joined #ruby
<mantas322> comparing the leemnts of an array to itself
<mantas322> elements*
<Nilium> Eh?
<Eiam> huh?
forrest has joined #ruby
<Nilium> Explain.
<Eiam> mantas322: shift takes the first element, pop takes the last element
<mantas322> I know
yacks has quit [Quit: Leaving]
<Eiam> so comparison would mean... how fast is array.shift vs array.first
<mantas322> I want to compare the elements of an array [1,2,3]
<Eiam> or array[0]
browndawg has left #ruby [#ruby]
<mantas322> 3 -> 1 , 3 -> 2, 3 -> 3
<Nilium> Why do you need to remove them for that?
cj3kim has quit [Read error: Connection reset by peer]
Trudko has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 1.9.0.17/2009122204]]
<mantas322> then 2 -> 1, 2->3, 2->3
<Eiam> mantas322: try explaining what you want first then, cause I'm lost.
<mantas322> if I .pop after each iteration
cj3kim has joined #ruby
<mantas322> will and modification of the array improve my proformance?
<Nilium> mantas322: Ok, data in is what and data out is what?
michaeldeol has joined #ruby
<Nilium> What are you trying to actually accomplish?
zz_michael_mbp is now known as michael_mbp
<Eiam> wait what,
<mantas322> okay I want to add each element together
<mantas322> and see what 3+1 is 3+2, and 3+3
<Eiam> this sounds like a bad idea, don't modify the array to try and improve some hand wavy performance concern
* Nilium is very confused
<Eiam> mantas322: if you want to just add an array together just .inject(:+)
<mantas322> not the whole thing
<mantas322> 2 elements at a time
<Eiam> >>[1,2,3].inject(:+)
timonv has joined #ruby
<eval-in> Eiam => 6 (https://eval.in/38177)
maxmanders has joined #ruby
jorge__ has quit [Ping timeout: 240 seconds]
<Nilium> So what you want is to take the sum of each element pair?
<mantas322> right
Zeeraw has joined #ruby
<Nilium> Is it always the sum of adjacent elements?
<Eiam> each_with_object(2) or something?
Zeeraw has quit [Max SendQ exceeded]
digitalcake has joined #ruby
freerobby has quit [Quit: Leaving.]
<Eiam> you can enumerate in sets of two
<Eiam> oh, sorry each_slice
<Nilium> You can enumerate lots of ways. I just think mantas322 isn't defining his problem well enough.
<mantas322> I don't think I am either
<Nilium> Ok, so mantas322, here's a question for you
saarinen has quit [Quit: saarinen]
<Nilium> Given the input array [1, 2, 3], what is the output?
grillermo has quit [Quit: bandtastic.me]
<Nilium> Assuming the array's passed to some mystery function that does what you want.
<Eiam> >> [1,2,3,4].each_slice(2) {|a,b| a+b}
<eval-in> Eiam => nil (https://eval.in/38178)
<Eiam> >> [1,2,3,4].each_slice(2) {|a,b| puts a+b}
<eval-in> Eiam => 3 ... (https://eval.in/38179)
<mantas322> 2, 3, 4, 3, 4, 5 4,5,6
timonv has quit [Remote host closed the connection]
EPIK has joined #ruby
clintnewsom has joined #ruby
<Eiam> well that was not described well at all.
<Eiam> 1+2 != 2
<Nilium> >> [1,2,3,4].each_slice(2).map { |a, b| a + b }
<eval-in> Nilium => [3, 7] (https://eval.in/38180)
<Eiam> 2+3 != 3
<Eiam> Nilium: thanks lol
<Eiam> knew I was close ;)
<havenwood> mantas322: By that you mean?: [[2,3,4], [3,4,5], [4,5,6]]
<Nilium> You could also do a permutation/combination before running each_slice
yacks has joined #ruby
michael_mbp is now known as zz_michael_mbp
<Eiam> havenwood: how do you understand where the hell 2 comes from?
zz_michael_mbp is now known as michael_mbp
<mantas322> 1+1, 1+2, 1+3 2+1 , 2+2, 2+3 3+1, 3+2, 3+3
<Eiam> OH
<Eiam> mantas322: dude, am I doing your comp sci homework? =(
<mantas322> no not at all
<mantas322> i wish!
<robert_> anyone have any ideas?
<eval-in> Nilium => [2, 3, 4, 5, 6, 7, 8] (https://eval.in/38181)
<Nilium> >> [1,2,3,4].repeated_permutation(2).to_a.map { |a, b| a + b }.uniq!
<mantas322> I'm seeing if I can use .pop or .shift to improve this
<Nilium> Actually, why do I have to_a in there..
<Nilium> Oh right, IRB testing.
<Nilium> Anyway, Enumerable and Array are a hell of a drug.
clintnewsom has quit [Client Quit]
<mantas322> holy cow
<mantas322> puts [1,2,3].repeated_permutation(2).to_a.map { |a, b| a + b }.uniq!
cj3kim has quit [Remote host closed the connection]
<mantas322> thats genius Nilium
<Nilium> You should remove the to_a from that.
<mantas322> thank you
<Nilium> It's useless.
smathieu has quit [Remote host closed the connection]
<mantas322> wow
iliketurtles has quit [Quit: zzzzz…..]
<mantas322> 1 more mini question
clintnewsom has joined #ruby
<Nilium> Just keep in mind that for really large arrays, that might be somewhat expensive. That said, unless you need to do it many times in a 16ms window where you've got a lot of other expensive things to do, you're probably fine.
<robert_> For some reason, I'm unable to parse @@ header from my DATA section.. anyone have any ideas? :/ http://codepad.org/onEsvn1F
<mantas322> can I chain in a max limit into this [1,2,3].repeated_permutation(2).map { |a, b| a + b }.uniq!
TheNotary has joined #ruby
<mantas322> <6
vikhyat has quit [Remote host closed the connection]
* Eiam looks up repeated_permutation
clintnewsom has quit [Client Quit]
<Nilium> Array#repeated_permutation, if that helps
<mantas322> this is great, thank you.
<Nilium> As for the clamping thing, you could just select for it.
<Eiam> Nilium: thats pretty sick =)
g0bl1n has quit [Ping timeout: 240 seconds]
<Nilium> You kind of have to wonder how often a repeated permutation came up for someone to add it to Array
iliketurtles has joined #ruby
n_blownapart has joined #ruby
g0bl1n has joined #ruby
intuxicated has quit [Quit: Leaving]
wu_lmao has quit [Ping timeout: 268 seconds]
cha1tanya has quit [Quit: cha1tanya]
TIJ has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
michael_mbp is now known as zz_michael_mbp
brunoro has joined #ruby
zz_michael_mbp is now known as michael_mbp
huoxito has joined #ruby
arya_ has quit []
LucidDreamZzZz has quit [Remote host closed the connection]
<wald0> im reading the pick's axe book, but i dont like it so much, it lacks some examples and better ways to explain pieces of code, is there any suggested better one ?
<wald0> book, i mean
gustavn has joined #ruby
arya_ has joined #ruby
_reset has quit [Quit: Leaving...]
jimi_ has joined #ruby
LucidDreamZzZz has joined #ruby
<n_blownapart> I really liked the Well Grounder Rubyist wald0 (david black)
<Nilium> The only book I've read is why's, and that was more out of curiosity after already learning Ruby
<n_blownapart> Well - *Grounded
<Nilium> Granted I'm not sure what skill level pick's axe is for.
sunsh1ne is now known as invsblduck
invsblduck has quit [Changing host]
invsblduck has joined #ruby
michaeldeol has quit [Remote host closed the connection]
<n_blownapart> Nilium: wald0 try well grounded rubyist 1.9.1
sqd_ has quit [Quit: sqd_]
Tricon has joined #ruby
<Nilium> Is it aimed at people using Rails?
<mantas322> okay, thanks again Nilium. bye
brunoro has quit [Ping timeout: 246 seconds]
mantas322 has left #ruby [#ruby]
g0bl1n has quit [Ping timeout: 240 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
<goleldar> what do you guys think of scala
<sam113101_> what do YOU think of it?
<goleldar> i dont know too much about it other than it is a supposedly employs the best of ruby and java and twitter seems to be embracing it
<goleldar> indeed doesn't show many results for scala so i am guessing it is still gaining traction
devoldmx has joined #ruby
louism2__ has quit [Quit: Leaving]
bondar has joined #ruby
bondar has quit [Excess Flood]
bondar has joined #ruby
bondar has quit [Excess Flood]
<Nilium> My policy is it's JVM, so screw it.
<n_blownapart> Nilium: Manning Publishers publish it: they also have a book out on rails 4 by Yehuda Katz that is in digital format only but was highly recommended by sanFrancisco meetup group for rails.
<Nilium> ← Not a rails person.
sambao21 has quit [Quit: Computer has gone to sleep.]
devoldmx3 has quit [Ping timeout: 240 seconds]
ColKurtz has joined #ruby
<Nilium> My only interest in Rails is whether it's consumed Ruby's image to the point that people can't disassociate the two.
<n_blownapart> sorry Nilium thought you were asking
bondar has joined #ruby
michaeldeol has joined #ruby
<Nilium> I don't think it has, yet.
bondar has quit [Excess Flood]
bondar has joined #ruby
bondar has quit [Excess Flood]
<Eiam> Nilium: hey I don't use rails either =)
<Eiam> but rails is what brought me to ruby first soo..
bondar has joined #ruby
bondar has quit [Client Quit]
* Nilium high-fives Eiam
<n_blownapart> Nilium: I'm beginning programming I liked the manning book WGR by david black wald0 ^^
<Eiam> I have one app still being served off rails but its vestigial, I use sinatra/padrino now
<Nilium> OpenGL brought me to years ago
radic_ has quit [Quit: Verlassend]
<Nilium> *to Ruby
<Nilium> And lately I've been trying to make Ruby and OpenGL play nice together again.
radic has joined #ruby
Neomex has joined #ruby
ewag has quit [Remote host closed the connection]
<Eiam> rails is "too much" for me. that you can have some tutorial video for "setup a blog in 5 minutes using rails! with auth and users and all this cool stuff!" should indicate just how MUCH of a bag you get when you use rails
<Eiam> for some people thats great and I can totally see the advantages there.
<Nilium> I think it's probably useful but I just have no interest in web dev stuff.
mocfive has quit [Remote host closed the connection]
Neomex has quit [Client Quit]
<Nilium> It's quite possibly the most boring subject I can think of.
<Nilium> For me, that is, it's perfectly fine if other people love it.
<Eiam> Nilium: yeah.. I too hate web dev, but I'm forced to do it so, oh well
<Eiam> if I could write ruby in the browser, I would
<Nilium> Though I will still take constant jabs at web developers for their silliness.
<thenj> reparations
<thenj> for slavery
<Nilium> It'd be nice if JS was replaced with Ruby.
<Nilium> Would probably be slower and such, but nice.
<C0deMaver1ck> try Dart maybe?
<C0deMaver1ck> still JavaScriptish
<Eiam> because it has not had rooms full of PhD's micro optimizing the shit out of it
<C0deMaver1ck> but nicer
<mjc_> Nilium: decaf
<Nilium> Though if you got Google behind optimizing the hell out of Ruby, performance would probably improve a hell of a lot
<Eiam> ^
<Nilium> I'll have to look at that
* mjc_ runs
<ChristianS> dart is ugly imho, hardly better than js (if at all)
<C0deMaver1ck> now that's cool
<Nilium> I could dig this for writing tools
<C0deMaver1ck> somebody needs to spin off a fork of Chromium with decaf as the engine
<mjc_> it's a heavily modified browser and only works on OSX
<Nilium> I wonder how in sync it is with Webkit
bondar has joined #ruby
<Tricon> I like Go as well.
bondar has quit [Excess Flood]
timonv has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
teddyp1cker has quit [Read error: Connection reset by peer]
<Tricon> PNaCL is where I hope everything heads.
<ChristianS> go is badly designed (no exceptions is worst), google sucks at language design
teddyp1cker has joined #ruby
<C0deMaver1ck> no exceptions?
<C0deMaver1ck> wtf
<Tricon> C/C++/Obj-C/Ruby are my langs of choice these days, though.
timonv has quit [Read error: No route to host]
<Tricon> I wish JS would die a fiery death.
<ChristianS> C0deMaver1ck: makes for a realy c-ish workflow
sayan has joined #ruby
* Nilium high-fives Tricon for having his same favorite languages.
* Tricon high-fives Nilium back: BROGRAMMERS!
* Nilium washes his hand of Tricon's sin.
<Tricon> Haha.
<Nilium> So, yeah, nevermind, burn the witch.
<Tricon> You traitor!
<C0deMaver1ck> I read a tweet said something along the lines of "Need a totem, to determine what is real and what is a dream. I'm so deep in nested callbacks"
<wald0> n_blownapart: you think that this "well grounded" is a better option than the pick's axe?
<Nilium> I worry that some people do actually take the brogrammer thing seriously.
<Nilium> Because some people do.
<Tricon> C0deMaver1ck: That is great.
<Nilium> And it scares the hell out of me.
bondar has joined #ruby
sambao21 has joined #ruby
<Tricon> Nilium: I have never met an actual brogrammer.
bondar has quit [Excess Flood]
<C0deMaver1ck> Tricon: it's a said reality
<C0deMaver1ck> brah, I'm a brogrammer brah
allsystemsarego_ has quit [Quit: Leaving]
S0da has joined #ruby
<Nilium> At any rate, it's fun that I can now use Ruby for game dev, sort of.
<Nilium> Again.
<n_blownapart> to begin ruby yes but I'm a beginner to programming. just get two or three books. david black writes *very* well
<Nilium> Worked eons ago in 1.8.7 and then sort of died in 1.9.x and now I gots it working again so coolbeans.
<Nilium> I should eat something.
<n_blownapart> wald0: ^^
<RubyPanther> In the case of Ruby, we have multiple (unrestricted, even!) return types, and yet we also have exceptions. So we're free to abuse both styles.
flaccid has quit [Ping timeout: 256 seconds]
<C0deMaver1ck> we
<Nilium> I wonder if decaf works with gems at all
<C0deMaver1ck> we're also free to monkey patch too :p
michael_mbp is now known as zz_michael_mbp
bondar has joined #ruby
<RubyPanther> yeah, lots of people hire monkeys to eat the exception, and return an error object instead.
bondar has quit [Excess Flood]
* C0deMaver1ck patches Array.length
burz has joined #ruby
mikewintermute has joined #ruby
<Tricon> Anyone that begins an attack on a language because of the patterns _available_ has already missed the point: It's how you use them that matters. It is not evil because they do or do not exist.
<C0deMaver1ck> except PHP
wolcanus has quit [Remote host closed the connection]
<Nilium> Or Perl.
<C0deMaver1ck> always hate PHP based on the patterns
<Nilium> Always hate Perl for barewords.
jeffreylevesque has joined #ruby
<Tricon> PHP is poorly designed, that's true; but it's also evil because of the community.
<Nilium> Even though you can do barewords in Ruby.
<Nilium> Just.. not without a lot of evil.
<C0deMaver1ck> the community is mostly blind to it's own evil though
<Nilium> Or a little evil.
<RubyPanther> And if catching all exceptions and passing error objects to the front end instead is sooooo good, as nearly all Ruby code does that is considered quality... it makes me wonder if we love exceptions as much as we claim to, or if they are just part of our unix heritage, one of our legacy patterns
<C0deMaver1ck> I got into programming by learning PHP when I was 15
<C0deMaver1ck> when I figured out it was crappy, I moved on
<Kelet> Nilium, What do you use for game dev?
<Nilium> Kelet: Primarily C++.
<C0deMaver1ck> rubygame gem maybe?
<RubyPanther> it seems go actually skips ahead and forces doing things in a way that is actually quite close to what Rubyists end up with, even if we have exceptions under the hood
samuel02 has joined #ruby
<Nilium> For Ruby game dev stuff, I use opengl-core, snow-math, and glfw3.
<C0deMaver1ck> ouu fun stuff
<Nilium> All of which I wrote. Because I can.
ntus1017 has quit [Remote host closed the connection]
S0da has quit [Ping timeout: 248 seconds]
<Nilium> Footnote on GLFW3: I wrote the bindings, not GLFW 3 itself.
<Kelet> It's too bad there's really no high-level framework like pygame for ruby that can work on 2.0.0/is regularly updated AFAIK
<Tricon> That's rad.
bondar has joined #ruby
bondar has quit [Excess Flood]
<Tricon> Honestly, I don't want a game in a language that does not allow me to manage memory.
<Nilium> https://github.com/nilium/ruby-glfw3 ← See that for an example thingy
<wald0> Nilium: do you know any exmaple of ruby game ? i would like to see how it plays a game made on ruby
<Nilium> Tricon: Incidentally, I also wrote a gem that lets you manage memory.
clintnewsom has joined #ruby
<Nilium> Because I'm horribly evil.
<Tricon> I would love it if I could disable Ruby's GC and do mallocs (YES, I know this is a huge oversimplification and would require MAJOR changes and different idioms).
<Nilium> Now that would be harder to do.
<Tricon> Yes.
<C0deMaver1ck> Nilium: so you're writing C with Ruby syntax? :p
<Nilium> You could probably implement it using reference counting, though.
<C0deMaver1ck> managing memory and everything else
<Nilium> C0deMaver1ck: I only use the memory stuff for C interop, really.
<RubyPanther> Tricon: That is what the C API is for, and yes, you can manage your own memory
<Kelet> It's not Ruby, but you can do mallocs and get extremely fast performance with http://crystal-lang.org/ which is almost Ruby (although not exactly in stable yet)
whowantstolivefo has quit [Quit: quit]
<Kelet> Seems interesting though
<RubyPanther> You can also disable GC but that is almost always the wrong thing to do
<Tricon> I love that all of these languages are popping up. I'm all about embracing the best tool for the job.
<Tricon> RubyPanther: Yeah, I know you can change the GC time and even turn it off.
reset has joined #ruby
<Nilium> In general, GC and such isn't really going to be the bottleneck for Ruby performance
<mjc_> depends on how much free RAM you have
<Tricon> mjc_: Exactly.
<RubyPanther> It is very rare that the language used has anything to do with what the "best tool" for a job is, except where "best" includes personal fluency
<Tricon> But Nilium's right in that it isn't the _core_ problem.
<Nilium> Math in Ruby, for example, is enormously slow.
<Tricon> RubyPanther: I agree with that sentiment as well; though I wouldn't use the same language for everything, even if I were completely fluent in it.
<RubyPanther> Math in Ruby is not slow.
<Nilium> Compared to C, that is.
ehaliewicz has joined #ruby
wolcanus has joined #ruby
<wald0> is there any "reference of ruby" that covers the language, syntax, etc... but without going deep in a manual of hundreds of pages ? something summarized in let's say 10-20 pages
<RubyPanther> I made a gem that wraps IBM's implementation of IEEE dec_number, and it is somewhat slower than using Ruby's BigDecimal. And cut all the corners I could.
<Nilium> RubyPanther: Multiplying 4x4 matrices in Ruby is about 7x slower than multiplying them in C for me. That's significant enough for me.
<mjc_> http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/ has a great section on garbage collection in general
<Nilium> Granted, I'm using floats, not BigDecimal and such.
<RubyPanther> wald0: yeah, the "pickaxe" book does that first, and goes into detail in later chapters.
awarner_ has joined #ruby
<wald0> RubyPanther: i already readed that "ruby.new" chapter, but it looked a bit basic to me
<RubyPanther> multiplying matrices in a high level language layer is silly. IMO the "Ruby way" to do that is in C with a Ruby interface.
<Nilium> Which is what I did. Because doing it in Ruby is very slow.
<RubyPanther> Right, so doing it in Ruby is the _same_speed_ as C.
<Tricon> ...
BRMatt has quit [Ping timeout: 268 seconds]
<RubyPanther> Just like, most of Ruby is... C.
AndChat| has quit [Ping timeout: 246 seconds]
Squarepy has quit [Quit: Leaving]
<Nilium> I think you're missing the point of what I'm saying there. I'm not saying you can't do it fast while still using Ruby, because you can obviously drop down to C.
<Nilium> The point is that a pure ruby implementation of a 4x4 matrix multiplication is slow.
<RubyPanther> You're missing that I'm saying that using Ruby via the C API _is_still_Ruby_
<Nilium> No, I get that, but you're arguing something away from the point
<RubyPanther> half the gems I install are written in C, they're certainly Ruby gems, not C libs.
baroquebobcat has quit [Quit: baroquebobcat]
chriskk has quit [Remote host closed the connection]
<wald0> this ref looks very good http://zenspider.com/Languages/Ruby/QuickRef.html
<Tricon> Yeah. Calling the C API to perform a permutation is not the same as executing said permutation in pure Ruby.
<RubyPanther> Ruby isn't supposed to be "pure," if it was it would be self-hosting.
awarner has quit [Ping timeout: 241 seconds]
lkba has joined #ruby
<Nilium> Forget it.
mercwithamouth has quit [Ping timeout: 240 seconds]
colonolGron has joined #ruby
byprdct has quit [Quit: Textual IRC Client: www.textualapp.com]
byprdct has joined #ruby
byprdct has quit [Client Quit]
fmcgeough has quit [Quit: fmcgeough]
axeman- has joined #ruby
<RubyPanther> It is tight loops and object creation that Ruby is slow at, not math. Most of the math is _already_ written in C. However slow Ruby is at the math, blame C.
reset has quit [Ping timeout: 248 seconds]
Ry0_ has quit [Remote host closed the connection]
<wald0> mmh, this reference also looks good http://www.tutorialspoint.com/ruby/ruby_quick_guide.htm
<Nilium> My guess is that the performance of math in ruby is mostly due to function calls and such.
maxfilipovich has quit [Ping timeout: 260 seconds]
<Nilium> That said, I've not looked at MRI's source, so I can't say with any certainty what exactly the performance issue is there.
n_blownapart has quit [Remote host closed the connection]
S0da has joined #ruby
<RubyPanther> But Ruby _isn't_ slow at math! You describe tight loops with lots of temp values, the math can be instant and the total operation can still be slow.
jorge__ has joined #ruby
MrPoT4tO has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
havenwood has quit [Remote host closed the connection]
<Nilium> Ok, Ruby isn't slow at math, but the way the primitive types are implemented leads to slow math. Would that be more accurate for you?
havenwood has joined #ruby
finges has quit [Quit: WeeChat 0.4.1]
<wald0> how good is the book "ruby best practices" ?
devoldmx has joined #ruby
finges has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RubyPanther> No, because in the end we don't have slow math. Nothing leads to it because it is not the case. We do have slow object creation and a lot of error checking.
rodacato has joined #ruby
<Nilium> Ok, so let's say you do float * float in Ruby. Is that the same speed as float * float in C?
<Nilium> If you say yes, you're wrong.
jorge__ has quit [Ping timeout: 256 seconds]
dsabanin has quit [Quit: Leaving...]
<Nilium> And let's not get hung up on the "well it's implemented in C" thing 'cause I think that's missing the point.
rodacato has quit [Remote host closed the connection]
<Nilium> If f * f is slow because of object creation and so on, then Ruby math is slow. That's my point.
havenwood has quit [Read error: Connection reset by peer]
halogenandtoast has joined #ruby
<halogenandtoast> So probably an odd question, but what's something someone would like a book written about in the domain of ruby that doesn't currently exist?
<Nilium> If you want to argue that the issue isn't math is slow but that the things math leads to is slow, then I think we both agree on where the performance goes and only disagree on whether it means math is slow
<RubyPanther> No, if you have a bottleneck in object creation and you're blaming slow math, that is just you making a mistake and blaming the wrong thing.
<Nilium> I'm not blaming slow math, I'm saying math is slow because X.
vlad_starkov has joined #ruby
<RubyPanther> It is like saying that Ruby is slow at controlling rockets, based on writing a rocket control program in Ruby and having a bottleneck in object creation.
<Nilium> I think we're just misunderstanding each other here.
<interactionjaxsn> halogenandtoast: writing dsl's or is there a book already for that?
dash_ has joined #ruby
sqd_ has joined #ruby
seich- has quit [Ping timeout: 240 seconds]
cj3kim has joined #ruby
<halogenandtoast> interactionjaxsn: probably metaprogramming ruby covers a bit of that.
TheNotary has quit [Ping timeout: 246 seconds]
bradhe has joined #ruby
<halogenandtoast> But it might be worth exploring further.
<halogenandtoast> Although I once gave a lightning talk that using metaprogramming in ruby does not mean you've written a dsl
apeiros has quit [Remote host closed the connection]
<interactionjaxsn> halogenandtoast: I'd read it... also are you familiar with the little scheemer book http://www.amazon.com/The-Little-Schemer-4th-Edition/dp/0262560992
<interactionjaxsn> would be awesome for a ruby flavored one
<halogenandtoast> Familiar with it, I haven't read it.
apeiros has joined #ruby
<interactionjaxsn> halogenandtoast: so you know where i'm coming from
seich- has joined #ruby
reset has joined #ruby
bigkevmcd has quit [Quit: outta here]
dankest has joined #ruby
baroquebobcat has joined #ruby
jlast has quit [Remote host closed the connection]
<RubyPanther> DSL is too fuzzy a word to claim things are or are not a DSL
digitalcake has quit [Quit: Leaving.]
bradhe has quit [Ping timeout: 268 seconds]
wolcanus has quit [Remote host closed the connection]
smathieu has joined #ruby
bradhe has joined #ruby
<RubyPanther> The problem with writing such a book IMO is that most Ruby people treat DSL as a synonym for an API that uses a domain-specific glossary
Deele has quit [Ping timeout: 240 seconds]
<interactionjaxsn> would rpsec qualify as an API that uses a domain-specific glossary?
timonv has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
wchun has joined #ruby
rodacato has joined #ruby
<RubyPanther> interactionjaxsn: yeah, the R gives it away
timonv has quit [Read error: Operation timed out]
TheNotary has joined #ruby
<Kelet> Someone on the internet described it as the difference between internal and external DSLs
pitzips has quit [Remote host closed the connection]
<Kelet> seems reasonable
sayan has quit [Ping timeout: 246 seconds]
peret has joined #ruby
jsteiner has joined #ruby
geggam has quit [Remote host closed the connection]
tonini has quit [Remote host closed the connection]
tonini has joined #ruby
jsteiner has left #ruby [#ruby]
sailias has quit [Quit: Leaving.]
S0da has quit [Remote host closed the connection]
<RubyPanther> all the DSLs that are clearly DSLs and are without dispute are the external ones... the internal ones are just a subset of API, and are DSLs only if people call them that
Davey has joined #ruby
reset has quit [Quit: Leaving...]
thibauts has quit [Ping timeout: 248 seconds]
axeman- has quit [Remote host closed the connection]
<halogenandtoast> RubyPanther: Here's a talk I did along time ago
DeanH has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<halogenandtoast> You may like it
burz has quit [Remote host closed the connection]
<halogenandtoast> It's short
<RubyPanther> Just by the title I can assume I'll love it or hate it lol
clintnewsom has quit [Quit: clintnewsom]
dhruvasagar has joined #ruby
<Nilium> I should watch this.
<Nilium> Though if you come out with black square-rim glasses I will shun you for life.
<halogenandtoast> You don't get to see me.
<Nilium> Yay slides.
<Nilium> The best format.
<halogenandtoast> I almost did my last talk without them.
thibauts has joined #ruby
<Nilium> I've only ever used slides when I was required to.
hatzopoulos has joined #ruby
<halogenandtoast> I was going to try to live fold origami while giving my talk, I decided that it would be both distracting and difficult.
<halogenandtoast> for the record: I gave that talk a long time ago.
<Nilium> Well, 2 minutes in-ish and at least I can say you're a good speaker
ukd1 has joined #ruby
<halogenandtoast> Because I didn't say um or like?
<Nilium> You probably did, you're just not boring and you keep to the point.
Ripp__ has joined #ruby
<halogenandtoast> Yeah, I even forgot to introduce myself.
rodacato has quit [Remote host closed the connection]
<Nilium> It's a compliment just take it and be happy grr
<halogenandtoast> Yes thank you. :D
dsabanin has joined #ruby
manutter has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
BlakeRG has quit [Quit: BlakeRG]
rodacato has joined #ruby
jrendell has joined #ruby
<RubyPanther> Uncle Bob spends 2 minutes in the middle distracted playing with the laser pointers... if he didn't have interesting stuff to say his talk would suck instead of being great lol
danshultz has quit [Remote host closed the connection]
locriani has quit [Ping timeout: 240 seconds]
wmoxam has quit [Quit: leaving]
p0wn3d has quit [Remote host closed the connection]
reset has joined #ruby
ukd1 has quit [Remote host closed the connection]
ukd1 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
cantonic has joined #ruby
dsabanin has quit [Ping timeout: 268 seconds]
paskotyy has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
viszu has joined #ruby
sayan has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
TheBay has joined #ruby
interactionjaxsn has joined #ruby
TheBay is now known as Mathias__
krisfremen-home has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
ldnunes has quit [Quit: Leaving]
krz has joined #ruby
interactionjaxsn has quit [Ping timeout: 240 seconds]
mikewintermute has quit [Quit: mikewintermute]
<sn0wb1rdz> Is it possible get live code update inside a IRB session?
digitalcake has joined #ruby
<mjc_> sn0wb1rdz: pry can do that, not sure about irb
<sn0wb1rdz> mjc_ I'll give that a shot
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
jonahR has quit [Quit: jonahR]
Kar- has quit [Remote host closed the connection]
BRMatt has joined #ruby
<mjc_> sn0wb1rdz: pry also has a ton of other great features, highly recommended
krisfremen-home has joined #ruby
<sn0wb1rdz> mjc_ I use IRB on a regular basis. If pry has more features, I think it is time to switch
burlyscudd has joined #ruby
alem0lars has quit [Quit: Leaving]
RORgasm_ has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby
RORgasm has joined #ruby
<RubyPanther> halogenandtoast: love it! lol
<halogenandtoast> RubyPanther: ha thanks.
dsabanin has joined #ruby
<londerson> Hello guys i need know how i can create an Rack app, without config.ru file
burlyscudd has quit [Client Quit]
<londerson> any idea?
BlakeRG has joined #ruby
gustavn has quit [Read error: Connection reset by peer]
mocfive_ has joined #ruby
xcv has joined #ruby
morf_ has joined #ruby
cads has joined #ruby
postmodern has joined #ruby
Nisstyre has joined #ruby
sayan has quit [Read error: Connection reset by peer]
<mjc_> londerson: why would you need that?
blueOxigen has joined #ruby
Columcille has quit [Ping timeout: 245 seconds]
<mjc_> londerson: don't private message me, people here might benefit
<londerson> ok
<londerson> and i see another codes, and frameworks, the guys don use config.ru in your projects
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
teddyp1cker has quit [Remote host closed the connection]
asobrasil has left #ruby [#ruby]
<mjc_> that doesn't sound like a reason why you'd need that, though
<londerson> he use something like Rack::Request and Rack::Response
<londerson> well guys for knowledge only
Davey has quit [Quit: Computer has gone to sleep.]
bluOxigen has quit [Ping timeout: 268 seconds]
Columcille has joined #ruby
bluOxigen has joined #ruby
blueOxigen has quit [Ping timeout: 240 seconds]
jorge__ has joined #ruby
<mjc_> class App; def call(env); [200, {"Content-Type" => "text/html"}, "Hello, World!"]; end; end; Rack::Handler::WEBrick.run(App.new, :Port => 9292)
hammond has quit [Read error: Operation timed out]
Villadelfia has quit [Ping timeout: 240 seconds]
hammond has joined #ruby
`p has joined #ruby
<londerson> tanx
Squarepy has joined #ruby
kirun has quit [Quit: Client exiting]
maxmanders has joined #ruby
trepidaciousMBR has quit [Quit: trepidaciousMBR]
krz has quit [Quit: krz]
Dekade has joined #ruby
cpruitt has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
jorge__ has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
beingjohnm has joined #ruby
ravster has joined #ruby
Villadelfia has joined #ruby
grainol has quit [Ping timeout: 248 seconds]
blueOxigen has joined #ruby
Dekade has quit [Read error: Connection reset by peer]
kofno has quit [Remote host closed the connection]
zacts has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
cj3kim has quit [Read error: Connection reset by peer]
mikewintermute has joined #ruby
cj3kim has joined #ruby
Meatant has joined #ruby
bluOxigen has quit [Ping timeout: 276 seconds]
locriani has joined #ruby
jerius has quit [Quit: jerius]
bluOxigen has joined #ruby
digitalcake has quit [Quit: Leaving.]
digitalcake has joined #ruby
BillCriswell has quit [Remote host closed the connection]
mocfive_ has quit [Remote host closed the connection]
saarinen has joined #ruby
Ripp__ has quit [Quit: This computer has gone to sleep]
sepp2k has quit [Quit: Leaving.]
blueOxigen has quit [Ping timeout: 276 seconds]
TheNotary has quit [Quit: Leaving]
atyz has quit [Quit: Leaving...]
dsabanin has quit [Quit: Leaving...]
tonini has quit [Remote host closed the connection]
iliketurtles has quit [Quit: zzzzz…..]
skaczor has quit [Ping timeout: 245 seconds]
<beingjohnm> anybody have any experience with the Asana gem?
<beingjohnm> I've got a total newbie question
iliketurtles has joined #ruby
rgfx has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
<rgfx> Hello, does localtunnel work?
<rgfx> I did the setup right, but it never connects, just wondering if its down, or any suggestion of what I could do, or new services to try.
orangerobot has joined #ruby
<orangerobot> i'm trying to include a module so that i don't need to type in the full module path every time i use a method, but I keep getting "uninitialized constant Selenium::Client" even though I have required the needed gem
mikewintermute has quit [Quit: mikewintermute]
v0n has quit [Ping timeout: 246 seconds]
<orangerobot> and i'm pretty sure that Selenium::Client::Idiomatic is a module
dash_ has quit [Quit: Time to beer :)]
<orangerobot> am i missing something obvious here? this is how I've included it: include Selenium::Client::Idiomatic
forrest has quit [Quit: Leaving]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Davey has joined #ruby
tbrock has quit [Quit: Textual IRC Client: www.textualapp.com]
MrThePlague has quit [Remote host closed the connection]
mengu has joined #ruby
Ripp__ has joined #ruby
digitalcake has quit [Quit: Leaving.]
reset has quit [Quit: Leaving...]
awc737 has joined #ruby
halogenandtoast has quit [Quit: halogenandtoast]
colonolGron has quit [Quit: ciao ciao]
BRMatt has quit [Read error: Operation timed out]
bluOxigen has quit [Read error: Connection reset by peer]
<Nilium> As far as String#to_sym and #intern go, does anyone have a reason for preferring one over the other that isn't down to style?
lindenle has quit [Quit: This computer has gone to sleep]
bluOxigen has joined #ruby
devoldmx3 has joined #ruby
<DylanJ> Nilium: i know what to_sym does by the methods name.
<DylanJ> #intern.. not so much.
<Nilium> I guess intern would only make sense if you knew ahead of time what it did or knew the Ruby C API.
<Eiam> yeah, to_sym = least surprise
mikewintermute has joined #ruby
<DylanJ> yeah. and since i never use the ruby c api i had to try .intern in irb to find out what it did
<Nilium> I should go swap out intern in my code for to_sym then.
baordog has quit [Remote host closed the connection]
<Nilium> There is one other reason I know of, that being that Symbol doesn't actually implement to_sym in 1.8.7, but that's not important
devoldmx has quit [Ping timeout: 241 seconds]
<blitz> can we ask rails specific questions in here
<DylanJ> blitz: #rubyonrails is a channel :>
<Nilium> You might get better results from th- yeah.
<DylanJ> blitz: #rails is a terrible channel though. dont ever try that one.
<Nilium> It's for drug users.
<blitz> lol ok thanks
cmarques has quit [Ping timeout: 264 seconds]
<Nilium> I think it's time for more Borderlands 2
mansi_ has quit [Remote host closed the connection]
zeroXten has joined #ruby
mikewintermute has quit [Client Quit]
theRoUS has quit [Ping timeout: 260 seconds]
<zeroXten> heya, I'm having trouble deduping some code. Any suggestions? http://pastebin.com/VCiVq3kr
otherj has joined #ruby
atyz has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Ping timeout: 240 seconds]
`p has quit [Remote host closed the connection]
<Nilium> Make a module and extend/include?
<Nilium> Or modules.
<zeroXten> i tried that, one sec
vlad_starkov has joined #ruby
ffranz has quit [Ping timeout: 246 seconds]
alainus has joined #ruby
<zeroXten> i lose visibility of the list method
<Mon_Ouie> Are you sure you want to keep a list of all instances? It smells bad design and will prevent any instance from EVER being garbage collected
<alainus> say I want to make a small application, really small. That opens a server, and responds to a particular request. I find rails much too large for this. What's an alternative
<alainus> ?
<zeroXten> i'm playing with writing a DSL to get my head around ruby meta programming
<zeroXten> having all instances loaded is pretty much to be expected
<Nilium> alainus: Sinatra maybe? (not sure haven't used it myself), zeromq, other thingies
reset has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
fernandoaleman has quit [Quit: Leaving.]
mneorr has quit [Remote host closed the connection]
cj3kim has joined #ruby
renderful has joined #ruby
BlakeRG has quit [Quit: BlakeRG]
mneorr has joined #ruby
havenwood has joined #ruby
jimi_ has left #ruby ["Leaving"]
<zeroXten> and I can't move the list into a class because i'd lose @@instances
locriani has quit [Remote host closed the connection]
locriani has joined #ruby
paskotyy has quit []
huoxito has quit [Quit: Leaving]
romdi`` has joined #ruby
bradhe has joined #ruby
mneorr has quit [Ping timeout: 248 seconds]
renderful has quit [Ping timeout: 276 seconds]
enebo has quit [Quit: enebo]
<Eiam> alainus: netcat? =)
<Eiam> alainus: otherwise, sinatra =) I run sinatra instances out of a single file quite regularly.
<Eiam> one or two routes, maybe a class maybe not, done.
<alainus> great, thanks
<Eiam> netcat == nc on OS X
<Eiam> NAME
<Eiam> nc -- arbitrary TCP and UDP connections and listens
romdi` has quit [Ping timeout: 276 seconds]
hakunin has quit [Remote host closed the connection]
thepumpkin has quit [Remote host closed the connection]
ffranz has joined #ruby
hakunin has joined #ruby
lindenle has joined #ruby
TheRealPygo is now known as pygospa
atno has quit [Remote host closed the connection]
rodacato has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 248 seconds]
tobyo1 has quit [Ping timeout: 240 seconds]
reset has quit [Quit: Leaving...]
rodacato has joined #ruby
brunoro has joined #ruby
hakunin has quit [Ping timeout: 256 seconds]
jorge_ has joined #ruby
reset has joined #ruby
Krajsnick has joined #ruby
s00pcan has joined #ruby
rien has joined #ruby
<rien> folks, what is wrong here, I run gem install bundler, it installs fine, but it doesn't get me the executable bundle
<rien> I've googled to no end, no one has this issue
bradhe has joined #ruby
<DylanJ> rien: are you using rvm, rbenv, ruby from your distro(linux), ruby from brew/macports ( is that a thing? )
bradhe has quit [Remote host closed the connection]
<beingjohnm> rien: I'm a complete newbie but when you run 'which bundle' what does it show?
<DylanJ> probably "not found"
bradhe has joined #ruby
<atmosx> which
terrellt has quit [Ping timeout: 256 seconds]
<atmosx> bundle
rodacato has quit [Ping timeout: 240 seconds]
dankest has quit [Read error: Connection reset by peer]
pedestrian has quit [Quit: pedestrian]
dankest has joined #ruby
brunoro has quit [Ping timeout: 256 seconds]
<Eiam> which bundle
jorge_ has quit [Ping timeout: 256 seconds]
<Eiam> /Users/Eiam/.rvm/gems/ruby-2.0.0-p247@global/bin/bundle
<DylanJ> >_>
<atmosx> p247
<atmosx> hm
rodacato has joined #ruby
grainol has joined #ruby
<rien> it shows command not found
<rien> I'm not using any ruby manager
<rien> they're installed in the system but right now I'm installing ruby 2 manually at /opt/ruby2
wsterling has quit [Remote host closed the connection]
<rien> which gem, which ruby, all return the right one from /opt/ruby2/bin
dEPy has quit [Remote host closed the connection]
<DylanJ> remove the rvm stuff in your .bashrc
<rien> I can't find the bundle executable for the life of me, but weirdly when I do gem uninstall bundler, it says "do you want to remove the executable as well?" but the f$Kcer doesn't tell me where that is
<rien> I think it's hallucinating
<rien> DylanJ: will try
cj3kim has quit [Remote host closed the connection]
<Eiam> atmosx: what is that old?
<Eiam> i thought i just installed this ruby like.. 4 days ago or something
Liothen has joined #ruby
<DylanJ> 247 is the latest
bradhe has quit [Remote host closed the connection]
<Eiam> rien: okay, well if its installed in /opt/ruby you probably don't have it in your path
<Eiam> rien: look at echo $PATH and see if /opt/ is in your path
<Eiam> also use brew macports sucks =)
mary5030 has quit [Ping timeout: 268 seconds]
bradhe has joined #ruby
<DylanJ> i dont use either.
* DylanJ runs linux like a real person
<rien> DylanJ: no go, "/usr/bin/which: no bundle in (/opt/ruby2/bin/... ".
<Eiam> okay dysfunctional person got it.
cj3kim has joined #ruby
<rien> Eiam: I have it in my path :)
<DylanJ> :>
<rien> Eiam: I've installed ruby 2 on tens of machines
<rien> never had this weird problem where the bundler gem installs without errors but doesn't bring the executable
<Eiam> rien: linux has apt and other package managers anyway so the jab was irrelevant =p
cpruitt has quit [Quit: cpruitt]
kofno has joined #ruby
<DylanJ> you should really never install ruby from a package manager
<DylanJ> it's usually out of date and weird.
maycon has joined #ruby
maycon has joined #ruby
maycon has quit [Changing host]
<Eiam> DylanJ: dvm downloads & installs it for you..
<Eiam> rvm
<rien> DylanJ: trust me I'm the one who convinced everyone here to uninstall this rvm virus from all our machines
<DylanJ> yeah
<DylanJ> i use rvm
<Eiam> DylanJ: its not pre-packaged usually...
ChristianS has quit [Excess Flood]
<Eiam> rien: eh, okay, I have run into one problem with RVM
<Eiam> where it was breaking passenger
ChristianS has joined #ruby
<Eiam> beyond that, no complaints.
<rien> well the thing is, instead of using rvm or any other system, I simply install my rubies at different /opt/ folders
<rien> it's so simple
<rien> then it just works and I don't have to deal with yet another program
<DylanJ> rien:
<rien> just pass --prefix=/opt/something when you do ./configure when you're compiling a ruby
<Eiam> except for how its not working right now
<rien> Eiam: but it worked on 16 machines before that :)
<DylanJ> see if there's a /opt/ruby/gems/bin or something similar
<DylanJ> and add that to your PATH
Davey has quit [Quit: Computer has gone to sleep.]
<havenwood> I think ruby-install with chruby is a nice balance of light and functional.
<rien> DylanJ: ok will do (there is)
rypervenche has joined #ruby
<rypervenche> Is it a better idea to install ruby gems from my distro's package manager or by using the gem command? And also, is it possible to remove any gem-installed packages easily? For example, all of them in one fell swoop?
bradhe has quit [Ping timeout: 276 seconds]
<rien> DylanJ: YOU WIN
<rien> DylanJ: PATH="/opt/ruby2/bin:/opt/ruby2:/opt/ruby2/lib/ruby/gems/2.0.0/bin:$PATH"
<DylanJ> woohoo
<rien> that did it man
maxmanders has quit [Quit: Computer has gone to sleep.]
kofno has quit [Ping timeout: 276 seconds]
<rien> DylanJ: dude, thanks a lot, really. I never thought of adding that to the path. brownie points for you, and tip of the hat as well.
<DylanJ> np
<havenwood> rypervenche: I'd recommend sticking to the `gem` command for installing gem.
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Kelet> Maybe
<rypervenche> havenwood: All right. I suppose I would do "gem uninstall GEMNAME" to get rid of it?
<Kelet> On arch linux most of the packages for installing gems actually use gem internally but they pass options that are somewhat important
<havenwood> rypervenche: In the upcoming 2.1.0 version of RubyGems there is a new `gem uninstall --all`, but right now `gem uninstall GEMNAME` yeah,.
r0bby is now known as robbyoconnor
<Kelet> For example, Nokogiri is by default built against some old version of libXML and on any modern distro you should pass --use-system-libs or something (cant remember exactly), the package does this for you.
<havenwood> rypervenche: You can clear all your gems with a ruthless: rm -rf $GEM_HOME
<havenwood> rypervenche: Which would delete build_info/, which isn't a preferred thing to do
jibi has quit [Quit: .]
devoldmx3 has quit [Ping timeout: 246 seconds]
lindenle has quit [Quit: This computer has gone to sleep]
Mathias__ has quit [Remote host closed the connection]
brunoro has joined #ruby
<beingjohnm> my stupid question: I have the following and need to get the values of the "name" field. How do I do that?
<beingjohnm> [#<Asana::Workspace:0x00000002b367b0 @attributes={"id"=>5560182413291, "name"=>"Section 9"}, @prefix_options={}, @persisted=true>, #<Asana::Workspace:0x00000002b3e320 @attributes={"id"=>498346170860, "name"=>"Personal Projects"}, @prefix_options={}, @persisted=true>]
michaeldeol has quit [Remote host closed the connection]
<rypervenche> havenwood: All right. Thanks :)
TheBay has joined #ruby
TheBay is now known as Mathias__
michaeldeol has joined #ruby
<waxjar> beingjohnm: with #map :)
michaeldeol has quit [Remote host closed the connection]
<postmodern> beingjohnm, .attributes['name'] ?
mikeg has quit [Remote host closed the connection]
<postmodern> BeanDip, er values[0].attributes['name']
<postmodern> beingjohnm, er values[0].attributes['name']
lethjakman has quit [Ping timeout: 240 seconds]
ffranz has quit [Quit: Leaving]
<beingjohnm> postmodern: thank you!!!
michaeldeol has joined #ruby
<beingjohnm> I was doing various combinations of [:attributes][:name]
<beingjohnm> only my second day with ruby
eldariof has quit [Ping timeout: 276 seconds]
Myconix has quit [Read error: Connection reset by peer]
<postmodern> beingjohnm, if might want to add require 'irb/completion' to your .irbrc, that way you can tab-complete methods on objects
Nisstyre has quit [Quit: Leaving]
rezzack has quit [Quit: Leaving.]
mengu has quit [Quit: This computer has gone to sleep]
Spami has quit [Ping timeout: 240 seconds]
rodacato has quit [Remote host closed the connection]
<beingjohnm> I've been using vim
rupee has quit [Quit: Leaving]
lethjakman has joined #ruby
bdnelson has quit [Quit: Textual IRC Client: www.textualapp.com]
<beingjohnm> Didn't even know about irb
digitalcake has joined #ruby
tobyo1 has joined #ruby
rhys_ has quit [Quit: Leaving]
hakunin has joined #ruby
digitalcake has quit [Read error: Connection reset by peer]
digitalcake has joined #ruby
reset has quit [Quit: Leaving...]
cads has quit [Ping timeout: 248 seconds]
<Mathias__> how to run .rb files with SublimeText 2 ?
<otherj> why would you try to run it from ST2? run it from a shell
<Mathias__> k
r4nd0m1 has quit []
danbeck has quit [Quit: danbeck]
baroquebobcat has joined #ruby
<Spooner> beingjohnm, skip irb and use pry instead ;)
<Eiam> ^ use pry
<Eiam> Im bitter about learning irb first
<Nilium> Hm, didn't know about Pry. Neat.
<beingjohnm> I'll have to check that out
<Eiam> beingjohnm: data.map{|x| x["name"]}
<beingjohnm> Ruby seems to be pretty nice. Getting more done quicker than the other languages I know.
<Eiam> ruby is f'ing awesome
<Mathias__> yep Ruby Rocks!
<beingjohnm> Eiam: I'll read up on map
<Eiam> beingjohnm: you should read up on Array & Enumerable
<Eiam> as those seem to be my largest two working sets of Ruby objects =p
<beingjohnm> Eiam: yeah. I should. I was thinking I was being returned a json object and that wasn't helping my issue.
<Eiam> beingjohnm: it tells you the object being returned
<Eiam> <Asana::Workspace
<Eiam> with an instance variable @attributes
<Eiam> thats a hash with some values
TIJ has quit [Quit: Konversation terminated!]
<Eiam> oh whoops my map command won't work, ha
m8 has quit [Quit: Sto andando via]
TIJ has joined #ruby
<Eiam> whatever its close enough you can figure it out =)
osvico has joined #ruby
<Eiam> beingjohnm: rather, an array of Asana objects =)
<beingjohnm> ahh
Ripp__ has quit [Quit: This computer has gone to sleep]
<beingjohnm> my mind wasn't one level off
<beingjohnm> er, was one level off
<Eiam> well, thinking of a hash as being == json isn't quite safe
<brotatos> The ! operator is actually a function call in ruby. But is it also a function call in other languages like C or php as well?
<DylanJ> brotatos: in C it's an operator AFAIK
<Xeago> brotatos: not entirely sure, in most languages it is an operator
<Xeago> it depends on the language if you can define behavior for operators
<Xeago> (in C# you can for example)
platoscave has joined #ruby
<Xeago> I think in C it has a pre-defined behavior, either spec or compiler
trepidaciousMBR has joined #ruby
reset has joined #ruby
<beingjohnm> IRC is pretty awesome too. Love that there are people that are willing to help me.
<Mathias__> sure
maycon has quit [Quit: Saindo]
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
<Eiam> beingjohnm: for one, in javascript you cannot access an object using dot notation if its key is a number or begins with a space. so {1=>2} is valid ruby. if you to_json that you'll get {"1":2}
<Nilium> There's no operator overloading in C. C++, on the other hand, allows overloading for a specific set of operators.
<Eiam> beingjohnm: so, hash != json
mmitchell has quit [Remote host closed the connection]
<Nilium> Ruby also forbids a few operators from being overloaded as well, last I checked.
<Eiam> Nilium: not all operators..
<Nilium> That's why I said a few.
<Eiam> Nilium: you cannot however overload the = operator, which is a bummer
<Eiam> Nilium: oh, missed that part =)
vlad_starkov has quit [Ping timeout: 240 seconds]
<Eiam> I forgot why I was trying to overload = a few weeks ago, but I was sad to learn it cannot be done
<Nilium> E.g., you can overload ==, but I believe you can't overload !=
<beingjohnm> Eiam: the conversation is starting to drift over my head but I've got the knowledge that I require at this moment. THanks
<Nilium> Probably because it just piggy-backs off of ==
<Eiam> Nilium: != being !(==) probably?
codecop has quit [Remote host closed the connection]
<Nilium> I'm guessing. I can't say for sure since I don't know how it's implemented.
<Nilium> The annoying thing is that you can't overload stuff like += and -= and so on.
<brotatos> Is there an easy way to grab the input from a system call? like system('vim') and then grab the input that the user enters as an entire string?
weeb1e_ has quit [Ping timeout: 248 seconds]
<Nilium> Maybe if you somehow intercepted it before it was provided to the process?
<Nilium> Otherwise, probably not.
<brotatos> I want to set it up a la `git commit`. I want to prompt the user to enter a message where they will do so in vim and then do whatever with the message.
mengu has joined #ruby
weeb1e has joined #ruby
jsatk has quit [Remote host closed the connection]
thenj has quit [Quit: Page closed]
skaczor has joined #ruby
vlad_starkov has joined #ruby
<Nilium> So create a temp file, let them modify it, then do what you need to with the contents of the temp file.
<Nilium> Or is there a way to guarantee whatever program you pass it to will write the end result to stdout?
<Nilium> Temp file's probably easier anyway. Just destroy it when you're done.
v0n has joined #ruby
<Nilium> That way if something crashes internally, the temp file's still there and you can let the user resume and verify it's correct before proceeding.
EPIK has quit [Ping timeout: 240 seconds]
<brotatos> Nilium: but there's still stuff i want to do after they edit the file. How would the script wait for them to make a change to the file?
pipework has quit [Remote host closed the connection]
platoscave has quit [Ping timeout: 240 seconds]
<brotatos> system("vim /tmp/file").... and then do some stuff with it
<Nilium> Have it wait on the process.
cj3kim has quit [Read error: Connection reset by peer]
jorge_ has joined #ruby
ilyam has joined #ruby
<Nilium> You should probably look at the Process module, FYI.
* brotatos is.
cj3kim has joined #ruby
tomzx_mac has joined #ruby
bigoldrock has quit [Ping timeout: 276 seconds]
<brotatos> This is nice. http://www.ruby-doc.org/core-2.0/Process.html#method-c-waitpid I just have to figure out how to get the PID of the system call and I'm good to go.
<Nilium> .. Why are you still using system despite what Process offers?
<Nilium> I don't get that.
jorge_ has quit [Ping timeout: 240 seconds]
skaczor has quit [Ping timeout: 245 seconds]
<brotatos> Oh; I didn't realize...
digitalcake has quit [Quit: Leaving.]
<brotatos> Nilium: I'm just a little confused on how to start a process using that module.
E23 has joined #ruby
<Nilium> Process::spawn
<brotatos> Nilium: thnanks.
<Nilium> Out of curiosity, what OS are you on?
<brotatos> Nilium: arch linux developing on centos.
<Nilium> Ok, can't really recommend Dash in that case.
platoscave has joined #ruby
platoscave has quit [Max SendQ exceeded]
<Nilium> Maybe there are equivalent documentation browsers for the Linuxes.
dankest has quit [Read error: Connection reset by peer]
haxrbyte_ has quit [Remote host closed the connection]
platoscave has joined #ruby
haxrbyte has joined #ruby
michaeldeol has quit [Remote host closed the connection]
platoscave has quit [Max SendQ exceeded]
jorge_ has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
platoscave has joined #ruby
platoscave has quit [Max SendQ exceeded]
cj3kim has quit [Remote host closed the connection]
Ripp__ has joined #ruby
cantonic has quit [Quit: cantonic]
sqd_ has quit [Quit: sqd_]
<Xeago> brotatos: apeiros has a gem for managing forks/processes
orangerobot has quit [Quit: ChatZilla 0.9.90.1 [Firefox 22.0/20130627161504]]
<brotatos> Xeago: the process module should do the trick
wsterling has joined #ruby
Mathias__ has quit [Remote host closed the connection]
JZTech101 has joined #ruby
otherj has quit []
cantonic has joined #ruby
mmitchell has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
bradhe has joined #ruby
wsterling has quit [Ping timeout: 276 seconds]
xavier23 has joined #ruby
<xavier23> HI…. can anybody explain casting in ruby?
marr has quit [Ping timeout: 248 seconds]
allaire has joined #ruby
allaire has quit [Client Quit]
rypervenche has left #ruby ["WeeChat 0.4.1"]
<xavier23> Eg. In C: int sum = 17, count = 5; double mean; mean = (double) sum / count;
<xavier23> How can I do this in ruby?
bradhe has quit [Ping timeout: 276 seconds]
<DylanJ> xavier23: sum.to_f / count
<DylanJ> xavier23: / will be a method on sum
<Crawford> Anyone able to give me some tips on rubyist ways to refactor this: https://github.com/crawfordcomeaux/find-my-ios-device/blob/master/ios_device_locator.rb
predator117 has joined #ruby
sailias has joined #ruby
mmitchell has quit [Ping timeout: 240 seconds]
<xavier23> DylanJ: Ok, that works
<xavier23> Let me put it another way
<xavier23> In java, it's possible to type cast to subclasses