fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
rizzy has quit [Read error: Connection reset by peer]
opus has quit [Quit:]
tfitts has joined #ruby
cbuxton has joined #ruby
tfittsy has joined #ruby
luckyruby has quit [Remote host closed the connection]
cbuxton1 has quit [Ping timeout: 240 seconds]
CharlieS1 is now known as CharlieSu
tfitts has quit [Ping timeout: 246 seconds]
nobitanobi has quit [Read error: Connection reset by peer]
Tyler__ has joined #ruby
nobitanobi has joined #ruby
maxmmurphy has quit [Quit: maxmmurphy]
banisterfiend has quit [Remote host closed the connection]
ryan0x2 has joined #ruby
Banistergalaxy has joined #ruby
chussenot has quit [Quit: chussenot]
asteve_ has quit [Quit: Computer has gone to sleep.]
chimkan_ has quit [Quit: chimkan_]
benson has quit [Quit: Leaving]
tfittsy has quit [Ping timeout: 268 seconds]
fantazo has joined #ruby
whomp_ has quit [Ping timeout: 240 seconds]
_adeponte has quit [Ping timeout: 240 seconds]
Goles has joined #ruby
ackz has quit [Quit: Leaving.]
mikepack has quit [Remote host closed the connection]
fridim_ has quit [Ping timeout: 246 seconds]
rburton- has quit [Quit: rburton-]
ckrailo has quit [Quit: Computer has gone to sleep.]
tayy has quit [Ping timeout: 240 seconds]
MagisterQuis has joined #ruby
fbernier has joined #ruby
WhereIsMySpoon has quit [Changing host]
WhereIsMySpoon has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<MagisterQuis> So, I'm trying to install ruby to install BeEF on my mac.
<MagisterQuis> it has changed my path.
MagisterQuis has quit [Quit: Leaving.]
nu7hatch has left #ruby [#ruby]
SeySayux has quit [Ping timeout: 248 seconds]
nobitanobi has quit [Read error: Connection reset by peer]
vDubG has quit [Quit: Got ME !]
g_rotbart has joined #ruby
nobitanobi has joined #ruby
vDubG has joined #ruby
MagisterQuis has joined #ruby
SeySayux has joined #ruby
brianpWins has quit [Quit: brianpWins]
<MagisterQuis> More specifially, it did something to keep .profile from being called.
fearoffish has quit [Quit: Computer has gone to sleep.]
nari_ has joined #ruby
adamkittelson has quit [Remote host closed the connection]
opus has joined #ruby
brdude has joined #ruby
krz has quit [Ping timeout: 244 seconds]
qko has quit [Ping timeout: 240 seconds]
wargasm has joined #ruby
panpaint1r has joined #ruby
drago757_ has joined #ruby
drago757 has quit [Read error: Connection reset by peer]
drago757_ is now known as drago757
Speed has quit [Remote host closed the connection]
luckman212_ has quit [Remote host closed the connection]
qko has joined #ruby
panpainter has quit [Ping timeout: 260 seconds]
justsee is now known as justsee|away
kenneth has joined #ruby
jjbohn has joined #ruby
javos has quit [Quit: Leaving...]
<kenneth> hey there… question for y'all -- i've been told that the interface for this project would be more ruby like if i clients use via include instead of having them subclass -- https://github.com/kballenegger/kenji
kenichi has quit [Remote host closed the connection]
jchauncey has joined #ruby
rburton- has joined #ruby
krz has joined #ruby
jchauncey has quit [Client Quit]
<kenneth> i'm starting a new project that's going to have similar functionality. i'm wondering, how would you achieve that via include?
invsblduck has quit [Ping timeout: 245 seconds]
MagisterQuis has left #ruby [#ruby]
<kenneth> would i just do the same thing, include `self.get` etc. except in a sub module instead of a class?
daniel_hinojosa has quit [Quit: Leaving.]
<shevy> why is rails so popular?
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
x77686d has quit [Ping timeout: 245 seconds]
<shevy> kenneth what is include `self.get`
<shevy> that does not sound like ruby code
<kenneth> it isn't
<kenneth> this is the superclass version
wpaulson has joined #ruby
panpaint1r has quit [Quit: leaving]
<kenneth> how would i make that work if instead of having controllers subclass, i wanted to have controller include
sepp2k has quit [Remote host closed the connection]
<shevy> well, with include you can include a Module
<shevy> so your module must include the desired functionality
Chryson has joined #ruby
<shevy> I keep on thinking that subclassing is somewhat diametral to include functionality :\
justsee|away is now known as justsee
monkegjinni has quit [Remote host closed the connection]
<kenneth> so if i include a module, all the methods defined in that module become defined in the class that includes it? shevy
<kenneth> or is that not how it works
ngoldman has quit [Remote host closed the connection]
ianbrandt has quit [Quit: ianbrandt]
Ontolog has left #ruby [#ruby]
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
liluo has quit [Remote host closed the connection]
<shevy> yeah
<shevy> the instance methods at least
<shevy> module Foo; def test
<shevy> not these though:
<shevy> module Foo; def self.test
<shevy> you can get both though if you would use: extend self in the module
<kenneth> shevy: oh, do you have an example of that?
<kenneth> oh i get it i think
tiripamwe has joined #ruby
<shevy> kenneth, http://pastie.org/4478798
iori has joined #ruby
tk_ has joined #ruby
jchauncey has joined #ruby
opus has quit [Quit:]
adeponte has joined #ruby
davidcelis has joined #ruby
justsee is now known as justsee|away
chimkan_ has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
pu22l3r has joined #ruby
pu22l3r has quit [Remote host closed the connection]
codeFiend has quit [Ping timeout: 246 seconds]
pu22l3r has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
ilyam has quit [Quit: ilyam]
jchauncey has quit [Quit: jchauncey]
jjbohn has quit [Quit: Leaving...]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
bradhe has quit [Remote host closed the connection]
mrsolo has quit [Quit: Leaving]
opus has joined #ruby
bradhe has joined #ruby
fbernier has quit [Read error: Connection reset by peer]
nedbat has joined #ruby
rakunHo has joined #ruby
opus has quit [Client Quit]
tds has quit [Ping timeout: 246 seconds]
<kenneth> shevy: wait so you can't have class level methods and regular level methods included from the same module?
opus has joined #ruby
<shevy> if you use extend self you should be able to
chichou has quit [Remote host closed the connection]
chichou has joined #ruby
mfridh has quit [Ping timeout: 268 seconds]
codeFiend has joined #ruby
banisterfiend has joined #ruby
t55261 has quit [Remote host closed the connection]
liluo has joined #ruby
t96151 has joined #ruby
bradhe has quit [Remote host closed the connection]
iori has quit [Remote host closed the connection]
vitor-br has joined #ruby
chichou has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
Banistergalaxy has quit [Ping timeout: 246 seconds]
iori has joined #ruby
A1241 has joined #ruby
TorpedoSkyline has joined #ruby
fbernier has joined #ruby
adeponte has quit [Ping timeout: 244 seconds]
jeffreybaird has joined #ruby
aces1up has joined #ruby
<aces1up> how is this evaluated?
<aces1up> def [](name)
krz has quit [Quit: krz]
jeffreybaird has quit [Client Quit]
Abner_ has joined #ruby
joekarma has joined #ruby
bradhe has quit [Remote host closed the connection]
TandemAdam has joined #ruby
<cirwin> aces1up: it defines the [] method, you can call it using foo['bar']
<nedbat> aces1up: that defines a method on a class, called when the obj[x] syntax is used with an instance of the class
savage- has quit [Remote host closed the connection]
Abner_ has quit [Client Quit]
<aces1up> ok, how would I call that method with a .send ???
QKO_ has joined #ruby
jjbohn has joined #ruby
<aces1up> cirwin any ideas?
bluOxigen has quit [Ping timeout: 248 seconds]
gen0cide_ has quit [Ping timeout: 265 seconds]
<banisterfiend> aces1up: send(:[])
qko has quit [Ping timeout: 245 seconds]
<banisterfiend> >> a = [:a, :b, :c]; a.send(:[], 2)
<al2o3cr> (Symbol) :c
nilg has joined #ruby
drago757 has quit [Quit: drago757]
<aces1up> @element.send("['#{id.to_s}']".to_sym, args)
<banisterfiend> aces1up: no...
<aces1up> ban I tried your method with no luck, although I prolly did it wrong.
<banisterfiend> aces1up: @elemend.send(:[], args)
<aces1up> banisterfiend ok.
<aces1up> but this is in a method missing, so i just need to capture args i take it and not id?
[1]dtribble has joined #ruby
<banisterfiend> i have no idea what you're doing :)
jorge has joined #ruby
<banisterfiend> aces1up: read the docs for Kernel#send
jorge has quit [Remote host closed the connection]
alvaro_o__ has quit [Quit: Ex-Chat]
dhruvasagar has quit [Ping timeout: 268 seconds]
joekarma has quit [Quit: joekarma]
dtribble has quit [Ping timeout: 244 seconds]
Juul has quit [Ping timeout: 248 seconds]
jaylevitt has joined #ruby
<_Vile> *yawn*
knightblader has quit [Ping timeout: 240 seconds]
jso_ has joined #ruby
infinitiguy has joined #ruby
brdude has quit [Quit: brdude]
ringotwo has quit [Remote host closed the connection]
Jay_Levitt has quit [Ping timeout: 240 seconds]
jaylevitt has quit [Ping timeout: 246 seconds]
tommyvyo has joined #ruby
randomautomator has quit [Remote host closed the connection]
indian has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby
brdude has joined #ruby
maxmmurphy has joined #ruby
ezra has joined #ruby
banisterfiend has quit [Remote host closed the connection]
darren has quit [Remote host closed the connection]
mockra has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
maxmmurphy has quit [Client Quit]
carlosalan has joined #ruby
BrokenCog has quit [Quit: leaving]
wargasm has quit [Ping timeout: 246 seconds]
cirwin has quit [Ping timeout: 268 seconds]
maxmmurphy has joined #ruby
jjbohn has quit [Quit: Leaving...]
Banistergalaxy has joined #ruby
omer has joined #ruby
peterhellberg has quit [Remote host closed the connection]
jso_ has quit []
syamajala has quit [Remote host closed the connection]
cj3kim has joined #ruby
butblack has joined #ruby
savage- has joined #ruby
pingfloyd has joined #ruby
Gonzih has quit [Ping timeout: 272 seconds]
omer has left #ruby [#ruby]
jjbohn has joined #ruby
<carlosalan> hello my friends
apok has quit [Ping timeout: 246 seconds]
maxmmurphy has quit [Quit: maxmmurphy]
cj3kim has quit [Quit: Leaving]
mockra has quit [Ping timeout: 246 seconds]
jjbohn has quit [Quit: Leaving...]
carlosalan has quit [Quit: Saindo]
<shevy> are these two examples the same? http://pastie.org/4479134
centipedefarmer has joined #ruby
sailias has quit [Quit: Leaving.]
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-dev)]
savage- has quit [Remote host closed the connection]
iamjarvo has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
manizzle has quit [Ping timeout: 248 seconds]
cakehero has joined #ruby
<Spooner> shevy : Look the same, but no sane coder would use the latter.
<shevy> Spooner hehehe
<shevy> yeah, just wondered I could get rid of one line that way :D
<jrajav> You also get rid of a significant little piece of maintainability
<Spooner> using postfix if/unless is pretty much evil unless you are doing a one-liner. And that doesn't mean a 200 char wide one-liner :D
<jrajav> Programmers like you are why we can't have nice things
nerdy has joined #ruby
<jrajav> I honestly don't like postfix if even on a single line
<shevy> jrajav matz designed ruby, not me
<jrajav> postfix if seems to be intended mainly for single-line sugar....
ezra has quit [Ping timeout: 276 seconds]
SegFaultAX has joined #ruby
whicling is now known as mike4_
[1]dtribble has quit [Ping timeout: 252 seconds]
mockra has joined #ruby
mockra has quit [Remote host closed the connection]
uris has joined #ruby
brdude has quit [Quit: brdude]
pingfloyd has quit [Quit: pingfloyd]
tommyvyo has quit [Quit: Computer has gone to sleep.]
joekarma has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
banisterfiend has joined #ruby
<shevy> argh
<shevy> def some_method(foobar = '')
<shevy> some_other_method(foobar()
<shevy> end
<shevy> def foobar
<shevy> end
<shevy> no wait
<shevy> I better write this into a file first
krz has joined #ruby
perryh_away is now known as perryh
Banistergalaxy has quit [Ping timeout: 248 seconds]
nobitanobi has quit [Read error: Connection reset by peer]
bglusman has joined #ruby
andrewhl has joined #ruby
nobitanobi has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
drago757 has joined #ruby
nobitanobi has quit [Client Quit]
xaq has joined #ruby
BrokenCog has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
choffstein has quit [Remote host closed the connection]
andrewhl has quit [Ping timeout: 245 seconds]
savage- has joined #ruby
drago757 has quit [Ping timeout: 260 seconds]
<jrajav> IRC: the new vim
fbernier has quit [Remote host closed the connection]
sailias has joined #ruby
<shevy> nah, lacks keybindings
fbernier has joined #ruby
EPIK has quit [Ping timeout: 240 seconds]
ezra has joined #ruby
<jrajav> Like most new vims
EPIK has joined #ruby
codeFiend has quit [Quit: codeFiend]
dhruvasagar has quit [Ping timeout: 252 seconds]
moshee has quit [Ping timeout: 256 seconds]
moshee has joined #ruby
kenneth has quit [Quit: kenneth]
dhruvasagar has joined #ruby
noyb has joined #ruby
andrewhl has joined #ruby
perryh is now known as perry
ezra has quit [Ping timeout: 276 seconds]
centipedefarmer has quit [Quit: This computer has gone to sleep]
td123 has joined #ruby
shadoi has quit [Quit: Leaving.]
dtribble has joined #ruby
jrajav has quit [Quit: The best darkness is strange and surprising]
RichieEvan has joined #ruby
tomsthumb has joined #ruby
<banisterfiend> shevy: goddamn u talk so much crap it's almost like a disease of the brain: http://www.reddit.com/r/programming/comments/y83xe/why_lisp_did_not_and_never_will_gain_enough/c5t7ime
justsee|away is now known as justsee
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
geggam has quit [Read error: Connection reset by peer]
justsee has quit [Quit: Linkinus - http://linkinus.com]
cakehero has joined #ruby
lurch_ has joined #ruby
ananthakumaran has joined #ruby
darren has joined #ruby
bluebie has joined #ruby
<fbernier> what are people using for syntax highlighting slides?
<bluebie> slides in what?
luckyruby has joined #ruby
<fbernier> presentation slides
andrewhl has quit [Ping timeout: 244 seconds]
<bluebie> I used to use Coda on my mac - it had an option to copy with syntax highlighting in the edit menu - you could paste it from there in to keynote or whatever, or in to a text editor and it'd come out as crazy html divs and spans
<fbernier> libreoffice impress, keynote, powerpoint, etc
<fbernier> ok
<bluebie> you could try the coda demo see if it still works that way
<bluebie> otherwise an idea maybe to do a private paste on one of those code sharing sites like gist, then copy from the resulting page
<fbernier> might give this a try
<bluebie> oh that's neat
pingfloyd has joined #ruby
<fbernier> thing is im running linux so I'll have to make some light modifications ;)
kenneth has joined #ruby
kenneth has quit [Client Quit]
BrokenCog has quit [Quit: leaving]
<bluebie> looks like vim has a toHTML feature built in? copy paste that in to a web browser then copy paste from that perhaps
codeFiend has joined #ruby
harcher has joined #ruby
ezra has quit [Ping timeout: 276 seconds]
andrewhl has joined #ruby
shadoi has joined #ruby
nerdy has quit [Quit: Computer has gone to sleep.]
ezra has joined #ruby
pingfloyd has quit [Quit: pingfloyd]
v0n has joined #ruby
<fbernier> im getting a nice output but no colors in impress =/
erichmenge has quit [Quit: Be back later]
jamesaa has quit [Ping timeout: 244 seconds]
opus has quit [Quit:]
opus has joined #ruby
brianpWins has joined #ruby
LouisGB has joined #ruby
kpshek has quit []
jso_ has joined #ruby
jso_ has quit [Max SendQ exceeded]
dmiller has joined #ruby
TandemAdam has quit [Quit: Leaving]
<dmiller> hey ruby folks, any recommendations for programmatically git repos to local fs in ruby? Ragged seems to be the favored solution but I don't see that it supports cloning. Just exec in shell?
enroxorz-work has quit [Read error: Connection reset by peer]
pingfloyd has joined #ruby
<dmiller> *programtically cloning
voodoofish430 has quit [Quit: Leaving.]
enroxorz-work has joined #ruby
joekarma has quit [Quit: joekarma]
Markvilla has quit [Quit: Computer has gone to sleep.]
opus has quit [Quit:]
xaq has quit [Remote host closed the connection]
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<bluebie> dmiller: I just exec in shell to run the camping site (it pulls wiki pages from the github wiki) and that's worked great
ringotwo has joined #ruby
<dmiller> bluebie: cool, thanks for the advice! I shall go down the route. =)
<dmiller> *that
<dmiller> man it's getting late haha
<bluebie> I recommend using the system(['git', 'clone', 'git://whatever']) syntax though, so you're directly calling git and not going via a shell
savage- has quit [Remote host closed the connection]
insecurlex has joined #ruby
<bluebie> it's faster (I find bash takes nearly an entire second to load on my fastest computer) and avoids a bunch of stuff about escaping strings properly
LouisGB has quit [Ping timeout: 265 seconds]
sh1ps has joined #ruby
CannedCorn has joined #ruby
<sh1ps> hello everyone
xaq has joined #ruby
<dmiller> bluebie: ahh, awesome. thanks man
<dmiller> (or woman!)
<bluebie> so you saw my realname then :P
TheLZA has quit [Ping timeout: 240 seconds]
<sh1ps> I'm receiving an array in a response body and ruby is evaluating it as a string
<dmiller> I didn't actually, I just caught myself
<bluebie> Hi sh1ps
<dmiller> :P
<bluebie> nice :D
<sh1ps> I need to get the second object in the array and I'm confounded >.<
aeontech has joined #ruby
<bluebie> sh1ps: That's a very confusing statement
cakehero has quit [Quit: Leaving...]
<davidcelis> you could eval it, but that's dangerous
<sh1ps> gah I know
<bluebie> first of all, what library gave you this 'response body'
<sh1ps> faraday
Tomasso has quit [Ping timeout: 240 seconds]
pingfloyd has quit [Ping timeout: 268 seconds]
<davidcelis> sh1ps: so you get something like "[1, 2, 3, 4, 5]" as a response? an array that ruby accepts as a string?
<sh1ps> I just switched to Faraday for other reasons, but I was just using Net::HTTP before
<bluebie> alright, and you're presumably calling a JSON api?
ringotwo has quit [Remote host closed the connection]
<davidcelis> sh1ps: actually JSON.parse should be able to parse it, i think
<bluebie> yep
<sh1ps> GAAAH
<sh1ps> why didn't I think of that
<bluebie> if you're running ruby 1.9 just do require 'json' then JSON.parse(body string)
<davidcelis> sh1ps: probably because valid JSON _should_ have an outer hash
<bluebie> if on 1.8, install the json rubygem first
codeFiend has quit [Ping timeout: 250 seconds]
aeontech is now known as codeFiend
<davidcelis> sh1ps: but i think that's still parsable
<sh1ps> right. this was one of those annoying things where puts was showing me a perfectly fine looking array
<bluebie> davidcelis: the json spec specifies the outer thing can be an array or a hash, I thought
<sh1ps> i didn't realize why I couldn't do anything with it until I used p
<davidcelis> bluebie: that would be news to me
mynameisted has quit [Remote host closed the connection]
<bluebie> that sure is json :)
<sh1ps> if it helps, this is what I'm trying to parse
<sh1ps> so I don't get why it's causing me headaches
td123 has quit [Ping timeout: 246 seconds]
pingfloyd has joined #ruby
<davidcelis> Huh, you're right
<sh1ps> aaaand json.parse seems like it did the trick
<banisterfiend> davidcelis: hey dawg
<davidcelis> You can have just an array and it's valid JSON
<davidcelis> Thought the outer shit had to be an object
<bluebie> JSON.parse('[[],"13449901542778020"]').class == Array #=> true
<davidcelis> banisterfiend: hey buddy
<davidcelis> hows it goin
td123 has joined #ruby
<banisterfiend> davidcelis: nada, u
<bluebie> http only transmits strings and binary blobs, it can't hold structures like arrays, hashes, numbers - so we use languages like json and yaml to store those things in to blobs, then transmit, and parse on the other end
<bluebie> yay ^_^
<sh1ps> thank you for the help bluebie and davidcelis…who knows how much longer I would have banged my head against that wall
tiripamwe has quit [Ping timeout: 246 seconds]
<davidcelis> banisterfiend: not too much man; mac'n'cheese, beer, and gilmore girls
drago757 has joined #ruby
<bluebie> davidcelis: I remember something like that in the spec, but I'm pretty certain json.org used to say 'object or array' - skimming it now it even seems not to specify that requirement - so maybe strings and numbers are supposed to be acceptable now also?
xaq has quit [Remote host closed the connection]
<davidcelis> bluebie: No I think just strings and numbers still aren't valid
<davidcelis> Yeah, they aren't
<davidcelis> Values have to be inside an object or array
xaq has joined #ruby
<bluebie> where'd you find this info davidcelis?
<davidcelis> bluebie: i tried myself
<davidcelis> bluebie: using JSON.parse and jsonlint
GordonFreeman has joined #ruby
<bluebie> fair enough :)
savage- has joined #ruby
sh1ps has quit [Quit: sh1ps]
verto is now known as verto|off
td123 has quit [Ping timeout: 246 seconds]
ichilton has quit [Ping timeout: 245 seconds]
tds__ has joined #ruby
<banisterfiend> davidcelis: r u gonna smoke a bowl
<davidcelis> nah that isn't really my thing
ezra has quit [Ping timeout: 276 seconds]
drago757 has quit [Ping timeout: 260 seconds]
Konboi has quit [Remote host closed the connection]
<banisterfiend> davidcelis: i thought u were cool
<bluebie> don't do drugs, drugs are bad
<bluebie> unless they're cool drugs like acid and shrooms
<davidcelis> i just dont like smoking
<davidcelis> makes my throat hurt
mockra has joined #ruby
<bluebie> I wish all these online shops would automatically sort by price. That's the most sensible default for me! The ones with the skinniest profit margin please! :D
centipedefarmer has joined #ruby
igotnolegs has joined #ruby
mockra has quit [Remote host closed the connection]
mockra has joined #ruby
mockra has quit [Remote host closed the connection]
joekarma has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
graspee has quit [Quit: leaving]
baroquebobcat has joined #ruby
mikepack has joined #ruby
Gonzih has joined #ruby
piotrj has quit [Remote host closed the connection]
nedbat has quit [Ping timeout: 250 seconds]
codeFiend has quit [Quit: codeFiend]
centipedefarmer has quit [Quit: This computer has gone to sleep]
ezra has joined #ruby
ichilton has joined #ruby
mikepack has quit [Ping timeout: 260 seconds]
minijupe has joined #ruby
CannedCorn has quit [Quit: Computer has gone to sleep.]
tiripamwe has joined #ruby
havenn has joined #ruby
glistle has joined #ruby
Bosox20051 has joined #ruby
SCommette has joined #ruby
xnm has quit [Ping timeout: 276 seconds]
burgestrand has joined #ruby
glistle has quit [Remote host closed the connection]
glistle has joined #ruby
glistle has quit [Remote host closed the connection]
glistle has joined #ruby
sh1ps has joined #ruby
hadees has joined #ruby
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
apok has joined #ruby
<banisterfiend> davidcelis: +1 ? http://i.imgur.com/mLmg1.jpg
<davidcelis> +2
infinitiguy has quit [Quit: Leaving.]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
minijupe has quit [Quit: minijupe]
vitor-br has quit [Ping timeout: 246 seconds]
appamajig has joined #ruby
fbernier has quit [Ping timeout: 246 seconds]
tomsthumb has quit [Quit: Leaving.]
burgestrand has quit [Quit: Leaving.]
havenn has quit [Remote host closed the connection]
dtribble has quit [Ping timeout: 268 seconds]
ezra has quit [Ping timeout: 276 seconds]
butblack has left #ruby [#ruby]
mmokrysz has joined #ruby
mmokrysz has left #ruby [#ruby]
<bluebie> ruby is more dirty than i remember o_o
ixx has quit [Quit: leaving]
ixx has joined #ruby
Synthead has joined #ruby
<banisterfiend> bluebie: what happened?
<banisterfiend> anyone else think this is stupid? nil.to_s #=> "", nil.to_sym #=> raise exception
<bluebie> you happened banisterfiend :P
<banisterfiend> bluebie: oh, you weren't talking about the language itself :P
<bluebie> why's that stupid? what symbol would you expect? :"" is a rubbish symbol. I don't like it
<banisterfiend> bluebie: i'd expect :"" :)
Quadrant_ has quit [Quit: Leaving]
<banisterfiend> same as nil.to_s #=> ""
<bluebie> mmmm
<bluebie> not sure
<bluebie> symbols are usually used as keys in data storage IMO
glistle has quit [Read error: Connection reset by peer]
<banisterfiend> it seems like a pretty arbitrary place to say 'strings should act differently from symbols here'
<bluebie> I think if I'm trying to store something in nil I'm probably having some error state and the exception probably helps me out?
<bluebie> not sure
<bluebie> I agree on principal
<banisterfiend> well, in this situation im using it
<bluebie> it should behave consistently
<banisterfiend> binding.eval("__method__").to_s.to_sym == :blah
<banisterfiend> if it just had to_sym i'd get an exception
<bluebie> just playing devils advocate
glistle has joined #ruby
<banisterfiend> chaining to_s.to_sym looks silly
<bluebie> isn't __method__ already a symbol?
<banisterfiend> it's a string in 1.8 and a symbol in 1.9
<bluebie> ah lame
<banisterfiend> hmm
<banisterfiend> i guess actually, to_s is enough
<banisterfiend> and text against "blah"
inteq has joined #ruby
<bluebie> yeah
<banisterfiend> still, though :)
balki has joined #ruby
alanp has joined #ruby
<bluebie> agree, silly
ananthakumaran has joined #ruby
sh1ps has quit [Ping timeout: 240 seconds]
inteq has quit [Client Quit]
uris has quit [Quit: leaving]
<davidcelis> bluebie: a symbol is just a strin
<davidcelis> g
<davidcelis> just a frozen string
<davidcelis> poor, frozen string
arooni-mobile has joined #ruby
<arooni-mobile> to inspect a var at a current point in runtime, is ruby-debug my best bet?
<Spooner> arooni-mobile : or debugger (which works better in 1.9) or pry (though these two work somewhat differently).
<banisterfiend> arooni-mobile: pry is the best option
<banisterfiend> :D
<banisterfiend> arooni-mobile: just stick a 'binding.pry' at the opint u want, yo.
moshee has quit [Ping timeout: 240 seconds]
<Spooner> Says the pry dev :P
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
<banisterfiend> i'll let Spooner take over now, to sing its praises in a delicately rising cresendo
SCommette has quit [Quit: SCommette]
<arooni-mobile> cool never heard of pry before
richo has joined #ruby
<banisterfiend> arooni-mobile: http://pry.github.com
<richo> Is there a reason why rb_str_new() returns string encoding US-ASCII, even though I thought 1.9 made UTF-8 encoded strings the default?
<Spooner> UTF-8 isnt' the default in 1.9.
<richo> Should I have to call rb_enc_str_new("string", 5, rb_find_encoding("UTF-8")); or am I missing something
<richo> Ok, that would be the broken assumption I've made
<richo> disregard :)
nXqd has joined #ruby
<Spooner> It may be the default in your particular Ruby though.
<Spooner> >> "frog".encoding
<al2o3cr> (Encoding) #<Encoding:US-ASCII>
<richo> I get UTF-8 encoded strings by default, and I was sure that I read that 1.9 did that somewhere, but I'm obviously mistaken
ryan0x2 has quit [Remote host closed the connection]
paladinn has quit [Ping timeout: 244 seconds]
<Spooner> You can set that default, either per-file or globally.
rburton- has quit [Quit: rburton-]
<richo> I am setting the encoding manually on all of the strings that I create, that seems to be the sanest option. I was just curious why I hjad to
t96151 has quit [Remote host closed the connection]
<arooni-mobile> woh this pry thing is *WAY BETTER* than ruby-debug
t4766 has joined #ruby
<arooni-mobile> so glad i asked before just rolling back to what ive used before
<banisterfiend> arooni-mobile: check out the plugins
kpshek has joined #ruby
<arooni-mobile> banisterfiend, did you write this?
<banisterfiend> arooni-mobile: i'm the creator + one of the maintainers, yeah
<banisterfiend> btu we have a few guys on the team now
<arooni-mobile> thank you.
nXqd has quit [Ping timeout: 252 seconds]
<arooni-mobile> very much. way better than irb/ruby-debug .. watching screencast now
<banisterfiend> k00
andrewhl has quit [Remote host closed the connection]
<arooni-mobile> this is why i love irc
Bosma has quit [Ping timeout: 244 seconds]
dtribble has joined #ruby
kpshek has quit [Ping timeout: 244 seconds]
yxhuvud has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
s1n4 has joined #ruby
invsblduck has joined #ruby
nari_ has quit [Ping timeout: 248 seconds]
apok has quit [Quit: apok]
<banisterfiend> arooni-mobile: what features impressed you btw
<banisterfiend> im always curious what people like
xaq_ has joined #ruby
bob_ has joined #ruby
arooni-mobile has quit [Quit: Leaving]
brianpWins has quit [Quit: brianpWins]
arooni-mobile has joined #ruby
Konboi has joined #ruby
subbyyy has joined #ruby
<arooni-mobile> banisterfiend, i havent used ruby-debuger for sometime; but i remember it being a bad expeirnece; and having to do stuff like 'p varname'
<arooni-mobile> dont remember vim like scrolling commands being integrated
<arooni-mobile> like the color highlighting
<banisterfiend> arooni-mobile: great, check out: https://github.com/kyrylo/pry-theme to change the colors (if u prefer other themes)
nobitanobi has joined #ruby
gmci has quit [Quit: Computer has gone to sleep.]
tommylommykins has quit [Ping timeout: 245 seconds]
bob_ is now known as blob
xaq has quit [Ping timeout: 240 seconds]
<arooni-mobile> like whereami
<arooni-mobile> simple intuitive commands
<banisterfiend> arooni-mobile: the modern version of pry syntax highlight the line after enter is pressed, so it's even more colorful :)
tommylommykins has joined #ruby
<nobitanobi> What's the appropriate way of testing ArgumentError raising in rpsec? I have done it like this: https://gist.github.com/3356155 — but when the ArgumentError raises it stops the execution of the specs.
Drewch has quit [Excess Flood]
<arooni-mobile> sweet i can use as a repalcement rails console
<nobitanobi> forget it. solved it.
Spooner has quit [Ping timeout: 252 seconds]
Drewch has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
chimkan_ has quit [Quit: chimkan_]
nobitanobi has joined #ruby
havenn has joined #ruby
nXqd has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
Aenigma has left #ruby [#ruby]
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
t4766 has quit [Remote host closed the connection]
nobitanobi has quit [Read error: Connection reset by peer]
t11057 has joined #ruby
nobitanobi has joined #ruby
kpshek has joined #ruby
rippa has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
vertroa_ has quit [Read error: Connection reset by peer]
Kefan has joined #ruby
tonini has joined #ruby
iamjarvo has joined #ruby
jameshyde_ has joined #ruby
<Kefan> who can give me some heip
<Kefan> who can give me some heilp
tds__ has quit [Ping timeout: 246 seconds]
<Kefan> who can give me some help
shadoi has quit [Quit: Leaving.]
<bnagy> o/ HEILp
<banisterfiend> Kefan: jesus is the only one who can help you
<Kefan> i konw
nobitanobi has joined #ruby
<davidcelis> bnagy: lol'd
<banisterfiend> bnagy: nagg-dogg, back in k'md ?
<bnagy> I thought jesus was more of a clojure guy
<Kefan> but my english is not well ,who can help me
<banisterfiend> or however u shortened it
iamjarvo has quit [Client Quit]
<bnagy> banisterfiend: ktm, from the airport code. Yeah, I'm back
<banisterfiend> bnagy: when are you going to be in wellington?
<bnagy> banisterfiend: they changed the dates for that con, I am now not so likely to go :(
<bnagy> this year, anyway
kpshek has quit [Ping timeout: 265 seconds]
<bnagy> Kefan: just ask your question, don't ask to ask
<davidcelis> bnagy: nah dude
<davidcelis> bnagy: jesus is all about scala
<bnagy> if anyone can help they will
<Kefan> ok
<bnagy> banisterfiend: I am a bit bummed about it, it's in like mid nov now, weather should be awesome
<banisterfiend> Kefan: there's a mild wind here and i keep losing my cigarettes when i put them on the table they blow off into obscure cracks in the wood work or off the table altogether
gtuckerkellogg has joined #ruby
<Kefan> Ë­ÄÜ°ï°ïÎÒ Ìá¸ßÏÂÓ¢Óï ºÇºÇ
<banisterfiend> bnagy: Yeah, weather will be great
<banisterfiend> Kefan: i think u mean #perl
<banisterfiend> bnagy: have you been to oriental parade?
<bnagy> I don't know what that is :)
mohits has joined #ruby
<bnagy> I am rubbish with street names though, if it's a street
<banisterfiend> bnagy: teh artificial beach :)
<banisterfiend> the*
<bnagy> oh right, no I guess. I been around the harbour a lot, but not much beach there
insecurlex has quit [Remote host closed the connection]
<banisterfiend> go a bit further down and there's a beautiful (but imported) golden sand beach
gen0cide_ has joined #ruby
Chryson has quit [Quit: Leaving]
subbyyy has quit [Quit: Leaving.]
nXqd has quit [Ping timeout: 245 seconds]
brianpWins has joined #ruby
nXqd has joined #ruby
<banisterfiend> bnagy: did you like flight of the concords?
quest88 has quit [Quit: quest88]
Eldariof-ru has joined #ruby
hmmmmmm has joined #ruby
<hmmmmmm> how long does it take to learn ruby?
t11057 has quit [Remote host closed the connection]
t62512 has joined #ruby
<hmmmmmm> i need to know, somebody please tell me now.
<richo> how long is a piece of string.
<banisterfiend> hmmmmmm: 37 seconds
<hmmmmmm> 5 yards
<hmmmmmm> really?
<hmmmmmm> so if i pick up a book on ruby and read it, i'll be an expert
<hmmmmmm> in 37 seconds
<banisterfiend> hmmmmmm: Yeah.
<hmmmmmm> OK, let me try.
<heftig> 2.3 teracycles
burgestrand has joined #ruby
<banisterfiend> hmmmmmm: but have to have a hot chocolate in your left hand and wear a victorian english paper boy hat
<hmmmmmm> oh no, i don't have those items
<hmmmmmm> can you sell them to me?
<banisterfiend> hmmmmmm: Yeah.
dmiller has quit [Ping timeout: 246 seconds]
<hmmmmmm> I'll be willing to pay #150 for the magic hat
<hmmmmmm> i'll make my own hot chocolate though, i make really good hot chocolate
mjb2k has joined #ruby
<banisterfiend> hmmmmmm: no money, only accept self-pics where you gaze wistfully towards the ocean
<heftig> what's the exchange rate from hashes to dollars?
<hmmmmmm> hashes?
<heftig> you said #150
<hmmmmmm> oh yes
<hmmmmmm> that's $30 Zimbabuae dollars
<richo> just headbutt the book till it releases it's knowledge unto you
<bnagy> *its
<hmmmmmm> richo: I tried that already but all i got was a sore head
<richo> You're not headbutting {hard ,}enough
<hmmmmmm> oh
<hmmmmmm> Your websight says that i can do ruby in 20 minutes
Liothen has quit [Remote host closed the connection]
<banisterfiend> hmmmmmm: Yeah, u should sue them for false advertising
<hmmmmmm> I think i willl!!!!!
<hmmmmmm> that aint right brotha
<hmmmmmm> Is it true that ruby is for hipsters?
<hmmmmmm> How many of you are drinking a starbucks right now
<hmmmmmm> BAN ME!!!!
<hmmmmmm> BAN ME!!!!
<mjb2k> asynchronous ruby: I have a sinatra service that needs to make an async call to update some stats but return to client immediately, any advice on where to start with the async part? will Thread.new suffice?
<banisterfiend> hmmmmmm: but i've already developed an affectionate attitude towards u
<hmmmmmm> Will u shutup and ban me already???????????
<hmmmmmm> God you r lame
<banisterfiend> hmmmmmm: is this some kind of perversion?
<hmmmmmm> no
burgestrand has quit [Quit: Leaving.]
<hmmmmmm> do I need a mack book in order to use Ruby?
Mathieu has joined #ruby
<Kefan> where are you£¿
<bnagy> mjb2k: I think most of the webby frameworks have a few different options for async, but you shouldn't need to manage your own threads
<bnagy> I think sinatra has its own chan, right?
<banisterfiend> hmmmmmm: Yeah. And I 'i love steve jobs' sticker on your car
<heftig> mjb2k: resque
<hmmmmmm> ya
<hmmmmmm> here is a startup that uses Ruby: https://medium.com/c/91dc6e8b427f
<hmmmmmm> i want to be like them
<mjb2k> yes i think sinatra does have it's own channel, but the fact that it's in sinatra seemed inconsequential
<bnagy> no, it's really not :)
<hmmmmmm> is Sinatra some sort of alternative to RoR?
<banisterfiend> hmmmmmm: hahah
<banisterfiend> hmmmmmm: looks about right
sqlbyme has joined #ruby
<bnagy> mjb2k: there are tons of ways to do async, but the frameworks also have to integrate the lib
<hmmmmmm> banisterfiend: If you read the captions you'll know that Jeremy is happy about low error rates
<bnagy> but in general, trying to manually manage threads is a road to doom
appamajig_ has joined #ruby
<banisterfiend> hmmmmmm: Yeah, and they eat cupcakes and drink martinees cos sometimes they like to have fun, which is important for a good work environment
<banisterfiend> right? :)
Abbas| has quit [Ping timeout: 265 seconds]
<hmmmmmm> Uhh sure
<banisterfiend> after a long day lowering error rates
burgestrand has joined #ruby
<hmmmmmm> So this is the first time i've heard of Sinatra and Merb Nitro Camping and Rango
<hmmmmmm> how do they stack up?
jgrevich has joined #ruby
<hmmmmmm> if I ever make up my own ruby web framework i think i'm going to name it Woop
<hmmmmmm> or Fishing
<mjb2k> resque is message queue, not quite what I'm looking for, I'm concerned because mri doesn't do concurrency
<hmmmmmm> Dingo is a ogod one too
<hmmmmmm> s/ogod/good/
Konboi has quit [Read error: Connection reset by peer]
Konboi_ has joined #ruby
sqlbyme has quit [Client Quit]
<mjb2k> hmmmmmm: I'm drinking a local micro brew, does that make me hipster?
<hmmmmmm> Not unless it's vintage
Kefan has left #ruby [#ruby]
t62512 has quit [Remote host closed the connection]
<burgestrand> mjb2k: MRI does do concurrency just not single-process parallelism
t71544 has joined #ruby
appamajig has quit [Ping timeout: 265 seconds]
<bnagy> mjb2k: well saying it doesn't do concurrency is a little contentious
<hmmmmmm> I myself am a proud locavore however
<bnagy> but yeah if you want 'real' threads try jruby
<bnagy> but scaling web stuff via threads imvho is a dead model
<mjb2k> ok, yes, I should have said it doesn't do parallel processing
<hmmmmmm> Ya all of you hipsters using RoR deserve what you get, if you like performance, consistency and things to not suck in general, try out Servlets
<hmmmmmm> Later lamers
Synthead has quit [Quit: sqooq]
hmmmmmm has left #ruby ["Leaving"]
<heftig> mjb2k: or celluloid
<burgestrand> in most cases it doesn’t matter however, mri’s threads are fine for just about all tasks except parallell heavy computational load
<mjb2k> it's not a scaling issue in my case, the call isn't concerned with the stats generated from the call, so I don't want it to have to wait for the stats to be generated and inserted into DB
<heftig> your stat updater could be a celluloid actor that you call asynchronously
GordonFreeman has quit [Read error: Connection reset by peer]
td123 has joined #ruby
mike4_ has quit [Ping timeout: 276 seconds]
<arooni-mobile> how do i convert POST encoded parameters like: "host_id%22%3A%22X5LI9QP%22%2C%22" ... to readable, regular characters?
<bnagy> arooni-mobile: that will likely be in URI somewhere
<burgestrand> arooni-mobile: possibly CGI.decode (require 'cgi')
Kefan has joined #ruby
Kefan has left #ruby [#ruby]
<heftig> URI.decode
<burgestrand> I wouldn’t trust URI for encoding post data, so I wouldn’t trust it for decoding it either ^^
baroquebobcat has quit [Quit: baroquebobcat]
<banisterfiend> burgestrand: hey burgy
<mjb2k> ah yea, I think I as overlooking that the request is coming through apache, so it's already been forked and the non-parallel processing shouldn't matter
<banisterfiend> burgestrand: did you use pry-capture yet, im keeping tabs on u
<burgestrand> Oh, actually, encode/decode_www_form might suit well
<burgestrand> banisterfiend: not yet :(
<banisterfiend> burgestrand: no problem, i still like you
<burgestrand> banisterfiend: \o/
xaq_ has quit [Remote host closed the connection]
m4rtijn has joined #ruby
RichieEvan_ has joined #ruby
<m4rtijn> morning
mjb2k has quit [Read error: Connection reset by peer]
mjb2k has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
havenn has quit [Remote host closed the connection]
ProdigoProdigio has joined #ruby
<ProdigoProdigio> hey
nobitanobi has joined #ruby
burgestrand has quit [Quit: Leaving.]
<nobitanobi> night guys
burgestrand has joined #ruby
nobitanobi has quit [Client Quit]
RichieEvan has quit [Ping timeout: 265 seconds]
RichieEvan_ is now known as RichieEvan
nXqd has quit [Ping timeout: 244 seconds]
apok has joined #ruby
mohits has quit [Ping timeout: 256 seconds]
mjb2k has quit [Read error: Connection reset by peer]
mjb2k has joined #ruby
enyo has joined #ruby
<enyo> hello
brdude has joined #ruby
tagrudev has joined #ruby
mjb2k has quit [Read error: Connection reset by peer]
t71544 has quit [Remote host closed the connection]
<nohonor_alt> is there a reason why for x..y doesn't count down?
t52509 has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
haridas has joined #ruby
haridas has left #ruby [#ruby]
nXqd has joined #ruby
tomsthumb has joined #ruby
<richo> why are you using for ?
<banisterfiend> richo: do u know this? http://www.youtube.com/watch?v=NwW3ytid4DA
<richo> banisterfiend: I do not. What the hell am I watching? XD
<banisterfiend> richo: british comedy :P
glistle has quit [Remote host closed the connection]
<richo> I like a lot of bbc comedy
rippa has joined #ruby
<richo> but I generally odn't go quite this far back
jeff_sebring has joined #ruby
mahmoudimus has joined #ruby
<banisterfiend> richo: you're richo healy right?
<richo> healey, but yes :)
timonv has joined #ruby
senny has joined #ruby
tiripamwe has quit [Ping timeout: 252 seconds]
<banisterfiend> richo: back in sf already? :)
<richo> Sadly not, I was only in SF for a month :(
<banisterfiend> richo: oh, you're based in aus?
<richo> Yeah, it was only a brief visit
<richo> If I head over again I'll be more organised though.
tiripamwe has joined #ruby
<banisterfiend> richo: k00, where in aus?
<richo> Melbourne
<banisterfiend> oh
<banisterfiend> i was in sydney for a while
<banisterfiend> if i move to australia i'd probably live in sydney
<banisterfiend> melbourne was TOO hot in summer ;) 40 degrees
<banisterfiend> last time i was there i could do nothing but sit under air conditioning
<richo> It all depends, sydney can be just as hot at times
<richo> That's pretty much how I felt in vegas
<richo> Going outside was traumatic
<richo> People were picking on me, I actually missed melbourne's cold weather. I much prefer too cold to too hot
<banisterfiend> richo: im curious (feel free not to answer) what were you doing in sf?
<richo> My company has an office in melbourne and one in SF
<richo> so they flew me over to the other one for a month
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<banisterfiend> oh
<banisterfiend> nice
gen0cide_ has quit [Quit: ["rm -rf $ME"]]
<banisterfiend> what were your impresiosns?
<richo> Yeah it was pretty awesome
djdb has joined #ruby
<richo> I really liked it. My preconceptions of america clearly don't apply to SF
<m4rtijn> weird
<richo> particularly from a tech point of view it was awesome though, got to meet a bunhc of really interesting people
jgrevich has quit [Quit: jgrevich]
Morkel has joined #ruby
v0n has quit [Ping timeout: 240 seconds]
<bnagy> vegas is too fricking hot
brdude has quit [Ping timeout: 240 seconds]
jgrevich has joined #ruby
<bnagy> richo: why were you in vegas?
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<richo> bnagy: defcon
<nohonor_alt> richo, it's shorter than (x..y).each do |ii|
qko has joined #ruby
<richo> my understanding has always been that unless you have a good reason not to, expression.each is what you want.
<bnagy> richo: ah nice, you be at rux / bpx?
dr_bob has joined #ruby
gmci has joined #ruby
mahmoudimus has joined #ruby
<nohonor_alt> either way, my question was more why descending ranges don't work
<richo> bnagy: definitely rux, bpx if work will pay
<nohonor_alt> but i guess i can live with that
<bnagy> richo: excellent, come say hi if I don't know you already :P I heart seeing ruby people in security
QKO_ has quit [Ping timeout: 240 seconds]
invsblduck has quit [Ping timeout: 260 seconds]
<bnagy> nohonor_alt: I guess you could use downto but I usually use (1..10).reverse_each
<nohonor_alt> bnagy, blah, typing
<richo> bnagy: yeah for sure, I'm the tall guy with dreadlocks, probably being a loudmouth and spouting controversial opinions
<richo> I'm umming and ahhing about speaking at rux, it'll really come down to whether or not I can actually get this exploit to work before the CFP closes
burgestrand has quit [Quit: Leaving.]
<banisterfiend> (sorry)
ntfox has joined #ruby
<bnagy> I just do it to get in for free
<bnagy> :>
<richo> bnagy: Yes D:
<richo> s/nagy/anisterfiend/
<ntfox> Hello, Is there other ways to do it: a[:foo] = a.keys.include?(:foo) ? a[:foo] : true ? a[:foo] ||= true is not solution
<banisterfiend> richo: what is the general opininion in australia of nzers ?
<banisterfiend> (if anything, we might be nothing )
<richo> banisterfiend: The joking opinion is that they're all sheepshaggers, the realistic opinion from the vast magjority of our country is nonchalance
<banisterfiend> richo: figured :)
<bnagy> ntfox: probably I'd use a different idiom? what are you using that kind of hash for?
<banisterfiend> we're a blip
robbyoconnor has joined #ruby
<bnagy> IME the further you get from .au / .nz the more we like each other :)
workmad3 has joined #ruby
<richo> This is true
<bnagy> big differences suddenly become small when you're in pakistan
<ntfox> bnagy, hash can contain everything: nil, true, false, and other objects.
<richo> although the only other australian I met at DC I wanted to get as far away from as possible
noyb has quit [Ping timeout: 245 seconds]
<banisterfiend> richo: i get that too, the cultural cringe
<banisterfiend> esp if they have a strong, annoying accent
<banisterfiend> (which i like to think i dont have :P)
igotnolegs has quit [Quit: Computer has gone to sleep.]
<bnagy> ntfox: I'm trying to understand why you would use, say a Hash with a default key
<richo> bnagy: lazy mans cache?
<bnagy> *wouldn't
<richo> Oh
<richo> bnagy++
<bnagy> like what you're doing seems like a weird idiom, which 90% of the time smells like doing it wrong
ryanf has joined #ruby
<banisterfiend> ryanf: hey ryan
<banisterfiend> ryanf: did you get the forward?
<banisterfiend> ryanf: are you ok with it?
yoklov has quit [Quit: computer sleeping]
<ntfox> bnagy, yes. I have method, which takes as parameter hash. If i omit some parameters when calling the method, hash should use default keys...
<bnagy> ahhh right
Russell^^ has joined #ruby
<bnagy> defaults={blah: 3}; default=defaults.merge opts
brdude has joined #ruby
<bnagy> update is probably the more readable alias, in this case, but that's the pattern
freeayu has joined #ruby
<bnagy> sorry I meant opts=defaults.merge opts
Russell^^ has quit [Client Quit]
<ntfox> bnagy, got it. Thank you
fayimora has joined #ruby
t52509 has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Connection reset by peer]
t10939 has joined #ruby
conor_ireland has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
darren has quit [Remote host closed the connection]
shiki has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
brdude has quit [Ping timeout: 252 seconds]
darren has joined #ruby
<banisterfiend> bnagy: this looks like your kind of thing, read the info associated with the vid http://www.youtube.com/watch?v=DkurGf0e5MU&list=FLb5PoaBJn_TA29JiezVVtlA&index=27&feature=plpp_video
shiki_ has joined #ruby
Eldariof-ru has quit []
<bnagy> ?
fayimora has quit [Quit: Busy…..zzzzz]
shiki__ has joined #ruby
shiki has quit [Ping timeout: 272 seconds]
ph^_ has joined #ruby
tomsthumb has quit [Quit: Leaving.]
tiripamwe has quit [Ping timeout: 265 seconds]
shiki_ has quit [Ping timeout: 245 seconds]
ukd1 has joined #ruby
jameshyde_ has quit [Remote host closed the connection]
clocKwize has joined #ruby
opus has joined #ruby
tiripamwe has joined #ruby
krz has quit [Quit: krz]
xbob has joined #ruby
Araxia has joined #ruby
<nohonor_alt> another noob question
ukd1 has quit [Quit: Lost terminal]
<nohonor_alt> why on earth does "while line = STDIN.gets" silently fail when i have arguments
darren has quit [Remote host closed the connection]
<nohonor_alt> seriously, this is the fourth time ruby has surprised me in two mornings
<bluebie> does it do that if you use $stdin too? or just plain gets (on Kernel)?
mmokrysz has joined #ruby
hoelzro|away is now known as hoelzro
<bluebie> I wouldn't expect that weirdness either :S
mmokrysz has left #ruby [#ruby]
Monie has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
<nohonor_alt> using $stdin doesn't change it
<nohonor_alt> arg = ARGV[0] || 0 \\
<nohonor_alt> while line = $stdin.gets \\
<nohonor_alt> end
<nohonor_alt> lines.push line \\
clocKwize has quit [Quit: clocKwize]
<nohonor_alt> that's basically it, \\ because i didn't want to paste multiline, guess it didn't work
arturaz has joined #ruby
<hoelzro> nohonor_alt: so the script just exits?
opus has quit [Quit:]
opus has joined #ruby
<nohonor_alt> no, wait... damn
<nohonor_alt> if arg == 0
<nohonor_alt> blah
banisterfiend has quit [Ping timeout: 248 seconds]
<nohonor_alt> damn you, perl
<nohonor_alt> for teaching me to expect type coercion in comparisons
khakimov has quit [Quit: Computer has gone to sleep.]
<nohonor_alt> sorry guys, i guess it's me being stupid, thanks for being willing to help anyway :-)
iamlacroix has joined #ruby
lurch_ has quit [Quit: lurch_]
shiki__ has quit [Remote host closed the connection]
QKO_ has joined #ruby
<dr_bob> nohonor_alt: you can use ARGF also very conveniently, like in ARGF.each {|line| puts line}
<dr_bob> ARGF will either read all the files present in ARGV or from STDIN if ARGV is empty
brdude has joined #ruby
g_rotbart has quit [Remote host closed the connection]
qko has quit [Ping timeout: 245 seconds]
bluOxigen has joined #ruby
ConstantineXVI has quit [Ping timeout: 245 seconds]
MarGarina has joined #ruby
haxrbyte has quit [Remote host closed the connection]
kyb3r has quit []
timonv has quit [Remote host closed the connection]
tiripamwe has quit [Ping timeout: 244 seconds]
rakunHo has quit [Remote host closed the connection]
qwerxy has joined #ruby
shiki has joined #ruby
chussenot has joined #ruby
scott_to_s has joined #ruby
scott_to_s has quit [Client Quit]
ringotwo has joined #ruby
<y2k> mOrninG!
lolmaus has joined #ruby
LouisGB has joined #ruby
tiripamwe has joined #ruby
t10939 has quit [Remote host closed the connection]
t41067 has joined #ruby
gmci has quit [Quit: Computer has gone to sleep.]
apok has quit [Quit: apok]
d3vic3 has joined #ruby
mucker has joined #ruby
gilead has joined #ruby
chichou has joined #ruby
dangerousdave has joined #ruby
brdude has quit [Quit: brdude]
thone_ has joined #ruby
ConstantineXVI has joined #ruby
Stalkr_ has joined #ruby
shiki_ has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
banisterfiend has joined #ruby
pskosinski has joined #ruby
thone has quit [Ping timeout: 272 seconds]
shiki has quit [Ping timeout: 244 seconds]
perry is now known as perryh_away
ConstantineXVI has quit [Ping timeout: 245 seconds]
pygmael has joined #ruby
vlad_starkov has joined #ruby
Stalkr_ has quit [Quit: Linkinus - http://linkinus.com]
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen_ has joined #ruby
joekarma has quit [Quit: joekarma]
perryh_away is now known as perryh
brdude has joined #ruby
flype has joined #ruby
omry has quit [Ping timeout: 244 seconds]
psino has quit [Excess Flood]
<nohonor_alt> dr_bob, thanks for the tip :-)
psino has joined #ruby
<dr_bob> ywc
ConstantineXVI has joined #ruby
richo has quit [Quit: laterz, norbs.]
chichou has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
chichou has joined #ruby
jimeh3 has joined #ruby
chichou has quit [Ping timeout: 260 seconds]
zai has joined #ruby
Jackneill has joined #ruby
Jackneill is now known as Guest49752
bluebie has quit [Quit: Linkinus - http://linkinus.com]
Bosox20051 has quit [Quit: Leaving]
eldariof has joined #ruby
perryh is now known as perryh_away
<banisterfiend> dr_bob: hey bob
<dr_bob> hi banisterfiend!
<banisterfiend> dr_bob: hey robert, how are you?
jgrevich has quit [Quit: jgrevich]
<dr_bob> My mood is slightly above average. :-)
scott_to_s has joined #ruby
<banisterfiend> dr_bob: how's germany ?
_Vile has quit [Ping timeout: 244 seconds]
<bnagy> your average, or an objective average?
<bnagy> like, maybe you're a grumpy shit, and today you're merely grouchy?
<dr_bob> Everybody want's our money... But then they scream at us when we tie some constraints to the payments.
<dr_bob> bnagy: good question. I meant my personal average. Whether I'm grumpy I leave to you. :-)
<banisterfiend> dr_bob: heh heh
<banisterfiend> dr_bob: you'll be the savior of europe, aren't you proud? :)
<dr_bob> Well... Unfotunately nobody knows the future and the conviction that we will save the EURO is degrading in public debate, I'm afraid.
<bnagy> I hope you do
<bnagy> I love that tournament
omry has joined #ruby
sinned has left #ruby [#ruby]
quazimodo has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Criztian has joined #ruby
tagrudev has quit [Ping timeout: 240 seconds]
Stalkr_ has joined #ruby
tatsuya_o has joined #ruby
Rochefort has joined #ruby
<shevy> dr_bob it's a spiral of more and more debt for the countries recieving the money
tagrudev has joined #ruby
haxrbyte has joined #ruby
macer_ has joined #ruby
haxrbyte_ has joined #ruby
opus has quit [Quit:]
macer_ is now known as macer1
macer1 has quit [Changing host]
macer1 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
dr0p has joined #ruby
haxrbyte has quit [Ping timeout: 246 seconds]
fridim_ has joined #ruby
brdude has quit [Quit: brdude]
elhu has joined #ruby
mfridh has joined #ruby
Vert has joined #ruby
Inoperable has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
TPFC-SYSTEM has joined #ruby
t41067 has quit [Remote host closed the connection]
t47148 has joined #ruby
brianpWins has quit [Quit: brianpWins]
TPFC-SYSTEM has left #ruby [#ruby]
TPFC-SYSTEM has joined #ruby
opus has joined #ruby
baphled has joined #ruby
workmad3 has joined #ruby
gtuckerkellogg has joined #ruby
omry has quit [Ping timeout: 246 seconds]
Stalkr_ has quit [Quit: Leaving...]
banisterfiend is now known as banister`sleep
tatsuya_o has quit [Remote host closed the connection]
freeayu has quit [Read error: Connection reset by peer]
pabloh has quit [Quit: Ex-Chat]
zii has quit [Read error: Connection reset by peer]
chichou has joined #ruby
zii has joined #ruby
fastred has joined #ruby
nXqd has quit [Ping timeout: 240 seconds]
nXqd has joined #ruby
dtribble has quit [Ping timeout: 240 seconds]
ringotwo has quit [Remote host closed the connection]
clocKwize has joined #ruby
clocKwize has quit [Client Quit]
pingfloyd has quit [Quit: pingfloyd]
freeayu has joined #ruby
clocKwize has joined #ruby
sdimkov has joined #ruby
timonv has joined #ruby
sdimkov has left #ruby [#ruby]
ephemerian has joined #ruby
javos has joined #ruby
clocKwize_ has joined #ruby
charliesome has joined #ruby
clocKwize has quit [Ping timeout: 252 seconds]
clocKwize_ is now known as clocKwize
m4rtijn has left #ruby ["Verlassend"]
m4rtijn has joined #ruby
y2k has left #ruby [#ruby]
y2k has joined #ruby
ryanf has quit [Quit: leaving]
Criztian has quit [Remote host closed the connection]
freeayu has quit [Ping timeout: 246 seconds]
nullx has joined #ruby
lkba has quit [Quit: Bye]
opus has quit [Quit:]
mucker has quit [Quit: leaving]
nullx has quit [Remote host closed the connection]
Inoperable has quit [Remote host closed the connection]
tonini has quit [Remote host closed the connection]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
yuriy has joined #ruby
freeayu has joined #ruby
Kefan has joined #ruby
vandemar has quit [Ping timeout: 272 seconds]
Inoperable has joined #ruby
nullx has joined #ruby
nullx has quit [Changing host]
nullx has joined #ruby
opus has joined #ruby
callmez has joined #ruby
im0b has joined #ruby
vandemar has joined #ruby
callmez has quit [Quit: Page closed]
<im0b> Hi, this returns an error: print "foo = #{foo}" % { :foo => 'bar' }, but its written here: http://www.ruby-doc.org/core-1.9.3/String.html what am i missing?
<im0b> print "foo = %{foo}" % { :foo => 'bar' }
<im0b> this fails too
berserkr has joined #ruby
<im0b> ideas?
<apeiros_> im0b: a) define 'fails', b) what ruby version are you using?
<heftig> im0b: needs to be %{foo}, not #{foo}
<im0b> facebookRequest.rb:30:in `%': malformed format string - %{ (ArgumentError)
<heftig> #{ is for interpolation
<im0b> ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
<apeiros_> you need 1.9 for this
<im0b> heftig: yep, got that, still fails
<im0b> oh
t47148 has quit [Remote host closed the connection]
<apeiros_> 1.8 does not support %{keyword}
<Muz> Note how the URL says "1.9.3" in it. :)
<im0b> yes
<im0b> got it.
<im0b> so im just starting ruby
mneorr has joined #ruby
t93910 has joined #ruby
<im0b> what version is dominant?
<im0b> which api to learn?
tatsuya_o has joined #ruby
<im0b> 1.9?
<Muz> Seriously, use 1.9. 1.8 is very olde, missing features, performs poorly, and is officially deprecated, although some very legacy systems still use it.
<im0b> hmm, my ubuntu came with it
<im0b> and it didn't update it...
<Muz> Install RVM, or rbenv.
<Muz> Ubuntu and Debian are notoriously bad at packaging ruby.
<im0b> ok
<im0b> whats rvm?
<im0b> ruby virtual machine?
tvw has joined #ruby
<Muz> Ruby Version Manager
<im0b> oh like nvm for node
<im0b> cool :)
<im0b> i mean node is the copy ...
* Muz has never used node, but guesses so.
<im0b> ok
<im0b> so if i get like some paas
<im0b> aws, haiku
<im0b> etc
Kefan has left #ruby [#ruby]
<im0b> it will have 1.9?
<Muz> Check their pages, if it's remotely respectable, it will.
<im0b> ok
<im0b> how long is the release cycle ?
<im0b> like from 1.8 to 1.9 is what a year?
<im0b> or a month, 6 month?
<im0b> month's
<Muz> Years.
<im0b> ok so assuming 2 is the next version or 1.10 whatever, is next year, 2 years or so?
<Muz> You clearly didn't read that link.
<im0b> February 2013
<nullx> heh
<shevy> ruby works on haiku?
<im0b> dude it was 30 seconds thats rude i was in the middle of the scentence ...
<im0b> shevy: herokuuuuu
<im0b> i find it funny that each community is so different
<shevy> wat
<shevy> pffft heroku
<shevy> I don't think I could use any OS these days without ruby
<im0b> name is close wat? :)
Rochefort has quit [Remote host closed the connection]
<shevy> ruby makes OS suck less
<nullx> lol
<shevy> even windows
<nullx> I like Ruby
<im0b> shevy: python + dreampie + windows is pretty good
<im0b> but ruby is cool :)
fixl has joined #ruby
<shevy> pyyyython
<shevy> well
<shevy> ruby works on windows too, so that is ok
opus has quit [Quit:]
<shevy> but on haiku I think it still does not work :(
<shevy> dont know what is dreampie
<im0b> lol
<im0b> dreampie is a cool python console
<banister`sleep> im0b: here's a post by a guy who used dreampie with python, but since switching to ruby now prefers pry instead: http://www.alanmacdougall.com/blog/2012/06/08/interactive-debugging-with-pry/
<nullx> how would I check if a ruby expression works?
<im0b> cool, thanks
<banister`sleep> even if it's (currently) terminal only, due to the shear power that pry is packing
<nullx> like as if the pattern is ok
<bnagy> nullx: if it's a regexp, try rubular.com
<nullx> bnagy: er no my ruby application reads in someone elses Regex string, I want to exit and tell them it was a bad regex if the exception is thrown.. Problem is, how do I make it pop up every time if it's wrong?
<nullx> wrong = bad
<bnagy> you want to create a regexp from a string?
<nullx> no no
<nullx> if a regex is invalid, it needs to say it's invalid lol
<bnagy> and it comes in via a string?
<nullx> input file in xml: <regex>/some_regex_here/</regex>
<bnagy> Regexp.new( their_str ) should work
<nullx> my app shouldn't test against it if it's invalid, it should halt, and say "bad regex"
<nullx> okay
<nullx> and just catch RegexpError there?
<bnagy> that will raise if it's not able to be turned into a regexp
<nullx> okay perfect, that's exactly what I needed, thanks
<bnagy> but I don't think it will do what you want
lkba has joined #ruby
<nullx> how so?
<Muz> That will however also attempt to convert arbitrary strings to regexes, and in some cases, succeed.
<bnagy> like... most stuff can be turned into a regexp
mneorr has quit [Quit: Leaving.]
<nullx> er it's just gonna help some of the time, which is good enough IMO
<nullx> for my requirements heh
<nullx> aka it's all good, much appreciated
<bnagy> I think maybe use Regexp.try_convert might be better
<nullx> hmm
<nullx> sure
<nullx> that sounds more appropriate
<bnagy> ugh no sorry that won't take a string :S
<nullx> heheh
<nullx> new will do ;0
<bnagy> well I dunno what breaks new, is all
<nullx> k
<bnagy> very little, it seems
<nullx> ah you're messing with it now
<nullx> gotcha
flype has quit [Quit: Computer has gone to sleep.]
sailias has quit [Quit: Leaving.]
<bnagy> least it will turn the stuff into a usable regexp most of the time, just it might not match what they expect
<bnagy> certainly better than the other option to make a regexp out of a user supplied string :)
<nullx> yeah
<nullx> I just don't want my app to crash without me knowing it type of thing
Rajesh has joined #ruby
<nullx> handling exceptions
<nullx> =)
Rajesh is now known as Guest99058
<nullx> anything is nicer with handled exceptions hehe
arietis has joined #ruby
<nullx> hm, there is no large place with capybara people is there?
<Muz> nullx: I suppose one thing you could do would be to try evaluating a regex match against the regex provided.
<Muz> If an error is raised, the regex is either a string or invalid etc.
<apeiros_> nullx: if your regex string is in the form of "/someregex/flags", then you might want to try LiteralParser
<apeiros_> (gem name being literal_parser)
<Muz> "" =~ /f[oo/ # That complains, as would # "" =~ "some string"
<m4rtijn> exception handling is for noobs - hardcore programmers ignore errors
<Muz> Or listen to apeiros_ instead of my dirty hacky workaround.
<nullx> gotcha
<nullx> I'll do that
<apeiros_> m4rtijn: hardcore programmers don't write errors in the first place!!!!!1!1!elf!
<bnagy> what? exception handling is for errors in other people's code, not mine
<ntfox> hello guys, is there any tool to convert from slim to erb?
<m4rtijn> hehe
<shevy> argh
t93910 has quit [Remote host closed the connection]
t42011 has joined #ruby
Criztian has joined #ruby
cantonic has quit [Quit: cantonic]
lkba has quit [Quit: Bye]
<macer1> is it better to use 2 or 4 spaces for tab?
<nullx> I personally use 4 spaces.
<shevy> macer1 2
<macer1> I just noticed I have set it to 4
<shevy> you can put more information in your .rb files if you stick to 80 characters limit, if using 2 spaces rather than 4
cantonic has joined #ruby
flype has joined #ruby
gmci has joined #ruby
<macer1> ident using spaces *click*, tab width 2 *click*
<shevy> I think 2 vs. 4 is not so much the big issue, spaces vs. tab is much larger. I have no real qualms with 4 spaces, but I don't like tabs at all
qwerxy has quit [Quit: offski]
Guest99058 is now known as Rajesh_
d3vic3 has quit [Ping timeout: 272 seconds]
lurch_ has joined #ruby
nullx has left #ruby [#ruby]
fixl has quit [Remote host closed the connection]
d3vic3 has joined #ruby
tiripamwe has quit [Ping timeout: 256 seconds]
harcher has quit [Ping timeout: 248 seconds]
cantonic has quit [Quit: cantonic]
uris has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
mneorr has joined #ruby
mneorr has quit [Client Quit]
mneorr has joined #ruby
peterhellberg has joined #ruby
fixl has joined #ruby
cantonic has joined #ruby
s1n4 has quit [Quit: peace out]
mneorr has quit [Client Quit]
t42011 has quit [Remote host closed the connection]
mneorr has joined #ruby
t17488 has joined #ruby
cantonic has quit [Client Quit]
tiripamwe has joined #ruby
javos has quit [Quit: Leaving...]
cantonic has joined #ruby
qwerxy has joined #ruby
tolbkni has joined #ruby
Tomasso has joined #ruby
Morkel has quit [Quit: Morkel]
javos has joined #ruby
qko has joined #ruby
yasushi has joined #ruby
javos has left #ruby [#ruby]
tiripamwe has quit [Ping timeout: 248 seconds]
yasushi has quit [Remote host closed the connection]
yasushi has joined #ruby
QKO_ has quit [Ping timeout: 245 seconds]
Foxandxss has joined #ruby
seitensei has joined #ruby
pygmael has quit [Read error: No route to host]
pygmael has joined #ruby
yasushi has quit [Ping timeout: 240 seconds]
joephelius has quit [Quit: WeeChat 0.3.8]
rkk has joined #ruby
msch has joined #ruby
<msch> hi, can someone recommend a gem for relaxed json parsing? e.g. my "json" looks like { 'some key': 'some value' } which isn't proper json but which is nevertheless parseable
<_br_> msch: try gem install oj
<_br_> msch: its very fast also
<msch> _br_: great, thanks!
<_br_> welcome
tiripamwe has joined #ruby
_bart has quit [Quit: _bart]
fearoffish has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
Bofu has joined #ruby
<msch> _br_: hm, do i somehow need to tell oj to be less strict? it doesn't read my malformed json out of the box
chussenot has quit [Quit: chussenot]
Araxia has quit [Quit: Araxia]
Bofu2U has quit [Ping timeout: 246 seconds]
wallerdev has quit [Quit: wallerdev]
mmokrysz has joined #ruby
<im0b> hey, is there like a var_dump(php) or dir(python) in ruby?
butblack has joined #ruby
mmokrysz has left #ruby [#ruby]
butblack has left #ruby [#ruby]
<apeiros_> there's Kernel#p, Kernel#pp, Kernel#y, Object#instance_variables, Object#methods
<apeiros_> pp -> require 'pp', y -> require 'yaml'
d3vic3 has quit [Ping timeout: 248 seconds]
rippa has joined #ruby
eikko has quit [Ping timeout: 260 seconds]
elhu has quit [Quit: Computer has gone to sleep.]
d3vic3 has joined #ruby
yasushi has joined #ruby
Who has joined #ruby
<Who> hey anyone around ?
<Muz> Just ask your question, if someone can help, they will.
<apeiros_> no, anyone hasn't been on today. maybe he'll be here tomorrow?
rkk has quit [Quit: Leaving]
<Mon_Ouie> any-key seems to be here though
* Muz hits any-key.
jimeh3 has quit [Ping timeout: 248 seconds]
yasushi has quit [Remote host closed the connection]
<Who> I have been using Ruby for some time now, I realise programming Ruby makes me work on my problems than writing functions for the language (like C without libs) but since Ruby is such a high level language, do I require to know about the machine to write efficient code ?
yasushi has joined #ruby
t17488 has quit [Remote host closed the connection]
jimeh3 has joined #ruby
t42361 has joined #ruby
JarJar has quit [Quit: Leaving]
<Who> I know for common tasks its not required but what about tough problems
Criztian has quit [Remote host closed the connection]
ezra has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Muz> I'd question if it's more a case of needing to know about the language and interpreter, more than the hardware itself, in order to write something efficient. But this is all strewn with hypotheticals and would vary from use-case to use-case. A concrete example'd be nice.
gmci has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
yasushi has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
yasushi has joined #ruby
quazimodo has quit [Ping timeout: 246 seconds]
Who has quit [Read error: Connection reset by peer]
<bnagy> the only thing you might care about is how much RAM / disk you have
<bnagy> since there are some problems where that's a factor in choosing an algorithm
quazimodo has joined #ruby
<bnagy> oh... left I guess
Who has joined #ruby
<Who> umm did you get my last reply ?
ezra has quit [Remote host closed the connection]
ezra has joined #ruby
qwerxy has quit [Quit: offski]
bluebie has joined #ruby
Who has quit [Read error: Connection reset by peer]
yasushi has quit [Remote host closed the connection]
poga has joined #ruby
qwerxy has joined #ruby
yasushi has joined #ruby
bluenemo_ has joined #ruby
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has quit [Client Quit]
poga has quit [Remote host closed the connection]
freeayu has quit [Ping timeout: 240 seconds]
Who has joined #ruby
Who has quit [Client Quit]
<bnagy> no
Rochefort has joined #ruby
erichmenge has joined #ruby
yasushi has quit [Ping timeout: 248 seconds]
seitensei has quit [Ping timeout: 240 seconds]
qko has quit [Ping timeout: 246 seconds]
freeayu has joined #ruby
Inoperable has quit [Quit: Rectified]
iamjarvo has joined #ruby
qko has joined #ruby
nicoulaj has joined #ruby
paolooo has joined #ruby
seitensei has joined #ruby
monkegjinni has joined #ruby
nopper` is now known as nopper
<shevy> dumdedum
workmad3 has quit [Ping timeout: 268 seconds]
nateberkopec has joined #ruby
<dr_bob> ...
arkiver has joined #ruby
tolbkni has quit [Quit: Leaving]
zii has quit [Ping timeout: 265 seconds]
<shevy> anyone of you using a convention when wishing to specify a default value, but years later you could not remember
<shevy> def foo(i = DEFAULT_VALUE, some_other_value_here = false)
<shevy> and you need to call the second parameter and set it to true
<shevy> but you want to keep the first value to use DEFAULT_VALUE still
berserkr has quit [Quit: Leaving.]
erichmenge has quit [Quit: Be back later]
Inoperable has joined #ruby
`brendan has joined #ruby
liluo has quit [Remote host closed the connection]
greenysan has joined #ruby
subbyyy has joined #ruby
subbyyy has quit [Client Quit]
<gogiel> shevy: afair it's not possible in ruby. the best way to do it is to use hash as an argument
geekbri has joined #ruby
Rajesh_ has quit [Quit: Leaving to Quit]
ProdigoProdigio has quit [Ping timeout: 246 seconds]
jjbohn has joined #ruby
pskosinski has quit [Read error: Connection reset by peer]
<dr_bob> shevy: I agree with gogiel, this calls for keyword arguments.
<dr_bob> foo(some_other_value_here: false)
nathan28 has joined #ruby
<shevy> well
t42361 has quit [Remote host closed the connection]
nathan28 has left #ruby [#ruby]
t68985 has joined #ruby
<shevy> do you guys use some convention, in case where you would not use a hash, nor have access to keyword arguments?
<shevy> I am thinking of something like :default
<shevy> i = DEFAULT_VALUE if i == :default
<peterhellberg> shevy: http://pastie.org/4493207
<shevy> or something? noone else thinking about anything like that?
<shevy> ohhh
<shevy> let's see
<peterhellberg> shevy: Something like this?
ezra has quit [Ping timeout: 276 seconds]
<shevy> hmm well that would require the use of a hash
monkegjinni has quit [Remote host closed the connection]
<dr_bob> shevy: one way to do it http://pastebin.com/pzb7V4kp
pskosinski has joined #ruby
bigkevmcd has quit [Quit: outta here]
baphled has quit [Ping timeout: 252 seconds]
Konboi_ has quit [Read error: Connection reset by peer]
Konboi has joined #ruby
<peterhellberg> shevy: Named arguments are a hack in Ruby… for now
<shevy> hmm
<peterhellberg> Ruby 2.0 will add keyword arguments, which are named parameters that have default values.
<shevy> really?
<peterhellberg> Yes
<shevy> I want Ruby 2.0
<shevy> today
ntfox has quit [Quit: Leaving]
<peterhellberg> But it will retain the same interface as the hash-hacks use method(key: value)
<shevy> hmm
urbann has joined #ruby
mneorr has quit [Quit: Leaving.]
<peterhellberg> Just a new syntax for specifying them… def method(key: "default value", key2: true)
eikko has joined #ruby
<peterhellberg> method(key2: false) would get a key with "default value"
joshman_ has joined #ruby
urbann has left #ruby [#ruby]
<peterhellberg> shevy: You can download 2.0.0dev you know ;)
<peterhellberg> shevy: Probably not a good idea though
Konboi has quit [Quit: Leaving...]
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
lkba has joined #ruby
workmad3 has joined #ruby
<shevy> it scares me
RegEchse has joined #ruby
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<workmad3> shevy: most things seem to scare you... what is it this time? :P
<shevy> that there could be bugs that make things unworkable
<workmad3> haha
<peterhellberg> shevy: That’s what the tests are there to prevent…
<shevy> hmm ok then, but if I find one, I am going to point at peterhellberg accusingly!
* shevy shakes fist!
Spooner has joined #ruby
<shevy> hmm where can this be found actually?
mynameisted has joined #ruby
<peterhellberg> shevy: I do not suggest you _actually_ use 2.0 right now… it _will_ break some code :)
<Muz> There.
mneorr has joined #ruby
<shevy> thanks Muzzy
<shevy> I let you copy paste some '.' from me for future use, here '.' '.' '.' '.'
<workmad3> what stage is 2.0 at? have they released a beta candidate yet, or is it still just 'compile ruby head and expect issues'?
chussenot has joined #ruby
<shevy> peterhellberg, I'll try anyway, you guys convinced me
<shevy> "eregon authored 18 minutes ago" almost LIVE coding
<peterhellberg> workmad3: Feature freeze for "big features" in a week or so.
<Muz> So, the latter.
<eregon> shevy: hehe :)
<shevy> ohhhh
<shevy> he is here too :)
Markvilla has joined #ruby
<shevy> well, let's run configure now and see what happens...
choffstein has joined #ruby
mneorr has quit [Read error: No route to host]
joephelius has joined #ruby
mneorr has joined #ruby
A1241 has left #ruby [#ruby]
<peterhellberg> shevy: Do you have RVM installed? (If so, rvm install ruby-head will install it for you)
Criztian has joined #ruby
choffstein has quit [Remote host closed the connection]
<shevy> hmm dont have it installed yet, will install it after this try now
<shevy> so far no errors
mneorr1 has joined #ruby
<workmad3> shevy: you could also use ruby-build and install 2.0.0-dev :)
bigkevmcd has joined #ruby
mneorr has quit [Ping timeout: 248 seconds]
shiki_ has quit [Remote host closed the connection]
<juha_> has anyone been running ruby + mysql on aws micro instance?
<shevy> yeah well, later later, right now I get scared by things like
<shevy> Version of /Downloads/ruby-ruby-fd7dc23/ext/digest/rmd160/rmd160.h : no version available
resure has joined #ruby
nedbat has joined #ruby
<shevy> juha_ not me, I don't even know what is an aws micro instance
<peterhellberg> juha_: Nope, but it sounds a bit tight for that kind of hardware
fermion has joined #ruby
<peterhellberg> juha_: Do you _need_ MySQL or would any database work?
wedgeV has joined #ruby
sailias has joined #ruby
<im0b> how do i trim the first char of a string?
<im0b> "12345"[1..]
<im0b> is the intuition
<juha_> shevy: it's free and really small and bad
<im0b> if i want to have "2345" in return
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r_ has joined #ruby
<juha_> peterhellberg: well yeah, kind of, as i want some cheap/free instance just to demo my code to a friend
<juha_> peterhellberg: i guess i could use something else than mysql also, but kind of want to use mysql
<im0b> [1..-1] got it.
<shevy> im0b yeah
<shevy> could also set it to '' via string[0,1] = ''
<juha_> peterhellberg: any suggestion on the db that could fir on micro instance?
t68985 has quit [Remote host closed the connection]
<juha_> *fit
<peterhellberg> juha_: A micro has 613 MB memory… so it should work
t45962 has joined #ruby
<shevy> RUBY_VERSION => "2.0.0"
<shevy> hah!
resure is now known as resure_away
<shevy> hello future world
<Muz> Welcome to the world of tomorrow... today!
nateberkopec has quit [Quit: Leaving...]
omry has joined #ruby
ezra has joined #ruby
eikko has quit [Ping timeout: 248 seconds]
pu22l3r_ has quit [Ping timeout: 246 seconds]
<Spooner> Enjoy the bugs of tomorrow...today!
tiripamwe has quit [Ping timeout: 256 seconds]
pratyksp has joined #ruby
Konboi has joined #ruby
qwerxy has quit [Quit: offski]
macer1 has quit [Read error: Connection reset by peer]
jjbohn has quit [Quit: Leaving...]
<shevy> lol
macer_ has joined #ruby
ezra has quit [Ping timeout: 276 seconds]
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
<pratyksp> Hi, is there standard library to find total system memory.
<hoelzro> what's this channel's opinion on hoe? is it a good tool to use?
<hoelzro> I'm looking for a Ruby equivalent to Perl's Dist::Zilla, and Hoe (so far) is the closest thing I've found
Criztian has quit [Remote host closed the connection]
paolooo has quit [Quit: Page closed]
chussenot has quit [Quit: chussenot]
jrajav has joined #ruby
chussenot has joined #ruby
tiripamwe has joined #ruby
Markvilla has quit [Ping timeout: 245 seconds]
Markvilla has joined #ruby
bigkevmcd has quit [Quit: outta here]
JonnieCa1he has quit [Quit: leaving]
fantazo has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
bbttxu has joined #ruby
qwerxy has joined #ruby
Inoperable has quit [Quit: Simon says sleep!]
ananthakumaran has quit [Quit: Leaving.]
jtza8 has joined #ruby
AllStruck has joined #ruby
<AllStruck> Does anyone here use YubNub?
tenseiten has joined #ruby
<m4rtijn> sounds dirty
nari_ has joined #ruby
seitensei has quit [Ping timeout: 260 seconds]
<peterhellberg> juha_: What kind of app are you looking to deploy on that micro instance?
<AllStruck> m4rtijn: it means hooray in Ewok
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347]]
<peterhellberg> juha_: Did you consider using Heroku (and Postgres) instead?
tommyvyo has joined #ruby
<AllStruck> unfortunately the server is down for it right now... just wondering if anyone else is as effected by this as I am.
dpk has joined #ruby
<shevy> pratyksp dont think there is, on linux you could run system 'dfree' or something like that, via ruby
<AllStruck> it was created with rails in 24 hours as part of a competition
<peterhellberg> AllStruck: “Sorry about YubNub being down, folks. The pendrell server at Joyent is having issues. https://help.joyent.com/
<AllStruck> peterhellberg: are you with Joyent? or where did that come from? I emailed the creator and had already seen that but thanks ;)
indian has joined #ruby
<pratyksp> shevy: I wanted something without calling external programs.
<AllStruck> peterhellberg: google says you got that from the YubNub blog ya?
nanderoo has joined #ruby
<peterhellberg> AllStruck: Yes, and so should you have ;)
mascool has joined #ruby
<peterhellberg> They’ll probably update the blog when they are up again
<AllStruck> peterhellberg: why when I talked to Jonathan before this was posted?
nari_ has quit [Ping timeout: 240 seconds]
shiki has joined #ruby
nilg` has joined #ruby
<AllStruck> peterhellberg: I have faster ways of telling when a service comes back online than waiting on blog posts
<shevy> pratyksp yeah. not available in ruby standard library.
erichmenge has joined #ruby
nilg has quit [Ping timeout: 252 seconds]
<AllStruck> besides I ended up creating something in Python to fill the void :P
miho has joined #ruby
iori has quit [Remote host closed the connection]
fbernier has joined #ruby
iori has joined #ruby
wedgeV has quit [Quit: wedgeV]
nwest has joined #ruby
iori has quit [Remote host closed the connection]
pen has quit [Read error: Connection reset by peer]
elux has joined #ruby
nu7hatch has joined #ruby
pen has joined #ruby
gmci has joined #ruby
freeayu has quit [Ping timeout: 252 seconds]
dr0p has quit [Quit: Wychodzi]
[Neurotic] has quit [Remote host closed the connection]
coderhut has joined #ruby
uris has quit [Quit: Lost terminal]
GoGoGarrett has joined #ruby
gfontenot has joined #ruby
t45962 has quit [Remote host closed the connection]
inteq has joined #ruby
gfontenot has quit [Client Quit]
t60081 has joined #ruby
moshee has quit [Ping timeout: 252 seconds]
moshee has joined #ruby
hynkle has joined #ruby
Inoperable has joined #ruby
paolooo has joined #ruby
centipedefarmer has joined #ruby
freeayu has joined #ruby
luckman212 has joined #ruby
JonnieCache has joined #ruby
ananthakumaran has joined #ruby
hynkle has quit [Read error: Connection reset by peer]
arvidkahl has quit [Quit: arvidkahl]
<juha_> peterhellberg: it's just a small chat/todo (at the moment) with ruby serving as websocket server + saving things to a db
asteve_ has joined #ruby
<juha_> peterhellberg: nothing fancy, i'm just learning ruby
asteve_ has quit [Client Quit]
<bluebie> juha_: Sounds neat!
<bluebie> I like eventstream better than websockets for that sort of thing - so much easier to host, just regular http, don't need special rack or servers or anything like that
fb6667 has joined #ruby
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
linoj has joined #ruby
iamjarvo has joined #ruby
nateberkopec has joined #ruby
yasushi has joined #ruby
Konboi has quit [Remote host closed the connection]
ly_gs has joined #ruby
hynkle has joined #ruby
urbann has joined #ruby
Eplemosen has joined #ruby
chussenot has quit [Quit: chussenot]
hynkle has quit [Read error: Connection reset by peer]
<juha_> eventstream? never heard
chussenot has joined #ruby
`brendan has quit [Ping timeout: 265 seconds]
<juha_> the ruby server is this: https://github.com/gimite/web-socket-ruby
<juha_> that i'm using on it
jtza8 has left #ruby [#ruby]
Stalkr_ has joined #ruby
allsystemsarego has joined #ruby
hynkle has joined #ruby
jeff_sebring has quit [Quit: Leaving]
asteve_ has joined #ruby
gfontenot has joined #ruby
`brendan has joined #ruby
gfonteno_ has joined #ruby
cantbecool has joined #ruby
gfonteno_ has quit [Client Quit]
<allsystemsarego> Hello, can this game of tic-tac-toe be made more elegant/expressive? http://pastebin.com/raw.php?i=PknNhSA6
banisterfiend` has joined #ruby
fastred has quit [Quit: fastred]
banister`sleep has quit [Ping timeout: 256 seconds]
tayy has joined #ruby
andrewhl has joined #ruby
jrist-afk is now known as jrist
<JonnieCache> allsystemsarego: you could derive WINNING_COMBINATIONS algorithmically rather than hardcoding it i guess
<JonnieCache> whether or not thats more elegant is a matter of taste
uris has joined #ruby
tds has joined #ruby
tds is now known as Guest13490
m4rtijn has quit [Quit: Verlassend]
Jake232 has joined #ruby
denysonique has joined #ruby
mikewintermute has joined #ruby
<Muz> allsystemsarego: you could also wrap some of the logic in function calls with descriptive names.
flype has joined #ruby
<bnagy> and not play out the whole game once someone has won
<bnagy> ...actually that's a bug
<Muz> bnagy: does it not already do that?
<Muz> Given the exit() calls.
<bnagy> ahh yeah it does I got my indenting levels messed up
choffstein has joined #ruby
xorox90 has joined #ruby
<bnagy> it's not very OO ;/
fb6667 has left #ruby [#ruby]
<JonnieCache> tic tac toe doesnt need OO
<bnagy> well it doesn't need to be programmed at all
chichou has quit [Ping timeout: 246 seconds]
Nisstyre has quit [Ping timeout: 276 seconds]
<bnagy> so assuming it's didactic, it's not very OO
JustinCampbell has joined #ruby
t60081 has quit [Remote host closed the connection]
<JonnieCache> at uni they wouldve made us do that with a bloody visitor pattern or something in a bazillion lines of java
t28456 has joined #ruby
<bnagy> because the aim is not to play random games of tic tac toe
coderhut has quit [Quit: Page closed]
pu22l3r has joined #ruby
<bnagy> I think it would be better to have a Board and two Players, for sure
<JonnieCache> i take your point, if this was an excercize in learning OO then its an epic fail. theres no evidence for that though
afd__ has quit [Ping timeout: 244 seconds]
<bnagy> then you can actually develop strategy
<bnagy> like 'if I have two in a row and it's my move, win' :>
<Muz> bnagy: /and/ if there is a free adjacent tile in the same direction.
<Muz> You could have two in a row, and it be your turn, and not win.
<JonnieCache> my advice would be to throw it away and implement conways game of life instead because its basically the same but 10000x more interesting
Axsuul has quit [Ping timeout: 240 seconds]
<bnagy> harder
<bnagy> but definitely more interesting :)
SCommette has joined #ruby
<JonnieCache> implementing the GoL in a one dimensional array of booleans or the like is something everyone should do early in their careers
v0n has joined #ruby
qqProc has joined #ruby
qqProc has quit [Client Quit]
<bnagy> oic, 1d makes the edge detection a million times easier
<bnagy> never thought of that :)
<JonnieCache> easier?
Nisstyre has joined #ruby
<bnagy> how do you do it with booleans though?
qqProc has joined #ruby
chichou has joined #ruby
<bnagy> don't you need empty, full, dying, birthing ?
mikalv_ is now known as mikalv
jjbohn has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
<JonnieCache> dont see why. i didnt.
<JonnieCache> theres only alive or dead
tatsuya_o has joined #ruby
<JonnieCache> the cells dont have an age
<bnagy> but you need to kill / birth everything in one go
verto|off is now known as verto
nitgav has joined #ruby
<JonnieCache> ah i think i did it by generating a new array each time and then getting rid of the old one
<JonnieCache> not mutating the same one
<bnagy> ok that would work
nari_ has joined #ruby
bowlowni has joined #ruby
qqProc has quit [Client Quit]
BrokenCog has joined #ruby
BrokenCog has joined #ruby
<andrewhl> I can use << to append to a File, but how do I prepend?
jjbohn has quit [Ping timeout: 246 seconds]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
llaskin has joined #ruby
<llaskin> whats the best HTTP gem for ruby?
<hoelzro> andrewhl: you probably will need to slurp in the contents, alter them, and re-write them
<JonnieCache> llaskin: for simple use, httparty is good
afd__ has joined #ruby
erichmenge has quit [Quit: Be back later]
<hoelzro> or create a file, write your prepend stuff to it, append the contents of the old file to the new one, and rename the new one to the old one
bier has quit [Quit: Ex-Chat]
<Muz> llaskin: what exactly are you trying to do over HTTP? Ruby does have built in support via net/http but as for which gem is "best" depends on what you really want to do.
<bluebie> I'm a fan of open-uri!
<bluebie> it doesn't do lots of stuff! But it sure does open uris!
mikewintermute has quit [Quit: mikewintermute]
jrajav has quit []
bier has joined #ruby
mikewintermute has joined #ruby
<llaskin> Muz: i'm trying to recreate this command " wget --auth-no-challenge --http-user=user --http-password=apiToken http://localhost/job/your_job/build?token=TOKEN"
aldodelgado has joined #ruby
bigkevmcd has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
<bluebie> sounds like require 'open-uri'; response = open("http://user:apiToken@localhost/job/your_job/build?token=TOKEN") would do the trick
awarner has joined #ruby
<Muz> Basically, you want to be able to do HTTP basicauth, against a URL. Mechanize can definitely do that too.
<bluebie> everything can do that <_<
Guest13490 has quit [Ping timeout: 252 seconds]
<Muz> You could just do it via net/http in the stdlib, instead of relying on another gem.
<canton7> open-uri is built in
infinitiguy has joined #ruby
erichmenge has joined #ruby
internet_user has joined #ruby
stopbit has joined #ruby
<llaskin> muz: https://gist.github.com/ab3b2b5d51d78e75cd30 any thoughts on where the extra : is?
tiripamwe has quit [Quit: Leaving]
tiripamwe has joined #ruby
mikewintermute has quit [Quit: mikewintermute]
nitgav has left #ruby [#ruby]
mikewintermute has joined #ruby
infinitiguy has quit [Client Quit]
cantbecool has quit [Quit: Textual IRC Client: www.textualapp.com]
bbttxu has quit [Quit: bbttxu]
<Muz> llaskin: not used curb personally, but I'd suspect it doesn't handle basicauth in the way you've attempted to pass the username and password.
asobrasil has joined #ruby
bbttxu has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
mikewintermute has quit [Client Quit]
ph^_ has quit [Ping timeout: 268 seconds]
infinitiguy has joined #ruby
mikewintermute has joined #ruby
afd__ has quit [Ping timeout: 252 seconds]
kvirani has joined #ruby
* shevy sighs happily.
<shevy> always those sexy '.'
dpk has quit [Quit: Asleep at the keyboard.]
bbttxu has quit [Remote host closed the connection]
yasushi has quit [Remote host closed the connection]
bbttxu has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
yasushi has joined #ruby
t28456 has quit [Remote host closed the connection]
t88176 has joined #ruby
tayy has quit [Remote host closed the connection]
ananthakumaran has quit [Ping timeout: 244 seconds]
jjbohn has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
yasushi has quit [Ping timeout: 272 seconds]
<arietis> is there any book about ruby which is fun to read and targeted for advanced developer and not beginner?
<arietis> i know basics and wanna know more
<arietis> :D
<hoelzro> arietis: The Ruby Programming Language is quite good.
ackz has joined #ruby
<arietis> what about tutorials?
<arietis> is there any good web site?
<peterhellberg> One of my favorites are "Design Patterns In Ruby"
<JonnieCache> but really you should get that book
<shevy> arietis did you work through learn to program from chris pine already?
afd__ has joined #ruby
Markvilla has joined #ruby
mohits has joined #ruby
ananthakumaran has joined #ruby
<tommyvyo> arietis: Read the Ruby Pickaxe book
choffstein has quit [Remote host closed the connection]
<tommyvyo> second for Design Patterns in Ruby
dpk has joined #ruby
adambeynon has joined #ruby
asteve has quit [Disconnected by services]
asteve_ is now known as asteve
asteve has quit [Changing host]
asteve has joined #ruby
monobit_ has joined #ruby
MrWGW has quit [Ping timeout: 268 seconds]
v0n has joined #ruby
mneorr1 has quit [Quit: Leaving.]
MrWGW has joined #ruby
tish has joined #ruby
daniel_hinojosa has joined #ruby
dhruvasagar has joined #ruby
urbann has quit [Remote host closed the connection]
<arietis> it's too big and boring
Markvilla has quit [Ping timeout: 245 seconds]
ly_gs has quit [Read error: Connection reset by peer]
<arietis> i don't get the purpose of such books, it's easier to read docs
Markvilla has joined #ruby
erichmenge has quit [Quit: Be back later]
Rajesh has joined #ruby
Rajesh is now known as Guest86229
afd__ has quit [Ping timeout: 245 seconds]
verto is now known as verto|off
Jay_Levitt has joined #ruby
mascool has quit [Ping timeout: 240 seconds]
afd__ has joined #ruby
cantonic_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
luxurymode has joined #ruby
<luxurymode> if i have some project with a script and the root directory and another module/class in a subdirectory..how can i require that class in the subdirectory?
mahmoudimus has joined #ruby
<any-key> require_relative 'yourpathorwhatevs/class_name'
tagrudev has left #ruby ["lolst"]
<llaskin> Muz, thanks I got it
freeayu has quit [Quit: 离开]
<arietis> is there any community resource for ruby? with examples etc.
stat1x has quit [Remote host closed the connection]
cantonic has quit [Ping timeout: 252 seconds]
cantonic_ is now known as cantonic
yasushi has joined #ruby
stat1x has joined #ruby
<any-key> arietis: the docs
<dr_bob> arietis: do you have trouble concentrating for a longer period of time? ;-)
<arietis> yes
<any-key> just memorize the docs
mohits has quit [Read error: Connection timed out]
<any-key> also, this channel is a community resource
d3vic3 has quit [Ping timeout: 246 seconds]
<any-key> as long as you aren't a jerk
<arietis> yeah i know but there are no pics
<any-key> wat
<arietis> in channel
* dr_bob presses any-key
* shevy cuddles any-key
<any-key> arietis: you can use things like pastebin
<shevy> we are all abusing any-key
<any-key> who the hell uses pictures?
<luxurymode> ah right thanks any-key
<any-key> if you want a picture book go read the poignant guide
mahmoudimus has quit [Client Quit]
Vert has quit [Ping timeout: 252 seconds]
tish has left #ruby [#ruby]
<any-key> I encourage reading the poignant guide for cultural reasons anyways
mohits has joined #ruby
d3vic3 has joined #ruby
<dr_bob> +1
afd__ has quit [Ping timeout: 245 seconds]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<xclite> lolol "there are no pictures"
<arietis> any-key: yeah, this guide looks nice ,thanks
bluebie has left #ruby ["Linkinus - http://linkinus.com"]
<any-key> it's not an amazing guide but it's a fun read
<any-key> pleasepleaseplease read a real guide first
<arietis> it perfectly fits me cause i'm not going to develop professionally using ruby, just wanna know more about it :)
axl_ has joined #ruby
<any-key> ah okay
<arietis> moving out of the city for 2 weeks so looking for fun reading
<arietis> :D
Guest86229 has quit [Quit: Leaving to Quit]
Markvilla has quit [Quit: Computer has gone to sleep.]
<allsystemsarego> arietis, there is no substitute for taking hard problems and solving them with any language you want to learn more about
tds_ has joined #ruby
hynkle has quit [Read error: Operation timed out]
fb6667 has joined #ruby
<any-key> indeed
<arietis> yeah but i don't like webdev and most of the ruby resources are focused on rails -.-
<any-key> the best way to learn a language is to write silly little things
<any-key> nah there's plenty of non-rails resources
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
kn330 has joined #ruby
FuXi has joined #ruby
tvw has quit [Remote host closed the connection]
revans has joined #ruby
<sphera> highly agree with any-key about writing silly little things
hynkle has joined #ruby
revans has quit [Client Quit]
<JonnieCache> arietis: cleveralgorithms.com
Hydroxide has joined #ruby
hynkle has quit [Read error: Connection reset by peer]
seitensei has joined #ruby
tenseiten has quit [Ping timeout: 256 seconds]
fb6667 has quit [Ping timeout: 240 seconds]
dpk has quit [Quit: Asleep at the keyboard.]
Jay_Levitt has quit [Quit: Leaving...]
tayy has joined #ruby
<arietis> JonnieCache: thanks
<Hydroxide> anyone know a way to tell Ruby sleep until a specific time? i.e. fixed end time, not a duration.
<Hydroxide> for various reasons, cron isn't the right solution for this.
hynkle has joined #ruby
Rajesh has joined #ruby
<canton7> find how long it is until your preferred time?
tiripamwe has quit [Ping timeout: 248 seconds]
<Hydroxide> canton7: that's error-prone and fails if the program is scheduled out at the wrong time
Rajesh is now known as Guest35519
<canton7> sleep for a minute, check time, rinse repeat?
ezra has joined #ruby
sepp2k has joined #ruby
<Hydroxide> I need something more precise. I know at least Linux supports waking a process up at a specific time, but don't know if there's a way to do that from Ruby
<asteve> cron?
<any-key> oh man it's been too long since my systems programming class
<Inoperable> hello
<asteve> sleeping is never a good idea; wasted cycles
Synthead has joined #ruby
<Hydroxide> asteve: right, polling is better to avoid
<Hydroxide> sleeping itself isn't wasting cycles :)
troessner has joined #ruby
t88176 has quit [Remote host closed the connection]
troessner has quit [Remote host closed the connection]
Inoperable has quit [Quit: Rectified]
t21045 has joined #ruby
<asteve> sleeping is the definition of wasted cycles, what are you doing when you sleep? nothing
<hoelzro> Hydroxide: clock_nanosleep?
<asteve> interrupts are the money melon
<hoelzro> asteve: but the CPU isn't spinning during a sleep =)
tenseiten has joined #ruby
<any-key> context switching still occurs
<Hydroxide> asteve: I said "for various reasons, cron isn't the right solution for this." in this case, we are trying to working around what appears to be a bug in crond
<any-key> that's expensive, yo
<hoelzro> any-key: agreed
<Hydroxide> but it doesn't have to be for anything periodic
<hoelzro> but for most things in userland, that's acceptable
<any-key> you can use something like eventmachine
<hoelzro> since the kernel may preempt you at any time
<any-key> it's a bit overkill though
bbttxu has quit [Quit: bbttxu]
<hoelzro> unless you're on a RT OS
<Hydroxide> well, this isn't a RT OS, but it does do a lot of low-latency stuff at high volume
seitensei has quit [Ping timeout: 268 seconds]
<Hydroxide> and precision is relatively important
<Hydroxide> this is standard linux.
Guest35519 has quit [Remote host closed the connection]
<hoelzro> Hydroxide: clock_nanosleep should suit you then
<Hydroxide> I mean, the ruby doesn't do a lot of low-latency stuff at high volume. the system does.
<Hydroxide> hoelzro: nice :)
qko has quit [Ping timeout: 246 seconds]
<Hydroxide> hoelzro: is there a pre-existing way to call that from Ruby or do I need to do a regular FFI call?
jrist is now known as jrist-mtg
<hoelzro> Hydroxide: check for a binding?
<hoelzro> or write one =)
TheLZA has joined #ruby
bluOxigen_ has quit [Ping timeout: 240 seconds]
<any-key> rewrite it all in C
TheLZA has quit [Max SendQ exceeded]
<Hydroxide> hoelzro: yes, that was my question :) FFI may be the answer. thanks.
JustinCampbell has quit [Remote host closed the connection]
TheLZA has joined #ruby
ksk has joined #ruby
<ksk> hello
qko has joined #ruby
<Hydroxide> hoelzro: heh, just noticed that it doesn't actually guarantee waking you up at the specified time. ah well, this isn't a RT OS. thanks :)
<ksk> im using array.include? to check if something is in an array. is there a way to check if "something*" (like "something-foo" or sth like this) is in this array?
theRoUS has quit [Ping timeout: 246 seconds]
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<JonnieCache> ksk: array.any? {|e| e =~ /something.*/ }
Hydroxide has left #ruby [#ruby]
<JonnieCache> if array is very big you may want to define that regex outside of the block so it only gets created once
x77686d has joined #ruby
Rajesh_ has joined #ruby
jgrevich has joined #ruby
tiripamwe has joined #ruby
Rajesh_ has quit [Max SendQ exceeded]
Rajesh_ has joined #ruby
<ksk> JonnieCache: thanks.
Rajesh_ has quit [Max SendQ exceeded]
<ksk> do i get this right, ur ".any?" is not in http://www.ruby-doc.org/core-1.9.3/Array.html ?
Rajesh_ has joined #ruby
yoklov has joined #ruby
erichmenge has joined #ruby
<JonnieCache> ksk: its in the Enumerable module which is included in array
<JonnieCache> and in Hash and lots of other stuff
jrajav has joined #ruby
<ksk> i see. thanks again
llaskin has left #ruby [#ruby]
<workmad3> JonnieCache: also, ruby optimises that sort of object creation
<workmad3> JonnieCache: take a look at: %w(1 2 3 4 5).each {|i| p /f/.object_id }
<JonnieCache> nice
Araxia has joined #ruby
<JonnieCache> i am stood right in the middle of that crowd somewhere
<JonnieCache> under the Thing hehe
arkiver has quit [Quit: Leaving]
jlogsdon has joined #ruby
Rajesh_ has quit [Remote host closed the connection]
bwlang has joined #ruby
jasmina87SA__ has joined #ruby
jasmina87SA__ has quit [Read error: Connection reset by peer]
savage- has quit [Remote host closed the connection]
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
iamjarvo has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
Araxia has quit [Ping timeout: 246 seconds]
centipedefarmer has left #ruby ["Leaving"]
banghouse has joined #ruby
baroquebobcat has joined #ruby
<Synthead> is there a built-in similar to join that will put human readable output like this: [ 1, 2, 3 ].some_join_method == "1, 2, and 3" ?
ckrailo has joined #ruby
baphled has joined #ruby
lurch_ has quit [Read error: Connection reset by peer]
imami|afk is now known as banseljaj
lurch_ has joined #ruby
nXqd has quit [Ping timeout: 246 seconds]
<workmad3> Synthead: no, but if you happen to be in rails, ActiveSupport gives you to_sentence that does that
Jay_Levitt has joined #ruby
<Synthead> workmad3: oh interesting :) will keep that in mind. thanks!
Araxia has joined #ruby
davidcelis has quit [Quit: K-Lined.]
banghouse is now known as butthouse
robbyoconnor has quit [Ping timeout: 246 seconds]
butthouse is now known as banghouse
Araxia has quit [Remote host closed the connection]
mikepack has joined #ruby
chussenot has quit [Quit: chussenot]
cbuxton has quit [Quit: Leaving.]
bluenemo has quit [Remote host closed the connection]
chussenot has joined #ruby
dpk has joined #ruby
randym has quit [Quit: Connection closed for inactivity]
hadees has quit [Quit: hadees]
elhu has joined #ruby
flip_digits has joined #ruby
qwerxy has quit [Ping timeout: 244 seconds]
doherty has joined #ruby
pygmael has quit [Quit: pygmael]
internet_user has quit [Remote host closed the connection]
qwerxy has joined #ruby
internet_user has joined #ruby
Jay_Levitt has quit [Quit: Leaving...]
Progster has joined #ruby
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
yasushi has quit [Remote host closed the connection]
td123 has quit [Read error: Connection reset by peer]
nari_ has quit [Ping timeout: 240 seconds]
dpk has quit [Quit: Asleep at the keyboard.]
resure_away has quit [Ping timeout: 246 seconds]
yasushi has joined #ruby
td123 has joined #ruby
Morkel has joined #ruby
<otters> activesupport has everything!
<matti> ... and cures cancer.
ElderFain has joined #ruby
<matti> Synthead: https://gist.github.com/3361084 -- there is probably better way to do this (always is).
gilead has quit [Quit: This computer has gone to sleep]
hoelzro is now known as hoelzro|away
<Synthead> matti: mm, yeah. I might write a method like this, but it's just for logs, so 1, 2, 3. seems good for now :)
<matti> Logging?
<matti> I'd not bother then with "a, b, and c" :)
shevy has quit [Read error: Operation timed out]
yasushi has quit [Ping timeout: 240 seconds]
greenysan has quit [Ping timeout: 248 seconds]
snearch has joined #ruby
hynkle has quit [Ping timeout: 240 seconds]
eldariof has quit [Ping timeout: 268 seconds]
hadees has joined #ruby
nXqd has joined #ruby
arturaz has quit [Ping timeout: 246 seconds]
Rochefort has quit [Remote host closed the connection]
ianbrandt has joined #ruby
Krajsnick has joined #ruby
michael2572 has joined #ruby
hynkle has joined #ruby
td123 has quit [Ping timeout: 244 seconds]
Jake232 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jrist-mtg is now known as jrist
xorox90 has quit [Ping timeout: 240 seconds]
bigkevmcd has quit [Quit: outta here]
virunga has joined #ruby
bigkevmcd has joined #ruby
randomautomator has joined #ruby
Krajsnick has quit [Read error: Connection reset by peer]
Krajsnick has joined #ruby
brdude has joined #ruby
tayy has quit [Remote host closed the connection]
hynkle has quit [Ping timeout: 268 seconds]
erichmenge has quit [Quit: Be back later]
Rajesh has joined #ruby
Rajesh is now known as Guest87497
hynkle has joined #ruby
luckman212_ has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
Wilhelm_ has joined #ruby
<asteve> how can I diff two hashes?
shevy has joined #ruby
internet_user has quit [Remote host closed the connection]
tcopp has quit [Quit: leaving]
luckman212 has quit [Ping timeout: 248 seconds]
tcopp has joined #ruby
mike4_ has joined #ruby
<asteve> i actually need to diff two hashes that contain hashes {1=>{a => b, c => d}, 2 => {e => f, g => d}} compared to {1=>{a => b, c => d}, 2 => {e => f, g => d}}
<dr_bob> asteve: (h1.keys + h2.keys).to_set.each {|k| ...}
havenn has joined #ruby
dr_bob has quit []
shiki has quit [Remote host closed the connection]
Guest87497 has quit [Read error: Connection reset by peer]
Coolhand has joined #ruby
<Coolhand> newbie here, for some reason I can't seem to get my validations to work http://pastebin.com/RML4FjnR.
bradhe has joined #ruby
<Coolhand> I know this might be a rails thing but I figured this channel might be appropriate
Krajsnick has quit [Remote host closed the connection]
darren__ has joined #ruby
<Coolhand> I did the bundle install after loading the gem, but email address still don't get validated
savage- has joined #ruby
savage- has quit [Remote host closed the connection]
savage- has joined #ruby
<ksk> sorry for asking all that newbie questions, but.. how to use a variable inside some "{|foo| foo == "#{var}" }" construct? (i just placed var there instead of $string, but it does not work..)
benson has joined #ruby
joephelius has quit [Quit: brb]
tenseiten has quit [Ping timeout: 272 seconds]
<shevy> ksk can you show the whole code you try to test
<shevy> foo = "hello"; puts "#{foo} world"
<shevy> would work
<matti> Coolhand: #rubyonrails
davidcelis has joined #ruby
<ksk> yap.. gimme a second :)
tiripamwe has quit [Ping timeout: 260 seconds]
<Coolhand> matti: thanks
ananthakumaran has quit [Quit: Leaving.]
zai has quit [Quit: Leaving]
davidcelis_ has joined #ruby
davidcelis has quit [Read error: Connection reset by peer]
davidcelis_ is now known as davidcelis
davidcelis has quit [Changing host]
davidcelis has joined #ruby
<Mon_Ouie> ksk: Also explain how it "doesn't work"
<ksk> http://paste.debian.net/183686/ -- it works as exptected if i replace ""#{var}"" with "2" (without ")
<davidcelis> so many quotes
<ksk> they are bad using ruby? :P
seitensei has joined #ruby
<davidcelis> puts "ich putte ""#{var}"
<davidcelis> that's invalid syntax
peterhellberg has quit [Remote host closed the connection]
Wilhelm__ has joined #ruby
<ksk> forget about line 6 then
Wilhelm_ has quit [Ping timeout: 244 seconds]
<Mon_Ouie> It's not invalid
<davidcelis> wtf why isnt that invalid
<davidcelis> fuck ruby
<Mon_Ouie> Not how people would normally write it, but not invalid
<Mon_Ouie> "foo" "bar" is "foobar"
Criztian has joined #ruby
<Mon_Ouie> (only with string literals, possibly using interpolation)
zodiak has quit [Read error: No route to host]
ackz has quit [Quit: Leaving.]
hynkle has quit [Ping timeout: 244 seconds]
<Mon_Ouie> ksk: "#{var}" is just a weird-looking way to write var.to_s
Criztian has quit [Remote host closed the connection]
<heftig> Mon_Ouie: it has more use in C where constants are usually preprocessed
<heftig> so you can write "foo" CONSTANT "bar"
flype has joined #ruby
<heftig> obviously, that won't work in ruby
<Mon_Ouie> And since that's a string anyway, it can't be equal to an integer, which is what your array contains
luckyruby has quit [Remote host closed the connection]
<Mon_Ouie> puts i
<matti> ksk: Your code generally confuses the concept of strings and integers etc.
<matti> Mon_Ouie: Sure, but this is more to give the idea.
<ksk> matti: that last statement solved my issue, thx!
havenn has quit [Remote host closed the connection]
<ksk> im used to do bash and just give a ... about strings and integers etc...
<ksk> thanks everone!
<matti> Well.
<matti> Wlecome to the real world.
<matti> Fuck bash.
<matti> ;]
hynkle has joined #ruby
<heftig> shellscripts are nice for ad-hoc automation, but terribly unreliable
GoGoGarrett has quit [Remote host closed the connection]
<eam> amusingly enough, "" is a number in C
t21045 has quit [Remote host closed the connection]
<matti> heftig: People can't even write bash scripts.
tayy has joined #ruby
johnlcox has joined #ruby
<eam> and can be compared with integers
t5613 has joined #ruby
<heftig> eam: pointer, not number
syamajala has joined #ruby
<eam> heftig: pointers are numbers
zodiak has joined #ruby
<eam> integral to C is the concept of pointer math :)
<matti> eam: IIRC gcc will give you "warning: assignment makes integer from pointer without a cast"
<matti> eam: If you do it.
<eam> matti: sure, as well as between other numeric types
<matti> :)
<arietis> is there any sheet with ruby operators etc?
<eam> that has no bearing on a pointer being a numeric type :)
chussenot has quit [Quit: chussenot]
<matti> arietis: Google dude!
<arietis> nooo
nicoulaj has quit [Read error: Connection reset by peer]
<matti> arietis: There is FUCK loads of things in the network.
<arietis> i wanna know your opinion
<arietis> :D
<matti> I am not sharing ;p
<matti> Go Google ;p
<arietis> leecher!
<arietis> :D
<matti> Me?!
<matti> Pff
* matti stabs arietis
<eam> hey so, serious question re: arietis's question
mikewintermute has quit [Quit: mikewintermute]
<eam> one thing I *really* like about perl is the detailed documentation of its internals, including common useage forms and tables of things like operators
<eam> is there anything like that for ruby?
<matti> eam: It calls for a legit use of "Let me Google that for you"
<eam> eg similar to perldoc perlop
johnlcox has quit [Ping timeout: 248 seconds]
<matti> Perl.
<matti> On #ruby
<matti> ;p
<matti> What next? PHP.
<matti> It also has decent documentation.
<eam> matti: I'm asking if ruby has anything similar
<matti> I know :)
<matti> Sorry.
<matti> eam: IIRC, not in one decently organised place, sadly.
<eam> honestly, I use perldoc for ruby functions as they're often the same
<shevy> lol
joshman_ has joined #ruby
<arietis> wonder if it's same for 1.9.3
<shevy> eam, I ended up collecting my own examples for ruby
flagg0204 has quit [Quit: leaving]
senny has quit [Remote host closed the connection]
<theRoUS> ruby 1.8.7. is there any way for a module's self#included method (or other hook) to pick and choose what gets inherited? e.g., pass along *some* constants but not others?
Krajsnick has joined #ruby
<theRoUS> likewise for a class' #inherited method?
pen has quit [Read error: Connection reset by peer]
nXqd has quit [Ping timeout: 256 seconds]
pen has joined #ruby
flagg0204 has joined #ruby
adeponte has joined #ruby
havenn has joined #ruby
_adeponte has joined #ruby
mahmoudimus has joined #ruby
havenn has quit [Remote host closed the connection]
QKO_ has joined #ruby
<arietis> so ruby have almost same syntax as objective-c as i can see
<theRoUS> it kinda looks like Module#append_features might be an approach, but it specifically says it's for module inclusion in other *modules*, not classes. it also doesn't describe how to hook into the 'add the constants, methods, and module variables of this module' process to pass along (or not) definitions
adeponte has quit [Ping timeout: 244 seconds]
jrajav has quit [Quit: The best darkness is strange and surprising]
<arietis> except that ruby takes less lines of code
* arietis wonders why ruby isn't mainstream yet
<eam> objc's memory management is much more similar to perl
<nedbat> arietis: obj-c is only mainstream b/c people want to build iOS apps.
<arietis> but people can build iOS apps with ruby
johnb003 has quit [Ping timeout: 248 seconds]
johnb003 has joined #ruby
pdtpatrick has joined #ruby
<nedbat> arietis: but Apple tells them to use obj-c.
<arietis> there is rubymotion
<matti> eam: To Perl?
<eam> matti: yeah, both are reference counted
qko has quit [Ping timeout: 268 seconds]
<nedbat> arietis: it makes a huge difference to have a large corporation encouraging language use. Why do you think Java and C# are so popular?
<JonnieCache> arietis: its mostly problems with the interpreter. A its slow and B it aint great on windows
<eam> which has significant advantages in that problem space, imo
Krajsnick has quit [Remote host closed the connection]
Criztian has joined #ruby
<matti> eam: In that regards yes, but then both have different semantics. Perl is very greedy, so is Ruby when it goes to MM.
<eam> greedy how so?
<matti> eam: Ruby and Perl will grow its heap re-using it (whatever size it came to) for new objects.
<matti> eam: This is so much pain.
timonv has quit [Remote host closed the connection]
sepp2k has quit [Ping timeout: 246 seconds]
<arietis> nedbat: java is so popular since it's cross-platform
<matti> eam: There is an excellent blog post about this floating.
ringotwo has joined #ruby
<eam> ah, you mean there's no release back to the system. yes
<matti> eam: Yes.
<matti> eam: Perl and Ruby VM were designed for hit-and-run -- so to speak -- things (meaning: not lasting very long).
<nedbat> arietis: and because Sun had full-time employees dedicated to building it and promoting it.
<arietis> nedbat: and C# is main language for this evil creation called windows
<eam> mmm, I'm not sure I agree
<nedbat> arietis: and Microsoft has full-time employees dedicated to building and promoting C#
<matti> eam: :)
cantonic has quit [Quit: cantonic]
chrisbolton has joined #ruby
<eam> matti: slab allocation and never unallocating is not the same as leaking memory
<matti> eam: Sure.
brianpWins has joined #ruby
<eam> I've had trouble with ruby due to the *ahem* heuristics applied but in perl it's very easy to make a stable long-term process
<matti> :)
<eam> to be fair, most of the trouble I've had in ruby are side effects which the gc was unaware of
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<nedbat> arietis: you can build Windows programs in Ruby, so why is C# so popular for it?
Wilhelm__ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
t5613 has quit [Remote host closed the connection]
havenn has joined #ruby
t22906 has joined #ruby
pdtpatrick has quit [Read error: Operation timed out]
pdtpatrick has joined #ruby
ephemerian has quit [Quit: Leaving.]
FuXi has quit [Ping timeout: 252 seconds]
resure has joined #ruby
<shevy> C# is dwindling
havenn has quit [Remote host closed the connection]
<shevy> ruby will eventually take perl down one rank :>
<asteve> so yamammal = YAML::dump(hash); yamammal['will_this_work'] = true; changes "will_this_work" to "true"; I want to change the value of "will_this_work" to "true"
<asteve> how?
vlad_starkov has joined #ruby
pdtpatrick has quit [Ping timeout: 265 seconds]
johnb003 has quit [Ping timeout: 246 seconds]
havenn has joined #ruby
verto|off is now known as verto
<canton7> hash['will_this_work'] = true; yamammal_updated = YAML::dump(hash)
<davidcelis> yamammal
<Muz> davidcelis: haha.
<Muz> asteve: do you want to change the value of "will_this_work" to be true, or do you want the key "will_this_work" to become "true"? Your question and approach is confusing.
<asteve> Muz: I want to change the value of "will_this_work"
<Muz> Do as canton7 suggested then, change it in the hash, then re-dump it as a YAML object.
johnb003_ has joined #ruby
<asteve> i no longer have access to the original hash; i assume I'll have to YAML::load, change the value and then YAML::dump again
syamajala has quit [Remote host closed the connection]
Krajsnick has joined #ruby
himsin has joined #ruby
sepp2k has joined #ruby
<theRoUS> does anyone know how to use Module#included, Module##append_features, and/or Class#inherited to *limit* what gets inherited?
<canton7> asteve, cool, yeah that's the right thing to do
<canton7> changing the yaml directly would require writing a yaml parser, and you might as well just use the built-in one
tk_ has quit [Quit: ばいばい]
<asteve> it's interesting that I can change the name of the key though
<canton7> hmm?
mrsolo has joined #ruby
havenn has quit [Remote host closed the connection]
<asteve> yamammal['key'] = "new_key_name"
khakimov has joined #ruby
c0rn_ has joined #ruby
<canton7> that's because String#[]= does a search and replace. Don't rely on this behaviour for yaml. Ex: s = YAML::dump('one' => 'two', 'three' => 'four'); s['two'] = 'new_two'; p YAML::load(s)
luxurymode has quit [Quit: Computer has gone to sleep.]
bier has quit [Ping timeout: 252 seconds]
apok has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
MarGarina has quit [Ping timeout: 244 seconds]
rakunHo has joined #ruby
lurch_ has quit [Quit: lurch_]
Criztian has quit [Remote host closed the connection]
Criztian has joined #ruby
cirwin has joined #ruby
brasten has quit [Quit: brasten]
<canton7> oops, s = YAML::dump('one' => 'two', 'two' => 'three')
haxrbyte has joined #ruby
opus has joined #ruby
brasten has joined #ruby
haxrbyte has quit [Remote host closed the connection]
tatsuya_o has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
chichou has quit [Remote host closed the connection]
chichou has joined #ruby
urbann has joined #ruby
TorpedoSkyline has joined #ruby
Eldariof-ru has joined #ruby
haxrbyte_ has quit [Ping timeout: 246 seconds]
yonggu has joined #ruby
wallerdev has joined #ruby
chichou has quit [Ping timeout: 260 seconds]
alvaro_o has joined #ruby
erichmenge has joined #ruby
kenichi has joined #ruby
bier has joined #ruby
apok has quit [Remote host closed the connection]
baphled has quit [Ping timeout: 240 seconds]
apok has joined #ruby
bricker88 has joined #ruby
<bricker88> Hey there, is there an advantage to using "ensure", rather than just putting the code I want executed after the begin/rescue/end block? Besides it just being a little more clear.
macer_ is now known as macer1
geekbri has quit [Remote host closed the connection]
indian has quit [Ping timeout: 252 seconds]
<cirwin> bricker88: ensure will handle throws as well as raises, and early returns, and exceptions that aren't StandardError
pdtpatrick has joined #ruby
geekbri has joined #ruby
geekbri has quit [Read error: Connection reset by peer]
sneakyness_wk has joined #ruby
geggam has joined #ruby
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
GoGoGarrett has joined #ruby
geekbri has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
geekbri has quit [Read error: Connection reset by peer]
invsblduck has joined #ruby
geekbri has joined #ruby
adamkittelson has joined #ruby
geekbri has quit [Read error: Connection reset by peer]
Krajsnick has quit [Remote host closed the connection]
geekbri has joined #ruby
geekbri has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 245 seconds]
macer1 has quit [Changing host]
macer1 has joined #ruby
geekbri has joined #ruby
geekbri_ has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<doherty> How can I construct pathnames in a cross-platform manner?
geekbri_ has quit [Read error: Connection reset by peer]
geekbri has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
fayimora has joined #ruby
opus has quit [Quit:]
geekbri has joined #ruby
<canton7> doherty, File.join
v0n has joined #ruby
carloslopes has joined #ruby
joephelius has joined #ruby
geekbri_ has joined #ruby
rcassidy has joined #ruby
eikko has joined #ruby
katherinem13 has quit [Ping timeout: 252 seconds]
<doherty> canton7: Thanks. What can I use instead of '/' for the root?
<eam> not all systems have a concept of a root
<rcassidy> >> p "ping"
<al2o3cr> (String) "ping", Console: "ping"
<canton7> yeah, the question doesn't really make sense. In a windows system, you have to give a specific drive, etc
<doherty> Yes, there should be a way to handle that as well :)
opus has joined #ruby
geekbri has quit [Ping timeout: 246 seconds]
<canton7> it's not an issue that can be solved automatically, as it requires extra information
geekbri has joined #ruby
<otters> wow, Lua went down six spots
<canton7> File.absolute_path or File.expand_path might be what you're after though
williamcotton has joined #ruby
<doherty> I know. There should be a way to set which drive to use, and then you can use join etc to build paths within that drive. On unixes, the drive letter would simply be ignored.
korczis has quit [Read error: Operation timed out]
<doherty> But I'm not /sure/ that we need to support Windows, so I can make do for now
xaq has joined #ruby
korczis has joined #ruby
<canton7> surely if yu're building absolute paths from the bottom up, you need to know more cross-platform differences than just the root/drive letter?
geekbri__ has joined #ruby
geekbri_ has quit [Ping timeout: 246 seconds]
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
fayimora has quit [Ping timeout: 256 seconds]
elaptics is now known as elaptics`away
<canton7> For example, there's no point being able to say File.join(File.drive_letter, 'Program Files', 'Program') when *nix doesn't have the 'Program Files' convention
elaptics`away is now known as elaptics
<doherty> yes, of course
<canton7> so that sort of things has to be, surely, user-configurable.... and which point you might as well include the drive letter in that configuration value
<canton7> s/things/thing
<canton7> unless there's some use-case I simply haven't thought of :P
Stalkr_ has joined #ruby
<nedbat> doherty: you aren't supporting windows, but you need to abstract away "/" as root?
<theRoUS> moving sideways.. if i have an instance of SOAP::RPC::Driver, how do i cleanly 'close it down' ?
geekbri has quit [Ping timeout: 246 seconds]
<doherty> I don't know if I need to or not yet.
geekbri_ has joined #ruby
katherinem13 has joined #ruby
jimeh3 has quit [Ping timeout: 248 seconds]
<canton7> doherty, have you got an example of when you might need the hypothetical method File.drive_letter ?
Bosma has joined #ruby
<nedbat> doherty: maybe you could describe more what these paths are for, and what you know about them?
voodoofish430 has joined #ruby
riley526 has joined #ruby
dtribble has joined #ruby
velikasha has joined #ruby
velikasha has left #ruby [#ruby]
geekbri__ has quit [Ping timeout: 246 seconds]
geekbri has joined #ruby
greenysan has joined #ruby
kidoz has joined #ruby
Progster has quit [Ping timeout: 240 seconds]
jbw has quit [Ping timeout: 252 seconds]
TPFC-SYSTEM has joined #ruby
_JamieD_ has joined #ruby
geekbri_ has quit [Read error: Connection reset by peer]
greenysan has quit [Client Quit]
Doc_X has joined #ruby
ctp has joined #ruby
clocKwize has quit [Quit: clocKwize]
flype has quit [Quit: Computer has gone to sleep.]
<arietis> "nedbat: arietis: you can build Windows programs in Ruby, so why is C# so popular for it?" same reason why windows is so popular
<arietis> 95% of people are idiots
answer_42 has joined #ruby
<arietis> why ruby has no increment operator?
<arietis> or am i missing something?
<nedbat> arietis: i'm not sure why you are overlooking the effect of Microsoft pushing C#, working hard to make it work really well for windows, etc.
<arietis> oh, found explanation
<nedbat> arietis: x += 1
<canton7> plus the fact that ruby is a RAM hog, and I don't fancy having multiple ruby apps on the go at once :P
zii has joined #ruby
lkba has quit [Ping timeout: 272 seconds]
<doherty> if I have a string, how can I invoke a method by that name?
<canton7> doherty, #send
<canton7> or perhaps #method
mneorr has joined #ruby
Progster has joined #ruby
k_89 has joined #ruby
flak has joined #ruby
flak is now known as Guest73564
maletor has joined #ruby
Guest49752 is now known as Jackneill
Jackneill has quit [Changing host]
Jackneill has joined #ruby
Progster has quit [Client Quit]
emmanuelux has joined #ruby
cakehero has joined #ruby
resure has quit [Ping timeout: 260 seconds]
maletor has quit [Read error: Connection reset by peer]
Progster has joined #ruby
* doherty RTFMs
rippa has quit [Ping timeout: 244 seconds]
t22906 has quit [Remote host closed the connection]
t5085 has joined #ruby
Guedes has quit [Read error: Connection reset by peer]
jbw has joined #ruby
jimeh3 has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
mrsolo has quit [Quit: This computer has gone to sleep]
bluOxigen has joined #ruby
shadoi has left #ruby [#ruby]
shadoi has joined #ruby
havenn has joined #ruby
maxmmurphy has joined #ruby
jrist is now known as jrist-afk
katherinem13 has quit [Ping timeout: 252 seconds]
geekbri has quit [Remote host closed the connection]
geekbri has joined #ruby
mrsolo has joined #ruby
resure has joined #ruby
cbuxton has joined #ruby
tayy has quit [Remote host closed the connection]
emmanuelux has quit [Quit: emmanuelux]
elaptics is now known as elaptics`away
quest88 has joined #ruby
katherinem13 has joined #ruby
Russell^^ has joined #ruby
ConstantineXVI has quit [Ping timeout: 245 seconds]
emmanuelux has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
ConstantineXVI has joined #ruby
arooni-mobile has quit [Ping timeout: 246 seconds]
geekbri has quit [Remote host closed the connection]
TPFC-SYSTEM has left #ruby [#ruby]
berserkr has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Eplemosen has quit [Quit: NOPE]
TPFC-SYSTEM has joined #ruby
geekbri has joined #ruby
tatsuya_o has joined #ruby
qko has joined #ruby
maletor has joined #ruby
qwerxy has quit [Quit: offski]
niklasb has joined #ruby
Guest73564 is now known as rippa
alexwh has quit [Quit: Quitting]
QKO_ has quit [Ping timeout: 245 seconds]
graspee has joined #ruby
tatsuya_o has quit [Ping timeout: 246 seconds]
iamjarvo has joined #ruby
alexwh has joined #ruby
alexwh has left #ruby [#ruby]
mohits has quit [Ping timeout: 244 seconds]
luxurymode has joined #ruby
alexwh has joined #ruby
mmokrysz has joined #ruby
mengu has joined #ruby
BrokenCog has quit [Ping timeout: 268 seconds]
eywu has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
eywu has quit [Client Quit]
eywu has joined #ruby
mmokrysz has left #ruby [#ruby]
urbann_ has joined #ruby
ph^ has joined #ruby
dpk has joined #ruby
iamlacroix has quit [Remote host closed the connection]
urbann has quit [Ping timeout: 245 seconds]
zz_chrismcg is now known as chrismcg
paradoja has joined #ruby
codeFiend has joined #ruby
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ruby
fayimora has joined #ruby
resure has quit [Remote host closed the connection]
alexwh has quit [Quit: Quitting]
<shevy> doherty object.send :name_of_method_to_invoke
maletor has quit [Ping timeout: 244 seconds]
<shevy> or via method(:name), I think you then have to use .call on it though
flype has joined #ruby
<doherty> Yes, you're right
bbttxu has joined #ruby
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
mneorr has quit [Quit: Leaving.]
alexwh has joined #ruby
luxurymode has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
luxurymode has joined #ruby
luxurymode has quit [Client Quit]
tayy has joined #ruby
korczis has quit [Ping timeout: 252 seconds]
lolzie has joined #ruby
luckman212 has joined #ruby
jonatha__ has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
alek_b_ has joined #ruby
korczis has joined #ruby
hadees has quit [Quit: hadees]
joephelius has quit [Read error: Connection reset by peer]
strcrzy_ has joined #ruby
ciopte7 has joined #ruby
joephelius has joined #ruby
fasta_ has joined #ruby
jgarvey has joined #ruby
mrsolo has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
resure has joined #ruby
Xethron_ has joined #ruby
nedbat has quit [Ping timeout: 245 seconds]
nuba_ has joined #ruby
jeffnapp1 has joined #ruby
nullsign has joined #ruby
EddieS has joined #ruby
pferdefl1isch has joined #ruby
d3vic3_ has joined #ruby
rmc3 has joined #ruby
cjk101010_ has joined #ruby
elliottc1ble has joined #ruby
EddieS is now known as Guest55732
c0rn__ has joined #ruby
wereHams1er has joined #ruby
elspeth_ has joined #ruby
m_3_ has joined #ruby
internet_user has joined #ruby
opus__ has joined #ruby
ozzloy_ has joined #ruby
drmegahe1tz has joined #ruby
tomsthumb_ has joined #ruby
fermion has quit [Quit: P]
Lachryma` has joined #ruby
korczis has quit [Ping timeout: 268 seconds]
luxurymode has joined #ruby
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ianbrandt_ has joined #ruby
<luxurymode> man, i feel like everything is sucking up so much memory on my mac. i feel like i need a lighter weight editor. worth it to switch to vim? im currently using sublime text 2
trollface has joined #ruby
<sphera> vim is always worth it
Apocalyp- has joined #ruby
rails- has joined #ruby
SirFunk_ has joined #ruby
pradeept` has joined #ruby
Lachryma has quit [Ping timeout: 246 seconds]
korczis has joined #ruby
berserkr has quit [*.net *.split]
opus has quit [*.net *.split]
luckman212_ has quit [*.net *.split]
ianbrandt has quit [*.net *.split]
d3vic3 has quit [*.net *.split]
omry has quit [*.net *.split]
Jackneill has quit [*.net *.split]
jcooley has quit [*.net *.split]
jonathanwallace has quit [*.net *.split]
gogiel has quit [*.net *.split]
cool has quit [*.net *.split]
rmc3_ has quit [*.net *.split]
pferdefleisch has quit [*.net *.split]
elspeth has quit [*.net *.split]
wereHamster has quit [*.net *.split]
jeffnappi has quit [*.net *.split]
rails has quit [*.net *.split]
alek_b has quit [*.net *.split]
Apocalypse has quit [*.net *.split]
m_3 has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
cespare has quit [*.net *.split]
SirFunk has quit [*.net *.split]
Paradox has quit [*.net *.split]
rking has quit [*.net *.split]
nat2610 has quit [*.net *.split]
Taranis has quit [*.net *.split]
clop has quit [*.net *.split]
Xethron has quit [*.net *.split]
nuba has quit [*.net *.split]
drmegahertz has quit [*.net *.split]
DefV has quit [*.net *.split]
strcrzy has quit [*.net *.split]
ozzloy has quit [*.net *.split]
pradeepto has quit [*.net *.split]
Guest18939 has quit [*.net *.split]
nullsign_ has quit [*.net *.split]
c0rn has quit [*.net *.split]
elliottcable has quit [*.net *.split]
fasta has quit [*.net *.split]
c0rn_ is now known as c0rn
opus__ is now known as opus
ianbrandt_ is now known as ianbrandt
Apocalyp- is now known as Apocalypse
t5085 has quit [Write error: Broken pipe]
Apocalypse has quit [Changing host]
Apocalypse has joined #ruby
t83259 has joined #ruby
DefV has joined #ruby
<shevy> vim sucks
<shevy> but it'll sure be lighter than sublime
erichmenge has quit [Quit: Be back later]
<codeFiend> shevy: you take that back
<shevy> sounds odd though, I am using geany and bluefish mostly, and while they aren't as fast as vim, I dont have too much complaints about the speed luxurymode
<codeFiend> VIM IS A SAINT
<shevy> codeFiend I can't :) vim vs. emacs is the eternal battle where only one thing is sure - there are two losers!
<codeFiend> hehehehe
<luxurymode> geany and bluefish?
<luxurymode> im just concerned that my productivity is going to go way down while i get up to speed with vim
<shevy> luxurymode, yeah. bluefish out of tradition, no longer because I love it so much. geany because I hope that the guys can get momentum (but does not look soooo much for it)
<luxurymode> so theres never a good time to do that
<shevy> it will!
<shevy> you need to have your brain work in vim-mode
<shevy> and I gave up. my brain is too lazy for mastering vim
<shevy> I rather use the time to get better at ruby
<lolzie> hi guys, I'm. learning ruby (and rails) - I can't think of anything to code tho! how can I inspire myself?!
<canton7> make a url shortener. that seems to be a common starting project
krz has joined #ruby
<lolzie> but that's so boring and easy! and the problem is already way too defined
lkba has joined #ruby
<luxurymode> shevy, doubtful that bluefish will use less memory than sublime text 2
<lolzie> I've got chronic coders block, outside of work it has lasted months
<shevy> lolzie what worked for me was that I wanted to solve problems I have
<shevy> once you start to say "I wanna do this, or solve that", you'll never run out of ideas
nat2610 has joined #ruby
Juul has joined #ruby
omry has joined #ruby
hadees has joined #ruby
<lolzie> I've been looking for problems but not really getting anything that's computationally feasible
jcooley has joined #ruby
cespare has joined #ruby
Squarepy has quit [Quit: Leaving]
blast_hardcheese has quit [Excess Flood]
<lolzie> 6 years ago when I was a lil kid programmer I always had stuff to code.. somehow
<Sou|cutter> lolzie: how about a rails app that tracks your coders block?
<wmoxam> so now yer a big kid coder?
<wmoxam> ;)
clop has joined #ruby
<lolzie> I'm an adult coder - scratch that, just adult - wish I actually was coding!
<shevy> lolzie, well another way that works is stick to a project that can grow
<Sou|cutter> lolzie: I think we all get in a rut sometimes and can't see problems that we're able to address because we become accustomed to dealing with them
<shevy> my oldest projects are now about 6 years old and I still maintain or tweak at them
rking has joined #ruby
<shevy> lolzie start writing and publishing small gems that solve something
<Sou|cutter> try to think of something that is currently annoying you, and then go from there
kirun has joined #ruby
berserkr has joined #ruby
<doherty> lolzie: Make me an artificial intelligence that does what I want, not what I say.
<doherty> stupid computers -_-
<shevy> that would be cool
jarred has joined #ruby
<shevy> artificial intelligence that could REALLY learn
havenn has quit [Remote host closed the connection]
doherty has quit [Quit: Leaving]
bluOxigen has quit [Ping timeout: 265 seconds]
cakehero has quit [Quit: Leaving...]
ozzloy_ is now known as ozzloy
bluOxigen has joined #ruby
<Beoran__> shevy, they already made something liket hat back in the 70ies, but it was limited to a virtual universe of 3d shapes
Tyler__ is now known as tfitts
<arietis> there is no point to make AI actually
ozzloy has quit [Changing host]
ozzloy has joined #ruby
<shevy> Beoran__, hmm I once read one book... about AI ..
<shevy> the whole field of neural network, and it does not progress at all
<shevy> of course the robots can calculate every shit, but they are not really "clever" :(
Jackneill has joined #ruby
<lolzie> we just need quantum computers and we can do as many dumb computations as needed to create something smart
michael2572 has quit [Quit: This computer has gone to sleep]
Jackneill is now known as Guest23734
<arietis> neural nwtwork is attempt to crete model of human brain, instead it could be more profitable to use brain as model and create interface representing it in viewable form
<Beoran__> wel, the problems is that A) current CPU's are still not as powerful as the huan brain and B) the structure of CPU's is very unliket he neural network in our brains
<Beoran__> it would be best to make a hardware neural network
<shevy> see, then we could need another CPU structure, and a new programming language suited for that CPU structure, just anything that makes them be able to self-learn new things
<Beoran__> IBM is working on that IIRC
<cirwin> they already succeeded making a meatware one
<arietis> meatware sounds nice
pen has quit [Remote host closed the connection]
<Beoran__> cirwin, a rat brain cel one?
<cirwin> that's the one
<arietis> yeah, this one is better approach
<Beoran__> sounds risky, living things exhibit wil to power, it wil ll want to dominate us.
<cirwin> :)
<Beoran__> better in silicon
<arietis> aliens were from silicon
fantazo has joined #ruby
<Beoran__> I mean, fully under our control . Chips are still designed fully by humans (with help of computer tools, but stll)
<Beoran__> cells come with billion years of evolutionary data in their DNa that wa don't fully understand
<Beoran__> and they are alive
<sphera> Depends on what you mean by 'alive'.
<sphera> I'm just gonna step back from that cliff, though.
<Beoran__> I think we can all agree that a silicon chip isn ot alive, even if we give it a neural network structure
tayy has quit [Remote host closed the connection]
<lolzie> I don't necessarily agree
<lolzie> why does material matter, that's like being racist
<lolzie> you material..ist
revans has joined #ruby
<Beoran__> lolzie, hah
<Beoran__> yeahn, I'm carbonist
<shevy> I am an energist
<Beoran__> can't help it i'm made of it
<shevy> but you can convert energy to matter, no?
<sphera> I'm a matterist.
blast_hardcheese has joined #ruby
<Beoran__> I will dicsiminate agains silicon. Sillicon should foever be the slave of carbon.
<shevy> silicon kinda is, it is not as flexible as carbon
fastcache has joined #ruby
<sphera> All lower elements serve hydrogen, king of the periodic table at #1. Nice try, 6.
<shevy> lol
<Beoran__> ah, but I am also made of water
<Beoran__> plenty of sllicon, oxygen, etc in me
<sphera> That access is being revoked as we speak, dissenter
kenneth has joined #ruby
<Beoran__> I mean hydrogen, oxygen, nitrogen, etc
<sphera> no hydrogen for you!
<kenneth> hey there
<kenneth> i know you can do something like first, second = string.split(something)
<Beoran__> kenichi, yup
<kenneth> but can you do something like head, rest = string.split(something)
<shevy> "While unsaturated compounds for carbon (i.e., alkenes and alkynes) are common, the analogous silicon compounds (disilenes) were only reported in 1981, and disilynes in 2004." carbon bonds really give much more options than silicon bonds, which was one reason these were discovered not so quickly
<shevy> kenneth, depends on what this returns
eywu has quit [Quit: Leaving.]
<shevy> head, rest = "abc : def".split(":") # => ["abc ", " def"]
<shevy> head is "abc" and rest is "def"
t83259 has quit [Remote host closed the connection]
<kenneth> basically, i have a string that has a certain thing it needs to be split by, bu i only want to split the first bit out, and get the rest as a string, even if it contains more of the splitting string
<shevy> head, rest = "abc : def : hij".split(":") # => ["abc ", " def ", " hij"]
t74704 has joined #ruby
<shevy> head and rest are assigned, the last one is not, and is discarded
Taranis has joined #ruby
<shevy> well
<shevy> does it have to be one line?
<shevy> perhaps you can try via *
<kenneth> say i have: head, body = "hhello\x02world\x02third".split("\x02") and i want head to be hello and body to be world\x02third -- is there a way of doing that elegantly?
<sphera> kenneth: str = '1 2 3 4 5'; head, *rest = str.split(); head #=> "1" rest #=> ["2", "3", "4", "5"]
<kenneth> i could just split and join too but that's less pretty
<shevy> head, *rest = "abc : def : hij".split(":") # => ["abc ", " def ", " hij"]
<shevy> yeah
<canton7> kenneth, '1 2 3'.split(' ', 2)
<shevy> via *
<kenneth> oh neat
Markvilla has joined #ruby
<shevy> cool
<shevy> never saw .split(' ',2) before
<shevy> that actually is even better I think
revans has quit [Remote host closed the connection]
<canton7> unfortunately there's no way to do the opposite: '1 2 3'.split(' ', -2) => ['1 2', '3']
revans has joined #ruby
joephelius has quit [Ping timeout: 244 seconds]
Boffers has joined #ruby
sneakyness_wk has quit [Read error: Connection reset by peer]
scott_to_s has quit [Quit: scott_to_s]
joephelius has joined #ruby
<kenneth> that's awesome canton7! exactly what i was looking for
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
Bofu has quit [Ping timeout: 268 seconds]
<kenneth> this is why i love ruby
<kenneth> :)
<shevy> canton7, hmm
burgestrand has joined #ruby
<TTilus> .reverse.split(' ',2).reverse.map &:reverse
<TTilus> :)
<rcassidy> funny cos i was just looking this stuff up
multi_io has joined #ruby
<canton7> yeah, there are a number of workarounds. nothing particularly neat though
<TTilus> i know, its ugly
tos9 has joined #ruby
sneakyness_wk has joined #ruby
<kenneth> canton7: fortunately that's a less common use case
<rcassidy> partition / rpartition may also work
<canton7> even php's explode() supports a negative $limit parameter :P but hey ho
tos9 has left #ruby [#ruby]
<kenneth> canton7: php doesn't support head, body = syntax though
<canton7> list($head, $body) = ....
<multi_io> do you install system-wide gems as root? Or can one manage to use a special group (like "gem") for that and install as any member of that group?
<rcassidy> >> "helloXworldXthird".partition("X")
<al2o3cr> (Array) ["hello", "X", "worldXthird"]
<canton7> ugly, but still there :P
<kenneth> or i guess it does
<kenneth> huh
<geggam> nerds
<canton7> rcassidy, that's an interesting approach!
<rcassidy> >> "helloXworldXthird".rpartition("X")
<al2o3cr> (Array) ["helloXworld", "X", "third"]
tatsuya_o has joined #ruby
<rcassidy> i was literally just on the page for string operations lol, doing something similar
infinitiguy has quit [Ping timeout: 252 seconds]
<kenneth> so you could do head, _, body = string.partition("\x02"), interesting
<canton7> although this doesn't extend to more than 2, sadly
ph^ has quit [Remote host closed the connection]
admin__ has joined #ruby
s1n4 has joined #ruby
<multi_io> ...or do you use a special "ruby" user to install system-wide gems?
<kenneth> multi_io: personally i just chmod the gems folder liberally so that any user can run gem install on my personal machine
rburton- has joined #ruby
burgestrand has quit [Quit: Leaving.]
<kenneth> multi_io: and for production, everything is installed thru bundler
fastcache has quit [Ping timeout: 246 seconds]
<multi_io> kenneth: what user do you run bundler as?
Bosma has quit [Quit: leaving]
havenn has joined #ruby
ph^ has joined #ruby
elhu has joined #ruby
<kenneth> multi_io: i have a user dedicated to deploying things etc. called 'cb' (short for chartboost, the name of the company)
<kenneth> multi_io: all production servers are managed by salt, fwiw
<kenneth> used to use capistrano back in the day -- had to upgrade though
<canton7> I imagine, also, bundle install is run with --deployment, which means the gems are local anyway
xbob has quit [Quit: Leaving]
<kenneth> capistrano is great, but it doesn't scale to 200+ servers
<kenneth> canton7: yes
elhu has quit [Client Quit]
ilyam has joined #ruby
TheLZA has quit [Remote host closed the connection]
jrist-afk is now known as jrist
JustinCampbell has joined #ruby
infinitiguy has joined #ruby
<rcassidy> well, since #eventmachine and #thrift are both relatively dead,
Guest23734 has quit [Ping timeout: 252 seconds]
urbann_ has quit [Remote host closed the connection]
<rcassidy> anyone have experience using them both together?
mmokrysz has joined #ruby
mmokrysz has quit [Client Quit]
s1n4 has left #ruby ["leaving"]
_adeponte has quit [Remote host closed the connection]
manizzle has joined #ruby
snearch has quit [Quit: Verlassend]
geggam has quit [Ping timeout: 265 seconds]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
TheLZA has joined #ruby
TheLZA has quit [Client Quit]
<Synthead> is there a shorter way to do ( a ? a + ' ' : '' ) ?
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
<Synthead> (if the var is declared, return it with a space)
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
beneggett has joined #ruby
opus has quit [Ping timeout: 240 seconds]
<rcassidy> Synthead: everything i am coming up with ends up just as long
<multi_io> canton7, kenneth thanks for the --deplyment hint
GoGoGarrett has quit [Remote host closed the connection]
<multi_io> I'm a bundler noob :P
arturaz has joined #ruby
<Mon_Ouie> You mean if the variable is false or nil — it must be declared anyway
ilyam has quit [Quit: ilyam]
<Synthead> rcassidy: ah, ok. the var is[:a][:really][:nested][:hash], so it'd be nice to state it once
infinitiguy1 has joined #ruby
TorpedoSkyline has joined #ruby
<Synthead> rcassidy: but it doesn't really matter
obryan has joined #ruby
<rcassidy> hmm
<Mon_Ouie> That's what variables are for
<Mon_Ouie> var = that_expression_which_is_not_a_variable_but_a_method_call_chain
<Synthead> Mon_Ouie: hah, yeah
erichmenge has joined #ruby
<rcassidy> i mean
infinitiguy2 has joined #ruby
conor_ireland has joined #ruby
infinitiguy has quit [Read error: Connection reset by peer]
QKO_ has joined #ruby
<obryan> If I am making a web-api type service, but instead of returning data it's for inputting data, i am not using formbuilder or anything like that, so when i do params[] what would be the name of the symbol?
TheLZA has joined #ruby
<Mon_Ouie> Whatever you want the client to send presumably — if that's a Rails question, ask on #rubyonrails for more
infinitiguy1 has quit [Ping timeout: 244 seconds]
<obryan> basically i am calling the create action like say: http://localhost/api/create?name=bob&password=xxxx
<rcassidy> Synthead: the only other thing i thought of was a &&= a+' ' but that mutates a
<obryan> kk
bwlang has left #ruby [#ruby]
ezra has quit [Ping timeout: 276 seconds]
<Synthead> rcassidy: yeah. still states the var twice too. I was along the same lines, but decided against it when I realized &&+= didn't exist :)
<obryan> oh now i remember why
<obryan> i don't have voice in there :)
<obryan> hard to ask questions
qko has quit [Ping timeout: 248 seconds]
<kenneth> is '"hello"' not valid json?
<Mon_Ouie> No, objects sent through JSON must be either arrays or hashes
<Mon_Ouie> They can contain strings, though
<kenneth> really? interesting
<tommyvyo> obryan
<kenneth> i always thought that just a string or just a number was valid json
<tommyvyo> what are you using to build the api?
<tommyvyo> or the web service
<davidcelis> kenneth: values must be contained in an array or object
<tommyvyo> obryan: is it RACK based?
fbernier has quit [Ping timeout: 246 seconds]
answer_42 has quit [Ping timeout: 276 seconds]
Squarepy has joined #ruby
<eam> json has a bunch of data types beyond array, hash and string
sebicas has joined #ruby
<eam> boolean, various numeric types, null (nil)
<obryan> tommyvyo: it's a RAILS app so yeah it is
Speed has joined #ruby
<canton7> but the outermost object must be either an array or a hash
<canton7> '3' is not valid json. '[3]' is
<obryan> though i suppose I could write it in sinatra
urbann has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
h8R has joined #ruby
<tommyvyo> obryan join #orderdeck and i'll help you there, i dont want to clutter this chan with rails talk
aldodelgado has joined #ruby
Juul has quit [Ping timeout: 246 seconds]
bbttxu has quit [Quit: bbttxu]
<rcassidy> don't mean to spam, but has anyone used thrift/eventmachine together?
<kenichi> Beoran__: nick-completion fail earlier?
ciopte7 has quit [Quit: ciopte7]
<eam> canton7: interesting, where is that defined?
aldodelgado has quit [Quit: aldodelgado]
aldodelgado has joined #ruby
<Mon_Ouie> http://www.ietf.org/rfc/rfc4627.txt, beginning of section 2
fayimora has quit [Read error: Operation timed out]
<eam> ah
kryptek_ has joined #ruby
<eam> odd limitation. ruby's json module seems happy to generate invalid json it seems
<eam> eg 1.to_json
<Mon_Ouie> Object#to_json is defined so you can customize how to generate JSON for any kind of Object — it doesn't guarantee that what it returns is proper JSON by itself
<Mon_Ouie> JSON.parse however will choke on a string like '1'
<Mon_Ouie> Probably why kenneth asked his question
<eam> yeah
<eam> it's odd that it will emit but not consume, I mean
<eam> especially since the rfc explicitly says it may consume non-json
<eam> I don't like asymmetric serialization libraries
joephelius has quit [Ping timeout: 246 seconds]
geekbri has quit [Remote host closed the connection]
dpk has quit [Ping timeout: 244 seconds]
Phibs has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
korczis has quit [Ping timeout: 268 seconds]
<Phibs> I have this yaml in a variable: http://pastie.org/4495394, I want to add another key/value under 'paramters', can anyone tell me how ?
Bosox20051 has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
mbradford has joined #ruby
sebicas has quit [Quit: sebicas]
<eam> Phibs: append the string "\n k: v" -- that's with four spaces
tatsuya_o has joined #ruby
<Phibs> I was thinking of that, not a clener way to do it? :)
bwlang has joined #ruby
<eam> you could parse the yaml, modify the resulting structure, then re-serialize
korczis has joined #ruby
<Phibs> nod, what should I parse it to ?
<Phibs> (I'm ruby stupid, sorry :()
<eam> it will return a Hash
t74704 has quit [Remote host closed the connection]
fayimora has joined #ruby
t50144 has joined #ruby
<Phibs> just do my_hash = YAML::load( yaml_var ) ?
<eam> yes
jgarvey has quit [Quit: Leaving]
<Phibs> ok, modufy, then to_yaml again ?
<Phibs> er modify
<eam> yup
<Phibs> how would I modify to add a paramters k/v in a hash, again sorry, I come from perl and am just trying to fix puppet/foreman bug
opus has joined #ruby
paolooo has quit [Ping timeout: 245 seconds]
dpk has joined #ruby
<eam> Phibs: my_hash['k'] = 'v'
Beoran_ has joined #ruby
<Phibs> would it be my_hash['paramters']['key'] = 'v' ?
<eam> right sorry
<Phibs> thanks sir!
joshman_ has quit [Ping timeout: 246 seconds]
indian has joined #ruby
<Phibs> so yaml = my_hash.to_yaml works ?
<eam> you got it
joshman_ has joined #ruby
<multi_io> bundler question: can I install the required gems locally in vendor/ like the --deployment flag does, but without having a Gemfile.lock?
<Phibs> hermp
<eam> Phibs: irb is really useful for testing this kind of thing, if you're perhaps used to perl -de1
<Phibs> undefined method `[]=' for nil:NilClass
<enroxorz-work> alright, im at a loss with this. i have two seperate arrays i need to itterate through, both arrays are arrays of hashes. And there are a ton of hashes in each array. Here is what I have so far but I know there has to be another way. http://pastebin.com/rizhZ2C0
<multi_io> (I'd like to have the Gemfile.lock generated during the build, as happens when running bundler without --deployment)
korczis has quit [Ping timeout: 265 seconds]
<enroxorz-work> my algorithm sucks and i cant figure out what i can do
Beoran__ has quit [Ping timeout: 252 seconds]
specialGuest has joined #ruby
geggam has joined #ruby
Abbas5 has joined #ruby
specialGuest has quit [Changing host]
specialGuest has joined #ruby
<Abbas5> im trying to type an html input field into a string in my controller action class but as soon as i type "< ... it is automatically changed to "> ... how do i bypass this?
chichou has joined #ruby
<eam> Phibs: if you're accustomed to perl, 'pp' is very similar to Data::Dumper
<Phibs> ok
<eam> require 'pp'; pp my_hash, etc
<Phibs> I'm doing something wrong trying to modify the hash unfortunately
resure has quit [Ping timeout: 246 seconds]
haxrbyte has joined #ruby
Tref has joined #ruby
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
eywu has joined #ruby
haxrbyte_ has joined #ruby
luckman212 has quit [Read error: Connection reset by peer]
<asteve> does sqlite3 have a field that increments on write?
luckman212 has joined #ruby
<canton7> eam, I suspect it's more that so, say you have the structure {'a' => 1}, Object#to_json can serialize this by calling 'a'.to_json and 1.to_json
<canton7> asteve, iirc INTEGER PRIMARY KEY autoincrements
ezra has joined #ruby
happosade has joined #ruby
<asteve> canton7: yes, that increments for every new row but I'd like a counter for the row to be incremented
yxhuvud has quit [Ping timeout: 256 seconds]
luckman212_ has joined #ruby
<Phibs> eam: once in the hash, how would I add to this, syntax wise: http://pastie.org/4495644
<asteve> every time i write to the row I want the counter increased
<canton7> similarly, {'1' = MyCustomObject.new} can be serialize by calling '1'.to_json and MyCustomObject#to_json, although MyCustomObject#to_json's output isn't valid json just on its own
arturaz has quit [Remote host closed the connection]
<canton7> asteve, aha I see what you mean, my bad I didn't read it properly
pratyksp has quit [Ping timeout: 256 seconds]
<canton7> asteve, I suspect triggers might be capable, but I haven't tried it
haxrbyte has quit [Ping timeout: 246 seconds]
<asteve> triggers?
<asteve> i will search the goog for this "trigger"
ciopte7 has joined #ruby
syamajala has joined #ruby
tds has joined #ruby
<Phibs> eam: any clue what i'm doing wrong, has to be my hash syntax
<eam> Phibs: my_hash['parameters'] = {"owner_email" ...
<canton7> something like CREATE TRIGGER some_trigger_name UPDATE ON table_name BEGIN UPDATE table_name SET field = field + 1 WHERE id_field = old.id_field END;
<eam> your syntax looks fine
<eam> Phibs: try creating a hash in irb and playing around with it
luckman212 has quit [Ping timeout: 272 seconds]
aldodelgado has quit [Quit: aldodelgado]
adeponte has joined #ruby
<Phibs> :( kk
resure has joined #ruby
<multi_io> if I run bundle install --path vendor/bundle, how does the app at runtime know to look for gems in vendor/bundle? Does it need to call Bundler.require for that?
<cirwin> multi_io: bundle exec <foo>
<canton7> Phibs, output of: p my_hash['parameters'] ?
<Phibs> this is the whole hash, one sec: http://pastie.org/4495697
ChampS666 has joined #ruby
lurch_ has joined #ruby
allsystemsarego has quit [Quit: Leaving]
mike4_ has quit [Ping timeout: 276 seconds]
mike4__ has joined #ruby
fayimora has quit [Quit: Be back in a gifii]
<canton7> Phibs, so my_hash['parameters']['ey'] = 'value' should work fine
<Phibs> it doesn't :(
<canton7> s/ey/key
<canton7> what *exactly* are you trying?
<Phibs> my_hash['paramters']['real_env'] = "test"
<Phibs> undefined method `[]=' for nil:NilClass
<canton7> which means that my_hash['parameters'] is nil
<tds> yeah
elhu has joined #ruby
<tds> you have to do my_hash['parameters'] = {} first
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Phibs> canton7: but its not, I printed it
<tds> paste the output you get from 'p my_hash'
<canton7> Phibs, p my_hash['parameters'] ?
<tds> in a gist
<canton7> tds, he has. look up
<canton7> a
<canton7> couple of lines
<tds> oh oops
<canton7> grr sorry, cat on keyboard
<Phibs> lo
<Phibs> l
ezra has quit [Ping timeout: 276 seconds]
<tds> what you pasted is my_hash?
<tds> looks like there is no parameters key
<Phibs> http://pastie.org/4495697 = full hash
<canton7> there are two pasties: the first has the key
<canton7> not sure what the second
<canton7> is
<Phibs> http://pastie.org/4495718 = just paramters
<tds> thats bizzare
<Phibs> lol
<tds> are you misspelling the key?
<canton7> I strongly suspect you're referencing the wrong variable, or something equally simple
<canton7> or misspelling 'parameters'
<tds> that's the only possibility
<canton7> something of that order
<Phibs> hmm
<Phibs> wow
<Phibs> I was, fml
<tds> heh
<canton7> heh, every time :P
<Phibs> thanks guys/gals
<canton7> happens to use all
<asteve> canton7: thanks, I keep getting syntax errors even while following the sqlite page
shiftkey101 has joined #ruby
<canton7> asteve, sqlite version too old maybe?
<canton7> s/to use/to us/
<asteve> sqlite3 from rubygems
<canton7> that's only the wrapper iirc, not the actual library
t50144 has quit [Remote host closed the connection]
brianpWins has joined #ruby
lolzie has quit [Ping timeout: 245 seconds]
t48884 has joined #ruby
<tds> yeah
<tds> i don't think the binaries come with the gem
ezra has joined #ruby
<asteve> db.execute("CREATE TRIGGER recipe_count_trigger UPDATE OF updated_count ON recipe BEGIN UPDATE recipe SET updated_count = updated_count+1 WHERE id = old.id END;")
specialGuest has quit [Quit: WeeChat 0.3.8]
<canton7> so, that's saying when you update the updated_count field, the updated_count field gets increments?
<canton7> *incremented
tenderloaf has joined #ruby
tenderloaf has quit [Client Quit]
<asteve> yes, that is not what i want
<asteve> i figured i'd paste it and be ashamed; heh
TheLZA has quit [Ping timeout: 248 seconds]
<canton7> saying that, i'm also getting syntax errors when I try
<canton7> hmm
<canton7> aha
<canton7> semicolon before the final END
<asteve> removing the "OF fieldname" portion gives the same results
joephelius has joined #ruby
<canton7> CREATE TRIGGER test_trigger UPDATE ON table BEGIN UPDATE table SET field = field + 1 WHERE id = old.id; END; worked perfectly
mike4__ is now known as mike4_
<asteve> that did it
<asteve> strange, i didn't think I'd miss that
urbann has quit [Remote host closed the connection]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
verto is now known as verto|off
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
Lachryma` has quit [Quit: Leaving]
<shiftkey101> d
<canton7> e
MatthewGA has joined #ruby
burgestrand has joined #ruby
resure has quit [Remote host closed the connection]
<rcassidy> f?
opus has quit [Quit:]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
Eldariof-ru has quit []
<shiftkey101> yay getting a DoS from taiwan O_o
kenneth has quit [Quit: kenneth]
yoklov has quit [Quit: computer sleeping]
workmad3 has joined #ruby
sebicas has joined #ruby
sebicas has quit [Client Quit]
shiftkey101 has quit [Quit: Leaving]
nanderoo has quit [Quit: Leaving.]
Squarepy has quit [Quit: Leaving]
Eplemosen has joined #ruby
kenneth has joined #ruby
<multi_io> bundler question: can I get the "Bundler will not use gems already installed to your system, even if they exist" behaviour WITHOUT supplying the --deployment flag?
linoj has quit [Quit: linoj]
<multi_io> (I can't supply --deployment because I don't have a Gemfile.lock)
<multi_io> (I'm installing Redmine)
<burgestrand> multi_io: --path
<multi_io> burgestrand: ok, and that won't use system gems?
hoelzro|away is now known as hoelzro
<burgestrand> multi_io: try "bundle —help" :)
<burgestrand> … stupid text substitution.
<burgestrand> multi_io: "bundle help install" shows you all information about the installation command
opus has joined #ruby
<asteve> what's the name for the timestamp format that is YYYYMMDDHHmmss?
carloslopes has quit [Quit: Leaving.]
<multi_io> burgestrand: that says that new gems are installed in the --path, but it doesn't really say what it does when a required gem is already installed in the system...
macer1 has quit [Ping timeout: 245 seconds]
<burgestrand> multi_io: *shrugs* I’d just try it.
<burgestrand> See what happens, like.
ciopte7 has quit [Quit: ciopte7]
nedbat has joined #ruby
<shevy> asteve hmm conventional format?
BrokenCog has joined #ruby
<shevy> I myself use DD.MM.YYYY or ss.mm.hh DD.MM.YYYY
brdude has quit [Quit: brdude]
MatthewGA has quit [Read error: Connection reset by peer]
joephelius has quit [Ping timeout: 246 seconds]
gfontenot has quit []
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<canton7> asteve, doesn't appear to be an ISO8601 format: those have T between the date and time
<canton7> shevy, those are backwards :O
ChampS666 has quit []
<shevy> I love em!
<asteve> why backwards? then you can sort by the dates
specialGuest has joined #ruby
specialGuest has joined #ruby
specialGuest has quit [Changing host]
miho has quit [Quit: miho]
theRoUS has quit [Ping timeout: 265 seconds]
<canton7> yyyymmdd sorts properly, whereas ddmmyyyy doesn't. unless you've got some weird sorting algorithm
pdtpatrick has quit [Quit: pdtpatrick]
bbttxu has joined #ruby
<asteve> canton7: ya, that was the statement i was trying to make
<asteve> sometimes thoughts enter the brain and the fingers fuck them all up
<shevy> my brain sorts this
<shevy> but notice the .
<shevy> I would hate DDMMYYYY
<shevy> it makes me want to kill someone here
<asteve> anyway, how can I get YYYYMMDDhhmmss from Time?
<canton7> yeah, i was ommitting punctuatoin for brevity, but as far as sorting goes it makes of difference of course
riley526 has quit [Remote host closed the connection]
<canton7> asteve, #strftime
<shevy> I am going to omit punctuatoinination too
<canton7> oops, my fingers seem to be failing tonight too...
<shevy> Time.now.strftime '%H:%M:%S %d.%m.%Y' # => "23:10:36 15.08.2012"
<shevy> my format!!!
robbyoconnor has joined #ruby
<shevy> hmm
<canton7> you lie! you said "ss.mm.hh DD.MM.YYYY" earlier
<shevy> why does strftime require an argument? could it not have a default argument instead saying "return the most commonly time used"
<shevy> oh right
<shevy> ohhh odd
<shevy> I suppose I prefer... hh:mm:ss then... strange
<canton7> shevy, #to_s ?
<shevy> canton7 well I wondered whether ... you know
<canton7> yeah, I can imagine wanting to punch someone if they used ss.mm.hh in any code I went near
<shevy> you say the YYYYMMDDhhmmss format
<shevy> so I suppose it is some standard or something
<shevy> yeah, my brain was not thinking... it was in the kitchen
<asteve> seconds first? they be ratard
opus has quit [Quit:]
<canton7> shevy, YYYYMMDDThhmmss is iso8601 sans punctuation. full iso8601 is given by #iso8601
<cirwin> iso8601 is the bestest
<canton7> sorts properly, parses well, and is easily readable = win
<cirwin> maps exactly onto unix time too
<cirwin> though I guess all formats we actually use do..
admin__ has quit [Ping timeout: 248 seconds]
<shevy> argh iso
<shevy> that's the thing that kills zombies
fastcache has joined #ruby
<cirwin> did you mean uzi?
etank has quit [Ping timeout: 246 seconds]
<davidcelis> did you mean shotgun?
<shevy> no, uzi does not impress zombies much, but trying to understand iso makes their head explode
<cirwin> :)
cirwin has left #ruby [#ruby]
sailias has quit [Quit: Leaving.]
<shevy> I wonder if one day we would create organic bots that code like zombies
Tref has quit [Quit: Tref]
sailias has joined #ruby
conor_ireland has quit [Quit: conor_ireland]
<Gate> def braaaaiiiiins(organism)
kenneth has quit [Quit: kenneth]
<Gate> self.consume_brain(organism)
<Gate> end
conor_ireland has joined #ruby
<Gate> shevy: done.
<shevy> lol
<shevy> that's not very productive code!
tommyvyo has joined #ruby
linguini has joined #ruby
<Gate> meh, its just a convenience function.
drago757 has joined #ruby
andrewhl has quit [Remote host closed the connection]
walbert has joined #ruby
Bosma has joined #ruby
<RichieEvan> I was really surprised of how much ruby I knew coming from a javascript background. It's quit refreshing.
_JamieD_ has quit [Quit: _JamieD_]
<Gate> RichieEvan: ever use underscore.js?
<RichieEvan> Gate: I haven't yet
banister`sleep has joined #ruby
<Gate> RichieEvan: it helps expose the latent functional awesome JS is capable of.
joephelius has joined #ruby
<RichieEvan> oh wow I'll check it out
Juul has joined #ruby
<Gate> coming from ruby to js it is indespensible
kenneth has joined #ruby
Morkel has quit [Quit: Morkel]
dangerousdave has quit [Quit: Linkinus - http://linkinus.com]
<RichieEvan> nice!
Axsuul has joined #ruby
banisterfiend` has quit [Ping timeout: 265 seconds]
Criztian has quit []
kvirani has quit [Remote host closed the connection]
zeromodulus has quit [Read error: Connection reset by peer]
zeromodulus has joined #ruby
syamajala has quit [Remote host closed the connection]
k_89 has quit [Ping timeout: 246 seconds]
xaq has quit [Remote host closed the connection]
xaq has joined #ruby
<burgestrand> Gate, RichieEvan: You should check out sugar.js as well then.
<Gate> burgestrand: interesting, I hadn't heard of it (or if I had, I had forgotten)
ukd1 has joined #ruby
bwlang has left #ruby [#ruby]
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
nXqd has joined #ruby
moted has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
xaq_ has joined #ruby
hoelzro is now known as hoelzro|away
moted has joined #ruby
pdtpatrick has joined #ruby
krz has quit [Ping timeout: 246 seconds]
xaq has quit [Ping timeout: 244 seconds]
elaptics`away is now known as elaptics
Banistergalaxy has joined #ruby
<RichieEvan> definitely check it out. I'm studying rails right now
luxurymode has quit [Quit: Computer has gone to sleep.]
burgestrand has quit [Quit: Leaving.]
<RichieEvan> I skipped ruby because I feel the OOP knowledge I got from javascript was enough to get me through.
<canton7> I made that mistake
havenn has joined #ruby
ukd1 has quit [Quit: leaving]
<drizz> … :|
yoklov has joined #ruby
pu22l3r has quit [Ping timeout: 244 seconds]
bluenemo has quit [Remote host closed the connection]
<geggam> javascript... opensource active x
<Gate> Its really easy to get into rails after learning ruby, its jarring to go to use ruby without rails if you learned rails first. That being said, just realize that rails gets its awesome mostly from ruby.
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
brdude has joined #ruby
<kenichi> wow
Coolhand has quit [Ping timeout: 240 seconds]
<elaptics> Gate: I think it gets all it's awesome from ruby :)
opus has joined #ruby
cj3kim has joined #ruby
<Gate> elaptics: it owes some of its awesome to the community, restful design, MVC and REST as well.
invsblduck has quit [Ping timeout: 248 seconds]
<RichieEvan> I'm slowly falling in love with ruby
<RichieEvan> I'm doing a crash coarse right now, and I can definitely see how rails in it's whole entirety is based off ruby.
fermion has joined #ruby
nateberkopec has joined #ruby
xaq has joined #ruby
gogiel has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
xaq_ has quit [Ping timeout: 246 seconds]
verto|off is now known as verto
krz has joined #ruby
Abbas5 has quit [Read error: Connection reset by peer]
balki_ has joined #ruby
alanp_ has joined #ruby
alanp has quit [Read error: Connection reset by peer]
balki has quit [Read error: Connection reset by peer]
randomau_ has joined #ruby
RichieEvan has quit [Quit: RichieEvan]
erichmenge has quit [Quit: Be back later]
gfontenot has joined #ruby
invsblduck has joined #ruby
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
randoma__ has joined #ruby
TheLZA has joined #ruby
RichieEvan has joined #ruby
TheLZA has quit [Max SendQ exceeded]
geggam has quit [Ping timeout: 245 seconds]
randomautomator has quit [Ping timeout: 252 seconds]
erichmenge has joined #ruby
infinitiguy2 has quit [Ping timeout: 248 seconds]
obryan has quit [Quit: Konversation terminated!]
randomau_ has quit [Ping timeout: 256 seconds]
eywu has quit [Quit: Leaving.]
v0n has quit [Ping timeout: 246 seconds]
internet_user has quit [Remote host closed the connection]
moshee has quit [Ping timeout: 244 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
internet_user has joined #ruby
fastcache has quit [Quit: Leaving]
_JamieD_ has joined #ruby
asobrasil has left #ruby [#ruby]
Progster has quit [Ping timeout: 260 seconds]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
TheLZA has joined #ruby
TheLZA has quit [Max SendQ exceeded]
fridim_ has quit [Ping timeout: 246 seconds]
deadSnowman has quit [Ping timeout: 244 seconds]
timonv has joined #ruby
internet_user has quit [Ping timeout: 272 seconds]
verto is now known as verto|off
deadSnowman has joined #ruby
nXqd has quit [Ping timeout: 260 seconds]
stopbit has quit [Quit: Leaving]
MrWGW has quit [Ping timeout: 244 seconds]
erichmenge has quit [Quit: Be back later]
yoklov has quit [Quit: computer sleeping]
atmosx has joined #ruby
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
kirun has quit [Quit: Client exiting]
v0n has joined #ruby
phinfonet has joined #ruby
mbradford has quit [Quit: leaving]
bowlowni has quit [Remote host closed the connection]
itnomad has joined #ruby
specialGuest has quit [Ping timeout: 260 seconds]
v0n has quit [Ping timeout: 244 seconds]
specialGuest has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
bbttxu has quit [Quit: bbttxu]
jeff_sebring has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
MrWGW has joined #ruby
MrWGW has quit [Remote host closed the connection]
awarner has quit [Remote host closed the connection]
MrWGW has joined #ruby
y2k has quit [Ping timeout: 265 seconds]
jarred has quit [Quit: jarred]
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
jnotarstefano has joined #ruby
nateberkopec has quit [Quit: Leaving...]
nateberkopec has joined #ruby
t48884 has quit [Remote host closed the connection]
t39794 has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
jgrevich_ has joined #ruby
<jnotarstefano> Hey everyone! I'm having some problems using the twitter gem. Here's a gist for it: https://gist.github.com/3364388
Nisstyre has quit [Quit: Leaving]
<jnotarstefano> I doubt that nobody did favorite one of Obama tweets. So, what's wrong with it? Why isn't the twitter gem correctly picking up favorited tweets?
Stalkr_ has quit [Quit: Leaving...]
jgrevich has quit [Ping timeout: 272 seconds]
jgrevich_ is now known as jgrevich
randoma__ has quit [Read error: Connection reset by peer]
Synthead has quit [Quit: p33 ba115]
randomautomator has joined #ruby
dmiller has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
bbttxu has joined #ruby
brdude has quit [Read error: Connection reset by peer]
specialGuest has quit [Changing host]
specialGuest has joined #ruby
brdude has joined #ruby
syamajala has joined #ruby
qwerxy has joined #ruby
dmiller has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
dmiller has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
nedbat has quit [Ping timeout: 244 seconds]
v0n has joined #ruby
qwerxy has quit [Client Quit]
arooni-mobile has joined #ruby
SegFaultAX has quit [Read error: Operation timed out]
pskosinski has quit [Ping timeout: 256 seconds]
dmiller has quit [Ping timeout: 240 seconds]
linguini has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
balki_ is now known as balki
axl_ has quit [Quit: axl_]
nilg` has quit [Read error: Connection reset by peer]
ashp has joined #ruby
pskosinski has joined #ruby
<ashp> Anyone here use ruby on freebsd? I'm having performance issues. A set of rspec tests takes 6m on freebsd and 1m22s on linux
<ashp> and the freebsd machine is an i7 vs an i3 for the linux box
<quazimodo> why does it take so long to install ri documentation?
<gogiel> ashp: have no experience with freebsd ruby, but do you have 1.9 on it?
juarlex_ has quit [Remote host closed the connection]
<quazimodo> also RDoc documentation
seanstickle has joined #ruby
<ashp> gogiel: I'm stuck with 1.8 for these tests
<ashp> gogiel: I started with 1.8 from rvm but that constantly segfaults, so I switched to 1.8.7 from freebsd ports which doesn't crash, at least
jrajav has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
SegFaultAX has joined #ruby
opus has quit [Quit:]
uris has quit [Quit: leaving]
hynkle has quit [Quit: Computer has gone to sleep.]
<gogiel> ashp: and 1.8 on linux?
chrisbolton has quit [Quit: chrisbolton]
berserkr has quit [Quit: Leaving.]
<gogiel> 1.9 is much faster than 1.8
jrist is now known as jrist-afk
<shevy> yea
<shevy> but also different
<shevy> Encoding addition, different syntax
hynkle has joined #ruby
<shevy> ashp, I compile both 1.8.x and 1.9.x from source on linux here
brasten has quit [Quit: brasten]
v0n has quit [Ping timeout: 265 seconds]
<ashp> gogiel: 1.8 on linux, yeah
<ashp> gogiel: i have 1.9 installed too but i figured 1.8 vs 1.8 was only fair
ezra has quit [Ping timeout: 276 seconds]
<shevy> quazimodo I always wondered that. but then one day I decided to say "screw it" and ignore all rdoc/ri documentation
RegEchse has quit [Quit: brb]
timonv has quit [Remote host closed the connection]
hynkle has quit [Ping timeout: 240 seconds]
cj3kim has quit [Quit: This computer has gone to sleep]
jjbohn has quit [Quit: Leaving...]
<quazimodo> shevy: hrm yeah looks like I'll be doing the same
<quazimodo> goddam rails bothers me sometimes though, like when it does stuff
justinmcp has joined #ruby
<quazimodo> now bundle install is taking its sweet freaking tim
jnotarstefano has quit [Quit: Leaving]
<shevy> quazimodo I started to gather documentation locally + examples
<shevy> it's not perfect, online documentation supplements it
arooni-mobile has quit [Ping timeout: 245 seconds]
<shevy> but it's ok
darren__ has quit [Remote host closed the connection]
<shevy> bundle was always slow
<shevy> :)
<quazimodo> shevy: class PostsController < ApplicationController ... this means that PostsController class inherits from ApplicationController, right
LouisGB has quit [Ping timeout: 246 seconds]
infinitiguy has joined #ruby
<shevy> ack
<shevy> yeah
<shevy> PostsController is a subclass
<shevy> in initialize() method, it will usually have a method called super
jjang has joined #ruby
v0n has joined #ruby
phinfonet has quit [Quit: Linkinus is updating...]
phinfonet has joined #ruby
phinfonet has quit [Client Quit]
infinitiguy has quit [Client Quit]
banseljaj is now known as imami|afk
jjang_ has joined #ruby
ken_barber has joined #ruby
jjang has quit [Read error: Connection reset by peer]
<quazimodo> this is retarded
<quazimodo> I chose python... now im doing ruby
<quazimodo> goddam world
virunga has quit [Quit: Sto andando via]
<davidcelis> quazimodo: ??
ashp has quit [Quit: leaving]
<quazimodo> oh sorry tourettes moment
<jlogsdon> quazimodo: solution: never shoehorn yourself into one language ^_^
<shevy> quazimodo well I suppose both languages have different strengths
<quazimodo> jlogsdon: i want to be *good* at one
<quazimodo> any
<shevy> important is it to try to get the maximum out of the respective strength of a language
<quazimodo> i've dabbled in like 8 languages... if id done 1 id be god of it now
<shevy> but to also remember that the language can limit you
<jlogsdon> i can see that
<shevy> I feel a lot better and "powerful" in ruby, than I did in and with PHP
<jlogsdon> i got to spend 6 years with *coughPHPcough* before moving on
<shevy> my IRC bot failed in PHP, my IRC bot in ruby worked (after trying for a few weeks)
<shevy> hehe jlogsdon
<jlogsdon> and now i can do several languages fairly well, and a couple really well
Jay_Levitt has joined #ruby
<jlogsdon> haha irc bots in ruby are cake
<jlogsdon> in php you want to vomit
<jlogsdon> (especially using event machine)
i0n has quit [Quit: Lost terminal]
<quazimodo> dont talk about php, its shitty
<eam> just write an irc <-> http proxy layer and php will be in its own element again
<quazimodo> i wouldnt write it even if i wanted to
_JamieD_ has quit [Quit: _JamieD_]
<eam> php is amusing
bluenemo has quit [Remote host closed the connection]
<quazimodo> so :foo <--- this is a hash id?
emmanuelux has joined #ruby
syamajala has quit [Remote host closed the connection]
<quazimodo> wow rails is easy
revans has quit [Quit: Linkinus - http://linkinus.com]
elaptics is now known as elaptics`away
elaptics`away is now known as elaptics
g_rotbart has joined #ruby
mrsolo has quit [Quit: Leaving]
mrsolo has joined #ruby
kyb3r has joined #ruby
<quazimodo> #<Foo thing1: bar, thing2: zed>
<quazimodo> whats that structure called
<quazimodo> hash table?
<erikwb> that's an object
<erikwb> of type Foo
beneggett has quit [Quit: Computer has gone to sleep.]
opus has joined #ruby
<erikwb> or is it? maybe i'm full of shit
<erikwb> it's serialized, depends on what's doing the serializing :)
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<erikwb> in general irb likes to talk about objects of type Whatev as #<Whatev....
Jay_Levitt has quit [Quit: Leaving...]
<quazimodo> j
<quazimodo> k
<erikwb> o
yoklov has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
[Neurotic] has joined #ruby
specialGuest has quit [Ping timeout: 244 seconds]
gavit has quit [Read error: Connection timed out]
gavit has joined #ruby
ninegrid has quit [Ping timeout: 240 seconds]
t39794 has quit [Remote host closed the connection]
t54393 has joined #ruby
cakehero has joined #ruby
n_blownapart has joined #ruby
Eplemosen has quit [Quit: NOPE]
g_rotbart has quit [Remote host closed the connection]
<n_blownapart> hi I cannot see which: the add_make method definition on line 12, or the constructor on line 19 are sending values to the class variable @@makes first. It seems that the if statement of line 20 is a step behind the add_make method. I can't see the logic flow of this prog. thanks: http://pastie.org/4496859
paradoja has quit [Ping timeout: 260 seconds]
<tds> it appears that Car.add_make is being called first
<tds> what is confusing you about this?
<n_blownapart> tds: I'm new to programming, its hard for me to see the following:
<tds> well Car#initialize doesn't actually touch @@makes at all
<jlogsdon> surei t does. it just reads it
sneakyness_wk has quit [Quit: niggas gotta nig]
<jlogsdon> @@makes.include?
<tds> it doesnt modify it
<jlogsdon> rigt
<jlogsdon> but it touches it
<jlogsdon> SEMANTICS
elaptics is now known as elaptics`away
<tds> heh
<tds> n_blownapart: what is it hard for you to see?
<n_blownapart> ok. thanks. but I understand the unless statement. but then the constructor uses if: so if the make is already there, why would it say "puts Creating a new #{make}"?
<tds> because the puts is lying :)
<tds> it's not actually creating a new make
<tds> that if statement wouldn't be true unless the make already existed
<n_blownapart> tds whaddya mean?
c0rn has joined #ruby
<tds> look at the last line
<tds> where you are creating a car with the make "Brand X"
<tds> that causes an error, because the brand doesn't exist
SCommette has quit [Quit: SCommette]
<tds> when the brand does exist, it prints "Creating a new make #{make}"
<jlogsdon> n_blownapart: its because its creating a new object where the @make is now "#{make}"
<n_blownapart> yeah that I get. tds
<jlogsdon> not creating a new @@make
ckrailo has quit [Quit: Computer has gone to sleep.]
<tds> eh
SCommette has joined #ruby
<jlogsdon> really it should be puts "Creating a new car with a make of #{make}"
<jlogsdon> or something similar.
<n_blownapart> jlogsdon: what do you mean where the @make is now @{make}?
<jlogsdon> s/new c/new C
<tds> +1
<jlogsdon> see L22
<tds> the make of the car
<jlogsdon> it setts @make (the instance variable) to the make given in initialize