ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
cantonic has quit [Quit: cantonic]
robie has joined #ruby-lang
towski has joined #ruby-lang
towski has quit [Remote host closed the connection]
robie has quit [Remote host closed the connection]
robie has joined #ruby-lang
robie has quit [Client Quit]
towski has joined #ruby-lang
robie has joined #ruby-lang
<jtoy> how would you guys implement wc -l in ruby ?
<canton7> the_string.each_line.count maybe?
<erikh> count = 0; ARGF.each_line { count += 1 }; puts count
<drbrain> ruby -ne 'BEGIN { $c = 0 }; $c += 1; END { puts $c }'
<lianj> ^^
iamjarvo has joined #ruby-lang
<canton7> ruby -e "puts ARGF.each_line.count"
robie has quit [Client Quit]
<canton7> actually ruby -e "puts ARGF.lines.count" is shorter and clearer
<erikh> except for the fact that if the file is bigger than available memory...
robie1373 has joined #ruby-lang
<drbrain> erikh: should be fine, lines returns an Enumerator
<erikh> ah
<drbrain> canton7: but then you miss out on learning about BEGIN, END and -n
<erikh> you know
<erikh> I think drbrain's line is valid perl too
<erikh> down to the CLI args
<lianj> yikes
headius has quit [Quit: headius]
<drbrain> erikh: puts was not happy, but this works: -ne 'BEGIN { $c = 0 }; $c += 1; END { print("$c\n") }'
<erikh> oh yeah
<erikh> puts.
toretore has quit [Quit: This computer has gone to sleep]
rippa has quit [Ping timeout: 252 seconds]
igotnolegs has quit [Quit: Computer has gone to sleep.]
<zenspider> why do I get the feeling these are job interview questions?
<erikh> heh
mikeric has joined #ruby-lang
<lianj> i dont get the job with read.split.count? aw :(
neocoin has joined #ruby-lang
<zenspider> can someone on linux tell me what the -T flag for ld is?
<zenspider> (I'm assuming this is a linux toolchain-ism)
<lianj> -T scriptfile "Use scriptfile as the linker script. This script replaces ld's default linker script …"
qpingu has quit [Quit: Leaving.]
<zenspider> crapity. I don't have that equivalent. kk. thanks.
towski has quit [Ping timeout: 246 seconds]
sailias has joined #ruby-lang
towski has joined #ruby-lang
Rezwan has joined #ruby-lang
bfreeman has quit [Quit: bfreeman]
Berglund has quit [Quit: Computer died.]
andrewhl has quit [Remote host closed the connection]
towski has quit [Remote host closed the connection]
qpingu has joined #ruby-lang
htroyack has quit []
neoesque has joined #ruby-lang
<Rezwan> what is the best place to start learn Ruby for a fresher?
igotnolegs has joined #ruby-lang
towski has joined #ruby-lang
<zenspider> do you know how to code in something else?
<countdigi> could someone give me a pointer as to what im doing wrong w/ null object ala rspec? https://gist.github.com/3173677
bassir has joined #ruby-lang
bassir has quit [Client Quit]
<zenspider> clone doesn't take args
Rezwan has quit [Read error: Connection reset by peer]
<countdigi> ah shit
<countdigi> tx
<countdigi> dammit reserved keywords bites my ass again
Rezwan has joined #ruby-lang
<countdigi> tx bro
<drbrain> countdigi: it's not reserved
<zenspider> 1) not a bro. 2) not a reserved keyword
<zenspider> (ie, you're hitting Object#clone)
<countdigi> heh touche
neoesque has quit [Remote host closed the connection]
towski has quit [Remote host closed the connection]
<countdigi> may i rephrase and say my kindest respects to you and drbrain for your elucidation
mrsolo has quit [Quit: Leaving]
towski has joined #ruby-lang
outoftime has quit [Quit: Leaving]
<countdigi> i hear ya ... wasnt reserved ... my old slang for "anything that bubbles up and i dont realize" ... tx agian
dc5ala has joined #ruby-lang
gix has quit [Ping timeout: 264 seconds]
sailias has quit [Ping timeout: 246 seconds]
<countdigi> i know i get beat up asking questions in this forum but i appreciate the hard knocks answers and promise i shall learn from the bruises :-)
towski has quit [Remote host closed the connection]
gix has joined #ruby-lang
mikeric has quit [Read error: Connection reset by peer]
mikeric has joined #ruby-lang
ttilley_off is now known as ttilley
bassir has joined #ruby-lang
<bassir> hello
kain has quit [Quit: quit]
<bassir> So, I have 3 variable names I want to assign to 3 consecutive non-nil values from a method… how can I do that?
<bassir> I want to map %w[a b c] to the three consecutive NON-NIL values of the function get(x)
<bassir> So a = get(0), b = get(1), and if get(2).nil? then c = get(3). How can I do that?
<bassir> Because ultimately, I want to do this for a very large array
Z33K|Lux has joined #ruby-lang
stardiviner has joined #ruby-lang
iamlacroix has joined #ruby-lang
sailias has joined #ruby-lang
<Rezwan> what is the best place to start learn Ruby for a fresher?
iamlacroix has quit [Remote host closed the connection]
<banisterfiend> Rezwan: either a book or ruby koans i guess
seanstickle has joined #ruby-lang
<Rezwan> banisterfiend: thanks. what is ruby "koans" ?
dc5ala_ has joined #ruby-lang
<banisterfiend> Rezwan: google it ;) but basically they're a set of exercises that you complete, i think they hold your hand through them so you lean about a topic before you complete them
<oddmunds> sort of learn
WillMarshall has quit [Quit: Computer has gone to sleep.]
<countdigi> Rezwan: the cool part is it is a test-driven learning so u write passing tests which is very satisfying (when they pass :-)
<Rezwan> it sounds great :)
<banisterfiend> oddmunds: hey oddity, how's life in the cold scandinavian north?
<oddmunds> it's pretty sweet
dc5ala has quit [Ping timeout: 246 seconds]
<Rezwan> it is that "Rubykoans" right? http://rubykoans.com/
mikeric has quit [Read error: Connection reset by peer]
<oddmunds> right
savage- has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 244 seconds]
<Rezwan> oddmunds: what Scandinavian country are you from?
<oddmunds> norway
mikeric has joined #ruby-lang
<Rezwan> great
iamjarvo has joined #ruby-lang
<Rezwan> oddmunds: it is now Autumn over there, right?
agilob has quit [Ping timeout: 252 seconds]
<oddmunds> no
<oddmunds> it's summer
agilob has joined #ruby-lang
<Rezwan> ahh!
<oddmunds> the seasons flip over the equator, not spin around the center
jrbing has quit [Ping timeout: 265 seconds]
<Rezwan> I see
<oddmunds> :P
<Rezwan> oddmunds: how long the summer last at your place?
<oddmunds> idk, i guess it sort of depends on what you mean by summer
<oddmunds> but proper summer is maybe a couple of months
<Rezwan> ah!!
<Rezwan> and a proper winter? ;)
<oddmunds> that depends a little on where in norway you are
<oddmunds> i spend my summers in the south and my winters in oslo (pretty much the south too)
<Rezwan> hmmm!
<Rezwan> wow!
<oddmunds> but i guess we've got a proper winter for a little longer than summer
<Rezwan> yes it should be
<oddmunds> since we live so far from the equator, the seasons are more extreme than it would be if we were cloer
<Rezwan> yes very close to Arctic
<banisterfiend> Rezwan: are you from malaysia?
Axsuul has quit [Ping timeout: 252 seconds]
<Rezwan> banisterfiend: why do you think I'm from Malaysia? ;)
<banisterfiend> Rezwan: because i know someone from malaysia with a name similar to yours
<banisterfiend> but his name is ridzwan
Axsuul has joined #ruby-lang
<Rezwan> ahh haha
<Rezwan> not I'm not from Malaysia
<Rezwan> I'm from Bangladesh
<banisterfiend> ah, even more exotic
<Rezwan> LOL!
<Rezwan> where are you from banisterfiend ?
brownies has left #ruby-lang [#ruby-lang]
<banisterfiend> Rezwan: nouvelle zelande
* Rezwan looks for google translator
<Rezwan> great :D
<Rezwan> do you speak French? ;)
<banisterfiend> Rezwan: Nope
<Rezwan> বুঝতে পারছি!
<Rezwan> I guess it is full winter over there at New Zealand
Berglund has joined #ruby-lang
WillMarshall has joined #ruby-lang
jrbing has joined #ruby-lang
<banisterfiend> Rezwan: yes, pretty cold
<banisterfiend> Rezwan: is it cold for you?
iamjarvo has quit [Ping timeout: 244 seconds]
<Rezwan> not it is monsoon here right now
<Rezwan> and winter is never that cold here. temperature doesn't go below zero
iamjarvo has joined #ruby-lang
<banisterfiend> Rezwan: so you've never seen snow?
<Rezwan> nope unfortunately
<Rezwan> coldest temp I've ever felt is like 5 degree celsius
<banisterfiend> Rezwan: we have large slabs of snow by the side of the road while we drive passed, large meaty and white like the inner thigh of a woman
<banisterfiend> Rezwan: have oyu travelled to europe?
<Rezwan> banisterfiend: I've never been outside of my country
<Rezwan> banisterfiend: do you write poem? "white like the inner thigh of a woman" sounds very poetic ;)
<banisterfiend> Rezwan: haha no, i just had an urge to say it
<Rezwan> :D
iamjarvo has quit [Ping timeout: 255 seconds]
masterkorp has joined #ruby-lang
<masterkorp> any ideas on what's wrong here ?
<masterkorp> /var/chef/cache/cookbooks/celtics-forum/libraries/smf_db.rb:5: syntax error, unexpected '=', expecting tASSOC
<masterkorp> ....new(:host => host, :username = > username, :password => pas...
<oddmunds> masterkorp: yeah, you've got a space too much
<masterkorp> should it be db => Mysql2:Client
<oddmunds> it should be :username => username
* masterkorp facepalms thanks
<oddmunds> sure :)
iamjarvo has joined #ruby-lang
bfreeman has joined #ruby-lang
Berglund has quit [Quit: Computer died.]
verbad has joined #ruby-lang
<Rezwan> hmm need to install ruby first to run koans
<masterkorp> [Wed, 25 Jul 2012 02:11:50 +0000] FATAL: SyntaxError: /var/chef/cache/cookbooks/celtics-forum/libraries/smf_db.rb:5: syntax error, unexpected tLABEL
<masterkorp> and now ?
dhruvasagar has joined #ruby-lang
S1kx has quit [Read error: Connection reset by peer]
S1kx has joined #ruby-lang
S1kx has quit [Changing host]
S1kx has joined #ruby-lang
<zenspider> masterkorp: yup. that's a syntax error.
<zenspider> 'Mysql2:Client.new' is not valid
<masterkorp> oh :: ?
<zenspider> yup
<masterkorp> i am sorry
<masterkorp> 20 hours awake
<zenspider> also: bad name: getValue -> value. don't use CamelCase for methods. use your return and space keys more. don't mix class and instance methods ... the latter two won't work at all.
<masterkorp> why not camelcase ?
<zenspider> BecauseThatIsNotHowWeDoThingsHere
<masterkorp> why the latter two wont work at all ?
<zenspider> because you don't understand instance vs class methods
<masterkorp> please bare with me
<zenspider> very important distinction
Sambalero has quit [Remote host closed the connection]
<masterkorp> where ?
<zenspider> def self.x vs def x
<masterkorp> can you point me to doc ?
<masterkorp> please
Sambalero has joined #ruby-lang
<masterkorp> i am doing it correctky
<drbrain> masterkorp: you are not doing it correctly
<masterkorp> can you explan ?
<zenspider> @var is an instance variable... it is owned by whomever 'self' is at the time it is accessed.
<zenspider> in def x; @var; end @var belongs to whomever 'self' is... so o = Obj.new; o.x
<zenspider> @var would be o's
<zenspider> but when you call X.classmethod, 'self' is X
benjammin891 has joined #ruby-lang
<masterkorp> so i shold just remove the self keyword ?
<masterkorp> help my old C brain
<zenspider> you shouldn't _just_ do anything. you should learn the distinction because these are the bare basics of OO.
benjammin891 has quit [Quit: Leaving]
<zenspider> I'd hope that if I was terribly confused about pointers in C, you wouldn't let me _just_ switch some syntax to make it work w/o understanding wtf I was doing.
mikeric has quit [Quit: mikeric]
seanstickle has quit [Quit: Nihil sub sole novum]
<masterkorp> sure when i get some sleep and dont have to fix others people stuff at 4am for a deadline at 11am today
<masterkorp> i understand you i really do
<masterkorp> but please
<zenspider> this code really shouldn't go into production
<zenspider> line 9: security problems... 15... 20... all security problems
<masterkorp> i told the same stuff
<masterkorp> please
QaDeS has joined #ruby-lang
<masterkorp> its a chef library
<masterkorp> it will not be used by a public app
jackhammer2022 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
sailias has quit [Ping timeout: 246 seconds]
awwaiid has quit [Read error: Connection reset by peer]
ryanf has joined #ruby-lang
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
S1kx has quit [Read error: Connection reset by peer]
S1kx has joined #ruby-lang
awwaiid has joined #ruby-lang
chimkan has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby-lang
lldong has joined #ruby-lang
bassir has quit [Quit: bassir]
towski has joined #ruby-lang
postmodern has quit [Ping timeout: 244 seconds]
Sambalero has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
verbad has quit [Quit: verbad]
Sambalero has joined #ruby-lang
<drbrain> masterkorp: that doesn't prevent a disgruntled employee from abusing it
savage- has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Rezwan has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
fabioboris has joined #ruby-lang
lldong has quit [Remote host closed the connection]
lldong has joined #ruby-lang
postmodern has joined #ruby-lang
ged has joined #ruby-lang
verbad has joined #ruby-lang
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
fabioboris has left #ruby-lang [#ruby-lang]
robbyoconnor has joined #ruby-lang
<erikh> mmm
<erikh> bound parameters aren't going to get you much there
<erikh> chef users control the data and the code
<erikh> but really, that's a pretty bad chef recipe.
iamjarvo has joined #ruby-lang
robbyoconnor has quit [Remote host closed the connection]
wpaulson has joined #ruby-lang
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
TheJacquerie has left #ruby-lang [#ruby-lang]
chimkan has quit [Quit: chimkan]
areil has joined #ruby-lang
verbad has quit []
verbad has joined #ruby-lang
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
chimkan_ has joined #ruby-lang
shaman42_ has quit [Ping timeout: 265 seconds]
cyndis has quit [Ping timeout: 250 seconds]
cha1tanya has joined #ruby-lang
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby-lang
arooni-mobile has joined #ruby-lang
jtoy has quit [Quit: jtoy]
cha1tanya has quit [Ping timeout: 246 seconds]
banisterfiend has quit [Ping timeout: 246 seconds]
cyndis has joined #ruby-lang
cha1tanya has joined #ruby-lang
towski has quit [Ping timeout: 244 seconds]
towski has joined #ruby-lang
banisterfiend has joined #ruby-lang
shaman42 has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
ryanf has quit [Ping timeout: 250 seconds]
banisterfiend has quit [Ping timeout: 246 seconds]
nazty has quit [Ping timeout: 248 seconds]
lldong_ has joined #ruby-lang
andrewhl has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
lldong has quit [Ping timeout: 255 seconds]
lldong_ is now known as lldong
sepp2k has joined #ruby-lang
rails has quit [Changing host]
rails has joined #ruby-lang
brianpWins has joined #ruby-lang
codewrangler has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
iamjarvo has joined #ruby-lang
jtoy has joined #ruby-lang
scientes has quit [Ping timeout: 248 seconds]
agilob has quit [Ping timeout: 252 seconds]
scientes has joined #ruby-lang
agilob has joined #ruby-lang
jtoy has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
scientes has quit [Ping timeout: 252 seconds]
apeiros_ has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
solars has joined #ruby-lang
akira989 has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
Sambalero has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 250 seconds]
neoesque has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
ryanf has joined #ruby-lang
banisterfiend has joined #ruby-lang
chimkan_ has quit [Quit: chimkan_]
Dreamer3 has quit [Quit: Leaving...]
verbad has quit []
<banisterfiend> erikh: http://gem-testers.org/
rue_XIV has left #ruby-lang [#ruby-lang]
rue has joined #ruby-lang
<rue> Pretty sure the mysql driver supports thingy with the thingy safety
iamjarvo has quit [Quit: Computer has gone to sleep.]
<banisterfiend> rue: hey rue
<rue> Also, damn it, I should use a real IRC client so that I could script parting all the channels that require ident so that I can change to an identified nick…
<rue> Or, you know, identify that other one…
<banisterfiend> rue: what client do you use
<rue> Limechat
<banisterfiend> yeah..
<banisterfiend> it's still better than colloquy though
<banisterfiend> that thing is a piece of shit, in fact there's no nice graphical irc clients on osx afaict
<certainty> irssi ftw
apeiros_ has joined #ruby-lang
<banisterfiend> apeiros_: hey bb, have u checked out the new prompty thingies yet
<erikh> banisterfiend: yes I knwo
<banisterfiend> certainty: yucky terminal client
<erikh> I have been very busy with work.
<apeiros_> banisterfiend: nope. but I'm currently setting up the new laptop. and replacing irb completely with pry is part of it :)
<banisterfiend> erikh: np, u're on reddit, bad luck teh site went down :P
<certainty> banisterfiend: yupp, but why do i need a shiny gui when i have my irssi running in a screen on my server?
<banisterfiend> erikh: u see u're on reddit right?
<apeiros_> also replacing bbedit with sublime
<certainty> all i do is type :)
<banisterfiend> certainty: well if i wanted a terminal irc client, i'd just use ERC (emacs client). In fact, maybe i should just do that :)
<banisterfiend> limechat is a bit lulz, thought it's kinda nice in some ways
<certainty> erc is fine, but like irssi better
Jay_Levitt has quit [Quit: Leaving...]
<Spaceghostc2c> weechat is better than both for sure.
<Spaceghostc2c> certainty: Screen and not tmux?!
<banisterfiend> certainty: well ERC is arguably better for an emacs user :)
<certainty> Spaceghostc2c: i'm oldschool. But i'm thinking about a switch
<apeiros_> banisterfiend: the prompt stuff is already in the gem or do I have to get head?
<certainty> i'm yet familiar with tmux
<banisterfiend> apeiros_: it's in the gem
<certainty> +not
<banisterfiend> apeiros_: undocumented though, as it's just an easteregg 4 u
<Spaceghostc2c> apeiros_: When possible, always get head.
<Spaceghostc2c> :p
<banisterfiend> apeiros_: but when u get going i can tell u how to use it
<Spaceghostc2c> certainty: Mine has some screen-like bindings, but also vim-like ones. If you want, you can check out my tmux-config repo on github. Spaceghost/tmux-config
<certainty> banisterfiend: i am an emacs user but i don't use ERC because i want my screen session.
<Spaceghostc2c> Nothing super well done yet.
<certainty> Spaceghostc2c: will do
<banisterfiend> certainty: oh ok.
<apeiros_> banisterfiend: ok
<Spaceghostc2c> No worries if my configs suck for you. Tmux is just in active development, has better features that screen doesn't have and improves on ones it does have.
<banisterfiend> apeiros_: hey also check out this, i think it's awesome: https://github.com/kyrylo/pry-theme
<banisterfiend> apeiros_: we even have railscasts and github themes :))
<apeiros_> ^^
<apeiros_> gonna do that
<Spaceghostc2c> banisterfiend: I made a railscast stylesheet. :D
<banisterfiend> Spaceghostc2c: cool, hey check out pry-theme and tell me what u think
<Spaceghostc2c> banisterfiend: That's really cool though. I want to read about all the cool pry-stuff I can use in one place! Do you have such a treat for me?
<Spaceghostc2c> banisterfiend: Mine isn't perfect yet: http://spaceghost.github.com/
<banisterfiend> Spaceghostc2c: well, we're building a package manager command that'll make installing/using plugins a lot simpler, but currently check it here: https://github.com/pry/pry/wiki/Available-plugins
<banisterfiend> Spaceghostc2c: not bad
solars has quit [Ping timeout: 244 seconds]
<banisterfiend> Spaceghostc2c: here's our attempt at railscasts: https://github.com/kyrylo/pry-theme/raw/master/screenshots/railscasts.png
<Spaceghostc2c> banisterfiend: I can make the stylesheet more readable, I just wrote it in one of those 4am frenzies.
<Spaceghostc2c> banisterfiend: Pretty close for sure!
<banisterfiend> Yeah, feel free to tweak our theme if you dont think it's quite right
<certainty> nice i can have zenburn in pry
<Spaceghostc2c> banisterfiend: I'll definitely start incorporating it into my workflow. I know you likely get this question a lot, but how close to a ruby-debug replacement is it?
lbrent has joined #ruby-lang
<banisterfiend> certainty: well, see here: https://github.com/nixme/pry-debugger
<banisterfiend> oops that was for Spaceghostc2c
<banisterfiend> Spaceghostc2c: we also have the opposite: https://github.com/pry/debugger-pry
<banisterfiend> Spaceghostc2c: so the answer is: It's not so much as a replacement, but more of another front-end to it. As we depute to debugger under the scenes, but the interface is all pry
<certainty> wow i didn't realize pry was such a beast. There is even pry-remote
<banisterfiend> certainty: yeah, there's an even crazier project, check out: https://github.com/simulacre/pry-remote-em
toretore has joined #ruby-lang
<banisterfiend> eventmachine-based remote sessions :) ^
<certainty> based on eventmachine?
<certainty> yeah
<banisterfiend> yeah
<banisterfiend> i love that one
<banisterfiend> cos it supports multiple users
<banisterfiend> for multi user debugging sessions
<banisterfiend> which is kind of fun
<banisterfiend> imagine 5 people all in the same pry session
<banisterfiend> chatting to eachother and manipulating the same objects
wallerdev has quit [Quit: wallerdev]
<banisterfiend> though all the times we've done that, we've just been attacking one another, changing eachother's prompts, breaking into oneanother's pry instances :P
<certainty> banisterfiend: shared remote repl, nice
<lianj> banisterfiend: like pry in tmux? :P
<certainty> where is ruby-swank to integrate with slime? ^^
<banisterfiend> certainty: you mean an emacs front end?
<Spaceghostc2c> banisterfiend: That's insane, friend.
<banisterfiend> certainty: the main thing is i didnt want to tie pry to emacs, but i'd love if a 3rd party wanted to do an emacs version
<certainty> banisterfiend: yupp, but i was not serious. One would have to do alot more to get proper slime integration as it's pretty much targeted on lispy languages
<banisterfiend> certainty: we have something even more powerful than slime (IMO, anyway) in the works ;)
<certainty> but it can be really nice to have thread running pry-remote that can be used to hotpatch you app (scary in a way, but nice as well)
<certainty> banisterfiend: what is it?
<banisterfiend> certainty: secret project :P hopefully finished in a couple of months
<certainty> alright
<banisterfiend> certainty: yeah, a guy was telling me about that the other day, he used pry + pry-remote in production
<banisterfiend> certainty: he had it running on a deployed app, when it crashed, pry caught the error, opene da pry-remote socket, and emailed him waking him up at 3am
<banisterfiend> he the connected, fixed the bug, and had the app continue on its way
<banisterfiend> pretty cool, but i think pry-remote-em is a better choice for that with its security features and so on
<Spaceghostc2c> banisterfiend: How did you get into this whole pry mess? Like, how'd you drop into ruby as well as C and all that?
<certainty> yes, definitly. You want authentication and tls
krz has quit [Quit: krz]
<banisterfiend> Spaceghostc2c: well the first year of my ruby usage i just wrote weird hacks in C. Then i started writing a real-time kind of interactive image editor and i wanted a REPL to drive it, so i wrote a simple runtime irb-clone. ANd i just gradually added more features to the repl that it broke off into its own project, and then replaced the original image editor thingy i was working on
<Spaceghostc2c> banisterfiend: So you knew C fairly well before that?
workmad3 has joined #ruby-lang
<banisterfiend> Yeah, i leanred C when i was 14 or so
<Spaceghostc2c> banisterfiend: How recent are you now?
spinagon has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<banisterfiend> what?
<certainty> yo workmad3
<banisterfiend> brb
<banisterfiend> too hot here
* certainty abandoned C/C++ as soon as it was possible
<certainty> well mostly
<banisterfiend> certainty: C is fun in MRI
franckverrot has quit [Quit: Connection closed for inactivity]
rippa has quit [Ping timeout: 244 seconds]
<banisterfiend> Spaceghostc2c: i've been doing ruby about 3-4 years i think
<Spaceghostc2c> banisterfiend: That's pretty awesome for sure, my friend.
<Spaceghostc2c> Question, why you no hang out in the nifty offtopic channel?
lbrent_ has joined #ruby-lang
<Spaceghostc2c> "Cause you're a fucktard, Spaceghost" is an acceptable answer.
<banisterfiend> what channel are you talking about?
<banisterfiend> #offtopic ?
<certainty> banisterfiend: i can't imagine that C can be fun :) I do some things in C still. mostly bindings for chicken-scheme, but that's all. I'm happy that i don't have to use C/C++ much nowerdays. Though i did for almost 6 years in the past
<banisterfiend> certainty: well things like this are fun: https://github.com/banister/binding_of_caller https://github.com/banister/free
lbrent_ has quit [Client Quit]
<certainty> banisterfiend: i'll have a look. I started a binding for XSB in ruby 1.8.7 once. But things have changed i guess :)
lbrent_ has joined #ruby-lang
lbrent_ has quit [Client Quit]
<Spaceghostc2c> banisterfiend: Invited you to the channel.
<banisterfiend> i'll stop spamming now
<banisterfiend> hehe
<certainty> banisterfiend: heh remix allows some weired things. I wonder if there is some hackable MOP extension for ruby that allows to fiddle with its very internals like method dispatch and how methods are invoked across an inheritance hirarchy, maby even method combination
towski has quit [Remote host closed the connection]
<banisterfiend> certainty: yeah, i was obsessed with MOP aroudn the time i wrote that
<banisterfiend> i wanted to implement C3 linearization for ruby and proper multiple inheritance
<certainty> did you succeed?
ryanf has quit [Quit: leaving]
<banisterfiend> no, i realized it wasn't worth the effort. but i understood the algorithm and how to implement it, etc
workmad3 has quit [Ping timeout: 244 seconds]
<certainty> nice thing to work on.
bnagy has quit [Remote host closed the connection]
<banisterfiend> certainty: 'free' was evil enough, anyway :) i dont think any of that stuff works on 1.9.3 since they started hiding all their symbols
toretore has quit [Quit: Leaving]
<certainty> banisterfiend: heh, i bet you see a lot of double free corruptions
<banisterfiend> certainty: yeah, u gotta be careful ;)
<banisterfiend> certainty: but it was use din production by a dude, and made a dramatic improvement to his app's performance
<banisterfiend> it was just a cute hack though i've never used it myseflf
<certainty> banisterfiend: i can imagine, that it may be useful. Possibly in tight loops creating lots of objects
<banisterfiend> certainty: he was receiving huge strings every second, like megs in size
<banisterfiend> cleaning up the large ones immediately seems to make things snappier
<certainty> i can imagine
<certainty> but maybe ruby isn't the best choice in that case, anyway
<banisterfiend> certainty: it wouldn't be hard to implement an objc reference count system on top of it
<banisterfiend> retain and release and so on
* certainty has no clue about objc
<banisterfiend> certainty: if you know C and you know Ruby, you already know objc ;)
<banisterfiend> it's a perfect blend of the two
<banisterfiend> IMO
Criztian has joined #ruby-lang
<banisterfiend> if it wasn't for header files, i think i'd really like objc
<banisterfiend> but header files always annoy me
savage- has quit [Remote host closed the connection]
<banisterfiend> "oh...there's and *now* i have to update this other goddamn file too..."
<certainty> all those NS in objc code
<banisterfiend> certainty: you know what NS stands for rightt?
<banisterfiend> certainty: i really like the hooks over inheritance design for cocoa
<certainty> banisterfiend: nope, i'll do a quick duckduckgo search
<banisterfiend> certainty: Next Step :)
<banisterfiend> certainty: it's the company steve jobs created after he was booted out of apple
<certainty> aha!
andrewhl has quit [Remote host closed the connection]
<certainty> he sure loved to leave his marks
Z33K|Lux has quit []
<banisterfiend> certainty: Yeah, you should look at cocoa sometime it's a pretty interesting design i think
<banisterfiend> it just has hooks everywhere
<banisterfiend> certainty: so, say we wanted to modify the behaviour of Hash, rather than subclassing it, we just create a normal Hash object, and then define a bunch of hooks for the object that modify the behavior.
<certainty> banisterfiend: i don't own a mac, and i don't intend to change this. Is there cocoa for other unixes?
<erikh> gnustep
<certainty> banisterfiend: those hooks work on the method level? Such as before,after around methods?
<certainty> erikh: thanks
yxhuvud has joined #ruby-lang
<banisterfiend> certainty: i dont think there's fine grained hooks that can be defined for any method, but for accessor methods (like getters/setters) you can define observers that are notified when the setters are called..aside from that, the hooks are at the level of granularity that they think u need
<certainty> banisterfiend: i see. But it still doesn't appeal me much :) I would rather want to dig deeper into other languages
<banisterfiend> certainty: yeah, if you already know ruby and message passing style OO objc isn't that interesting maybe
<certainty> yupp. I'd love to dig deeper into Haskell for example
<certainty> maybe a bit of clojure, as it's a lispy language
solars has joined #ruby-lang
banisterfiend` has joined #ruby-lang
zmack has joined #ruby-lang
WillMarshall has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Ping timeout: 246 seconds]
lldong has quit [Remote host closed the connection]
lldong has joined #ruby-lang
cantonic has joined #ruby-lang
srbartlett has quit [Remote host closed the connection]
lldong_ has joined #ruby-lang
cantonic has quit [Client Quit]
WillMarshall has joined #ruby-lang
lldong has quit [Ping timeout: 276 seconds]
lldong_ is now known as lldong
<certainty> let's see how pry-debugger works
lldong has quit [Remote host closed the connection]
lldong has joined #ruby-lang
WillMarshall has quit [Quit: Computer has gone to sleep.]
achiu has joined #ruby-lang
achiu has quit [Client Quit]
achiu has joined #ruby-lang
achiu has quit [Client Quit]
<zenspider> maybe I'm just being stupid... but if an avi is wrapping up mpeg4 and I want it as an m4v to watch on my appletv... why the hell does handbrake reencode the whole thing? isn't it mostly in the format it wants? if not, shouldn't it be a SIMPLE amount of translation?
achiu has joined #ruby-lang
igotnolegs has quit [Quit: Computer has gone to sleep.]
achiu has quit [Client Quit]
achiu has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
ruby-lang689 has joined #ruby-lang
tsou has quit [Ping timeout: 248 seconds]
face has left #ruby-lang [#ruby-lang]
lldong_ has joined #ruby-lang
faces has joined #ruby-lang
<faces> zenspider: the specs (in handbrake) say mp4/m4v will only use mpeg4 from ffmpeg or x264, so it's possible your avi has another type
<banisterfiend`> certainty: let me know how u get on either here or #pry
concernedcitizen has joined #ruby-lang
<certainty> banisterfiend`: sure
<zenspider> faces: Stream #0.0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 624x352 [PAR 1:1 DAR 39:22], 23.98 tbr, 23.98 tbn, 23.98 tbc
vesan has joined #ruby-lang
<zenspider> certainly the audio needs encoding... but that usually takes about 2 minutes for a 30 minute stream
lldong has quit [Ping timeout: 246 seconds]
lldong_ is now known as lldong
<zenspider> I wish these video tools weren't made by morons for morons... 4 billion flags and no doco worth reading :/
tooky has joined #ruby-lang
<apeiros_> zenspider: aren't you the "read the source" kinda guy? :-p
<apeiros_> (but yeah, agreed, had similar problems)
<zenspider> we've tried. it isn't worth it
<faces> zenspider: i dont think mpeg4-asp is one of the types mp4 can contain, iirc that's mpeg4 part 2 and mp4 wants mpeg4 part 10
concernedcitizen has quit [Remote host closed the connection]
<zenspider> you are a smarter man than I... idgi... I don't think I really want to as humans have corrupted something that could be clean and simple into something monsterous like our time/date system.
tsou has joined #ruby-lang
<zenspider> honestly... I just want to sit on the couch, watch a stupid TV show, and be dumb for a while
<faces> yeah mpeg4 is a bit of a pain to deal with because it's a standard split into a ton of different parts
cantonic has joined #ruby-lang
<faces> so even within the mpeg4 standard there's ~25 different parts that have different definitions
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
<faces> it makes sense when you consider that mpeg4 is just a way to define av compression, it doesn't help that on the face of it it looks like 'mpeg4' is the only detail you need :(
gnufied has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby-lang
<zenspider> five minutes until I can be stupid again!
<zenspider> in the meantime... is there a homebrew formula for gcc cross compiling?
hhatch has joined #ruby-lang
charliesome has joined #ruby-lang
JohnBat26 has joined #ruby-lang
<apeiros_> oh my, that exchange webservices API is sooo annoying…
<apeiros_> "oh hey, I'm sure when you told me to get all contacts, you wanted me to include an empty entry for every type of phone number I know!"
<banisterfiend`> zenspider: how long have u been into cooking
workmad3 has joined #ruby-lang
neoesque has quit [Quit: Bye!]
headius has joined #ruby-lang
headius has quit [Client Quit]
<zenspider> banisterfiend`: since I started eating more or less
<banisterfiend`> oh ok, for some reason i thought it was a recent thing
sora_h is now known as s0ra_h
<zenspider> nope. took my first cooking class around ... 8 or so
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
JohnBat26 has joined #ruby-lang
Hakon has joined #ruby-lang
ramonmaruko has quit [Remote host closed the connection]
JustinCampbell has quit [Read error: Connection reset by peer]
JustinCampbell has joined #ruby-lang
heftig has joined #ruby-lang
chendo_ has joined #ruby-lang
ramonmaruko has joined #ruby-lang
rhalff has joined #ruby-lang
futurechimp has joined #ruby-lang
<rhalff> hi is there a method that can check for true or false, where value strings can be "1" or "true", "0" or "false"
<rhalff> I wanna convert a command line option to true or false.
vectorshelve has joined #ruby-lang
<vectorshelve> can anyone tell me the design pattern used in this small ruby application ?
* rhalff oh appearently !! can be used
* rhalff hm, not really
vectorshelve was kicked from #ruby-lang by apeiros_ [told you so many times…]
jxie has quit [Quit: leaving]
vectorshelve has joined #ruby-lang
<vectorshelve> can anyone help me with the design pattern used in this ruby app -> https://github.com/fj/thoughtworks-sales-tax
<certainty> vectorshelve: which one? judging from the filenames it might be mediator and strategy
<vectorshelve> certainty: I too feel its uses strategy but is it singleton as well ?
<certainty> vectorshelve: i haven't yet looked at the code
<vectorshelve> certainty: could you have a look and help me with it please.. thanks
<certainty> vectorshelve: i don't see singleton at a first glance. You will have to have a close look i guess
<vectorshelve> certainty: and my doubt is if I have multiple classes thorugh out the app and I am using at max only one instance of each of these classes.. it becomes singleton then ryt ?
<certainty> vectorshelve: singleton enforces this though.
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
<vectorshelve> certainty: or is it that throughout the application we should only have ONE instance of a class no matter how many classes we have ?
<certainty> vectorshelve: singleton means that you only ever have one instance of a given class. It does not apply to all classes. That is you can well have a class with a singleton interface and several others that don't have it
<certainty> so singletons are in a way just globals
nXqd_ has joined #ruby-lang
nXqd_ has quit [Quit: leaving]
nXqd has joined #ruby-lang
<nXqd> hi rubyist :)
<vectorshelve> certainty: ok I think I got it now.. so I think the app also follows singleton model since I dont see any of the classes having multiple instances :)
<certainty> vectorshelve: that's because it mostly uses class-methods
<vectorshelve> certainty: not having atleast one instance at all for all the classes doesnt matter as well
<certainty> vectorshelve: i don't know if it does it exclusivly in which case it would not be singleton strictly speaking, as you have no instance
<vectorshelve> certainty: so I assume almost 90% of the cases we can solve things in singleton desgin pattern :)
<vectorshelve> certainty: so I conclude the app is basically singleton + strategic
<certainty> i'm very unsure about the singleton part, but it certainly implements strategy
<certainty> is that some homework?
<vectorshelve> certainty: agree ?:)
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<certainty> OTOH a class is an instance as well
_bart has joined #ruby-lang
hemanth has joined #ruby-lang
hemanth has left #ruby-lang ["http://h3manth.com"]
mssola has joined #ruby-lang
Leeky_afk is now known as Leeky
<masterkorp> ative_packages = ["php-mysql", "php-mysqli", "php-mcrypt"]
<masterkorp> do you see anything wrong in this line ?
<vectorshelve> masterkorp: no why ?
<certainty> a missing c in active_packages
<masterkorp> "TypeError: can't convert String into Integer
<masterkorp> here is the full stacktracke
<vectorshelve> masterkorp: which version of ruby ?
<masterkorp> oh the error semms in here
JoshWines has quit [Ping timeout: 260 seconds]
<masterkorp> 1 default = []
<masterkorp> 2 default['smf'] = []
<masterkorp> 3 default['smf']['server_name'] = "forums.celtics.blog.com"
<masterkorp> on line 2 ?
<masterkorp> what is wrong?
<masterkorp> oh i dont need to declare default as an array ?
<Mon_Ouie> No, you need to make it a hash, not an array
justinmcp has joined #ruby-lang
rhalff has quit [Ping timeout: 252 seconds]
JoshWines has joined #ruby-lang
tbuehlmann has joined #ruby-lang
jarib has quit [Excess Flood]
<masterkorp> sorry, its a hash alright
s0ra_h is now known as sora_h
jarib has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
Hakon has quit [Quit: Leaving...]
Fullmoon has joined #ruby-lang
Fullmoon has quit [Client Quit]
rhalff has joined #ruby-lang
srbartlett has joined #ruby-lang
stardiviner has joined #ruby-lang
mssola has quit [Quit: Konversation terminated!]
kristofferrr has joined #ruby-lang
dfr|mac has joined #ruby-lang
dfr|mac is now known as dfr|moscow
sora_h is now known as s0ra_h
<masterkorp> [ default['smf']['dirs']['profile_pictures'], default['smf']['dirs']['attachments'], default['smf']['dirs']['smileys'], default['smf']['dirs']['avatars']].each do |dir|
<masterkorp> is this legal to start a block ?
Leeky is now known as Leeky_afk
<apeiros_> sure, why should it not be?
<apeiros_> you can simplify that code quite a bit btw.
<masterkorp> /var/chef/cache/cookbooks/celtics-forum/recipes/default.rb:152: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('/var/chef/cache/cookbooks/celtics-forum/recipes/default.rb:152: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
<apeiros_> masterkorp: default['smf']['dirs'].values_at('profile_pictures', 'attachments', 'smileys', 'avatars').each do |dir|
<apeiros_> that should do the same
<zenspider> more grave digging I see
<masterkorp> yes
<zenspider> I hope you got SOME sleep
<masterkorp> i am complety
<masterkorp> nope
<zenspider> what's that term for situations like these... oh. right. fucked.
<zenspider> I take it you're cleaning up someone else's mess ON the deadline?
<apeiros_> masterkorp: that exception does not line up with the code you pasted. I'd assume either it's not the matching line or the problem starts earlier (syntax error messages can be misleading)
<apeiros_> masterkorp: I'd paste the whole default.rb, so we can see
<masterkorp> yeah it starts earlier
<masterkorp> oh man i am so fucker
<masterkorp> this should not happen to anyone
rhalff has quit [Read error: Operation timed out]
<masterkorp> jesus take the wheel
Axsuul has quit [Ping timeout: 255 seconds]
<apeiros_> that guy lived over 2k years ago, I doubt he has a drivers license…
dhruvasagar has quit [Ping timeout: 246 seconds]
s0ra_h is now known as sora_h
woollyams has joined #ruby-lang
pajama has joined #ruby-lang
<zenspider> I for one am going to bed
<masterkorp> bye and thanks
achiu has quit [Ping timeout: 252 seconds]
solars has quit [Ping timeout: 276 seconds]
achiu has joined #ruby-lang
dhruvasagar has joined #ruby-lang
dfr|moscow has quit [Ping timeout: 244 seconds]
vectorshelve has quit [Quit: Page closed]
Criztian has quit []
kristofferrr has quit [Quit: ❤]
dfr|moscow has joined #ruby-lang
solars has joined #ruby-lang
mwjcomputing has joined #ruby-lang
kvirani has joined #ruby-lang
solars has quit [Read error: Operation timed out]
dfr|moscow has quit [Ping timeout: 255 seconds]
zmack_ has joined #ruby-lang
rolfb has joined #ruby-lang
zmack has quit [Ping timeout: 246 seconds]
dfr|moscow has joined #ruby-lang
dfr|moscow has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
kiddorails has joined #ruby-lang
solars has joined #ruby-lang
erichmenge has joined #ruby-lang
brunocoelho has joined #ruby-lang
rhalff has joined #ruby-lang
iamjarvo has joined #ruby-lang
gsav has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
JustinCampbell has quit [Remote host closed the connection]
JustinCampbell has joined #ruby-lang
nertzy has joined #ruby-lang
rolfb has quit [Quit: Leaving...]
justinmcp has quit [Remote host closed the connection]
tommyvyo has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Jay_Levitt has joined #ruby-lang
sailias has joined #ruby-lang
lldong has quit [Remote host closed the connection]
lldong has joined #ruby-lang
ruby-lang689 has quit [Ping timeout: 245 seconds]
woollyams has quit [Quit: Computer has gone to sleep.]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
scampbell has joined #ruby-lang
rhodee has joined #ruby-lang
mdickens has joined #ruby-lang
sepp2k has quit [Ping timeout: 246 seconds]
sailias has quit [Quit: Leaving.]
cha1tanya has quit [Quit: आलोच..]
verbad has joined #ruby-lang
woollyams has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
Berglund has joined #ruby-lang
jperry2_ has joined #ruby-lang
face has joined #ruby-lang
Berglund has quit [Client Quit]
chendo___ has joined #ruby-lang
chendo__ has quit [Ping timeout: 264 seconds]
srbartlett has quit [Remote host closed the connection]
jperry2 has quit [Read error: Connection reset by peer]
faces has quit [Ping timeout: 264 seconds]
gnufied has quit [Ping timeout: 244 seconds]
dv310p3r has joined #ruby-lang
gnufied has joined #ruby-lang
pajama has quit [Ping timeout: 250 seconds]
sepp2k has joined #ruby-lang
deryl has joined #ruby-lang
deryl has quit [Read error: Connection reset by peer]
deryl has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
JoshWines has quit [Remote host closed the connection]
|Vargas| has quit [Ping timeout: 252 seconds]
pajama has joined #ruby-lang
lake_away has quit [Quit: WeeChat 0.3.7]
lake has joined #ruby-lang
pajama has quit [Ping timeout: 246 seconds]
JustinCampbell has quit [Remote host closed the connection]
JustinCampbell has joined #ruby-lang
lldong_ has joined #ruby-lang
canton7 has quit [Remote host closed the connection]
lldong has quit [Ping timeout: 246 seconds]
lldong_ is now known as lldong
andrewhl has joined #ruby-lang
lldong has left #ruby-lang [#ruby-lang]
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dhruvasagar has quit [Ping timeout: 244 seconds]
<andrewvos> I have multiple processes i need to start. They are dependent on each other. How do I do this in god?
sailias has joined #ruby-lang
<andrewvos> Oh wait
gianlucadv has quit [Quit: ZNC - http://znc.sourceforge.net]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<andrewvos> Got it
<andrewvos> Found "groups"
gianlucadv has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
jxie has joined #ruby-lang
outoftime has joined #ruby-lang
kvirani has joined #ruby-lang
jxie has quit [Client Quit]
jxie has joined #ruby-lang
akira989 has joined #ruby-lang
mistym_ has joined #ruby-lang
Beruk has joined #ruby-lang
hynkle has quit [Quit: Computer has gone to sleep.]
Beruk has quit [Client Quit]
cha1tanya has joined #ruby-lang
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby-lang
rhalff has quit [Ping timeout: 276 seconds]
iamjarvo has joined #ruby-lang
urbanmonk has joined #ruby-lang
Sambalero has joined #ruby-lang
fgomez has quit [Ping timeout: 240 seconds]
zoidfarb has joined #ruby-lang
brunocoelho has quit [Remote host closed the connection]
fgomez has joined #ruby-lang
bfreeman has quit [Quit: bfreeman]
Skif has joined #ruby-lang
JustinCa_ has joined #ruby-lang
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
JustinCampbell has quit [Read error: Connection reset by peer]
Skif has quit [Client Quit]
JustinCampbell has joined #ruby-lang
Skif has joined #ruby-lang
JustinCa_ has quit [Ping timeout: 246 seconds]
jtoy has joined #ruby-lang
comer653 has joined #ruby-lang
areil has quit [Remote host closed the connection]
verbad has quit []
jtoy has quit [Client Quit]
cha1tanya has quit [Quit: आलोच..]
andrewhl has quit [Remote host closed the connection]
QaDeS has quit [Quit: Ex-Chat]
rhodee has left #ruby-lang [#ruby-lang]
fgomez has quit [Quit: leaving]
nXqd has quit [Ping timeout: 250 seconds]
bequick has joined #ruby-lang
comer653 has left #ruby-lang [#ruby-lang]
fgomez has joined #ruby-lang
tbuehlmann has quit []
mistym_ has quit [Remote host closed the connection]
dabradley has quit [Quit: WeeChat 0.3.7]
akira989 has quit [Remote host closed the connection]
solars has quit [Ping timeout: 244 seconds]
bglusman has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
sailias has quit [Quit: Leaving.]
andrewhl has joined #ruby-lang
JohnBat26 has quit [Read error: Operation timed out]
RickHull has joined #ruby-lang
akira989 has joined #ruby-lang
<RickHull> i'm working on a tool to compare XML files/fragments. i.e. left side is baseline, what are the differences on the right?
jtoy has joined #ruby-lang
<RickHull> right now it's very specific to this one file / schema
<RickHull> i have a list of element names i am looking for, and compare their attributes or text descendents
<RickHull> now i am trying to generalize it a bit, use the actual children / descendents to drive what to look for
<RickHull> sorry, using nokogiri
<RickHull> naively, i could iterate over node.children, to some depth N
jarib has quit [Excess Flood]
<RickHull> but I know i can go to arbitrary depth using standard tree-walking recursion
jarib has joined #ruby-lang
<RickHull> but i haven't messed with recursion in a while, having trouble expressing it
<RickHull> i made this just as a quick recursion demo: https://gist.github.com/3176931
<RickHull> to prove i had the basic idea. i'm not really happy with it though
<RickHull> of course, a flat list of descendent elements loses the tree structure. but at least i can walk it
agilob has quit [Ping timeout: 252 seconds]
<RickHull> also it bothers me that i need to include the root node's name, in a method named descendents
towski has joined #ruby-lang
<RickHull> but maybe that's just a bad method name / approach
rushed has joined #ruby-lang
postmodern has quit [Quit: Leaving]
wallerdev has joined #ruby-lang
agilob has joined #ruby-lang
brianpWins has joined #ruby-lang
savage- has joined #ruby-lang
mk03 has joined #ruby-lang
erichmenge has joined #ruby-lang
mytrile has joined #ruby-lang
RickHull has quit [Quit: Leaving.]
diegoviola has joined #ruby-lang
apeiros_ has joined #ruby-lang
bfreeman has joined #ruby-lang
nXqd has joined #ruby-lang
_bart has quit [Ping timeout: 246 seconds]
DEac- has quit [Read error: No route to host]
imperator has quit [Quit: Leaving]
DEac- has joined #ruby-lang
hynkle has joined #ruby-lang
rhalff has joined #ruby-lang
nXqd has quit [Ping timeout: 276 seconds]
solars has joined #ruby-lang
rhalff has quit [Ping timeout: 276 seconds]
butchanton has joined #ruby-lang
JustinCampbell has quit [Remote host closed the connection]
mrsolo has joined #ruby-lang
Leeky_afk is now known as Leeky
zmack_ has quit [Remote host closed the connection]
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
rhalff has joined #ruby-lang
symm- has quit [Ping timeout: 252 seconds]
sailias has joined #ruby-lang
symm- has joined #ruby-lang
Sambaler_ has joined #ruby-lang
Sambalero has quit [Ping timeout: 276 seconds]
gnufied has quit [Quit: Leaving.]
workmad3 has quit [Ping timeout: 244 seconds]
Sambaler_ has quit [Read error: Connection timed out]
Sambalero has joined #ruby-lang
dhruvasagar has joined #ruby-lang
headius has joined #ruby-lang
tenderlove has joined #ruby-lang
mk03 has quit [Remote host closed the connection]
comer653 has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
carloslopes has joined #ruby-lang
dabradley has joined #ruby-lang
lsegal has joined #ruby-lang
anannie has joined #ruby-lang
comer653 has quit [Quit: Leaving.]
Sambalero has quit [Remote host closed the connection]
toretore has joined #ruby-lang
rhalff has quit [Ping timeout: 252 seconds]
iamjarvo has joined #ruby-lang
mytrile has quit [Quit: Leaving.]
wallerdev has joined #ruby-lang
futurechimp has quit [Quit: Leaving]
nXqd has joined #ruby-lang
mdickens has quit [Ping timeout: 245 seconds]
Leeky is now known as Leeky_afk
Criztian has joined #ruby-lang
cantonic has quit [Quit: cantonic]
tjadc has joined #ruby-lang
tbuehlmann has joined #ruby-lang
nXqd has quit [Ping timeout: 252 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
mrsolo has joined #ruby-lang
nebbie`` has quit [Quit: Peace and Protection 4.22.2]
nebbie has joined #ruby-lang
Axsuul has joined #ruby-lang
butchanton has quit [Quit: Leaving.]
butchanton has joined #ruby-lang
banisterfiend` is now known as banister`bina
akira989 has quit [Remote host closed the connection]
gsav has quit [Ping timeout: 244 seconds]
nXqd has joined #ruby-lang
dv310p3r has quit [Ping timeout: 252 seconds]
dfr|moscow has joined #ruby-lang
akira989 has joined #ruby-lang
dv310p3r has joined #ruby-lang
rhodee has joined #ruby-lang
rhodee has quit [Client Quit]
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
gsav has joined #ruby-lang
mdickens has joined #ruby-lang
Hakon has joined #ruby-lang
erichmenge has joined #ruby-lang
krz has joined #ruby-lang
hynkle has quit [Read error: Connection reset by peer]
apeiros_ has quit [Remote host closed the connection]
scientes has joined #ruby-lang
enebo has joined #ruby-lang
BigFatFatty has joined #ruby-lang
Sambalero has joined #ruby-lang
hynkle has joined #ruby-lang
nXqd has quit [Ping timeout: 276 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
mrsolo has joined #ruby-lang
mrsolo has quit [Remote host closed the connection]
mrsolo has joined #ruby-lang
towski_ has joined #ruby-lang
dfr|moscow has quit [Remote host closed the connection]
rhalff has joined #ruby-lang
workmad3 has joined #ruby-lang
towski has quit [Ping timeout: 250 seconds]
brianritchie has joined #ruby-lang
chendo___ has quit [Read error: Operation timed out]
chendo_ has quit [Ping timeout: 246 seconds]
dv310p3r has quit [Ping timeout: 276 seconds]
towski_ has quit [Ping timeout: 252 seconds]
Criztian has quit [Remote host closed the connection]
kain has joined #ruby-lang
rhalff has quit [Ping timeout: 244 seconds]
towski has joined #ruby-lang
_bart has joined #ruby-lang
elux has joined #ruby-lang
kiddorails has quit [Ping timeout: 246 seconds]
dv310p3r has joined #ruby-lang
apeiros_ has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 246 seconds]
lorinc has joined #ruby-lang
Sambalero has quit [Remote host closed the connection]
gsav has quit [Ping timeout: 252 seconds]
Sambalero has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
neocoin has quit [Remote host closed the connection]
anannie has quit [Quit: Leaving...]
bluemonk has quit [Ping timeout: 252 seconds]
cantonic has joined #ruby-lang
chimkan_ has joined #ruby-lang
gsav has joined #ruby-lang
dc5ala_ has quit [Ping timeout: 246 seconds]
llaskin has joined #ruby-lang
urbanmonk has quit [Quit: Bye!]
llaskin has quit [Changing host]
llaskin has joined #ruby-lang
<llaskin> https://gist.github.com/9cc3a1980eec5b2f6e97 any idea why this wouldn't retry at the error point?
urbanmonk has joined #ruby-lang
<Mon_Ouie> Because Timeeout::Error isn't a subclass of StandardError
<Mon_Ouie> And it's bad to rescue without specifying an exception class anyway
<apeiros_> Mon_Ouie: I thought they changed that in 1.9?
<apeiros_> ah, he's on 1.8
<llaskin> Mon_Ouie: ohhhhhh
<apeiros_> hadn't looked at the pastie
<Mon_Ouie> But yeah, they did change that in 1.9
<llaskin> yes i am on 1.8.7
<llaskin> cuz i have to do a lot of "fixin" before i move to 1.9.3
jbsan has joined #ruby-lang
fayimora has joined #ruby-lang
Austin__ has joined #ruby-lang
bluemonk has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
s0ber has quit [Read error: Connection reset by peer]
s0ber has joined #ruby-lang
hynkle has quit [Ping timeout: 244 seconds]
znowi has quit [Ping timeout: 240 seconds]
alindeman has quit [Remote host closed the connection]
tallship has quit [Ping timeout: 244 seconds]
mohawkjohn has joined #ruby-lang
alindeman has joined #ruby-lang
hynkle_ has joined #ruby-lang
tallship has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo__ has joined #ruby-lang
nertzy2 has joined #ruby-lang
znowi has joined #ruby-lang
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
vectorshelve has joined #ruby-lang
nertzy has quit [Ping timeout: 276 seconds]
sandbags has quit [Remote host closed the connection]
verbad has joined #ruby-lang
pemeon has joined #ruby-lang
s0ber_ has joined #ruby-lang
s0ber has quit [Read error: Operation timed out]
s0ber_ is now known as s0ber
Jake232 has joined #ruby-lang
jtoy has quit [Quit: jtoy]
mdickens has quit [Ping timeout: 244 seconds]
mwjcomputing has quit [Quit: Leaving]
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
Criztian has joined #ruby-lang
tubbo has joined #ruby-lang
vectorshelve has quit [Ping timeout: 245 seconds]
tommyvyo_ has joined #ruby-lang
llaskin has quit [Quit: Leaving.]
dejongge has joined #ruby-lang
imperator has joined #ruby-lang
zoidfarb has left #ruby-lang [#ruby-lang]
erichmenge has quit [Quit: Be back later]
Sambalero has quit [Remote host closed the connection]
rhalff has joined #ruby-lang
akira989 has quit [Remote host closed the connection]
agilob has quit [Ping timeout: 252 seconds]
agilob has joined #ruby-lang
tbuehlmann has quit []
jperry2_ has quit [Quit: jperry2_]
<imperator> dummy unicode question - how do i convert "0x680065006c006c006f00" back to "hello" ?
rhalff has quit [Ping timeout: 252 seconds]
<imperator> (assume utf-16le)
carloslopes has quit [Quit: Leaving.]
<apeiros_> ["0x680065006c006c006f00"[2..-1]].pack("H*").force_encoding('utf-16le')
<apeiros_> hth :)
<apeiros_> @ imperator
arooni-mobile has quit [Read error: Operation timed out]
gsav has quit [Ping timeout: 255 seconds]
<imperator> apeiros_, ty
hynkle_ has quit [Quit: Computer has gone to sleep.]
dfr|moscow has joined #ruby-lang
<imperator> seems like there ought to be a nicer way somehow
<apeiros_> o0
akira989 has joined #ruby-lang
<apeiros_> it's not quite the most common input format…
tommyvyo_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
agilob has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby-lang
Jay_Levitt has quit [Ping timeout: 246 seconds]
sepp2k has quit [Read error: Connection reset by peer]
bequick has quit [Read error: Operation timed out]
kvirani has quit [Remote host closed the connection]
sandbags has quit [Remote host closed the connection]
dfr|moscow has quit [Remote host closed the connection]
erichmenge has joined #ruby-lang
Hakon has quit [Ping timeout: 255 seconds]
agilob has joined #ruby-lang
sailias has quit [Ping timeout: 276 seconds]
gsav has joined #ruby-lang
spinagon has quit [Ping timeout: 276 seconds]
arooni-mobile has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
bassir has joined #ruby-lang
<bassir> Hey all
Banistergalaxy has joined #ruby-lang
ruurd has joined #ruby-lang
verbad has quit []
chimkan_ has quit [Quit: chimkan_]
chimkan_ has joined #ruby-lang
jbsan has quit [Quit: JB.. OUT!]
jbsan has joined #ruby-lang
Hakon has joined #ruby-lang
jbsan has quit [Client Quit]
jbsan has joined #ruby-lang
gsav has quit [Quit: Lost terminal]
erichmenge has quit [Quit: Be back later]
Asher has quit [Ping timeout: 245 seconds]
erichmenge has joined #ruby-lang
<imperator> howdy bassir
chevdor_ has joined #ruby-lang
dfr|moscow has joined #ruby-lang
chevdor_ has left #ruby-lang [#ruby-lang]
chevdor has joined #ruby-lang
thone_ has joined #ruby-lang
pemeon has quit [Remote host closed the connection]
thone has quit [Ping timeout: 252 seconds]
justinmcp has joined #ruby-lang
elux has quit [Quit: Bye!]
solars has quit [Ping timeout: 244 seconds]
woollyams has quit [Quit: Computer has gone to sleep.]
cantonic has quit [Quit: cantonic]
<andrewhl> I'm trying to understand the difference between private and protected. I followed the example here: https://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Classes#Protected, my version: http://pastie.org/4332666. But whether I make the age method protected or private, I get a NoMethodError
<andrewhl> what did I do wrong?
<andrewhl> as far as I can tell, the two 'keywords' behave exactly the same
toretore has quit [Quit: This computer has gone to sleep]
urbanmonk has quit [Ping timeout: 244 seconds]
lorinc has quit [Quit: Leaving]
brianpWins has quit [Quit: brianpWins]
dfr|moscow has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
floyd2 has quit [Quit: leaving]
<heftig> andrewhl: you're calling #age from outside Test on lines 18 and 19
<heftig> that's going to fail
<heftig> also, "puts @age" will return nil, and as such is unsuitable for comparison
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
<andrewhl> heftig: can you explain why calling #age from outside Test will fail?
Dreamer3 has joined #ruby-lang
kain has quit [Read error: Connection reset by peer]
<heftig> because it's protected
kain has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Nisstyre has quit [Remote host closed the connection]
Nisstyre has joined #ruby-lang
dv310p3r has quit [Ping timeout: 276 seconds]
<andrewhl> heftig: I revised my code slightly, but it still fails: http://pastie.org/4332666. I'm not understanding how I would call a protected method in such a way that it would NOT behave like private. I'm just trying to understand the difference between them.
<heftig> andrewhl: simply remove lines 22 and 23
wpaulson has joined #ruby-lang
<andrewhl> ahhhhh.
<andrewhl> <-- derp
JoshWines has joined #ruby-lang
<andrewhl> heftig: thanks
imperator has quit [Ping timeout: 244 seconds]
Jake232 has quit [Ping timeout: 276 seconds]
imperator has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
tenderlove has quit [Remote host closed the connection]
scampbell has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
radio23 has joined #ruby-lang
radio23 has left #ruby-lang [#ruby-lang]
slyphon has quit [Quit: WeeChat 0.3.7]
Sambalero has joined #ruby-lang
tenderlove has joined #ruby-lang
slyphon has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
Berglund has joined #ruby-lang
Austin__ has left #ruby-lang [#ruby-lang]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
headius has quit [Quit: headius]
malev has joined #ruby-lang
mistym has joined #ruby-lang
wpaulson has joined #ruby-lang
postmodern has joined #ruby-lang
<Spaceghostc2c> I found a lulzy. https://gist.github.com/7e4967b75f0b0a53f525
seungers has quit [Read error: Connection reset by peer]
* imperator guesses IO has been redirected
dejongge has quit [Quit: Leaving.]
akira989 has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
<Spaceghostc2c> imperator: I just don't understand a stack overflow. It's all, ugh.
<Spaceghostc2c> Rspec, why you do this?
akira989 has joined #ruby-lang
srbartlett has joined #ruby-lang
jtoy has joined #ruby-lang
<jtoy> what would be faster, calling system( "wc -l file") or doing a line count in ruby myself for about 20k files?
S1kx has quit [Read error: Connection reset by peer]
S1kx has joined #ruby-lang
S1kx has quit [Changing host]
S1kx has joined #ruby-lang
vesan has quit [Ping timeout: 248 seconds]
deryl has quit [Quit: deryl]
<imperator> system calls are the devil
<imperator> how big are the files?
cantonic has joined #ruby-lang
<jtoy> imperator: at max 3200 lines
<jtoy> sometimes less
akira989 has quit [Remote host closed the connection]
yxhuvud has quit [Ping timeout: 276 seconds]
<Spaceghostc2c> jtoy: Test it.
<Spaceghostc2c> Profile it!
<imperator> slurpy - IO.readlines(file).size ; non-slurpy - IO.foreach(file).inject(0){ |c, line| c+1 }
floyd2 has joined #ruby-lang
<jtoy> imperator: deadlines is probably to odangerfous
<jtoy> dangerous
chendo__ has quit [Quit: Computer has gone to sleep.]
outoftime has quit [Quit: Leaving]
<imperator> how so?
<jtoy> imperator: doesn't that load the whole thing into memory?
<imperator> yes, hence slurpy
<jtoy> imperator: you mean hence non slurpy
<imperator> but for 3200 lines or less? meh
akira989 has joined #ruby-lang
<imperator> no, slurpy means it's slurped everything into memory
<imperator> IO.foreach reads one line at a time - hence, non-slurpy
<erikh> imperator: OHAI
<imperator> erikh, howdy
stderr has quit [Read error: Operation timed out]
<imperator> how goes it?
<erikh> finally starting to cool off
<erikh> the WWE invested in our company (yes, the wrestling thing) and sent a ton of unexpected traffic to our site
Criztian has quit [Remote host closed the connection]
<erikh> so we've been scrambling to scale out our architecture for the last two weeks.
<imperator> nice
<imperator> so...switching to scala? :-P
<erikh> yeah it's bene a challenge, but man am I exhausted.
vesan has joined #ruby-lang
<erikh> nah, we threw up 4 read slaves and the read_from_slave gem; 1 for resque and 3 distributed with $(($RANDOM % 3)) during deploy
<erikh> did pretty well, went from handling hundreds of users at once to over 15k
<imperator> what's the db backend? we setup a single replicating slave with pg iirc, but that was it, and mainly just for backup purposes
<erikh> mysql
<imperator> you poor man
<erikh> yeah, this is a write master/read slave combo
<erikh> actually mysql does this really really well
<imperator> oh? good
<erikh> better than PG classically
<erikh> 9 might be better.
<erikh> big boxes too, each had 64GB ram
<erikh> still took the load through the roof
<erikh> looking at jruby next I think.
<imperator> what about web server config?
<erikh> 8 cores, 8 unicorns, 25 boxes
<imperator> yeah, the folks i'm working with now are looking at jruby too for similar reasons
<erikh> resque same box size, about 40 machines
<erikh> (one processor per core)
bassir has quit [Quit: bassir]
Rezwan has joined #ruby-lang
<Rezwan> good morning!
<imperator> never used resque erikh, is it background requests?
<imperator> er, queueing i guess
<imperator> good evening Rezwan :)
<Rezwan> hi imperator :)
<erikh> imperator: yeah, just a job processor that uses redis for a queue
<imperator> what happens when the queue gets, uh, full
<erikh> it doesn't.
<erikh> unless redis runs out of disk or memory, of course.
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
<erikh> but they're really small items, usually a classification and an identifier.
<imperator> never had to deal with scalability issues, seems like an interesting, if difficult, problem
<erikh> it's a fun problem if you're on a good team
<erikh> which I am.
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
butchanton has quit [Quit: Leaving.]
Hakon has quit [Quit: Leaving...]
ruurd has quit [Quit: Leaving...]