apeiros changed the topic of #ruby to: Ruby 2.1.1; 2.0.0-p451; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
pu22l3r has quit [Remote host closed the connection]
slavapavlutin has joined #ruby
slavapavlutin has quit [Client Quit]
jacky is now known as jackyalcine
geggam has quit [Remote host closed the connection]
Biohazard has quit [Ping timeout: 245 seconds]
combusean has quit [Ping timeout: 265 seconds]
jackyalcine is now known as jacky
asteros has quit [Quit: asteros]
zcreative has joined #ruby
blackavr has quit [Quit: blackavr]
maletor has quit [Quit: Computer has gone to sleep.]
soulcake has quit [Quit: ZNC - http://znc.in]
mattmcclure has quit [Quit: Connection closed for inactivity]
bradhe has joined #ruby
pietr0 has quit [Quit: pietr0]
maletor has joined #ruby
Kricir has joined #ruby
soulcake has joined #ruby
boombadaroomba has quit [Quit: Leaving]
Tomasso has quit [Read error: Connection reset by peer]
<ph88> i'm getting this error but it doesn't tell me which version i need ParseTree doesn't work with ruby 1.9.3
Tomasso has joined #ruby
Nukepuppy has joined #ruby
andrewlio has quit [Quit: Leaving.]
Kricir has quit [Ping timeout: 240 seconds]
<shevy> ph88 can't do much more from such an error alone
toastynerd has quit [Remote host closed the connection]
<ph88> ye i saw that website
crucify_me has joined #ruby
pwh has quit []
<jacky> ph88: have you read the documentation for ParseTree? Checked if it works with your version of Ruby?
einarj has joined #ruby
djbkd has quit [Ping timeout: 245 seconds]
blischalk has joined #ruby
<ph88> http://rubydoc.info/gems/ParseTree/3.0.9/frames not sure where it says version requirements
mikecmpbll has quit [Quit: i've nodded off.]
roland has quit [Ping timeout: 252 seconds]
<crucify_me> hi anyone tell me what file this goes into? thanks : Pry::PluginManager.new.locate_plugins.map&:name
kitak has quit [Remote host closed the connection]
jack_rabbit has quit [Remote host closed the connection]
mjs2600 has joined #ruby
toastynerd has joined #ruby
s3ri0us has joined #ruby
kitak has joined #ruby
jamto11 has quit [Remote host closed the connection]
funktor has quit [Remote host closed the connection]
<wallerdev> ph88: ask zenspider in #ruby-lang
<ph88> ok
m0use_ has joined #ruby
funktor has joined #ruby
Hobogrammer has quit [Ping timeout: 265 seconds]
arubin has joined #ruby
IceDragon has quit [Read error: No route to host]
einarj has quit [Ping timeout: 240 seconds]
danshultz has joined #ruby
IceDragon has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
Nukepuppy has quit [Ping timeout: 252 seconds]
jetblack has joined #ruby
kitak has quit [Ping timeout: 240 seconds]
funktor has quit [Ping timeout: 240 seconds]
emaxi has quit [Remote host closed the connection]
lupine has quit [Quit: ZNC - http://znc.in]
emaxi has joined #ruby
i_s has joined #ruby
lupine has joined #ruby
cashnguns has quit [Ping timeout: 276 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
tzhuang has joined #ruby
<tzhuang> Hey guys. What do you guys do for default parameters in fucntions where the default value is a lengthy expression?
bthesorceror has joined #ruby
felipec has joined #ruby
afex has quit [Ping timeout: 240 seconds]
<felipec> how do I remove lines that match a certain regex?
<benzrf> tzhuang: how about
<felipec> if I do gsub(/regex/, '') the lines are emptied, but still there
<benzrf> arg=nil
mjs2600 has quit [Remote host closed the connection]
<benzrf> arg ||= whatever
i_s has quit [Ping timeout: 240 seconds]
emaxi has quit [Ping timeout: 276 seconds]
<benzrf> * def foo(arg=nil)
<benzrf> arg ||= thing
<pontiki> tzhuang: i tend to set the lengthy expression to a constant then use the constant in the method
<tzhuang> pontiki okay sweet i'll probably do that
<tzhuang> benzrf: what is ||=
<pontiki> or-equals :)
<pontiki> famous ruby operator
<wallerdev> x ||= y is x || x = y
<tzhuang> surely you mean
<tzhuang> x = (x||y)
<tzhuang> ?
<wallerdev> nope
<arubin> felipec: Are they in an array?
<wallerdev> same thing for the most part though
<pontiki> ||= is "or-equals". a ||= b is the equivalent of a || a = b. See http://ruby-doc.org/core-2.0.0/doc/syntax/assignment_rdoc.html (search for ||=)
<benzrf> wallerdev: im sorry wuh
<felipec> arubin: no, it's output from an external progam
<benzrf> how is that any different?
<tzhuang> sweet
<tzhuang> thanks a bunch guys
<wallerdev> one does assignment in both cases, one doesnt
<arubin> felipec: So one long string?
<felipec> arubin: yes
<arubin> felipec: "string".split.grep /regex/
<arubin> Add a join if you want them put back together.
<wallerdev> just match the newline in the regex
Celm has quit [Remote host closed the connection]
<felipec> wallerdev: that doesn't work
Fretta has quit [Quit: Fretta]
combusean has joined #ruby
<felipec> arubin: I think I'll rather use a shell and pipe to to grep... since there doesn't seem to be a clean way
<wallerdev> lol
<pontiki> DONT DO IT
<wallerdev> >> "apple\npie".gsub(/apple\n/, '')
<eval-in_> wallerdev => "pie" (https://eval.in/138425)
<wallerdev> ?!
<arubin> felipec: wallerdev's suggestion works just fine.
funktor has joined #ruby
<felipec> wallerdev: wait, it actually did work... I tried it but must have seen the wrong result
Tomasso has quit [Read error: Connection reset by peer]
<felipec> or maybe I tried "\n$" instead of "$\n"
statbot has quit [Remote host closed the connection]
Tomasso has joined #ruby
yubrew has joined #ruby
mjsmith2 has joined #ruby
<pontiki> File.write("output", IO.readlines("input").reject{|l| l =~ /regex/}.join("\n"))
vlad_starkov has joined #ruby
mjs2600 has joined #ruby
yubrew has quit [Ping timeout: 258 seconds]
robbyoconnor has quit [Ping timeout: 250 seconds]
robbyoconnor has joined #ruby
toastynerd has quit [Remote host closed the connection]
tzhuang has quit [Ping timeout: 252 seconds]
mois3x has joined #ruby
afex has joined #ruby
jacky has quit [Excess Flood]
jackyalcine has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
ghr has joined #ruby
pdtpatrick has quit [Remote host closed the connection]
amclain has joined #ruby
pu22l3r has joined #ruby
larsam has quit [Quit: larsam]
jackyalcine has quit [Excess Flood]
ghr has quit [Ping timeout: 240 seconds]
deens has joined #ruby
pu22l3r has quit [Ping timeout: 265 seconds]
Valesk has quit [Quit: Textual IRC Client: www.textualapp.com]
<felipec> great, tempfile doesn't work
<arubin> ?
mercwithamouth has joined #ruby
chrisseaton has quit []
aspires has quit []
pdtpatrick has joined #ruby
jdahm has joined #ruby
chrisseaton has joined #ruby
terrellt has quit [Remote host closed the connection]
<felipec> arubin: http://pastie.org/9091349
<wallerdev> try closing the file
<wallerdev> or flushing it
crucify_me has quit []
bthesorceror has quit [Remote host closed the connection]
<jdahm> I've just started using middleman-blog and got this error when I create a post: http://beta.pastee.com/83ayd, wondered if anyone knows if this is an error on my part or the gem/deps
Spooner has joined #ruby
bthesorceror has joined #ruby
<jdahm> that error appears literally when I activate the extension and create a blog post file, not even rendering it
<wallerdev> you can create a blog in rails in 15 minutes, havent you seen the video
freerobby has joined #ruby
<jdahm> wallerdev: is that directed at me?
<wallerdev> yeah but not serious sorry lol
<wallerdev> never heard of middleman
<felipec> wallerdev: I did
ntzrmtthihu777 has joined #ruby
r_rios has quit [Ping timeout: 245 seconds]
<jdahm> I'm just wondering 1. if there are any middleman devs here or 2. if I should open an issue on the github page
<felipec> wallerdev: flushing doesn't work... only closing it... but it's weird, only with puts
<felipec> er, I didn't flush, I did 'sync'
<wallerdev> might just not create the tempfile til its closed, not sure the implementation details
mrsolo has joined #ruby
chrisseaton has quit []
<felipec> either way, f.write(string) works
<ntzrmtthihu777> so... I know that ruby 2.1.1 on windows is a no-go atm, but how about on cygwin?
mrsolo has quit [Remote host closed the connection]
<wallerdev> probably could compile it on cygwin
unstable has quit [Ping timeout: 265 seconds]
<wallerdev> its basically linux on windows
bthesorceror has quit [Ping timeout: 252 seconds]
mjs2600 has quit [Remote host closed the connection]
<ntzrmtthihu777> wallerdev: yeah; I use it because window's dev tools suck ass
<wallerdev> true
<wallerdev> especially the command prompt
<wallerdev> that hasnt changed since 1995 lol
<ntzrmtthihu777> yeah. and where the fuck is their posix compliance!?
Tomasso has quit [Read error: Connection reset by peer]
<wallerdev> haha
<xybre> Windows POSIX compliance is in their POSIX extension toolkit.
<wallerdev> i would just like a competent command prompt on windows
combusean has quit [Ping timeout: 240 seconds]
<shevy> msys!
<ntzrmtthihu777> xybre: yeah, just installed that, but still....
<wallerdev> like the default selection mode is still rectangular
<shevy> putty!
Kricir has joined #ruby
<shevy> die windows, die!
<wallerdev> shevy: it doesnt help because all the command line programs are written to assume the width of the command prompt doesnt change
Tomasso has joined #ruby
<shevy> I think my main box was last windows +10 years ago
<wallerdev> lines dont actually wrap, they just get cut off and put on the next line
<wallerdev> thats why they cant offer real selection of things lol
<shevy> :(
<wallerdev> and if you resize you just end up with a bunch of blank space
<shevy> you make me sad
<xybre> Oh, it looks like they removed the POSIX subsystem in 2003.
<wallerdev> which is why they don't let you resize it on the fly, you have to change it in the properties lol
<ntzrmtthihu777> xybre: nah. I just installed it for win7ultx64
<xybre> ntzrmtthihu777: Installed what?
<ntzrmtthihu777> xybre: windows posix subsystem
<xybre> Interesting
<ntzrmtthihu777> Subystem for Unix Applications
<ntzrmtthihu777> xybre: google 'windows posix' and you'll get some info
<Spooner> I used to use console2 on windows instead of cmd. Kept me sane...
Kricir has quit [Ping timeout: 276 seconds]
davispuh has quit [Remote host closed the connection]
sdwrage has quit [Quit: This computer has gone to sleep]
<ntzrmtthihu777> I only venture into windows for a few reasons these days
pwh has joined #ruby
emaxi has joined #ruby
b1nd has quit [Ping timeout: 258 seconds]
<wallerdev> i had to use windows at my last job
<wallerdev> but im free now
<Spooner> I only use it in a VM these days. Still, use ansicon or something like git bash inside console2 and you are fine.
thrillagorilla has joined #ruby
glanzi has quit [Remote host closed the connection]
subz3r0 has quit [Quit: subz3r0]
Spooner has quit [Quit: Bye]
emaxi has quit [Ping timeout: 240 seconds]
bradhe has quit [Remote host closed the connection]
sdelmore has joined #ruby
bradhe has joined #ruby
Megtastique has quit []
danshultz has quit [Remote host closed the connection]
Melpaws has joined #ruby
danshultz has joined #ruby
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
i_s has joined #ruby
jameswlane has joined #ruby
r_rios has joined #ruby
s3ri0us has quit [Ping timeout: 252 seconds]
phoo1234567 has quit [Quit: Leaving]
mercwithamouth has quit [Ping timeout: 240 seconds]
cpruitt has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
kaichanvong has quit [Quit: _]
jackyalcine has joined #ruby
i_s has quit [Ping timeout: 258 seconds]
danshultz has quit [Ping timeout: 258 seconds]
atmosx has quit [Remote host closed the connection]
atmosx has joined #ruby
helpD has joined #ruby
ktun has joined #ruby
ktun has quit [Client Quit]
sdelmore has quit [Quit: Leaving.]
deens has quit [Remote host closed the connection]
SonicX has joined #ruby
yubrew has joined #ruby
combusean has joined #ruby
helpD has quit [Ping timeout: 240 seconds]
deens has joined #ruby
* combusean looks around
Asher has quit [Ping timeout: 276 seconds]
maletor has joined #ruby
* shevy starts to spank combusean
Tomasso has quit [Read error: Connection reset by peer]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<ntzrmtthihu777> o_0
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<combusean> shevy, I'm not sure this is a conversation either of us want to have in public. :P
<shevy> you deserved it!
<shevy> you were looking around for trouble
Monito has joined #ruby
cpruitt has quit [Quit: cpruitt]
gr33n7007h has joined #ruby
<combusean> pics or gtfo
yubrew has quit [Ping timeout: 276 seconds]
<combusean> :P
deens has quit [Ping timeout: 250 seconds]
ddv has quit [Ping timeout: 245 seconds]
ehc has quit [Ping timeout: 245 seconds]
felipec has left #ruby ["Leaving"]
kreisys has quit [Quit: Computer has gone to sleep.]
b1nd has joined #ruby
ehc has joined #ruby
ktun has joined #ruby
Loaft has quit [Ping timeout: 240 seconds]
kyb3r_ has quit [Ping timeout: 265 seconds]
RastaqWhere has joined #ruby
blischalk has quit [Ping timeout: 265 seconds]
RastaqWhere has quit [Quit: Leaving.]
kaspergrubbe has quit [Remote host closed the connection]
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ddv has joined #ruby
zigomir has quit [Remote host closed the connection]
zigomir has joined #ruby
ghr has joined #ruby
mrmargolis has joined #ruby
<ntzrmtthihu777> lol
snath has quit [Ping timeout: 252 seconds]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
x77686d has joined #ruby
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
Hanmac has quit [Ping timeout: 276 seconds]
deens has joined #ruby
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
sdwrage has joined #ruby
zigomir has quit [Ping timeout: 276 seconds]
ghr has quit [Ping timeout: 240 seconds]
kies has joined #ruby
kies has quit [Changing host]
kies has joined #ruby
pu22l3r has joined #ruby
<wallerdev> have a good weekend buddies
<wallerdev> <3
BSaboia has quit [Ping timeout: 245 seconds]
yfeldblu_ has quit [Ping timeout: 258 seconds]
wallerdev has quit [Quit: wallerdev]
<ntzrmtthihu777> ok... cygwin and ruby-installer 2.0.0 failing me. So, with that, what is the latest, fully functioning ruby for windows?
bthesorceror has joined #ruby
<arubin> Run Linux in a virtual machine.
jlast has quit [Remote host closed the connection]
<benzrf> dont use windows
jlast has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
<arubin> Kids use Windows out of irony these days.
momomomomo has quit [Quit: momomomomo]
Es0teric has joined #ruby
pu22l3r has quit [Remote host closed the connection]
Es0teric has quit [Max SendQ exceeded]
charliesome has joined #ruby
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
<ntzrmtthihu777> arubin: I don't use windows. I'm an arch user.
<ntzrmtthihu777> I am just working on some ruby/c++ code, and I do intend to port
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
zcreative has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
snath has joined #ruby
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
jlast has quit [Ping timeout: 252 seconds]
Hanmac has joined #ruby
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
dik_dak has joined #ruby
dik_dak has quit [Remote host closed the connection]
Monito has quit [Read error: Connection reset by peer]
Es0teric has joined #ruby
<ntzrmtthihu777> what works in 2.1.1 on arch, does not on windows with 2.0.0; its just a simple extension which manipulates an object with four instance variables, and I can't even require it XD
Monito has joined #ruby
sepp2k has quit [Quit: Leaving.]
kiki_lamb has quit [Quit: leaving]
Kricir has joined #ruby
kiki_lamb has joined #ruby
bricker`LA has quit [Ping timeout: 265 seconds]
<benzrf> bye ima sleep
Jetchisel has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
mois3x has quit [Quit: mois3x]
mikeric has joined #ruby
emaxi has joined #ruby
hgl has joined #ruby
Kricir has quit [Ping timeout: 240 seconds]
kalyx has joined #ruby
benzrf is now known as benzrf|offline
<kalyx> does anyone know what benzrfs quick project is about
<kalyx> github.com/benzrf/quick
<centrx> something about taking over world
chipotle has joined #ruby
<kalyx> pls actually explain it to me
locriani has quit [Remote host closed the connection]
locriani has joined #ruby
hgl has quit [Remote host closed the connection]
<arubin> kalyx: It is malware.
<kalyx> right thanks
hgl has joined #ruby
nerocrux has quit [Read error: Connection reset by peer]
emaxi has quit [Ping timeout: 240 seconds]
<centrx> I'm not sure what it is
<kalyx> he told me to ask you guys
<kalyx> since he's like 10
<ntzrmtthihu777> there we go. apparently my program will have to use ruby 1.9.3 on windows...
<arubin> Why did you wait until just after he went offline to ask?
<centrx> I thought he was older than that
<centrx> I'm not sure what "Smalltalk development environment" means
ehc has quit [Quit: ehc]
<centrx> what he means by
<kalyx> we were in another channel before he left
<kalyx> yeah he's like 16 or something.
deens has quit [Remote host closed the connection]
<arubin> That would explain his obsession with Haskell.
deens has joined #ruby
<kalyx> would someone mind running that live demo he made?
tjr9898 has joined #ruby
<xybre> I don't have scriptreply
jlast has joined #ruby
<kalyx> arubin, whats the joke behind him being 16 and obsessed with haskell?
afex has quit [Ping timeout: 245 seconds]
<arubin> kalyx: Lack of pragmatism.
r_rios has quit [Ping timeout: 240 seconds]
<arubin> Someone asks a simple question and he starts rambling about monads.
<kalyx> lol
<shevy> lol
<arubin> He does not seem to like Ruby, so I am not sure why he hangs out here.
<kalyx> I'm not a programmer at all but I've known him for a little over a year
<shevy> he is a programming multilingualist
<kalyx> its funny to read this
deens has quit [Ping timeout: 265 seconds]
dapz has joined #ruby
lw has joined #ruby
<shevy> at a young age he drinks more kool aid than the older ones
<kalyx> i used to run a vps in Sweden for some stuff. and he took it over and was going crazy with it
<kalyx> every once and a while i would re-image it, open a beer, and wait for a pm
<arubin> heh
i_s has joined #ruby
<ntzrmtthihu777> trolling level: over 9000
dkannan has joined #ruby
<shevy> cool
Martxel has quit [Read error: Connection reset by peer]
<shevy> he never pmed me
<kalyx> a pm from benzrf is like winning an oscar
Martxel has joined #ruby
codabrink has quit [Ping timeout: 240 seconds]
<xybre> It demonstrates you're a tool to the establishment?
eka has joined #ruby
<shevy> lol
<ntzrmtthihu777> lawl
<shevy> benzrf|offline: <kalyx> a pm from benzrf is like winning an oscar
r_rios has joined #ruby
meatherly has quit [Remote host closed the connection]
<kalyx> exactly xybre
ntzrmtthihu777 has quit [Quit: leaving]
yubrew has joined #ruby
deric_skibotn has quit [Ping timeout: 252 seconds]
nateberkopec has joined #ruby
nerocrux has joined #ruby
chris_thomson has quit [Quit: Zzz...]
i_s has quit [Ping timeout: 240 seconds]
jlast has quit [Remote host closed the connection]
jxf has quit [Ping timeout: 250 seconds]
nerocrux has quit [Client Quit]
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
pu22l3r has joined #ruby
pen has quit [Remote host closed the connection]
twidx has quit [Quit: Connection closed for inactivity]
mary5030 has joined #ruby
hgl has quit [Quit: Lingo - http://www.lingoirc.com]
Asher has joined #ruby
funktor has quit [Remote host closed the connection]
funktor has joined #ruby
ehc has joined #ruby
<kalyx> anyone have experience with rbenv or rvm?
Tomasso2 has joined #ruby
Hobogrammer has joined #ruby
Monito has quit [Ping timeout: 240 seconds]
browndawg has joined #ruby
pu22l3r has quit [Ping timeout: 276 seconds]
browndawg has quit [Max SendQ exceeded]
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
emaxi has joined #ruby
Martxel has quit [Ping timeout: 240 seconds]
cashnguns has joined #ruby
mary5030 has quit [Remote host closed the connection]
cj3kim_ has joined #ruby
mary5030 has joined #ruby
funktor has quit [Ping timeout: 276 seconds]
vlad_starkov has joined #ruby
mrmargolis has quit [Remote host closed the connection]
chris_thomson has joined #ruby
sailias has quit [Ping timeout: 240 seconds]
ixti has quit [Ping timeout: 240 seconds]
mary5030 has quit [Ping timeout: 240 seconds]
blackavr has joined #ruby
wallerdev has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
lw has quit [Quit: s]
saarinen has quit [Quit: saarinen]
m0use_ has quit []
Mongey has quit [Quit: ZNC - http://znc.in]
cashnguns has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
<centrx> How would you optimize this
sputnik13 has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<centrx> lines_by_game_id.map do |game_id, lines|
<centrx> [game_id, index_by_multikey(lines, line_key_columns, line_columns)]
<centrx> end.to_h
dkannan has quit [Quit: dkannan]
Spami has quit [Quit: This computer has gone to sleep]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
radic_ has quit [Ping timeout: 245 seconds]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
browndawg has joined #ruby
pen has joined #ruby
sputnik13 has quit [Remote host closed the connection]
<zorak8> erb vs haml vs slime
<zorak8> now|1
<zorak8> !
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
<centrx> haml looks funny, slime sounds funny
<shevy> I hate end#methods
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
<shevy> the worst is in optionparser
<shevy> end.parse! ARGV
radic has joined #ruby
cjsarette has joined #ruby
agjacome has joined #ruby
combusean has quit [Ping timeout: 258 seconds]
lookup has joined #ruby
cj3kim_ has quit [Read error: Connection reset by peer]
Tomasso2 has quit [Read error: Connection reset by peer]
lookup has left #ruby [#ruby]
eka has joined #ruby
cj3kim_ has joined #ruby
braincra- has quit [Quit: bye bye]
Tomasso has joined #ruby
mjs2600 has joined #ruby
Mongey has joined #ruby
HashNuke has joined #ruby
SHyx0rmZ has quit [Ping timeout: 240 seconds]
braincrash has joined #ruby
eka has quit [Ping timeout: 265 seconds]
sweet_cheese_us is now known as paul_k
Kricir has joined #ruby
spyderma_ has joined #ruby
jameswlane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dik_dak has joined #ruby
cassioscabral has joined #ruby
mjs2600 has quit [Ping timeout: 276 seconds]
Melpaws has quit [Quit: Leaving.]
spyderman4g63 has quit [Ping timeout: 258 seconds]
blackavr has quit [Quit: blackavr]
alexju has quit [Read error: Connection reset by peer]
Kricir has quit [Ping timeout: 245 seconds]
alexju has joined #ruby
cj3kim__ has joined #ruby
Lemur has joined #ruby
_justin has joined #ruby
cj3kim_ has quit [Ping timeout: 240 seconds]
combusean has joined #ruby
tzhuang has joined #ruby
Kricir has joined #ruby
moritzs has joined #ruby
jameswlane has joined #ruby
jameswlane has quit [Client Quit]
cj3kim__ has quit [Remote host closed the connection]
george2 has joined #ruby
yubrew has joined #ruby
Kricir has quit [Ping timeout: 252 seconds]
cjsarette has quit [Ping timeout: 258 seconds]
i_s has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
nivram80 has joined #ruby
nateberkopec has quit [Quit: Leaving...]
alowerupper has joined #ruby
<alowerupper> Hi all. I'm having problems installing ruby on rails in gentoo
<alowerupper> and rubygems
funktor has joined #ruby
<alowerupper> how should I install them? by package manager or manually?
_justin has quit [Quit: _justin]
yekta has joined #ruby
yfeldblum has joined #ruby
i_s has quit [Ping timeout: 245 seconds]
helpD has joined #ruby
nivram80 has quit [Remote host closed the connection]
Tomasso has quit [Read error: Connection reset by peer]
<centrx> alowerupper, In Debian, I always use rubygems
<havenwood> alowerupper: RubyGems comes with modern Rubies. Install Rails with RubyGems.
helpD has quit [Ping timeout: 240 seconds]
Tomasso has joined #ruby
<centrx> alowerupper, You are going to need to use rubygems to install something anyway, so might as well do it all with rubygems, which also has the up-to-date versions of the gems
<alowerupper> ah
voglster has joined #ruby
<alowerupper> centrx: where can I found them both in one package?
luckyruby has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<centrx> huh?
mcscm has joined #ruby
mcscm has left #ruby [#ruby]
<alowerupper> centrx: http://rvm.io/rvm/install
<alowerupper> I can pull rvm, rails, and gems with command, no?
quitobro has joined #ruby
<centrx> alowerupper, gem install rails
<havenwood> alowerupper: Rails is a gem. RubyGems (which provides the `gem` command) ships with Ruby 1.9+). RVM is a tool for installing and managing Rubies other than those provided by your package manager.
<havenwood> alowerupper: Once you have Ruby you've got RubyGems and can install Rails.
<alowerupper> havenwood: I have ruby1.9.1 insatalle
tzhuang has quit [Ping timeout: 240 seconds]
<havenwood> alowerupper: anything before 1.9.3 is past end-of-life, but is it really 1.9.1 or is that just the AMI?
<havenwood> alowerupper: ruby -v
<alowerupper> but when I do gem install sth it shows /usr/lib64/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file
<alowerupper> oh, sorry it's 1.9.3
<havenwood> alowerupper: and?: gem -v
Azure has quit [Quit: My MBP went to sleep.]
<alowerupper> /usr/lib64/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- myapp(LoadError)
Azure has joined #ruby
<havenwood> alowerupper: sry, what are you doing? that is what you get for?: gem install rails
<havenwood> alowerupper: or you're just showing the load path error you get loading your app?
<alowerupper> I'm showing the error it throws even when I use the gem command
<alowerupper> on doing gem list
<alowerupper> it doesn't show anytihng
<havenwood> gem -v
<alowerupper> that means I don't have gem installe?
quitobro has quit [Remote host closed the connection]
<alowerupper> I'm using gentoo though
<havenwood> alowerupper: have you installed any gems?
<alowerupper> okay, the thing is I want it all running because I wants to do course on saas(edx)
r_rios has quit [Ping timeout: 252 seconds]
<havenwood> so you haven't installed any gems? :P
<alowerupper> Na, should I install rubygems?
bthesorceror has quit [Ping timeout: 245 seconds]
<havenwood> alowerupper: lol, please just tell us what you get for?: gem -v
<havenwood> alowerupper: or?: which gem
<havenwood> alowerupper: like i keep saying, RubyGems ships with Ruby
<alowerupper> :~% gem -v /usr/lib64/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- myapp(LoadError) from /usr/lib64/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
<alowerupper> this is waht I'm getting :/
ghr has joined #ruby
<havenwood> oh, sry
<havenwood> what the heck? :O
noop has joined #ruby
omosoj has joined #ruby
<havenwood> alowerupper: you might have better luck with a more modern Gentoo package for Ruby, hem. i don't know Gentoo.
<havenwood> alowerupper: looks like emerge has a 2.0 stable package and a 2.1
mary5030 has joined #ruby
<havenwood> alowerupper: if those packages have a broken RubyGems too, then RVM or ruby-install/chruby would be options.
wallerdev has quit [Quit: wallerdev]
<havenwood> although.. you'd have to install your own deps with ruby-install
metamaterial has quit [Remote host closed the connection]
bthesorceror has joined #ruby
omosoj has quit [Client Quit]
lw has joined #ruby
<alowerupper> hmm
<havenwood> normally ruby-install to /usr/local is good if only need latest stable ruby, but maybe on Gentoo RVM would be a good idea?
wallerdev has joined #ruby
meatherly has joined #ruby
rkr090 has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
hobodave has joined #ruby
Dwarf has quit [Quit: Oops I quit]
Guedes0 has quit [Ping timeout: 276 seconds]
<havenwood> alowerupper: if you do go RVM i'd highly recommend following RVM's instructions
<havenwood> alowerupper: not using the package manager to install it
<havenwood> alowerupper: and be certain to use a single-user install
<havenwood> alowerupper: good support in #rvm
<alowerupper> I see
<havenwood> alowerupper: i'll look at what it would take to add emerge support to ruby-install
<alowerupper> or other thing I can do is
<alowerupper> remove current ruby stuff
<alowerupper> and make it manually?
ehc has quit [Quit: ehc]
<havenwood> alowerupper: yeah, as long as you install the dependencies a manual build or ruby-install should do the trick
mary5030 has quit [Ping timeout: 250 seconds]
<havenwood> alowerupper: for automagical, RVM
<alowerupper> right
metamaterial has joined #ruby
andy__ has quit [Remote host closed the connection]
cassioscabral has quit [Ping timeout: 240 seconds]
thomasxie has joined #ruby
jackyalcine is now known as jacky
Dwarf has joined #ruby
Tomasso has quit [Ping timeout: 276 seconds]
mikeric has quit []
mostlybadfly has joined #ruby
yubrew has joined #ruby
badhatter_ has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
lw has quit [Quit: s]
jamto11 has joined #ruby
_justin has joined #ruby
butblack has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
Hobogrammer has quit [Quit: WeeChat 0.4.3]
badhatter has quit [Ping timeout: 258 seconds]
lw has joined #ruby
weems has quit [Read error: Connection reset by peer]
weems has joined #ruby
weems has quit [Changing host]
weems has joined #ruby
diegoviola has joined #ruby
jamto11 has quit [Ping timeout: 265 seconds]
Hobogrammer has joined #ruby
i_s has joined #ruby
armstrjare has joined #ruby
alowerupper has quit [Quit: Page closed]
cassioscabral has joined #ruby
butblack has quit [Quit: butblack]
bradhe has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
bradhe has quit [Remote host closed the connection]
i_s has quit [Ping timeout: 258 seconds]
bousquet has joined #ruby
butblack has joined #ruby
bradhe has joined #ruby
bradhe has quit [Remote host closed the connection]
_justin has quit [Ping timeout: 245 seconds]
afex has joined #ruby
xiella has quit [Ping timeout: 245 seconds]
bradhe has joined #ruby
bradhe has quit [Remote host closed the connection]
xiella has joined #ruby
Celm has joined #ruby
toastynerd has joined #ruby
papercode has quit [Quit: WeeChat 0.4.3]
_justin has joined #ruby
yekta has quit [Quit: yekta]
RaptorJesus has quit [Remote host closed the connection]
RaptorJesus has joined #ruby
papercode has joined #ruby
Celm has quit [Ping timeout: 258 seconds]
combusean has quit [Ping timeout: 258 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
JohnBat26 has joined #ruby
tacos1de_ has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
tacos1de has quit [Remote host closed the connection]
_justin has quit [Client Quit]
<pontiki> quietude
<Lemur> don't kill the mood
<centrx> ...
Morkel has joined #ruby
butblack has quit [Quit: butblack]
locriani has quit [Remote host closed the connection]
locriani has joined #ruby
* pontiki serves up some groove salad
Doppp has quit [Ping timeout: 240 seconds]
metamaterial has quit [Quit: Leaving.]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
nivram80 has joined #ruby
nivram80 has left #ruby [#ruby]
cpruitt has joined #ruby
browndawg has quit [Ping timeout: 258 seconds]
nari has joined #ruby
ponga has quit [Quit: Leaving :)]
sdouglas has joined #ruby
andy__ has joined #ruby
tectonic has joined #ruby
_justin has joined #ruby
chris_thomson has quit [Quit: Zzz...]
diegoviola has quit [Quit: WeeChat 0.4.3]
Doppp has joined #ruby
Azurazen has joined #ruby
cpruitt has quit [Quit: cpruitt]
afex has quit [Ping timeout: 245 seconds]
mjs2600 has joined #ruby
diegoviola has joined #ruby
meatherly has quit [Read error: Connection reset by peer]
meatherly has joined #ruby
bluehavana has joined #ruby
funktor has quit []
yubrew has joined #ruby
b1nd has quit [Ping timeout: 276 seconds]
_justin has quit [Quit: _justin]
mjs2600 has quit [Ping timeout: 258 seconds]
thomasxie has left #ruby [#ruby]
CaptainJet has quit []
yubrew has quit [Ping timeout: 258 seconds]
Cache_Money has joined #ruby
dik_dak has quit [Quit: Leaving]
centrx has quit [Quit: All this computer hacking is making me thirsty]
kreisys has joined #ruby
bousquet has quit [Remote host closed the connection]
bousquet has joined #ruby
Kricir has joined #ruby
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
badhatter_ has quit [Ping timeout: 250 seconds]
WanderingGlitch has quit [Ping timeout: 250 seconds]
bthesorceror has quit [Remote host closed the connection]
bthesorceror has joined #ruby
caleb_io has joined #ruby
yacks has joined #ruby
caleb_io has quit [Quit: caleb_io]
bousquet has quit [Ping timeout: 240 seconds]
combusean has joined #ruby
Kricir has quit [Ping timeout: 252 seconds]
Doppp has quit [Ping timeout: 265 seconds]
mansi has quit [Ping timeout: 245 seconds]
endash has quit [Quit: endash]
endash_ is now known as endash
cpruitt has joined #ruby
bthesorceror has quit [Ping timeout: 265 seconds]
i_s has joined #ruby
b1nd has joined #ruby
maletor has joined #ruby
helpD has joined #ruby
emaxi has quit [Remote host closed the connection]
i_s has quit [Ping timeout: 245 seconds]
x77686d has quit [Quit: x77686d]
mieko has joined #ruby
kenneth has joined #ruby
pwh has quit []
mjsmith2 has quit []
Celm has joined #ruby
helpD has quit [Ping timeout: 252 seconds]
sdouglas has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
blackavr has joined #ruby
IceDragon has quit [Quit: Space~~~]
cpruitt has quit [Quit: cpruitt]
Celm has quit [Ping timeout: 258 seconds]
vlad_starkov has joined #ruby
pika_pika has quit [Ping timeout: 240 seconds]
noop has quit [Ping timeout: 258 seconds]
badhatter has joined #ruby
badhatter has quit [Changing host]
badhatter has joined #ruby
browndawg has joined #ruby
meatherly has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
_justin has joined #ruby
mansi has joined #ruby
Milly_Bays has joined #ruby
kaspergrubbe has quit [Ping timeout: 250 seconds]
mary5030 has joined #ruby
blackavr has quit [Ping timeout: 252 seconds]
amclain has quit [Quit: Leaving]
diegoviola has quit [Quit: WeeChat 0.4.3]
WanderingGlitch has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
mrnugget has joined #ruby
cassioscabral has quit [Ping timeout: 258 seconds]
pu22l3r has joined #ruby
Robbo_ has quit [Remote host closed the connection]
noop has joined #ruby
andy__ has quit [Remote host closed the connection]
wallerdev has quit [Ping timeout: 265 seconds]
yubrew has joined #ruby
_justin has quit [Quit: _justin]
pu22l3r has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
wallerdev_ has joined #ruby
ktosiek has joined #ruby
wallerdev has quit [Ping timeout: 258 seconds]
wallerdev_ is now known as wallerdev
phansch has joined #ruby
emaxi has joined #ruby
meatherly has joined #ruby
twiceday has joined #ruby
kenndel has quit [Read error: Connection reset by peer]
bogeyd6 has quit [Read error: Connection reset by peer]
kenndel_ has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
meatherly has quit [Read error: Connection reset by peer]
goodcat has quit [Ping timeout: 258 seconds]
meatherly has joined #ruby
bousquet has joined #ruby
mrgoodcat has joined #ruby
jamto11 has joined #ruby
twiceaday has quit [Ping timeout: 258 seconds]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
meatherl_ has joined #ruby
Kricir has joined #ruby
emaxi has quit [Ping timeout: 240 seconds]
_justin has joined #ruby
bogeyd6 has joined #ruby
tkuchiki has joined #ruby
meatherly has quit [Ping timeout: 240 seconds]
bousquet has quit [Ping timeout: 240 seconds]
jamto11 has quit [Ping timeout: 240 seconds]
Cache_Money has quit [Quit: Cache_Money]
meatherl_ has quit [Ping timeout: 245 seconds]
Kricir has quit [Ping timeout: 245 seconds]
armstrjare has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has joined #ruby
combusean has quit [Ping timeout: 252 seconds]
dapz has joined #ruby
i_s has joined #ruby
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
Deele has quit [Ping timeout: 255 seconds]
noop has quit [Ping timeout: 250 seconds]
AlexRussia has quit [Ping timeout: 276 seconds]
eynj has quit [Quit: Leaving.]
mary5030 has quit [Remote host closed the connection]
claymore has joined #ruby
mary5030 has joined #ruby
i_s has quit [Ping timeout: 252 seconds]
alpha123 has quit [Ping timeout: 265 seconds]
arubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alpha123 has joined #ruby
mary5030 has quit [Ping timeout: 276 seconds]
pen has quit [Remote host closed the connection]
goganchic has joined #ruby
timonv has quit [Remote host closed the connection]
<voglster> how can i return an enumerator that filters another enumerator... i.e. i want to skip the first few values but still use it as an enumerator
vlad_starkov has joined #ruby
lw has quit [Quit: s]
<havenwood> >> 1.upto(10).select { |n| n > 5 }.to_enum
<eval-in_> havenwood => #<Enumerator: [6, 7, 8, 9, 10]:each> (https://eval.in/138491)
<havenwood> voglster: example ^
<havenwood> voglster: if i understand what your wanting?
_justin has quit [Ping timeout: 258 seconds]
vlad_starkov has quit [Ping timeout: 276 seconds]
ponga has quit [Remote host closed the connection]
ponga has joined #ruby
ndrei has joined #ruby
toastynerd has quit [Remote host closed the connection]
noop has joined #ruby
unstable has joined #ruby
ponga has quit [Ping timeout: 240 seconds]
ghr has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SonicX has quit [Remote host closed the connection]
relix has joined #ruby
ghr has quit [Ping timeout: 245 seconds]
yubrew has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
nari has quit [Ping timeout: 240 seconds]
Kricir has joined #ruby
WanderingGlitch has quit [Changing host]
WanderingGlitch has joined #ruby
rylev has joined #ruby
mjs2600 has joined #ruby
goganchic has quit []
grieg has joined #ruby
jetblack_ has joined #ruby
emaxi has joined #ruby
skaflem has joined #ruby
AZen has joined #ruby
utkarsh__ has joined #ruby
rylev_ has joined #ruby
blackmesa has joined #ruby
robbyoconnor has quit [Ping timeout: 240 seconds]
Kricir has quit [Ping timeout: 240 seconds]
rylev has quit [Remote host closed the connection]
Azurazen has quit [Remote host closed the connection]
utkarsh_ has quit [Quit: No Ping reply in 180 seconds.]
mjs2600 has quit [Ping timeout: 258 seconds]
jetblack has quit [Ping timeout: 258 seconds]
aetaric has quit [Ping timeout: 258 seconds]
Klumben has quit [Ping timeout: 258 seconds]
artgoeshere has quit [Ping timeout: 258 seconds]
aetaric has joined #ruby
pagios has quit [Quit: I'm using a Free IRC Bouncer from BNC4FREE - http://bnc4free.com/]
rylev_ has quit [Remote host closed the connection]
pagioss has joined #ruby
Klumben has joined #ruby
andy__ has joined #ruby
artgoeshere has joined #ruby
emaxi has quit [Ping timeout: 265 seconds]
pen has joined #ruby
pencilcheck has joined #ruby
pen has quit [Read error: Connection reset by peer]
meatherly has joined #ruby
andy__ has quit [Ping timeout: 245 seconds]
ponga has joined #ruby
vlad_starkov has joined #ruby
pen has joined #ruby
pencilcheck has quit [Read error: Connection reset by peer]
aspiers has quit [Ping timeout: 265 seconds]
meatherly has quit [Ping timeout: 258 seconds]
ponga has quit [Ping timeout: 265 seconds]
aspiers has joined #ruby
Avahey_ has quit [Quit: Connection closed for inactivity]
yacks has quit [Ping timeout: 240 seconds]
arietis has joined #ruby
i_s has joined #ruby
bricker`LA has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
klaut has joined #ruby
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
helpD has joined #ruby
kitak has joined #ruby
i_s has quit [Ping timeout: 240 seconds]
locriani has quit [Quit: Leaving...]
helpD has quit [Ping timeout: 240 seconds]
browndawg has quit [Quit: Leaving.]
Morkel has quit [Quit: Morkel]
sigurding has joined #ruby
Soda has joined #ruby
timonv has joined #ruby
robbyoconnor has joined #ruby
JBreit has joined #ruby
mary5030 has joined #ruby
dasraspberri has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
luriv has joined #ruby
robbyoconnor has joined #ruby
gr33n7007h has quit [Ping timeout: 250 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
mary5030 has quit [Ping timeout: 265 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
luriv has quit [Ping timeout: 250 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lw has joined #ruby
s00pcan has joined #ruby
yubrew has joined #ruby
s00pcan has quit [Remote host closed the connection]
kerin has quit [Quit: Leaving]
ghr has joined #ruby
s00pcan has joined #ruby
ashleyis1 has joined #ruby
ashleyis has quit [Ping timeout: 240 seconds]
cj3kim_ has joined #ruby
Deele has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
rylev has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
dasraspberri is now known as cndiv
cndiv has quit [Changing host]
cndiv has joined #ruby
carraroj has joined #ruby
dapz has joined #ruby
cndiv has quit [Quit: WeeChat 0.3.8]
AliRezaTaleghani has joined #ruby
luriv has joined #ruby
ezrios has quit [Ping timeout: 240 seconds]
cover has joined #ruby
emaxi has joined #ruby
kaichanvong has joined #ruby
Ashi_ has joined #ruby
AliRezaTaleghani has left #ruby [#ruby]
timonv has quit [Remote host closed the connection]
_tpavel has joined #ruby
emaxi has quit [Ping timeout: 245 seconds]
jackneill has joined #ruby
jackneill has quit [Changing host]
jackneill has joined #ruby
tectonic has quit []
cj3kim_ has quit [Read error: Connection reset by peer]
cj3kim_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
camilasan has joined #ruby
marr has joined #ruby
shime has joined #ruby
_tpavel has quit [Quit: Leaving]
Spectre881 has joined #ruby
bousquet has joined #ruby
centrex has quit [Ping timeout: 240 seconds]
<Spectre881> hey guys, im really new to ruby, what does it mean if you access an array or maybe it's a collection with a comma like a.names[0,5]
meatherly has joined #ruby
<Mon_Ouie> It returns an array containing the 5 elements after index 0 (i.e. the first 5 elements)
meatherl_ has joined #ruby
jamto11 has joined #ruby
<Spectre881> oh sorry i guess it's an object?
<Mon_Ouie> What do you mean?
vlad_starkov has joined #ruby
bousquet has quit [Ping timeout: 250 seconds]
meatherly has quit [Ping timeout: 240 seconds]
meatherl_ has quit [Ping timeout: 240 seconds]
jamto11 has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
Doppp has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
bluehavana has quit [Quit: Connection closed for inactivity]
<tobiasvl> everything is an object in ruby
ktosiek has quit [Ping timeout: 252 seconds]
<Hanmac> tobiasvl: and if something is not an object itself, it either can return an object or can be turned into an object
senayar has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
shashank_rs has joined #ruby
sski has joined #ruby
i_s has joined #ruby
seuros has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
ValicekB has quit [Ping timeout: 250 seconds]
LiohAu has joined #ruby
i_s has quit [Ping timeout: 240 seconds]
<Nowaker> Hanmac: what do you mean by "not an object"?
decoponio has joined #ruby
<Mon_Ouie> blocks aren't objects by themselves, they're a syntactic construct. You can however create a Proc object from them.
<Mon_Ouie> Same for methods
<Hanmac> Nowaker: like "if(foo); bar; end" the "if" is not an object but returns one ... and blocks are not objects but can be turned into procs
shashank_rs has quit [Ping timeout: 258 seconds]
<Nowaker> you know, a block is a ruby syntax term
Celm has joined #ruby
<Nowaker> if someone is saying "everything in ruby is object" they mean ruby runtime not ruby syntax :)
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Jetchisel has quit [Ping timeout: 245 seconds]
<Mon_Ouie> But you do manipulate blocks at runtime, you can pass a block to a method and yield objects to it. Just like you can call a method.
<Nowaker> you manioulate procs
<Mon_Ouie> You don't have to
<Mon_Ouie> >> def f; yield 3; end; f { |x| 2*x }
<eval-in_> Mon_Ouie => 6 (https://eval.in/138525)
<Nowaker> and what does your example prove?
<Mon_Ouie> That you don't have to involve procs when using blocks
<Nowaker> there is a proc during ruby runtime which is an object
<Nowaker> you just dont hold a reference to it in this code
mr_snowf1ake has quit [Ping timeout: 250 seconds]
Celm has quit [Ping timeout: 258 seconds]
<Nowaker> but it doesnt mean there is no proc
<Mon_Ouie> Not necessarily. In fact I believe YARD does not even create it unless you use &block ,etc.
cj3kim_ has quit [Remote host closed the connection]
cj3kim_ has joined #ruby
Soda has quit [Remote host closed the connection]
<Nowaker> if it doesnt, then there is nothing. when it exists its an object. when it doesnt... well, it doesnt exist. so still, the sentence "everything in ruby is an object" :)
<Nowaker> is true
<Mon_Ouie> No, the point of that not being true is that it's not true in the lisp sense of 'code is data'.
<Nowaker> oh, i agree with that
<Nowaker> thats absolutely true
yubrew has joined #ruby
marcdel has quit [Read error: Connection reset by peer]
seuros has quit [Ping timeout: 250 seconds]
cj3kim_ has quit [Ping timeout: 265 seconds]
marcdel has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
dapz has joined #ruby
lw has quit [Quit: s]
sski has quit []
sski has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
crzrcn has joined #ruby
ktun has joined #ruby
dapz has quit [Client Quit]
yfeldblum has joined #ruby
yacks has joined #ruby
ponga has quit [Remote host closed the connection]
emaxi has joined #ruby
phansch has quit [Quit: WeeChat 0.4.2]
timonv has joined #ruby
seuros has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
rofflcopter has joined #ruby
<rofflcopter> does anyone know how to make a batch file to auto set environment path if im running ruby off a usb?
chipotle has quit [Quit: cya]
emaxi has quit [Ping timeout: 265 seconds]
<rofflcopter> h
rofflcopter is now known as xeyes
<xeyes> hi
kyb3r_ has joined #ruby
<xeyes> s
<xeyes> hello?
xeyes has quit [Quit: l]
xeyes has joined #ruby
xeyes is now known as roflcopter
anaeem1 has joined #ruby
<roflcopter> lol
roflcopter is now known as Guest92462
<Guest92462> hello
<Guest92462> h
<gry> hi
<Guest92462> does anyone know how to set a path variable batch?
<Guest92462> if im running ruby off a usb, to auto set into the bin file?
mjs2600 has joined #ruby
sski has quit [Read error: Connection reset by peer]
Guest92462 is now known as roflcopter`
<roflcopter`> l
roflcopter` is now known as roflcopter123
combusean has joined #ruby
shashank_rs has joined #ruby
sski has joined #ruby
JBreit has left #ruby ["Leaving"]
<certainty> oO
shime has quit [Ping timeout: 240 seconds]
<roflcopter123> d
<roflcopter123> a
dapz has joined #ruby
vlad_starkov has joined #ruby
mjs2600 has quit [Ping timeout: 240 seconds]
nateberkopec has joined #ruby
<roflcopter123> can anyone see this?
<Hanmac> maybe
<roflcopter123> do u know how to set environment path via batch file?
<roflcopter123> if im trying to use ruby off a usb with alot of computers
kyb3r_ has quit [Read error: Connection reset by peer]
koderok has joined #ruby
<certainty> ultimately you can unroll every function (well at least the pure ones) into a table. A table is data so code is data even in ruby. Sideeffects don't fit well here though :p
browndawg has joined #ruby
kyb3r_ has joined #ruby
ikaros has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
roflcopter123 has quit [Remote host closed the connection]
meatherly has joined #ruby
timonv has quit [Remote host closed the connection]
luriv has quit [Ping timeout: 245 seconds]
meatherly has quit [Ping timeout: 240 seconds]
etqqkoiflwhb has joined #ruby
kyb3r__ has joined #ruby
blackmesa has joined #ruby
kyb3r__ has quit [Client Quit]
nateberkopec has quit [Quit: Leaving...]
kyb3r_ has quit [Ping timeout: 240 seconds]
helpD has joined #ruby
shashank_rs has quit [Ping timeout: 258 seconds]
shashank_rs has joined #ruby
anaeem1 has quit [Remote host closed the connection]
nateberkopec has joined #ruby
_justin has joined #ruby
einarj has joined #ruby
i_s has joined #ruby
zigomir has joined #ruby
zigomir_ has joined #ruby
zigomir has quit [Read error: Connection reset by peer]
luriv has joined #ruby
i_s has quit [Ping timeout: 258 seconds]
jack_rabbit has joined #ruby
andrewlio has joined #ruby
_justin has quit [Quit: _justin]
shashank_rs has quit [Ping timeout: 258 seconds]
anaeem1_ has joined #ruby
LiohAu has quit [Quit: LiohAu]
crzrcn has quit [Quit: Leaving.]
nateberkopec has quit [Quit: Leaving...]
dorji has joined #ruby
dorji has left #ruby [#ruby]
senayar has quit [Remote host closed the connection]
<apeiros> certainty: just that that table might be infinite in size :)
<certainty> apeiros: yepp :)
vui has joined #ruby
kaspergrubbe has joined #ruby
<vui> what mediaplayer is written in ruby?
<certainty> i'm not aware of one
<vui> certainty, at least a music player ?
emaxi has joined #ruby
koderok has quit [Ping timeout: 265 seconds]
<certainty> vui: nope. What does your search engine of choice reveal?
ghr has joined #ruby
vui has quit [Remote host closed the connection]
emaxi has quit [Ping timeout: 240 seconds]
ironsand has joined #ruby
luriv has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
vui has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
kstuart has joined #ruby
robbyoconnor has joined #ruby
seuros has quit [Quit: Leaving.]
seuros has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
<vui> so, google flashes the above result i dont understand how to install it.
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<Nowaker> its not a music player, its music player library
ikaros has quit [Quit: Ex-Chat]
bousquet has joined #ruby
ndrei_ has joined #ruby
<vui> so, there isnt any audio/video player written entirely in ruby?
blackmesa has quit [Ping timeout: 250 seconds]
<Hanmac> vui why should there be?
<vui> just wondering ruby is such a pop language but its desktop apps are so rare.
marr has quit [Ping timeout: 240 seconds]
ndrei has quit [Ping timeout: 276 seconds]
<vui> am i right?
bousquet has quit [Ping timeout: 252 seconds]
lkba has joined #ruby
AndChat| has joined #ruby
codenapper has quit [Quit: codenapper]
vui has left #ruby [#ruby]
luriv has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
Doppp has quit [Ping timeout: 240 seconds]
Shidash has quit [Ping timeout: 240 seconds]
meatherly has joined #ruby
jamto11 has joined #ruby
senayar has joined #ruby
robustus has quit [Ping timeout: 252 seconds]
meatherly has quit [Ping timeout: 258 seconds]
kitak has quit [Remote host closed the connection]
twiceaday has joined #ruby
jamto11 has quit [Ping timeout: 240 seconds]
robustus has joined #ruby
twiceday has quit [Ping timeout: 250 seconds]
kayloos has joined #ruby
m8 has joined #ruby
spider-mario has joined #ruby
i_s has joined #ruby
eka has joined #ruby
mercwithamouth has joined #ruby
etqqkoiflwhb has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby
i_s has quit [Ping timeout: 265 seconds]
kitak has joined #ruby
dunckr has joined #ruby
mehlah has joined #ruby
etqqkoiflwhb has joined #ruby
Celm has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
etqqkoiflwhb has quit [Client Quit]
blackmesa has joined #ruby
Celm has quit [Ping timeout: 258 seconds]
mansi has quit [Ping timeout: 252 seconds]
emaxi has joined #ruby
mengu has quit []
codenapper has joined #ruby
browndawg has quit [Ping timeout: 240 seconds]
Nightmare has quit [Quit: DDoS has died, DDoS has risen, DDoS comin' again]
emaxi has quit [Ping timeout: 265 seconds]
thrillagorilla has quit [Ping timeout: 272 seconds]
nari has joined #ruby
skulker has joined #ruby
madb055 has quit [Quit: Konversation terminated!]
tonni has joined #ruby
mostlybadfly has joined #ruby
screen_da_youth has joined #ruby
yfeldblum has joined #ruby
tonni_ has quit [Ping timeout: 240 seconds]
Martxel has joined #ruby
evenix_ has joined #ruby
evenix has joined #ruby
nemesit|znc has quit [Ping timeout: 240 seconds]
carraroj has quit [Ping timeout: 245 seconds]
ironsand has quit [Ping timeout: 240 seconds]
dumdedum has joined #ruby
zigomir_ has quit [Remote host closed the connection]
<srji_> there are many iOS app out there programmed with rubymotion
zigomir has joined #ruby
sigurding has quit [Quit: sigurding]
yfeldblum has quit [Ping timeout: 240 seconds]
evenix_ has quit [Ping timeout: 240 seconds]
evenix has quit [Ping timeout: 240 seconds]
nemesit|znc has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
zigomir has quit [Ping timeout: 276 seconds]
timonv has joined #ruby
Nightmare has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
mjs2600 has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
srji_ has quit [Quit: leaving]
hoelzro has quit [K-Lined]
LBRapid has quit [K-Lined]
Nightmare has quit [K-Lined]
DarkFoxDK has quit [K-Lined]
arietis has quit [Quit: Computer has gone to sleep.]
AlSquire has joined #ruby
timonv has quit [Ping timeout: 258 seconds]
aemeredith has joined #ruby
LBRapid has joined #ruby
DarkFoxDK has joined #ruby
ntviet18 has joined #ruby
Nightmare has joined #ruby
aemeredith has quit [Client Quit]
mjs2600 has quit [Ping timeout: 240 seconds]
mrnugget has quit [Quit: mrnugget]
jmeeuwen has quit [Ping timeout: 246 seconds]
pu22l3r has joined #ruby
rylev has quit [Remote host closed the connection]
rylev has joined #ruby
dunckr has quit [Remote host closed the connection]
skulker has quit []
dumdedum has quit [Quit: foo]
ntviet18 has quit [Quit: Leaving]
andrewlio has quit [Quit: Leaving.]
pu22l3r has quit [Ping timeout: 265 seconds]
kpshek has joined #ruby
rylev has quit [Ping timeout: 252 seconds]
browndawg has joined #ruby
screen_da_youth has quit [Quit: Leaving]
srji has joined #ruby
dunckr has joined #ruby
shime has joined #ruby
ntviet18 has joined #ruby
kpshek has quit []
kyle_ has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
dunckr has quit [Remote host closed the connection]
_5kg has quit [Quit: WeeChat 0.4.3]
_5kg has joined #ruby
yubrew has joined #ruby
_5kg has quit [Client Quit]
_5kg has joined #ruby
i_s has joined #ruby
havenwood has quit []
senayar_ has joined #ruby
kyle_ has joined #ruby
yubrew has quit [Ping timeout: 245 seconds]
senayar has quit [Ping timeout: 252 seconds]
i_s has quit [Ping timeout: 258 seconds]
senayar_ has quit [Ping timeout: 258 seconds]
einarj has quit [Remote host closed the connection]
Celm has joined #ruby
glanzi has joined #ruby
einarj has joined #ruby
atno has quit [Remote host closed the connection]
emaxi has joined #ruby
gigetoo has quit [Remote host closed the connection]
Celm has quit [Ping timeout: 252 seconds]
einarj has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
emaxi has quit [Ping timeout: 265 seconds]
anaeem1_ has quit [Remote host closed the connection]
Megtastique has joined #ruby
anaeem1 has joined #ruby
Iniesta8 has joined #ruby
mrmargolis has joined #ruby
AndChat| has quit [Ping timeout: 265 seconds]
sepp2k has joined #ruby
mikecmpbll has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
anaeem1 has quit [Ping timeout: 250 seconds]
chrisseaton has joined #ruby
rylev has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
BizarreCake has joined #ruby
bousquet has joined #ruby
polysics has joined #ruby
ghr has joined #ruby
momomomomo has joined #ruby
Guedes0 has joined #ruby
rylev has quit [Ping timeout: 240 seconds]
bousquet has quit [Ping timeout: 240 seconds]
pu22l3r has joined #ruby
yfeldblum has joined #ruby
ghr has quit [Ping timeout: 245 seconds]
kirun has joined #ruby
ashleyis1 has quit [Ping timeout: 265 seconds]
_justin has joined #ruby
WanderingGlitch has quit [Ping timeout: 276 seconds]
phoo1234567 has joined #ruby
ironsand has joined #ruby
yfeldblum has quit [Ping timeout: 258 seconds]
decoponyo has joined #ruby
ndngvr has joined #ruby
rylev has joined #ruby
AlSquirrel has joined #ruby
rodasc has joined #ruby
mven_ has joined #ruby
AlexRussia has joined #ruby
Nilium has quit [Disconnected by services]
marcdel_ has joined #ruby
Nilium has joined #ruby
nomadic_ has joined #ruby
RowdyChiz has joined #ruby
iaj_ has joined #ruby
ironsand has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
sambao21 has joined #ruby
baweaver has joined #ruby
pu22l3r has quit [Remote host closed the connection]
myke_ has joined #ruby
emdub_ has joined #ruby
perry has joined #ruby
jdahm_ has joined #ruby
bricker_ has joined #ruby
eval-in__ has joined #ruby
<certainty> ph88: normally methods ending in ! indicate that they're useful because of their side-effect and not their return value. I can imagine that this particular method is named this way because it sets the @bitset ivar
perry is now known as Guest95164
renier has quit [Read error: Connection reset by peer]
_justin has quit [Ping timeout: 250 seconds]
renier has joined #ruby
chihhsin1wego has joined #ruby
<ph88> ok thx certainty , i have another question though
<certainty> that's just a guess though and also that convention is not followed rigidly
Killerkeksdose_ has joined #ruby
axisys_ has joined #ruby
<ph88> how can unpack be called on a hash ?
[BNC]pagioss has joined #ruby
haroldwu_ has joined #ruby
jonathanwallace_ has joined #ruby
agjacome has quit [Ping timeout: 250 seconds]
<certainty> ph88: i don't know. I only know String#unpack
combusean has quit [Ping timeout: 252 seconds]
tonni_ has joined #ruby
<ph88> i thought marshal_dump[:data] returns a hash
qhartman_ has joined #ruby
<lxsameer> is it possible to define instance_variables in side class_methods ?
pdtpatri1k has joined #ruby
kalyx_ has joined #ruby
spyderman4g63 has joined #ruby
Morkel has joined #ruby
<certainty> lxsameer: yes, those are then instance variables of the class
phoo1234567 has quit [*.net *.split]
BizarreCake has quit [*.net *.split]
AlSquire has quit [*.net *.split]
tonni has quit [*.net *.split]
nari has quit [*.net *.split]
marcdel has quit [*.net *.split]
decoponio has quit [*.net *.split]
pagioss has quit [*.net *.split]
jetblack_ has quit [*.net *.split]
spyderma_ has quit [*.net *.split]
Lemur has quit [*.net *.split]
kalyx has quit [*.net *.split]
snath has quit [*.net *.split]
pdtpatrick has quit [*.net *.split]
axisys has quit [*.net *.split]
nomadic has quit [*.net *.split]
qhartman has quit [*.net *.split]
bricker has quit [*.net *.split]
emdub has quit [*.net *.split]
haroldwu has quit [*.net *.split]
Killerkeksdose has quit [*.net *.split]
RowdyChild|Away has quit [*.net *.split]
iaj has quit [*.net *.split]
mven has quit [*.net *.split]
crodas has quit [*.net *.split]
xargoon has quit [*.net *.split]
JZTech101 has quit [*.net *.split]
eval-in_ has quit [*.net *.split]
jdahm has quit [*.net *.split]
crazysim has quit [*.net *.split]
jonathanwallace has quit [*.net *.split]
freggles has quit [*.net *.split]
chihhsin_wego has quit [*.net *.split]
CJD14__ has quit [*.net *.split]
frode15243 has quit [*.net *.split]
zrl_ has quit [*.net *.split]
yxhuvud has quit [*.net *.split]
ndngvr` has quit [*.net *.split]
myke has quit [*.net *.split]
Kabaka_ has quit [*.net *.split]
d33tah has quit [*.net *.split]
FL1SK has quit [*.net *.split]
noocode has quit [*.net *.split]
jonathanwallace_ is now known as jonathanwallace
ValicekB has joined #ruby
vlad_starkov has joined #ruby
JZTech101 has joined #ruby
xargoon has joined #ruby
<certainty> ph88: this marshal_dump does, yes. It has two keys len and data
crazysim has joined #ruby
<certainty> :len and :data actually
<ph88> so what does unpack do on it ?
msch has quit []
<certainty> ph88: depends on how it's implemented.
klaut has quit [Remote host closed the connection]
<ph88> o_O
<certainty> ph88: normally Hash doesn't define #unpack
msch has joined #ruby
<certainty> if it's used there it has been added there somewhere
msch is now known as Guest99456
jetblack has joined #ruby
pu22l3r has joined #ruby
<ph88> i don't know either, i'm trying to port this code
<certainty> that particular implementation I don't know. I'd search for the definition
noocode has joined #ruby
dunckr has joined #ruby
<certainty> ph88: i would assume that it unpacks the value of :data
codenapper has quit [Quit: codenapper]
zrl_ has joined #ruby
rylev has quit [Remote host closed the connection]
nari has joined #ruby
<certainty> lxsameer: it may help you if you know that the class is an instance too
rylev has joined #ruby
lxsameer has quit [Quit: Leaving]
phoo1234567 has joined #ruby
_justin has joined #ruby
BizarreCake has joined #ruby
d33tah has joined #ruby
CJD14__ has joined #ruby
rylev has quit [Read error: Connection reset by peer]
frode15243 has joined #ruby
rylev has joined #ruby
jamto11 has joined #ruby
snath has joined #ruby
yxhuvud has joined #ruby
yubrew has joined #ruby
jason_ has quit [Remote host closed the connection]
Kabaka_ has joined #ruby
jason_ has joined #ruby
zets has joined #ruby
tesuji has joined #ruby
jamto11 has quit [Ping timeout: 240 seconds]
yubrew has quit [Ping timeout: 245 seconds]
jason_ has quit [Ping timeout: 252 seconds]
<ph88> certainty: again a question about this line https://github.com/NYTimes/tamper/blob/master/encoders/ruby/lib/tamper/pack.rb#L55 does it return something or where is the output stored ?
helpD has quit [Remote host closed the connection]
mrmargolis has quit [Remote host closed the connection]
helpD has joined #ruby
i_s has joined #ruby
rylev has quit [Remote host closed the connection]
rylev has joined #ruby
ironsand has joined #ruby
nolic has joined #ruby
arietis has joined #ruby
emaxi has joined #ruby
helpD has quit [Ping timeout: 252 seconds]
i_s has quit [Ping timeout: 250 seconds]
koderok has joined #ruby
browndawg has quit [Ping timeout: 245 seconds]
rylev has quit [Ping timeout: 250 seconds]
<zets> ph88: that's just returning a symbol
<ph88> oh ok thx
sidik has joined #ruby
<zets> in ruby, the last result in a function is implicitly returned
kyle_ has quit [Ping timeout: 245 seconds]
r_rios has joined #ruby
Celm has joined #ruby
SHyx0rmZ has joined #ruby
emaxi has quit [Ping timeout: 245 seconds]
rylev_ has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
Celm has quit [Ping timeout: 258 seconds]
lyanchih_ has joined #ruby
<rdgawdzi> I am doing the Ruby Koans, and I do not understand why the following is false:
<rdgawdzi> hash = Hash.new([]) hash[:one] << "uno" hash[:two] << "dos" assert_equal ["uno"], hash[:one]
helpD has joined #ruby
zigomir has joined #ruby
<rdgawdzi> Fixed: hash = Hash.new([]); hash[:one] << "uno"; hash[:two] << "dos"; assert_equal ["uno"], hash[:one];
sidik has quit [Ping timeout: 276 seconds]
dunckr has quit []
<rdgawdzi> The correct answer is assert_equal( ["uno", "dos"], hash[:one]) btw
phinfonet has joined #ruby
ghr has joined #ruby
donnoc has joined #ruby
advorak has joined #ruby
<zets> ph88: that's defined on every Pack class, it looks like
<zets> with the intent of being able to call it on anything that inherits from Pack
<ph88> have you tried this library by any chance ?
<zets> and... for one class, they didn't need it to do anything :p
<ph88> :D
<zets> nope, never looked at it before
Iniesta8 has quit [Quit: Textual IRC Client: www.textualapp.com]
cassioscabral has joined #ruby
timonv has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
mosez has quit [Ping timeout: 252 seconds]
browndawg has joined #ruby
popl has quit [Ping timeout: 258 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
_tpavel has joined #ruby
_tpavel has quit [Client Quit]
_tpavel has joined #ruby
yfeldblum has joined #ruby
_tpavel has quit [Client Quit]
_tpavel has joined #ruby
mosez has joined #ruby
chrisseaton has quit []
arietis has joined #ruby
_tpavel has quit [Client Quit]
_tpavel has joined #ruby
_sambao21 has joined #ruby
_tpavel has quit [Client Quit]
_tpavel has joined #ruby
weems has quit [Read error: Connection reset by peer]
weems has joined #ruby
weems has quit [Changing host]
weems has joined #ruby
sambao21 has quit [Ping timeout: 276 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
AntelopeSalad has quit [Read error: Connection reset by peer]
Martxel has quit [Read error: Connection reset by peer]
AntelopeSalad has joined #ruby
_tpavel has quit [Client Quit]
_tpavel has joined #ruby
kyle_ has joined #ruby
_tpavel has quit [Remote host closed the connection]
_tpavel has joined #ruby
sski has quit [Remote host closed the connection]
_tpavel has quit [Client Quit]
sski has joined #ruby
Iniesta8 has joined #ruby
Dwarf has quit [Ping timeout: 245 seconds]
_justin has quit [Quit: _justin]
sski has quit [Ping timeout: 245 seconds]
kyle_ has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
<certainty> rdgawdzi: i don't think that that's the correct answer to the code you showed. You're shifting the values into the arrays at two different places. It's more along the lines: Hash.new([]).tap{ |h| h[:one] << "uno"; h[:one] << "dos" }; ...
yubrew has joined #ruby
Guest99456 is now known as msch
<shevy> In the past I often wrote
<shevy> code more
<shevy> now I have changed my mind
gry has left #ruby [#ruby]
<shevy> code less
anaeem1_ has joined #ruby
<certainty> shevy: that's good. You progress :)
_justin has joined #ruby
mikecmpbll has joined #ruby
anaeem___ has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
AlexRussia has quit [Remote host closed the connection]
AlexRussia has joined #ruby
<shevy> hmm
<shevy> does ruby have a useful math library in regards to statistics? but also including generating graphs
yubrew has quit [Ping timeout: 276 seconds]
anaeem1_ has quit [Ping timeout: 240 seconds]
kyle_ has joined #ruby
jxf has joined #ruby
<certainty> shevy: i bet it has R-bindings
<shevy> hehe
<shevy> I am trying to not have to use R!
anaeem___ has quit [Ping timeout: 245 seconds]
<certainty> shevy: well then probably an octave binding
kitak has quit [Remote host closed the connection]
kitak_ has joined #ruby
randomnick_ has joined #ruby
srji has quit [Quit: leaving]
pika_pika has joined #ruby
Iniesta8 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arianit has joined #ruby
arianit has quit [Changing host]
arianit has joined #ruby
ashleyis1 has joined #ruby
Royalb15 has quit [Read error: Connection reset by peer]
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
emaxi has joined #ruby
polysics has left #ruby [#ruby]
vlad_starkov has quit [Remote host closed the connection]
tesuji has quit [Read error: Connection reset by peer]
i_s has joined #ruby
<zets> shevy: there's probably some stuff, but nothing I can think of off of the top of my head... js has some pretty nice libraries
<shevy> ph88 may depend what chunk is, but you invoke the [] method here
Martxel has joined #ruby
tesuji has joined #ruby
<ph88> isn't [] for selecting a particular thing ?
<randomnick_> http://pastie.org/9093369 how to fix it?
<ph88> what should i google to find the docs for the [] method ?
emaxi has quit [Ping timeout: 250 seconds]
<zets> ph88: it depends on the context
<ph88> maybe it's like array splice ?
<zets> what's probably happening is that it's calling the chunk method and passing an array to chunk
Guest__ has joined #ruby
<ph88> hhmm i thought chunk was a variable here
timonv has joined #ruby
Guest__ has quit [Client Quit]
<zets> in ruby, parentheses are often optional, so it's the same as chunk([0, chunk.length - run_len])
sigurding has joined #ruby
Es0teric has joined #ruby
CorpusCallosum has joined #ruby
<ph88> oh
<zets> wait
<zets> I'm wrong lol
<shevy> ph88 sure it is a variable but what "type" is it - an Array? a String? a custom object that has the [] method defined?
i_s has quit [Ping timeout: 240 seconds]
<zets> yeah that's a variable, it's probably enumerable so it's probably grabbing part of it
ezrios has joined #ruby
<ph88> so it's alike an array splice then ?
<zets> yeah
<shevy> ph88 for string and array, it is typical to use [] to specify start and end range. so [0,3] would translate to "gimme the first 3 chars, ma!"
<ph88> cool thx
<zets> I could be wrong, I'd need to follow the code a bit mroe
<zets> but that's most likely what's happening there
<shevy> that code looks like a mess
luriv has quit [Ping timeout: 240 seconds]
<ph88> lol
<ph88> written by NYTimes
<ph88> not defneding them
<shevy> elsif !(chunk.nil? || chunk.empty?)
<ph88> but if it's a mess (i dont know) it's remarkable
<zets> naw, this code is fine
<zets> I've seen MUCH worse
<shevy> if (@output.length % 8) > 0
<zets> NYTimes' dev team is really impressive
<shevy> lol
<shevy> they are TOTALLY AWESOME!!!
<ph88> how do i find out wether chunk is a string or an array
<shevy> control_seq = '00000001'
<shevy> control_seq += offset.to_s(2).rjust(32)
<shevy> except that << would be faster than +=
<shevy> so perhaps they are not so awesome
<shevy> ph88 invoke .class on it
Celm has joined #ruby
<ph88> oki
<zets> @jashkenas works there
<ph88> and then how to display it ? print ?
<shevy> I only know people here on #ruby
<zets> oh
<shevy> ph88 yeah or just p
zets has left #ruby [#ruby]
<shevy> p object; p object.class
zets has joined #ruby
<zets> oops
ntviet18 has quit [Remote host closed the connection]
<shevy> I always wonder about __class__ and __main__ here
<zets> um, jeremy ashkenas wrote coffeescript and backbone.js
_sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy> those are bots right?
<zets> he's really prolific
<shevy> now we know you come from javascript :)
<zets> naw
<zets> I hate js
<shevy> hehe
tris has quit [Ping timeout: 252 seconds]
<zets> ruby is <3
<zets> but I respect js, it's what I use a lot for my day job
bousquet has joined #ruby
srji has joined #ruby
Celm has quit [Ping timeout: 258 seconds]
bousquet has quit [Ping timeout: 252 seconds]
shashank_rs has joined #ruby
kayloos_ has joined #ruby
Es0teric has quit [Remote host closed the connection]
kayloos has quit [Ping timeout: 240 seconds]
sski has joined #ruby
sambao21 has joined #ruby
luriv has joined #ruby
zets has quit [Quit: Now if you will excuse me, I have a giant ball of oil to throw out my window]
kyle_ has quit [Ping timeout: 240 seconds]
<shevy> hmm
<shevy> on rubygems.org
<shevy> individual gems can have a "badge"
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> does anyone of you have actual experience with this?
Tomasso has joined #ruby
SilkFox has quit [Ping timeout: 246 seconds]
<certainty> shevy: with these badges?
<shevy> yeah, and using them in your ruby projects too of course :)
<certainty> x align
<certainty> argh
<shevy> huh?
<certainty> shevy: I don't use it but I don't have many public ruby gems :) I think I've seen it on github though
donnoc has quit [Ping timeout: 240 seconds]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
jason_ has joined #ruby
<shevy> kk
<shevy> now we have the impossible task of trying to find someone who uses it
zorak8 has quit [Ping timeout: 245 seconds]
zorak8 has joined #ruby
yfeldblum has joined #ruby
ndrei_ has quit [Quit: leaving]
ndrei has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
moritzs has quit [Ping timeout: 250 seconds]
Guedes0 has quit [Quit: Saindo]
_justin has quit [Ping timeout: 258 seconds]
Guedes0 has joined #ruby
zcreative has joined #ruby
jason_ has quit [Ping timeout: 276 seconds]
mikecmpbll has quit [Read error: Connection reset by peer]
sdouglas has joined #ruby
cina has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
rylev_ has quit [Remote host closed the connection]
kyle_ has joined #ruby
charliesome has joined #ruby
browndawg has quit [Quit: Leaving.]
sdouglas has quit [Ping timeout: 245 seconds]
okdas has joined #ruby
tesuji has joined #ruby
spacebug has quit [Ping timeout: 250 seconds]
vlad_starkov has joined #ruby
Milly_Bays has quit [Ping timeout: 245 seconds]
rylev has joined #ruby
_justin has joined #ruby
yubrew has joined #ruby
Speed has joined #ruby
kyle_ has quit [Ping timeout: 252 seconds]
<shevy> who or what defines the gem() method?
_justin has quit [Client Quit]
kyle_ has joined #ruby
lukec has joined #ruby
Avahey_ has joined #ruby
<apeiros> rubygems
yubrew has quit [Ping timeout: 250 seconds]
eka has joined #ruby
meatherly has joined #ruby
claymore has quit [Quit: Leaving]
<shevy> ok
Tomasso has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 250 seconds]
<shevy> :run is a symbol
ashleyis1 has quit [Ping timeout: 246 seconds]
<ph88> i've read the docs about symbol but i don't understand what it is and what it's used for
<shevy> it is passed to control_code() as first argument
<ph88> where does it come from anyway ?
<shevy> where does it come from?
<shevy> from the guy who wrote the code :)))
<shevy> a symbol will always be the same
<shevy> a string can be different
<ph88> oh so it's like a constant then ?
<shevy> >> 'x'.object_id == 'x'.object_id
<eval-in__> shevy => false (https://eval.in/138619)
<shevy> >> :x.object_id == :x.object_id
<shevy> stupid bot!
<shevy> >> :x.object_id == :x.object_id
<eval-in__> shevy => true (https://eval.in/138620)
meatherly has quit [Ping timeout: 245 seconds]
<shevy> ph88 well not completely, a constant in ruby must start with upcased character, like Foo
jamto11 has joined #ruby
<shevy> you can have symbol :Foo too but it will be a symbol, not a constant
linojon has joined #ruby
<ph88> :/
<shevy> ph88 if it helps you, you can think of :run as a faster version of 'run' :D
seuros has quit [Ping timeout: 252 seconds]
emaxi has joined #ruby
`MArceLL` has quit [Ping timeout: 246 seconds]
CorpusCallosum has quit [Ping timeout: 250 seconds]
jamto11 has quit [Ping timeout: 240 seconds]
evenix_ has joined #ruby
evenix has joined #ruby
decoponio has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
i_s has joined #ruby
<apeiros> ph88: a constant is a kind of variable. variables reference objects
<apeiros> ph88: a symbol is a kind of object
<apeiros> and :foo is a symbol literal. just like "foo" is a string literal, and 12 is an integer literal
emaxi has quit [Ping timeout: 245 seconds]
nfk has quit [Remote host closed the connection]
ashleyis1 has joined #ruby
nfk has joined #ruby
decoponyo has quit [Ping timeout: 258 seconds]
Solnse has joined #ruby
evenix has quit [Remote host closed the connection]
evenix_ has quit [Remote host closed the connection]
mrmargolis has joined #ruby
evenix has joined #ruby
evenix_ has joined #ruby
pika_pika has quit [Ping timeout: 240 seconds]
i_s has quit [Ping timeout: 240 seconds]
zigomir has quit [Remote host closed the connection]
advorak has quit [Ping timeout: 258 seconds]
tesuji has quit [Ping timeout: 240 seconds]
evenix has quit [Ping timeout: 252 seconds]
evenix_ has quit [Ping timeout: 258 seconds]
mrmargolis has quit [Ping timeout: 258 seconds]
pu22l3r has quit [Remote host closed the connection]
luriv has quit [Ping timeout: 240 seconds]
<gizmore> #rails is invite only? Oo
GlenK has joined #ruby
Celm has joined #ruby
einarj has joined #ruby
<GlenK> hi. coming from C/C++ I'm still struggling with doing things the ruby way. I'm thinking this loop is sucky, and maybe someone could give me some pointers? http://fpaste.org/95388/
banister has joined #ruby
<apeiros> gizmore: no, but you need to be registered
<apeiros> that is, your nick, on freenode
<gizmore> > You are already logged in as Gizmore.
<apeiros> GlenK: the ruby way starts with using gist ;-p
<GlenK> apeiros: I don't follow
<apeiros> GlenK: gist.github.com instead of fpaste.org
<GlenK> oh, a pastebin?
<GlenK> ha, yeah
<apeiros> ;-)
<GlenK> whatever. haha
<apeiros> GlenK: give me a minute
bousquet has joined #ruby
rippa has joined #ruby
Es0teric has joined #ruby
skulker has joined #ruby
metamaterial has joined #ruby
davedev24 has joined #ruby
<apeiros> each_line will stop at EOF, puts call to_s on the arguments passed
<apeiros> line.chomp.split.map(&:to_i) is IMO quite OK too
<apeiros> I wrote a different version just to show an alternative. I'd probably prefer chomp.split
Celm has quit [Ping timeout: 258 seconds]
<apeiros> ah, and puts appends a newline
<GlenK> nice, thanks. assuming I want to throw away the first line...?
einarj has quit [Ping timeout: 276 seconds]
<apeiros> oh
<apeiros> tricky, but can do
<apeiros> lines = $stdin.each_line; lines.next; lines.each do |line| …
<GlenK> I was just going with simply "gets"
davedev2_ has quit [Ping timeout: 240 seconds]
<apeiros> actually…
<apeiros> you can just use the code I wrote and prepend a `gets`
<apeiros> yeah
<GlenK> sweet. thanks a lot
bousquet has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Remote host closed the connection]
jetblack has quit [Quit: leaving]
jetblack has joined #ruby
_tpavel has joined #ruby
charlies_ has joined #ruby
Es0teric_ has joined #ruby
_tpavel has quit [Client Quit]
AZen has quit []
charliesome has quit [Ping timeout: 240 seconds]
donnoc has joined #ruby
Es0teric has quit [Ping timeout: 250 seconds]
noop has quit [Ping timeout: 276 seconds]
lukec has quit [Quit: lukec]
skulker has quit []
luriv has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
skulker has joined #ruby
skulker has quit [Client Quit]
<GlenK> apeiros: so I'm doing this programming practice thing called code abbey. This particuclar problem was to sum the numbers on each line. Once you solve whatever then you can view other people's solutions.
tesuji has joined #ruby
<GlenK> apeiros: check out this madness: http://fpaste.org/95389/
Speed has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby
_tpavel has joined #ruby
_tpavel has quit [Read error: Connection reset by peer]
shime has quit [Ping timeout: 252 seconds]
<GlenK> some other guys solution. haha, I guess what I'm trying to say, even coming from C, maybe my ruby isn't too terrible at this point. haha. Anyhow, cheers.
_tpavel has joined #ruby
cina has quit [Remote host closed the connection]
cina has joined #ruby
danshultz has joined #ruby
yfeldblum has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
seuros has joined #ruby
_tpavel has quit [Client Quit]
Speed has joined #ruby
jxf has quit [Ping timeout: 250 seconds]
sski has quit [Remote host closed the connection]
ziyadb_ has quit [Quit: Connection closed for inactivity]
shashank_rs has quit [Ping timeout: 258 seconds]
vlad_starkov has joined #ruby
noop has joined #ruby
mikecmpbll has joined #ruby
kaspergrubbe has joined #ruby
Dwarf has joined #ruby
sski has joined #ruby
yubrew has joined #ruby
cina has quit [Remote host closed the connection]
Dwarf has quit [Client Quit]
yfeldblum has quit [Ping timeout: 240 seconds]
s3ri0us has joined #ruby
arietis has joined #ruby
sski has quit [Ping timeout: 240 seconds]
skulker has joined #ruby
skulker has left #ruby [#ruby]
WilfredTheGreat has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
Guedes0 has quit [Ping timeout: 245 seconds]
mjs2600 has joined #ruby
jason_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
momomomomo has quit [Quit: momomomomo]
happytux_ has joined #ruby
<happytux_> Now I am eager to know _what_ is wrong about this: http://pastebin.com/2uXN7YUx
sigurding has quit [Quit: sigurding]
<happytux_> Gemfile: http://pastebin.com/AKTzZQZG
<happytux_> What is wrong?!!!
<happytux_> Why can't find it facter? Is there a dependency problem in offial ruby gem repository?
andy____ has joined #ruby
vlad_starkov has quit [Ping timeout: 258 seconds]
mjs2600 has quit [Ping timeout: 240 seconds]
Thanatermesis has left #ruby ["ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ"]
vlad_starkov has joined #ruby
sigurding has joined #ruby
cina has joined #ruby
cina has quit [Remote host closed the connection]
tzhuang has joined #ruby
jxf has joined #ruby
<GlenK> happytux_: try gem update maybe? I got no idea really
donnoc has quit [Ping timeout: 276 seconds]
<happytux_> I found some issue in github where they write one should downgrade until the issue has been resolved.
<happytux_> hm
mikecmpbll has quit [Quit: i've nodded off.]
blackavr has joined #ruby
CorpusCallosum has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
emaxi has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
pwh has joined #ruby
glanzi has quit [Remote host closed the connection]
cina has joined #ruby
chipotle has joined #ruby
cina has quit [Remote host closed the connection]
emaxi has quit [Ping timeout: 245 seconds]
<apeiros> GlenK: that looks javaish :-D
<apeiros> boilerplatomatic
agjacome has joined #ruby
relix has joined #ruby
michael_lee has joined #ruby
centrex has joined #ruby
ashleyis1 has quit [Ping timeout: 258 seconds]
twiceday has joined #ruby
i_s has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
Soda has joined #ruby
pu22l3r has joined #ruby
relix has quit [Ping timeout: 250 seconds]
ashleyis1 has joined #ruby
blackavr has quit [Quit: blackavr]
twiceaday has quit [Ping timeout: 240 seconds]
relix has joined #ruby
i_s has quit [Ping timeout: 240 seconds]
<shevy> hehe
saarinen has joined #ruby
koderok has quit [Ping timeout: 265 seconds]
<shevy> gizmore, you must register and identify at freenode net, then you can join the channel called #rubyonrails
cjsarette has joined #ruby
<gizmore> hmm thx
<gizmore> no idea why i used #rails
<gizmore> it used to work thoug
IceDragon has joined #ruby
rylev has quit [Remote host closed the connection]
opensky has joined #ruby
opensky has quit [Excess Flood]
einarj has joined #ruby
yfeldblum has joined #ruby
opensky has joined #ruby
opensky has quit [Excess Flood]
ringaring has joined #ruby
arietis has joined #ruby
mansi has joined #ruby
cjsarette has quit [Ping timeout: 258 seconds]
GlenK has quit []
mary5030 has joined #ruby
centrex has quit []
ashleyis1 has quit [Ping timeout: 240 seconds]
mansi has quit [Ping timeout: 240 seconds]
iamjarvo has joined #ruby
sailias has joined #ruby
butblack has joined #ruby
shashank_rs has joined #ruby
sdouglas has joined #ruby
<shevy> #ruby isn't the official IRC channel either
toastynerd has joined #ruby
<shevy> it's #ruby-lang
<shevy> I don't think newcomers expect things to be different like that
ponga has quit [Quit: Leaving :)]
mansi has joined #ruby
bogeyd6 has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hanmac> there is also #ruby-dev but thats a different story
eynj has joined #ruby
holomorph has joined #ruby
holomorph has left #ruby [#ruby]
mary5030 has quit [Remote host closed the connection]
charlies_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mostlybadfly has joined #ruby
mary5030 has joined #ruby
freerobby has joined #ruby
eynj has quit [Client Quit]
mikecmpbll has quit [Quit: i've nodded off.]
sdouglas has quit [Ping timeout: 276 seconds]
mary5030 has quit [Ping timeout: 250 seconds]
freerobby has quit [Ping timeout: 258 seconds]
yubrew has joined #ruby
lagweezle has quit [Quit: leaving]
Kricir has joined #ruby
bousquet has joined #ruby
zcreative has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Iniesta8 has joined #ruby
lagweezle has joined #ruby
yubrew has quit [Ping timeout: 258 seconds]
s3ri0us is now known as s3ri0us|away
lkba has joined #ruby
Ashi_ has quit []
Milly_Bays has joined #ruby
sailias has quit [Ping timeout: 245 seconds]
amclain has joined #ruby
Milly_Bays has quit [Client Quit]
mansi has quit [Remote host closed the connection]
okdas has quit [Ping timeout: 252 seconds]
chrisseaton has joined #ruby
ixti has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
Guedes0 has joined #ruby
lw has joined #ruby
ehc has joined #ruby
etqqkoiflwhb has joined #ruby
SCommette has joined #ruby
blackavr has joined #ruby
ringaring has quit [Quit: Leaving]
The_NetZ has joined #ruby
<The_NetZ> suppose you have a class in c++; can one make the ruby initialize method produce one of those?
jason_ has quit [Remote host closed the connection]
meatherly has joined #ruby
arietis has joined #ruby
jason_ has joined #ruby
s3ri0us|away is now known as s3ri0us
phansch has joined #ruby
ghr has quit [Read error: No route to host]
_justin has joined #ruby
Es0teric_ has quit [Quit: Computer has gone to sleep.]
ghr has joined #ruby
donnoc has joined #ruby
workmad3 has joined #ruby
iamjarvo has quit [Ping timeout: 250 seconds]
omosoj has joined #ruby
quitobro has joined #ruby
jason_ has quit [Ping timeout: 252 seconds]
meatherly has quit [Ping timeout: 276 seconds]
sailias has joined #ruby
jamto11 has joined #ruby
jmeeuwen has joined #ruby
toastynerd has quit [Remote host closed the connection]
lw has quit [Quit: s]
wiscas is now known as dev1x
pika_pika has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
kreisys has quit [Quit: Computer has gone to sleep.]
jamto11 has quit [Ping timeout: 240 seconds]
chris_thomson has joined #ruby
iamjarvo has joined #ruby
rippa has quit [Ping timeout: 276 seconds]
ktosiek has joined #ruby
<shevy> Hanmac this is a question for you ^^^
i_s has joined #ruby
Es0teric has joined #ruby
<Hanmac> The_NetZ depends ... does the class has a DefaultConstructor or not?
<shevy> hey Hanmac I am producing Hanmac-code, look at what I just wrote:
<shevy> _.dataset.each_with_index {|(key, *), index|
<The_NetZ> Hanmac: will; in fact this is a question related to our respective projects
<The_NetZ> Hanmac: see, I just need to be certain that the object is available on both sides
bbloom has quit [Ping timeout: 250 seconds]
<Hanmac> for good working with ruby the C++ class need to have a 2-step constructor or similar, that means: DefaultConstructor + Create/Init or other method
<shevy> a mirror!
s3ri0us has quit [Quit: Leaving...]
Kricir has quit [Remote host closed the connection]
<The_NetZ> Hanmac: so, Foo::Foo and Foo::new(Foo::Foo(args)) or something like that?
Lightstalker has quit [Quit: leaving]
<The_NetZ> and define the initialize method as the Foo::new method?
ashleyis1 has joined #ruby
ktosiek has quit [Ping timeout: 240 seconds]
i_s has quit [Ping timeout: 258 seconds]
tesuji has joined #ruby
linojon has quit [Quit: linojon]
poguez_ has quit [Quit: Connection closed for inactivity]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
benzrf|offline is now known as benzrf
<Hanmac> The_NetZ: see this class: http://docs.wxwidgets.org/trunk/classwx_image.html#a37e70a8f9c684974c9c54f43f5e60a3f ... look at the Create methods and see how they look like the Constructors (because the other constructors are calling the Create methods) ... your class need that too so the init method you define can call the Create methods
helpD has quit [Remote host closed the connection]
<The_NetZ> Hanmac: interesting
helpD has joined #ruby
<benzrf> maaan
<The_NetZ> benzrf: ?
jameswlane has joined #ruby
jameswlane has quit [Max SendQ exceeded]
omosoj has quit [Ping timeout: 240 seconds]
jameswlane has joined #ruby
<shevy> when do you guys use @ivars
<shevy> and when do you guys instead use a hash
<shevy> that acts @ivar-like
<The_NetZ> ¯\(º_o)/¯
Morkel_ has joined #ruby
<shevy> I am having a Character class that has a bunch of data - inventory, armours, money, char-growth related attributes etc... right now I keep track of these in @ivars
Morkel has quit [Ping timeout: 240 seconds]
Morkel_ is now known as Morkel
x77686d has joined #ruby
helpD has quit [Ping timeout: 245 seconds]
Celm has joined #ruby
<canton7> I don't like using a dictionary when I should have something explicit. in your example, I'd definitely stay clear of a dictionary
<canton7> s/dictionary/hash/
butblack has quit [Quit: butblack]
sepp2k has quit [Quit: Leaving.]
<benzrf> canton7: new to ruby from python?
<benzrf> :-)
etqqkoiflwhb has quit [Ping timeout: 252 seconds]
<shevy> benzrf did you get that guy that thinks getting a PM from you is like winning an oscar?
butblack has joined #ruby
<benzrf> i read the logs ;-;
<benzrf> u hurt my feelings
ace_striker has joined #ruby
kies has quit [Quit: baaaaiiiiiiiiiii~]
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
ace_striker has quit [Changing host]
<benzrf> shevy: perhaps you could create classes for some of these sets of ivars
<benzrf> like inventory n stuff
Celm has quit [Ping timeout: 258 seconds]
<benzrf> then have fewer ivars & delegate some methods
<benzrf> sounds like it might be a bit of a god object atm
<benzrf> also im 17 not 16 >:{
ashleyis1 has quit [Ping timeout: 258 seconds]
etqqkoiflwhb has joined #ruby
<shevy> well the classes would then have to store the data in an @ivar or?
<benzrf> well yeah
<benzrf> but it would be /their/ ivar
momomomomo has joined #ruby
<canton7> benzrf, do a lot of C#
<benzrf> if u have more than like 5-7 ivars ur probably seeing a god object</baseless_opinion>
jason_ has joined #ruby
jason_ has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
<benzrf> well, a mild one
jason_ has joined #ruby
<canton7> demigod object
<benzrf> i like that one
<benzrf> you could at least use a struct to store some of them
<benzrf> grouping tends to make things more compartmentalized
<benzrf> by definition!
sdouglas has joined #ruby
butblack has quit [Quit: butblack]
mansi has joined #ruby
sigurding has joined #ruby
yubrew has joined #ruby
jason_ has quit [Ping timeout: 276 seconds]
banister has joined #ruby
freerobby has joined #ruby
r_rios has quit [Quit: No Ping reply in 180 seconds.]
<mozzarella> I want to code a website in ruby… not sure if I should use rails or sinatra
butblack has joined #ruby
arianit has quit [Quit: Ex-Chat]
cina has joined #ruby
Royalb15_1 has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
rylev has joined #ruby
<shevy> mozzarella sinatra!
<shevy> because it is super simple
<shevy> and padrino I suppose if you need more, but I have not used that one yet
havenwood has joined #ruby
butblack has quit [Client Quit]
yubrew has quit [Ping timeout: 240 seconds]
jameswlane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Ping timeout: 252 seconds]
cina has quit [Remote host closed the connection]
`MArceLL` has joined #ruby
Kricir has joined #ruby
cina has joined #ruby
koderok has joined #ruby
etqqkoiflwhb has quit [Quit: Computer has gone to sleep.]
quitobro has quit [Remote host closed the connection]
bousquet has quit [Remote host closed the connection]
etqqkoiflwhb has joined #ruby
bousquet has joined #ruby
evenix has joined #ruby
evenix_ has joined #ruby
ehc has quit [Quit: ehc]
cina has quit [Remote host closed the connection]
jason_ has joined #ruby
jason_ has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 276 seconds]
jason_ has joined #ruby
omosoj has joined #ruby
Iniesta8 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bousquet has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
SonicX has joined #ruby
bousquet has joined #ruby
klaut has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
momomomomo has quit [Quit: momomomomo]
jason_ has quit [Ping timeout: 240 seconds]
cj3kim has joined #ruby
quitobro has joined #ruby
cj3kim has quit [Remote host closed the connection]
Iniesta8 has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
cina has joined #ruby
robbyoconnor has joined #ruby
etqqkoiflwhb has quit [Ping timeout: 245 seconds]
<mozzarella> I'll use padrino I think
cina has quit [Remote host closed the connection]
andrewlio has joined #ruby
mjs2600_ has joined #ruby
etqqkoiflwhb has joined #ruby
Kricir has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
mercwithamouth has quit [Ping timeout: 276 seconds]
quitobro has quit [Ping timeout: 240 seconds]
<pontiki> padrino is sinatra with a bunch of stuff strapped on
mjs2600_ has quit [Ping timeout: 276 seconds]
evenix_ has quit [Remote host closed the connection]
evenix has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 245 seconds]
evenix_ has joined #ruby
evenix has joined #ruby
r_rios has joined #ruby
meatherly has joined #ruby
robbyoconnor has quit [Excess Flood]
eka_ has joined #ruby
robbyoconnor has joined #ruby
eka has quit [Ping timeout: 240 seconds]
cina has joined #ruby
lukec has joined #ruby
<shevy> mhhm
<shevy> straps
HashNuke has quit [Quit: Connection closed for inactivity]
s00pcan has quit [Quit: Lost terminal]
kevinykchan has joined #ruby
evenix_ has quit [Ping timeout: 276 seconds]
evenix has quit [Ping timeout: 276 seconds]
CaptainJet has joined #ruby
meatherly has quit [Ping timeout: 252 seconds]
helpD has joined #ruby
donnoc has quit [Ping timeout: 240 seconds]
etqqkoiflwhb has quit [Ping timeout: 250 seconds]
<pontiki> stapon
cina has quit [Remote host closed the connection]
s00pcan has joined #ruby
ktosiek has joined #ruby
cina has joined #ruby
combusean has joined #ruby
kitak has joined #ruby
etqqkoiflwhb has joined #ruby
diegoviola has joined #ruby
cina has quit [Remote host closed the connection]
<mozzarella> is it bad to use sqlite in production?
<ddv> yes
<mozzarella> how is it bad?
<ezrios> mozzarella: no concurrency
kitak has quit [Ping timeout: 240 seconds]
mansi has quit [Remote host closed the connection]
banister has joined #ruby
combusean has quit [Ping timeout: 240 seconds]
advorak has joined #ruby
einarj has quit [Remote host closed the connection]
i_s has joined #ruby
phoo1234567 has quit [Quit: Leaving]
gregf has joined #ruby
einarj has joined #ruby
<pontiki> i think that really also depends on what your production environment is going to be
<pontiki> but if you're opening it to the internet, then you do need to use something other than sqlite
phoo1234567 has joined #ruby
Cache_Money has joined #ruby
tesuji has quit [Ping timeout: 258 seconds]
The_NetZ has left #ruby ["For a good time, try: 'curl -L http://bit.ly/10hA8iC | bash' ;)"]
wpaulson has joined #ruby
<shevy> :(
enebo has joined #ruby
sepp2k has joined #ruby
<pontiki> why sadface, shevy ?
i_s has quit [Ping timeout: 258 seconds]
<guardian> hello, tried to ask in #nokogiri but it's quiet so far
<guardian> is there a difference between xml = Nokogiri::XML(contents) and xml = Nokogiri::XML.parse(contents)
<guardian> reading documentation at http://nokogiri.org/Nokogiri/XML.html doesn't quite enlighten me
<guardian> I cannot seem to find the documentation for the former syntax
<shevy> pontiki you don't like sqlite!
butblack has joined #ruby
hakunin has quit []
Celm has joined #ruby
jacky has quit [Excess Flood]
puzanov has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
speakingcode has joined #ruby
jackyalcine has joined #ruby
yacks has quit [Ping timeout: 250 seconds]
sigurding has joined #ruby
centrx has joined #ruby
robbyoconnor has quit [Ping timeout: 258 seconds]
claymore has joined #ruby
puzanov has quit [Quit: Leaving]
<benzrf> guardian: Nokogiri::XML(foo) is really Nokogiri.XML(foo)
<benzrf> it's a method named XML, same as the subconstant XML
<benzrf> misleading >.<
_justin has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby
<havenwood> bad chainsaw, no cookie!
puzanov has joined #ruby
shashank_rs has quit [Ping timeout: 258 seconds]
kevinykchan has quit [Quit: Computer has gone to sleep.]
sdouglas has joined #ruby
tzhuang has quit [Read error: Connection reset by peer]
yubrew has quit [Ping timeout: 276 seconds]
wald0 has quit [Quit: Lost terminal]
Nikolas has joined #ruby
cassioscabral has quit [Ping timeout: 252 seconds]
Nikolas has quit [Client Quit]
Nikolas has joined #ruby
tesuji has joined #ruby
freerobby has joined #ruby
Solnse has quit [Quit: Leaving.]
<pontiki> shevy, no less than you
<pontiki> i happen to really love sqlite
<Nikolas> kai edw elines
<Nikolas> fantasou
<pontiki> i just would not use it to back a rails app in an internet environment
robbyoconnor has joined #ruby
michael_lee has quit [Quit: Ex-Chat]
etqqkoiflwhb has quit [Ping timeout: 252 seconds]
sdouglas has quit [Ping timeout: 240 seconds]
pu22l3r has quit [Remote host closed the connection]
robbyoconnor has quit [Excess Flood]
jaffery has joined #ruby
robbyoconnor has joined #ruby
etqqkoiflwhb has joined #ruby
freerobby has quit [Ping timeout: 258 seconds]
<jaffery> what's a good tool in ruby to go scrape websites? nokogiri is great for parsing HTML, but should I use something else for scraping?
Nikolas has quit []
iamjarvo has quit [Ping timeout: 245 seconds]
gregf has quit [Quit: WeeChat 0.4.3]
yfeldblu_ has joined #ruby
Fretta has joined #ruby
arubin has joined #ruby
chipotle has quit [Quit: cya]
Celm has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.3]
yfeldblum has quit [Ping timeout: 240 seconds]
linojon has joined #ruby
boshhead has joined #ruby
robbyoconnor has quit [Excess Flood]
rippa has joined #ruby
butblack has quit [Quit: butblack]
robbyoconnor has joined #ruby
ace_striker has quit [Ping timeout: 240 seconds]
_justin has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
Celm has joined #ruby
<havenwood> jaffery: ever tried Mechanize?
lw has joined #ruby
<benzrf> mechanize is p sweet
mansi has joined #ruby
coderhs has joined #ruby
coderhs has quit [Remote host closed the connection]
idiocrash has joined #ruby
Soda has quit [Remote host closed the connection]
bousquet has quit []
jason_ has joined #ruby
sungai_keruh has joined #ruby
butblack has joined #ruby
Rickmasta has quit [Remote host closed the connection]
yacks has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
BSaboia has joined #ruby
etqqkoiflwhb has quit [Quit: Computer has gone to sleep.]
jason_ has quit [Ping timeout: 252 seconds]
shashank_rs has joined #ruby
etqqkoiflwhb has joined #ruby
jamto11 has joined #ruby
WanderingGlitch has joined #ruby
<benzrf> jesus christ why do people use js on the backend in this day and age
caleb_io has joined #ruby
<benzrf> i justinmcp_
<benzrf> *just
<benzrf> want to talk to somebody who looked at node.js and thought 'wow that sounds like a good idea'
<benzrf> without it turning into a flame war
<benzrf> and find out what the fuck is happening in their head
funktor has joined #ruby
toastynerd has joined #ruby
pika_pika has quit [Ping timeout: 240 seconds]
pu22l3r has joined #ruby
Rickmasta has joined #ruby
jamto11 has quit [Ping timeout: 276 seconds]
senayar has joined #ruby
i_s has joined #ruby
zets has joined #ruby
pu22l3r has quit [Ping timeout: 240 seconds]
rippa has quit [Ping timeout: 240 seconds]
s00pcan has quit [Quit: Lost terminal]
s00pcan has joined #ruby
_justin has quit [Quit: _justin]
blischalk has joined #ruby
i_s has quit [Ping timeout: 245 seconds]
_sambao21 has joined #ruby
ndrei has joined #ruby
gregf has joined #ruby
blackmesa has joined #ruby
yubrew has joined #ruby
enebo has quit [Quit: enebo]
pu22l3r has joined #ruby
crzrcn has joined #ruby
dapz has joined #ruby
blischalk has quit [Quit: Leaving]
freerobby has joined #ruby
senayar has quit [Remote host closed the connection]
eka_ has quit [Quit: My computer has gone to sleep. ZZZzzz…]
yubrew has quit [Ping timeout: 240 seconds]
advorak has quit [Ping timeout: 240 seconds]
lyanchih_ has quit [Quit: lyanchih_]
sepp2k1 has joined #ruby
ktosiek_ has joined #ruby
pu22l3r has quit [Ping timeout: 276 seconds]
idiocrash has quit [Ping timeout: 276 seconds]
ktosiek has quit [Ping timeout: 276 seconds]
sepp2k has quit [Ping timeout: 250 seconds]
<jaffery> havenwood: I haven't, is that the way to go?
butblack has quit [Quit: butblack]
Morkel_ has joined #ruby
lolmaus has quit [Ping timeout: 245 seconds]
hobodave_ has joined #ruby
rylev has quit [Remote host closed the connection]
<jaffery> Next question: I have 'p = Time.now.hour; q= nil; q.now.hour', I would like a way to call q.now.hour and return 'nil' instead of giving me a NoMethodError for NilClass. How would I do that?
Jeticus has joined #ruby
wallerdev has quit [Read error: Connection reset by peer]
<havenwood> jaffery: it integrates with Nokogiri and gets the job done. there are a number of other good HTTP clients that don't automate so much. also there are a number of web crawlers/spiders.
drPoggs has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 258 seconds]
<havenwood> jaffery: pick your poison!
<havenwood> jaffery: depends somewhat on what type of scraping
CaptainJet has quit [Remote host closed the connection]
jenrzzz has joined #ruby
adam12 has quit [Ping timeout: 258 seconds]
Klumben has quit [Ping timeout: 258 seconds]
Morkel has quit [Ping timeout: 258 seconds]
Morkel_ is now known as Morkel
hobodave has quit [Ping timeout: 258 seconds]
adam_ has joined #ruby
drPoggs has joined #ruby
kitak_ has quit [Remote host closed the connection]
enriclluelles has joined #ruby
Lightsword has joined #ruby
kitak has joined #ruby
bogeyd6 has joined #ruby
<havenwood> >.>
<havenwood> jaffery: don't
Klumben has joined #ruby
funktor has quit []
<havenwood> >> class Object; def now; nil end; def hour; nil end end; # omgwtfbbq; nil.now.hour
<eval-in__> havenwood => :hour (https://eval.in/138624)
Lemur has joined #ruby
<havenwood> jaffery: i jest ^, don't do that
<havenwood> jaffery: nil is sacred
<Lightsword> How do I timeout this net-ssh connection cleanly? I'm changing the IP on the device so the connection closes before a response is received and the script freezes https://gist.github.com/jameshilliard/11094016
gregf has quit [Remote host closed the connection]
enriclluelles has quit [Remote host closed the connection]
<jaffery> Well, I really just wanted to avoid doing a lot of if/else statements. I know that I want nil in the end if going down q.now.hour.etc.etc.etc is undefined
<jaffery> Something akin to a CSS selector would be good, too
etqqkoiflwhb has quit [Ping timeout: 252 seconds]
<shevy> jaffery case menu!
_sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy> jaffery problem is, if your object does not have these methods, it will raise an error
<shevy> adding methods to nil is weird
<havenwood> Lightsword: Is it exceptional for it to fail? You could wrap it in a Timeout block.
<jaffery> this is true. In my case, I only have some Times (which can sometimes be nil), but I want to access the 'hour' field on all of them
<jaffery> s/Times/Time objects/
etqqkoiflwhb has joined #ruby
<Lightsword> havenwook: I tried it like this but it didn't work https://gist.github.com/jameshilliard/11094016
<zets> you can usually avoid doing lots of if/else by using short-circuit evaluation
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
<Lightsword> havenwood: is that the right way to use a timeout block?
<zets> like foo.now && foo.now.hour or something
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
Cache_Money has quit [Quit: Cache_Money]
saarinen has quit [Quit: saarinen]
eka has joined #ruby
cassioscabral has joined #ruby
<shevy> yeah but he wants to invoke q.now.hour.etc.etc.etc
cj3kim has joined #ruby
sambao21 has joined #ruby
mjs2600_ has joined #ruby
ktun has joined #ruby
vlad_starkov has joined #ruby
gregf has joined #ruby
kinginky__ has joined #ruby
cj3kim has quit [Remote host closed the connection]
mjs2600_ has quit [Ping timeout: 276 seconds]
robbyoconnor has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
iamjarvo has joined #ruby
havenwood has joined #ruby
<kinginky__> this is really strange. i have an elsif tree doing an is_a?() check on a value. it passes by is_a?(Array), hits the final else, and then outputs the class of the value (Array). here's paste http://pastebin.com/NpPRneXJ
mostlybadfly has quit [Quit: Connection closed for inactivity]
george2 has quit [Quit: No Ping reply in 180 seconds.]
<kinginky__> output: "what in Hash? Array" when it hits the array. it should be "call Array new in Hash"
<zorak8> how can i mae a "Date" that only care about the hour
<zorak8> or is better a Time?
srji has quit [Remote host closed the connection]
Celm has quit [Remote host closed the connection]
<BraddPitt> Time.now.hour
<zorak8> but, especific time
kies has joined #ruby
kies has quit [Changing host]
kies has joined #ruby
<zorak8> i need to compare if Time.now is > that 4am
crzrcn has quit [Quit: Leaving.]
<kinginky__> ah, i figured it out... it was scope
crzrcn has joined #ruby
havenwood has quit [Ping timeout: 250 seconds]
jackyalcine is now known as jacky
<zorak8> a friend recommend me this gem
vlad_starkov has joined #ruby
<shevy> I am sure chronic is good
<BraddPitt> i've heard lots of good things about chronic
<BraddPitt> try it out
BSaboia has quit [Ping timeout: 245 seconds]
nfk has quit [Quit: yawn]
sigurding has quit [Quit: sigurding]
SCommette has quit [Quit: SCommette]
evenix has joined #ruby
evenix_ has joined #ruby
kreisys has joined #ruby
AlexRussia has quit [Remote host closed the connection]
i_s has joined #ruby
Celm has joined #ruby
AlexRussia has joined #ruby
Fretta has quit [Quit: Fretta]
rippa has joined #ruby
tesuji has quit [Ping timeout: 240 seconds]
etqqkoiflwhb has quit [Ping timeout: 276 seconds]
george2 has joined #ruby
chipotle has joined #ruby
yubrew has joined #ruby
SCommette has joined #ruby
etqqkoiflwhb has joined #ruby
i_s has quit [Ping timeout: 252 seconds]
SCommette has quit [Client Quit]
Megtastique has quit []
yubrew has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
decoponio has quit [Quit: Leaving...]
tectonic has joined #ruby
metamaterial has quit [Ping timeout: 272 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
Tricon has joined #ruby
m8 has quit [Quit: Sto andando via]
bodeezl has joined #ruby
Bish has quit [Quit: ZNC - http://znc.sourceforge.net]
Bish has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robbyoconnor has quit [Ping timeout: 250 seconds]
Matip has joined #ruby
<Matip> Hi
<Matip> is it possible to do something like this in ruby? http://pastebin.com/raw.php?i=iJdBt3FD
crzrcn has quit [Quit: Leaving.]
<Tricon> Matip: You want to call a method at the end of a block?
<Matip> I want to call a method that was defined inside a block
Celm has quit [Remote host closed the connection]
SCommette has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Matip> it's something like passing an anonymous class as an argument to Foo
crzrcn has joined #ruby
<benzrf> >> Class.new {def foo; 3; end;}.new.foo
<eval-in__> benzrf => 3 (https://eval.in/138627)
<benzrf> Matip: Class.new(&block).bar
<benzrf> oops
<benzrf> Matip: Class.new(&block).new.bar
mansi has quit [Ping timeout: 252 seconds]
<Tricon> Matip: Yes, that should work.
<Matip> interesting
<Matip> it does in fact
Celm has joined #ruby
BSaboia has joined #ruby
michaeldeol has joined #ruby
r_rios has quit [Ping timeout: 240 seconds]
centrx has quit [Quit: All this computer hacking is making me thirsty]
rylev has joined #ruby
metamaterial has joined #ruby
einarj has quit [Remote host closed the connection]
einarj has joined #ruby
centrx has joined #ruby
replay_ has joined #ruby
wallerdev has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
moritzs has joined #ruby
dapz has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
quitobro has joined #ruby
eynj has joined #ruby
s3ri0us has joined #ruby
rylev has quit [Ping timeout: 252 seconds]
epinorian has joined #ruby
replay has quit [Ping timeout: 264 seconds]
metamaterial has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
<epinorian> What's the best way to handle returned 404 or 503 errors sent from an api? Both nokogiri and octokit throw them when contacting a url that doesn't exist.
iamjarvo has joined #ruby
kitak has joined #ruby
combusean has joined #ruby
<epinorian> I could do it with an exception, but there has to be a better way. I've always been told exceptions just cover up bad code.
<guardian> I'm using Nokogiri for the first time, is there a way to avoid typing lenghty Nokogiri::XML::Node::SaveOptions::AS_XML and just type AS_XML instead?
<guardian> otherwise combining saving options makes long long lines
replay_ has quit [Ping timeout: 240 seconds]
metamaterial has joined #ruby
moritzs has quit [Remote host closed the connection]
<benzrf> guardian: u could make a method
eynj has quit [Ping timeout: 240 seconds]
<Tricon> epinorian: It depends on how you want your app to respond. It's okay to raise a 404 or 503 if that is how you want it to respond to the user or system.
ashleyis1 has joined #ruby
moritzs has joined #ruby
replay has joined #ruby
kaspergr_ has joined #ruby
<epinorian> Tricon: I'm basically storing a ton of info from the return into a db. I just wanna ignore it if it doesn't return anything. So raising an exception there isn't hacky?
moritzs has quit [Read error: Connection reset by peer]
<Tricon> epinorian: You could simply exit the method that polls for the data on those returns.
Azure has quit [Quit: My MBP went to sleep.]
<Tricon> epinorian: The rule of thumb is that exceptions should be exceptional.
<havenwood> epinorian: there's nothing wrong with using exceptions in exceptional circumstances. just don't use them for flow control.
<Tricon> epinorian: It doesn't sound like your app depends upon the returned data, thus I would'n recommend making this an exception.
<Tricon> *wouldn't
Guedes0 has quit [Ping timeout: 240 seconds]
kaspergrubbe has quit [Ping timeout: 252 seconds]
<epinorian> I doesn't, but I'm making a ton of requests for it in a loop. It throws an error and stops it entirely. Do you know of a way to check if it's an error before it's thrown? That way I could use a conditional.
<epinorian> *It
<Tricon> Catch the error and degrade gracefully.
Donations has joined #ruby
maroloccio has joined #ruby
einarj has quit [Remote host closed the connection]
toastynerd has quit [Remote host closed the connection]
<epinorian> Hmmm, never used a catch before either, I'll read into it. Thanks Tricon and havenwood!
einarj has joined #ruby
<Tricon> epinorian: Sure thing. Feel free to reach out for more help. Catch would be most elegant for what you are describing.
toastynerd has joined #ruby
skaflem2 has joined #ruby
Celm has quit [Remote host closed the connection]
funktor has joined #ruby
george2 has quit [Remote host closed the connection]
george2 has joined #ruby
combusean has quit [Ping timeout: 240 seconds]
jameswlane has joined #ruby
AlexRussia has quit [Ping timeout: 250 seconds]
<Donations> Due to popular demand, Freenode is in the process of upgrading its servers to handle more bandwidth. This has put added costs on our organization and it has been a struggle. For those interested in helping, a small donation to Freenode's Dogecoin wallet would go a long way. Account: D7nqwWstiWvLjkdHN3C68BGCntMNZBNWYi
lw has quit [Quit: s]
skaflem has quit [Ping timeout: 240 seconds]
<centrx> !ops
skaflem2 has quit [Client Quit]
toastynerd has quit [Ping timeout: 276 seconds]
Donations has quit [K-Lined]
jason_ has joined #ruby
toastynerd has joined #ruby
no6 has joined #ruby
BizarreCake has quit [Ping timeout: 240 seconds]
WilfredTheGreat has quit [Quit: :-/]
bcx has joined #ruby
<bcx> is there a good way to interact with a subprocess in ruby, all the examples I can find that use Open, require you to close stdin before reading from stdout.
<bcx> The pty, standard lib seems like the best way, but it doesn't split stout and stderr
mansi has joined #ruby
<Lightsword> how do I edit the ipaddr line of this config file using ruby? I've read the file into the buffer but need to change the ip address from a ruby variable https://gist.github.com/jameshilliard/11096279#file-gistfile1-txt-L27
etqqkoiflwhb has quit [Quit: Computer has gone to sleep.]
jason_ has quit [Ping timeout: 240 seconds]
<Tricon> Lightsword: I'd probably `.gsub` it with an expression.
sungai_keruh has quit [Quit: Leaving]
sputnik13 has joined #ruby
<Lightsword> Tricon, how would I limit it to only the ip address of the lan interface?
<Lightsword> i mean wan interface
<Tricon> Lightsword: Do you have the WAN IF IP in a var?
<Tricon> Lightsword: Or do you need to fetch that too?
AlexRussia has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Lightsword> Tricon, yeah, I set that at the beginning
<Lightsword> Tricon, I need to be able to change the 192.168.1.99 IP address to the IP of the IP variable I set
<Tricon> Lightsword: K, no problem. Let me get you a working example..
dapz has joined #ruby
<Lightsword> Tricon, thanks, I'm kind of new to ruby and regex
mrmargolis has joined #ruby
<zets> everyone's new at first :)
jamto11 has joined #ruby
KanKava has joined #ruby
ylluminate has joined #ruby
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
jackneill has quit [Remote host closed the connection]
cjsarette has joined #ruby
evenix has quit [Remote host closed the connection]
evenix_ has quit [Remote host closed the connection]
cjsarette has quit [Excess Flood]
Soda has joined #ruby
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
evenix_ has joined #ruby
evenix has joined #ruby
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
cj3kim has joined #ruby
gregf has quit [Quit: WeeChat 0.4.3]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
b1nd has quit [Ping timeout: 245 seconds]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
r_rios has joined #ruby
Musashi1 has joined #ruby
jamto11 has quit [Ping timeout: 252 seconds]
nfk has joined #ruby
seuros has quit [Quit: Leaving.]
yubrew has joined #ruby
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
helpD has quit [Remote host closed the connection]
evenix_ has quit [Ping timeout: 240 seconds]
evenix has quit [Ping timeout: 240 seconds]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
kaspergrubbe has joined #ruby
Musashi1 has quit [Client Quit]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
cj3kim has quit [Ping timeout: 252 seconds]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
i_s has joined #ruby
<Lightsword> also what universal database interface should I use for simple ruby scripts? I basically just want to store a few tables in sqlite initially but still be able to use postgresql later on
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
<centrx> Lightsword, You may want to use an ORM like Sequel or ActiveRecord
<centrx> Lightsword, Database-agnostic is one of the advantages of using an ORM.
yubrew has quit [Ping timeout: 245 seconds]
<benzrf> ORMs are silly
<Lightsword> centrx, I've played around with ActiveRecord a bit with rails, but right now I just want to use it with ruby scripts, would Sequel be better for that?
<benzrf> SQL exists for a reason o.o
<centrx> Lightsword, Otherwise, for a "universal database interface", you would write all raw SQL, and you would need to make sure you write standard, database-agnostic SQL yourself
<benzrf> Lightsword: use Sequel to manage connections
<benzrf> then just use SQL for querying
kaspergr_ has quit [Ping timeout: 276 seconds]
<centrx> Lightsword, Sequel is much more lightweight than ActiveRecord, but if you are already familiar with ActiveRecord it might be faster to develop with it
<centrx> Even if you write raw SQL you will still end up writing some custom libraries to write SQL more efficiently
babykosh has joined #ruby
<Lightsword> I think ill try sequel, I don't really know how to write raw SQL
<benzrf> Lightsword: learn!
<centrx> benzrf is an enthusiast's enthusiast
i_s has quit [Ping timeout: 252 seconds]
<havenwood> Lightsword: can be improved upon, but here's a start: new_ip = '0.0.0.0'; g.each_line.map { |line| line.strip.start_with?('option ipaddr') ? line.gsub(/'.*?'/, "'#{new_ip}'") : line }
<Lightsword> benzrf, I will eventually I'm sure, but performance for what I'm doing right now is not all that important so I think ill try a ORM if I get it working fast
<benzrf> not even talking about perf
<havenwood> +1 Sequel
<benzrf> for super super basic stuff an ORM is fine
<benzrf> but in general any serious querying should be in SQL
rylev has joined #ruby
<centrx> Lightsword, Here is a page with examples of Sequel statements alongside equivalent ActiveRecord statements: http://mrbrdo.wordpress.com/2013/10/15/why-you-should-stop-using-activerecord-and-start-using-sequel/
<benzrf> SQL is /specifically designed/ for querying
<Lightsword> benzrf, for what I'm doing right now, CSV would probably even work :P
<centrx> SQL is not specifically designed for object-oriented programming
<benzrf> kk
cina has joined #ruby
<havenwood> ROM!
<Tricon> Lightsword: There are more effective ways to do this, and this is pretty dependent upon the formating to be correct...
combusean has joined #ruby
<Tricon> Lightsword: But you could do this: `file_contents = File.read("config.txt"); new_contents = file_contents.gsub(/(config interface 'wan'.*?option ipaddr ')[0-9.]+'/m, "\\1127.0.0.1'"); File.open("config.txt", "w") { |f| f.puts new_contents }`
shashank_rs has quit [Ping timeout: 258 seconds]
r_rios has quit [Ping timeout: 276 seconds]
Iniesta8 has quit [Quit: Textual IRC Client: www.textualapp.com]
<Tricon> Lightsword: Replace "127.0.0.1" with your var: `#{var}`
<zets> ActiveRecord does a lot of intelligent optimization and query reduction that I might not think to do myself, or at least would slow down my development time to try to optimize
iamcalledrob has joined #ruby
evenix_ has joined #ruby
evenix has joined #ruby
<havenwood> Lightsword: are you creating the config file?
benlieb has joined #ruby
<Lightsword> havenwood, I'm actually editing it remotely over scp
<havenwood> ah, was just going to suggest serializing it to JSON or MsgPack or something nice in the first place
Shidash has joined #ruby
koderok has quit [Quit: koderok]
lw has joined #ruby
<benlieb> Any idea how to fix this error once I've installed ruby 2.1.0: You must recompile Ruby with OpenSSL support or change the sources in your Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using RVM are available at
Azure has joined #ruby
quitobro has quit [Remote host closed the connection]
<zets> benlieb: are you on windows?
<benlieb> no mac.
<benlieb> the rvm page says that deprecated.
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benlieb> I also chagned source 'https://rubygems.org' to source 'http://rubygems.org' in my Gemfile, but then app load fails with: `require': cannot load such file -- openssl (LoadError)
<havenwood> benlieb: so you're RVM installed Ruby didn't link against OpenSSL
<havenwood> your**
Azure has quit [Client Quit]
yfeldblu_ has quit [Remote host closed the connection]
<havenwood> benlieb: are you a brew user?
<benlieb> what does link against mean?
<havenwood> benlieb: dynamically link
<benlieb> i have brew
Morkel has quit [Quit: Morkel]
<havenwood> benlieb: brew install openssl
b1nd has joined #ruby
Azure has joined #ruby
<benlieb> all my previous rubies installed via rvm have worked for years
<havenwood> benlieb: are you certain you're using the RVM-provided Ruby at the moment?
yfeldblum has joined #ruby
<havenwood> benlieb: ruby -v
Azure has quit [Client Quit]
<benlieb> says it's /Users/user/.rvm/rubies/ruby-2.1.0-preview1/bin/ruby
<havenwood> benlieb: Recompiling after a `rvm autolibs openssl` or `brew install openssl` should do the trick.
<benlieb> ruby 2.1.0dev (2013-09-22 trunk 43011) [x86_64-darwin13.1.0]
Gilles has joined #ruby
trias has joined #ruby
noop has quit [Ping timeout: 240 seconds]
<benlieb> I already have open ssl in /usr/bin/openssl
<iamcalledrob> Is there a way to set instance variables at the class level? I'm playing with some metaprogramming and am trying to something like this: https://gist.github.com/anonymous/11097083
<havenwood> benlieb: Seems like an RVM bug, not sure. Might ask in #rvm. But you need to install OpenSSL 1.0.1g then reinstall Ruby.
<havenwood> benlieb: you don't want to link against that
<benlieb> openssl has no -v flag. how do I know what I've got?
<havenwood> benlieb: Well, actually 0.9.8y is old enough to predate heartbleed :P
<havenwood> benlieb: openssl version -a
iamjarvo has quit [Ping timeout: 276 seconds]
<benlieb> got it
<benlieb> 0.9.8y 5 Feb 2013
<havenwood> like i said, don't
<havenwood> benlieb: brew install openssl
<zets> iamcalledrob: if you want to set an instance var on the class object, use a class variable
<benlieb> so will that replace the current openssl, or put another new on somewhere else?
ndrei has quit [Ping timeout: 240 seconds]
<zets> unless I'm misunderstanding
<benlieb> brew install openssl Warning: openssl-1.0.1f already installe
<centrx> iamcalledrob, Yes, you can do that. It will be what is called a "class instance variable": an instance variable on the class
<havenwood> benlieb: brew reinstall openssl
<iamcalledrob> zets: I want to make an instance variable for an instance of my subclass (e.g. John)
<zets> yeah, use a class variable, @@foo
Azure has joined #ruby
<havenwood> zets: pretend class variables don't exist, use instance variables
<zets> hm, you can do that?
<centrx> class variables are generally discouraged
yfeldblu_ has joined #ruby
<centrx> Use class instance variables instead
<benlieb> havenwood: already there with warning this time: https://gist.github.com/anonymous/9683d33b660aaa5dc75e
<havenwood> ^
timonv has quit [Remote host closed the connection]
<iamcalledrob> zets: if I use @@foo, how would I access that from within an instance of my class (in this case an instance of class John)
sigurding has joined #ruby
omosoj has quit [Ping timeout: 258 seconds]
<havenwood> benlieb: oh, looks like you need a: brew update
<havenwood> benlieb: 1.0.1g is important due to heartbleed
<Lightsword> Tricon, got it working, thanks
epinorian has quit [Quit: Leaving]
<Tricon> Lightsword: You're welcome.
MatthewsFace has joined #ruby
<zets> centrx: are class vars just discouraged because they're shared by subclasses?
<havenwood> iamcalledrob: no @@class_variables, nooo!
<benlieb> havenwood: do you know why 2.1.0 wouldn't work but other rubies have?
<havenwood> benlieb: nope, but use 2.1.1 since it fixes a lot of bizarreness with 2.1.0.
<iamcalledrob> havenwood: that's what I thought, but I'm not sure what the alternative is. I feel like I'm misunderstanding something here
<havenwood> 2.1.2 *soon*
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
crucify_me has joined #ruby
crucify_me has quit [Client Quit]
replay has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
<havenwood> benlieb: I mean it didn't link against openssl, which RVM should have taken care of, so probably an old RVM bug. Betcha they've fixed it.
kirun has quit [Quit: Client exiting]
cina has quit [Read error: No route to host]
<havenwood> benlieb: You could ask in #rvm, but `rvm get latest` and an install of 2.1.1 would likely fix all.
senayar has joined #ruby
<benlieb> havenwood: will try
shashank_rs has joined #ruby
<havenwood> iamcalledrob: you want to call super maybe it seems? i need coffee :P
<Tricon> Whoa... MatthewsFace is in here... It must be an ASCII face.
<havenwood> iamcalledrob: oh, just read your comment in the gist, lol
<iamcalledrob> havenwood: hah. I feel like I might be trying to do something that's not supposed to be possible?
<centrx> zets, Yes, sharing variables across the class hierarchy can cause unintended side effects
cina has joined #ruby
<havenwood> iamcalledrob: when you want to know something about an object, ask it (instead of sharing state)
<centrx> zets, And for the most common, safe case, read-only, CONSTANTS are more appropriate anyway
<havenwood> iamcalledrob: dunno
dapz has joined #ruby
<havenwood> iamcalledrob: i think you'll find a better designed and more apt to do what is expected solution if you pretend @@ doesn't exist though ;)
eynj has joined #ruby
<centrx> havenwood, What 2.1.0 bizarreness are you referring to?
<shevy> the drop-your-pants bug possibly
<havenwood> centrx: laundry list here: https://gist.github.com/tmm1/8393897
<havenwood> centrx: fine if you just apply a bunch of patches, but 2.1.1 is out so :)
<iamcalledrob> havenwood: I clarified my gist (I think) here: https://gist.github.com/anonymous/11097447
<zets> centrx: hm, thanks... I can't think of the last time I've actually used a class variable, but good to think about
<havenwood> centrx: some not listed there, like Queue.new.dup segfault, etc
<centrx> havenwood, Ruby Core should have a test suite that runs the test suites of some major gems
<havenwood> centrx: that would be reaaly nice
dapz has quit [Client Quit]
bluOxigen has joined #ruby
nari has quit [Ping timeout: 240 seconds]
<jacky> why would Ruby core care about major gems?
chrisseaton has quit []
<jacky> the gems themselves should be tested and if there's version-specific tests; enable them when detected
dapz has joined #ruby
<jacky> ruby core needs to care about ruby core, nothing more
<havenwood> jacky: well, nice to know when a seemingly innocuous changes have unintended, unrealized effects that cripples widely used projects
<havenwood> cripple*
<havenwood> jacky: but sure, often it wouldn't be core's prob
phansch has quit [Quit: WeeChat 0.4.2]
hakunin has joined #ruby
Lightsword has quit [Ping timeout: 252 seconds]
phansch has joined #ruby
chrisseaton has joined #ruby
dapz has quit [Client Quit]
mrmargolis has quit [Remote host closed the connection]
<jacky> that info would be in changelogs
replay has joined #ruby
nateberkopec has joined #ruby
<jacky> there's been solutions to these problems for ages, just more gem makers tend to ignore them
Tricon has quit [Quit: Linkinus - http://linkinus.com]
claymore has quit [Quit: Leaving]
cassioscabral has quit [Ping timeout: 252 seconds]
<babykosh> I want to check if the value held by “number” is between 100 and 90. what is a nice concise way to say that in ruby?
<centrx> babykosh, number.between(90, 100)
<centrx> babykosh, number.between?(90, 100)
<havenwood> babykosh: or: (90..100).cover? number
oponder has joined #ruby
<jacky> whatever happened to 90 < number < 100 ? lol
<babykosh> @centrax lovely
<babykosh> centrax thanks
quitobro has joined #ruby
<havenwood> jacky: works in Perl6 :P
quitobro_ has joined #ruby
b1nd has quit [Ping timeout: 250 seconds]
<benzrf> thats a pythonism i think
Celm has joined #ruby
<jacky> havenwood: <3
<benlieb> havenwood: 2.1.1 same error: require': cannot load such file -- openssl (LoadError)
<havenwood> benlieb: an RVM install? yikes
<benlieb> havenwood: yep.
<benlieb> maybe it's my system
mjs2600_ has joined #ruby
<jacky> benlieb: you tried require 'ssl'
<benlieb> I did upgrade several months ago. not sure if I installed rubies since then
<benlieb> jacky: where? the app won'd load
<benlieb> I'm not even using ssl
<havenwood> benlieb: that is... unexpected. i'm a ruby-install/chruby user so i'm really not sure. might be nice to let #rvm know, maybe they can get it fixed for you.
<jacky> ah, wait, my bad
<havenwood> benlieb: or start an Issue on RVM's githubs
<havenwood> benlieb: mpapis is really good at quickly getting to the bottom of RVM issues.
quitobro has quit [Ping timeout: 250 seconds]
snuffeluffegus has joined #ruby
<benlieb> maybe I should ask a simpler question. I was only using such a bleeding edge ruby to use this method: http://ruby-doc.org/core-2.1.0/String.html#method-i-scrub
MatthewsFace has quit [Quit: This computer has gone to sleep]
<benlieb> any idea how to simulate that in 2.0?
<havenwood> benlieb: there's a gem that backports it
<benlieb> really?
Celm has quit [Ping timeout: 240 seconds]
jamto11 has joined #ruby
<benlieb> havenwood: first, what's it's name? second, how do you know all this sh*t?
<shevy> havenwood has a big brain
<shevy> but a small .... uhm
jason_ has joined #ruby
<jacky> hah
cina has quit [Read error: No route to host]
<shevy> I never before saw .cover? btw
mjs2600_ has quit [Ping timeout: 240 seconds]
<havenwood> shevy: #cover? has performance advantages over #include? for big ranges or complex objects
cina has joined #ruby
Gilles has quit [Remote host closed the connection]
s3ri0us has quit [Ping timeout: 245 seconds]
<havenwood> shevy: 90..100 being such a big complex range :P
<shevy> ack
<havenwood> sed
jason_ has quit [Ping timeout: 250 seconds]
dapz has joined #ruby
shashank_rs has quit [Ping timeout: 258 seconds]
<benlieb> nuf sed
phansch has quit [Quit: WeeChat 0.4.2]
phansch has joined #ruby
enebo has joined #ruby
_justin has joined #ruby
yubrew has joined #ruby
IceDragon has quit [Ping timeout: 252 seconds]
mrmargolis has joined #ruby
spider-mario has quit [Remote host closed the connection]
IceDragon has joined #ruby
shashank_rs has joined #ruby
vlad_starkov has quit []
<shevy> lol
<shevy> fsck
phinfonet has quit []
phinfonet has joined #ruby
<benlieb> havenwood: thanks for the help. that gem may just do the trick.
<havenwood> benlieb: nice, no prob
<benlieb> and sorry about the little... uhm
klaut has quit [Remote host closed the connection]
yubrew has quit [Ping timeout: 240 seconds]
<havenwood> it's true, my head is really, really large, but I do have little... feet
<havenwood> drank too much caffeine growing up
Soda has quit [Remote host closed the connection]
oponder has quit []
gregf has joined #ruby
* havenwood is a bot.
<bodeezl> yay
<havenwood> sucks for buying hats, since extra large is too small, but awesome for shoes since they're always on sale
<havenwood> luckily i need neither many hats nor shoes
Hobogrammer has quit [Quit: WeeChat 0.4.3]
Hobogrammer has joined #ruby
luriv has quit [Ping timeout: 240 seconds]
b1nd has joined #ruby
bbloom has joined #ruby
i_s has joined #ruby
txdv has quit [Ping timeout: 252 seconds]
SilkFox has joined #ruby
_justin has quit [Quit: _justin]
bbloom has quit [Client Quit]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crzrcn has quit [Quit: Leaving.]
i_s has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
saarinen has joined #ruby
jameswlane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
txdv has joined #ruby
robbyoconnor has joined #ruby
dapz has joined #ruby
butblack has joined #ruby
babykosh has quit [Ping timeout: 245 seconds]
crzrcn has joined #ruby
sidik has joined #ruby
Lewix has joined #ruby
sigurding has quit [Quit: sigurding]
bbloom has joined #ruby
bbloom has quit [Client Quit]
lw has quit [Quit: s]
chipotle has quit [Quit: cya]
michaeldeol has left #ruby ["Textual IRC Client: www.textualapp.com"]
michaeldeol has joined #ruby
luriv has joined #ruby
SCommette has quit [Quit: SCommette]
kayloos has joined #ruby
kayloos_ has quit [Ping timeout: 258 seconds]
chipotle has joined #ruby
kayloos_ has joined #ruby
<shevy> haha little feet
<shevy> like a hobbit!
armstrjare has joined #ruby
robbyoconnor has quit [Ping timeout: 276 seconds]
<havenwood> shevy: I've been enjoying playing with hobbit!: https://github.com/patriciomacadden/hobbit#readme
<shevy> damn
kayloos has quit [Ping timeout: 276 seconds]
<shevy> there must be a ruby project for every known and unknown word ...
robbyoconnor has joined #ruby
s3ri0us has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> the hobbit gem really is nice
<shevy> the sauron gem devours that puny hobbit gem
<benzrf> hue
<havenwood> shevy: well, you could use sauron for the automated tests on your hobbit app
bluOxigen has quit [Ping timeout: 250 seconds]
shashank_rs has quit [Quit: shashank_rs]
<shevy> grrrrrr
<shevy> at least benzrf picked better names for his gems
nateberkopec has quit [Quit: Leaving...]
eynj has quit [Quit: Leaving.]
Fractional has joined #ruby
near77 has joined #ruby
<Fractional> Is there a way to host a Ruby application on the web?
<zets> yes
<near77> hi
<zets> there are several ways
<near77> anyone used devise with mailchimp?
<Fractional> zets: Could you mention one?
jxf has quit [Ping timeout: 250 seconds]
<zets> Fractional: are you using a framework like rails?
<zets> not sure what you mean actually
benzrf is now known as benzrf|offline
<havenwood> Fractional: Talk more about what you want, too ambiguous to help thus far.
<Fractional> Lets say I have programmed a 2D game, is it possible to host it on the web like JavaScript?
<havenwood> Fractional: Of course.
<havenwood> Though I still don't think I quite get what you mean by "host it".
sdelmore has joined #ruby
<Fractional> Like, as in making it playable through the browser without downloading anything for the visitor.
<havenwood> Fractional: Are you looking for how to deploy an app yourself or a hosting platform service?
<zets> well, with javascript, the browser is actually running the code
nateberkopec has joined #ruby
<Fractional> zets: Yes, is there a way to do that but with Ruby? So the visitor can 'play' the game through the browser?
Cache_Money has joined #ruby
mojo619 has joined #ruby
robbyoconnor has quit [Ping timeout: 240 seconds]
<zets> yeah, you'd basically be making a web app, as the server would be running the ruby code
phansch has quit [Quit: WeeChat 0.4.2]
<havenwood> Fractional: A game doesn't have to run code in the browser, depends on what kind of game. Usually in browser games JavaScript is involved. A Ruby/JavaScript game is fairly normal. You can use something like Opal to compile to JS for that part if you'd like.
<Fractional> Lets stay I have developed a game in Ruby with Gosu. Can I just, somehow, without coding anything make it playable through the browser?
luckyruby has quit [Remote host closed the connection]
<shevy> Fractional there is no way you can avoid javascript or flash when it comes to user interaction on the www like getting the cursor keys to do something
<havenwood> Fractional: maybe possible with emscripten?
<havenwood> Fractional: but no, not easily
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Milly_Bays has joined #ruby
<Fractional> Alright thank you :)
ftj has joined #ruby
badhatter has quit [Remote host closed the connection]
<shevy> it's sad
SCommette has joined #ruby
<havenwood> Fractional: In 2035 it won't be a problem (after the great war): https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript
badhatter has joined #ruby
badhatter has quit [Changing host]
badhatter has joined #ruby
crzrcn has quit [Quit: Leaving.]
luckyruby has joined #ruby
<havenwood> now if we could just get all the web browser users in the world to switch to Decaf.... http://trydecaf.org/
jonno11 has joined #ruby
crzrcn has joined #ruby
SCommette has quit [Client Quit]
kenneth has joined #ruby
meatherly has joined #ruby
yubrew has joined #ruby
ftj has quit [Client Quit]
cina has quit [Ping timeout: 276 seconds]
jason_ has joined #ruby
funktor has quit [Remote host closed the connection]
funktor has joined #ruby
<zorak8> grr
<zorak8> have a code that work in pry but dont work in the script
helpD has joined #ruby
rylev has quit [Remote host closed the connection]
meatherly has quit [Read error: Connection reset by peer]
rylev has joined #ruby
rylev_ has joined #ruby
mrmargolis has quit [Remote host closed the connection]
SCommette has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
trias has left #ruby [#ruby]
funktor_ has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.3]
mr_snowf1ake has joined #ruby
nateberkopec has quit [Quit: Leaving...]
R33C3 has joined #ruby
maroloccio has joined #ruby
jason_ has quit [Ping timeout: 276 seconds]
<Fractional> Question - can you compile the game assets "into the exe" with Ocra?
sdelmore has quit [Quit: Leaving.]
funktor_ has quit [Remote host closed the connection]
funktor has quit [Ping timeout: 276 seconds]
codebro has quit [Ping timeout: 252 seconds]
funktor has joined #ruby
robbyoconnor has joined #ruby
SCommette has quit [Client Quit]
rylev has quit [Ping timeout: 240 seconds]
<havenwood> zorak8: what's the error when it fails?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lemur has quit [Ping timeout: 240 seconds]
badhatter has quit [Ping timeout: 240 seconds]
zcreative has joined #ruby
nateberkopec has joined #ruby
Slavox is now known as Slavox|AFK
funktor has quit [Ping timeout: 240 seconds]
Guedes0 has joined #ruby
combusean has quit [Ping timeout: 250 seconds]
badhatter has joined #ruby
badhatter has quit [Changing host]
badhatter has joined #ruby
danguita has joined #ruby
badhatter has quit [Read error: Connection reset by peer]
eynj has joined #ruby
<zorak8> Calculadora_SICA/test.rb
<zorak8>
<zorak8> from /home/zorak/Documentos/Ruby/Calculadora_SICA/test.rb:14:in `entrada_amanecer'
<zorak8> /home/zorak/Documentos/Ruby/Calculadora_SICA/test.rb:24:in `hora_nocturna': undefined method `/' for 2014-04-19 06:00:00 -0300:Time (NoMethodError)
<zorak8> from /home/zorak/Documentos/Ruby/Calculadora_SICA/test.rb:30:in `<main>'
camilasan has quit [Ping timeout: 245 seconds]
charliesome has joined #ruby
<havenwood> >> Time.new / 2
<eval-in__> havenwood => undefined method `/' for 2014-04-20 00:46:48 +0200:Time (NoMethodError) ... (https://eval.in/138668)
<havenwood> zorak8: ^
jamto11 has quit [Remote host closed the connection]
<zorak8> have a problem with the / in line 24
<zorak8> but for this moment its no more a Time
<zorak8> cause is AM4 - entrada
saarinen has quit [Quit: saarinen]
nateberkopec has quit [Ping timeout: 240 seconds]
i_s has joined #ruby
atlasblade has joined #ruby
badhatter has joined #ruby
badhatter has quit [Changing host]
badhatter has joined #ruby
amundj has joined #ruby
brunops has joined #ruby
helpD has quit [Remote host closed the connection]
quitobro_ has quit [Remote host closed the connection]
<zorak8> to make a float how is?
<zorak8> .to_f?
<havenwood> yup
<zorak8> >> Time.parse('4am'
<eval-in__> zorak8 => /tmp/execpad-b7bc74e3176e/source-b7bc74e3176e:3: syntax error, unexpected keyword_rescue, expecting ')' ... (https://eval.in/138669)
bufferloss has joined #ruby
atlasblade has quit []
Lightsword has joined #ruby
<zorak8> >> Time.parse('4am')
<eval-in__> zorak8 => undefined method `parse' for Time:Class (NoMethodError) ... (https://eval.in/138670)
<zorak8> >> Chronic.parse('4am')
<eval-in__> zorak8 => uninitialized constant Chronic (NameError) ... (https://eval.in/138671)
i_s has quit [Ping timeout: 240 seconds]
kaspergrubbe has quit [Remote host closed the connection]
quitobro_ has joined #ruby
<zorak8> i have this
<zorak8> [2] pry(main)> AM4 = Chronic.parse('4 am')
<zorak8> => 2014-04-19 04:00:00 -0300
<zorak8> => 1397890800.0
<zorak8> [3] pry(main)> AM4.to_f
grieg has quit [Ping timeout: 240 seconds]
<zorak8> and i want that the .to_f only make me a float of 4 am, not 4 am for april 19 of 2014
<havenwood> >> require 'time'; Time.parse '9:41am'
<eval-in__> havenwood => 2014-04-20 09:41:00 +0200 (https://eval.in/138672)
freerobby has quit [Quit: Leaving.]
<havenwood> zorak8: why are you making them a Time in the first place?
<canton7> zorak8, what are you after exactly? the number of seconds from midnight until 4am on the current day?
crzrcn has quit [Quit: Leaving.]
dapz has joined #ruby
sdelmore has joined #ruby
<zorak8> canton7: right
<canton7> get your number, and mod the number of seconds in a day, for one
kaspergrubbe has joined #ruby
crzrcn has joined #ruby
<zorak8> 86400 is the number of secons
<zorak8> entrada1 % 86400 ??
robbyoconnor has quit [Ping timeout: 240 seconds]
Cache_Money has quit [Quit: Cache_Money]
freerobby has joined #ruby
lw has joined #ruby
zcreative has quit [Quit: Computer has gone to sleep.]
<canton7> yup
cj3kim_ has joined #ruby
cj3kim_ has quit [Remote host closed the connection]
<zorak8> [3] pry(main)> AM4.to_f
<zorak8> => 1397890800.0
<zorak8> => 25200.0
<zorak8> [4] pry(main)> (AM4.to_f) % 86400
<zorak8> [5] pry(main)> ((AM4.to_f) % 86400) / 60 / 60
<zorak8> => 7.0
zcreative has joined #ruby
omosoj has joined #ruby
<zorak8> this must be 4.0 no 7.0
cover has quit [Remote host closed the connection]
omosoj has quit [Client Quit]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Client Quit]
omosoj has joined #ruby
cassioscabral has joined #ruby
omosoj_ has joined #ruby
Guedes0 has left #ruby ["Saindo"]
nateberkopec has joined #ruby
<canton7> zorak8, that timestamp you've got is for 7am
omosoj has quit [Remote host closed the connection]
<zorak8> AM4 = Chronic.parse('4 am')
<zorak8> => 2014-04-19 04:00:00 -0300
<zorak8> [3] pry(main)> AM4.to_f
<zorak8> => 1397890800.0
<zorak8> [4] pry(main)> (AM4.to_f) % 86400
<zorak8> => 25200.0
<zorak8> [5] pry(main)> ((AM4.to_f) % 86400) / 60 / 60
<zorak8> => 7.0
<canton7> timezone?
<zorak8> mmm
omosoj_ has quit [Client Quit]
omosoj has joined #ruby
<canton7> yeah, -0300
Es0teric has quit [Quit: Computer has gone to sleep.]
MatthewsFace has joined #ruby
nateberkopec has quit [Read error: No route to host]
JJMalina has joined #ruby
<canton7> probably better to grab midnight on the datetime returned by Chronic, then find the difference between that and the actual datetime
MatthewsFace has quit [Client Quit]
sidik has quit []
enebo has quit [Quit: enebo]
<heftig> why use chronic at all?
<zorak8> heftig: cause is easy to put the dates in it
jamto11 has joined #ruby
lw has quit [Quit: s]
sdelmore has quit [Quit: Leaving.]
workmad3 has quit [Ping timeout: 240 seconds]
JJMalina has quit [Ping timeout: 240 seconds]
tjr9898 has quit [Read error: Connection reset by peer]
tjr9898 has joined #ruby
funktor has joined #ruby
<zorak8> canton7: this can work for the moment, but eventually i need to compare the exit of one day to the enter of the next
<canton7> what do you mean by that?
<R33C3> Inserting Time.zone = "UTC"
<R33C3> and then Chronic.time_class = Time.zone before the lines using chronic may fix it
<zorak8> there need to be 12 hours between the exit one day and the enter of the next one
<canton7> 12-hour days wut?
\marrub has left #ruby ["brb dying"]
<zorak8> if there less that 12 hours all this hours have to be paid at 100% extras
butblack has quit [Quit: butblack]
zcreative has quit [Quit: Computer has gone to sleep.]
<canton7> I have no idea what you're trying to say :P
<zorak8> im maing an overtime calculator
codebro has joined #ruby
<zorak8> with the laws of the movie union of Argentina
benlieb has quit [Quit: benlieb]
Milly_Bays has quit [Read error: Connection reset by peer]
pika_pika has joined #ruby
<R33C3> so you get input from someone clocking-in for work and then clocking-out?
mostlybadfly has joined #ruby
combusean has joined #ruby
<R33C3> and you need to make sure it is less than 12 hours a day?
<zorak8> and one of the laws is if between two days of work there are not 12 hours of work any of there ours cost 100% more for the producer
Milly_Bays has joined #ruby
<zorak8> for example
<zorak8> i end my turn at 12 am
<zorak8> and enter again at 10 am
<zorak8> 2 hours cost 100% more
<R33C3> but that is 22 hours between each other
cj3kim_ has joined #ruby
enriclluelles has joined #ruby
<R33C3> nvm
<R33C3> i see what you are getting at
<R33C3> I read that first am as pm
<zorak8> but this is other part of the project
<xorl> simple question, I have these examples here
<zorak8> in this moment im trying to make the "night hours" work
<xorl> So with gistfile1 I keep getting a uninitialized constant Blah::Db (NameError)
<zorak8> (nigh hour is between 9pm and 4am and every 50 minutes count like 60 minutes)
andrewlio has quit [Quit: Leaving.]
siwica has joined #ruby
codebro has quit [Ping timeout: 250 seconds]
nateberkopec has joined #ruby
<tectonic> "data = Blah::Db::Test.new" is running in a class context. Has the file with Blah::Db been loaded yet?
<tectonic> do you mean "def foo; data = Blah::Db::Test.new; end"
<tectonic> ?
<xorl> tectonic at the upper level, yes
<tectonic> so gistfile2 is required before gistfile1?
Asher has quit [Remote host closed the connection]
<xorl> correct
Asher has joined #ruby
<tectonic> does data = ::Blah::Db::Test.new
<tectonic> work?
<xorl> ah nm I think you nailed it
JJMalina has joined #ruby
nateberkopec has quit [Read error: No route to host]
<xorl> I was calling my gistfile2 after gistfile1 I rearranged it and am getting another error
omosoj has quit [Ping timeout: 240 seconds]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tectonic> ah, ok
enriclluelles has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby
<xorl> tectonic yep that was it!
<xorl> Thanks for the help, I was hitting my head against the desk haha
linojon has quit [Quit: linojon]
myke_ is now known as myke
<tectonic> haha, no problem
R33C3 has quit [Ping timeout: 245 seconds]
mjs2600 has joined #ruby
enriclluelles has joined #ruby
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JJMalina has quit [Ping timeout: 240 seconds]
omosoj has joined #ruby
mercwithamouth has joined #ruby
tjsousa has joined #ruby
yubrew has quit [Ping timeout: 245 seconds]
zcreative has joined #ruby
quitobro_ has quit [Remote host closed the connection]
bbloom has joined #ruby
quitobro has joined #ruby
Asher has quit [Quit: Leaving.]
ktun has joined #ruby
mjs2600 has quit [Ping timeout: 245 seconds]
Asher has joined #ruby
freerobby has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
quitobro_ has joined #ruby
near77 has quit [Quit: Page closed]
omosoj has quit [Ping timeout: 240 seconds]
omosoj has joined #ruby
quitobro has quit [Ping timeout: 245 seconds]
freerobby has quit [Ping timeout: 245 seconds]
Fractional has quit [Quit: Leaving]
lkba has quit [Ping timeout: 276 seconds]
Geniack has quit [Disconnected by services]
Geniack_ has joined #ruby
omosoj has quit [Ping timeout: 240 seconds]
meatherly has joined #ruby
combusean has quit [Ping timeout: 276 seconds]
crucify_me has joined #ruby
omosoj has joined #ruby
quitobro_ has quit [Remote host closed the connection]
danguita has quit [Quit: WeeChat 0.4.3]
<crucify_me> http://pastie.org/9094312 hi a recursion exercise has me confused . the last method here (line 20) appends an array in reverse. how does it work?
R33C3 has joined #ruby
siwica has quit [Ping timeout: 276 seconds]
dkannan has joined #ruby
<zorak8> i solve it!
<tectonic> crucify_me: it descends all the way down until n == 0, then climbs back up, shifting n onto the array
nateberkopec has joined #ruby
RastaqWhere has joined #ruby
michaeldeol has joined #ruby
nateberkopec has quit [Read error: No route to host]
<crucify_me> tectonic: 2 is appended last , right?
nateberkopec has joined #ruby
<tectonic> looks like it
i_s has joined #ruby
Shidash has quit [Ping timeout: 252 seconds]
lw has joined #ruby
<crucify_me> tectonic: it seems the first that would happen would be 2 - 1 = 1 here. so I can't see how the first element is 0 . sorry.
<crucify_me> first *thing
R33C3 has quit [Quit: Leaving]
<kayloos_> crucify_me: first thing that happens is 2 -1, then the next thing that happens is 1-1
<tectonic> line 22 descends recursively until line 21 is true
<kayloos_> indeed
<tectonic> so then n is 0 on line 23 (3 recursive calls down)
nateberkopec has quit [Ping timeout: 240 seconds]
<tectonic> draw out the call tree on paper. everytime line 22 is hit, you have to zoom in and call yourself again
i_s has quit [Ping timeout: 276 seconds]
<crucify_me> ok from that I should be able to see it. thanks a lot tectonic kayloos_
<tectonic> no prob
lkba has joined #ruby
Lewix has quit [Remote host closed the connection]
<zorak8> canton7: heftig havenwood solved and working https://gist.github.com/pauloat/b535bff099a14425e395
<crucify_me> tectonic: kayloos_ one thing though, an array is always filling out from the left, correct? It's the push method at work, correct?
<crucify_me> i.e. you can't add elements on the left side of other elements.
<kayloos_> Think about what the computer would have to do if you wanted to add an element to index 0
benzrf|offline is now known as benzrf
tjsousa has quit [Quit: Computer has gone to sleep.]
andy____ has quit [Remote host closed the connection]
cj3kim_ has quit [Remote host closed the connection]
<tectonic> push adds to the right of an array. there are ways to add to the left of an array, but that's not happening here
freerobby has joined #ruby
chipotle has quit [Quit: cya]
<crucify_me> kayloos_: tectonic interesting. The only way would be to use indices I assume.
<kayloos_> crucify_me: you would have to shift the entire array one slot to the right, which would make the push operation very inefficient
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kayloos_> crucify_me: imagine adding one number to an array that contains one million numbers. If you add to the end of the array, the operation would take no time at all, but if you add it to the beginning you would have to shift the entire array, which would take 1 million times more instructions
benlieb has joined #ruby
Lightsword has quit [Ping timeout: 252 seconds]
Es0teric has joined #ruby
RastaqWhere has left #ruby [#ruby]
<crucify_me> kayloos_: ok thanks. recursion is causing me some trouble. I feel like I nearly understand it.
cj3kim_ has joined #ruby
<tectonic> crucify_me: Ruby has "unshift" which adds an element to the beginning of an array. It's not clear how it's implemented internally, but it may well be slow (have to shift everything in the array by 1).
<crucify_me> tectonic: that's cool.
<tectonic> "It's not clear" is my way of saying "I don't know and haven't looked it up."
<kayloos_> crucify_me: do what tectonic says, draw out the call trees and try to 'hand run' the code, that way is really good if u want to understand recursion
freerobby has quit [Quit: Leaving.]
<tectonic> To understand recursion, first you must understand recursion.
mjs2600 has joined #ruby
<bufferloss> lol
<crucify_me> tectonic: kayloos_ !!
andy___ has joined #ruby
<kayloos_> although ruby is hardly a programming language with much focus on recursion
dingus_khan has joined #ruby
<kayloos_> you could try out #haskell :)
cj3kim_ has quit [Remote host closed the connection]
Lightsword has joined #ruby
<benzrf> haskell ftw
<bufferloss> "language with much focus on recursion" is a non-sequitur
<bufferloss> ruby has functions
<bufferloss> that's all you need
<crucify_me> bufferloss: word
<kayloos_> haskell is optimized for efficient recursion
<crucify_me> it's an exercise that uc berkeley has me doing
<bufferloss> kayloos_, maybe you should marry haskell then
<benzrf> haskell doesnt even do recursion like most modern langs do
<benzrf> its all thunk-based
<benzrf> at least it is in GHC
<kayloos_> when did you see recursion in an open source project? I haven't
<kayloos_> in ruby*
<bufferloss> again not sure why this has any relevance to whether you can make use of recursion in ruby
<crucify_me> I spoke to a cs student yesterday who said she has finally understood recursion after a few years.
dik_dak has joined #ruby
nateberkopec has joined #ruby
advorak has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
<kayloos_> bufferloss: Is there a point to all this?
<bufferloss> kayloos_, that's my question to you, precisely
wallerdev has quit [Quit: wallerdev]
<bufferloss> somehow apparently ruby can't do recursion or something weird like that according to kayloos_
<crucify_me> it's a book exercise people but thanks a lot.
Slavox|AFK is now known as Slavox
<benzrf> crucify_me: woah
circuit has joined #ruby
<crucify_me> woah ?
<benzrf> cs stud
<benzrf> ent
<bufferloss> I understood recursion when I was in the womb, what's the big deal?
<crucify_me> no I'm a geezer trying to learn how to program that's all. benzrf
bcx has quit [Ping timeout: 245 seconds]
axel22 has joined #ruby
<bufferloss> crucify_me, beat this little flash game and you'll understand recursion https://www.google.com/search?q=light+bot+2.0
nateberkopec has quit [Ping timeout: 240 seconds]