apeiros changed the topic of #ruby to: Ruby 2.1.0-p0; 2.0.0-p353; 1.9.3-p484: http://ruby-lang.org|| Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
Wolland has quit [Remote host closed the connection]
therod has quit [Ping timeout: 252 seconds]
marr has quit [Ping timeout: 252 seconds]
Hanmac has joined #ruby
standyro2 has quit [Ping timeout: 252 seconds]
Jetchisel has joined #ruby
Deele has quit [Ping timeout: 260 seconds]
[krisbulman] is now known as krisbulman
chipotle has quit [Quit: cya]
chipotle has joined #ruby
shadesaaaa is now known as waxjar
Kricir has quit []
<gr33n7007h> I like python but I like ruby better so I will persevere
box has left #ruby [#ruby]
xcv has joined #ruby
pabloh has quit [Quit: Saliendo]
srji_ has joined #ruby
Solnse has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
sparrovv has quit [Remote host closed the connection]
<snkcld> is .to_s on a string a no-op?
blackmesa has quit [Ping timeout: 264 seconds]
<snkcld> same for to_i on an integer, to_f on a flato....
pabloh has joined #ruby
srji has quit [Ping timeout: 252 seconds]
<workmad3> >> a = "hi"; a.object_id == a.to_s.object_id
<eval-in> workmad3 => true (https://eval.in/95206)
mary5030 has joined #ruby
bradhe has joined #ruby
<workmad3> snkcld: it's still a method call, but yeah, afaik they just return 'self'
kitak has joined #ruby
mercwithamouth has joined #ruby
<snkcld> what i mean to say is, do the to_ whatever functions continue to attempt to process the conversion, even if the type of the object is already the type to be converted to
<Morrolan> Yes. The various classes just implement it by returning self.
<Morrolan> E.g. Integer's definition of #to_i will be 'def to_i; self; end'
krisbulman is now known as [krisbulman]
<Morrolan> There's not really any other way to do it, as those functions *return* an object of the desired type, they can't just do nothing.
benzrf has joined #ruby
<benzrf> so a rack middleware is basically a proxy to your app?
<Hanmac> same goes for the Kernel Functions like String() because they only call to_s and the others
<snkcld> ah, awesome!
<benzrf> nestable proxies?
<snkcld> thanks
<Morrolan> :)
<snkcld> well the actually conversion logic is in c, i would think
<snkcld> ?
<snkcld> atleast for mri ruby
<Morrolan> Probably is, yea.
bradhe has quit [Ping timeout: 252 seconds]
<Morrolan> You could check on ruby-doc.org, it includes the source for each method. :)
<Morrolan> http://ruby-doc.org/core-2.1.0/Integer.html#method-i-to_i - yea, it's C, at least for this class.
Solnse has quit [Remote host closed the connection]
pyr0commie has joined #ruby
pyr0commie has quit [Remote host closed the connection]
cjsarette has joined #ruby
<workmad3> benzrf: a rack middleware is something that implements the rack interface but passes on to another rack application
<workmad3> benzrf: to allow you to create a stack
<workmad3> benzrf: so yeah, it's a type of proxy, but that's probably a less useful way to think of it ;)
<benzrf> ok
<benzrf> i guess 'delegate' might be a better word
rootshift has joined #ruby
yarou has joined #ruby
<benzrf> hmm, is there anything like meteor.js for ruby ?
<benzrf> using opal
agjacome has joined #ruby
therod has joined #ruby
<workmad3> benzrf: I guess the best pattern to describe a middleware stack is as decorators :)
mocfive has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
rubyracer has quit [Quit: Konversation terminated!]
<workmad3> benzrf: not aware of anything in the ruby ecosystem that fills quite the same niche as meteor.js
<chipotle> can someone tell me what's wrong with this code? i'm new to ruby, but it says after completing the input that i have 574 characters in my name, which is not true: http://pastie.org/8670424
<Morrolan> You're adding strings, which will concatenate them.
<Morrolan> Sum them before you call #to_s
shedd has joined #ruby
<Morrolan> >> "5" + "7" + "4"
<eval-in> Morrolan => "574" (https://eval.in/95207)
<Morrolan> As opposed to:
<Morrolan> >> 5 + 7 + 4
<eval-in> Morrolan => 16 (https://eval.in/95208)
Wolland has joined #ruby
<Morrolan> Unlike Perl, Ruby won't implicitly convert between types depending on the operation.
zz_karupanerura is now known as karupanerura
nateberkopec has joined #ruby
<waxjar> Because operations are not operations in Ruby, but method calls! :D
<chipotle> Morrolan: how do i sum them?
therod has quit [Ping timeout: 252 seconds]
m104 has joined #ruby
m104 has quit [Max SendQ exceeded]
<chipotle> i tried quotes around each of them, like "last_name.length.to_s" but that didn't work...
visof has quit [Ping timeout: 248 seconds]
aryaching_ has quit []
<Morrolan> chipotle: Something like "Did you know that your name has " + (first_name.length + middle_name.length + last_name.length).to_s "characters?"
<chipotle> oh i see
<workmad3> I'd probably use string interpolation for that
<Morrolan> Basically, sum them while they are still numbers, then convert the sum to a string.
<Morrolan> Yea, me too. But one step at a time. ;D
<workmad3> :)
<chipotle> i get this: chapter6.rb:18:in `+': no implicit conversion of Fixnum into String (TypeError)
<chipotle> from chapter6.rb:18:in `<main>'
<Morrolan> Now you're probably missing the to_s on the sum.
<Hanmac> workmad3: or String#%
<chipotle> where's the sum, i don't see how to add it?
<Morrolan> Right now you are asking Ruby to do `"Did you know that ..." + 547`, which it has no clue how to do.
<Morrolan> What is your current code?
<f4a244c> decided to go ahead and implement a standards recommendation (informal): https://gist.github.com/jkassemi/8641384 - what's the closest to an informal collection of RFCs we have for stuff as basic as this?
shedd has quit [Ping timeout: 272 seconds]
predator217 has joined #ruby
<chipotle> puts 'Did you know there are ' + (first_name.length.to_s + middle_name.length.to_s + last_name.length).to_s + ' characters in your name.'
<Morrolan> Oh, you still have the .to_s after first_name.length and middle_name.length
<Morrolan> You'll want to sum the numbers, not two strings and a number.
ghanima1 has joined #ruby
<chipotle> how do i 'sum the numbers'?
<gr33n7007h> bnagy, Right this is what I've got AF_BLUETOOTH = 31 and BTPROTO_RFCOMM = 3
[krisbulman] is now known as krisbulman
<workmad3> chipotle: 'first_name.length' gives you a number
ghanima has quit [Ping timeout: 252 seconds]
<workmad3> chipotle: 'first_name.length.to_s' turns that number into a string
<pontiki> add the lengths, not the lenghts as strings
<pontiki> sorry, workmad3
<chipotle> so remove the to_s?
<pontiki> ^
<workmad3> pontiki: np, yours was slightly better stated than mine ;)
<chipotle> when i remove the to_s i get this error message: chapter6.rb:18:in `+': no implicit conversion of Fixnum into String (TypeError)
<chipotle> i guess i don't know what you mean by adding the lengths?
<Morrolan> Then you probably removed the wrong .to_s.
<chipotle> does that mean just turn it into a number and not a string?
<Morrolan> Eh, let's start at a more basic level.
<pontiki> after you calc the total length, then that needs tobe stringified
<Morrolan> Oh, pontiki will help, I'm out then. *grins*
vlad_starkov has joined #ruby
<workmad3> yeah, unfortunately it's after midnight for me, so I'm not quite cognizant enough to teach coding
predator117 has quit [Ping timeout: 272 seconds]
<chipotle> aha, so is this right? puts 'Did you know there are ' + (first_name.length + middle_name.length + last_name.length).to_s + ' characters in your name.'
<pontiki> (n.to_s + m.to_s + o.to_s) !== (n + m + o).to_s
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<workmad3> chipotle: woo!
<pontiki> i'm in the midst of an anxiety attack and hugely angerful
p8952 has joined #ruby
<workmad3> pontiki: hit something
<workmad3> (not me)
<Hanmac> something more readable: 'Did you know there are %d characters in your name.' % (first_name.length + middle_name.length + last_name.length)
ukd1 has quit [Quit: Leaving...]
<chipotle> somethings wrong, when i do this: puts 'Did you know there are ' + (first_name.length + middle_name.length + last_name.length).to_s +' characters in your name.' i get this error message: chapter6.rb:18: syntax error, unexpected unary+, expecting end-of-input...ngth + last_name.length).to_s +' characters in your name.
angusigu1ss has joined #ruby
<chipotle> Hanmac: oh, what is that character called again? %d
JJMalina has joined #ruby
<chipotle> formatters?
<workmad3> Hanmac: personally, I find "Did you know there are #{first_name.length + middle_name.length + last_same.length} characters in your name"
<workmad3> more readable
<chipotle> i'm using chris pine's how to program book right now
Aryasam has joined #ruby
nateberkopec has quit [Ping timeout: 245 seconds]
<Hanmac> workmad3: yeah both are good, depend if you get the strings from a source or not (like language table)
vlad_starkov has quit [Read error: Connection reset by peer]
<pontiki> huh
simoz15 has joined #ruby
bean__ has joined #ruby
araujo has joined #ruby
DaniG2k has quit [Quit: leaving]
<chipotle> Hanmac: yeah, that worked!
<chipotle> %d is a formatter, right? i think i remember that from the little python i did
<chipotle> that is much more readable
<Hanmac> chipotle: >> +'<< change that to: >> + ' <<
<chipotle> yay!
<chipotle> that worked too
<chipotle> thanks guys!!
<pontiki> clearly a syntax/precedence issue:
<workmad3> right, I'm off to bed
<workmad3> night all
<Hanmac> chipotle: it goes back to old C .. String#% is calls Kernel#sprintf and that works nearly as sprintf in each other language
Neomex has quit [Quit: Neomex]
<chipotle> gnite workmad3
standyro2 has joined #ruby
bthesorceror has joined #ruby
phipes has joined #ruby
<chipotle> i see
<chipotle> C is a cumbersome language, ruby is much nicer
angusigu1ss has quit [Ping timeout: 252 seconds]
JJMalina has quit [Ping timeout: 248 seconds]
axl_ has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
ckinni_ has joined #ruby
sassamo has joined #ruby
<Hanmac> pontiki: +@ is a method (hm but yes it should not raise an syntax error maybe ,P )
ckinni has quit [Ping timeout: 252 seconds]
<pontiki> i can see where it gets confused, but then i am thinking it should backtrack
mocfive has quit [Remote host closed the connection]
<pontiki> how does unary+ get implemented?
danijoo has quit [Read error: Connection reset by peer]
mocfive has joined #ruby
<pontiki> seems like it's a parsing thing at that point, innit?
danijoo has joined #ruby
simoz15 has quit [Ping timeout: 245 seconds]
Opettaja has quit [Remote host closed the connection]
LaPetiteFromage has joined #ruby
dorei has quit []
phinfone_ has quit [Quit: exitiing]
LaPetiteFromage_ has joined #ruby
jtdowney has quit []
mocfive has quit [Ping timeout: 252 seconds]
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
angusigu1ss has joined #ruby
tkuchiki has joined #ruby
LaPetiteFromage has quit [Ping timeout: 272 seconds]
LaPetiteFromage_ is now known as LaPetiteFromage
m104 has joined #ruby
recurrence has joined #ruby
<benzrf> hey did somebody ping me
<benzrf> ah
robustus has quit [Ping timeout: 245 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
ghanima1 has quit [Read error: Connection reset by peer]
leoxagy1234 has quit [Ping timeout: 252 seconds]
kewubenduben has quit [Ping timeout: 265 seconds]
benzrf has left #ruby [#ruby]
robustus has joined #ruby
Wolland has quit [Ping timeout: 272 seconds]
dseitz has joined #ruby
felixjet_ has joined #ruby
bradhe has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
mocfive has joined #ruby
mojjojo has joined #ruby
felixjet has quit [Ping timeout: 252 seconds]
angusigu1ss has quit [Ping timeout: 245 seconds]
mavcunha has quit [Quit: Computer has gone to sleep.]
mercwithamouth has joined #ruby
krisbulman is now known as [krisbulman]
mehlah has quit [Quit: Leaving...]
<idiocrash> hiya gents
bradhe has quit [Ping timeout: 252 seconds]
<idiocrash> looking for a starting point to auto-detect the title and author of a news article on the web
v0n has joined #ruby
<idiocrash> any existing gems?
<idiocrash> I know about readability, but I don't see methods for grabbing the title and author
aspires has joined #ruby
guest12345 has quit [Quit: Page closed]
<cong> hpricot
<pontiki> idiocrash: are you talking about from the body of the web page? there is no standard for creating that info
<cong> still in use by me but deprecated by everyone else
<idiocrash> Yeah, was hoping for some algorithms for best guess
<pontiki> you might try looking for css selectors
<idiocrash> true
<idiocrash> it may just come down to that
sambao21 has joined #ruby
[krisbulman] is now known as krisbulman
Spami has quit [Quit: This computer has gone to sleep]
<cong> how do i make an html version of an rdoc file with everyone contained in one file?
sambao21 has quit [Ping timeout: 248 seconds]
SiliconG has quit [Ping timeout: 252 seconds]
mojjojo has quit [Quit: mojjojo]
mercwithamouth has quit [Ping timeout: 272 seconds]
axl_ has quit [Quit: axl_]
mojjojo has joined #ruby
mojjojo has quit [Client Quit]
shedd has joined #ruby
iamdoo2 has joined #ruby
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
fgo has joined #ruby
tdubya has quit [Read error: Connection reset by peer]
senayar_ has joined #ruby
tdubya has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby
senayar has quit [Ping timeout: 252 seconds]
iamdoo2 has quit [Ping timeout: 272 seconds]
mocfive has quit [Ping timeout: 252 seconds]
RoxasShadowRS has quit [Read error: Connection reset by peer]
SiliconG has joined #ruby
Brolen has joined #ruby
rickruby has joined #ruby
phipes has quit [Remote host closed the connection]
sepp2k1 has quit [Read error: Connection reset by peer]
aspires has quit []
asmodlol has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
meatherly has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
mercwithamouth has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
MacGruberMan has joined #ruby
mary5030 has quit [Remote host closed the connection]
MacGruberGuy has quit [Ping timeout: 260 seconds]
kc8qvp has joined #ruby
niklasb has quit [Ping timeout: 272 seconds]
krisbulman is now known as [krisbulman]
<kc8qvp> I need to install ruby gems from git. Bundler works perfectly, except I don't need the bundling part; I just want to install them to GEM_HOME. specific-install doesn't work.
rburton- has joined #ruby
[krisbulman] is now known as krisbulman
<grieg> x["3","4","5","6","7"] x.to_i returns error should i convert each element of array separately?
centrx has joined #ruby
v0n has quit [Ping timeout: 264 seconds]
therod has joined #ruby
yeltzooo has quit [Ping timeout: 245 seconds]
FifthWall has quit [Ping timeout: 260 seconds]
shtirlic has quit [Ping timeout: 276 seconds]
ebeip90 has quit [Ping timeout: 245 seconds]
ptierno has quit [Ping timeout: 245 seconds]
slash_nick has quit [Ping timeout: 272 seconds]
camt has quit [Ping timeout: 240 seconds]
fgo has quit [Remote host closed the connection]
snkcld has quit [Ping timeout: 264 seconds]
Muz has quit [Ping timeout: 272 seconds]
brisbin has quit [Ping timeout: 272 seconds]
SirCmpwn has quit [Ping timeout: 248 seconds]
yan_ has quit [Ping timeout: 248 seconds]
gwb3 has quit [Ping timeout: 245 seconds]
Parker0 has joined #ruby
maxmanders_ has quit [Ping timeout: 264 seconds]
therod has quit [Ping timeout: 245 seconds]
|PiP| has quit []
brisbin has joined #ruby
maxmanders_ has joined #ruby
shtirlic has joined #ruby
SirCmpwn has joined #ruby
FifthWall has joined #ruby
krisbulman is now known as [krisbulman]
jamto11 has joined #ruby
banjara has joined #ruby
mercwithamouth has quit [Ping timeout: 260 seconds]
standyro2 has quit [Ping timeout: 272 seconds]
slash_nick has joined #ruby
ptierno has joined #ruby
[krisbulman] is now known as krisbulman
ebeip90 has joined #ruby
snkcld has joined #ruby
yan_ has joined #ruby
gwb3 has joined #ruby
phipes has joined #ruby
camt has joined #ruby
jamto11 is now known as blaz3
blaz3 is now known as blaz3r
blaz3r is now known as blaz3rz
Soda has quit [Read error: Connection reset by peer]
Wolland has joined #ruby
vlad_starkov has joined #ruby
bradhe has joined #ruby
Fyyr13 has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
Wolland_ has joined #ruby
Wolland has quit [Read error: Connection reset by peer]
Muz has joined #ruby
nari has quit [Ping timeout: 264 seconds]
bradhe has quit [Ping timeout: 252 seconds]
angusigu1ss has joined #ruby
Baluse has quit [Ping timeout: 245 seconds]
<cong> can i install 2 versions of the same gem?
thomasxie has joined #ruby
<cong> different versions ofc
senayar_ has quit [Remote host closed the connection]
<centrx> cong, Yes, with RVM you can
<centrx> cong, Actually you can do it anyway
<centrx> without RVM
<cong> i don't have/use rvm
<cong> so that's a yes
Baluse has joined #ruby
Wolland_ has quit [Ping timeout: 240 seconds]
phipes has quit [Remote host closed the connection]
mocfive has joined #ruby
yeltzooo has joined #ruby
fgo has joined #ruby
angusigu1ss has quit [Ping timeout: 245 seconds]
banjara has quit [Quit: Leaving.]
<cong> what if they have executable program? what happens then?
<centrx> gems are stored in directories that have version numbers in them, like bundler-1.5.1/
benzrf has joined #ruby
Hanmac1 has joined #ruby
<benzrf> hmm, is there anything for integrating Opal with rack apps?
zachrab has joined #ruby
<benzrf> and/or sharing objects between client and server?
lyanchih has joined #ruby
axl_ has joined #ruby
jack_rabbit has quit [Quit: SIGSEGV (core dumped)]
Hanmac has quit [Ping timeout: 265 seconds]
<txdv> rvm isbest
<txdv> no need for root rights forpackages
<txdv> gems i mean
<txdv> have to stay true to the ruby puntrain
mercwithamouth has joined #ruby
krisbulman is now known as [krisbulman]
LexicalScope has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
banjara has joined #ruby
zachrab has quit []
angusigu1ss has joined #ruby
<benzrf> if i want to write a middleware to provide extra pages, would i intercept requests and take over ones that are in my scope and reject the rest
octoberry has joined #ruby
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
tyl has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
iamdoo2 has joined #ruby
SmoothPorcupine has joined #ruby
<SmoothPorcupine> How do I stop ruby from spawning it's Process::detach thread?
<SmoothPorcupine> -'
Solnse has joined #ruby
Wolland has joined #ruby
jedinerd_ has joined #ruby
[krisbulman] is now known as krisbulman
mocfive has quit [Ping timeout: 272 seconds]
freerobby has quit [Quit: Leaving.]
iamdoo2 has quit [Ping timeout: 245 seconds]
<centrx> SmoothPorcupine, Don't call Process.detach?
jedinerd has quit [Ping timeout: 245 seconds]
<SmoothPorcupine> Okay that looks be to a different thread.
<SmoothPorcupine> >>$$
<eval-in> SmoothPorcupine => 12045 (https://eval.in/95217)
cbetta_afk is now known as cbetta
<SmoothPorcupine> >>$$
<eval-in> SmoothPorcupine => 12050 (https://eval.in/95218)
Wolland has quit [Ping timeout: 252 seconds]
<SmoothPorcupine> Okay not useful.
<SmoothPorcupine> Anyone here a pstree(1) user?
<benzrf> no...
krisbulman is now known as [krisbulman]
e^0 has quit [Quit: WeeChat 0.4.1]
danijoo has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
danijoo_ has joined #ruby
<SmoothPorcupine> >>[$$,fork{}]
<eval-in> SmoothPorcupine => (https://eval.in/95219)
end_guy has quit [Ping timeout: 240 seconds]
<SmoothPorcupine> Useless!
vlad_starkov has quit [Read error: Connection reset by peer]
Megtastique has joined #ruby
LexicalScope has quit [Ping timeout: 245 seconds]
<SmoothPorcupine> What is this extra thread that keeps spawning?
Lewix has quit [Remote host closed the connection]
bubbajones has quit [Ping timeout: 252 seconds]
axl_ has quit [Quit: axl_]
altin has quit [Ping timeout: 260 seconds]
<SmoothPorcupine> And the FD 3-4 pipe?
Megtastique has quit [Client Quit]
ohwhoa has quit [Quit: woah!]
beginnerrubyist has joined #ruby
<beginnerrubyist> Someone please check out my code, I get errors. This is my first time making classes. https://eval.in/95220
Lewix has joined #ruby
ohwhoa has joined #ruby
nari has joined #ruby
v0n has joined #ruby
<benzrf> beginnerrubyist: im takin a look
<benzrf> beginnerrubyist: you're missing a def
<beginnerrubyist> benzrf, thank you very much and on what line please?
coderhs has quit [Ping timeout: 252 seconds]
<benzrf> beginnerrubyist: 2
bubbajones has joined #ruby
<benzrf> beginnerrubyist: also, "#{gender}
<benzrf> can just be gender
Wolland has joined #ruby
<benzrf> beginnerrubyist: furthermore that should be @gender,
<beginnerrubyist> Oh ok, thank you. I am new to programming and I want to learn so I try benzrf
<beginnerrubyist> Oh ok.
tt1187 has quit [Read error: Operation timed out]
<beginnerrubyist> When I interpolate my variables in some methods, should those variables be instances instead of local?
<benzrf> youre also missing an end...
<benzrf> beginnerrubyist: well, use the one you want
<benzrf> if you want a local var use a local var
<benzrf> if you want the instance one, use that
<beginnerrubyist> benzrf, does it matter though?
<benzrf> beginnerrubyist: put def in front of initialize, and an extra end at the end of the class
<SmoothPorcupine> Yes.
<benzrf> beginnerrubyist: well, yeah...
<benzrf> beginnerrubyist: ivars and lvars are different
<benzrf> they are entirely separate.
end_guy has joined #ruby
<beginnerrubyist> I just ran my problem and it kept on going like an inf loop.
rickruby has quit [Remote host closed the connection]
<beginnerrubyist> I have no idea why then the program terminated and the ruby interpeter closed.
krz has joined #ruby
dangerousdave has joined #ruby
<SmoothPorcupine> Recursion.
rickruby has joined #ruby
weems has quit [Read error: Connection reset by peer]
<SmoothPorcupine> When you say "#{gender}" inside the gender method, that's a call to self.gender()
<SmoothPorcupine> You want @gender to grab the instance variable, rather than call the function that you're already in.
bradhe has joined #ruby
<SmoothPorcupine> s/to grab/which grabs
<beginnerrubyist> Oh ok SmoothPorcupine
weems has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
<beginnerrubyist> SmoothPorcupine, replace my lvariables with ivariables?
<benzrf> beginnerrubyist: that's not an lvar
<benzrf> beginnerrubyist: since there's no lvar called 'gender' in scope, it calls the method instead
<benzrf> beginnerrubyist: so that's actually a method call
<beginnerrubyist> I am a bit confused.
<SmoothPorcupine> beginnerrubyist: Yes.
<benzrf> beginnerrubyist: method calls with no arguments look exactly the same as lvars
<SmoothPorcupine> >>@gender()
<eval-in> SmoothPorcupine => /tmp/execpad-979e0433a8b2/source-979e0433a8b2:2: syntax error, unexpected '(', expecting keyword_end ... (https://eval.in/95222)
<benzrf> beginnerrubyist: if I say 'foo', that could be calling foo or it could be getting the lvar foo
rburton- has quit [Quit: Linkinus - http://linkinus.com]
<benzrf> for example
<benzrf> >> foo = 3; puts foo
<eval-in> benzrf => 3 ... (https://eval.in/95223)
<benzrf> >> def foo; 3; end; puts foo
<eval-in> benzrf => 3 ... (https://eval.in/95224)
rickruby has quit [Ping timeout: 265 seconds]
<benzrf> beginnerrubyist: in your case, it is treating 'gender' as a call to that method
<benzrf> beginnerrubyist: since there is not lvar called gender availabe
<benzrf> *available
<beginnerrubyist> benzrf, if you call foo then it would put 3 right
<benzrf> no, it would return 3
bradhe has quit [Ping timeout: 252 seconds]
<beginnerrubyist> What is the difference between returning and putting
<beginnerrubyist> Don't those two functions do the same thing, return data. I am unsure.
end_guy has joined #ruby
LexicalScope has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
<benzrf> putting means sending something to the terminal
<benzrf> returning means saying what the result of the method is
<beginnerrubyist> To display to the screen right?
<beginnerrubyist> Oh ok.
<benzrf> beginnerrubyist: for example, if I say '3 + 4', I don't expect that to print '7'
<benzrf> i expect it to result in 7
<benzrf> similarly in that example, 'foo' should come out to 3, not print 3
<benzrf> same as if I just wrote 3 instead of foo
r0b0f377 has quit [Ping timeout: 245 seconds]
banjara has quit [Quit: Leaving.]
<beginnerrubyist> So return doesn't put in the terminal, you don't see return?
<benzrf> yeah.
<SmoothPorcupine> You only "see" the returned value if it's print somehow.
<chipotle> wow, ruby is an awesome language
<chipotle> i'm going through chris pine's learn to program
<chipotle> i'm on chapter 7 and i love it!
x77686d has quit [Quit: x77686d]
<benzrf> chipotle: you don't have a frame of reference ;p
<centrx> beginnerrubyist, return is all inside the program
<chipotle> it's my first programming language! :) but i really feel i'm *getting* it
<beginnerrubyist> chipotle, is that online
<chipotle> i didn't 'get' learn python the hard way
<chipotle> beginnerrubyist: i have the ebook, yeah
<chipotle> would you like it?
<benzrf> chipotle: that;s because lpthw is different probably
<centrx> beginnerrubyist, the terminal is external to the program. When the program wants to print to the terminal, it sends the data to "stdout"
<beginnerrubyist> Aw, I want a book too.
<benzrf> chipotle: it emphasizes learning to do tasks instead of comprehending the big idea
<centrx> beginnerrubyist, That is what puts does
<benzrf> chipotle: which imo is dumb
<beginnerrubyist> centrx, oh ok. Thanks.
<benzrf> chipotle: from what ive seen of it anyway
<beginnerrubyist> What is stdout
<benzrf> beginnerrubyist: it's like a special file available to programs
<chipotle> once i finish this book, i'll go onto the well grounded rubyist
<benzrf> beginnerrubyist: if you write data to it it goes to the terminal that the program is running it
<benzrf> *in
pabloh has quit [Quit: Saliendo]
<chipotle> i bought the prebook pdf because 1st ed is 1.9 and outdated
<centrx> beginnerrubyist, puts is ultimately calling this IO method: http://www.ruby-doc.org/core-2.1.0/IO.html#method-i-puts
<beginnerrubyist> chiptole, ty :)
<beginnerrubyist> centrx, thanks
<benzrf> chipotle: I recommend learning java, C, haskell, javascript, and python
<benzrf> chipotle: not immediately
<chipotle> why?
<chipotle> i want to learn js next
<chipotle> and then node.JS
<chipotle> but first i will get good at ruby
<benzrf> chipotle: but like, as things to learn someday
<chipotle> i come from a drupal background, but i've never really coded
<benzrf> chipotle: they will all teach you things
<centrx> beginnerrubyist, Unix-like systems have three standard "streams", stdout, standard output, stdin, standard input, and stderr, standard error. By default these read and write to the terminal
<SmoothPorcupine> I recommend learning C and seeing what ASM is.
iamsean has joined #ruby
<chipotle> is it better to use single quotes or double quotes when using puts/print?
<benzrf> chipotle: javascript is important to know, python will show you another way of doing some things, java will teach you some things to avoid, C will give you better understanding as to how computer works, haskell will blow your mind
SCommette has joined #ruby
<SmoothPorcupine> chipotle: Do you know the difference between ' strings and " strings?
<chipotle> no
radic has quit [Read error: Operation timed out]
<SmoothPorcupine> >>a=5;['#{a}",'#{a}']
<eval-in> SmoothPorcupine => /tmp/execpad-3b6663ddd9a0/source-3b6663ddd9a0:3: syntax error, unexpected keyword_rescue, expecting ']' ... (https://eval.in/95225)
<SmoothPorcupine> >>a=5;["#{a}",'#{a}'] # I mean
<eval-in> SmoothPorcupine => ["5", "\#{a}"] (https://eval.in/95226)
<beginnerrubyist> I am confused centrx but I am going to focus on classes for now.
<beginnerrubyist> benzrf, this is my program now. Is there anything I can do now. https://eval.in/95221
Guest78613 has quit [Quit: WeeChat 0.4.0-dev]
nstdloop has quit [Remote host closed the connection]
<SmoothPorcupine> chipotle: They aren't the same, so use whichever reflects what you want.
<benzrf> beginnerrubyist: well, in this:
<benzrf> puts "His age is #{age}."
<benzrf> beginnerrubyist: you're calling age again
<benzrf> beginnerrubyist: I don't think that's what you want to do
<chipotle> ok
<cong> that's a lot of females
<beginnerrubyist> cong I know :(
<beginnerrubyist> bemzrf, instead put #{@female}
<beginnerrubyist> right?
<benzrf> right
<benzrf> well
<benzrf> @age ;p
<SmoothPorcupine> It's only countably infinitely many females. :V
shedd has quit [Remote host closed the connection]
<beginnerrubyist> How come I am confused, can you please explain to me benzrf
<benzrf> well..
<benzrf> what value do you want to stick there?
radic has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
snuffeluffegus has joined #ruby
<beginnerrubyist> stick in what? I just want to know why I putting gender does work like that.
<beginnerrubyist> I am not getting this.
snuffeluffegus has quit [Read error: Connection reset by peer]
<SmoothPorcupine> beginnerrubyist: Have you played with an interactive prompt?
emanu has joined #ruby
<beginnerrubyist> Yes.
snuffeluffegus has joined #ruby
<emanu> hey guys, I need to make a CLI app in ruby, should I be using gli, commander, thor, rake? Any suggestions?
danshultz has quit [Remote host closed the connection]
<SmoothPorcupine> So you know what a = 5;"Hello, I am #{a} and what is this?" will do?
<benzrf> emanu: dont overthink it
<benzrf> emanu: use what you need, no more
<benzrf> emanu: what kind of app?
<emanu> I want to make a script to move my osx application settings into dropbox
snuffeluffegus has quit [Read error: Connection reset by peer]
<emanu> so that my desktop and laptop can have the same settings
danshultz has joined #ruby
<SmoothPorcupine> You don't need ruby for that.
niklasb has joined #ruby
<SmoothPorcupine> That's basic shell scripting.
hamakn has joined #ruby
<emanu> yea, but it's a lot of work figuring out which files are safe to move for which app
<emanu> so I'm thinking of open sourcing the tool, giving some nice facilities to define an osx program's config files that are safe to symlink, and hoping that people contribute
<SmoothPorcupine> The complexity of that task doesn't change that it needs to happen whatever language you use.
<beginnerrubyist> cong ty
mary5030 has joined #ruby
<emanu> so is there a ruby gems for shell scripts?
mocfive has joined #ruby
<SmoothPorcupine> :V
<emanu> why not use ruby?
<emanu> (sincere question)
<SmoothPorcupine> You don't need a gem.
w4pm has joined #ruby
<SmoothPorcupine> Ruby is very systems level as it is.
<emanu> I don't understand your logic
<SmoothPorcupine> Trying to weasel some random gem into the design process is a bad idea.
<beginnerrubyist> I think I understand now, instance variables are only in classes.
<benzrf> emanu: a shell script by definition is a script in a shell language
<emanu> the goal is to distribute this to people so that they get interested in using it
<benzrf> beginnerrubyist: erm
<benzrf> beginnerrubyist: no, they are variables that are scoped to an object
<emanu> so I'm chosing ruby in the hopes that my install process is like this: "gem install backup-tool"
<emanu> and no more
<benzrf> ...which may be what you meant
<beginnerrubyist> instance variables are accustomed the way they're because each instance of a class may have different instance variable values right?
<benzrf> you mean named?
<beginnerrubyist> benzrf, oh
<benzrf> beginnerrubyist: do you know what it means if a variable is scoped to somethibg?
Lewix has quit [Remote host closed the connection]
<SmoothPorcupine> emanu: A gem isn't the best way to distribute or design this.
<beginnerrubyist> benzrf, nope
amclain has quit [Quit: Leaving]
<emanu> I hear you, I'm just not hearing your argument for why
<benzrf> beginnerrubyist: a scope is something a variable live sin
<emanu> which will help me understand
<benzrf> beginnerrubyist: if a variable is scoped to x, it means that it lives in x and will go away when x ends
danshultz has quit [Ping timeout: 272 seconds]
<benzrf> beginnerrubyist: lvars are scoped to each time a method runs
<SmoothPorcupine> emanu: In basic terms, all you're doing is copying files, right?
<benzrf> beginnerrubyist: so they live in a method invocation, and when the method is done all of the variables scoped to it die
tyl_ has joined #ruby
<benzrf> beginnerrubyist: ivars are scoped to an object, meaning that they live in an object and go away when the object is garbage collected
<beginnerrubyist> the variables go away?
w4pm has quit [Read error: Operation timed out]
<cong> beginnerrubyist, you're just confusing yourself so do this https://eval.in/95233
<emanu> smooth: but I need a maintainable repository of osx applications and the files that are safe to symlink for them. These file lists will also likely change with every version of the application, so I need to build in version detection
<emanu> sorry, that was for SmoothPorcupine
<emanu> so it doesn't seem as simple as just copying files
<benzrf> cong: i do not think solving it for them is very helpful
<benzrf> (´_`)
<emanu> so I feel the toolset of ruby has some good solutions to this problem
<beginnerrubyist> cong ty, this is the help I need.
<cong> we need to be more helpful.
<SmoothPorcupine> emanu: Regardless of which files get copied, that's basically the final end result operation being performed, yes?
<emanu> SmoothPorcupine: no, it's actually version detection of the application it's backing up first (the harder problem), and then moving the "safe" config files for the version that was detected
<SmoothPorcupine> Right, but that's deciding which files to move.
<SmoothPorcupine> In the end, you still need to move them to have done anything useful.
<emanu> yea, the core problem to solve
<emanu> and then yes, I will move and symlink files
<emanu> but I don't think sh/bash is a good tool for solving the hard problem, no?
<beginnerrubyist> cong, can you help me please.
Parker0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baggypants has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<SmoothPorcupine> Depends on how fluent you are in it.
FifthWall has quit [Ping timeout: 264 seconds]
maxmanders_ has quit [Ping timeout: 245 seconds]
end_guy has quit [Ping timeout: 240 seconds]
<emanu> not very fluent, and I'm very fluent in ruby, so I still don't see why not?
<SmoothPorcupine> But ultimately you're building a file index based on environmental conditions.
<emanu> yes
snkcld has quit [Ping timeout: 252 seconds]
<SmoothPorcupine> Yes, that's a more or less trivial task.
<SmoothPorcupine> Ruby's natural system-level funcitonality provides everything you need for that basic task.
maxmanders_ has joined #ruby
<SmoothPorcupine> functionality*
snkcld has joined #ruby
therod has joined #ruby
<emanu> I thought this was a ruby channel. Why are you so adamant on me not using ruby?
fgo has quit [Remote host closed the connection]
<SmoothPorcupine> Have you tested to ensure symlinked config files work properly?
<cong> beginnerrubyist, in order to access the instance variables you have to define instance methods. you understand that right? attr_writer or attr_reader is just that.
iamdoo2 has joined #ruby
<SmoothPorcupine> E.g., do the symlinks get overwritten with new config files when applications exit?
<seekwill> emanu: Because sometimes there are better tools for certain tasks
bthesorceror has quit [Remote host closed the connection]
<beginnerrubyist> cong, I'll just read on the internet about these things. Thanks for helping me
<SmoothPorcupine> emanu: Using ruby is fine, but your problem isn't about ruby per se.
baggypants has joined #ruby
<emanu> and what is my problem?
FifthWall has joined #ruby
<cong> beginnerrubyist, see yer
<SmoothPorcupine> Collaborative file indexing based on environmental conditions.
<beginnerrubyist> cong: huh
<SmoothPorcupine> Ruby can do this, and I'm not saying you shouldn't use ruby to do this.
Brolen has quit [Remote host closed the connection]
<cong> beginnerrubyist, fairwell?
Brolen has joined #ruby
<emanu> so what are you saying? I'm confused
<beginnerrubyist> bye
<SmoothPorcupine> Mostly I'm using words in ways that match the design process more accurately.
drewbug has joined #ruby
<drewbug> I'm a big fan of #tap
therod has quit [Ping timeout: 272 seconds]
<SmoothPorcupine> You sound like you have your terminology and layers of abstraction slightly confused.
<pontiki> or a big fan of on-tap
<emanu> I didn't realize there was a canonical process for design
end_guy has joined #ruby
iamdoo2 has quit [Ping timeout: 265 seconds]
<emanu> that might actually be the case, yes
<SmoothPorcupine> It's not well advertised. :V
<emanu> oy...
<SmoothPorcupine> Or, it's not as advertised as, "Woooo code!"
baggypants has quit [Ping timeout: 265 seconds]
fgo has joined #ruby
<BraddBitt> is the rails chan on freenode #rails or #rubyonrails?
Mattx has quit [Ping timeout: 272 seconds]
Brolen has quit [Ping timeout: 264 seconds]
Lewix has joined #ruby
<centrx> BraddBitt, #rubyonrails is much more active
<BraddBitt> thanks
BraddBitt is now known as BraddPitt
nanoyak has joined #ruby
jtdowney has joined #ruby
<SmoothPorcupine> emanu: You'd hope that an application would change the path name of its configuration file every time it changed the format of its configuration file.
guardianx_ has joined #ruby
Lewix has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
FifthWall has quit [Ping timeout: 245 seconds]
<SmoothPorcupine> Although "structure" of configuration might be a better term in some cases.
<emanu> now I think you're overthinking this
<emanu> or at least your terminology
maxmanders_ has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
<SmoothPorcupine> I have a tendency to. <_<
end_guy has quit [Ping timeout: 240 seconds]
<SmoothPorcupine> It'd all be ones and zeros if not for terminology.
cjsarette has quit [Ping timeout: 240 seconds]
maxmanders_ has joined #ruby
axl_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<pontiki> it still is all ones and zeros :)
cj3kim has joined #ruby
FifthWall has joined #ruby
shedd has joined #ruby
<emanu> +1
ebeip90 has quit [Ping timeout: 272 seconds]
<emanu> aanyways
<emanu> this is very off topic
Amart41 has joined #ruby
shedd has quit [Read error: Connection reset by peer]
<emanu> clearly there are some people who like using ruby more than shell scripting
shedd has joined #ruby
ebeip90 has joined #ruby
<emanu> thus the existence of vli, thor, commander and cir
<emanu> cri*
<pontiki> oh heavens yes
<cong> more then batch batching
<emanu> so, the original question, which I think is still relevant, is: If you had to pick one, is there one that is a more active and popular project?
<emanu> is there one that is considered "best practice"?
<pontiki> sorry, for what?
<emanu> for creating a command-line-only application
<pontiki> oh
<pontiki> *shrug*
<pontiki> davetron5000's are rather nice
<pontiki> gli and methadone
<pontiki> i like using them
<pontiki> i like thor for generators
<pontiki> and of course, good old rake
<pontiki> i guess i wouldn't strive to pick on, ever, really
<pontiki> one*
<emanu> got it, I was considering gli
<emanu> I think I will foliow this train of thought
<pontiki> gli rather packages common things up, an ok dsl
<emanu> though not to rag on you SmoothPorcupine, you did mention something important I didn't consider: I haven't thought about what happens when an application in osx is closed, does it write to its config? And if so, will there be conflicts for open applications on multiple machines
<pontiki> i like it because it let's me just concentrate on the app
tdubya has quit [Read error: Connection reset by peer]
<emanu> pontiki: yea, that's exactly what I'm looking for
tdubya has joined #ruby
Amart41 has quit [Ping timeout: 272 seconds]
end_guy has joined #ruby
<pontiki> if you have to keep configuration in sync across different machines using the same installation, that seems rather a sticky thing.
cyberarm has joined #ruby
<pontiki> i'm not sure i'd tend to do that for a cli
OdNairy has joined #ruby
Mattx has joined #ruby
<emanu> I'm basically thinking I can copy the relevant files from ~/Library to Dropbox
<emanu> and let dropbox do the syncing
<SmoothPorcupine> For CLI best practice is to not use some abstraction layer.
cyberarm has left #ruby [#ruby]
xcv has quit [Remote host closed the connection]
<emanu> I actually found a python script that does all this already: https://github.com/lra/mackup
bradhe has joined #ruby
<emanu> but it auto-opts-in all your apps, kind of frightening
<SmoothPorcupine> Shouldn't be hard to change that behavior, given the source code.
browndawg has joined #ruby
<emanu> yea, exactly
sambao21 has joined #ruby
octoberry has quit [Ping timeout: 272 seconds]
shedd has quit [Ping timeout: 265 seconds]
sambao21_ has joined #ruby
sambao21 has quit [Read error: Connection reset by peer]
sambao21_ is now known as sambao21
OdNairy has quit [Ping timeout: 264 seconds]
ghanima has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
bradhe has joined #ruby
<SmoothPorcupine> emanu: Thanks for the question though. It's helped me isolate a high-level design demand.
<emanu> I have no idea what you're talking about, but glad to be of service. ;)
drewbug has left #ruby [#ruby]
<SmoothPorcupine> Well, you can write an IRC bot with telnet(1), sed(1), and a few connective lines of sh(1).
cbetta is now known as cbetta_afk
charliesome has joined #ruby
<SmoothPorcupine> Shell scripting was designed with application development explicitly in mind.
<benzrf> ew
Lewix has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
ClientAlive has joined #ruby
<SmoothPorcupine> Hey, do I express disgust at /your/ way of life/code? >:V
Lewix has quit [Remote host closed the connection]
fgo has quit [Remote host closed the connection]
<benzrf> you are free to
<benzrf> ;)
Lewix has joined #ruby
gener1c has quit [Disconnected by services]
gener1c_ has joined #ruby
<ClientAlive> I'm getting ""
<ClientAlive> An error occurred while installing mysql2 (0.3.11), and Bundler cannot continue.
<ClientAlive> Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling
<ClientAlive> After runnin "sudo -u git -H bundle install --deployment --without development test msql aws"
<ClientAlive> Got the same when I ran "sudo -u git -H bundle install --deployment --without development test msql2 aws"
<ClientAlive> What gives?
blaz3rz has quit [Remote host closed the connection]
<ClientAlive> I'm using postgresql, not mysql
<SmoothPorcupine> How do you live like this?!
Lewix has quit [Remote host closed the connection]
<centrx> ClientAlive, Then just remove mysql2 from your Gemfile :)
<ClientAlive> centrx: I can do that and not break the app I'm trying to install?
<centrx> What is the app?
<ClientAlive> gitlab
<seekwill> You have "msql2". is that correct, and not "mysql2"?
beginnerrubyist has quit [Ping timeout: 245 seconds]
<centrx> You'll have to find out if gitlab is compatible with postgresql
<ClientAlive> seekwill: oh schnapp!!
<ClientAlive> my bad
<seekwill> Was that really the issue? :)
<ClientAlive> I'm about to find out. It look like I had that misspelling though. lol
sambao21 has quit [Ping timeout: 252 seconds]
braincrash has quit [Quit: bye bye]
banjara has joined #ruby
<ClientAlive> Nope
<ClientAlive> still getting the error ( with the correct spelling? Or is it "mysql" and not "mysql2"? )
blaz3rz has joined #ruby
sambao21 has joined #ruby
<SmoothPorcupine> ClientAlive: There's a ton of things you can do without breaking the app you're trying to install and few people will ever find out even a handful of what those things are.
<SirFunk_> When using a module for a singleton. Is there any way to run some code when it gets "initialized" (called for the first time) ?
fgo has joined #ruby
<seekwill> I think you need to pastebin some details
<pontiki> ClientAlive: you should look in your gemfile and see what the group name is
<ClientAlive> SmoothPorcupine: right on
<ClientAlive> pontiki: well that makes me feel pretty dumb :)
<SmoothPorcupine> "Dependency" often just means,
braincrash has joined #ruby
gozali has joined #ruby
jtdowney has quit []
<SmoothPorcupine> "Developer prefers."
<pontiki> *gulp* sorry :(
Hanmac has joined #ruby
<SmoothPorcupine> SirFunk_: I know there is, but I'm not recalling offhand.
<SirFunk_> hmm. I've been googling for a while, can't find an answer
yacks has joined #ruby
<SmoothPorcupine> Either that, or I just ended up being satisfied with calling an extension method post-extend.
<ClientAlive> pontiki: The line reads "gem "mysql2", group: :mysql"
<SmoothPorcupine> It'll be in the standard documentation if there is a way.
<ClientAlive> Can you tell I know nothing about ruby?
banjara has quit [Ping timeout: 260 seconds]
<ClientAlive> It was "mysql"
cjsarette has joined #ruby
<ClientAlive> I'm good now
Hanmac1 has quit [Ping timeout: 260 seconds]
<ClientAlive> Just out of curiousity, when I get that error, does it mean I need to run the command again until it is successful? Or does all the other stuff get insalled properly anyway and I can just press forward and be ok?
cj3kim has quit [Remote host closed the connection]
<SmoothPorcupine> It either means what it says or it means the developer would prefer you do what it says.
<SmoothPorcupine> There's no standard way of knowing or determining which is which.
emanu has quit [Quit: emanu]
idiocrash has quit []
<centrx> SirFunk, This might be what you are looking for: http://ruby-doc.org/core-2.1.0/Module.html#method-i-included
sparrovv has joined #ruby
ninjapig has joined #ruby
<ClientAlive> SmoothPorcupine: Not sure that answers my question but ok. I suppose common sense would tell you that you don't know where the thing got stopped up at and thus not assume everything but that one gem is installed. Idk.
<ninjapig> #join #ruby-lang
jtdowney has joined #ruby
<centrx> ClientAlive, Usually gems fail to install because your system is missing the necessary development/header files to compile the gem
<ClientAlive> ok
sambao21 has quit [Ping timeout: 245 seconds]
SiliconG has quit [Quit: Textual IRC Client: www.textualapp.com]
SCommette has quit [Quit: SCommette]
gja has joined #ruby
<ClientAlive> But what I thought was that - it's concievable - when one or two gems fail to install, all ( all ) the others may yet install anyway. In other words, afaik, if the fialing gem is located on a line somewher in the middle of the Gemfile, bundler might still just skip over it and continue to install everything that comes after it. Or, it may just stop trying the minute it hits the problem line in the Gemfile. Which one might it be?
<ClientAlive> *failing gem*
bradhe has quit [Remote host closed the connection]
sparrovv has quit [Ping timeout: 245 seconds]
bradhe has joined #ruby
<SmoothPorcupine> Dependency resolution is actually pretty trivial.
<SmoothPorcupine> It probably halts on error.
Hanmac1 has joined #ruby
yasushi has joined #ruby
<SmoothPorcupine> No sense doing work for something you know has already failed.
sassamo has quit [Remote host closed the connection]
<ClientAlive> hmm... now this makes me curious ( curiousity killed the cat though ) lol
<ClientAlive> anyway, back to my install I guess. knowing the answer to this won
ch0mskiii has quit [Read error: Connection reset by peer]
sassamo has joined #ruby
<ClientAlive> won't stop me from that
shedd has joined #ruby
sassamo has quit [Read error: Connection reset by peer]
fgo has quit [Remote host closed the connection]
ch0mskiii has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
sassamo has joined #ruby
xcv has joined #ruby
agjacome has quit [Quit: leaving]
fgo has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
<benzrf> hey
<benzrf> has anybody here used Faye?
mary5030 has quit [Remote host closed the connection]
shedd has quit [Ping timeout: 272 seconds]
gr33n7007h has quit [Remote host closed the connection]
jtdowney has quit []
<lpvb> faye?
cong has quit [Quit: lake front]
<lpvb> oh nvm
danshultz has joined #ruby
mary5030 has joined #ruby
nfk has quit [Quit: yawn]
zz_anildigital is now known as anildigital
Cache_Money has joined #ruby
mocfive has quit [Remote host closed the connection]
mocfive has joined #ruby
iamdoo2 has joined #ruby
mocfive has quit [Read error: Connection reset by peer]
iamdoo2 has quit [Remote host closed the connection]
iamdoo2 has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
danshultz has quit [Ping timeout: 240 seconds]
dseitz has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mr_red has quit [Ping timeout: 264 seconds]
meatherly has quit [Remote host closed the connection]
meatherly has joined #ruby
angusigu1ss has quit [Ping timeout: 252 seconds]
mikepack has joined #ruby
rubyn00b has joined #ruby
<rubyn00b> Hi there rubylists
<benzrf> hello
<rubyn00b> I am landing for the first time here, do you guys help each other with the problems. ?
mr_red has joined #ruby
Solnse has quit [Remote host closed the connection]
Solnse has joined #ruby
tyl_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ewnd9 has joined #ruby
vlad_starkov has joined #ruby
tyl_ has joined #ruby
<SmoothPorcupine> rubyn00b: Yes, hello.
<benzrf> yeah
kizzx2 has quit [Quit: Leaving.]
vlad_starkov has quit [Read error: Connection reset by peer]
kate_r has joined #ruby
<rubyn00b> Write a function, `no_repeats(year_start, year_end)`, which takes a range of years and outputs those years which do not have any repeated digits.
<rubyn00b> Can somebody help me with this please .
<rubyn00b> For example no_repeats(1234, 1234) should give [1234]
<rubyn00b> no_repeats(1980, 1987).should == [
ghanima has quit [Ping timeout: 248 seconds]
<centrx> hmm
<SmoothPorcupine> rubyn00b: Integer#uptio
<SmoothPorcupine> rubyn00b: Integer#upto rather
habanany1 has joined #ruby
<BraddPitt> rubyn00b you doing App Academy prep work?
<centrx> rubyn00b, There might be some fancy mathematical way to determine what numbers have no repeated digits, but otherwise the straightforward way is to convert the integer to a string and do something with the characters
ohwhoa has quit [Quit: woah!]
<rubyn00b> YEs sir, you got it .
habanany2 has joined #ruby
habanany has quit [Quit: Leaving.]
<BraddPitt> I start my cohort tomorrow there haha
<rubyn00b> I assume, you have done App Academy's stuffs? Or google gave it away?
<BraddPitt> NY or SF?
<rubyn00b> SF
<BraddPitt> same here
grieg has quit [Quit: grieg]
<rubyn00b> Wow, great
tyl_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rubyn00b> I am so hard trying to get in. I m on 2nd code challange
<rubyn00b> Freked out about it.
<BraddPitt> Yeah, I was too
axl_ has quit [Quit: axl_]
<BraddPitt> You just gotta forget about your nerves and study
<rubyn00b> Any tips on what to expect.
<rubyn00b> I am about to take that code challange 2 in an hr.
anildigital is now known as zz_anildigital
<BraddPitt> We aren't allowed to say the specifics, but I can tell you that the prep work on their github will prepare you very well
gja has joined #ruby
<BraddPitt> if you can do the majority of those exercises without a problem, you will be fine
<SmoothPorcupine> rubyn00b: Integer#divmod by the desired base.
shedd has joined #ruby
<SmoothPorcupine> Is 2002 a year with repeating digits?
habanany1 has quit [Ping timeout: 272 seconds]
<benzrf> g2g see yall
benzrf has left #ruby [#ruby]
bradhe has joined #ruby
daxroc has quit [Quit: Leaving.]
mocfive has joined #ruby
OdNairy has joined #ruby
shedd has quit [Ping timeout: 245 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
Tritania has quit [Ping timeout: 245 seconds]
Deele has joined #ruby
Vivekananda has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 272 seconds]
meatherly has quit [Remote host closed the connection]
banjara has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
axl_ has joined #ruby
jailbot has joined #ruby
trickyhero has quit [Ping timeout: 245 seconds]
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SmoothPorcupine has left #ruby [#ruby]
jailbot has quit [Client Quit]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Aryasam has quit [Ping timeout: 260 seconds]
tyl has joined #ruby
Tritania has joined #ruby
gja has joined #ruby
bradhe has joined #ruby
gja has quit [Client Quit]
mr_red has quit [Max SendQ exceeded]
mr_red has joined #ruby
nisstyre has quit [Quit: Leaving]
sassamo has quit [Read error: Connection reset by peer]
SiliconG has joined #ruby
sassamo has joined #ruby
SiliconG has quit [Max SendQ exceeded]
SiliconG has joined #ruby
Aryasam has joined #ruby
tylersmith has joined #ruby
yasushi has quit [Remote host closed the connection]
Steve445 has joined #ruby
OdNairy has quit [Ping timeout: 265 seconds]
tylersmi_ has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
iamsean has quit [Quit: iamsean]
tyl has quit [Ping timeout: 272 seconds]
sethen has quit [Quit: Leaving...]
shedd has joined #ruby
pu22l3r_ has joined #ruby
tyl has joined #ruby
IceDragon has quit [Quit: Space~~~]
cj3kim has joined #ruby
daxroc has joined #ruby
OdNairy has joined #ruby
OdNairy has quit [Client Quit]
Hanmac has joined #ruby
pu22l3r_ has quit [Ping timeout: 248 seconds]
shedd has quit [Ping timeout: 272 seconds]
cj3kim has quit [Ping timeout: 272 seconds]
axl_ has quit [Quit: axl_]
habanany2 has quit [Read error: Connection reset by peer]
habanany has joined #ruby
Hanmac1 has quit [Ping timeout: 240 seconds]
sassamo has quit [Remote host closed the connection]
sambao21 has joined #ruby
sassamo has joined #ruby
therod has joined #ruby
zz_anildigital is now known as anildigital
banjara has quit [Ping timeout: 248 seconds]
zxq9 has quit [Read error: Connection reset by peer]
habanany has quit [Ping timeout: 260 seconds]
rubyn00b has quit [Quit: irc2go]
angusigu1ss has joined #ruby
tyl has quit [Quit: Textual IRC Client: www.textualapp.com]
daxroc has quit [Ping timeout: 248 seconds]
sassamo has quit [Ping timeout: 265 seconds]
sambao21 has quit [Ping timeout: 260 seconds]
therod has quit [Ping timeout: 245 seconds]
zxq9 has joined #ruby
iamdoo2 has quit [Remote host closed the connection]
Cache_Money has quit [Quit: Cache_Money]
angusigu1ss has quit [Ping timeout: 272 seconds]
kitak_ has joined #ruby
kevinykchan has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
kevinykchan has joined #ruby
vlad_starkov has joined #ruby
fantasticsid has joined #ruby
jasonrobertfox has joined #ruby
zxq9 has quit [Ping timeout: 248 seconds]
kevinykchan has quit [Client Quit]
<fantasticsid> Hello! I have a question about define_method
<centrx> Hi
recurrence has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kitak has quit [Ping timeout: 245 seconds]
<fantasticsid> i want to use define_method to dynamically define a method
mhenrixon has joined #ruby
<fantasticsid> i know i can pass a symbol to define_method as the name of the method
<fantasticsid> but how can i customise the formal arguments of the defined method?
jasonrobertfox is now known as jrobertfox
top4o has quit [Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]]
vlad_starkov has quit [Ping timeout: 272 seconds]
Aryasam has quit [Ping timeout: 252 seconds]
Lewix has joined #ruby
<centrx> fantasticsid, define_method takes a block, and the parameters of that block are the parameters of the method
soba has joined #ruby
ev1luti0n has joined #ruby
<centrx> define_method(:my_method) { |arg1, arg2| puts arg1 }
<fantasticsid> right
<ev1luti0n> im very very new ^_^ im trying to deploy an irc bot
<ev1luti0n> seems simple enough
<ev1luti0n> but it's my first time
<fantasticsid> so what if i want to programmatically pass in the name of arg1?
<centrx> I see
<centrx> Interesting
Aryasam has joined #ruby
<centrx> fantasticsid, Well, let's think about this, what is the reason for doing that, can't it be named anything?
<centrx> ev1luti0n, Go on...
<fantasticsid> reason i'm doing this is i want to generate some apis from a specifications programmatically, and for each method i have some required arguments, i want to pass in those required arguments..
<ev1luti0n> do i have to clone this install somewhere specific
yarou has quit [Remote host closed the connection]
<fantasticsid> i will be using the name of the formal arguments in the method definition body..
<fantasticsid> for eg.
<fantasticsid> if i have method_name = :square, arg_name = :x
<ev1luti0n> i was using git bash and it placed it in c:\user\username\bitches
<centrx> fantasticsid, Why does _your_ method have to have the same internal argument name as the API?
<ev1luti0n> is that fine
<centrx> fantasticsid, Is the dynamic method going to be used in an API with keyword arguments?
<fantasticsid> i want to programmatically generate def square(x) puts x.to_s; puts x * x end
<Steve445> anyone use RubyJS or Opal?
octoberry has joined #ruby
<fantasticsid> no, positional
zxq9 has joined #ruby
<fantasticsid> reason is those arguments are required arguments, so i want to generate positional arguments so the API is safer
gnephiak has joined #ruby
<centrx> ev1luti0n, That should be fine
e^0 has joined #ruby
<centrx> fantasticsid, But they can be named anything? If they are positional, no one sees the variable name except the compiler?
shedd has joined #ruby
niklasb has quit [Ping timeout: 264 seconds]
Riking has quit [Ping timeout: 264 seconds]
xcv has quit [Remote host closed the connection]
<fantasticsid> but i still need to refer to those names in my method definition
<fantasticsid> actually the api will have multiple arguments
<fantasticsid> for eg., args_list = [:x, :y]
<centrx> I don't really understand, but you can use class_eval
<fantasticsid> ooh
<ev1luti0n> unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/1.8/bcrypt_ext.so, ski
<ev1luti0n> pping
<fantasticsid> i'm really new to ruby
<ev1luti0n> that's what happens when i install dependancies
<centrx> ev1luti0n, I think that is just a warning, not a show-stopping error?
nanothief has joined #ruby
<centrx> fantasticsid, but you have the name in the method definition |arg|
Riking has joined #ruby
Riking has joined #ruby
Riking has quit [Changing host]
m104 has quit [Quit: bye]
octoberry has quit [Ping timeout: 245 seconds]
<centrx> fantasticsid, Do you have the real code you are working with?
<fantasticsid> yeah, but if i use `arg`, then the name of the arguments is `arg` right? What i want is to customise the name of argument so that i can use these names in my method definition..
shedd has quit [Ping timeout: 264 seconds]
iamdoo2 has joined #ruby
<fantasticsid> you can see here i have a list of apis i want to define
<fantasticsid> for now i'm doing it manually
danijoo_ has quit [Read error: Connection reset by peer]
bradhe has quit [Remote host closed the connection]
<centrx> fantasticsid, Do you have to write those methods yourself, or just pass the arguments through?
danijoo has joined #ruby
guardianx has joined #ruby
musty_ is now known as musty
guardianx_ has quit [Ping timeout: 245 seconds]
<fantasticsid> pass it through
bradhe has joined #ruby
<fantasticsid> you see the definition of create_domain is fairly simple
Alina-malina has quit [Read error: Connection reset by peer]
jso has quit [Quit: Goodbye]
<fantasticsid> just compose a hash out of name of arguments and their value, then pass it to the `call` method
browndawg has quit [Ping timeout: 265 seconds]
Alina-malina has joined #ruby
sambao21 has joined #ruby
sambao21 has quit [Client Quit]
anildigital is now known as zz_anildigital
<fantasticsid> so the question really is, once i have the method lists and required arguments names for each of these methods, how can i programmatically generate all apis like i'm doing here with create_domain..
<centrx> Okay hold on
<ev1luti0n> hey centrx this uses sqlite
<ev1luti0n> DATABASE_URL="c:\ruby200\bitches-master\bitches.sql"
<ev1luti0n> <--
<ev1luti0n> does that seem feasible
icantbecool has joined #ruby
<ev1luti0n> it's defauled at sqlite:memory
icantbecool has left #ruby [#ruby]
daxroc has joined #ruby
<fantasticsid> maybe i'll just digress and simply collect all positional arguments and keyword arguments, zip them up with the required arguments list into a hash, then merge keyword arguments, and finally pass them to `call`
<fantasticsid> that way seems to be viable
bradhe has quit [Ping timeout: 272 seconds]
v0n has quit [Ping timeout: 264 seconds]
pranny has joined #ruby
<fantasticsid> but loses the benefit of more informative error reporting if user passes wrong number of arguments..
jso has joined #ruby
zxq9 has quit [Ping timeout: 264 seconds]
f0ster has quit [Read error: Connection reset by peer]
<centrx> ev1luti0n, sqlite works...
<centrx> ev1luti0n, Usually the extension is *.db I believe
<centrx> fantasticsid, You don't need to do anything to merge positional and keyword arguments, the keyword arguments are converted into a hash from the * splat
aniM has joined #ruby
<centrx> Steve445, RubyJS sounds really great....
<Steve445> Have you looked at OpalRB?
<centrx> This is the first I've seen of both of them
<musty> hmm.
guardianx has quit []
<Steve445> This is a interesting example i have been looking at: https://github.com/opal/opal-node/blob/master/examples/express-wrapper.rb
guardianx has joined #ruby
phansch has joined #ruby
<ev1luti0n> centrx, aint this some crap
<ev1luti0n> i have 2 versions of cinch
<ev1luti0n> none of which work
bradhe has joined #ruby
mehlah has joined #ruby
allen_on_c has joined #ruby
_lazarevsky has quit [Quit: Page closed]
araujo has quit [Remote host closed the connection]
<centrx> ev1luti0n, Uninstall what you don't need :)
<ev1luti0n> but it says i need cinch and stuff
<ev1luti0n> :(
<centrx> ev1luti0n, Right but you only need one of the versions
<centrx> the older version is only depended on "cinch-imdb"
Steve445 has quit [Quit: Steve445]
<ev1luti0n> look at that screenshot though
<ev1luti0n> oh so i uninstall which ?
<centrx> ev1luti0n, If you need cinch-imdb, maybe there is an update for that as well
<centrx> Uninstall cinch-1.1.3 and cinch-imdb-0.0.2
aniM has quit [Ping timeout: 252 seconds]
Aryasam has quit [Ping timeout: 245 seconds]
Czupa has joined #ruby
JasmeetQA has joined #ruby
kaldrenon has joined #ruby
razibog has joined #ruby
jack_rabbit has joined #ruby
shedd has joined #ruby
chipotle has quit [Ping timeout: 245 seconds]
<ev1luti0n> centrx, i found this https://github.com/britishtea/cinch-imdb/releases
emanu has joined #ruby
nism has joined #ruby
Aryasam has joined #ruby
altin has joined #ruby
lagweezle has quit [Quit: leaving]
kaldrenon has quit [Ping timeout: 260 seconds]
daxroc has quit [Ping timeout: 265 seconds]
shedd has quit [Ping timeout: 240 seconds]
heftig has quit [Quit: Quitting]
banjara has joined #ruby
tonni_ has quit [Remote host closed the connection]
Czupa has quit [Remote host closed the connection]
<ev1luti0n> centrx, ok it's missing a dependancy
<ev1luti0n> youtube_it
therod has joined #ruby
browndawg has joined #ruby
mikepack has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
ktosiek has quit [Read error: Operation timed out]
banjara has quit [Ping timeout: 240 seconds]
noop has joined #ruby
altin has quit [Ping timeout: 260 seconds]
banjara has joined #ruby
ktosiek has joined #ruby
OdNairy has joined #ruby
therod has quit [Ping timeout: 264 seconds]
angusigu1ss has joined #ruby
* sickweezle kicks himself as he discovers that a great deal of his headache may have been memory exhaustion, and may very well have wasted MANY hours chasing the wrong problem. -.-
banjara has quit [Client Quit]
Aryasam has quit [Ping timeout: 252 seconds]
bradhe has quit [Remote host closed the connection]
predator217 has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
recurrence has joined #ruby
nism has quit [Quit: This computer has gone to sleep]
<pontiki> sickweezle: take a break. make some tea. maybe a soak.
<pontiki> just time to disengage, you know?
<sickweezle> Yar. :)
<sickweezle> Just that I had no clue there was a memory problem on the remote host, causing load issues and having spent a long time on things that aren't the problem is irritating.
<pontiki> memory problems are a bitch to solve
angusigu1ss has quit [Ping timeout: 265 seconds]
<sickweezle> Well, in this case, the ec2 instance is a micro instance and had no swap configured. Now it has 1GB of swap. ^^
Aryasam has joined #ruby
vlad_starkov has joined #ruby
thesheff17 has quit [Ping timeout: 272 seconds]
bradhe has quit [Ping timeout: 265 seconds]
<sickweezle> Or maybe.
<sickweezle> Bleah.
<sickweezle> I think it is time for sleep.
* pontiki nods
<pontiki> fresh eyes tomorro
<sickweezle> capistrano + rbenv + bundler + trying to daemonize the thing from ruby code called from command line + being still quite noobish = ouch
* sickweezle staggers off towards bed.
vlad_starkov has quit [Ping timeout: 240 seconds]
danijoo has quit [Read error: Connection reset by peer]
dik_dak has quit [Quit: Leaving]
danijoo has joined #ruby
bradhe has joined #ruby
yacks has quit [Read error: Connection reset by peer]
recurrence has quit [Quit: super tired]
<ev1luti0n> i've never compiled from source or anything
<ev1luti0n> i need an old version of nokogiri
<ev1luti0n> but when i found it it has no gemspec to build
<ev1luti0n> what do i do
<ev1luti0n> this is all i see in the directory
tylersmi_ has quit [Remote host closed the connection]
Spami has joined #ruby
makara has joined #ruby
vlad_starkov has joined #ruby
shedd has joined #ruby
kitak_ has quit [Remote host closed the connection]
Aryasam has quit [Ping timeout: 252 seconds]
zipper has joined #ruby
heidi has joined #ruby
ph8 has quit [Read error: Connection reset by peer]
v10energy has quit [Ping timeout: 272 seconds]
browndawg has quit [Quit: Leaving.]
ghanima has joined #ruby
MissionCritical has quit [Read error: Operation timed out]
zipper has quit [Client Quit]
zipper has joined #ruby
predator117 has joined #ruby
<fantasticsid> centrx Thanks!!
Lewix has quit [Remote host closed the connection]
<centrx> fantasticsid, Ah you did see it
mary5030 has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
shedd has quit [Ping timeout: 252 seconds]
apeiros has quit [Remote host closed the connection]
rubyn00b has joined #ruby
bradhe has joined #ruby
apeiros has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Aryasam has joined #ruby
vlad_starkov has joined #ruby
<rubyn00b> Anybody here joining Appacademy anytime soon?
pu22l3r_ has joined #ruby
kevinykchan has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
kitak has joined #ruby
<centrx> rubyn00b, Probably not at this hour :)
<rubyn00b> Looks like it.
tonni has joined #ruby
brunops has quit [Ping timeout: 272 seconds]
bradhe has quit [Ping timeout: 252 seconds]
apeiros has quit [Ping timeout: 272 seconds]
ClientAlive has quit [Quit: I quit...]
<rubyn00b> Anybody care to explain what is the point of just joining this irc and logging out. I dont see any conversation happening here. Or am I missing something?
pu22l3r_ has quit [Ping timeout: 272 seconds]
bal has joined #ruby
<jrobertfox> lol agree, i wish i could hid that
vlad_starkov has joined #ruby
Nanuq has quit [Ping timeout: 245 seconds]
<ev1luti0n> i need an old version of nokogiri
mhenrixon has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
<ev1luti0n> how do i do it when there is no .gemspec file?
mhenrixon has joined #ruby
<shevy> wat
<shevy> you need a .gemspec file if you wanna build a .gem file
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<shevy> nokogiri is on rubygems.org
brennanMKE has quit [Remote host closed the connection]
MissionCritical has joined #ruby
<shevy> there are links to older archives as well. in this case https://rubygems.org/gems/nokogiri/versions ev1luti0n
<shevy> alternatively one can specify the version on the commandline
brennanMKE has joined #ruby
user258467 has joined #ruby
Barrin6 has quit [Remote host closed the connection]
<rubyn00b> I am assuming you need the .gemspec file and mention gem version on gemfile : For example gem "nokogiri", "~> 1.6.1"
phipes has joined #ruby
<ev1luti0n> gotcha rubyn00b
<ev1luti0n> but then i try to load the app and
<ev1luti0n> C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require': cannot load such file -- nokogiri/
<ev1luti0n> 2.0/nokogiri (LoadError)
<rubyn00b> Correct me if I am wrong @shevy
brennanMKE has quit [Ping timeout: 240 seconds]
<shevy> rubyn00b dunno, seems to be a rails question suddenly
<ev1luti0n> im really trying to get this working
makara has quit [Quit: Leaving]
<ev1luti0n> but it seems like all the dependancies are conflicting or something
<ev1luti0n> >_<
<snkcld> apparently Kernel.Float is occupying alot of time, in my jruby profiling... how would i track down exactly where Kernel.Float is being called?
<ev1luti0n> seems like they didn't update the .gems file
<shevy> did you install cinch yet ev1luti0n
<shevy> gem install cinch
<ev1luti0n> i have it
Nanuq has joined #ruby
<ev1luti0n> shevy, every gem i have
<ev1luti0n> i have two versions of cinch it seems :(
<shevy> uninstall one then
<shevy> gem install cinch
<shevy> Fetching: cinch-2.0.11.gem (100%)
<shevy> gem uninstall bla --version 1.1.9
<rubyn00b> @ev1luti0n Nice repo name BTW, I have to opt-out, dunno much. My apologies.
mocfive has quit [Remote host closed the connection]
JasmeetQA has quit [Read error: Connection reset by peer]
<shevy> rb app.rb
<shevy> /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- cinch/extensions/authentication (LoadError)
<shevy> hmmm
<ev1luti0n> C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require': cannot load such file -- nokogiri/
<ev1luti0n> 2.0/nokogiri (LoadError)
dseitz has joined #ruby
<shevy> seems like a bug
mocfive has joined #ruby
<shevy> I mean that you dont have nokogiri
<shevy> did you do a gem install nokogiri anyway?
roolo has joined #ruby
<shevy> start irb, then do: require 'nokogiri'. if the gem install before worked then require must work.
klaut has joined #ruby
<ev1luti0n> shevy i have nokogiri 1.5.2 x86-mingw32
<ev1luti0n> oh
<ev1luti0n> irb?
gja has joined #ruby
<shevy> irb.exe on windows
lifestream has joined #ruby
<shevy> should work if you open cmd.exe
<shevy> win+r key I think
w4pm has joined #ruby
<shevy> windows sucks so much, go install the unix tools like from MSys, that will help a bit :P
<shevy> that require line seems weird btw
<shevy> anyway, in irb try:
<shevy> require 'nokogiri'
<shevy> nokogiri-1.5.5.gem
rubyn00b has quit [Quit: irc2go]
abroco has joined #ruby
<abroco> hello
cj3kim has joined #ruby
<shevy> hi abrocoli
<ev1luti0n> it says cannot load such file
<ev1luti0n> nokogiri/2.0/nokogiri
<abroco> Given the string "hello'\bye", how can I trim the string so that it gives back "hello" alone, trimming special characters, and everything that comes after it?
<abroco> hello shevy :)
mocfive has quit [Ping timeout: 264 seconds]
JasmeetQA has joined #ruby
<lifestream> Is there some sort of ruby tutorial that teaches by creating a program, and adding features with each lesson? I'm not a programmer but I've been exposed to programming in the past, so I already know the theory.
shedd has joined #ruby
<lifestream> I mean, I need help learning how to actually make programs, but I already know integers, if/else, classes, etc...
shime has joined #ruby
yacks has joined #ruby
Kneferilis has joined #ruby
srji has joined #ruby
w4pm has quit [Ping timeout: 264 seconds]
<shevy> abroco there is no in-built method as far as I know
<ev1luti0n> shevy, what am i typing in irb.bat
<shevy> abroco you can use .split() with a regex or build your own method
<ev1luti0n> require 'nokogiri'
<shevy> ev1luti0n that error message seems bogus
Lewix has joined #ruby
<shevy> let me first show you how a proper error message looks:
Spami has quit [Read error: Connection reset by peer]
<shevy> rerequire 'foobar'
<shevy> LoadError: cannot load such file -- foobar
<shevy> ^^^
<shevy> sorry
<shevy> require 'foobar'
<shevy> that was it. ok? your error message shows something odd
<shevy> It shows: "cannot load such file --nokogiri/2.0/nokogiri"
<ev1luti0n> yep
<shevy> in my opinion this means that something went wrong with the install or something like that
<shevy> because otherwise, it would show the name output 1:1
<shevy> in this case "cannot load such file -- nokogiri"
<abroco> shevy: want to help me? :)
gja has quit [Quit: This computer has gone to sleep]
shedd has quit [Ping timeout: 272 seconds]
<shevy> abroco have you decided what solution you want to go?
<shevy> the method way?
<abroco> shevy: Already using s = n.delete("^a-zA-Z0-9")
<abroco> But all that does is "hellobye" instead of "hello'\bye"
srji_ has quit [Ping timeout: 252 seconds]
<shevy> >> "hello'\bye".delete("^a-zA-Z0-9")
<eval-in> shevy => "helloye" (https://eval.in/95242)
simoz15 has joined #ruby
<shevy> well you want to truncate after that
<shevy> so you should (1) build a method that queries whether you have a special character first
lsmola_ has joined #ruby
<shevy> (2) find the position of that character
<shevy> (3) readjust the length of the string to [0, that_position_of_that_special_character]
shime has quit [Ping timeout: 264 seconds]
<shevy> with .index() you can find out the position
dagobah has joined #ruby
estebistec has joined #ruby
<shevy> "hello'\bye".index("\b") # => 6
<shevy> >> "hello'\bye"[0,6]
<eval-in> shevy => "hello'" (https://eval.in/95245)
shime has joined #ruby
<shevy> I have to leave here soon for ~3 hours
tonni has quit [Ping timeout: 245 seconds]
<abroco> So i have to figure out how to use index on the random set of characters which are special.
lyanchih has quit [Quit: lyanchih]
razibog has quit [Ping timeout: 245 seconds]
altin has joined #ruby
altin has quit [Changing host]
altin has joined #ruby
heidi has quit [Quit: Leaving.]
speakingcode has quit [Ping timeout: 245 seconds]
angusigu1ss has joined #ruby
lyanchih has joined #ruby
browndawg has joined #ruby
Hanmac1 has joined #ruby
gja has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
ckinni_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tonni has joined #ruby
gja has quit [Client Quit]
angusigu1ss has quit [Ping timeout: 264 seconds]
cjsarette has quit [Ping timeout: 272 seconds]
simoz15 has quit [Ping timeout: 253 seconds]
blaz3rz has quit [Remote host closed the connection]
Hobogrammer has quit [Ping timeout: 272 seconds]
e^0 has quit [Quit: WeeChat 0.4.1]
JasmeetQA has quit [Ping timeout: 240 seconds]
JasmeetQA1 has joined #ruby
sski has joined #ruby
simoz15 has joined #ruby
abroco has quit [Quit: leaving]
yasushi has joined #ruby
estebistec has quit [Remote host closed the connection]
guardianx has quit [Remote host closed the connection]
brennanMKE has joined #ruby
mhenrixon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
altin has quit [Ping timeout: 264 seconds]
predator117 has quit [Ping timeout: 248 seconds]
yasushi has quit [Ping timeout: 252 seconds]
blaxter has joined #ruby
Aryasam_ has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
jrobertfox has quit [Quit: Take it easy.]
predator117 has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
jprovazn has quit [Quit: Leaving]
jprovazn has joined #ruby
coderhs has joined #ruby
vlad_starkov has joined #ruby
okinomo has joined #ruby
phipes has quit [Remote host closed the connection]
shedd has joined #ruby
okinomo has quit [Client Quit]
predator117 has quit [Ping timeout: 245 seconds]
rubyracer has joined #ruby
makara has joined #ruby
shedd has quit [Ping timeout: 245 seconds]
brennanMKE has quit [Ping timeout: 252 seconds]
mbuf has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
predator117 has joined #ruby
<mbuf> is there a method or gem to convert byte words into IEEE floating point values?
therod has joined #ruby
altin has joined #ruby
tylersmith has joined #ruby
visof has joined #ruby
Hanmac has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
ace_striker has quit [Ping timeout: 245 seconds]
simoz16 has joined #ruby
arctarus has joined #ruby
LexicalScope has quit [Ping timeout: 272 seconds]
simoz15 has quit [Ping timeout: 245 seconds]
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
Hanmac2 has joined #ruby
tylersmith has quit [Ping timeout: 245 seconds]
Hanmac1 has quit [Ping timeout: 260 seconds]
<bnagy> pack'll do floats
zeropx has joined #ruby
Hanmac has quit [Ping timeout: 265 seconds]
tyl has joined #ruby
jaxxstorm has quit [Quit: ZNC - http://znc.in]
andikr has joined #ruby
jaxxstorm has joined #ruby
srji has quit [Quit: leaving]
<mbuf> bnagy, I have actual double words (4 bytes) from a device in HEX, which I would like to convert to floating point
<mbuf> bnagy, can you give an example?
visof has quit [Ping timeout: 272 seconds]
visof has joined #ruby
senayar has joined #ruby
plotter has joined #ruby
plotter has joined #ruby
Solnse has quit [Remote host closed the connection]
<bnagy> 4 bytes? That's single precision I guess?
recurrence has joined #ruby
<recurrence> I am saving an activerecord and it is causing an undesirable side effect (a different db table is being updated). Is there a way to trace what is doing that?
roolo has quit [Quit: Leaving...]
<bnagy> >> "\x00\x00\x80?".unpack('f')
<eval-in> bnagy => [1.0] (https://eval.in/95250)
<bnagy> recurrence: I'd suggest asking #rubyonrails
<recurrence> oh ok
<recurrence> thanks bnagy
<bnagy> stick around, someone might answer here at some point
<bnagy> but I think you have a better chance over there, AR isn't much used outside rails afaik
altin has quit [Ping timeout: 264 seconds]
<bnagy> and it's effing spooky
<recurrence> ahh
<recurrence> hehehe
<recurrence> is it ever
<recurrence> it's flippin untraceable :)
simoz16 has quit [Ping timeout: 245 seconds]
cj3kim has quit [Remote host closed the connection]
<dseitz> AR supports logging; rails happens to employ this by default, outside of rails, you need to configure it
<recurrence> I see the logs where the database is being updated
centrx has quit [Quit: Leaving]
<recurrence> but I can't figure out what ruby code is causing those database entries to be issued
<recurrence> it seems like once I call save, it's a magical black box of database interaction :D
troessner has joined #ruby
tonni has quit [Remote host closed the connection]
emanu has quit [Quit: emanu]
drumusician has joined #ruby
<dseitz> saving is just a query, wonder what could be up too :)
<recurrence> it produces 112 lines of SQL :P
<mbuf> bnagy, thanks; which is the LSB in \x00\x00\x80?
cj3kim has joined #ruby
jackneill has joined #ruby
jackneill has joined #ruby
jackneill has quit [Changing host]
shedd has joined #ruby
brennanMKE has joined #ruby
ktun has joined #ruby
blackmesa has joined #ruby
nanoyak has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
apeiros has joined #ruby
flori has quit [Ping timeout: 245 seconds]
flori has joined #ruby
shedd has quit [Ping timeout: 252 seconds]
razibog has joined #ruby
tyl has quit [Ping timeout: 252 seconds]
ahawkins has joined #ruby
ahawkins_ has joined #ruby
heftig has joined #ruby
ahawkins has quit [Disconnected by services]
ahawkins_ is now known as ahawkins
tyl has joined #ruby
tyl has quit [Remote host closed the connection]
claymore has joined #ruby
flori has quit [Ping timeout: 245 seconds]
cj3kim has quit [Remote host closed the connection]
angusigu1ss has joined #ruby
rootshift has joined #ruby
bradhe has joined #ruby
yfeldblu_ has quit [Ping timeout: 264 seconds]
phansch_ has joined #ruby
jonahR has quit [Quit: jonahR]
yasushi has joined #ruby
brennanMKE has quit [Ping timeout: 248 seconds]
phansch has quit [Ping timeout: 252 seconds]
tyl has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
angusigu1ss has quit [Ping timeout: 245 seconds]
felixjet__ has joined #ruby
coderhs has quit [Ping timeout: 252 seconds]
cj3kim has joined #ruby
mavcunha has joined #ruby
wiku5_ has quit [Read error: Operation timed out]
thomasvs has quit [Read error: Operation timed out]
yokel has quit [Read error: Operation timed out]
tommylommykins has quit [Read error: Operation timed out]
Liothen has quit [Read error: Connection reset by peer]
tommylommykins has joined #ruby
wiku5_ has joined #ruby
thomasvs has joined #ruby
thomasvs has quit [Changing host]
thomasvs has joined #ruby
senayar has quit [Read error: Connection reset by peer]
einarj has joined #ruby
yokel has joined #ruby
moshee has quit [Read error: Operation timed out]
yosafbridge has quit [Read error: Operation timed out]
senayar has joined #ruby
moshee has joined #ruby
yosafbridge has joined #ruby
Shidash1 has joined #ruby
felixjet_ has quit [Read error: Operation timed out]
St_Marx has quit [Quit: Ex-Chat]
Shidash has quit [Ping timeout: 240 seconds]
visof has quit [Quit: Reconnecting]
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
camilasa_ has joined #ruby
Megtastique has joined #ruby
nism has joined #ruby
cj3kim has quit [Remote host closed the connection]
MindfulMonk has joined #ruby
Schmidt has joined #ruby
noname001__ has joined #ruby
Megtastique has quit [Client Quit]
mavcunha has quit [Quit: Computer has gone to sleep.]
daxroc has joined #ruby
tyl has quit [Quit: Textual IRC Client: www.textualapp.com]
predator117 has quit [Ping timeout: 272 seconds]
flori has joined #ruby
DouweM has quit [Ping timeout: 252 seconds]
mavcunha has joined #ruby
tonni has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
<pipecloud> bnagy: Some people do indeed use activerecord outside of rails. The sane ones use datamapper though.
Al__ has joined #ruby
olivier_bk has joined #ruby
thealch3m1st has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
greenarrow has joined #ruby
<apeiros> pipecloud: if you already know AR, is it worth the effort of learning DM?
shedd has joined #ruby
<pipecloud> apeiros: I think it depends on if you like the datamapper pattern over the activerecord pattern. Some people seem to avoid learning new things though.
joonty_ has quit [Quit: WeeChat 0.4.2]
<apeiros> it's not that I'm not willing to learn new things
mavcunha has quit [Client Quit]
<pipecloud> apeiros: I like datamapper in ruby because it takes a lot less effort.
<apeiros> but AR and DM are rather complex beasts with (probably, since I don't know DM) each its fair share of non-trivial issues which require a lot of in-depth knowledge
TMM has joined #ruby
<pipecloud> datamapper migrations are pretty nice.
multi_io has quit [Ping timeout: 252 seconds]
thealch3m1st has joined #ruby
shadoi has joined #ruby
multi_io has joined #ruby
shedd has quit [Ping timeout: 272 seconds]
obs has joined #ruby
RoxasShadowRS has joined #ruby
shime has quit [Ping timeout: 252 seconds]
lifestream has quit [Quit: 目指してたゴールに届きそうな時本当はまだ遠いこと気付いたの?]
<apeiros> pipecloud: DM monkey patches Symbol?
<pipecloud> I don't know, does it?
pen has quit []
<apeiros> 12 Person.all(:name.like => 'S%', :id => [ 1, 2, 3, 4, 5 ])
<apeiros> seems like
danijoo has quit [Read error: Connection reset by peer]
<apeiros> :name.like
bradleyprice has joined #ruby
nvrch has joined #ruby
danijoo has joined #ruby
sparrovv has joined #ruby
predator117 has joined #ruby
Hanmac has joined #ruby
shadoi has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
ninjapig1 has joined #ruby
chipotle has joined #ruby
dayepa1 has quit [Quit: dayepa1]
recurrence has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hanmac2 has quit [Ping timeout: 248 seconds]
sparrovv has quit [Remote host closed the connection]
ninjapig has quit [Ping timeout: 252 seconds]
bcz has joined #ruby
dayepa1 has joined #ruby
rdark has joined #ruby
mikecmpbll has joined #ruby
Deejay_ has joined #ruby
brennanMKE has joined #ruby
asmodlol has joined #ruby
dweeb_ has joined #ruby
<bcz> hi everyone. can someone give me a hint here? i want to have the RECORD_FILENAME variable to append a integer (loop counter) so it creates a new file every time
phansch_ is now known as phansch^
Hanmac has quit [Ping timeout: 245 seconds]
mhenrixon has joined #ruby
<apeiros> pipecloud: I read that as a "yes, it does"
<pipecloud> apeiros: In a pretty ugly way too.
<apeiros> hm, I don't like deprecation errors without information about how to upgrade
<apeiros> #{"raise \"explicit use of '#{sym}' operator is deprecated (#{caller.first})\"" if sym == :eql || sym == :in}
<apeiros> and they put singleton_class into the wrong class and forgot that Kernel methods are all module_function…
brennanMKE has quit [Ping timeout: 245 seconds]
Asimuth has joined #ruby
Asimuth has quit [Remote host closed the connection]
gtsiftsis has joined #ruby
<apeiros> public_instance_methods(false).any? { |m| m.to_sym == :to_str } # lol? never heard of method_defined? it seems…
roolo has joined #ruby
<apeiros> rails isn't role model code. it seems DM isn't either :(
<pipecloud> It could probably use some love, but I don't really like contributing to large projects.
yasushi has quit [Remote host closed the connection]
srji has joined #ruby
<apeiros> my experience with large projects has invariable been one of unwilling gatekeepers
<apeiros> not interested in fighting such fights.
einarj_ has joined #ruby
Baluse has quit [Ping timeout: 272 seconds]
nari has quit [Ping timeout: 245 seconds]
einarj has quit [Read error: Connection reset by peer]
Baluse has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Client Quit]
yfeldblum has joined #ruby
predator117 has quit [Ping timeout: 272 seconds]
Aryasam has joined #ruby
Aryasam_ has quit [Read error: Connection reset by peer]
<bcz> rec_out = `/usr/bin/arecord -D plughw:#{options[:microphone]},0 -d #{SAMPLE_DURATION} -f #{FORMAT} -t wav #{RECORD_FILENAME} 2>/dev/null` <-- how can i append the loop counter variable to RECORD_FILENAME in ruby?
ozgun has joined #ruby
<apeiros> bcz: that command contains already various variables, and you can't figure out how to insert another one? o0
<mikecmpbll> lol :D
<bcz> i want to know how to append variables
<bcz> means #{RECORD_FILENAME+i}?
DouweM has joined #ruby
<apeiros> well, appending is an operation on objects, not variables. assuming RECORD_FILENAME is a String, String#<< would be the append method
shime has joined #ruby
<bcz> and even then its not what i want because i would like to have "wave1.wav" and not "wave.wav1"
<apeiros> you can't do "string"+1, no.
<bcz> okay thanks. ill check that method
frankbutt has joined #ruby
<apeiros> well, separate suffix and filename then
<apeiros> I don't think you want to append, though.
<bcz> good idea. i just need to "combine" all those strings then
frankbutt has left #ruby [#ruby]
<apeiros> otherwise you'll have wave1, wave12, wave123 etc.
<mikecmpbll> i think you're looking for this utility method: `insert_counter_variable_before_file_ext(file, counter)`
<mikecmpbll> :'D
<apeiros> mikecmpbll: *cough*, sure
Fyyr13 has quit [Remote host closed the connection]
<apeiros> bcz: the #{} thingy is called "interpolation"
<bcz> ill see if i can create my own function
<bcz> sadly the ruby syntax seems to be a bit different to the stuff i usually use
<apeiros> sadly?
<apeiros> what'd be the point of different languages if they were all the same?
shedd has joined #ruby
<bcz> sadly for me - dont get me wrong :)
Wolland has quit [Remote host closed the connection]
obs has quit [Quit: Konversation terminated!]
workmad3 has joined #ruby
bradhe has joined #ruby
mbuf has quit [Ping timeout: 252 seconds]
necrotic_ has joined #ruby
DouweM has quit [Ping timeout: 272 seconds]
roolo has quit [Remote host closed the connection]
shedd has quit [Ping timeout: 272 seconds]
Wolland has joined #ruby
mhenrixon has quit [Read error: Connection reset by peer]
predator117 has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
thomasvs has quit [Read error: Operation timed out]
necrotic_ has quit [Remote host closed the connection]
necrotic_ has joined #ruby
mhenrixon has joined #ruby
karupanerura is now known as zz_karupanerura
marr has joined #ruby
thomasvs has joined #ruby
thomasvs has quit [Changing host]
thomasvs has joined #ruby
necrotic_ has quit [Remote host closed the connection]
popl has joined #ruby
popl has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
obs has joined #ruby
razibog has quit [Ping timeout: 272 seconds]
necrotic_ has joined #ruby
Hanmac has joined #ruby
necrotic_ has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 245 seconds]
heftig has quit [Ping timeout: 272 seconds]
Xeago has joined #ruby
phansch^ is now known as phansch
yfeldblum has joined #ruby
thomasxie has quit [Read error: Connection reset by peer]
mhenrixon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
heftig has joined #ruby
Advocation has joined #ruby
obs has quit [Remote host closed the connection]
mojjojo has joined #ruby
cba has quit [Quit: Leaving]
zeeraw has joined #ruby
Elhu has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
shaunbaker has joined #ruby
ephemerian has joined #ruby
mojjojo has quit [Client Quit]
predator117 has joined #ruby
obs has joined #ruby
mojjojo has joined #ruby
nairys has quit [Quit: nairys]
kitak has quit [*.net *.split]
roolo has joined #ruby
Asimuth has joined #ruby
kitak has joined #ruby
tdubya has quit [Ping timeout: 245 seconds]
Asimuth has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 265 seconds]
relix has joined #ruby
drumusician has quit [Read error: Connection reset by peer]
lkba has quit [Ping timeout: 272 seconds]
drumusician has joined #ruby
charliesome has joined #ruby
timonv has quit [Remote host closed the connection]
<mikecmpbll> just found out about `retry` in a begin..rescue..end
<mikecmpbll> neat ..
obs has quit [Quit: Konversation terminated!]
rdark has quit [Quit: leaving]
Asimuth has joined #ruby
DouweM has joined #ruby
bradhe has joined #ruby
rdark has joined #ruby
Asimuth has quit [Remote host closed the connection]
shedd has joined #ruby
Wolland has quit [Remote host closed the connection]
<bcz> whats the correct way to call my function/method in this line?
<bcz> rec_out = `/usr/bin/arecord -D plughw:#{options[:microphone]},0 -d #{SAMPLE_DURATION} -f #{FORMAT} -t wav `puts insert_counter_variable_before_file_ext('RECORD_FILENAME', 'i') `2>/dev/null
<bcz> blame mikecmpbll for the naming ;p
<mikecmpbll> :'D
obs has joined #ruby
Asimuth has joined #ruby
<bcz> my method looks like this: def insert_counter_variable_before_file_ext(record_filename, counter) record_filename + counter + ".wav" end
kitak has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 272 seconds]
xue has joined #ruby
xue__ has joined #ruby
xue__ has quit [Client Quit]
shedd has quit [Ping timeout: 252 seconds]
predator117 has joined #ruby
<mikecmpbll> if counter is an integer that will fail.
<tobiasvl> mismatched `
<tobiasvl> bcz: why not just interpolate insert_counter_variable_before_file_ext('RECORD_FILENAME', 'i')
Asimuth has quit [Remote host closed the connection]
<tobiasvl> like you interpolated the rest
kitak has joined #ruby
<bcz> mmh i am not familiar with the interpolate thingy
<bcz> let me google that
<tobiasvl> well you're using it
<tobiasvl> #{variable}
<bcz> its not my script
<tobiasvl> ah ok
francisfish has joined #ruby
DaniG2k has joined #ruby
<bcz> mikecmpbll: so what do i do with the integer? it surely is one
<bcz> i have this line now (interpolated i guess): rec_out = `/usr/bin/arecord -D plughw:#{options[:microphone]},0 -d #{SAMPLE_DURATION} -f #{FORMAT} -t wav #{puts insert_counter_variable_before_file_ext('RECORD_FILENAME', 'i')} 2>/dev/null
Asimuth has joined #ruby
<tobiasvl> remove the puts from the last interpolation
<mikecmpbll> yeah
<mikecmpbll> and remove the quotes around 'i'
<mikecmpbll> and record_filename
<tobiasvl> ah yeah i didn't even see those wtf
Asimuth has quit [Remote host closed the connection]
<mikecmpbll> and put counter.to_s in your method.
Xeago has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
Xeago has joined #ruby
<bcz> okay removing the quotes actually solved the syntax errors now ;o lets see about the counter.to_s :)
<bcz> thanks again!
Asimuth has joined #ruby
brennanMKE has joined #ruby
Asimuth has quit [Remote host closed the connection]
end_guy has quit [Remote host closed the connection]
Asimuth has joined #ruby
allen_on_c has quit [Quit: Leaving]
Asimuth has quit [Remote host closed the connection]
mojjojo has quit [Quit: mojjojo]
brennanMKE has quit [Ping timeout: 245 seconds]
mojjojo has joined #ruby
shaunbaker has quit [Remote host closed the connection]
gregoriokusowski has joined #ruby
predator117 has quit [Ping timeout: 252 seconds]
kiri has quit [Ping timeout: 260 seconds]
Asimuth has joined #ruby
Asimuth has quit [Remote host closed the connection]
razibog has joined #ruby
bradleyprice has quit [Read error: Connection reset by peer]
workmad3 has quit [Quit: leaving]
adamholt has joined #ruby
kiri has joined #ruby
Asimuth has joined #ruby
Asimuth has quit [Remote host closed the connection]
Asimuth has joined #ruby
xlogic has joined #ruby
mengu has quit [Remote host closed the connection]
nari has joined #ruby
Asimuth has quit [Remote host closed the connection]
Asimuth has joined #ruby
<bcz> mikecmpbll, tobiasvl: its working - thanks both for your help
diegoviola has joined #ruby
<bcz> naming is a bit off due to a logic error somewhere but the basi functionality is exactly what i wanted
Asimuth has quit [Remote host closed the connection]
ktun has quit []
kaffeebohne has joined #ruby
Asimuth has joined #ruby
blaxter has quit [Ping timeout: 260 seconds]
timonv has joined #ruby
Asimuth has quit [Remote host closed the connection]
<kaffeebohne> Hi. What would be the best way to pair the gsubs to get cleaner code? https://paste.xinu.at/I1d/ I tried to give an array of regexes but that doesn't work.
fuhgeddaboudit has joined #ruby
shedd has joined #ruby
cow_ has joined #ruby
predator117 has joined #ruby
JBreit has quit [Read error: Connection reset by peer]
ace_striker has quit [Ping timeout: 245 seconds]
<apeiros> kaffeebohne: nobody told you not to use regexen with html?
<popl> kaffeebohne: Are you trying to parse HTML?
<apeiros> in that case: don't use regexen for html!
<popl> kaffeebohne: You should check out nokogiri
<kaffeebohne> I try to get rid of the html tags.
<apeiros> yes. what I said.
ghr has joined #ruby
<popl> You can do that with Nokogiri.
<kaffeebohne> cool. Can I get the value of for example "<a title="thevalueiwant">" too?
<apeiros> yes
<popl> absolutely
<kaffeebohne> ok, thanks :)
<kaffeebohne> But why is regex bad for html?
<popl> kaffeebohne: Because HTML is not a regular language.
<apeiros> because html is not regular
<apeiros> Nokogiri.HTML('<a href="#foo" title="lalala">Some link</a>. Some <b>bold text</b>').text # => "Some link. Some bold text"
<kaffeebohne> ah, ok
<kaffeebohne> Thank you very much. :)
<apeiros> Nokogiri.HTML('<a href="#foo" title="lalala">Some link</a>. Some <b>bold text</b>').css('a').map { |a| a["title"] } # => ["lalala"]
shedd has quit [Ping timeout: 252 seconds]
SHyx0rmZ has joined #ruby
yasushi has joined #ruby
Kingsy has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 260 seconds]
<Kingsy> can I get help here installing rails?
<Kingsy> or would that be offtopic?
<DaniG2k> Kingsy: try rubyonrails
<popl> Kingsy: You'd probably get better help in #rubyonrails
Asimuth has joined #ruby
<Kingsy> thanks
blackmesa has joined #ruby
Kingsy has quit [Changing host]
Kingsy has joined #ruby
<diegoviola> hi
SHyx0rmZ has quit [Ping timeout: 245 seconds]
cow_ has quit []
Kingsy has left #ruby [#ruby]
JBreit has joined #ruby
Asimuth has quit [Remote host closed the connection]
Baluse has quit [Ping timeout: 245 seconds]
wildroman2 has joined #ruby
blaxter has joined #ruby
Baluse has joined #ruby
predator117 has quit [Ping timeout: 272 seconds]
SHyx0rmZ has joined #ruby
razibog has quit [Ping timeout: 260 seconds]
<Hanmac> apeiros: .xpath('//a/@title') is interesting too
Asimuth has joined #ruby
Asimuth has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby
Asimuth has joined #ruby
Galgorth has quit []
Asimuth has quit [Remote host closed the connection]
predator117 has joined #ruby
therod has quit [Ping timeout: 252 seconds]
nucc has joined #ruby
xue has quit [Quit: Leaving]
aniM has joined #ruby
DaniG2k has quit [Quit: leaving]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
alexherbo2 has quit [Quit: WeeChat 0.4.2]
bradhe has joined #ruby
Asimuth has joined #ruby
obs has quit [Quit: Konversation terminated!]
Asimuth has quit [Remote host closed the connection]
Asimuth has joined #ruby
Asimuth has quit [Remote host closed the connection]
therod has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bradhe has quit [Ping timeout: 240 seconds]
Amart41 has joined #ruby
Salsa has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
shedd has joined #ruby
obs has joined #ruby
duncan_bayne has joined #ruby
Amart41 has quit [Ping timeout: 245 seconds]
<duncan_bayne> Hey is help with Rubywarrior (https://github.com/ryanb/ruby-warrior) on-topic here? Want to check before referring people here in a presentation.
<duncan_bayne> It's a 'how to learn Ruby with rubywarrior' meetup presentation for newbies.
predator117 has quit [Ping timeout: 272 seconds]
jtdowney has joined #ruby
shedd has quit [Ping timeout: 252 seconds]
Salsa has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
user258467 has quit [Quit: Quitte]
kitak has quit [Remote host closed the connection]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<DouweM> duncan_bayne: if they can phrase it as Ruby problems rather than RubyWarrior problems specifically, I don't see why not
brennanMKE has joined #ruby
justsee has joined #ruby
justsee has left #ruby [#ruby]
sepp2k has joined #ruby
<jxport> does ARGF.each_line read the entire file into memory?
brennanMKE has quit [Ping timeout: 252 seconds]
<DouweM> jxport: I'd wager it does not
decoponio has joined #ruby
Fyyr13 has joined #ruby
razibog has joined #ruby
eka has joined #ruby
<jxport> DouweM: OK cool - I guess I'll just see if my system crashes... I find it poor that this is not explicitly documented
shay- has joined #ruby
Speed has joined #ruby
<shay-> hi, why is this failing? if ( key.include? "a" || key.eql? "b" || key.eql? "c" )
duncan_bayne has quit [Ping timeout: 252 seconds]
gregoriokusowski has quit [Quit: gregoriokusowski]
<tobiasvl> what is key?
iamdoo2 has quit [Remote host closed the connection]
<shay-> hash.each_key do | key |
gregoriokusowski has joined #ruby
<tobiasvl> okay. so what's hash?
<DouweM> jxport: It's a method on IO, and lots of IOs can't be read "all at once"
Advocation has quit [Quit: Advocation]
<tobiasvl> why are you first checking if key INCLUDES "a", then if it's eql? to "b" or "c"?
<shay-> but only of of there expressions is working but the || seems to make problems
<tobiasvl> what is key?
<DouweM> shay-: don't use eql?, just use ==
Advocation has joined #ruby
<shay-> DouweM: thought this is equal?
<shay-> thx
<apeiros> shay-: because precedence
<tobiasvl> shay-: are the keys symbols? if so, don't check against strings
<apeiros> a.include? "a" || b.include? "a" --> is interpreted as a.include?("a" || b.include? "a") I think
mikecmpbll has joined #ruby
<apeiros> use parens to make order explicit
dangerousdave has joined #ruby
Shidash1 has quit [Ping timeout: 265 seconds]
<shay-> tobiasvl: I don't really know a key.class prints String
<DouweM> apeiros: that gives an error even
Asimuth has joined #ruby
Asimuth has quit [Remote host closed the connection]
noname001__ has quit [Read error: Connection reset by peer]
<shay-> DouweM: thanks with == it is working. But its not clear for me why this works and .eql? "" throws a syntax error
w4pm has joined #ruby
alexherbo2 has joined #ruby
<shay-> DouweM: oh sorry no not working as exprected. does not hit b or c only everything containing an a
predator117 has joined #ruby
<DouweM> because ==, while implemented as a method, is parsed as an operator and thus doesn't need parentheses in this case. .eql? does
<tobiasvl> shay-: did you see what apeiros wrote?
<apeiros> DouweM: actually "is parsed as an operator" --> still just plain precedence
<shay-> tobiasvl: yes thanks this helps
<shay-> apreiros: but why is it doing so? :/
kizzx2 has joined #ruby
<DouweM> apeiros: right, but this operator has higher precendence than a regular method call, so it being an operator matters
<apeiros> aaaand yet a new mutilation of my nick
kizzx2 has quit [Max SendQ exceeded]
kizzx2 has joined #ruby
<shay-> apeiros: haha sorry :/
<DouweM> shay-: show us your hash and all of your code
<apeiros> DouweM: I would not use that terminology. it's misleading.
<apeiros> it's really just plain precedence at play.
<Xeago> aight, I'm starting a new project
<Xeago> it's an irc-bot
<shay-> DouweM: it is a opscode chef cookbook. but with if ( ( key.include? "a" ) || ( key == "b" ) || ( key == "c" ) ) it works now
<shay-> thank you very much for the help
<DouweM> apeiros: yeah, I can see where you're coming from. I tried to mix in the fact that == is still a method, but that may have been misleading
<Xeago> what testrunner would you recommend?
noname001__ has joined #ruby
<DouweM> shay-: you don't need all of the parentheses here, just use key.include?("a")
w4pm has quit [Ping timeout: 240 seconds]
predator117 has quit [Ping timeout: 245 seconds]
<shay-> DouweM: ah ok thanks not I understand a bit better - I guess
lkba has joined #ruby
zipper has quit [Ping timeout: 248 seconds]
razibog has quit [Ping timeout: 252 seconds]
<Hanmac> DouweM: what about: Regexp.union("a",/\A[bc]\Z/) ?
<apeiros> \z, not \Z :)
mercwithamouth has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<apeiros> why use Regex.union? just write it directly
<DouweM> Hanmac: definitely makes the code easier to read :)
<apeiros> key =~ /a|\A[bc]\z/
<apeiros> Xeago: I prefer the simpler ones - test/unit or minitest
francisfish has quit [Remote host closed the connection]
prateekp has joined #ruby
_justin has joined #ruby
<prateekp> Is there any library or gem for support vector machines
obs has quit [Quit: Konversation terminated!]
predator117 has joined #ruby
necrotic_ has joined #ruby
Beoran_ has quit [Ping timeout: 245 seconds]
necrotic_ has quit [Remote host closed the connection]
therod has quit [Ping timeout: 260 seconds]
gozali has quit [Remote host closed the connection]
jtdowney has quit []
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
necrotic_ has joined #ruby
necrotic_ has quit [Remote host closed the connection]
wildroman2 has joined #ruby
_justin has left #ruby [#ruby]
SHyx0rmZ has quit [Ping timeout: 272 seconds]
bambuka has joined #ruby
necrotic_ has joined #ruby
necrotic_ has quit [Remote host closed the connection]
duncan_bayne has joined #ruby
duncan_bayne has quit [Client Quit]
JasmeetQA has joined #ruby
camilasa_ has quit [Remote host closed the connection]
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
marr has quit [Ping timeout: 245 seconds]
sski has quit [Remote host closed the connection]
therod has joined #ruby
sski has joined #ruby
camilasa_ has joined #ruby
JasmeetQA1 has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
phinfonet has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
iamdoo2 has joined #ruby
SHyx0rmZ has joined #ruby
sski has quit [Ping timeout: 245 seconds]
Beoran_ has joined #ruby
therod has quit [Ping timeout: 264 seconds]
bradhe has quit [Ping timeout: 252 seconds]
obs has joined #ruby
poulson has joined #ruby
zoscoy has joined #ruby
zoscoy has quit [Client Quit]
michael_lee has joined #ruby
iamdoo2 has quit [Ping timeout: 265 seconds]
sepp2k1 has joined #ruby
nucc has quit [Quit: This computer has gone to sleep]
<bcz> i'd like to send a mail with ruby and attach a file. does someone have a hint/keyword for me?
<bcz> so i can check google
sepp2k has quit [Ping timeout: 260 seconds]
<shevy> bcz, try IMAP
<apeiros> @ bcz
zipper has joined #ruby
<bcz> thanks both
kewubenduben has joined #ruby
obs has quit [Quit: Konversation terminated!]
SHyx0rmZ has quit [Ping timeout: 252 seconds]
<shevy> shay-!!! we almost have the same nick!
<shevy> can someone do "nick apieros" pls
mhenrixon has joined #ruby
therod has joined #ruby
obs has joined #ruby
yasushi has quit [Remote host closed the connection]
zipper has quit [Client Quit]
zeeraw has joined #ruby
shedd has joined #ruby
sski has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<prateekp> Is there any library or gem for support vector machines
tkuchiki has joined #ruby
zipper has joined #ruby
therod has quit [Ping timeout: 252 seconds]
shedd has quit [Ping timeout: 252 seconds]
Maitiu has quit [Ping timeout: 252 seconds]
<apeiros> prateekp: a quick google led me to this: http://www.igvita.com/2008/01/07/support-vector-machines-svm-in-ruby/
achru has joined #ruby
anomaly_ has joined #ruby
tkuchiki has quit [Ping timeout: 272 seconds]
kizzx2 has quit [Quit: Leaving.]
brennanMKE has joined #ruby
solars has joined #ruby
<solars> hi, I have IDs like "IT_FU_BAR" (only uppercase letters and _) which I need to map to an integer ID that always is the same. does anyone know something I could use to quickly do this, like a hash, anything?
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
SHyx0rmZ has joined #ruby
therod has joined #ruby
brennanMKE has quit [Ping timeout: 264 seconds]
gregoriokusowski has quit [Ping timeout: 272 seconds]
gja has joined #ruby
netQT has joined #ruby
Aryasam has quit [Ping timeout: 248 seconds]
Guedes has joined #ruby
Aryasam has joined #ruby
Guedes has left #ruby [#ruby]
<mercwithamouth> ok i can't get octopress to work for the life of me. i've used it in the past with no problem but it just hangs when i run bundle install
<apeiros> solars: treat it as base 27 and convert it
soba has quit [Ping timeout: 240 seconds]
fuhgeddaboudit has joined #ruby
<mercwithamouth> my gemfile seems alright...after looking at a few documented issues https://gist.github.com/anonymous/8647615
<Hanmac> solars: where does the IDs come from? from a lib, from you or are they user generated?
<apeiros> e.g. something like alpha = ['_', *'A'..'Z']; id.reverse.each_char.inject(0) { |numeric, char| (numeric + alpha[char])*27 }/27
<Hanmac> mercwithamouth: #bundler has its own channel
vlad_starkov has joined #ruby
<mercwithamouth> indeed...hmm odd. what does it mean when 'ruby -v' causes your terminal to hang?
<apeiros> ah, simpler - numeric*27 + …, then you can drop the last /
rickruby has joined #ruby
<apeiros> and should be alpha.index(char) instead of alpha[char]
<apeiros> beware, the numbers will go very high quickly
vlad_starkov has quit [Remote host closed the connection]
<apeiros> ah, and the reverse is superfluous :)
vlad_starkov has joined #ruby
zeeraw has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Hanmac> apeiros: i found another funny way:
<Hanmac> >> "IT_FU_BAR".each_byte.with_index.inject(0) {|s,(c,i)| s + c * 10**i }
<eval-in> Hanmac => 8926430413 (https://eval.in/95320)
<apeiros> Hanmac: bad base
<apeiros> if you use each_byte, you'd have to use 256 as base. with 10, you'll have collisions.
<Hanmac> hm yeah, but it was a funny idea ..
rickruby has quit [Ping timeout: 240 seconds]
kewubenduben has quit [Ping timeout: 252 seconds]
Squarepy has joined #ruby
pedda has joined #ruby
<apeiros> could also abuse to_i(27)
OdNairy has quit [Read error: Connection reset by peer]
griffindy has joined #ruby
<apeiros> id.tr("_ABCDEFGHIJKLMNOPQRSTUVWXYZ", "0123456789abcdefghijklmnopq").to_i(27)
OdNairy has joined #ruby
vlad_starkov has joined #ruby
obs has quit [Quit: Konversation terminated!]
Elhu has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
<apeiros> actually, tr supports ranges
<apeiros> id.tr("_A-Z", "0-9a-q").to_i(27)
shedd has joined #ruby
altin has joined #ruby
yfeldblum has joined #ruby
blaxter has quit [Quit: foo]
tyl has joined #ruby
blaxter_ has joined #ruby
browndawg has quit [Quit: Leaving.]
kizzx2 has joined #ruby
<solars> apeiros, Hanmac I just found out that I only have 11 chars for the integer ID... the IDs are generated, I cannot influence them, I just get the string and need a representation of int(11) of it
shedd has quit [Ping timeout: 252 seconds]
<apeiros> solars: in that case, you're fucked
kizzx2 has quit [Client Quit]
<apeiros> how long can the string ids be?
yfeldblum has quit [Ping timeout: 245 seconds]
lyanchih has quit [Quit: lyanchih]
Mon_Ouie has quit [Ping timeout: 248 seconds]
gregoriokusows-1 has joined #ruby
Virtualize|away has joined #ruby
Spooner has joined #ruby
popl has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
<solars> apeiros, string ids can be 16, int ids limited to 11 :)
<solars> I think I have to store a unique ID somewhere
<apeiros> yes, fucked as I said
<solars> yeah
<apeiros> what you want then is hashing and some way to deal with collisions. but sounds like you're stuck in a lot of suck.
<solars> yeah that's overkill, I'll try to finda different way.. in fact it's only about 200 IDs, but like this it's a mess
heftig has quit [Ping timeout: 272 seconds]
angusigu1ss has joined #ruby
gregoriokusows-1 has quit [Ping timeout: 252 seconds]
<apeiros> then just keep an enumeration table on your side
<apeiros> each new string id gets an autoinc id
jtdowney has joined #ruby
<solars> ah
thisirs has joined #ruby
<solars> I just saw I can remove the first 7 chars, because they are always fixed
<solars> they have a common prefix
<apeiros> won't help
<apeiros> still 7625597484986 max decimal number, which is 13 digits
Aryasam has quit [Ping timeout: 260 seconds]
gregoriokusowski has joined #ruby
<solars> right
<solars> damn
bradhe has quit [Ping timeout: 265 seconds]
mhenrixon is now known as mhenrixon|afk
<apeiros> assuming that 11 digit int really means 32bit int, you need 6 digits or less
Elhu has joined #ruby
MrZYX|off is now known as MrZYX
<solars> yeah..
<solars> I'm not sure if there is something like a hash function that could be used for this
Es0teric has joined #ruby
<apeiros> as said, with hash functions you automatically also need collision handling
falood has joined #ruby
<apeiros> unless no new string ids will ever be generated
<solars> hm yeah
<solars> what a mess
<apeiros> then you can "just" use a perfect hashing algorithm
Es0teric has quit [Max SendQ exceeded]
iamdoo2 has joined #ruby
mhenrixon|afk is now known as mhenrixon
phansch has quit [Quit: Leaving]
marr has joined #ruby
kirun has joined #ruby
Aryasam has joined #ruby
ahawkins has quit [Quit: leaving]
iamdoo2 has quit [Ping timeout: 245 seconds]
ewnd9 has quit [Remote host closed the connection]
_justin has joined #ruby
_justin has left #ruby [#ruby]
yacks has quit [Remote host closed the connection]
mhenrixon has quit [Ping timeout: 252 seconds]
visof_ has joined #ruby
clamstar has quit [Quit: Computer has gone to sleep.]
Davey has joined #ruby
visof has quit [Ping timeout: 252 seconds]
Aryasam has quit [Ping timeout: 272 seconds]
spastorino has joined #ruby
spastorino has quit [Client Quit]
h4rz has joined #ruby
<bcz> is the formatting in ruby syntax relevant?
<bcz> tabstops i.e.
EngierkO has joined #ruby
<apeiros> it's relevant for people who read code
<apeiros> in some places, space/no-space makes a difference. same for newline/no-newline
<bcz> okay thanks
<apeiros> convention is 2 spaces for indent. spaces for alignment.
ewnd9 has joined #ruby
shedd has joined #ruby
shime has quit [Ping timeout: 269 seconds]
anomaly_ has quit [Quit: see you when I see you]
mehlah has quit [Read error: Connection reset by peer]
mehlah_ has joined #ruby
ewnd9 has quit [Remote host closed the connection]
Es0teric has joined #ruby
Es0teric has quit [Remote host closed the connection]
obs has joined #ruby
shedd has quit [Ping timeout: 272 seconds]
prateekp has quit [Ping timeout: 245 seconds]
thomasxie has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 265 seconds]
JasmeetQA has quit [Quit: Leaving.]
ninjapig1 has quit [Ping timeout: 252 seconds]
ewnd9 has joined #ruby
brennanMKE has joined #ruby
tt1187 has joined #ruby
Aryasam has joined #ruby
freerobby has joined #ruby
h4rz has quit [Quit: h4rz]
brennanMKE has quit [Ping timeout: 240 seconds]
e^0 has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
shvelo has joined #ruby
<shvelo> I need a simple template engine which can include a file easily
[krisbulman] is now known as krisbulman
<shvelo> like using a single {{ include something.html }}
Aryasam has quit [Ping timeout: 272 seconds]
hiall has joined #ruby
benzrf has joined #ruby
<benzrf> whats new ruby fans
<benzrf> shevy: i finally have a gem idea that i am working on
thealch3m1st has quit [Quit: Textual IRC Client: www.textualapp.com]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tyl has quit [Ping timeout: 252 seconds]
jkamenik has joined #ruby
tyl has joined #ruby
Zubin has joined #ruby
Zubin has quit [Client Quit]
joonty has joined #ruby
joonty has quit [Client Quit]
mark_locklear has joined #ruby
w4pm has joined #ruby
joonty has joined #ruby
joonty has quit [Client Quit]
Brolen has joined #ruby
anekos__ has quit [Remote host closed the connection]
tzorvas has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
anekos has joined #ruby
joonty has joined #ruby
krawchyk has joined #ruby
joonty has quit [Client Quit]
<tzorvas> is there any function for array, which picks all elements after the first desired matching element? without using a[found_index, -1]
w4pm has quit [Write error: Broken pipe]
* benzrf shrugs
<benzrf> tzorvas: drop
<MrZYX> drop_while
francisfish has joined #ruby
<tzorvas> thank you both, drop_while is what I was looking for
tonni has quit [Remote host closed the connection]
rootshift has joined #ruby
agjacome has joined #ruby
shedd has joined #ruby
visof_ has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
falood has quit []
bradhe has joined #ruby
ikawnoclast has joined #ruby
joonty has joined #ruby
joonty has quit [Client Quit]
shedd has quit [Ping timeout: 252 seconds]
dkamioka has joined #ruby
kalelsage has joined #ruby
tt1187 has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 252 seconds]
tt1187 has joined #ruby
Aryasam has joined #ruby
clamstar has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
breakingthings has joined #ruby
IceyEC has joined #ruby
dblessing has joined #ruby
krz has quit [Quit: WeeChat 0.4.2]
yalue has joined #ruby
tvw has joined #ruby
nikkos has quit [Quit: Computer has gone to sleep.]
lyanchih_ has joined #ruby
bal has quit [Quit: bal]
Elhu has joined #ruby
_root has joined #ruby
visof has joined #ruby
weeb1e has quit [Ping timeout: 264 seconds]
rmorello has joined #ruby
_root has left #ruby [#ruby]
weeb1e has joined #ruby
Brolen has quit [Remote host closed the connection]
yedimind has joined #ruby
ctp has joined #ruby
tonni has joined #ruby
nikkos has joined #ruby
iamdoo2 has joined #ruby
Aryasam has quit [Ping timeout: 252 seconds]
Aryasam has joined #ruby
nikkos has quit [Remote host closed the connection]
kalelsage has quit [Quit: ThrashIRC v2.9 sic populo comunicated]
agjacome has quit [Ping timeout: 248 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
visof has quit [Remote host closed the connection]
coderhs has joined #ruby
visof has joined #ruby
iamdoo2 has quit [Ping timeout: 265 seconds]
sergicles has joined #ruby
danshultz has joined #ruby
bettyclamp has joined #ruby
<bettyclamp> I'm getting "undefined method `local_variable_get' for #<Binding:0x007faeaa16a660> (NoMethodError)". Any idea why? The docs say that that's one of the four methods of a Binding instance.
dx7 has joined #ruby
<benzrf> bettyclamp: context?
<apeiros> bettyclamp: wrong ruby version?
<benzrf> bettyclamp: it fails for me
<benzrf> 1.9
<apeiros> you should use docs which match your ruby version
dx7 has quit [Client Quit]
<bettyclamp> apeiros: you're absolutely right. Thanks for the heads-up.
dx7 has joined #ruby
<benzrf> hmm
<benzrf> is there a way to do something only once for every time a method is called in a template?
fella5s has quit [Remote host closed the connection]
mehlah_ is now known as mehlah
<MrZYX> you mean for all calls?
gja has joined #ruby
nvrch has left #ruby [#ruby]
<MrZYX> cache the result: def foo; @foo ||= compute_foo; end
_humani has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
orionstein_away is now known as orionstein
gja has quit [Client Quit]
browndawg has joined #ruby
shredding has joined #ruby
nism has quit [Quit: Leaving]
joonty has joined #ruby
shedd has joined #ruby
fella5s has joined #ruby
ahawkins has joined #ruby
_humani has quit [Client Quit]
<apeiros> I usually use @_foo ||=, just to indicate the lazy nature of the ivar
yacks has joined #ruby
thomasxie has quit [Ping timeout: 269 seconds]
Wolland has joined #ruby
<MrZYX> hm, that always reminds me of hungarian notation, which I don't like
linduxed has quit [Read error: Operation timed out]
gja has joined #ruby
Zubin has joined #ruby
blaxter_ has quit [Quit: foo]
netQT has quit [Read error: Connection reset by peer]
<benzrf> so im makin a thingy for javascript rmi
<benzrf> over websockets
shedd has quit [Ping timeout: 245 seconds]
AlSquirrel has joined #ruby
orionstein is now known as orionstein_away
tonni has quit [Read error: Connection reset by peer]
msuszczy has joined #ruby
blaxter_ has joined #ruby
gnephiak has quit [Remote host closed the connection]
vpretzel has joined #ruby
gnephiak has joined #ruby
<bcz> anyone any idea about this warning message? i just dont like warnings ;)
<bcz> mmh
<benzrf> bcz: which warning message?
thisirs has quit [Remote host closed the connection]
<bcz> doesnt appear again
<bcz> just restarted my script but didnt change anything
brennanMKE has joined #ruby
<bcz> was this one basically: warning: shadowing outer local variable
lyanchih_ has quit [Quit: lyanchih_]
Zubin has quit [Read error: Connection reset by peer]
<MrZYX> foo = "x"; something.map {|foo| # <- this foo is shadowing the foo pointing to "x"; }
nomadic has quit [Ping timeout: 252 seconds]
<bcz> ah okay
jerius has joined #ruby
nomadic has joined #ruby
bthesorceror has joined #ruby
<Hanmac> bcz: also notice that is a difference between 1.8 and 1.9+ because 1.8 does overwrite not shadow
brennanMKE has quit [Ping timeout: 260 seconds]
<MrZYX> who does still care about 1.8 except you Hanmac?
<Hanmac> i only warned him, i dont what that he comes back yelling that his code does not work
chipotle has quit [Quit: cya]
<MrZYX> you know I then have no problem yelling back why he's still using 1.8
lyanchih_ has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
<shevy> benzrf what gem idea?
thesheff17 has joined #ruby
coderhs has quit [Quit: Leaving]
zoscoy has joined #ruby
tonni has joined #ruby
zoscoy has quit [Client Quit]
<benzrf> shevy: what i said earlier
<benzrf> shevy: the thing where it is a rack middleware and then you can do <%= generate_js(ruby_obj, "jsvar") %> and then in the js after that you can use jsvar as the ruby object because of rmi over websockets
LaPetiteFromage has joined #ruby
Davey has joined #ruby
tannerburson has joined #ruby
gregoriokusowski has quit [Quit: gregoriokusowski]
<benzrf> im callin it Clientside
tkuchiki has joined #ruby
gnephiak has quit [Read error: Connection reset by peer]
fgo has quit [Remote host closed the connection]
gnephiak has joined #ruby
thesheff17 has quit [Read error: Operation timed out]
v0n has joined #ruby
enebo has joined #ruby
<shevy> hmm
<shevy> the name is not flashy enough
<shevy> noone will remember it
Aryasam has quit [Ping timeout: 252 seconds]
<shevy> call it ....
<shevy> BenzPower!
* benzrf whaps shevy with a rolled-up newpaper
<benzrf> *newspaper
gja has quit [Quit: This computer has gone to sleep]
carif has joined #ruby
Albright has quit [Quit: Albright]
Astralum has joined #ruby
bradhe has joined #ruby
gnephiak has quit [Remote host closed the connection]
gja has joined #ruby
common1 has joined #ruby
pranny has quit [Quit: Leaving.]
common1 has left #ruby [#ruby]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
thesheff17 has joined #ruby
kpshek has joined #ruby
blaxter_ has quit [Ping timeout: 252 seconds]
<shevy> marketing is everything benzrf
<shevy> call it...
<shevy> superJS
bradhe has quit [Ping timeout: 264 seconds]
<shevy> or how about
<shevy> JS-Hype
altin has quit [Ping timeout: 245 seconds]
<shevy> JS-RainbowMaker
<shevy> JSattack!
<shevy> js_middleman
shedd has joined #ruby
duggiefresh has joined #ruby
<shevy> js_rubysockets
<shevy> :D
Brolen has joined #ruby
<shevy> man, this is fun
yfeldblum has joined #ruby
aniM has quit [Ping timeout: 245 seconds]
gja has quit [Quit: This computer has gone to sleep]
chipotle has joined #ruby
Virtualize|away has quit [Read error: Connection reset by peer]
benzrf has quit [Read error: No route to host]
Aryasam has joined #ruby
snath has quit [Ping timeout: 252 seconds]
shime has joined #ruby
phansch has joined #ruby
_justin has joined #ruby
_justin has left #ruby [#ruby]
mhenrixon has joined #ruby
Amart41 has joined #ruby
shedd has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
habanany has joined #ruby
SiliconG has quit [Ping timeout: 252 seconds]
<shevy> where is atmosx
atraylen has quit [Ping timeout: 248 seconds]
carif has quit [Quit: Ex-Chat]
MindfulMonk has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
Amart41 has quit [Ping timeout: 252 seconds]
<chipotle> how do i make all words in a string uppercase? i tried this but i get an error: puts 'Huh!? Speak up, Sonny!'.uppercase
<chipotle> what am i doing wrong?
aniM has joined #ruby
<shevy> >> puts 'Huh!? Speak up, Sonny!'.uppercase
<eval-in> shevy => undefined method `uppercase' for "Huh!? Speak up, Sonny!":String (NoMethodError) ... (https://eval.in/95405)
<shevy> chipotle this method does not exist
<shevy> >> puts 'Huh!? Speak up, Sonny!'.upcase
<eval-in> shevy => HUH!? SPEAK UP, SONNY! ... (https://eval.in/95406)
predator117 has quit [Ping timeout: 245 seconds]
sambao21 has joined #ruby
yedimind has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ewnd9 has quit [Ping timeout: 272 seconds]
blaxter_ has joined #ruby
<chipotle> shevy: oh, duh!
<chipotle> thanks :)
<shevy> \o/
<shevy> chipotle at http://ruby-doc.org/core-2.1.0/String.html you can see all inbuilt methods on the left side
<chipotle> thanks :)
sassamo has joined #ruby
<shevy> just read through the list once, your brain can remember it a little ... #partition #prepend #replace
<shevy> replace is interesting
<shevy> look:
altin has joined #ruby
<shevy> >> x = 'abc'; x.replace 'def'; x
<eval-in> shevy => "def" (https://eval.in/95407)
<shevy> \o/
<shevy> hmm wait
<shevy> >> array; x = 'abc'; array << x.object_id; x.replace 'def'; array << x.object_id; p array
<eval-in> shevy => undefined local variable or method `array' for main:Object (NameError) ... (https://eval.in/95408)
<shevy> >> array = []; x = 'abc'; array << x.object_id; x.replace 'def'; array << x.object_id; p array
<eval-in> shevy => [553587040, 553587040] ... (https://eval.in/95409)
<shevy> oh
<shevy> seems to retain the object_id
<MrZYX> sure, it's the same object
blaz3rz has joined #ruby
larissa has joined #ruby
predator117 has joined #ruby
tonni has quit [Ping timeout: 264 seconds]
sambao21 has quit [Ping timeout: 272 seconds]
dkamioka has quit [Remote host closed the connection]
kcombs has joined #ruby
MindfulMonk has joined #ruby
jlast has joined #ruby
pranny has joined #ruby
Squarepy has quit [Quit: Leaving]
mansi has joined #ruby
banister has joined #ruby
mhenrixon is now known as mhenrixon|afk
rmorello has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
fmcgeough has joined #ruby
Czupa has joined #ruby
razibog has joined #ruby
jedimind has joined #ruby
gregoriokusowski has joined #ruby
momomomomo has joined #ruby
tonni has joined #ruby
mlpinit has joined #ruby
blaxter_ has quit [Ping timeout: 265 seconds]
mmcclimon has joined #ruby
mikesplain has joined #ruby
tonni has quit [Read error: Connection reset by peer]
tonni has joined #ruby
_HolyCow1 has joined #ruby
ghanima has quit [Quit: Leaving.]
_HolyCow has quit [Ping timeout: 264 seconds]
_HolyCow1 is now known as _HolyCow
tonni has quit [Read error: Connection reset by peer]
shredding has quit [Quit: shredding]
jtdowney has quit []
_maes_ has quit [Read error: Connection reset by peer]
nfk has joined #ruby
mhenrixon|afk is now known as mhenrixon
rmorello has joined #ruby
jobewan has joined #ruby
robbyoconnor has quit [Ping timeout: 272 seconds]
brennanMKE has joined #ruby
clamstar is now known as rx
alekst has joined #ruby
Advocation has quit [Quit: Advocation]
makara has quit [Ping timeout: 272 seconds]
robbyoconnor has joined #ruby
mansi has quit [Read error: Connection reset by peer]
cjsarette has joined #ruby
noop has quit [Ping timeout: 272 seconds]
wildroman2 has quit [Remote host closed the connection]
lfox has joined #ruby
mansi has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
griffindy has joined #ruby
yedimind has joined #ruby
mansi has quit [Read error: Connection reset by peer]
dseitz has joined #ruby
pranny has quit [Quit: Leaving.]
mansi has joined #ruby
mlpinit_ has joined #ruby
Uranio has joined #ruby
bean__ has joined #ruby
<shevy> apparently ;-)
brennanMKE has quit [Ping timeout: 272 seconds]
ffranz has joined #ruby
blaxter_ has joined #ruby
<dseitz> grr... why attack github.com? obviously to piss people off, but really
robbyoconnor has quit [Client Quit]
<lectrick> If I "require" a file while inside some module definition, will the class defined inside the file I require end up defined inside that module?
jedimind has quit [Ping timeout: 248 seconds]
<lectrick> Or do "require"'s always run in the toplevel scope?
yedimind is now known as jedimind
<Uranio> dseitz: :O was github atacked?
<dseitz> it is currently being attacked
mlpinit has quit [Ping timeout: 248 seconds]
<dseitz> they had to take the repo server offline
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
Butcho has joined #ruby
<Hanmac> lectrick: require does always put into toplevel scope
<alekst> A ruby newbie here. have a question about unless statement in ruby. https://gist.github.com/alekst/8650152 this makes no sense to me. I want it to add an element to an array unless a condition is met. what am I doing wrong?
_justin has joined #ruby
_justin has quit [Client Quit]
<lectrick> Hanmac I suppose I could just try an experiment eh?
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
Fyyr13 has quit [Remote host closed the connection]
<hoelzro> alekst: well, think of that condition
<hoelzro> "unless the first element of array is 'b', add 'd' to the end of the array"
<Hanmac> lectrick: load has a second form that load into an anoymous module ... but it does not return it ;(
<hoelzro> the first element is 'a', so the conditional is entered
axl_ has joined #ruby
Butcho has quit [Client Quit]
<alekst> d'oh!
<Hanmac> banister: huhu
aniM has quit [Ping timeout: 265 seconds]
fatih96512547 has joined #ruby
Butcho has joined #ruby
<Uranio> alekst: also y could write in only one line:
Butcho has quit [Max SendQ exceeded]
michael_lee has quit [Remote host closed the connection]
<Uranio> array << "d" unless array[0] == "b"
Butcho has joined #ruby
<Uranio> [action] unless [condition]
Butcho has quit [Max SendQ exceeded]
x77686d has joined #ruby
<alekst> yes, I know about one line... I just have another version of the conditional that has two lines of code.
interactionjaxsn has joined #ruby
<alekst> thanks for all your help.
Butcho has joined #ruby
sergicles has quit [Quit: sergicles]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jcarouth has joined #ruby
Advocation has joined #ruby
<Xeago> what ruby gem converts 25m into 25*60 ?
zeeraw has joined #ruby
bradhe has joined #ruby
<shevy> the 60-gem?
fatih96512547 has left #ruby [#ruby]
<Xeago> shevy: ?
pu22l3r_ has joined #ruby
<shevy> "This absolutely useful gem will take input, then multiply it by 60."
<shevy> aaaah you mean minutes ;)
<Xeago> 25m as in 25 minutes
<Hanmac> Xeago: i am not telling you that activesupport does the shit you want ;P
<shevy> I think there is chronos and the active-record thingy has something
tylersmith has joined #ruby
<shevy> ohh ok another active* then
<shevy> Xeago look! written by apeiros! https://rubygems.org/gems/chronos
octoberry has joined #ruby
shredding has joined #ruby
Megtastique has joined #ruby
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
lmickh has joined #ruby
momomomomo has quit [Quit: momomomomo]
bradhe has quit [Ping timeout: 260 seconds]
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
netQT has joined #ruby
duggiefresh has joined #ruby
<shredding> Hey all.
Spooner has quit [Read error: No route to host]
<shevy> hi shredding
<shevy> you have a cool nick
IceDragon has joined #ruby
<shredding> :) - ex guitar player
<shredding> I'm a bit lost: Every stackoverflow answer says "Use open-uri, it handles redirects automatically"
chipotle has quit [Read error: Connection reset by peer]
francisfish has quit [Remote host closed the connection]
Butcho has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shredding> But open-uri raises a "redirection forbidden" in my case.
mansi has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
<lectrick> Can someone write up a service that lets me punch the guy(s) who are DDoS'ing Github?
mansi has joined #ruby
Butcho has joined #ruby
mengu has quit []
<lectrick> I am averse to violence except when it comes to hurting good things, then I get medieval
<Xeago> shevy: cna you point me to an example of using chronos?
chipotle has quit [Client Quit]
<shevy> Xeago hmm
<shevy> apeiros!
<Xeago> I can't find any to see if it supports "25m" => some number
<Xeago> apeiros: POKE!
baroquebobcat has quit [Quit: baroquebobcat]
yfeldblum has joined #ruby
gja has joined #ruby
shedd has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
<shredding> I see the error is a change from http to https
Aryasam has quit [Ping timeout: 272 seconds]
xcv has joined #ruby
spider-mario has joined #ruby
brennanMKE has joined #ruby
rippa has joined #ruby
Aryasam has joined #ruby
<mojjojo> this string doesnt seem to be valid in ruby ? "/playtime/report/data/media_placement/overview?format=html&amp;save=true&amp;"
Butcho has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<workmad3> >> "/playtime/report/data/media_placement/overview?format=html&amp;save=true&amp;"
<eval-in> workmad3 => "/playtime/report/data/media_placement/overview?format=html&amp;save=true&amp;" (https://eval.in/95420)
<workmad3> mojjojo: seems valid
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
<mojjojo> i am getting unterminated string meets end of file
sambao21 has joined #ruby
<apeiros> Xeago: what's up?
wildroman2 has quit [Remote host closed the connection]
<Xeago> wtf chronos?
Mattx has quit [Ping timeout: 245 seconds]
<apeiros> lolwtf?
<Xeago> yea :)
mary5030 has joined #ruby
<apeiros> what's with it?
<Xeago> can I use it to turn 25m, 25min into something more understandable?
yfeldblum has quit [Ping timeout: 252 seconds]
wildroman2 has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> I wouldn't use chronos at the moment at all. I wrote it in the 1.8 days.
shedd has quit [Ping timeout: 264 seconds]
gja has quit [Client Quit]
<shredding> I found the patch
<Xeago> yea that too
mansi has joined #ruby
<apeiros> I don't think I've added human language recognition at all
mary5030 has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
b00stfr3ak has joined #ruby
mary5030 has joined #ruby
<apeiros> I know I intended to and had some lab stuff up, but I don't think I had anything of that put into chronos when I abandoned it
mansi has joined #ruby
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
yasushi has joined #ruby
sambao21 has quit [Ping timeout: 272 seconds]
rayners has joined #ruby
hamakn has quit [Remote host closed the connection]
francisfish has joined #ruby
mansi_ has joined #ruby
yasushi has quit [Remote host closed the connection]
NemesisD has joined #ruby
mansi__ has joined #ruby
<Xeago> apeiros: do you know any library that does?
mansi has quit [Ping timeout: 245 seconds]
banisterone has joined #ruby
mhenrixon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mavcunha has joined #ruby
Albright has joined #ruby
<apeiros> maybe chronos. but I doubt it handles durations
mansi_ has quit [Ping timeout: 252 seconds]
mansi__ has quit [Ping timeout: 245 seconds]
Al__ has quit [Quit: Al__]
iamdoo2 has joined #ruby
mikepack has joined #ruby
LexicalScope has joined #ruby
Mattx has joined #ruby
wallerdev has joined #ruby
failshell has joined #ruby
dweeb_ has quit [Quit: Textual IRC Client: www.textualapp.com]
freezey has joined #ruby
bradhe has joined #ruby
Al__ has joined #ruby
Virtualize|away has joined #ruby
mikecmpbll has joined #ruby
jetblack has joined #ruby
iamdoo2 has quit [Ping timeout: 240 seconds]
duggiefresh has quit [Read error: Connection reset by peer]
jprovazn has quit [Quit: Leaving]
duggiefresh has joined #ruby
chipotle has joined #ruby
ozgun has quit [Quit: Leaving]
pedda has quit [Quit: Textual IRC Client: www.textualapp.com]
netQT has quit [Read error: Connection reset by peer]
fmcgeough has quit [Quit: fmcgeough]
geggam has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
derf- has left #ruby [#ruby]
CYMOC has quit []
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
apeiros has quit [Remote host closed the connection]
po10 has quit [Quit: ZZZzzz…]
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
po10 has joined #ruby
shaunbaker has joined #ruby
banister has joined #ruby
apeiros has joined #ruby
shedd has joined #ruby
SiliconG has joined #ruby
tyl has joined #ruby
SiliconG has quit [Read error: Connection reset by peer]
RaCx_ has joined #ruby
mlpinit_ has quit [Remote host closed the connection]
RaCx_ has quit [Client Quit]
SiliconG has joined #ruby
RaCx has quit [Ping timeout: 272 seconds]
agjacome has joined #ruby
mlpinit has joined #ruby
mansi has joined #ruby
Aryasam has quit [Ping timeout: 245 seconds]
RaCx has joined #ruby
kobain has joined #ruby
niklasb has joined #ruby
tyl has quit [Client Quit]
apeiros has quit [Ping timeout: 252 seconds]
fedesilva has joined #ruby
MrZYX is now known as MrZYX|off
krisbulman is now known as krisbulman|otp
Butcho has joined #ruby
brunops has joined #ruby
Butcho has quit [Max SendQ exceeded]
senj has joined #ruby
devinus has joined #ruby
deception has joined #ruby
Butcho has joined #ruby
gnephiak has joined #ruby
angusigu1ss has quit [Ping timeout: 248 seconds]
shvelo has quit [Ping timeout: 252 seconds]
geggam has quit [Remote host closed the connection]
geggam has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
tyl has joined #ruby
duggiefresh has joined #ruby
hamakn has joined #ruby
tyl has quit [Client Quit]
ckinni has joined #ruby
gtsiftsis has quit [Quit: Leaving]
byprdct has joined #ruby
yasushi has joined #ruby
<Hanmac1> ping banister
aniM has joined #ruby
shadoi has joined #ruby
philsturgeon has joined #ruby
<philsturgeon> having an odd problem. using tweetstream which is a gem implementing eventmachine. I am making a HTTP request within the event block and if something goes wrong the error is silent
user258467 has joined #ruby
<philsturgeon> normally I'd expect a big old stacktrace to blow up in my face, but its just not doing anything and continuing with the next loop
RaCx has quit [Quit: Computer has gone to sleep.]
<philsturgeon> how do i get the exception?
m8 has joined #ruby
digital-ghost has joined #ruby
RaCx has joined #ruby
_maes_ has joined #ruby
baroquebobcat has joined #ruby
gmci has quit [Quit: Textual IRC Client: www.textualapp.com]
shadoi has quit [Ping timeout: 245 seconds]
freeone3000 has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterone has quit [Ping timeout: 248 seconds]
Hanmac has joined #ruby
banisterone has joined #ruby
Butcho has quit [Read error: Connection reset by peer]
visof has quit [Ping timeout: 245 seconds]
Hanmac1 has quit [Ping timeout: 265 seconds]
MrZYX|off is now known as MrZYX
Butcho has joined #ruby
allaire has joined #ruby
gmci has joined #ruby
pabloh has joined #ruby
nucc has joined #ruby
<pontiki> what are you making the request with? Net::HTTP?
jrobertfox has joined #ruby
ebetancourt has joined #ruby
snath has joined #ruby
geekbri has joined #ruby
brunops has quit [Ping timeout: 265 seconds]
gja has quit [Quit: This computer has gone to sleep]
gnephiak has quit [Remote host closed the connection]
Fyyr13 has joined #ruby
Butcho has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gnephiak has joined #ruby
Aryasam has joined #ruby
<pontiki> ^ to philsturgeon
top4o has joined #ruby
<philsturgeon> ponbiki: HTTParty. so im catching the error kinda with rescue, and I see my "SH*T FAILED" output, but not sure what sort of exception it is
banister has joined #ruby
<philsturgeon> http://d.pr/i/r8PD so just a general ruby question now, but how can i catch ANY exception?
Pixels has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby
gja has joined #ruby
<philsturgeon> PHP guy, would just catch( Exception $e) to get anything
tkuchiki has quit [Remote host closed the connection]
<freeone3000> philsturgeon: rescue StandardError
<philsturgeon> thanks freeone3000
tkuchiki has joined #ruby
<apeiros> plain rescue defaults to rescue StandardError
<terrellt> Or just rescue Exception.
<apeiros> never rescue Exception
<terrellt> No?
<freeone3000> philsturgeon: Or rather, to get a reference to the exception, 'rescue => e'.
<apeiros> unless you know really really well what you're doing.
<freeone3000> No, Exception includes things like syntax errors and the process running out of memory.
<philsturgeon> freeone3000: oh nice!
yacks has quit [Quit: Leaving]
<terrellt> See, that I didn't know, Thank you.
Petru has joined #ruby
zeade has quit [Quit: Leaving.]
troessner has quit [Quit: Leaving]
Lewix has quit [Remote host closed the connection]
Fyyr13 has quit [Ping timeout: 252 seconds]
angusigu1ss has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
moppersmurf has quit [Ping timeout: 272 seconds]
acrussell has joined #ruby
banister has quit [Remote host closed the connection]
meatherly has joined #ruby
banister has joined #ruby
yfeldblum has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
Hanmac is now known as hanmac
dblessing has quit [Quit: dblessing]
bbloom has quit [Quit: Textual IRC Client: www.textualapp.com]
bbloom has joined #ruby
sski has quit [Remote host closed the connection]
sski has joined #ruby
angusigu1ss has quit [Ping timeout: 240 seconds]
jrobertfox has quit [Remote host closed the connection]
tyl has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
pdkl has joined #ruby
x77686d has quit [Quit: x77686d]
gja has quit [Quit: This computer has gone to sleep]
danshultz has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
chrisseaton has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
yasushi has quit [Remote host closed the connection]
<chrisseaton> Is anyone here familiar with the warning "Useless use of == in void context." - how does the parser know that == has no side effects, in order to issue that warning?
noname001__ has quit [Ping timeout: 272 seconds]
aryaching has joined #ruby
sski has quit [Ping timeout: 260 seconds]
rx has quit [Quit: Computer has gone to sleep.]
<workmad3> chrisseaton: it probably doesn't (but I could be wrong)... however, ruby warnings do sometimes express opinions about how certain things shouldn't be done, such as == not having side effects (which would be really surprising and not particularly good code)
ademidov has joined #ruby
<MrZYX> side effects in general should be avoided
dangerousdave has joined #ruby
ademidov has left #ruby [#ruby]
<shevy> hehe
jlebrech has joined #ruby
<shevy> like drugs
<shevy> avoid drugs, kiddies
<workmad3> driving on drugs is better when they're prescription
thumpba_ has quit [Remote host closed the connection]
dseitz has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<shevy> workmad3 but you UK guys drive the wrong way even without drugs!!!
zipper has quit [Quit: Lost terminal]
krisbulman|otp is now known as krisbulman
<shevy> come to think about it, perhaps it is time for drugs there ;)
<chrisseaton> workmad3: understandable, but for example MSpec and so RubySpec has == that has side effects, so it's not theoretical code
drumusician has quit [Read error: Operation timed out]
<workmad3> shevy: I don't drive anyway :)
RaCx has joined #ruby
pabloh has quit [Quit: Saliendo]
havenwood has quit [Remote host closed the connection]
moppersmurf has joined #ruby
moppersmurf has quit [Max SendQ exceeded]
<pontiki> s'funny, because you see 'rescue Exception' all over the place, and it's such a bad practice
slash_nick has quit [Changing host]
slash_nick has joined #ruby
bradhe has joined #ruby
moppersmurf has joined #ruby
<shevy> pontiki it's good to rescue people!
<shevy> so it must be good to rescue poor, unhappy code too
moppersmurf has quit [Max SendQ exceeded]
gsvolt_work has joined #ruby
<MrZYX> just don't forget to raise it afterwards
<shevy> raise sounds so dangerous
<pontiki> first rule of rescuers: don't put yourself in the position of having to be rescued
moppersmurf has joined #ruby
moppersmurf has quit [Max SendQ exceeded]
mikesplain has quit [Ping timeout: 252 seconds]
Albright has left #ruby [#ruby]
x77686d has joined #ruby
mikesplain has joined #ruby
devinus has quit [Ping timeout: 245 seconds]
krz has joined #ruby
devinus_ has joined #ruby
moppersmurf has joined #ruby
motto has joined #ruby
moppersmurf has quit [Max SendQ exceeded]
shredding has quit [Quit: shredding]
<lectrick> there should be a webpage that, all it does is find Github repos of Ruby code that has "rescue Exception" in them and shames them
Solnse has joined #ruby
shvelo has joined #ruby
moppersmurf has joined #ruby
<apeiros> it's called 'google'
moppersmurf has quit [Max SendQ exceeded]
<lectrick> it doesn't do the shaming part tho!
m8 has quit [Ping timeout: 265 seconds]
lsmola_ has quit [Ping timeout: 252 seconds]
<apeiros> ok, true
altin has quit [Ping timeout: 248 seconds]
<apeiros> ITTT
bradhe has quit [Ping timeout: 252 seconds]
LastWhisper has quit [Ping timeout: 245 seconds]
moppersmurf has joined #ruby
moppersmurf has quit [Max SendQ exceeded]
mando has joined #ruby
moppersmurf has joined #ruby
moppersmurf has quit [Max SendQ exceeded]
<apeiros> oh, IFTTT
bradhe has joined #ruby
<apeiros> I thought the F wasn't in it
moppersmurf has joined #ruby
mando has quit [Remote host closed the connection]
sambao21 has joined #ruby
moppersmurf has quit [Max SendQ exceeded]
dkamioka has joined #ruby
mando has joined #ruby
mikesplain has quit [Ping timeout: 245 seconds]
brunops has joined #ruby
moppersmurf has joined #ruby
mikesplain has joined #ruby
moppersmurf has quit [Max SendQ exceeded]
havenwood has joined #ruby
shaunbaker has quit [Remote host closed the connection]
shay- has left #ruby [#ruby]
wildroman2 has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
moppersmurf has joined #ruby
user258467 has quit [Quit: Quitte]
moppersmurf has quit [Max SendQ exceeded]
<shevy> I am never ashamed of code I write
<shevy> I PROUDLY write 1/0 all the time
<shevy> (inside a begin rescue though...)
octoberry has quit [Ping timeout: 264 seconds]
<shevy> ZeroDivisionError: divided by 0
<shevy> ^^^ weakling
moppersmurf has joined #ruby
JasmeetQA has joined #ruby
ryantm has quit [Ping timeout: 272 seconds]
<shevy> hoelzro I have to re-learn perl again :(
bradhe has quit [Ping timeout: 248 seconds]
jlebrech has quit [Quit: Konversation terminated!]
brunops has quit [Client Quit]
sambao21 has quit [Ping timeout: 245 seconds]
Cache_Money has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
dawkirst has joined #ruby
hrs has joined #ruby
tt1187 has quit []
sailias has joined #ruby
noop has joined #ruby
dblessing has joined #ruby
LexicalScope has quit [Ping timeout: 265 seconds]
rx has joined #ruby
<pontiki> like riding a bicycle
<pdkl> i have a specialized sirrus :)
Cache_Money has quit [Client Quit]
<pdkl> i ride mine a lot
<shevy> a sirrus?
<shevy> isn't that an animal thing?
mikesplain_ has joined #ruby
<pontiki> i thought it was a cloud...
tylersmith has quit [Remote host closed the connection]
<pdkl> its a brand of bicycle like the trek FX series
mikesplain has quit [Ping timeout: 245 seconds]
mikesplain_ is now known as mikesplain
<shevy> hmm ... "Sirius" ... "the Dog Star"
dagobah has quit [Quit: Leaving...]
sambao21 has joined #ruby
blaxter_ has quit [Ping timeout: 264 seconds]
altin has joined #ruby
hrs has quit [Quit: Textual IRC Client: www.textualapp.com]
shvelo has quit [Ping timeout: 252 seconds]
<pontiki> yus
<pontiki> and thus the character from HP
mlpinit has quit [Remote host closed the connection]
allaire has quit []
ahawkins has quit [Remote host closed the connection]
aniM has quit [Ping timeout: 248 seconds]
arctarus has quit [Remote host closed the connection]
devinus_ is now known as devinus
sambao21 has quit [Ping timeout: 264 seconds]
<sickweezle> siriuspup.com ftw
tkuchiki has joined #ruby
phansch has quit [Quit: Leaving]
<shevy> siriuspuppy.com?
<shevy> seriouspuppy!!!
<shevy> there is lolcat and then there is seriouspuppy
DouweM has quit [Ping timeout: 272 seconds]
<pontiki> it's taken
<shevy> if _why would only still draw his cartoons... :(
<pontiki> siriusfox?
<pontiki> siriusfoxes
lfox has quit [Quit: ZZZzzz…]
geekbri_ has joined #ruby
Hobogrammer has joined #ruby
<shevy> hehe
chrisseaton has quit [Read error: Operation timed out]
<shevy> I am gonna write sirious from now on
<shevy> are you guys sirious!!!
shaunbaker has joined #ruby
daxroc has quit [Quit: Leaving.]
lyanchih_ has quit [Ping timeout: 252 seconds]
shaunbak_ has joined #ruby
<sickweezle> https://www.siriuspup.com/ <-- dog training
geekbri_ has quit [Client Quit]
<sickweezle> I like them.
Elhu has quit [Quit: Computer has gone to sleep.]
geekbri has quit [Ping timeout: 245 seconds]
bthesorceror has quit [Remote host closed the connection]
blindingdawn has joined #ruby
<shevy> oh man
pdkl has quit [Ping timeout: 272 seconds]
<shevy> poodle war zone
Hanmac1 has joined #ruby
<sickweezle> XD
tkuchiki has quit [Remote host closed the connection]
greenarrow has quit [Quit: 500]
philsturgeon has quit [Quit: Leaving.]
pabloh has joined #ruby
aspires has joined #ruby
tvw has quit []
pabloh has quit [Read error: Connection reset by peer]
hanmac has quit [Ping timeout: 245 seconds]
centr0 has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
deens has joined #ruby
JasmeetQA has quit [Quit: Leaving.]
rljohnsn has quit [Quit: Leaving.]
Deejay_ has quit [Ping timeout: 245 seconds]
diegoviola has quit [Ping timeout: 260 seconds]
mmcclimon has quit [Quit: mmcclimon]
ghr has quit [Quit: Computer has gone to sleep.]
MindfulMonk has quit [Ping timeout: 260 seconds]
freezey has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 252 seconds]
hanmac has joined #ruby
bradhe has joined #ruby
diegoviola has joined #ruby
tauebel has joined #ruby
pdkl_ has joined #ruby
rx has quit [Quit: Computer has gone to sleep.]
drumusician has joined #ruby
pdkl_ is now known as pdkl
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
vt102 has joined #ruby
rburton- has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Read error: Connection reset by peer]
benzrf has joined #ruby
<benzrf> hello
wildroman2 has joined #ruby
zeeraw has joined #ruby
<benzrf> is there a way to pass an object along with json parsing so that my custom json_create can see it
pabloh has joined #ruby
pdkl has left #ruby [#ruby]
i_s has joined #ruby
asteros has joined #ruby
Uranio has quit [Quit: WeeChat 0.3.2]
w4pm has joined #ruby
dkamioka has quit [Remote host closed the connection]
byprdct has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dkamioka has joined #ruby
dkamioka has quit [Remote host closed the connection]
incade has quit [Remote host closed the connection]
dkamioka has joined #ruby
troyready has joined #ruby
jobewan has quit [Read error: Operation timed out]
thesheff17 has quit [Remote host closed the connection]
Squarepy has joined #ruby
timonv has quit [Remote host closed the connection]
mhenrixon has joined #ruby
freezey has joined #ruby
aniM has joined #ruby
TMM has quit [Quit: Ex-Chat]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
parduse has quit [Read error: Connection reset by peer]
havenwood has quit [Remote host closed the connection]
parduse has joined #ruby
Pixels has joined #ruby
nateberkopec has joined #ruby
jailbot has joined #ruby
w4pm has quit [Ping timeout: 252 seconds]
dawkirst has quit [Ping timeout: 252 seconds]
danshultz has quit [Remote host closed the connection]
rx has joined #ruby
shime has quit [Ping timeout: 252 seconds]
danshultz has joined #ruby
hamakn has quit [Remote host closed the connection]
blaxter_ has joined #ruby
plecco has joined #ruby
kevinykc_ has joined #ruby
Hobogrammer_ has joined #ruby
nucc has quit [Quit: This computer has gone to sleep]
kevinykchan has quit [Ping timeout: 260 seconds]
<Xeago> when using openssl::digest
end_guy has joined #ruby
<Xeago> should I pass it bytes
angusigu1ss has joined #ruby
<Xeago> ?
<Xeago> the documentation does not specify
danshultz has quit [Ping timeout: 245 seconds]
Elhu has joined #ruby
<shevy> benzrf not sure... json is just a string or a hash alone or?
Hobogrammer has quit [Ping timeout: 245 seconds]
incade has joined #ruby
<benzrf> string
<shevy> ewwww
<shevy> scary
habanany has quit [Read error: Operation timed out]
olivier__ has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<hanmac> Xeago: digest does automatic encode it into binary for you
banisterone has quit [Read error: Connection reset by peer]
banisterone has joined #ruby
mlpinit has joined #ruby
<Xeago> Hanmac: thanks
DrShoggoth has joined #ruby
<olivier__> Hi, I'm working on a new Ruby project using Gwan server http://solicms.com
angusigu1ss has quit [Ping timeout: 272 seconds]
jailbot has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
Es0teric has joined #ruby
bradhe has joined #ruby
arietis has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
plecco is now known as stokes
MattStratton has joined #ruby
jailbot has joined #ruby
Czupa has quit [Remote host closed the connection]
jobewan has joined #ruby
zellio has quit [Ping timeout: 252 seconds]
blaxter_ has quit [Ping timeout: 248 seconds]
dawkirst has joined #ruby
<Xeago> Hanmac: thanks
sparrovv has joined #ruby
Petru has quit [Quit: Leaving]
sparrovv has quit [Remote host closed the connection]
stokes is now known as jpstokes
Lewix has joined #ruby
dkamioka_ has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
zellio has joined #ruby
x1337807x has joined #ruby
shime has joined #ruby
jailbot has quit [Read error: Connection reset by peer]
blaxter_ has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
jailbot has joined #ruby
roolo has quit [Quit: Linkinus - http://linkinus.com]
dangerousdave has joined #ruby
<benzrf> halp
<zellio> benzrf: wat
hobodave has joined #ruby
pen has joined #ruby
saarinen has joined #ruby
<shevy> hehe
<shevy> yeah
enebo has quit [Quit: enebo]
<shevy> benzrf: wat man!
<wiku5_> what's the best console library ?
timonv has joined #ruby
<shevy> wiku5_ highline
drumusician has quit [Ping timeout: 265 seconds]
<benzrf> i need my json_create method to be able to see a certain value
<benzrf> can i pass it to load and have it send it along or something?
Aryasam has quit [Quit: Bye]
timonv_ has joined #ruby
<wiku5_> okay, so if I want to create something like weechat-curses or irssi with that level of a user interface, I could essentially do it in Highline, or is there a better console library with better documentation than highline?
<shevy> hmm
<shevy> wiku5_ if you want a wrapper around ncurses then this won't be too easy
<wiku5_> yeah... highline seems too simple
<shevy> people tend to hate curses
maletor has joined #ruby
<benzrf> curses!
<shevy> it was even removed lately: https://bugs.ruby-lang.org/issues/8584
<shevy> "I'd like to remove curses from the Ruby standard library."
<shevy> :)
fmcgeough has joined #ruby
<Mattx> Hi
rburton- has quit [Quit: Linkinus - http://linkinus.com]
<shevy> this is the old source: https://github.com/shugo/curses
<Mattx> do you happen to know any gem to sample sound from the mic?
<shevy> it should still work but without a C guru who loves curses, this is doomed to bit-decay
<wiku5_> so..... which library would you all recommend?
<Mattx> I found one called ffi-portaudio but it's not longer mantainer
<Mattx> seems to be the only one
<benzrf> hi Mattx
timonv has quit [Ping timeout: 240 seconds]
<shevy> wiku5_ well you said you wanna build weechat-curses
<Mattx> mantained *
<shevy> there is not much choice with that
SilentHobo has joined #ruby
phansch has joined #ruby
<shevy> wiku5_ if you only care about basic input, Readline module + Highline gem should bring you far away. you can even make a disco prompt and use tab completion with that! and with Highling, you could disguise password input too through '*' characters. isn't that awesome? :D
<shevy> *Highline
jailbot has quit []
<shevy> the only thing you'd miss is the absolute positioning you can get in curses
saarinen has quit [Quit: saarinen]
rdark has quit [Quit: leaving]
shaunbak_ has quit [Remote host closed the connection]
timonv_ has quit [Read error: Connection reset by peer]
<shevy> wiku5_, this is old sample with curses http://pastie.org/8672675
saarinen has joined #ruby
angusigu1ss has joined #ruby
ephemerian has quit [Quit: Leaving.]
<shevy> actually you can remove all the Curses. there
<shevy> you get the idea
<shevy> but it is so awful
timonv has joined #ruby
<shevy> everyone hates curses
<wiku5_> then what do people NOT hate?
<benzrf> i should make a console thingy library o-o
<benzrf> maybe someday
<shevy> wiku5_ ruby :)
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<shevy> curses is like a 1:1 API translation of the C curses
<wiku5_> .... I mean, what console library (other than curses) do people usually use?
jtdowney has joined #ruby
olivier__ has quit [Quit: olivier__]
NemesisD has quit [Ping timeout: 245 seconds]
olivier_bk has quit [Read error: Operation timed out]
zeeraw has joined #ruby
Hobogrammer_ has quit [Ping timeout: 252 seconds]
<shevy> Readline :P
predator117 has quit [Ping timeout: 252 seconds]
<shevy> benzrf what console library do you use
<wiku5_> my idea though is creating a simple curses-like ruby-infused program that I'm able to interact with in plain english in order to control teh appliances around my house using JSON get/post requests, as I have a bunch of Raspberry Pi's running Sinatra that control my coffeemaker(s),blinds, etctera.
predator117 has joined #ruby
shime has quit [Ping timeout: 272 seconds]
<lupine> sounds overkill ^^
<freeone3000> Doesn't sound like overkill, sounds like you want a webpage instead.
<lupine> using a raspberry pi to make a blind go up and down is overkill
<wiku5_> works pretty well at the moment with my android app, just want an interactive console for miscellanious stuff.
<freeone3000> Web pages are great at making json get/post requests.
zeeraw has quit [Client Quit]
angusigu1ss has quit [Ping timeout: 248 seconds]
m8 has joined #ruby
shime has joined #ruby
_maes_ has quit [Ping timeout: 272 seconds]
mikesplain has quit [Quit: mikesplain]
mhenrixon is now known as mhenrixon|afk
mhenrixon|afk is now known as mhenrixon
motto has quit [Ping timeout: 248 seconds]
subbyyy has joined #ruby
octoberry has joined #ruby
enebo has joined #ruby
freezey has quit [Remote host closed the connection]
timonv_ has joined #ruby
Brolen has quit [Remote host closed the connection]
thumpba has joined #ruby
dfranciosi has joined #ruby
Brolen has joined #ruby
<interactionjaxsn> wiku5_: relevant http://www.youtube.com/watch?v=BeyTsdkItg4
timonv has quit [Ping timeout: 240 seconds]
predator117 has quit [Ping timeout: 260 seconds]
predator117 has joined #ruby
Spami has joined #ruby
<Mattx> so none knows how to manipulate audio streams from the mic in ruby?
<wiku5_> interactionjaxsn: thanks
danshultz has joined #ruby
pabloh has quit [Quit: Saliendo]
mercwithamouth has quit [Ping timeout: 272 seconds]
mityaz has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
Brolen has quit [Ping timeout: 272 seconds]
lfox has joined #ruby
centrx has joined #ruby
SilentHobo has quit [Read error: Operation timed out]
freezey has joined #ruby
binaryhat has joined #ruby
rljohnsn has joined #ruby
obs has quit [Quit: Konversation terminated!]
arietis has joined #ruby
gnephiak has quit [Quit: Konversation terminated!]
nari has quit [Ping timeout: 252 seconds]
x77686d has quit [Quit: x77686d]
byprdct has joined #ruby
tvw has joined #ruby
OdNairy has joined #ruby
danshultz has quit [Remote host closed the connection]
<freeone3000> Mattx: You generally do that in your platform's language.
<Xeago> is it possible to interpolate my string with values from my hash?
allaire has joined #ruby
<Xeago> "#{id[0..3]} #{acknowledgement_time} #{service} #{state} #{reason}" % foo
<Xeago> something along those lines?
allaire has quit [Client Quit]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
rootshift has joined #ruby
intuxicated_ has joined #ruby
tylersmith has joined #ruby
figgleberry has joined #ruby
rubyracer has quit [Ping timeout: 272 seconds]
<MrZYX> >> "%<foo>s %<bar>s" % {foo: "a", bar: "b"}
<eval-in> MrZYX => "a b" (https://eval.in/95491)
mocfive has joined #ruby
<Xeago> <3
Fyyr13 has joined #ruby
krz has quit [Quit: WeeChat 0.4.2]
<MrZYX> vaguely remembered something and wasn't sure if it was python only, so I had to look it up http://rubydoc.info/stdlib/core/Kernel#sprintf-instance_method ;)
x77686d has joined #ruby
yfeldblum has joined #ruby
bradhe has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 252 seconds]
heidi has joined #ruby
LastWhisper has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
rubyracer has joined #ruby
drumusician has joined #ruby
<MrZYX> >> "%{foo} %{bar}" % {foo: "a", bar: 1}
<eval-in> MrZYX => "a 1" (https://eval.in/95492)
duggiefresh has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
<MrZYX> so that's another possible style
tdubya has joined #ruby
fedesilva has quit [Read error: Connection reset by peer]
shvelo has joined #ruby
SilentHobo has joined #ruby
jtdowney has quit []
fedesilva has joined #ruby
Vivekananda has joined #ruby
mansi has quit [Ping timeout: 272 seconds]
blaxter_ has quit [Ping timeout: 272 seconds]
devinus has quit []
Fyyr13 has quit [Ping timeout: 264 seconds]
fedesilva has quit [Read error: Connection reset by peer]
sparrovv has joined #ruby
Pixels has quit [Ping timeout: 260 seconds]
troyready has quit [Remote host closed the connection]
fedesilva has joined #ruby
achru has quit [Remote host closed the connection]
pel_daniel has joined #ruby
achru has joined #ruby
razibog has quit [Read error: Operation timed out]
mansi has joined #ruby
einarj_ has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
<Xeago> hmm, it seems I can't call methods on it tho :'(
tonni has joined #ruby
troyready has joined #ruby
<Xeago> I have a {hash: "very_long_string"}
<Xeago> of which I want to [0..3]
kenneth has quit [Quit: kenneth]
Fyyr13 has joined #ruby
kpshek has quit []
nanoyak has joined #ruby
<MrZYX> you could mix it with normal interpolation: "#{hash[:hash][0..3]} %{foo} %{bar}" % {foo: "a", bar: "b"}
<Xeago> ah yea that works
<Xeago> just tried
andikr has quit [Remote host closed the connection]
<Xeago> thanks!
Txandy has joined #ruby
achru has quit [Ping timeout: 248 seconds]
camilasa_ has quit []
wildroman2 has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
kpshek has joined #ruby
<Xeago> it works in my repl but not in my app :'(
nowthatsamatt has joined #ruby
Fyyr13 has quit [Ping timeout: 240 seconds]
jrobertfox has joined #ruby
rljohnsn has quit [Read error: Connection reset by peer]
<MrZYX> I don't see that it works there and it's not what I meant either
e^0 has quit [Quit: WeeChat 0.4.1]
<Xeago> "#{%{foo}[0..1]}" % {foo: "bar" works
<MrZYX> entry= log.first.to_h; "#{entry[:id][0..3]} %{acknowledgement_time} %{service} %{state} %{reason}" % entry
<MrZYX> hmm, interesting
<Xeago> that beats the point of nesting #{%{}}
felixjet has joined #ruby
felixjet__ has quit [Quit: Leaving]
<MrZYX> ah no, it doesn't work
felixjet has quit [Remote host closed the connection]
<Xeago> 20>> "#{%{foo}[0..1]}" % {foo: "bar"
<MrZYX> >> %{foo}
<eval-in> Xeago => /tmp/execpad-debe41275c6b/source-debe41275c6b:3: syntax error, unexpected keyword_rescue, expecting '}' ... (https://eval.in/95494)
<eval-in> MrZYX => "foo" (https://eval.in/95495)
<MrZYX> that's a string
subbyyy_ has joined #ruby
<Xeago> bah I'm blind
SilentHobo is now known as Hobogrammer
felixjet has joined #ruby
rljohnsn has joined #ruby
<Xeago> so no way to call methods on hash interpolated parts?
<MrZYX> no
subbyyy_ has quit [Client Quit]
<Xeago> fook dat
subbyyy_ has joined #ruby
dkamioka_ has quit [Read error: Connection reset by peer]
mlpinit has quit [Remote host closed the connection]
<MrZYX> what about: entry= log.first.to_h; entry[:short_id] = entry[:id][0..3]; "%{short_id} %{acknowledgement_time} %{service} %{state} %{reason}" % entry
blaxter_ has joined #ruby
dkamioka has joined #ruby
jobewan has quit [Ping timeout: 264 seconds]
mlpinit has joined #ruby
subbyyy has quit [Ping timeout: 252 seconds]
<Xeago> going to make a state object
mercwithamouth has joined #ruby
dawkirst has quit [Ping timeout: 248 seconds]
<Xeago> where to_h returns both id and long_id
<Xeago> and magic
tzorvas has quit [Ping timeout: 248 seconds]
hamakn has joined #ruby
danshultz has joined #ruby
withnale has joined #ruby
tzorvas has joined #ruby
tzorvas is now known as Guest71830
byprdct has quit [Ping timeout: 260 seconds]
Pixels has joined #ruby
jprovazn has joined #ruby
cjsarette has quit [Ping timeout: 245 seconds]
mikepack has quit [Read error: Connection reset by peer]
LexicalScope has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
mikepack has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
hiall has quit [Read error: Operation timed out]
mikesplain has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Max SendQ exceeded]
hamakn has quit [Ping timeout: 245 seconds]
blaxter_ has quit [Quit: foo]
jtdowney has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
standyro2 has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Max SendQ exceeded]
iliketurtles has joined #ruby
iliketurtles has quit [Max SendQ exceeded]
iliketurtles has joined #ruby
krz has joined #ruby
araujo has joined #ruby
araujo has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
kenneth has joined #ruby
bricker_ has joined #ruby
rootshift has joined #ruby
devinus has joined #ruby
dawkirst has joined #ruby
meatherly has quit []
iamdoo2 has joined #ruby
linojon has joined #ruby
bradhe_ has joined #ruby
jobewan has joined #ruby
ctp has quit [Quit: Linkinus - http://linkinus.com]
bradhe has quit [Read error: Connection reset by peer]
aniM has quit [Ping timeout: 240 seconds]
mansi has quit [Remote host closed the connection]
meatherly has joined #ruby
mansi has joined #ruby
jailbot has joined #ruby
stkowski has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
heftig has joined #ruby
wildroman2 has joined #ruby
afhammad has joined #ruby
SiliconG has quit [Ping timeout: 264 seconds]
atmosx has joined #ruby
w4pm has joined #ruby
iamdoo2 has quit [Ping timeout: 252 seconds]
sambao21 has joined #ruby
bricker_ is now known as bricker`work
Czupa has joined #ruby
agent_white has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
<agent_white> Afternoon folks
dfranciosi has quit [Remote host closed the connection]
jetblack has quit [Quit: leaving]
shime has quit [Ping timeout: 272 seconds]
philsturgeon has joined #ruby
philsturgeon has left #ruby [#ruby]
ArchBeOS-work has joined #ruby
dawkirst has quit [Ping timeout: 272 seconds]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<centrx> Ahoy
<benzrf> sup yo
mhenrixon is now known as mhenrixon|afk
pu22l3r_ has quit [Read error: Operation timed out]
sambao21 has quit [Quit: Computer has gone to sleep.]
rx has quit [Quit: Textual IRC Client: www.textualapp.com]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
jlast_ has joined #ruby
kraljev5 has joined #ruby
clamstar has joined #ruby
aniM has joined #ruby
zigomir has joined #ruby
mansi has joined #ruby
<kraljev5> I have Controller class, from where you can inherit:
<kraljev5> class User < Controller
<kraljev5> I want to make #get, #post and #delete class methods that would store the data for later use
<kraljev5> is there any resource where could I learn that
pu22l3r_ has joined #ruby
Brolen has joined #ruby
Nanuq has quit [Ping timeout: 245 seconds]
babykosh has joined #ruby
<kraljev5> you should later be able to query the User : What are all the #get methods?
krisbulman is now known as [krisbulman]
<kraljev5> class User < Controller
<kraljev5> get :data
<kraljev5> get :picture
<kraljev5> end
<kraljev5> and then get [:data, :picture]
jlast has quit [Ping timeout: 272 seconds]
[krisbulman] is now known as krisbulman
jlast_ has quit [Ping timeout: 272 seconds]
IcyDragon has joined #ruby
IceDragon has quit [Ping timeout: 252 seconds]
dann_ has joined #ruby
jtdowney has quit []
IcyDragon is now known as IceDragon
<dann_> hey
DrCode has joined #ruby
<dann_> what's the best way to get a file dialog on ruby
<dann_> do i use TK, shoes, or some other gem?
jonahR has joined #ruby
<dann_> I'm looking for something lightweight
DrCode has quit [Remote host closed the connection]
Czupa has quit [Remote host closed the connection]
DouweM has joined #ruby
blaz3rz has quit [Remote host closed the connection]
mhenrixon|afk is now known as mhenrixon
Solnse has quit [Remote host closed the connection]
<shevy> dann_ I recommend ruby-gnome
<shevy> but Hanmac is working on rxw
<shevy> once rxw is ready, you should use it
dawkirst has joined #ruby
<hanmac> shevy: rwx is not "lightweight" and will never be ;P
<shevy> dann_ TK looks like shit, shoes4 depends on java (jruby), qtruby is not really maintained, fxruby is kinda dead (lyle abandoned it years ago afaik)
krz has quit [Quit: WeeChat 0.4.2]
mhenrixon is now known as mhenrixon|afk
<kraljev5> How is Controller.map implemented in Ramaze?
<shevy> #ramaze will know, manveru is there usually
<shevy> and he wrote ramaze
LastWhisper has quit [Ping timeout: 245 seconds]
<dann_> shevy: what exactly is ruby-gnome?
pushpak has joined #ruby
jlast has joined #ruby
<shevy> dann_ ruby bindings for gtk (and partially gnome, but you can limit yourself to just gtk)
<dann_> i should mention i have no experience using either
<dann_> i haven't really heard of them either
<shevy> I have experience using ruby-gnome
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<shevy> it is alright, better than the other
<shevy> but you must keep in mind that there are not enough ruby developers working for/with GUI toolkits in ruby :(
jasonwebster has joined #ruby
<shevy> qtruby looked best but it's like dead IMHO
Nanuq has joined #ruby
<dann_> I'm not really looking for a GUI toolkit
Fyyr13 has joined #ruby
<shevy> you want a file dialog
<dann_> just somehting that allows me to collect a File object from a file dialog
<dann_> yeah
<shevy> so what is a file dialog
<dann_> or a Folder w/e
<shevy> a window that that pops up right?
<shevy> well
<shevy> you could have a file dialog in the browser :P
<dann_> what, open a browser window for it?
mhenrixon|afk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dann_> a valid alternative, but i'd rather have to use tk
mikepack_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camila has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rickruby has joined #ruby
Parker0 has joined #ruby
Al__ has quit [Quit: Al__]
<shevy> <dann_> I'm not really looking for a GUI toolkit
<shevy> so what is it now ;)
zeade has joined #ruby
asteros has quit [Quit: asteros]
<shevy> "Tk is a graphical user interface toolkit that takes developing desktop applications to a higher level than conventional approaches."
<shevy> "Tk is the standard GUI not only for Tcl, but for many other dynamic languages, and can produce rich, native applications that run unchanged across Windows, Mac OS X, Linux and more."
DrCode has joined #ruby
Fyyr13 has quit [Ping timeout: 252 seconds]
<shevy> dann_, in ruby-gnome a file dialog would be like this:
rmorello has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> file_dialog = Gtk::FileChooserDialog.new('Open File', Gtk::Window.new, Gtk::FileChooser::ACTION_OPEN, nil)
Lewix has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 264 seconds]
mikepack_ has quit [Ping timeout: 272 seconds]
Advocation has quit [Quit: Advocation]
mordocai` has quit [Ping timeout: 272 seconds]
rickruby has quit [Ping timeout: 252 seconds]
rmorello has joined #ruby
Notte has joined #ruby
f4a244c has quit [Quit: f4a244c]
pu22l3r_ has quit [Remote host closed the connection]
asteros has joined #ruby
tdubya has quit [Ping timeout: 245 seconds]
thealch3m1st has joined #ruby
pu22l3r_ has joined #ruby
<shevy> :'1'.class
<shevy> hah
davy_ has joined #ruby
<shevy> do you guys use this often?
<shevy> case x
<shevy> when 'bla' then ble
<shevy> in other words, do you use then in case/when menus?
<centrx> Yes
mehlah has quit [Quit: Leaving...]
<centrx> I use it when it is appropriate to use it, but that is just my opinion
DrCode has quit [Remote host closed the connection]
Lewix has joined #ruby
<shevy> hmm
<shevy> I am starting to dislike it
Lewix has quit [Remote host closed the connection]
<centrx> Quod!?
<dann_> shevy: often
<shevy> it seems to visually disturb me when I look at other case/when menues when they lack "then"
<dann_> and i'm gonna look into gtk right now
<shevy> *menus
<shevy> we even had : in the past
poulson has quit [Remote host closed the connection]
<centrx> oh you meant then
<centrx> Standard practice is to use then or a new line
<centrx> "THEN"
tauebel has quit [Quit: Leaving.]
<centrx> This then is thus the then
jprovazn has quit [Quit: Odcházím]
DrCode has joined #ruby
Xeago has quit [Remote host closed the connection]
ephemerian has joined #ruby
danman has joined #ruby
mansi has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
krisbulman is now known as krisbulman|afk
mansi has joined #ruby
gsvolt_work has quit [Ping timeout: 245 seconds]
kewubenduben has joined #ruby
blaz3rz has joined #ruby
tdubya has joined #ruby
carraroj has joined #ruby
krisbulman|afk is now known as [krisbulman|afk]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
kraljev5 has left #ruby [#ruby]
wildroman2 has quit [Remote host closed the connection]
motto has joined #ruby
DrCode has joined #ruby
mansi has quit [Ping timeout: 272 seconds]
gigetoo has quit [Remote host closed the connection]
<shevy> centrx hehe
reactormonk has quit [Quit: WeeChat 0.4.1]
olivier__ has joined #ruby
m8 has quit [Ping timeout: 252 seconds]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
jerius has quit [Ping timeout: 252 seconds]
gigetoo has joined #ruby
wildroman2 has joined #ruby
SHyx0rmZ has joined #ruby
freezey has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
ec has joined #ruby
DrCode has quit [Remote host closed the connection]
browndawg has quit [Quit: Leaving.]
carraroj has quit [Quit: Konversation terminated!]
dangerousdave has joined #ruby
Txandy has quit [Quit: Leaving...]
shaunbaker has joined #ruby
shaunbaker has quit [Remote host closed the connection]
jerius has joined #ruby
bradhe_ has quit [Remote host closed the connection]
olivier__ has left #ruby [#ruby]
robert_ has quit [Ping timeout: 260 seconds]
bradhe has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
DrCode has joined #ruby
soukihei has joined #ruby
aagdbl0 has joined #ruby
aagdbl has quit [Disconnected by services]
aagdbl0 is now known as aagdbl
bogeyd6 has joined #ruby
wildroman2 has quit [Ping timeout: 260 seconds]
lmickh has quit [Remote host closed the connection]
noop has quit [Ping timeout: 248 seconds]
bradhe has quit [Ping timeout: 264 seconds]
freerobby has quit [Quit: Leaving.]
shedd has quit [Remote host closed the connection]
mansi has joined #ruby
tauebel has joined #ruby
havenwood has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
freezey has joined #ruby
DrCode has quit [Remote host closed the connection]
pu22l3r_ has joined #ruby
x1337807x has joined #ruby
iamdoo2 has joined #ruby
freerobby has joined #ruby
freerobby has quit [Client Quit]
kraljev5 has joined #ruby
e^0 has joined #ruby
x1337807x has quit [Client Quit]
x1337807x has joined #ruby
pietr0 has joined #ruby
x1337807x has quit [Client Quit]
robert_ has joined #ruby
Solnse has joined #ruby
Liothen has joined #ruby
Butcho has joined #ruby
x1337807x has joined #ruby
octoberry has quit [Ping timeout: 240 seconds]
jailbot has quit [Remote host closed the connection]
VTLob has joined #ruby
iamdoo2 has quit [Ping timeout: 272 seconds]
Hobogrammer has quit [Ping timeout: 245 seconds]
squeeb has joined #ruby
<squeeb> Hi, Do I need to install a new version of ruby-installer every time a new ruby is released?
benzrf has quit [Quit: leaving]
<squeeb> or is there some kind of magical available-rubies list update thing?
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
sambao21 has joined #ruby
tuttinator has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
tvw has quit []
roolo has joined #ruby
shedd has joined #ruby
linojon has quit [Quit: linojon]
mikepack has joined #ruby
Amart41 has joined #ruby
defrag has joined #ruby
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has quit [Remote host closed the connection]
bradhe has joined #ruby
mansi has joined #ruby
decoponio has quit [Quit: Leaving...]
altin has quit [Ping timeout: 272 seconds]
rootshift has joined #ruby
asteros has quit [Quit: asteros]
aagdbl has quit [Quit: Leaving]
mercwithamouth has quit [Read error: Connection reset by peer]
f4a244c has joined #ruby
Amart41 has quit [Ping timeout: 245 seconds]
kevinykc_ has quit [Quit: Computer has gone to sleep.]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx> squeeb, I would just use the package manager for your operating system...
tauebel has quit [Quit: Leaving.]
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
nanoyak has joined #ruby
aspires has quit []
Hanmac1 has joined #ruby
Hobogrammer has joined #ruby
<shevy> squeeb good question. I would assume that ruby-installer would need only one file changed to reflect new rubies
chrisramon has joined #ruby
chrisseaton has joined #ruby
hanmac has quit [Ping timeout: 260 seconds]
tjbiddle has joined #ruby
bogeyd6 has quit [Ping timeout: 264 seconds]
squeeb has quit [Quit: leaving]
<sickweezle> Erm, so, folks know any good pointers on where to read up on how to handle capistrano v3, bundler, rvenv, and the daemons gem combined together into the monstrosity I'm trying to make work? >.<
Shidash has joined #ruby
<freeone3000> centrx: And for those of us whose operating systems don't have package managers?
davy_ has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
vlad_starkov has quit [Ping timeout: 264 seconds]
<centrx> freeone3000, I would recommend installing a developer-friendly operating system. Mac OS X, Linux, and more are excellent operating systems.
<shevy> sickweezle sounds quite complex!
<centrx> freeone3000, But I assume there is a Ruby installer for Windows somewhere
<sickweezle> shevy: *sigh* Yeah. :(
<shevy> freeone3000 in this case, ruby-installer should allow quick updates
<shevy> I mean, ruby-install
<shevy> stupid name btw :P
<shevy> rubyinstaller is that win-only thingy isn't it?
<sickweezle> shevy: Here I was thinking I was following pretty decent practices for environment control. I may need to significantly rethink that ...
<shevy> sickweezle dunno. sounds pretty insane to me. but I dont use bundler nor rbenv (I guess you meant rbenv? you wrote rvenv). the daemons gem should be trivial though or? gem install daemons
Butcho has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> capistrano too
<centrx> sickweezle, http://imgur.com/28zMThn
<shevy> actually I am not sure why you need bundler, you need some mass handling? :D
<sickweezle> shevy: er, yes, rbenv
kraljev5 has quit [Ping timeout: 252 seconds]
<shevy> centrx man that is some setup there
<shevy> even java is in the list
<sickweezle> centrx: gah!
<sickweezle> I'm only using a few of those :p
<sickweezle> shevy: I was under the impression that bundler was good for version handling of gems, but ... meh.
nairys has joined #ruby
<sickweezle> Sounding a lot like I should just simplify a lot of things for the ec2 instance I'm isntalling to.
senayar_ has joined #ruby
xlogic has quit [Remote host closed the connection]
<shevy> sickweezle I think bundler came from the rails ecosystem because they were using so many different gem versions, different ruby versions and different rails version
tauebel has joined #ruby
<havenwood> sickweezle: Capitrano::chruby looks pretty simple if you tire of rbenv: https://github.com/capistrano/chruby#readme
<shevy> as far as I know the ruby gem authors said that what bundler should offer, will eventually be integrated into gems
<shevy> so perhaps one day we can get rid of bundler (yay!)
mehlah has joined #ruby
<havenwood> ftw: gem install -g Gemfile
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mando_ has joined #ruby
ebetancourt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mark_locklear has quit [Ping timeout: 272 seconds]
Elhu has joined #ruby
<havenwood> sickweezle: bundler is good for resolving dependencies, indeed
<shevy> for the bigger win: gem remove Gemfile
Fyyr13 has joined #ruby
<shevy> :D
<freeone3000> What's a good introduction to threading in ruby? I need to find a semaphore.
<shevy> can't Gemfile and gemspecs be merged btw?
<havenwood> freeone3000: Jesse Storimer did a great ebook on threads: http://www.jstorimer.com/products/working-with-ruby-threads
mark_locklear has joined #ruby
<shevy> huh perl code
<shevy> use English;
<shevy> print $0
<shevy> that's almost like ruby
krawchyk has quit [Ping timeout: 260 seconds]
<freeone3000> shevy: If they're just going to print $0, why would they use english?
kaldrenon has joined #ruby
senayar has quit [Ping timeout: 252 seconds]
<freeone3000> havenwood: Alright, thanks.
pietr0 has quit [Quit: pietr0]
<shevy> freeone3000 good question
<shevy> I have no idea lol
mando has quit [Ping timeout: 248 seconds]
lessless has joined #ruby
i_s has quit []
<lessless> folks, what do you recommend to read to advance my ruby skills?
dawkirst has quit [Ping timeout: 248 seconds]
Fyyr13 has quit [Ping timeout: 252 seconds]
mando_ has quit [Ping timeout: 252 seconds]
standyro2 has quit [Ping timeout: 260 seconds]
Liothen has quit [Quit: System of a down……]
<havenwood> lessless: The Ruby Programming Language is a good book. Actually Jesse Storimer, who I just mentioned above for the Threading book, has good books on Processes, TCP Sockets, etc.
Lewix has joined #ruby
kaldrenon has quit [Ping timeout: 272 seconds]
<havenwood> lessless: There is a beta second edition of The Well Grounded Rubyist that looks nice.
Liothen has joined #ruby
<lessless> yeah. I tends to the Well Grounded Rubyist too :)
aspires has joined #ruby
asteros has joined #ruby
<lessless> also there are books like Eloquent Ruby and Refactoring Ruby
olivier_bk has joined #ruby
<havenwood> Confident Ruby
<havenwood> i haven't read any of those
gregoriokusowski has quit [Quit: gregoriokusowski]
Virtualize|away has quit [Quit: Leaving...]
<RubyPanther> is Perl like Ruby, or is Ruby like Perl?
sambao21 has quit [Quit: Computer has gone to sleep.]
Fyyr13 has joined #ruby
<centrx> RubyPanther, Ruby uses some of the syntactic features of Perl
<havenwood> PerlPanther: Perl6 is like Ruby and Ruby is like Perl5.
mhenrixon has joined #ruby
<centrx> RubyPanther, But they are fundamentally different styles
<RubyPanther> Yeah, havenwood might be on to something
mnemon has left #ruby [#ruby]
mnemon has joined #ruby
<RubyPanther> but Ruby was inspired by Perl long before Perl 5
jailbot has joined #ruby
<hoelzro> I'd say that Ruby borrows a lot of Perl's spirit, too
<centrx> Perl has enough variety you could say any language is like Perl
dwingo has joined #ruby
<waxjar> brainfuck and perl are very much alike
gr33n7007h has joined #ruby
sambao21 has joined #ruby
<RubyPanther> Well, I think historically Ruby was intended to have smalltalk style object sematics and Perl/C style syntax, with a pragmatic "least surprise" attitude
Fyyr13 has quit [Ping timeout: 240 seconds]
<sickweezle> shevy: Something I vaugely recall having read is that bundler is indeed being eaten by gem/ruby.
mikesplain_ has joined #ruby
<sickweezle> havenwood: good info, but I think it all may be far too much for me to chew on presently, given my newness, still, to the whole environment land.
coffeina has joined #ruby
senayar_ has quit [Remote host closed the connection]
jonahR has joined #ruby
mikesplain has quit [Ping timeout: 252 seconds]
mikesplain_ is now known as mikesplain
<shevy> sickweezle just use gem itself
<shevy> :)
<RubyPanther> I thought bundler came from... what was it called... Merb?
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<sickweezle> shevy: that's what I am thinking
<shevy> RubyPanther why is the OOP in perl so shitty
dawkirst has joined #ruby
<RubyPanther> shevy: Larry Wall said it was because it was an afterthought, and was "bolted through"
senayar has joined #ruby
<shevy> the whole language design is like "bolted through"!
<sickweezle> 'afterthought' is being very kind, too
<RubyPanther> He also said if you want to do everything with OOP then Ruby is a better language than Perl. That was the first time I heard of Ruby, in the late 90s. Then he gave a defense of procedural programming.
<RubyPanther> He in no way defended Perl's OOP as being good, just that it made that style of programming available
kalelsage has joined #ruby
nhhagen has joined #ruby
senayar has quit [Remote host closed the connection]
jasonwebster has quit [Quit: Textual IRC Client: www.textualapp.com]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
hanmac has joined #ruby
senayar has joined #ruby
Pixels has quit [Quit: :tiuQ]
dann_ has quit [Ping timeout: 245 seconds]
Hanmac1 has quit [Ping timeout: 260 seconds]
zeade has quit [Remote host closed the connection]
Xeago has joined #ruby
xcv has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
xcv has joined #ruby
hanmac has quit [Ping timeout: 252 seconds]
sdwrage has joined #ruby
<hoelzro> tbf, doing OOP in Perl is *way* better than it used to be
zeade has joined #ruby
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
<shevy> I'd kinda wish perl 6 would be ready now
jailbot has quit [Remote host closed the connection]
kalelsage has quit [Quit: ThrashIRC v2.9 sic populo comunicated]
rootshift has joined #ruby
tdubya has quit [Ping timeout: 245 seconds]
coffeina has quit [Quit: Wychodzi]
Xeago has quit [Ping timeout: 269 seconds]
nairys has quit [Quit: nairys]
hanmac has joined #ruby
<hoelzro> a big milestone just happened not too long ago
<hoelzro> like, last week
sambao21 has quit [Quit: Quitter]
standyro2 has joined #ruby
jedimind has quit [Ping timeout: 272 seconds]
Hanmac1 has quit [Ping timeout: 245 seconds]
sambao21 has joined #ruby
jailbot has joined #ruby
<havenwood> release of JVM Rakudo Star should be interesting
blaz3rz has quit [Remote host closed the connection]
blaz3rz has joined #ruby
<havenwood> threads, promises, channels, oh my!
iamdoo2 has joined #ruby
<havenwood> was very happy to see that perl11 picked up the potion vm, but kinda sad Rubyists aren't more involved (get involved!): https://github.com/perl11/potion#readme
mikepack has quit [Remote host closed the connection]
<bnagy> o_0
<havenwood> A lang by _why with Matz' help, wheeee!
pietr0 has joined #ruby
<hoelzro> havenwood: I find the MoarVM work more interesting myself
<hoelzro> but I think both are a good step
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
aspires has quit [Remote host closed the connection]
babykosh has quit [Quit: babykosh]
<havenwood> hoelzro: i don't know MoarVM, will have to check it out!
lessless has quit [Remote host closed the connection]
aspires has joined #ruby
<hoelzro> it's a new VM, developed specially for Rakudo
<hoelzro> drop by #perl6 if you'd like, we're nice =)
<hoelzro> (people here are nice too ;) )
mansi has quit [Remote host closed the connection]
x1337807x has joined #ruby
gregoriokusowski has joined #ruby
mansi has joined #ruby
iamdoo2 has quit [Ping timeout: 265 seconds]
mikepack has joined #ruby
acrussell has quit [Quit: Leaving.]
standyro2 has quit [Ping timeout: 252 seconds]
<sickweezle> Welp, off to the Dr. again. Now I get to see an allergist. Wheeee.
zeade has quit [Quit: Leaving.]
banisterone has quit [Read error: Connection reset by peer]
banisterone has joined #ruby
mando has joined #ruby
zeade has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
zeade has quit [Client Quit]
phansch_ has joined #ruby
chrisramon has quit [Quit: chrisramon]
kcombs has quit [Remote host closed the connection]
mansi has joined #ruby
mocfive has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
binaryhat has quit [Quit: Leaving]
mikepack has joined #ruby
mocfive has joined #ruby
chrisseaton has quit []
sambao21 has quit [Quit: Computer has gone to sleep.]
charliesome has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
Xuerian has quit [Remote host closed the connection]
jerius has quit []
kraljev5 has joined #ruby
iliketurtles has joined #ruby
phansch has quit [Ping timeout: 272 seconds]
iliketurtles has quit [Remote host closed the connection]
chrisseaton has joined #ruby
benzrf has joined #ruby
<benzrf> help
kraljev5 has quit [Client Quit]
<benzrf> JSON.load produces this:
<benzrf> {"receiver"=>{"json_class"=>"::Printer", "id"=>25561800}, "method"=>"display", "arguments"=>["wut"]}
kraljev5 has joined #ruby
<benzrf> ^notice the json_class hash
<benzrf> how did that get by??
<bnagy> you can use #parse instead I think
<bnagy> load is dangerous, cause of exactly that
<benzrf> no,
<bnagy> or there's some good one, as well, like safe json or somesuch
<benzrf> i /want/ that o_o
<benzrf> it is not happening
<bnagy> Oh! You _want_ it to suck?
bradhe has quit [Remote host closed the connection]
mocfive has quit [Ping timeout: 265 seconds]
<benzrf> ~_~
<benzrf> fine ill write a custom traversal thingy
<bnagy> then maybe it's parse that's the stupid one :)
cjsarette has joined #ruby
<bnagy> nah one of them should respect the json class
<bnagy> which is insane
bradhe has joined #ruby
<bnagy> but honestly, use Marshal
<atmosx> what's the prob? JSON should not pass hashes?
<bnagy> at least then it's clear that you want insecurity
<benzrf> ;-;
<benzrf> i /dont/ want insecurity
<benzrf> i just want to automatically reinflate certain objects
<benzrf> so i will write a custom thingy for that
<atmosx> no you want insecurity
<bnagy> well then don't serialise anything but 'simple' containers and types
<atmosx> bnagy: why is that insecure?\
<bnagy> loading custom classes?
<atmosx> benzrf: use email, like normal people.
<bnagy> so many ways
simoz16 has joined #ruby
<bnagy> like, this is about half on the bonedead rails RCE bugs
<atmosx> exactly
<atmosx> bnagy: why is that insecure?
dik_dak has joined #ruby
<bnagy> *half of bonehead etc morning fingers sigh
popl has quit [Ping timeout: 248 seconds]
<benzrf> rce?
sambao21 has joined #ruby
phansch_ is now known as phansch
<bnagy> remote code execution
<benzrf> id imagine
Parker0 has quit [Quit: Textual IRC Client: www.textualapp.com]
<benzrf> SAVE STORAGE SPACE PUT USER CREDENTIALS ON THE CLIENT SIDE AND DO AUTH THERE
<bnagy> anyway if it's trusted data, as in you produced it yourself and it's as secure as the rest of the code, then use Marshal, then it's clear. If it's user supplied, use safe json or whatever
bradhe has quit [Ping timeout: 265 seconds]
<bnagy> or, ideally, don't ever unserialise user supplied data
<benzrf> hmmmm
<bnagy> we've already had one exploitable heaf o/f in the unserialise code itself. There will be more.
dawkirst has quit [Ping timeout: 272 seconds]
<bnagy> just that nobody's lookin
Parker0 has joined #ruby
<bnagy> *heap of
<benzrf> i am writing a JS-to-ruby rmi widget that acts as Rack middleware and does the JS generation for you
<benzrf> 8D
* benzrf ducks
Hanmac1 has joined #ruby
<bnagy> I didn't understand any of the words in that sentence
<benzrf> rmi = remote method invocation
<benzrf> javaspeak actually
<benzrf> basically allow you to access server-side objects from client-side js via websockets
stkowski has quit [Quit: stkowski]
<benzrf> you call a function from it and it generates js to establish a connection and drop in a var
<bnagy> oh. I thought they already had stuff for this that wasn't stupid?
<benzrf> then you can call methods on the var and youll get promises that resolve
<benzrf> :(
nairys has joined #ruby
<benzrf> bnagy why do you hurt me so
<benzrf> im sure all the rails skiddies who love stupid language tricks will loveit
<bnagy> because that's how idealistic coders encounter people that do security
hanmac has quit [Ping timeout: 272 seconds]
jedimind has joined #ruby
Xeago has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
<benzrf> i *know* this is normally a terrible idea
jackneill has quit [Ping timeout: 260 seconds]
danshultz has joined #ruby
<shevy> benzrf bnagy is like the old dragon that guards a cave full with gold
<benzrf> im trying to make it minimally stupid ill tell you about it in a sec
<benzrf> brb
<shevy> bnagy it'll be his first gem!
Guest86406 has quit [Ping timeout: 245 seconds]
kate_r has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
sambao21 has quit [Quit: Computer has gone to sleep.]
ktosiek is now known as filipk
Notte has quit [Remote host closed the connection]
<benzrf> no 1:
filipk is now known as ktosiek
<bnagy> <img src=popcorn.gif>
<benzrf> it will not let you send over objects or invoke on them unless they contain an identifying mixin
<benzrf> no 2:
<benzrf> you cannot call methods that have not been explicitly marked as js allowed
<benzrf> no 3:
<bnagy> hahaha
<benzrf> no more than n number of objects per session allowed on the server where you can set n
<shevy> will your gem have documentation?
<benzrf> now that is only 50% likely to get hacked instead of 100%
<bnagy> holy shit you have reinvented activeX!
<benzrf> B)
yalue has quit [Quit: Leaving]
<bnagy> kill yourself.
<benzrf> D:
<bnagy> nah srsly though, that still sounds pretty bad
<benzrf> im sure it is
<benzrf> please tell me how
Squarepy has quit [Quit: Leaving]
<bnagy> what's your 'identifying mixin' ?
<bnagy> and also, what's wrong with just using normal websockets?
rylinaux has quit [Remote host closed the connection]
lfox has quit [Ping timeout: 265 seconds]
<v0n> no ini parser in the standard library?
<bnagy> aren't they designed for this, so that the server can fill the reqs and stream the responses?
nhhagen has quit [Remote host closed the connection]
<bnagy> I mean.. I don't usually do any webcrap so my understanding of that domain is pretty limited
<benzrf> bnagy: they are, but it is a pain to write up all the code for recognizing particular messages
sambao21 has joined #ruby
nhhagen has joined #ruby
<shevy> v0n unfortunately I think there is no, but if you have written one, suggest to include it as feature request to the core team
<benzrf> then you would stick something like <%= clientside_tag(Printer.new, "print_thing") %>
<benzrf> and it will generate JS for setting 'print_thing' to a websocket proxy to the printer obj
<bnagy> or you could just learn JS
<benzrf> I /know/ J
<benzrf> S
<benzrf> but writing it SUCKS
<freeone3000> benzrf: Might just want to port GWT over to Ruby.
<benzrf> gwt?
<benzrf> ahuman:
<benzrf> *ah
<v0n> shevy: I was just looking for one. Any recommendation? seems like the choice are 'ini' and 'inifile' gems
<benzrf> im already having fun with this, even though its not gonna get used :)
<bnagy> I am all for having fun
po10 has quit [Quit: /]
dawkirst has joined #ruby
xlogic has joined #ruby
joshu has quit [Remote host closed the connection]
<shevy> v0n dont know of a good one myself sorry. I am still using yaml :(
aspires has quit [Remote host closed the connection]
RaCx_ has joined #ruby
joshu has joined #ruby
<benzrf> yaml > ini anyway B)
<benzrf> everybody loves yaml
aspires has joined #ruby
atmosx has quit [Quit: computer went to sleep...]
bradhe has joined #ruby
<benzrf> it is like json, if it were python isntead of javascript
NemesisD has joined #ruby
mocfive has joined #ruby
<benzrf> sort of
<benzrf> not really
atmosx has joined #ruby
RaCx has quit [Ping timeout: 260 seconds]
RaCx_ is now known as RaCx
po10 has joined #ruby
<v0n> I don't like yaml a lot
<shevy> benzrf except that it mandates the nazi encoding UTF
<shevy> ini doesn't!
jlast_ has joined #ruby
<shevy> json I found always weird, how can you do specific objects with it?
<v0n> It's really great to serialize anything, but it is not adequate for a simple sections/properties file
<shevy> like a symbol
sparrovv has quit [Remote host closed the connection]
SHyx0rmZ has quit [Ping timeout: 245 seconds]
<benzrf> v0n: you mean it is too much?
<benzrf> shevy: anybody who does not accept UTF-8 as the ONE TRUE ENCODING is obviously a commie spy
<lewellyn> UTF-32 is the future.
<shevy> benzrf can you not read other encodings?
<shevy> benzrf if so, a spy would use encodings you could not read :>
SHyx0rmZ has joined #ruby
<benzrf> utf-8 rules other encodings drool WOOP WOOP!!!!!!
gregoriokusowski has quit [Quit: gregoriokusowski]
rylinaux has joined #ruby
<shevy> lewellyn I'll go with UTF-64
* lewellyn replaces benzrf's usual coffee with UTF-9. let's see if he notices.
<v0n> benzrf: yep
<benzrf> i dont even drink coffee
Asher has quit [Quit: Leaving.]
asteros has quit [Ping timeout: 248 seconds]
<benzrf> i drink iced tea
<benzrf> B)
<apeiros> utf-7, to avoid issues with those non-8bit-machines…
<havenwood> utf-8 only, non-9bit-machines be damned!
<shevy> off the top of your head, how to open a remote page with ruby: (1) require 'open-uri'; result = open('url_goes_here').read ?
<shevy> hmm I forgot a (2) there :P
jlast has quit [Ping timeout: 260 seconds]
clamstar has quit [Quit: Computer has gone to sleep.]
<benzrf> shevy: get bro pages
<benzrf> sudo gem install bro
asteros has joined #ruby
<shevy> wtf
<shevy> what is this name
<v0n> shevy: URI.escape(url) and you're ok
<shevy> bro-gem
<shevy> benzrf, please
<shevy> you MUST find other people to give names to your gems
mikepack has quit [Remote host closed the connection]
<benzrf> shevy: that is not my name
<benzrf> shevy: bro pages are somebody elses idea
<shevy> man
<benzrf> there are man pages, then there are bro pages
<shevy> wtf
<shevy> can I have fem pages too
DrCode has joined #ruby
<shevy> and sis pages
iamsean has joined #ruby
<shevy> bro pages for brogrammers
<benzrf> bro pages only have examples, unlike dumb boring man pages
<shevy> I eliminate every man page I find anyway
pr00t has quit [Read error: Operation timed out]
<shevy> it was good in the 1970s
pr00t has joined #ruby
rezzack has joined #ruby
<bnagy> sometimes I honestly wonder if this whole channel is an elaborate troll
<benzrf> bnagy: you have uncovered my plot
<benzrf> this is actually The Bnagy Show
<benzrf> it is like the Truman show but only irc not your whole life
jkamenik has quit [Quit: Leaving.]
aniM has quit [Ping timeout: 252 seconds]
<shevy> nah
<shevy> The Bnagy Show is like those two old men in the muppets show
<benzrf> you mean waldorf and statler
<shevy> I have no idea about their names
<benzrf> dohoho
<shevy> but I know them from webforum avatars
pu22l3r__ has joined #ruby
iamsean has quit [Ping timeout: 264 seconds]
<shevy> where is atmosx
<shevy> there you are!!!
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
<shevy> atmosx I have to write a suite that will extract (and process and eventually help display) data from different taxonomical sets, including (mostly) http://www.ncbi.nlm.nih.gov/Taxonomy
danman has quit [Quit: danman]
linojon has joined #ruby
<shevy> and right now I am absolutely clueless how
<benzrf> shevy: o dangerousdave
<benzrf> *dang
<benzrf> haha wow
kenneth has quit [Quit: kenneth]
pu22l3r_ has quit [Ping timeout: 245 seconds]
<shevy> lol
<benzrf> i actually wrote some python scripts to work with data from there
<shevy> your tab completions inspire me
<benzrf> back last summer
<dangerousdave> hello
<benzrf> sup dangerousdave
<benzrf> just a tab mishap
<shevy> atmosx problem is they actually want it in perl, so my idea is to first finish with a suite in ruby, then port it somehow to perl
<dangerousdave> being dangerous
<benzrf> ick
<shevy> dangerousdave you can go back to idle mode again now
charliesome has quit [Client Quit]
standyro2 has joined #ruby
<centrx> rb2pl
<dangerousdave> zzzz
<shevy> benzrf the team is like +10 years older than me on average, that is why they learned perl, and they didn't learn another language (well other than C or C++)
pu22l3r__ has quit [Ping timeout: 240 seconds]
sassamo has quit [Remote host closed the connection]
<bnagy> teach them julia
sassamo has joined #ruby
mikepack has joined #ruby
<benzrf> wow
<benzrf> thats awful
afhammad has quit [Remote host closed the connection]
<shevy> julia?
zeade has joined #ruby
west24352 has joined #ruby
afhammad has joined #ruby
dblessing has quit [Quit: dblessing]
<west24352> hi all, what is the closest thing to an array in ruby? I need one for SASS, there is a list () which is similar, is that the closest?
brunosanches has joined #ruby
brunosanches is now known as brunops
<centrx> west24352, An Array
brunops has quit [Changing host]
brunops has joined #ruby
<centrx> my_array = [1, 2, 3]
mikepack has quit [Remote host closed the connection]
sassamo has quit [Ping timeout: 245 seconds]
<west24352> centrx, that would be good, will check if it runs :)
Megtastique has quit []
<Hanmac1> west24352: depends ... are you an PHP spy? do you want an "associative" array? we call it Hash
chrisramon has joined #ruby
<shevy> centrx lol. epic answer
<shevy> no, west24352 wrote array
afhammad has quit [Read error: No route to host]
<shevy> so centrx gave the best answer
kenneth has joined #ruby
<shevy> Hanmac1, you are out!
<shevy> go work on rxw!
Megtastique has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
<shevy> guys
<shevy> what is the closest thing to a string in ruby?
<centrx> PHP array: "This one datatype acts as a list, ordered hash, ordered set, sparse list, and occasionally some strange combination of those."
nomenkun has joined #ruby
afhammad has joined #ruby
<atmosx> shevy: cool
sparrovv has joined #ruby
<shevy> php is weird
<west24352> sass says no to my_array = [1, 2, 3] :(
<atmosx> shevy: cool project, is that from your intern job?
<shevy> I actually found php dataset more confusing than ruby
<west24352> if it was js i would be making a 2d array
<shevy> atmosx yeah, but I have to sign some shitty thing where I need to be careful what I can "take out" from the main building (blabla trade secrets blablablabla)
<shevy> js has no hash?
<shevy> west24352 but it is valid ruby!
<atmosx> shevy: maybe we can sell their secrets somehow
<benzrf> shevy: a string?
<shevy> >> my_array = [1, 2, 3]
<eval-in> shevy => [1, 2, 3] (https://eval.in/95505)
<atmosx> shevy: that would be interesting
<shevy> benzrf CORRECT!
SHyx0rmZ has quit [Ping timeout: 252 seconds]
<shevy> benzrf well actually... name ALL ways in ruby to create a string
Davey has joined #ruby
<benzrf> shevy: js 'objects' are hashes
<shevy> (the major ways)
<west24352> a=[ [1,2,3],[4,5,6] ] and accessing it like a[0][1] and want to do that in sass which is built on ruby afaik
<benzrf> literals?
<atmosx> shevy: industrial espionage is interesting. Then we can invest in Greek bonds short-sell them, make some money.
mary5030 has quit [Remote host closed the connection]
<atmosx> shevy: and go the bahamas
<Hanmac1> west24352: works for me:
<Hanmac1> >> a=[ [1,2,3],[4,5,6] ]; a[0][1]
<shevy> atmosx hehe nah... I just want to work for one month for now, then do something else and consider further options. what annoys me is a clause for "future work" in that document... I haven't signed it yet
chrisramon has quit [Client Quit]
Al__ has joined #ruby
<atmosx> shevy: I see.
<shevy> atmosx Greek investment scares me ;-)
<atmosx> shevy: how much do they pay you?
<shevy> atmosx btw do you know the "greek motife" in protein structure?
<atmosx> shevy: sure it should.
<Hanmac1> hm where is my charlie? :/
<atmosx> shevy: no
Hanmac1 is now known as Hanmac
saarinen has quit [Quit: saarinen]
<shevy> atmosx sorry, "greek key" motif
<atmosx> shevy: but tell that to greek nationalists, it's all their waiting to start singing about racial superiority ll
<west24352> it must be just sass then, rather than ruby itself, that makes it a problem
V9Energy has joined #ruby
jlast_ has quit [Remote host closed the connection]
<shevy> and in protein structure, it is 4x beta-sheet (plated sheet?), starting from one point, to the left, to the right and to the left again or something like that... a folding pattern
asmodlol has quit [Ping timeout: 240 seconds]
lkba has quit [Ping timeout: 260 seconds]
<shevy> atmosx, here is a cool example, not sure you can see much, but to the right it should resemble a (more complex) greek key -> http://employees.csbsju.edu/hjakubowski/classes/ch331/protstructure/greekkeymotiff.gif
asmodlol has joined #ruby
Asher has joined #ruby
asmodlol has quit [Remote host closed the connection]
afhammad has quit [Ping timeout: 272 seconds]
fedesilv_ has joined #ruby
<shevy> atmosx eh normal payment crap, dont know what the standard rate was, very low. but I already know I would not do this job for a longer while, I dont want to specialize in taxonomy or data mining really
jobewan has quit [Quit: Leaving]
agent_white has quit [Quit: leaving]
<shevy> atmosx nationalists are idiots in every country anyway
shadoi has joined #ruby
IceyEC has quit [Quit: IceyEC]
<atmosx> shevy: word heh
<shvelo> who are the mysterious people who download gems the instant they are published?
<atmosx> shevy: that's a tertiary structure, I don't undetstand which part is the greek key
<shevy> atmosx do you have to use javascript for the stuff you code?
asteros has quit [Ping timeout: 265 seconds]
asteros_ has joined #ruby
<shevy> shvelo! my nick brother!
<atmosx> shvelo: people running mirrors
<shevy> now we just need shlevy from #nixos !
<shvelo> hey shevy
<west24352> Hanmac1, no im not a php spy ;)
<shevy> shvelo these are bot downloads
<shevy> shvelo 99% of these instant downloads
<bnagy> west24352: exactly what a PHP spy would say
SHyx0rmZ has joined #ruby
jlast has joined #ruby
<shevy> atmosx yeah...
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
postmodern has joined #ruby
camila has quit [Quit: Konversation terminated!]
<shevy> atmosx not sure how they map it into 3D, but on the right side, it is the typical greek key pattern... goes to the left (to 2), then it goes to the right (to 4), then to (3) I think
<shevy> aren't you greek, you should know that key! :P
<shvelo> so 17k downloads ain't shit?
po10 has left #ruby ["/"]
<shevy> minotaurs too - you should know what minotaurs is
iliketurtles has joined #ruby
<shevy> shvelo that's quite a lot. dont think these are only bots
<shevy> 3 real users ;P
fedesilva has quit [Ping timeout: 260 seconds]
iliketurtles has quit [Excess Flood]
<shevy> I once had a guy tell me "hey, nice gems but... WHERE IS THE DOCUMENTATION"
iliketurtles has joined #ruby
<shevy> and he was right :<
iliketurtles has quit [Excess Flood]
ClientAlive has joined #ruby
<shvelo> lol
<west24352> although php is kinda cool :)
iliketurtles has joined #ruby
fedesilv_ has quit [Ping timeout: 264 seconds]
sassamo has joined #ruby
iliketurtles has quit [Excess Flood]
kenneth has quit [Quit: kenneth]
<shvelo> I'm writing another template engine https://github.com/shvelo/rcurse
iliketurtles has joined #ruby
shadoi has quit [Ping timeout: 245 seconds]
diegoviola has quit [Quit: WeeChat 0.4.2]
<centrx> >> $arr = array('fruit' => 'apple', 'veggie' => 'carrot', 'cow');
<eval-in> centrx => /tmp/execpad-0232c030fc00/source-0232c030fc00:2: syntax error, unexpected ')', expecting => ... (https://eval.in/95508)
<ClientAlive> When it comes to ruby applications and instlaling them, does the same gem have to be installed for each application or does one insall apply globally?
sickweezle has quit [Ping timeout: 252 seconds]
<shevy> west24352 php kinda works. but as a language, it is not of good design at all
<centrx> PHP is an abomination
Advocation has joined #ruby
<west24352> but i was just hoping not to have to use SASS lists () and get to use real arrays like any good language has
<iliketurtles> on a certain computer (mid-2012 macbook air) using Ruby 1.8.7-p374 evaluating (2**159) returns -1, but on the same setup, Ruby 1.8.7-p374 2013 macbook pro (2**159) evaluates to the correct square. why could this be?
<shevy> I dont even know what is sass
<shevy> but it clearly is not using normal ruby code
Advocation has quit [Client Quit]
<shvelo> centrx: yeah
<shevy> >> (2**159)
<eval-in> shevy => 730750818665451459101842416358141509827966271488 (https://eval.in/95509)
<shvelo> sass is a css preprocessor
Al__ has quit [Read error: Connection reset by peer]
<west24352> sass/sscss is a css preprocessor
<shevy> iliketurtles destroy the mid-2012 one
<shevy> iliketurtles or compile a new test-ruby into a prefix and try it
Al__ has joined #ruby
octoberry has joined #ruby
asmodlol has joined #ruby
<shevy> iliketurtles ftp://ftp.ruby-lang.org/pub/ruby/1.8/
<iliketurtles> shevy: we tried ruby 1.9.3-p448 and same result
<shevy> what result
<ClientAlive> Anyone?
<shevy> -1?
<bnagy> iliketurtles: probably a bad compile, or a binary build for the wrong arch
<iliketurtles> -1
<shevy> on which machine
zoscoy has joined #ruby
<shevy> on my machine, I get 73etc
<iliketurtles> shevy: on the macbook air
<iliketurtles> yes i also get 73.... on the macbook pro
<shevy> and the macbook pro shows the right outcome?
<iliketurtles> shevy: correct
<shevy> hmmm
<shevy> weird
<iliketurtles> bnagy: what do you suggest? remove version and reinstall?
failshell has quit []
<shevy> iliketurtles what if you try: (2.0 ** 159.0)
<iliketurtles> we also have this issue on numerous machines --
<bnagy> well first of all I suggest just binning 1.8.7 forever
<shevy> bin it!
<bnagy> it's past eol and not supported
kirun has quit [Quit: Client exiting]
<shevy> iliketurtles what result do you get with the .0 one?
<shevy> surely it can't be -1
<iliketurtles> shevy: 7.3 e+47
<shevy> tada!
mary5030 has joined #ruby
<bnagy> then I suggest installing up to date compiler and buiding a decent ruby from source
<iliketurtles> oh sorry and returns 0 not -1 when using integers
<iliketurtles> so wtf, what does that mean
jobewan has joined #ruby
<shevy> iliketurtles perhaps it rounds early
olivier_bk has quit [Ping timeout: 252 seconds]
<bnagy> maybe it's not automatically switching to bigint?
<bnagy> who can say
<shevy> hmm
<bnagy> ancient software does crazy stuff, use better software
<iliketurtles> weiiiird
<iliketurtles> but even 1.9.3-p448 does that
_justin has joined #ruby
<shevy> but only on the macbook air, not macbook pro
_justin has left #ruby [#ruby]
chrisseaton has quit []
iamsean has joined #ruby
<iliketurtles> correct shevy
<shevy> iliketurtles, what if you do: (BigDecimal(2) ** BigDecimal(159)).to_i
<bnagy> so both versions on that box are faulty?
<MrZYX> iliketurtles: I suppose you already checked 32 vs 64 bit?
<shevy> iliketurtles you should not get -1
<bnagy> I'd start looking at the compile chain imho
<iliketurtles> MrZYX: no i did not -- just trying to help a colleague here
<MrZYX> not only processor support but also ruby build type
<apeiros> iliketurtles: install the bigdecimal gem
<apeiros> not sure whether 1.9.3 can actually be affected
<apeiros> but zzak wrote that in case of issues with bigdecimal, one should install the gem
<iliketurtles> MrZYX: how do I check this?
bradhe has quit [Remote host closed the connection]
<MrZYX> ruby -v
<freeone3000> When using IO.popen(["arg", :err => [:child, :out]]), the subprocess seems to keep the server alive beyond when it should be killed. Any soultion to this?
bradhe has joined #ruby
jedimind has quit [Quit: screw you guys, im going home!]
<iliketurtles> MrZYX: ruby 1.8.7 (2013-06-27 patchlevel 374) [i686-darwin12.4.0]
sickweezle has joined #ruby
<benzrf> dangerousdave:
<benzrf> *dang
rljohnsn has quit [Quit: Leaving.]
<benzrf> the ZIF connector that used to attach to my CD drive shorted
<iliketurtles> shevy: can't convert fixnum into string
saarinen has joined #ruby
<benzrf> it caught on fire
<MrZYX> iliketurtles: so that's 32bit, exactly the same on the other machine?
Dude007 has joined #ruby
<iliketurtles> MrZYX: ruby 1.8.7 (2012-10-12 patchlevel 371) [i686-darwin12.4.0] on the macbook pro, which works
<MrZYX> mmh
<dangerousdave> hello
jerius has joined #ruby
<iliketurtles> or sorry it should be 374 patch level, i just switched
mansi has quit [Remote host closed the connection]
<shevy> iliketurtles huh
<MrZYX> the i686 is what matters here
<Hanmac> iliketurtles: 1.8 is dead
<shevy> iliketurtles into string??? where or how?
zz_jrhorn424 is now known as jrhorn424
<shevy> >> (BigDecimal(2) ** BigDecimal(159)).to_i
<eval-in> shevy => undefined method `BigDecimal' for main:Object (NoMethodError) ... (https://eval.in/95510)
mansi has joined #ruby
duggiefr_ has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
<shevy> >> require 'bigdecimal'; (BigDecimal(2) ** BigDecimal(159)).to_i
<eval-in> shevy => (https://eval.in/95511)
Al__ has quit [Read error: Connection reset by peer]
sassamo has quit [Remote host closed the connection]
<shevy> grrrrr
<centrx> Hanmac, I believe the term is "retired"
<shevy> >> require 'bigdecimal'; p (BigDecimal(2) ** BigDecimal(159)).to_i
<eval-in> shevy => (https://eval.in/95512)
<shevy> wtf
Al__ has joined #ruby
<bnagy> >> 23890654334567890987654345678.class
<eval-in> bnagy => Bignum (https://eval.in/95513)
<iliketurtles> shevy: lol
sassamo has joined #ruby
mikepack has joined #ruby
<bnagy> autopromote is to bignum not bigdecimal
<Hanmac> centrx i think the term is buried and then exhumed ...
<shevy> >> require 'bigdecimal'; p BigDecimal(5).to_s
<eval-in> shevy => (https://eval.in/95514)
<shevy> this bot is a cheating bot
rljohnsn has joined #ruby
<MrZYX> it says Forbidden access to file `/'
<shevy> huh
lkba has joined #ruby
<shevy> we access that file?
<kraljev5> How can I define a constant in a subclass?
mikesplain_ has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
<shevy> kraljev5 like you do everywhere else!
<kraljev5> from a parent's constructor
<Hanmac> shevy: bot cant load c-complied ext yet :/
<MrZYX> kraljev5: sounds like broken design
<shevy> >> module Foo; end; Foo::Bar = 5; p Foo::Bar
<eval-in> shevy => 5 ... (https://eval.in/95515)
<shevy> Hanmac I see
<iliketurtles> shevy: so im confused what to do here, lol
mikesplain has quit [Ping timeout: 252 seconds]
mikesplain_ is now known as mikesplain
<apeiros> kraljev5: you can't define constants in a method
<Hanmac> shevy: bad that charlie is offline again :/
<shevy> iliketurtles well recompile on that machine
<apeiros> kraljev5: goes against the sense of a constant anyway
<iliketurtles> shevy: it was compiled there originally, but OK
<shevy> but in ruby you can change a constant!
<apeiros> shevy: yes, but not define one in a method, observe:
<bnagy> iliketurtles: change up your build chain
<apeiros> >> def foo; X = 1; end; foo
<eval-in> apeiros => /tmp/execpad-83a1f8ac3e1f/source-83a1f8ac3e1f:2: dynamic constant assignment ... (https://eval.in/95516)
<shevy> he could do Object.const_set("Foo", 42)
davy_ has joined #ruby
<shevy> ruby is like fightclub
<apeiros> yes, const_set would work
<shevy> first rule of fightclub - there is no fightclub
<shevy> second rule of fightclub ... no idea
mansi has quit [Ping timeout: 252 seconds]
iamsean has quit [Ping timeout: 260 seconds]
<shevy> but it was an epic scene
<bnagy> either update the xocde commandline tools, or upgrade whatever compiler you used
<shevy> iliketurtles well
Hobogrammer has quit [Ping timeout: 245 seconds]
<bnagy> iliketurtles: also, how did you originally install?
<shevy> iliketurtles that just sounds weird to me
<bnagy> as in what invoked the compiler?
afhammad has joined #ruby
<shevy> iliketurtles why would other binaries with that same version number not show this behaviour?
dawkirst has quit [Read error: Operation timed out]
ephemerian has quit [Quit: Leaving.]
<iliketurtles> bnagy: i believe via rbenv install
<shevy> !!!
<shevy> use the source!
<kraljev5> ok, if I cannot define a constant, how can I make a subclass being able to store content?
sassamo has quit [Ping timeout: 272 seconds]
afhammad has quit [Client Quit]
<bnagy> shevy: rbenv is a source install, just stfu for once
<kraljev5> class User < Controller
<kraljev5> get 'some_data_i want to store'
<kraljev5> end
<shevy> bnagy can you die in a fire
Hanmac1 has joined #ruby
<bnagy> iliketurtles: ok, that uses ruby-build, you can look at the ruby-build recipe, as well. Maybe it's uh.. old or something, I dunno :/
<shevy> kraljev5 depends on that method get()
Fyyr13 has joined #ruby
<kraljev5> it is defined in Controller as self
<kraljev5> self.get(text)
<shevy> iliketurtles that was the last 1.8.7 variant ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p374.tar.bz2
<bnagy> iliketurtles: I would definitely start by trying to isolate differences in the build chain though - xcode versions etc
<iliketurtles> ok
bradhe has joined #ruby
Hanmac has quit [Ping timeout: 265 seconds]
Hanmac has joined #ruby
<shevy> kraljev5 and where is the data stored?
Elhu has quit [Quit: Computer has gone to sleep.]
kenneth has joined #ruby
<shevy> kraljev5 or rather, how do you want to query it
phansch has quit [Quit: Leaving]
<kraljev5> ramaze has self.map
<kraljev5> in the controller
<kraljev5> that is stored somewhere, no?
sickweezle has quit [Ping timeout: 252 seconds]
<kraljev5> for example: map '/'
zigomir has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 260 seconds]
<shevy> well let's see
<kraljev5> data has to be stored per subclass
<kraljev5> and somehow accessible later
alekst has quit [Quit: Computer has gone to sleep.]
bambuka has quit [Remote host closed the connection]
Fyyr13 has quit [Ping timeout: 252 seconds]
<shevy> App.find_or_create(app_name).map(location, self)
<shevy> this is what it returns
cjsarette has quit [Ping timeout: 252 seconds]
<shevy> whatever App.find().map() returns
<atmosx> kraljev5: what are you tryung to do?
fedesilva has joined #ruby
<shevy> find() should be "Finds or creates an application for the given name and URI."
mudmaster has quit [Quit: Leaving...]
relix has joined #ruby
<shevy> map() should be "Maps an object to the given URI."
benlieb has joined #ruby
jailbot has quit [Remote host closed the connection]
freezey has quit [Ping timeout: 245 seconds]
LexicalScope has quit [Ping timeout: 252 seconds]
f4a244c has quit [Quit: f4a244c]
mikesplain has quit [Quit: mikesplain]
<freeone3000> IO.popen(), single-argument, takes the peculiar syntax ['a', 'b', :c => [:d, :e]]. Is this an array, or an hash?
interactionjaxsn has quit [Remote host closed the connection]
Astralum has quit [Ping timeout: 260 seconds]
f4a244c has joined #ruby
NemesisD has quit [Quit: WeeChat 0.4.2]
klaut has quit [Remote host closed the connection]
sickweezle has joined #ruby
<benzrf> hows it goin sickweezle
Fyyr13 has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
Hobogrammer has joined #ruby
mansi has joined #ruby
<centrx> freeone3000, This is an array
justsee has quit [Client Quit]
Txandy has joined #ruby
fbernier has quit [Read error: Connection reset by peer]
dawkirst has joined #ruby
mansi_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
EngierkO has quit [Ping timeout: 252 seconds]
<freeone3000> centrx: Okay, so ['a', 'b', { :c => [:d, :e]}] would be equivilant?
jlast has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
<shevy> >> ['a', 'b', :c => [:d, :e]]
<eval-in> shevy => ["a", "b", {:c=>[:d, :e]}] (https://eval.in/95518)
<shevy> apparently!
Fyyr13 has quit [Ping timeout: 264 seconds]
mark_locklear has quit [Ping timeout: 272 seconds]
pushpak has quit [Quit: Linkinus - http://linkinus.com]
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hanmac has quit [Ping timeout: 252 seconds]
<freeone3000> Awesome, thanks.
sassamo has joined #ruby
<benzrf> why is Rainbows! absurdly slow?!
kraljev5 has quit [Quit: kraljev5]
<shevy> freeone3000 you look at code written by someone else?
<shevy> benzrf because ruby is slow!
kraljev5 has joined #ruby
<benzrf> :\
<freeone3000> shevy: I'm looking at the official documentation.
<shevy> use python benzrf
<shevy> freeone3000 oh
asteros has joined #ruby
jlast has joined #ruby
<freeone3000> http://www.ruby-doc.org/core-1.9.2/IO.html , popen(). It's not the clearest.
blaz3rz has quit [Remote host closed the connection]
<bnagy> freeone3000: you might want to also check out open3 in stdlib, it's much more convenient for some stuff
<freeone3000> shevy: Sorry, using JRuby because I need actual threads. They're only on 2.0.0, and I'm using 1.9.2 for compatability with certain other things.
asmodlol has quit [Remote host closed the connection]
<shevy> I am on 1.9.3 myself
hobodave has quit [Read error: Operation timed out]
bradhe has quit [Remote host closed the connection]
zoscoy has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
asteros_ has quit [Ping timeout: 272 seconds]
Txandy has quit [Quit: Leaving...]
kraljev5 has quit [Client Quit]
duggiefr_ has quit [Remote host closed the connection]
kraljev5 has joined #ruby
cjsarette has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Al__ has quit [Read error: Connection reset by peer]
xcv has quit [Ping timeout: 245 seconds]
ctp has joined #ruby
Al__ has joined #ruby
rmorello has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tannerburson has quit [Quit: tannerburson]
linojon has quit [Quit: linojon]
charliesome has joined #ruby
kenneth has quit [Quit: kenneth]
sdwrage has quit [Quit: This computer has gone to sleep]
[krisbulman|afk] is now known as krisbulman
krisbulman is now known as krisbulman|afk
deception has quit [Quit: Goodbye]
saarinen has quit [Quit: saarinen]
sergicles has joined #ruby
spider-mario has quit [Remote host closed the connection]
mhenrixon has quit [Quit: Textual IRC Client: www.textualapp.com]
roolo has quit [Quit: Leaving...]
davy_ has quit [Remote host closed the connection]
danshultz has quit [Remote host closed the connection]
Naoe-Kanno has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SHyx0rmZ has quit [Ping timeout: 240 seconds]
simoz17 has joined #ruby
danshultz has joined #ruby
_justin has joined #ruby
_justin has quit [Client Quit]
kenneth has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
Authenticator has quit [Ping timeout: 272 seconds]
Authenticator has joined #ruby
simoz16 has quit [Ping timeout: 245 seconds]
<freeone3000> Looks like Open3 fails on JRuby because Process.spawn ignores the option hash.
simoz15 has joined #ruby
sdwrage has joined #ruby
yfeldblum has quit [Remote host closed the connection]
simoz17 has quit [Ping timeout: 252 seconds]
danshultz has quit [Ping timeout: 245 seconds]
<snkcld> how can i have .map {|product| } _not_ return that element?
<snkcld> instead of adding a select afterwards
asteros has quit [Quit: asteros]
iamdoo2 has joined #ruby
Oog has joined #ruby
<Oog> Timeout::timeout isn't raising the exception when the code in it seems to launch another process and wait on it
<Oog> advice?
<RubyPanther> Oog: code or it didn't happen
mansi_ has quit [Remote host closed the connection]
<RubyPanther> snkcld: huh?
<MrZYX> snkcld: add a select before it...
<Oog> Timeout::timeout(2) { kit.to_file(image_file.path) }
<Oog> kit is imgkit
allaire has joined #ruby
<Oog> its just sitting here forever
mansi has joined #ruby
Brolen has quit [Ping timeout: 248 seconds]
<Oog> wkhtmltoimage is dutifully eating up 100% of my cpu
<bnagy> freeone3000: what option are you trying to set?
motto has quit [Quit: Sto andando via]
<freeone3000> bnagy: :err => [:child, :out]
asteros has joined #ruby
shadoi has joined #ruby
<Oog> when i finally kill the wkhtmltoimage process in task manager
<Oog> ruby then says Timeout::Error: execution expired
fedesilv_ has joined #ruby
<bnagy> can't you just use popen3?
sailias has quit [Ping timeout: 260 seconds]
fedesilva has quit [Read error: Connection reset by peer]
<RubyPanther> Oog: I know for example that DNS lookups will foil the timout unless you do require 'resolv-replace' (not sure if this is still true)
<bnagy> freeone3000: like just get the handle to err and write it to out
sassamo has quit [Remote host closed the connection]
<bnagy> or capture2e maybe, if I am understanding what you want
<snkcld> well, im doing a map() then doing a select to weed out all the elemnts which map had returned as null
mocfive has quit [Remote host closed the connection]
<snkcld> so im just wondering if map can ever return an array of a smaller size than the original
iamdoo2 has quit [Ping timeout: 252 seconds]
<MrZYX> no
<bnagy> snkcld: look at compact
sassamo has joined #ruby
<Oog> RubyPanther: it shouldnt be doing dns its rendering local html
mocfive has joined #ruby
<Oog> is there a more robust timeout...?
<RubyPanther> Oog: At the extreme end is forking off a process and doing the timeout in the parent
<snkcld> heh. bnagy thanks, compact is perfect
<MrZYX> snkcld: I think that a .map {|i| i if condition }.compact is less flexible and less readable than a .select {|i| condition }.map {|i| i }. nil may be a valid element in the mapped array and for me it just reads backwards otherwise
mansi has quit [Ping timeout: 272 seconds]
tauebel has quit [Ping timeout: 248 seconds]
<Oog> what about running the bad command in a new thread and having the main thread sleep on it with a timeout
<bnagy> I'd agree with that ^^
workmad3 has joined #ruby
<Oog> like Thread.sleep(newthread,2.seconds)
dx7 has quit [Remote host closed the connection]
<bnagy> Oog: if timeout is not working it's probably cause some C thread has run off with execution and isn't giving it back
<iliketurtles> so recompiled ruby 1.8.7 on this older macbook, and notice that in IRB 2 ** 159 works, but in tmux 2 ** 159 returns 0 :( tried commenting out the entire tmux.conf but same issue, running tmux 1.8
<bnagy> MRI is a bit stymied then.
<Oog> bnagy: that is likely i mean i see wkhtmltoimage process eating 100% of the cpu
dx7 has joined #ruby
Maitiu has joined #ruby
<Oog> and the kit.to_file function is waiting for that process to exit
claymore has quit [Quit: Leaving]
<MrZYX> Oog: there's a reason even java deprecated Thread.stop early and never relived it
mlpinit has quit [Remote host closed the connection]
<benzrf> :y
mocfive has quit [Ping timeout: 265 seconds]
sassamo has quit [Ping timeout: 272 seconds]
<bnagy> iliketurtles: ok that's probably because your system ruby isn't the same as your user shell ruby now
<benzrf> you may want to make tabs 2sp somehow
<Oog> MrZYX: so whats the answer?
<freeone3000> MrZYX: Because a thread can hold a mutex, and when a thread is killed, that mutex will never be released?
rootshift has joined #ruby
<bnagy> iliketurtles: so you just need to mess with paths and bash_profile and blah blah until you get the same ruby under tmux / screen as you get from a 'normal' shell
<shevy> benzrf, ERROR: Could not find a valid gem 'clientside' (>= 0) in any repository
<MrZYX> freeone3000: not only that, you also can't assure that you interrupt it between two atomic operations etc.
<Oog> it seems like there isnt a fix...
<benzrf> heh
<freeone3000> MrZYX: Okay. What we do in languages with threading support is actually raise a shared volatile semaphore for the thread to kill itself.
<shevy> iliketurtles now you know that it works!
<benzrf> i will only push it in the event that it is usable and does not entirely suck (for what it is)
nhhagen has quit [Remote host closed the connection]
<shevy> benzrf man
<shevy> benzrf push early, push often
enebo has quit [Quit: enebo]
<bnagy> freeone3000: ruby has threading support
<MrZYX> freeone3000: sure, that's the sane solution, tell the thread to kill itself
kraljev5 has quit [Ping timeout: 260 seconds]
aspires has quit []
rubyracer has quit [Quit: Konversation terminated!]
<MrZYX> freeone3000: that's just not built into most languages
<bnagy> imho the easiest way in ruby is just to push a 'go die please' to a Queue
kpshek has quit []
<bnagy> but there are fiddlier and more exotic ways as well
<MrZYX> bnagy: that's basically was freeone3000 was saying
dx7 has quit [Ping timeout: 252 seconds]
<bnagy> I know, but he also implied that ruby didn't have threading support :)
<MrZYX> Oog: so you run an external process? kill that instead of the thread
<Oog> the imgkit code is doing Open3.popen3(*cmd) {|i, o, e|
<Oog> im guessing that is what is getting stuck
blaz3rz has joined #ruby
digifiv5e has quit [Quit: quit]
<MrZYX> try getting that pid and sending it a SIGTERM then
<shevy> btw benzrf since you once wondered what gem would be cool - a gem that could simulate unix pipelines in pure ruby would be nice
<MrZYX> after sleeping for n seconds
aryaching has quit [Ping timeout: 252 seconds]
<Oog> MrZYX: but if the process finishes early I dont want to wait
<Hanmac1> shevy: did you hear the recent news? AngryBirdsPlayer supports the NSA ;P
<shevy> what is that
freezey has joined #ruby
<Hanmac1> shevy http://www.theguardian.com/world/2014/jan/27/nsa-gchq-smartphone-app-angry-birds-personal-data , the NSA uses games like AngryBirds to get your infomation
Hanmac1 is now known as Hanmac
mocfive has joined #ruby
<shevy> ah
<shevy> decoy
<Hanmac> ping banister
<MrZYX> Oog: wakeup your main thread after the commands exists
<MrZYX> *exits
freerobby has joined #ruby
bradhe has joined #ruby
<lewellyn> Hanmac: and any other app which transmits analytics data.
<benzrf> shevy: perhaps i will make this
x77686d has quit [Quit: x77686d]
<benzrf> when i am done with Clientside
<benzrf> btw it is possible to sort-of use clientside
<MrZYX> Oog: or whatever thread setup with the kill code sleeps
<benzrf> the middleware is mostly done, i just have to write the js generator
<benzrf> which will probably be more work really <_<
<benzrf> does ruby have something like a hash whose keys expire after a certain amount of time
<shevy> dont think so
<benzrf> lame
<shevy> just make an object
<shevy> that purges itself after some time
<benzrf> hmmm
AlSquirrel has quit [Quit: This computer has gone to sleep]
<benzrf> shevy: wanna test the middlware for me
<RubyPanther> Threads are silly, they add a huge amount of code complexity, for little to no gain
<benzrf> :u
iamsean has joined #ruby
<benzrf> shevy: do you know ur websockets
<RubyPanther> forking and IPC is hard, they say... threads are more complicated, only the hello world is easier
blaz3rz has quit [Ping timeout: 252 seconds]
nfk has quit [Quit: yawn]
<Oog> heh this code works except wkhtmltoimage continues to run........
<freeone3000> RubyPanther: They allow me to, say, respond to web requests and not tie up the rails thread, while maintaining a worker in the background.
<shevy> benzrf I dont know websockets
<RubyPanther> freeone3000: Right, I do that stuff too, doing that doesn't require threads
Lewix has quit [Remote host closed the connection]
<freeone3000> RubyPanther: It requires either threads or processes.
<Oog> ive tried thread.kill terminate etc - the thread seems stuck in sleep mode
phinfonet has quit [Remote host closed the connection]
<RubyPanther> Right, and Ruby was designed around *nix processes and forking
enebo has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
<benzrf> shevy: hmmm
<benzrf> shevy: do you know javascript
MrZYX is now known as MrZYX|off
<shevy> RubyPantherThread.new { loop { puts 'hi'; sleep 1} }.join is easy!
geggam has quit [Remote host closed the connection]
phinfonet has joined #ruby
<shevy> it even spawns as a zombie
<freeone3000> RubyPanther: If that were true, it'd have a shorter startup time.
<shevy> benzrf a bit, the basics. I cant really do anything close to node.js
<benzrf> hmmmmm
bradhe has quit [Ping timeout: 272 seconds]
<RubyPanther> I know, it is like the rails blog in 4 minutes or whatever the blog was. the hello world hides that the code complexity is huge
<benzrf> you know about anonymous functions in js, like callbacks?
<shevy> nope, that is advanced stuff
<benzrf> mka
jrobertfox has quit [Remote host closed the connection]
<benzrf> y
west24352 has quit [Quit: Leaving]
<benzrf> anybody here know websockets on the js/browser end and care to test out my half-finished gem?
<RubyPanther> Threading is guaranteed to be more logically complicated, regardless of how many LoC your part is
brunops has quit [Ping timeout: 245 seconds]
<RubyPanther> benzrf: I know telnet, that is the same as websockets right?
<benzrf> heh
<benzrf> basically i guess o:
<benzrf> do you know js?
<RubyPanther> I did last time I wrote some... 5 or 7 years ago
jobewan has quit [Quit: Leaving]
<benzrf> ;p
baroquebobcat has quit [Quit: baroquebobcat]
IceyEC has joined #ruby
<shevy> hmmm
<shevy> I begin to notice that RubyPanther speaks about his deeds many years ago
<shevy> like learning ruby 15 years ago
jlast has quit [Remote host closed the connection]
<shevy> writing some threading 7 years ago
<benzrf> clearly he is an old fogey
<shevy> at this point he may not even use ruby anymore!
bean has joined #ruby
x77686d has joined #ruby
<shevy> benzrf, don't end up like that
<shevy> leave ruby early if you can
xcv has joined #ruby
<RubyPanther> No, I only learned Ruby in 2004. I first found out Ruby was better than Perl for OOP 15 years ago, but there were not yet English manuals
<shevy> hehe
<shevy> you could have learned japanese
xcv has quit [Remote host closed the connection]
<RubyPanther> Like Larry Wall said, Perl is not a hard language. Japanese, that is a hard language.
xcv has joined #ruby
tauebel has joined #ruby
dazeddev has quit [Read error: Operation timed out]
undert has quit [Read error: Operation timed out]
telling has quit [Read error: Operation timed out]
<shevy> hmm
thesheff17 has joined #ruby
JBreit has quit [Read error: Connection reset by peer]
raar has joined #ruby
iamsean has quit [Ping timeout: 264 seconds]
raar is now known as Guest55511
dazeddev has joined #ruby
telling has joined #ruby
telling has quit [Changing host]
telling has joined #ruby
<Oog> the problem is capture3 blocks - how can i interrupt it?
iajrz_ has joined #ruby
jerius_ has joined #ruby
dwingo has quit [Ping timeout: 252 seconds]
undert has joined #ruby
dawkirst has quit [Ping timeout: 264 seconds]
carif has joined #ruby
Al__ has quit [Read error: Connection reset by peer]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
Al__ has joined #ruby
Al__ has quit [Client Quit]
baroquebobcat has joined #ruby
mikepack has joined #ruby
mityaz has quit [Quit: See ya!]
supershabam has joined #ruby
mikepack has quit [Remote host closed the connection]
IceyEC has quit [Quit: IceyEC]
mikepack has joined #ruby
x77686d has quit [Quit: x77686d]
mikepack has quit [Read error: Connection reset by peer]
mikepack_ has joined #ruby
benlieb has quit [Quit: benlieb]
jerius has quit [Ping timeout: 252 seconds]
JBreit has joined #ruby
virtualize has quit [Ping timeout: 265 seconds]
danshultz has joined #ruby
digifiv5e has joined #ruby
asteros has quit [Quit: asteros]
digifiv5e is now known as Guest85476
jerius_ has quit [Ping timeout: 240 seconds]
<RubyPanther> shevy: I don't write threading stuff because I fork and IPC, (still) and I use Ruby for most of my code.
virtualize has joined #ruby
mando has quit [Remote host closed the connection]
bradhe has joined #ruby
mando has joined #ruby
<RubyPanther> Although I write more and more SQL all the time :/
griffindy has quit [Quit: Computer has gone to sleep.]
<shevy> a database panther!
<shevy> SQL the world
<RubyPanther> shevy: the funny thing is, my database code uses less and less SQL these days thanks to Arel! But GIS programming is mostly in SQL
Guest85476 has quit [Client Quit]
drumusician has quit [Ping timeout: 260 seconds]
<RubyPanther> I need a GIS ORM
benlieb has joined #ruby
asteros has joined #ruby
rylinaux has quit [Quit: Quit - ZNC]
gizmore has joined #ruby
mansi has joined #ruby
zeade has left #ruby [#ruby]
mando has quit [Ping timeout: 272 seconds]
<Oog> i need to convert capture3 call to popen3 i think...
meatherly has quit [Remote host closed the connection]
meatherly has joined #ruby
<bricker`work> huh, TIL about NIL
<bricker`work> what's the point?
<bricker`work> >> NIL
<eval-in> bricker`work => nil (https://eval.in/95525)
<benzrf> bricker`work: wat
Aryasam has joined #ruby
<benzrf> oh
<benzrf> >> TRUE
<eval-in> benzrf => true (https://eval.in/95526)
<benzrf> also
Bumptious has joined #ruby
<bricker`work> ah
<benzrf> probably so that lispers feel at home
mansi has quit [Ping timeout: 240 seconds]
<bricker`work> ah hah
dawkirst has joined #ruby
rylinaux has joined #ruby
<shevy> lispers are cute
<shevy> they lisp like a python
v0n has quit [Read error: Operation timed out]
<shevy> with hiccups
<shevy> ('suzshshss(shshs
freezey has quit [Remote host closed the connection]
sethen has joined #ruby
pixelgremlins_ba has joined #ruby
yfeldblum has joined #ruby
Amart41 has joined #ruby
meatherly has quit [Ping timeout: 245 seconds]
awarner_ has joined #ruby
w4pm has quit [Ping timeout: 248 seconds]
yfeldblum has quit [Remote host closed the connection]
__LX__ has joined #ruby
robbyoconnor has joined #ruby
clamstar has joined #ruby
yfeldblum has joined #ruby
Raboo has quit [Ping timeout: 245 seconds]
Coolhand has joined #ruby
brunto_ has joined #ruby
benlieb has quit [Quit: benlieb]
jailbot has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
<sickweezle> benzrf: I *think* I'm getting better. Just got back from an appointment with an allergist. They took bunch of blood.
<benzrf> dang
<benzrf> sickweezle: do you know JS
<benzrf> :y
iaj_ has joined #ruby
predator217 has joined #ruby
shvelo has quit [Ping timeout: 272 seconds]
vadviktor_ has joined #ruby
jrd00 has joined #ruby
brunops has joined #ruby
Amart41 has quit [Ping timeout: 240 seconds]
error404_ has joined #ruby
<sickweezle> benzrf: Only a tiny little sneeze.
Davey_ has joined #ruby
<sickweezle> Er, a tiny little sneeze of JavaScript that is.
Hanmac has joined #ruby
jcp has joined #ruby
Mohan___ has joined #ruby
m_3_ has joined #ruby
phreax_ has joined #ruby
jcp is now known as Guest92875
AntelopeSalad_ has joined #ruby
saarinen has joined #ruby
tonini_ has joined #ruby
Adawerk has joined #ruby
<benzrf> hm
pskosinski has joined #ruby
MacGruberGuy has joined #ruby
TigerWolf has quit [Ping timeout: 272 seconds]
sfiggins has quit [Ping timeout: 272 seconds]
brunto has quit [Ping timeout: 272 seconds]
rylinaux has quit [Excess Flood]
niharvey has quit [Read error: Connection reset by peer]
ch0mskiii has quit [Read error: Connection reset by peer]
Kruppe has quit [Ping timeout: 272 seconds]
predator117 has quit [Ping timeout: 272 seconds]
zellio has quit [Ping timeout: 272 seconds]
freeone3000 has quit [Ping timeout: 272 seconds]
m_3 has quit [Ping timeout: 272 seconds]
pdtpatr1ck has quit [Ping timeout: 272 seconds]
pixelgremlins has quit [Ping timeout: 272 seconds]
awarner has quit [Ping timeout: 272 seconds]
jrd0 has quit [Ping timeout: 272 seconds]
error404 has quit [Ping timeout: 272 seconds]
Mohan has quit [Ping timeout: 272 seconds]
grs has quit [Ping timeout: 272 seconds]
iaj has quit [Ping timeout: 272 seconds]
eliasp_ has joined #ruby
tonini has quit [Ping timeout: 272 seconds]
vt102 has quit [Ping timeout: 272 seconds]
phreax has quit [Ping timeout: 272 seconds]
helpa has quit [Ping timeout: 272 seconds]
samuelkadolph has quit [Ping timeout: 272 seconds]
eliasp has quit [Ping timeout: 272 seconds]
xargoon has quit [Ping timeout: 272 seconds]
vadviktor has quit [Ping timeout: 272 seconds]
pdtpatr1ck has joined #ruby
standyro2 has quit [Read error: Connection reset by peer]
MacGruberMan has quit [Read error: Connection reset by peer]
sdwrage has quit [Ping timeout: 272 seconds]
standyro2 has joined #ruby
rylinaux_ has joined #ruby
<shevy> sickweezle did you put up a fight before they got your blood?
ec has quit [Ping timeout: 272 seconds]
samuelkadolph_ has joined #ruby
<sickweezle> heh no, no fight
krisbulman|afk is now known as krisbulman
samuelkadolph_ is now known as samuelkadolph
simoz16 has joined #ruby
vt102 has joined #ruby
Davey has quit [Ping timeout: 252 seconds]
ec has joined #ruby
therod has quit [Ping timeout: 264 seconds]
helpa has joined #ruby
VTLob has quit [Ping timeout: 272 seconds]
AntelopeSalad has quit [Ping timeout: 272 seconds]
xargoon has joined #ruby
<sickweezle> It probably beats the alternative of them stabbing me in the back with a bunch of things I might be allergic to.
jrobertfox has joined #ruby
tauebel has quit [Quit: Leaving.]
grs has joined #ruby
sdwrage has joined #ruby
VTLob has joined #ruby
tauebel has joined #ruby
rootshift has joined #ruby
<benzrf> sickweezle: do you know anonymous funcs in js?
mikepack_ has quit [Remote host closed the connection]
simoz17 has joined #ruby
<sickweezle> benzrf: kind of. they are all pretty much anonymous, though.
<benzrf> m
rylinaux_ is now known as rylinaux
<benzrf> and you know your json?
mikepack has joined #ruby
simoz15 has quit [Ping timeout: 252 seconds]
<sickweezle> I know the idea, yeah. Can't say I'm 'good' with it, but it's a fairly obvious thing.
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
danshultz has quit [Remote host closed the connection]
<benzrf> ok
zellio has joined #ruby
TigerWolf has joined #ruby
simoz16 has quit [Ping timeout: 248 seconds]
danshultz has joined #ruby
sassamo has joined #ruby
aryaching has joined #ruby
<sickweezle> What's up?
<Oog> where can i get a list of signal names i can send via Process.kill
<benzrf> Have JavaScripters gone too far? 80% of people get the question wrong! Click here to take the test -> http://node-os.com/
Aryasam has quit [Quit: Bye]
mavcunha has quit [Quit: Computer has gone to sleep.]
<benzrf> sickweezle: i wrote half of a half-baked gem and i need testing
<benzrf> B)
<shevy> sickweezle benzrf is on his way to his first gem
<sickweezle> Oog: man signal
<Oog> MrZYX|off: ive figured out how to use popen 3 so i get the pid and can wait/timeout on it now i need to kill it when it timesout
<sickweezle> oooh! sweet, benzrf !
mando has joined #ruby
phinfonet has quit [Remote host closed the connection]
t0m0_ has joined #ruby
<benzrf> sickweezle: can ya git clone benzrf/clientside
<sickweezle> What the heck ... NodeOS? O.o
nomenkun has quit [Remote host closed the connection]
kitak has joined #ruby
phinfonet has joined #ruby
<benzrf> sad
<shevy> wow
<shevy> where is the counter
<shevy> RubyOS
octoberry has quit [Ping timeout: 240 seconds]
<benzrf> shevy: too slow
<sickweezle> benzrf: Hmm. I don't actually know what rack is, other than something you can put web related thingies with. :/
<benzrf> it is simple
<benzrf> rack is an object protocol
danshultz has quit [Ping timeout: 252 seconds]
<krainboltgreene> Rack is a middleware stack.
<krainboltgreene> For HTTP requests.
<shevy> benzrf :(
ZadYree has joined #ruby
iamdoo2 has joined #ruby
<benzrf> any object can be a rack app if it implements call() such that it takes 1 arg that contains request info and returns [statuscode, header_hash, body_iterable]
<shevy> why is speed always mentioned
<benzrf> sickweezle: ^
<krainboltgreene> Faraday is a middleware stack, for responses.
<Speed> shevy: I really don't know
DrShoggoth has quit [Quit: Leaving]
<benzrf> sickweezle: rack middleware means an object like the above that wraps around another app and then modifies requests or does something special before forwarding the request downwards
Adawerk has quit [Quit: Leaving]
<Speed> :P statistically I get accidentally pinged a few times per day
<sickweezle> shevy: people don't think, so 'speed' sounds important, even if their code doesn't do enough for speed optimization to matter
<benzrf> sickweezle: so you can have a big nested series of rack apps that each do something with the request or response
<sickweezle> huh
<snkcld> 366.49 2.99 1710565 Kernel.Integer
<benzrf> anything meant to be stuck in the middle is 'middleware'
<benzrf> fuck i g2g