apeiros_ changed the topic of #ruby to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
gaahrdner has joined #ruby
<dsf> Scriptonaut, :-)
tish1 has quit [Quit: Leaving.]
wyhaines has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
adamjleonard has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
<realDAB> vandemar: you can omit to_s when interpolating things into strings. it happens automatically
joofsh has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 276 seconds]
<realDAB> vandemar: also, if all you need to know is "truthy" vs. "falsy", you don't have to convert things to actual true/false
<realDAB> vandemar: e.g., you could do: Date.parse(v) rescue false end
horofox has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
MehLaptop has joined #ruby
danman has quit [Quit: danman]
arya has quit [Ping timeout: 245 seconds]
mercwithamouth has quit [Ping timeout: 245 seconds]
predator217 has joined #ruby
TheFuzzball has quit [Quit: Computer has gone to sleep.]
danneu has joined #ruby
etcetera has quit []
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
statarb3 has quit [Quit: Leaving]
palyboy has joined #ruby
j^2 has joined #ruby
Spooner has joined #ruby
rakm has quit [Read error: Connection reset by peer]
jlast has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 245 seconds]
rakl has quit [Read error: Connection reset by peer]
axl_ has quit [Quit: axl_]
toekutr has joined #ruby
dEPy has quit []
emergion has joined #ruby
etcetera has joined #ruby
swoosh has quit [Quit: Computer has gone to sleep.]
lethjakman has quit [Ping timeout: 252 seconds]
rakm has joined #ruby
rakm has quit [Max SendQ exceeded]
rakm has joined #ruby
rakl has joined #ruby
enebo has quit [Quit: enebo]
thinkclay has quit [Quit: Leaving.]
MehLaptop has quit [Remote host closed the connection]
emergion has quit [Ping timeout: 264 seconds]
brianpWins has quit [Quit: brianpWins]
rocket has quit [Quit: Linkinus - http://linkinus.com]
Quebert has joined #ruby
arya has joined #ruby
adamjleonard has quit [Read error: Connection reset by peer]
toekutr has quit [Remote host closed the connection]
<vandemar> realDAB: okay. is there a cleaner way to do that, given that this is going to have potentially hundreds of foo_data pairs, and most of those will need their own validator functions?
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
adkron has quit [Ping timeout: 245 seconds]
takeru has joined #ruby
woolite64_ has joined #ruby
<vandemar> realDAB: I mean, structurally
adkron_ has quit [Ping timeout: 256 seconds]
phantasm66 has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
woolite64__ has quit [Ping timeout: 252 seconds]
enroxorz has quit [Ping timeout: 245 seconds]
Mattix has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
Targen has joined #ruby
Scriptonaut has quit [Quit: leaving]
takeru has quit [Ping timeout: 255 seconds]
chendo_ is now known as chendo
tcstar has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
__Big0__ has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
MehLaptop has joined #ruby
aedornm has quit [Quit: Leaving]
tish has joined #ruby
SDr has quit [Read error: Connection reset by peer]
karupanerura has quit [Excess Flood]
NightCreature has joined #ruby
karupanerura has joined #ruby
sambao21 has quit [Quit: sambao21]
arya has quit [Ping timeout: 245 seconds]
Virunga has quit [Remote host closed the connection]
nari has joined #ruby
mrsolo has quit [Quit: Leaving]
hogeo has joined #ruby
chrishough_ has joined #ruby
tish has quit [Quit: Leaving.]
chrishough_ has quit [Client Quit]
chrishough has quit [Ping timeout: 240 seconds]
unflores has joined #ruby
arya has joined #ruby
ckrailo has joined #ruby
idkazuma has quit [Remote host closed the connection]
znode has joined #ruby
cnrk has quit [Quit: cnrk]
<shevy> hmm when I have "15 march 2013" as string, or perhaps "15.03.2013", is there a way in ruby to find out the weekday of that? like friday?
<vandemar> for example, http://pastebin.com/4VA2Y00u vs http://pastebin.com/UbBwhhT6 ... I don't know which direction to favor
tish has joined #ruby
lewix has quit [Remote host closed the connection]
greenarrow has quit [Quit: IRC is just multiplayer notepad]
<havenwood> shevy: Chronic gem could parse those both, e.g.: Chronic.parse('15 march 2013').wday; #=> 5
ckrailo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<shevy> cool
<shevy> thanks
znode has quit [Ping timeout: 245 seconds]
drumond19 has joined #ruby
<X-Jester> does anyone happen to have experience getting "await data" working with tailable cursors with mongodb in ruby? i even tried to add_options the constant, no dice
<Xeago> my printer has a direct line feed on port 9100
<Xeago> cool!
Gwyxx has quit [Quit: Leaving]
skattyadz has quit [Quit: skattyadz]
<shevy> Xeago are you in love with your printer
`p- has quit [Remote host closed the connection]
epiphani has joined #ruby
<Xeago> actually now I kinda am
ad_AA has quit [Ping timeout: 245 seconds]
<Xeago> this means that I can pipe mroff (man pages stuff) directly into my printer :D
ffranz has joined #ruby
<epiphani> ls
<epiphani> heh woops
<Xeago> neways
dougireton has quit [Quit: Leaving.]
<Xeago> bai!
Xeago has quit [Remote host closed the connection]
<shevy> rm -rf /
elaptics is now known as elaptics`away
<epiphani> it would prompt you with a y / n
ffranz has quit [Read error: Connection reset by peer]
arya has quit [Ping timeout: 256 seconds]
<jcsims> lol don't count on it!
mikepack has quit [Remote host closed the connection]
<epiphani> try it and tell me
katherinem13 has quit [Ping timeout: 252 seconds]
<epiphani> ./exec rm -rf /
<jcsims> I'll rely on my years of experience with rm-rf that tells me no
j^2 has quit [Ping timeout: 272 seconds]
<epiphani> ok ok
ner0x has joined #ruby
katherinem13 has joined #ruby
<epiphani> that would be horrible
mattbl has joined #ruby
dougireton has joined #ruby
<havenwood> shevy: Just whipped this up for fun (human readable weekday using chronic): https://gist.github.com/havenwood/5095812
<havenwood> Fun with one-liners >.>: %w[Sun Mon Tues Thurs Fri Satur][Chronic.parse(this).wday] << 'day'
angusiguess has quit [Ping timeout: 252 seconds]
clooth has quit [Quit: clooth]
Ontolog_ has joined #ruby
clooth has joined #ruby
mattbl has quit [Client Quit]
NiteRain has quit [Ping timeout: 246 seconds]
epiphani has quit [Quit: That's it for today]
arya has joined #ruby
MrZYX is now known as MrZYX|off
yshh has joined #ruby
mattbl has joined #ruby
Ontolog has quit [Ping timeout: 272 seconds]
yshh has quit [Read error: No route to host]
yshh_ has joined #ruby
Ontolog_ has quit [Remote host closed the connection]
Ontolog has joined #ruby
<vandemar> also Date::DAYNAMES may help.
zeade has joined #ruby
ben___ has quit [Quit: ben___]
nga4 has quit []
lewix has joined #ruby
<havenwood> vandemar: Oh nice. Didn't realize there was one, thanks! :)
<lewix> hi
<havenwood> hi
mercwithamouth has joined #ruby
<havenwood> vandemar: Much nicer :D Date::DAYNAMES[Chronic.parse('today').wday]; #=> "Tuesday"
Triconium has quit [Quit: Leaving...]
nari has quit [Ping timeout: 245 seconds]
eka has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 245 seconds]
`p has joined #ruby
Spooner has quit [Remote host closed the connection]
Triconium has joined #ruby
chendo has quit [Ping timeout: 252 seconds]
chendo_ has joined #ruby
joshman_ has quit [Ping timeout: 245 seconds]
gaahrdner has quit [Remote host closed the connection]
`p has quit [Remote host closed the connection]
jonahR has joined #ruby
Nisstyre-laptop has joined #ruby
rickmasta has quit [Quit: Leaving...]
jonahR has quit [Client Quit]
<vandemar> havenwood: does chronic have a Chronic.today? Date does.
rickmasta has joined #ruby
unflores has quit [Quit: unflores]
<havenwood> vandemar: Only does string parsing I think, so 'last month' or 'day after tomorrow' work but I *think* parse is the only method.
dougireton has quit [Remote host closed the connection]
<havenwood> yeah, #parse and #construct
angusiguess has joined #ruby
marr has quit [Ping timeout: 276 seconds]
cyberflux has joined #ruby
frem has quit [Quit: Computer has gone to sleep.]
Honeycomb has quit [Quit: Leaving.]
sambao21 has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
lewix has quit [Remote host closed the connection]
gaahrdner has joined #ruby
huoxito has joined #ruby
gaahrdner has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
iamjarvo has joined #ruby
_whitelogger has joined #ruby
whitequark has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
axxT has quit [Quit: ( .Ng Gaming ver.1337 :: www.NinpoGaming.com :: Now Leaving mIRC Teleport +1 )]
axxT has joined #ruby
TomJ has joined #ruby
`brendan has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
dsf has quit [Quit: This computer has gone to sleep]
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
maletor has joined #ruby
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
<Quadlex> OK
<Quadlex> So I want to do something which I'm reasonably sure is a terrible idea.
<Quadlex> But I need my gem to behave slightly differently depending on which version of Capybara is present
<Quadlex> Which isn't a problem. what is a problem is setting up a test for that
adkron has joined #ruby
<Quadlex> I suppose I could just try to mock the Capybara version but that seems unreliable
<Quadlex> Any thoughts?
adkron_ has joined #ruby
maletor has quit [Ping timeout: 240 seconds]
lewix has joined #ruby
emmanuelux has quit [Remote host closed the connection]
clooth has quit [Quit: clooth]
Mattix has quit [Quit: Leaving]
sambao21 has quit [Quit: sambao21]
MehLaptop has quit [Remote host closed the connection]
jborica has joined #ruby
jonathanwallace has joined #ruby
<danneu> Quadlex: is it a recent one-off version of capy or something?
ngoldman has quit [Remote host closed the connection]
<Quadlex> danneu: No, I want/need to support both Capybara 1 and Capybara 2
ephemerian has quit [Quit: Leaving.]
adkron_ has quit [Ping timeout: 245 seconds]
<Quadlex> We do some internal fuckery, so some of the methods are missing for 2+
adkron has quit [Ping timeout: 256 seconds]
kofno has joined #ruby
_veer has quit [Ping timeout: 272 seconds]
<Quadlex> And before I can test my code, I need to manage the version inside of my tests
drale2k has quit [Quit: Leaving...]
<danneu> how have other gems solved the problem
<Quadlex> Someone else use exeception based handling >.>
hiroyuki has quit [Ping timeout: 256 seconds]
Triconium has quit [Quit: Linkinus - http://linkinus.com]
<danneu> this is above my head btw but i'd be interested in knowing how people solve it
<Quadlex> Yeah, me too:P
<danneu> in case you thought i was on the cusp of typing out some dope solution
danman has joined #ruby
<Quadlex> Heh
nga4 has joined #ruby
<danneu> is it possible to maintain two releases (like mygem1.0 for capy1 and mygem2.0 for capy2) that Bundler can just resolve?
danman has quit [Client Quit]
<danneu> that's what projects like rails do
wmoxam has joined #ruby
one` has joined #ruby
johnnygoodmancpa has joined #ruby
<Quadlex> danneu: I was thinking about it. I might actually go that way
<Quadlex> But for now, the changes are just changes in aliasing
<Quadlex> So I wanted to have one code base
ilyam has joined #ruby
<danneu> yeah right
<Quadlex> What I think I'll do is use Travis to do my builds
<Quadlex> Develop against Capy2
<Quadlex> And have a Travis build for Capy1
<danneu> yeah that's what i was thinking. master against capybara latest, but have a backport branch or something
Honeycomb has joined #ruby
<Quadlex> So gross:P
<Quadlex> Sometimes I wish it was just a stand alone project
<danneu> but it's proper at least
jalcine has quit [Excess Flood]
<Quadlex> I could depricate (sp) support for Capy 1 and tell anyone who complains they're welcome to fork:P
justinmcp has joined #ruby
qubit has joined #ruby
jacky has joined #ruby
NiteRain has joined #ruby
<danneu> yeah, i mean there's a reason you even care about capy1 support right?
<danneu> i imagine you have capy1 users
<Quadlex> My gem is an integration for a commercial product, where I work
<Quadlex> And we have capy1 users... Some of the original gem authors
<Quadlex> So it isn't just a bad idea commercially, it's rude
jacobw has joined #ruby
stopbit has joined #ruby
jacky has quit [Excess Flood]
havenwood has joined #ruby
ttt has joined #ruby
dmiller1 has joined #ruby
sn0wb1rd has quit [Quit: I will be right back]
<danneu> yeah i wouldnt drop it
mattbl has joined #ruby
<danneu> ok, useless statement. but i mean that even the naive solution of maintaining 2 releases is at least straightforward
chipotle_ has joined #ruby
<danneu> but im pretty bad at testing anyways
<danneu> so it'd just optimize for tests that suck less
gregorg has quit [Read error: Connection reset by peer]
<danneu> :)
gregorg has joined #ruby
gregorg has quit [Changing host]
gregorg has joined #ruby
MehLaptop has joined #ruby
yacks has joined #ruby
danman has joined #ruby
nari has joined #ruby
jacky- has joined #ruby
multi_io has quit [Ping timeout: 276 seconds]
crackfu has joined #ruby
sailias has joined #ruby
rakl has quit [Quit: sleeping]
hiroyuki has joined #ruby
clooth has joined #ruby
swarley-freenode is now known as swarley
peteyg has quit [Quit: Lost terminal]
adkron has joined #ruby
adkron_ has joined #ruby
Ontolog_ has quit [Remote host closed the connection]
jacky- is now known as jacky
jacky has joined #ruby
jacky has quit [Changing host]
mootpointer has joined #ruby
clooth has quit [Client Quit]
rhinux has joined #ruby
kofno has quit [Remote host closed the connection]
danneu has quit [Ping timeout: 245 seconds]
crazymykl has quit [Read error: Connection reset by peer]
crazymykl has joined #ruby
jean-lou` has joined #ruby
jean-louis has quit [Read error: No route to host]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
samphippen has quit [Quit: Computer has gone to sleep.]
_maes_ has joined #ruby
fire has joined #ruby
marcux has quit [Quit: marcux]
angusiguess has joined #ruby
adkron has quit [Ping timeout: 245 seconds]
adkron_ has quit [Ping timeout: 245 seconds]
thinkclay has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
justinmcp has quit [Ping timeout: 245 seconds]
Voodoofish430 has quit [Quit: Leaving.]
adkron has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
chrishunt has quit [Quit: ZzZzZz...]
<lectrick> havenwood: Thanks, that's what I was looking for more or less!
<havenwood> lectrick: cool, no prob :)
jdunck has quit [Quit: Computer has gone to sleep.]
v0n has joined #ruby
aedornm has joined #ruby
adkron_ has joined #ruby
jurassic has joined #ruby
johnnygoodmancpa has left #ruby [#ruby]
philcrissman has joined #ruby
dsf has joined #ruby
jetblack has quit [Quit: leaving]
deadalus has quit [Excess Flood]
tjbiddle has joined #ruby
joeycarmello has joined #ruby
sabooky has joined #ruby
joeycarmello has quit [Read error: Connection reset by peer]
dankest has joined #ruby
joeycarmello has joined #ruby
c0rn has joined #ruby
<sabooky> If I have a class with a few class methods basically a bunch of: def variable @@variable ||= (code to lookup variable) end
<sabooky> should I be using a class or module for this kind of thing?
cyberflux has quit []
Hanmac2 has joined #ruby
<Quadlex> sabooky: That's a stylistic question:P
<Quadlex> What is your concern?
danneu has joined #ruby
<sabooky> Quadlex: best practices or if it even matters
<havenwood> sabooky: I think classes are overused a good deal more than modules. If it works as a module, I'd argue module is right.
jetblack has joined #ruby
banjara has quit [Quit: Leaving.]
squidBits has quit [Read error: Connection reset by peer]
<havenwood> s/works/works painlessly without obvious benefit from being a class
<sabooky> ok, just checking
petecheslock has left #ruby ["Leaving..."]
<sabooky> thank you both
squidBits has joined #ruby
jurassic has quit [Quit: jurassic]
fire is now known as firewall
Hanmac1 has quit [Ping timeout: 276 seconds]
<Quadlex> sabooky: Would you ever instantiate an instance of the class?
<Quadlex> if no, that's a decent indication it's a Module
<sabooky> Quadlex: The answer was no in this case, which is what made me think... "does this even need to be a class?" then I came and asked to be sure
<sabooky> It does have class variables though
pdamer has joined #ruby
<sabooky> but that should just work
<Quadlex> Cool
tomzx_mac has joined #ruby
kofno has joined #ruby
cephalopod has joined #ruby
cantonic has quit [Read error: Operation timed out]
tjbiddle has quit [Quit: tjbiddle]
cantonic has joined #ruby
ace939 has joined #ruby
zeade has quit [Quit: Leaving.]
<ace939> hey all i need to convert an array to a hash, but the has has already pre-defined keys.. here is a snippet that i need help with
jef_abraham has joined #ruby
Hanmac2 has quit [Ping timeout: 245 seconds]
predator217 has quit [Ping timeout: 272 seconds]
wmoxam has quit [Read error: Connection reset by peer]
wmoxam has joined #ruby
Hanmac1 has joined #ruby
squidBits has quit [Quit: whoops]
deadalus has joined #ruby
joeycarmello has quit [Remote host closed the connection]
dsf has quit [Quit: This computer has gone to sleep]
adkron has quit [Ping timeout: 240 seconds]
adkron_ has quit [Ping timeout: 272 seconds]
tjbiddle has joined #ruby
_veer has joined #ruby
douglarek_away has quit [Quit: 我玩去了]
douglarek_away has joined #ruby
<havenwood> ace939: Could use Ruby 2.0.0's Class#to_h: https://gist.github.com/havenwood/5096345
deadalus has quit [Max SendQ exceeded]
<havenwood> ace939: Might make a nice Struct though, rather than Hash.
predator117 has joined #ruby
verysoftoiletppr has quit []
Takehiro_ has joined #ruby
mockra has joined #ruby
tjbiddle has quit [Client Quit]
verysoftoiletppr has joined #ruby
ryanf has quit [Quit: leaving]
chipotle_ has quit [Quit: cya]
douglarek_away is now known as douglarek
douglarek is now known as douglarek_free
DrShoggoth has quit [Remote host closed the connection]
newUser1234 has joined #ruby
philcrissman has quit [Read error: Connection reset by peer]
philcrissman has joined #ruby
MehLaptop has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
ny11 has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9.2]
deadalus has joined #ruby
ny11 has quit [Read error: Connection reset by peer]
espinet has joined #ruby
nanothief has joined #ruby
ny11 has joined #ruby
sn0wb1rd has joined #ruby
philcrissman_ has joined #ruby
philcrissman has quit [Ping timeout: 272 seconds]
DrShoggoth has joined #ruby
<espinet> i'm having an issue with define_method and an if statement. it seems to always evaluate to true… even when the conditional value is false. https://gist.github.com/espinet/5096379
havenwood has quit [Remote host closed the connection]
pepper_chico has joined #ruby
joeycarmello has joined #ruby
arya has joined #ruby
jacobw has quit [Quit: WeeChat 0.4.0]
deadalus has quit [Max SendQ exceeded]
mbduino has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
ngoldman has joined #ruby
AndChat| has quit [Ping timeout: 255 seconds]
Emplitz has joined #ruby
dsf has joined #ruby
freakazoid0223 has quit [Read error: Connection reset by peer]
Banistergalaxy has joined #ruby
<mbduino> learning ruby takes me back to the days of learning Perl for Linux administration
sailias has joined #ruby
MehLaptop has joined #ruby
ny11 has quit [Remote host closed the connection]
ny11 has joined #ruby
petecheslock has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
Pandaen has joined #ruby
gani has joined #ruby
baroquebobcat has joined #ruby
gani|2 has joined #ruby
vagmi has joined #ruby
gani has quit [Client Quit]
deadalus has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
verysoftoiletppr has quit []
Banistergalaxy has joined #ruby
<aytch> mbduino: except less pulling out of hair
<aytch> and I can read ruby code the next day
twoism has quit [Remote host closed the connection]
<mbduino> it's going pretty smooth so far
etcetera has quit []
<aytch> how are you learning it?
sambao21 has joined #ruby
sambio has quit []
<mbduino> I'm headed toward rails basically, this is for web application development
angusiguess has joined #ruby
ny11 has quit [Remote host closed the connection]
<aytch> yeah, I did the Rails tutorial, then decided I needed to learn more about Ruby and programming in general
ny11 has joined #ruby
<aytch> I'm more of an ops person
<aytch> I've been working through these to better understand the data types: http://rubykoans.com/
pac1 has quit [Ping timeout: 264 seconds]
ny11 has quit [Read error: Connection reset by peer]
ny11 has joined #ruby
<mbduino> ops as in admin user type?
ny11 has quit [Read error: Connection reset by peer]
ny11 has joined #ruby
rakl has joined #ruby
espinet has quit [Quit: espinet]
angusiguess has quit [Ping timeout: 276 seconds]
jonathanwallace has quit [Ping timeout: 245 seconds]
znode has joined #ruby
rupee has quit [Quit: Leaving]
deadalus has quit [Max SendQ exceeded]
mikurubeam has quit [Ping timeout: 245 seconds]
unconsolably04 has quit [Ping timeout: 252 seconds]
JStoker has quit [Excess Flood]
aedornm has quit [Quit: Leaving]
dsf has quit [Quit: This computer has gone to sleep]
Gwyxx has joined #ruby
rocket has joined #ruby
sailias has quit [Quit: Leaving.]
Ontolog has joined #ruby
jerius has quit []
ny11 has quit [Remote host closed the connection]
ny11 has joined #ruby
joofsh has joined #ruby
Takehiro_ has quit [Remote host closed the connection]
s122 has joined #ruby
Quebert has quit [Ping timeout: 245 seconds]
newUser1234 has quit [Remote host closed the connection]
alvaro_o has quit [Quit: Ex-Chat]
ny11 has quit [Ping timeout: 256 seconds]
ny11 has joined #ruby
dankest has quit [Quit: Leaving...]
s122 has quit [Ping timeout: 256 seconds]
ny11 has quit [Read error: Connection reset by peer]
ny11 has joined #ruby
pepper_chico has quit [Quit: Computer has gone to sleep.]
locriani has joined #ruby
ny11 has quit [Read error: Connection reset by peer]
ny11 has joined #ruby
ny11 has quit [Read error: Connection reset by peer]
hbpoison has quit [Ping timeout: 276 seconds]
ny11 has joined #ruby
hbpoison has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
ny11 has quit [Read error: Connection reset by peer]
pepper_chico has joined #ruby
ny11 has joined #ruby
sambao21 has quit [Quit: sambao21]
kofno has quit [Remote host closed the connection]
s122 has joined #ruby
macmartine has joined #ruby
freeayu has joined #ruby
JStoker has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
uris has quit [Quit: Leaving]
ny11 has quit [Ping timeout: 256 seconds]
ngoldman_ has joined #ruby
ny11 has joined #ruby
Ontolog has quit [Remote host closed the connection]
s122 has quit [Ping timeout: 256 seconds]
ny11 has quit [Read error: Connection reset by peer]
ny11 has joined #ruby
lewix has quit [Remote host closed the connection]
deadalus has joined #ruby
<ace939> you guys know if Net::POP.enable_ssl is thread safe? meaning i have to connect to some pop inboxes that are not ssl and some are.. so if i multi thread.. will it change if 1 thread sets to enable and another not?
fumbe has quit [Ping timeout: 248 seconds]
s122 has joined #ruby
znode has quit [Remote host closed the connection]
ngoldman has quit [Ping timeout: 255 seconds]
s122 has quit [Read error: Connection reset by peer]
s122 has joined #ruby
joofsh has quit [Remote host closed the connection]
s122 has quit [Read error: Connection reset by peer]
s122 has joined #ruby
sambao21 has joined #ruby
ny11 has quit [Ping timeout: 256 seconds]
tjbiddle has joined #ruby
MehLaptop has quit [Remote host closed the connection]
hashmal has joined #ruby
Domon has joined #ruby
mattbl has joined #ruby
lewix has joined #ruby
pepper_chico has quit [Quit: Computer has gone to sleep.]
crankycoder has quit [Ping timeout: 276 seconds]
aapzak has quit [Ping timeout: 255 seconds]
jeremywrowe_ has quit [Quit: jeremywrowe_]
ocnam has joined #ruby
aapzak has joined #ruby
s122 has quit [Remote host closed the connection]
CrazyDog_ has quit [Ping timeout: 245 seconds]
CrazyDog has joined #ruby
ny11 has joined #ruby
slyv has quit [Quit: Computer has gone to sleep.]
ny11 has quit [Read error: Connection reset by peer]
ny11 has joined #ruby
pskosinski has quit [Quit: Red Eclipse, game of racist admins/devs: http://pawelk.pl/racist-red-eclipse-quin-zeroknight-gingerbear/]
newUser1234 has joined #ruby
ny11 has quit [Read error: Connection reset by peer]
`p has joined #ruby
ny11 has joined #ruby
ny11 has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
ny11 has joined #ruby
ny11 has quit [Read error: Connection reset by peer]
ny11 has joined #ruby
SCommette has joined #ruby
SCommette has quit [Client Quit]
splud has quit [Quit: splud]
SCommette has joined #ruby
mikepack has joined #ruby
havenwood has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
MehLaptop has joined #ruby
crankycoder has joined #ruby
hbpoison has quit [Ping timeout: 276 seconds]
multi_io has joined #ruby
ngoldman has joined #ruby
jurassic has joined #ruby
reset has quit [Ping timeout: 255 seconds]
rafacv has quit [Ping timeout: 264 seconds]
rezzack has quit [Quit: Leaving.]
chawstick60 has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
ny11 has quit [Remote host closed the connection]
splud has joined #ruby
ny11 has joined #ruby
ngoldman has quit [Read error: Connection reset by peer]
sandGorgon has joined #ruby
ngoldman has joined #ruby
ngoldman has quit [Remote host closed the connection]
ngoldman_ has quit [Ping timeout: 260 seconds]
znode has joined #ruby
sambao21 has quit [Quit: sambao21]
tjbiddle has quit [Quit: tjbiddle]
ckrailo has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
chawstick60 has quit [Remote host closed the connection]
ny11 has quit [Remote host closed the connection]
ny11 has joined #ruby
mootpointer has quit [Quit: Computer has gone to sleep.]
ny11 has quit [Read error: Connection reset by peer]
hemanth has quit [Ping timeout: 248 seconds]
ny11 has joined #ruby
znode has quit [Ping timeout: 245 seconds]
jef_abraham has quit [Quit: jef_abraham]
ny11 has quit [Read error: Connection reset by peer]
ny11 has joined #ruby
JStoker has quit [Excess Flood]
maldives68 has joined #ruby
SCommette has quit [Quit: SCommette]
danman has quit [Quit: danman]
crankycoder has quit [Ping timeout: 252 seconds]
jonathanwallace has joined #ruby
maldives68 has quit [Remote host closed the connection]
crankycoder has joined #ruby
hbpoison has joined #ruby
diffract41 has joined #ruby
gtuckerkellogg has joined #ruby
rh1n0 has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
mikepack_ has joined #ruby
crackfu has quit [Remote host closed the connection]
girija_ has joined #ruby
Domon has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 245 seconds]
digifiv5e has joined #ruby
diffract41 has quit [Remote host closed the connection]
digifiv5e is now known as Guest63384
hemanth has joined #ruby
ny11 has quit [Remote host closed the connection]
ny11 has joined #ruby
forlive18 has joined #ruby
jjjkkmm has joined #ruby
astrostl has joined #ruby
nga4 has quit []
dhruvasagar has joined #ruby
<astrostl> defining class 'Foo' with a method 'fetch' to grab a file via http. thought i would call as Foo::fetch('url') or fetch('url') because i'm not creating an object for 'storage' - it's just triggering a download. what is the right way to do this? new an object that i'm not going to directly use?
chrishunt has joined #ruby
sabooky has quit [Ping timeout: 245 seconds]
sabooky has joined #ruby
<astrostl> thing = Foo.new then thing.fetch('url') works, it just "feels weird" to me
rh1n0 has quit [Quit: Leaving...]
freakazoid0223 has joined #ruby
rh1n0 has joined #ruby
Guest63384 has quit [Read error: Connection reset by peer]
forlive18 has quit [Ping timeout: 256 seconds]
rh1n0 has quit [Client Quit]
JStoker has joined #ruby
generalissimo has joined #ruby
ny11 has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
ny11 has joined #ruby
ny11 has quit [Read error: Connection reset by peer]
ny11 has joined #ruby
digifiv5e_ has joined #ruby
ny11 has quit [Read error: Connection reset by peer]
jjjkkmm has left #ruby [#ruby]
ny11 has joined #ruby
jgrevich has joined #ruby
kofno has joined #ruby
wmoxam has quit [Quit: leaving]
ny11 has left #ruby [#ruby]
icole has joined #ruby
meliorable26 has joined #ruby
digifiv5e_ has quit [Quit: quit]
`p has quit [Remote host closed the connection]
d2dchat has joined #ruby
adkron has joined #ruby
adkron_ has joined #ruby
astrostl has quit []
chendo_ has quit [Ping timeout: 240 seconds]
cyong has joined #ruby
kofno has quit [Ping timeout: 260 seconds]
arya has quit []
dorei has quit []
adkron__ has joined #ruby
chendo_ has joined #ruby
meliorable26 has quit [Ping timeout: 245 seconds]
mattbl has joined #ruby
znode has joined #ruby
yewton has quit [Excess Flood]
yewton has joined #ruby
twoism has joined #ruby
zeade has joined #ruby
feedbackloop has joined #ruby
arya has joined #ruby
robbyoconnor has joined #ruby
jef_abraham has joined #ruby
jef_abraham has quit [Client Quit]
jef_abraham has joined #ruby
twoism has quit [Remote host closed the connection]
twoism has joined #ruby
gani|2 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
zeade has quit [Client Quit]
sambao21 has joined #ruby
a_a_g has joined #ruby
sepp2k has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
maycon has quit [Quit: Saindo]
end_guy has quit [Write error: Broken pipe]
DrCode has quit [Write error: Broken pipe]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
sambao21 has quit [Ping timeout: 245 seconds]
ananthakumaran has joined #ruby
adkron__ has quit [Ping timeout: 245 seconds]
adkron has quit [Ping timeout: 240 seconds]
quila23 has joined #ruby
nfk has quit [Quit: yawn]
end_guy has joined #ruby
jgrevich has quit [Ping timeout: 245 seconds]
thinkclay has quit [Quit: Leaving.]
jgrevich has joined #ruby
rh1n0 has joined #ruby
sabooky has quit [Ping timeout: 245 seconds]
dankest has joined #ruby
angusiguess has joined #ruby
divout has joined #ruby
nomenkun has joined #ruby
chrishunt has quit [Quit: ZzZzZz...]
ner0x has quit [Quit: Leaving]
arya has quit [Ping timeout: 248 seconds]
tommyvyo has quit [Quit:]
mattbl has quit [Quit: This computer has gone to sleep]
rh1n0 is now known as rh1n0|away
jurassic has quit [Quit: jurassic]
banjara has joined #ruby
arya has joined #ruby
jonathanwallace has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
mikurubeam has joined #ruby
adkron_ has quit [Ping timeout: 276 seconds]
shammancer_ has quit [Quit: Leaving.]
shammancer has joined #ruby
axtran has quit [Quit: Leaving]
mikepack_ has quit [Remote host closed the connection]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
icole has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 245 seconds]
newUser1234 has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 256 seconds]
icole has joined #ruby
nachtwandler has joined #ruby
Domon has joined #ruby
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jacky has quit [Excess Flood]
jurassic has joined #ruby
mikepack has joined #ruby
stopbit has quit [Quit: Leaving]
arya has quit [Ping timeout: 248 seconds]
<hemanth> gem push says : " undefined local variable or method `metadata' for Gem::Specification"
<hemanth> what am i missing?
endzyme has quit [Remote host closed the connection]
tomzx_mac has quit [Ping timeout: 276 seconds]
postmodern has joined #ruby
<hemanth> Hanmac, around?
* Hanmac appears
elico has joined #ruby
arya has joined #ruby
<hemanth> Hanmac, gem push says : " undefined local variable or method `metadata' for Gem::Specification" :|
<Hanmac> hemanth ... did you call the metadata function or does gem call it?
noop has joined #ruby
<hemanth> nope
jacky- has joined #ruby
jacky- has quit [Excess Flood]
codecop has joined #ruby
jacky- has joined #ruby
mikepack_ has joined #ruby
<hemanth> gem build worked find
<hemanth> /find/fine/
thebastl has joined #ruby
girija_ has quit [Ping timeout: 245 seconds]
<Hanmac> hemanth: metadata is an 2.0+ method ...
<hemanth> Hanmac, btw i'm on ruby2.0
<hemanth> so....I need to use <2.0? :(
znode has quit [Remote host closed the connection]
<Hanmac> ... then i dont know ... i didnt push a gem for a long time... hemanth ... there is an update for rubygems itself ... maybe you can try it
<hemanth> Hanmac, a with wrong dep has been downloaded 500 time already and no one reproted the issue :( open-uri was named as oepn-uri
<hemanth> oki..will try
vipjun has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
v0n has joined #ruby
MehLaptop has quit [Remote host closed the connection]
<hemanth> Hanmac, crazy! now it says "Can't find 'rubygems-update' in any repo. Check `gem source list`."
`p has joined #ruby
Azrial has quit [Remote host closed the connection]
<hemanth> gem source has the required :(
girija_ has joined #ruby
sn0wb1rd has joined #ruby
firewall has quit [Ping timeout: 256 seconds]
arya has quit [Ping timeout: 248 seconds]
tylersmith has quit [Quit: tylersmith]
Quebert has joined #ruby
rh1n0|away has quit [Quit: Linkinus - http://linkinus.com]
johnnygoodmancpa has joined #ruby
<hemanth> Pinging rubygems.org [54.245.255.174] with 32 bytes of data:
<hemanth> Request timed out. [WTF!] Hanmac!
johnnygoodmancpa has quit [Client Quit]
<hemanth> lol how can that be! I'm able to acess it from the browser
threesome has joined #ruby
<hemanth> well...curl works
jef_abraham has quit [Quit: jef_abraham]
rocket has quit [Ping timeout: 250 seconds]
jef_abraham has joined #ruby
arya has joined #ruby
<Hanmac> hemanth ... i though that gem update --system should work
ananthakumaran1 has joined #ruby
<hemanth> Hanmac, gem update --system happened, but gem push fails....strange
ananthakumaran has quit [Ping timeout: 240 seconds]
arya_ has joined #ruby
havenwood has quit [Remote host closed the connection]
one` has quit []
jamescarr_ has joined #ruby
<jamescarr_> hey fellas, trying to run spec 2.4 and getting this: `require': cannot load such file -- spec/autorun
<jamescarr_> any ideas?
philcrissman_ has quit [Remote host closed the connection]
maletor has joined #ruby
arya has quit [Ping timeout: 248 seconds]
arya_ is now known as arya
pdamer has quit [Quit: pdamer]
cantonic has quit [Quit: cantonic]
<hemanth> Hanmac, ICMP is diabled by rugygems.org
Corey has joined #ruby
pyrac has joined #ruby
ping-pong has quit [Ping timeout: 248 seconds]
carraroj has joined #ruby
* Hanmac know nothing
rhinux has quit [Quit: Konversation terminated!]
angusiguess has joined #ruby
jpfuentes2 has joined #ruby
elico has quit [Quit: elico]
<hemanth> Hanmac, np, let me give it break. gem yank worked :D
angusiguess has quit [Ping timeout: 250 seconds]
sn0wb1rd has quit [Quit: sn0wb1rd]
jurassic has quit [Quit: jurassic]
wallerdev has quit [Quit: wallerdev]
rhinux has joined #ruby
ping-pong has joined #ruby
generalissimo has quit [Remote host closed the connection]
jean-lou` has quit [Read error: No route to host]
maletor has quit [Quit: Computer has gone to sleep.]
cyong has quit [Quit: Leaving.]
Hanmac has quit [Quit: Leaving.]
mootpointer has joined #ruby
huoxito has quit [Quit: Leaving]
Katafalkas has joined #ruby
nachtwandler has quit [Remote host closed the connection]
jellosea_ has joined #ruby
<jellosea_> how to do i set the nth bit of a number in ruby?
<wildcard0> num & 00000100 ?
Katafalkas has left #ruby ["Leaving..."]
<wildcard0> well i guess | there
<wildcard0> and and to turn them off
iamjarvo has quit [Quit: Leaving.]
statarb3 has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
Targen has quit [Ping timeout: 255 seconds]
puppeh has joined #ruby
stkowski has quit [Quit: stkowski]
etcetera has joined #ruby
RJ3__ has quit [Ping timeout: 245 seconds]
<jellosea_> just wondering if there was some shortcut
mduvall has joined #ruby
mafolz has joined #ruby
<jellosea_> like for reading bits you can use the index accessors
<jellosea_> accessor
<jellosea_> syntax , whatever haha
mockra has quit [Remote host closed the connection]
jhowarth has quit [Ping timeout: 245 seconds]
etcetera has quit [Read error: Connection reset by peer]
girija_ has quit [Remote host closed the connection]
rwz has quit [Ping timeout: 245 seconds]
divout has quit [Ping timeout: 252 seconds]
mikepack_ has quit [Remote host closed the connection]
bluehavana has quit [Ping timeout: 276 seconds]
strax_ has quit [Ping timeout: 256 seconds]
tagrudev has joined #ruby
divout has joined #ruby
maletor has joined #ruby
xerxas has quit [Ping timeout: 264 seconds]
rcsheets has quit [Ping timeout: 245 seconds]
davidboy has quit [Ping timeout: 240 seconds]
girija has joined #ruby
m3pow has joined #ruby
sayan has joined #ruby
[0x1a] has quit [Ping timeout: 260 seconds]
[Neurotic] has quit [Ping timeout: 245 seconds]
Astral__ has joined #ruby
etcetera has joined #ruby
srid has quit [Ping timeout: 245 seconds]
Mon_Ouie has joined #ruby
seanmccann has joined #ruby
Spaceghost|cloud has quit [Ping timeout: 245 seconds]
[diecast] has quit [Ping timeout: 255 seconds]
notbrent_ has quit [Ping timeout: 252 seconds]
icole has quit [Remote host closed the connection]
moeSeth_ has quit [Ping timeout: 245 seconds]
v0n has quit [Ping timeout: 245 seconds]
Astral_ has quit [Ping timeout: 245 seconds]
thejefflarson_ has quit [Ping timeout: 264 seconds]
kaichanvong has quit [Read error: Operation timed out]
yeban has quit [Ping timeout: 240 seconds]
mikepack has quit [Remote host closed the connection]
workmad3 has joined #ruby
guilleiguaran has quit [Ping timeout: 252 seconds]
joshwines has quit [Ping timeout: 264 seconds]
blob has quit [Ping timeout: 252 seconds]
Unayung1 has joined #ruby
cephalopod has quit [Ping timeout: 276 seconds]
andikr has joined #ruby
drumond19 has quit [Remote host closed the connection]
twoism has quit [Ping timeout: 255 seconds]
seanmccann has quit []
PanPan has joined #ruby
MehLaptop has joined #ruby
krz has joined #ruby
Hanmac has joined #ruby
icole has joined #ruby
mikepack has joined #ruby
TheFuzzball has joined #ruby
blob has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
dhruvasagar has quit [Ping timeout: 276 seconds]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
hemanth has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
hemanth has joined #ruby
becom33 has joined #ruby
flip_digits has quit [Quit: Textual IRC Client: www.textualapp.com]
<becom33> does anyone of u use sublime text
<becom33> ?
lewix has quit [Read error: Connection reset by peer]
lewix has joined #ruby
nomenkun has quit [Remote host closed the connection]
jamescarr_ has quit [Quit: jamescarr_]
dsf has joined #ruby
pen has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
guilleiguaran has joined #ruby
jdunck has joined #ruby
testingb0t has joined #ruby
VinceThePrince has joined #ruby
testingb0t has quit [Client Quit]
soc42 has joined #ruby
drumond19 has joined #ruby
hemanth has quit [Ping timeout: 245 seconds]
dmiller1 has quit [Ping timeout: 276 seconds]
apeiros_ has joined #ruby
<Unayung1> yes I use sublime text 2
hemanth has joined #ruby
lewix has quit [Remote host closed the connection]
pyrac has quit [Quit: pyrac]
vlad_starkov has quit [Remote host closed the connection]
Morkel has joined #ruby
charliesome_ has joined #ruby
charliesome_ is now known as charliesome
piotr_ has joined #ruby
angusiguess has joined #ruby
drumond19 has quit [Remote host closed the connection]
jprovazn has joined #ruby
etcetera has quit []
angusiguess has quit [Ping timeout: 240 seconds]
arya has quit [Ping timeout: 248 seconds]
filipe_ has joined #ruby
Rails_ has joined #ruby
<Rails_> hi all :)
rakl has quit [Quit: gone]
ilyam has quit [Quit: ilyam]
Rails_ has left #ruby [#ruby]
arya_ has joined #ruby
aganov has joined #ruby
Unayung1 has quit [Quit: WeeChat 0.3.8]
whowantstolivefo has quit [Read error: Connection reset by peer]
whowantstolivefo has joined #ruby
luckyruby has joined #ruby
ryanf has joined #ruby
pen has joined #ruby
IrishGringo has quit [Ping timeout: 245 seconds]
ephemerian has joined #ruby
mikepack has quit [Remote host closed the connection]
ferdev has quit [Quit: ferdev]
mpfundstein has quit [Remote host closed the connection]
braoru has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
icole has quit [Remote host closed the connection]
icole has joined #ruby
Neandre has joined #ruby
lewix has quit [Remote host closed the connection]
threesome has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
razibog has joined #ruby
mduvall has quit [Ping timeout: 245 seconds]
lewix has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
icole has quit [Ping timeout: 245 seconds]
goganchic has joined #ruby
vlad_starkov has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
mikurubeam has quit [Quit: +1 (Yes.) -1 (No.) i (WTF?)]
vlad_starkov has quit [Remote host closed the connection]
arya has joined #ruby
MehLaptop has quit [Ping timeout: 255 seconds]
mootpointer has quit [Quit: Computer has gone to sleep.]
lewix has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 245 seconds]
jacky- is now known as jacky
jacky has quit [Changing host]
jacky has joined #ruby
ryanf has quit [Ping timeout: 240 seconds]
TomJ_ has joined #ruby
TomJ has quit [Ping timeout: 240 seconds]
TomJ_ is now known as TomJ
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
pseudonymous has joined #ruby
feedbackloop_ has joined #ruby
dayepa_ has quit [Read error: Connection reset by peer]
dayepa_ has joined #ruby
pygmael has joined #ruby
feedbackloop has quit [Ping timeout: 256 seconds]
pyrac has joined #ruby
ferdev has joined #ruby
jacobw has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
lkba has quit [Ping timeout: 255 seconds]
sinusss has joined #ruby
TomJ has quit [Ping timeout: 276 seconds]
joshwines has joined #ruby
rwz has joined #ruby
strax_ has joined #ruby
dhruvasagar has joined #ruby
MehLaptop has joined #ruby
srid has joined #ruby
thejefflarson_ has joined #ruby
kaichanvong has joined #ruby
moeSeth_ has joined #ruby
georgi has joined #ruby
yeban has joined #ruby
jborica has quit [Ping timeout: 240 seconds]
rcsheets has joined #ruby
[Neurotic] has joined #ruby
guilleiguaran_ has joined #ruby
kevinfagan has joined #ruby
goganchic has quit []
sayan has joined #ruby
Clownz has joined #ruby
Skylab has joined #ruby
Honeycomb has quit [Quit: Leaving.]
dEPy has joined #ruby
unflores has joined #ruby
<dEPy> in ruby, coroutines are fibers?
TomJ has joined #ruby
<dEPy> OH, I see they are...
carraroj has quit [Ping timeout: 276 seconds]
sayan has quit [Read error: Connection reset by peer]
quazimodo has quit [Ping timeout: 240 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
quazimodo has joined #ruby
MehLaptop has quit [Remote host closed the connection]
elkclone has quit [Quit: It's never too late to unplug and run.]
hoelzro|away is now known as hoelzro
maxmanders has joined #ruby
anderse has joined #ruby
d2dchat has quit [Remote host closed the connection]
Vainoharhainen has joined #ruby
angusiguess has joined #ruby
ozgura has quit [Remote host closed the connection]
Axsuul has quit [Ping timeout: 256 seconds]
ndngvr has quit [Ping timeout: 260 seconds]
TomJ_ has joined #ruby
TomJ_ has joined #ruby
TomJ_ has quit [Changing host]
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
VinceThePrince has quit [Read error: Connection reset by peer]
TomJ has quit [Ping timeout: 240 seconds]
TomJ_ is now known as TomJ
sinusss has quit []
nomenkun has joined #ruby
angusiguess has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has quit [Ping timeout: 245 seconds]
ndngvr has joined #ruby
horofox has joined #ruby
threesome has joined #ruby
VinceThePrince has joined #ruby
ocnam has quit [Quit: Quit: Textual IRC Client: http://www.textualapp.com/]
arya_ has joined #ruby
MrZYX|off is now known as MrZYX
d2dchat has joined #ruby
clocKwize has joined #ruby
whitedawg has joined #ruby
horofox has quit [Client Quit]
hbpoison has quit [Ping timeout: 250 seconds]
ndngvr` has joined #ruby
atyz has joined #ruby
ndngvr has quit [Ping timeout: 252 seconds]
greenarrow has joined #ruby
DrCode has joined #ruby
blaxter has joined #ruby
arya has quit [Ping timeout: 248 seconds]
piotr_ has quit [Ping timeout: 245 seconds]
jimeh has joined #ruby
`p has quit [Ping timeout: 245 seconds]
lkba has joined #ruby
TomJ has quit [Quit: TomJ]
VinceThePrince has quit [Read error: Connection reset by peer]
jgrevich has quit [Remote host closed the connection]
mark9 has joined #ruby
andikr has quit [Remote host closed the connection]
Xeago has joined #ruby
jimeh has quit [Ping timeout: 255 seconds]
mpfundstein has joined #ruby
pskosinski has joined #ruby
sayan has joined #ruby
adambeynon has joined #ruby
[0x1a] has joined #ruby
mark9 has quit [Client Quit]
rdark has joined #ruby
RJ3__ has joined #ruby
mengu has joined #ruby
Quebert has quit [Quit: Linkinus - http://linkinus.com]
jhowarth has joined #ruby
bluehavana has joined #ruby
bnjamin has quit [Ping timeout: 245 seconds]
Skylab has quit [Quit: Skylab]
francisfish has joined #ruby
xerxas has joined #ruby
Honeycomb has joined #ruby
Honeycomb has quit [Client Quit]
davidboy has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
VinceThePrince has joined #ruby
mibitzi has joined #ruby
Spaceghost|cloud has joined #ruby
hbpoison has joined #ruby
jimeh has joined #ruby
[diecast] has joined #ruby
eka has joined #ruby
buscon has joined #ruby
notbrent_ has joined #ruby
dhruvasagar has joined #ruby
wreckimnaked has joined #ruby
bnjamin has joined #ruby
`p has joined #ruby
<hemanth> Hanmac, still here?
r4um has joined #ruby
<hemanth> it was a bug in rubygems that resulted in yaking of 2.0.1
* Hanmac yea we two are there :P
beiter has joined #ruby
<hemanth> Hanmac, it was a major bug!
hbpoison has quit [Ping timeout: 276 seconds]
ozgura has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
andikr has joined #ruby
gtuckerkellogg has joined #ruby
<Hanmac> hm okay .. i didt pushed gems for a very long time ...
hakunin has quit [Read error: Connection reset by peer]
lemonsparrow has joined #ruby
whitedawg has quit [Quit: Leaving.]
gtuckerkellogg has quit [Client Quit]
hakunin has joined #ruby
hbpoison has joined #ruby
anderse has quit [Quit: anderse]
<hemanth> Hanmac, lets port some ;) What say?
ryanf has joined #ruby
<Hanmac> i am still not finish porting wxWidgets ... and i need to write faster, because wx-trunk gets an new feature last week :P
KevinSjoberg has joined #ruby
nari has quit [Ping timeout: 245 seconds]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
jdunck has quit [Quit: Computer has gone to sleep.]
io_syl has joined #ruby
daig0ro has joined #ruby
daig0ro has quit [Client Quit]
ryanf has quit [Ping timeout: 245 seconds]
sepp2k has quit [Remote host closed the connection]
mephux has quit [Excess Flood]
Guest63465 has joined #ruby
IonGyth has joined #ruby
jef_abraham has quit [Quit: jef_abraham]
Guest63465 has quit [Excess Flood]
jef_abraham has joined #ruby
Guest49024 has joined #ruby
marr has joined #ruby
io_syl has quit [Read error: Connection reset by peer]
elaptics`away is now known as elaptics
straind` has quit [Read error: Connection reset by peer]
straind has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
fire has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
workmad3 has joined #ruby
clocKwize has quit [Quit: clocKwize]
<Hanmac> hemanth you are invented to help me with my rwx binding :P
<hemanth> Hanmac, more info plz
dhruvasagar has joined #ruby
<hemanth> XML-RPC Event API with Object Bindings (Java) ?! Hanmac
arya has joined #ruby
dankest has quit [Quit: Leaving...]
<Hanmac> hemanth wxWidgets is an plattform indipent but native looking GUI toolkit ... wxRuby is an ruby binding that uses that ... rwx is its spawn because wxRuby was shitty
<hemanth> wxRuby ha i recall
<hemanth> Hanmac, it it work in progress?
ngotho has joined #ruby
<Clownz> what is the var_dump version of php in ruby
<hemanth> p
<hemanth> Clownz, inspect
daniel_- has joined #ruby
jdunck has joined #ruby
<Clownz> 1.9.3p385 :010 > p Time.inspect
<Clownz> "Time" => "Time"
<Clownz> 1.9.3p385 :011 >
<Clownz> i wana show its methods
[Neurotic]_ has joined #ruby
<Hanmac> Clownz: .methods .instance_methods
<hemanth> >> p Time.methods
<eval-in> hemanth => [:now, :at, :utc, :gm, :local, :mktime, :allocate, :new, :superclass, :freeze, :===, :==, :<=>, :<, :<=, :>, :>=, :to_s, :inspect, :included_modules, :include?, :name, :ancestors, :instance_methods, :p ... (http://eval.in/11907)
<Clownz> ok brb
angusiguess has joined #ruby
<Hanmac> >> p Time.methods(false)
<eval-in> Hanmac => [:now, :at, :utc, :gm, :local, :mktime]
<eval-in> [:now, :at, :utc, :gm, :local, :mktime] (http://eval.in/11908)
<hemanth> Time.methods.sort
slainer68 has joined #ruby
<Hanmac> hemanth ... the stuff i implemented in my rwx ruby works ... but i am not finish yet
arturaz has joined #ruby
<Clownz> thanks but is there way to show every method in new line?
<hemanth> Hanmac, count me in, draw few milestones
<Clownz> instead of shoving them in whole line
includex has joined #ruby
<hemanth> Clownz, what are you trying to do?
<Clownz> like in metasploit it shows the current clock on each execution of something
<Clownz> [10:5:5] exploited somehting
<Clownz> [10:5:6] exploit success
jef_abraham has quit [Quit: jef_abraham]
<postmodern> Clownz, sounds like you want to use a debugger
<postmodern> Clownz, require 'debug'
<postmodern> Clownz, set a breakpoint and step through the methods
<Hanmac> hemanth ... okay milestones are not set yet ... first i need to find the street :P
<hemanth> Hanmac, lol okies!
<Clownz> postmodern, no thats not what im doing
<postmodern> Clownz, well what are you doing?
angusiguess has quit [Ping timeout: 260 seconds]
<Clownz> just make it output the current date and show ONLY the time
<Clownz> including the seconds if possible
mark9 has joined #ruby
<hemanth> Clownz, did you read the docs?
<Clownz> searching around
<Hanmac> hemanth my current goal is to copy the orginal wxWidgets samples into ruby code ... and while i am doing it, i try to implment missing wx functions
<Clownz> got it
<hemanth> Hanmac, any repo from where i can clone your progress ?
vlad_starkov has joined #ruby
<hemanth> Clownz, reading docs really helps? :)
eval-in has quit [Remote host closed the connection]
eval-in has joined #ruby
<Clownz> too lazy xD
<hemanth> Clownz, now post your solution and plp will suggest better ways of doing it
<Clownz> ok hold on
<hemanth> Hanmac, forking
io_syl has joined #ruby
<Clownz> 1.9.3p385 :029 > p 'Current Clock: ' + Time.now.strftime("%H:%M:%S")
<Clownz> "Current Clock: 12:51:52" => "Current Clock: 12:51:52"
<Clownz> tadaaa
<Clownz> thats in IRB
<Clownz> GG
<hemanth> ^_^
<Clownz> brb, and thank you guys for help
io_syl has quit [Client Quit]
<hemanth> Clownz, thank the doc author ;)
vlad_starkov has quit [Ping timeout: 256 seconds]
rawler has quit [Ping timeout: 276 seconds]
<hemanth> Hanmac, pretty big
straind has quit [Ping timeout: 245 seconds]
statarb3 has quit [Read error: Connection reset by peer]
Bry8Star has quit [Remote host closed the connection]
d2dchat has quit [Remote host closed the connection]
axxT has quit [Ping timeout: 240 seconds]
[eDu] has joined #ruby
timmow has joined #ruby
rippa has joined #ruby
pyrac has quit [Read error: Connection reset by peer]
pyrac_ has joined #ruby
Neandre has quit [Ping timeout: 250 seconds]
rawler has joined #ruby
georgi is now known as Giorgio
dhruvasagar has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
swoosh has joined #ruby
dhruvasagar has joined #ruby
backjlack has joined #ruby
Neandre has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
AndChat| has joined #ruby
gyre007 has joined #ruby
vipjun has quit [Ping timeout: 260 seconds]
nari has joined #ruby
nomenkun has quit [Ping timeout: 276 seconds]
arya has quit [Ping timeout: 248 seconds]
Xeago has quit [Remote host closed the connection]
cousine has joined #ruby
lkba has quit [Ping timeout: 276 seconds]
cousine has quit [Remote host closed the connection]
<becom33> how can I add a clipbard copy to a script ? for a example if Im doing a puts "demo code to copy" how can I add a auto copy copy that output ?
arya has joined #ruby
<hoelzro> becom33: what's the context? from a web application? command line? GUI application?
<becom33> hoelzro, cli
<hoelzro> so you want to put some arbitrary text into the clipboard, then?
sayan has quit [Ping timeout: 245 seconds]
<becom33> hoelzro, yes
<hoelzro> if so, pbcopy or xclip
<becom33> I'm trying less 3rd party gems :/
<hoelzro> they're not gems
<becom33> ahh ok
<hoelzro> also, in my opinion, trying to avoid dependencies as a rule is cutting off your nose to spite your face
<hoelzro> obviously don't get crazy
<hoelzro> but leverage the work others have done for you
emocakes has joined #ruby
<becom33> huh ?
axxT has joined #ruby
takeru has joined #ruby
<becom33> hoelzro, what if I want to add pbcopy into the script >
<becom33> ?
<hoelzro> becom33: what do you mean?
IonGyth has quit [Remote host closed the connection]
eka has quit [Ping timeout: 250 seconds]
chichou has joined #ruby
whitedawg has joined #ruby
nomenkun has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Remote host closed the connection]
<becom33> well I want to give the user to choose if he wants to do a auto copy the output of script for a example ./script.rb hello John -c
<becom33> if the output is "Hello John" it will be auto copy in the clipboard
<hoelzro> ok
<becom33> so how can I do that inside the script ?
nomenkun has quit [Read error: Connection reset by peer]
takeru has quit [Ping timeout: 255 seconds]
nomenkun_ has joined #ruby
<hoelzro> spawn pbcopy or xclip
<hoelzro> pbcopy is for OS X
<hoelzro> xclip is machines running the X window system
<becom33> ok thanks
eka has joined #ruby
marcux has joined #ruby
DrCode has quit [Remote host closed the connection]
pkordel has joined #ruby
nomenkun has joined #ruby
anderse has joined #ruby
<apeiros_> and windows?!?
statarb3 has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
<Hanmac> apeiros_ how cares? :P
chussenot has joined #ruby
DrCode has joined #ruby
<apeiros_> evvvvrybodddy!!!!1!
banjara has quit [Quit: Leaving.]
eka has quit [Client Quit]
carraroj has joined #ruby
nomenkun_ has quit [Ping timeout: 252 seconds]
<Hanmac> windows are only for freshing a room with air :P
apeiros has joined #ruby
pkordel has quit [Remote host closed the connection]
apeiros_ has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Quit: Lost terminal]
dhruvasagar has joined #ruby
<hemanth> Hanmac, no, computers are like AC they stop working once they have windows opened :D
txdv has quit [Read error: Connection reset by peer]
krz has quit [Quit: krz]
eka has joined #ruby
<Hanmac> yeah ... or iphones stop working when its to cold outside? :D
jdunck has quit [Quit: Computer has gone to sleep.]
dayepa has quit [Quit: dayepa]
io_syl has joined #ruby
dayepa has joined #ruby
angusiguess has joined #ruby
atyz has quit [Quit: Leaving...]
statarb3 has quit [Quit: Leaving]
io_syl has quit [Client Quit]
tvw has joined #ruby
rdark has quit [Ping timeout: 245 seconds]
pkordel has joined #ruby
lemonsparrow has quit [Quit: Page closed]
angusiguess has quit [Ping timeout: 252 seconds]
<hemanth> :D
rdark has joined #ruby
Mon_Ouie has quit [Ping timeout: 255 seconds]
jamesfung14 has quit [Ping timeout: 245 seconds]
swingha has joined #ruby
beiter has quit [Quit: beiter]
arya has quit [Ping timeout: 248 seconds]
Phoop has joined #ruby
VinceThePrince has quit [Read error: Connection reset by peer]
<vandemar> for validating a bunch of data in a hash (hundreds of k:v pairs), is one of these approaches materially better or more idiomatic or more flexible? http://pastebin.com/4VA2Y00u (class with validation methods) vs http://pastebin.com/UbBwhhT6 (another hash with anonymous validation functions)?
marcux has quit [Quit: marcux]
arya has joined #ruby
<MrZYX> well, the class is a bit more reusable I think
maasha has joined #ruby
lkba has joined #ruby
<MrZYX> and you can use send instead of method.call and you usually don't need to explicitly return true or false, i.e you could just write Date.parse foo rescue false
<vandemar> yeah I just want to do that true/false thing for clarity
<MrZYX> still in the method the begin is implicit and I don't think that makes it more reusable
<maasha> on the topic of unit testing. I think I am using the wrong framework simple to avoid dependencies. Test::Unit is primitive :o(
<maasha> *simply
<MrZYX> er, I wanted to write readable...
<maasha> I want something a bit more advanced - even if I introduce a dependency - was it apeiros who wrote something?
<maasha> So what is the recommended Unit Testing framework for writing non-Rails Ruby stuff?
MehLaptop has joined #ruby
grizlo42 has joined #ruby
pkordel_ has joined #ruby
<vandemar> MrZYX: ok. what about using method_missing in that validation class and passing the external data keys directly, and using 'case' in method_missing to dispatch key:v pairs to the proper testing function? On reflection that might reduce the amount of mapping crap I have, if some keys only occur once, I won't have to have a different intermediate validating function name?
jamesfung14 has joined #ruby
Virunga has joined #ruby
wf2f has quit []
grizlo42 has left #ruby [#ruby]
sonda has joined #ruby
swoosh has quit [Quit: Computer has gone to sleep.]
k610 has joined #ruby
<MrZYX> Hm, I'd rather would keep the mapping logic outside, maybe a module defining a validate(key, value) method which does case key; when :foo; date(value); when :bar; three_letter(value); else true; end which you can then dynamically include into your generic validator class and write as many different versions of it as you want without ever needing to touch the validators class?
rhinux has quit [Quit: Konversation terminated!]
pkordel__ has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
<k610> when declaring a hash on multiple lines why can't i place the separting comma at the begging of each line it seems it must strictly be place at the end of each line ?
pkordel_ has quit [Ping timeout: 245 seconds]
pkordel has quit [Ping timeout: 245 seconds]
<MrZYX> vandemar: so the calling boils down to validator = Validator.new; validator.extend FooValidator; foo_data.each_pair { |k,v| if validator.validate(k, v); puts "pass"; else; puts "fail"; end }
<tobiasvl> k610: yes. if you want to break the line before the comma you will have to use \
<k610> tobiasvl, that's daunting
<vandemar> MrZYX: interesting, I'll experiment with that, thanks
<k610> i like to use comma on line start so i know i am not missing one but this way i also have to check if i am not missing a \
ozgura has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
<tobiasvl> but evidently you notice when you're missing a comma on the end of a line
swingha has quit [Quit: WeeChat 0.4.0]
ozgura has joined #ruby
<tobiasvl> seeing as you couldn't skip one
<tobiasvl> so what's the problem? :)
<maasha> baretest?
<maasha> where is apeiros?
<maasha> O_o
<maasha> o_O
imitkit has joined #ruby
<k610> tobiasvl, i don't believe so when lines don't have the same length it's much easier to just look at the first char of line instead
<Hanmac> maasha he is at lunch
atyz has joined #ruby
Quebert has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<maasha> uuuunaarrrrrmmmggrlll
<maasha> .oO(lunch!)
rdark has quit [Ping timeout: 245 seconds]
<tobiasvl> k610: yes, but why do you need to look at the commas at all?
<tobiasvl> as you've already noticed, ruby checks the commas for you
rocket has joined #ruby
rdark has joined #ruby
<k610> tobiasvl, it's just my style of writing hashes and it worked so far with stuff ... i don't understand why ruby can't be flexible in this particular case
luckyruby has quit [Remote host closed the connection]
PanPan has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0/20130215130331]]
kristofers has joined #ruby
luckyruby has joined #ruby
<tobiasvl> i don't understand why you can't be flexible :)
<tobiasvl> at any rate, that's the way it is
pepper_chico has joined #ruby
[eDu]_ has joined #ruby
Quebert has quit [Ping timeout: 276 seconds]
[eDu] has quit [Quit: [eDu]]
[eDu]_ is now known as [eDu]
[eDu] has quit [Client Quit]
hiroyuki has quit [Ping timeout: 276 seconds]
Virunga has quit [Remote host closed the connection]
ozgura has quit [Read error: Connection reset by peer]
ozgura has joined #ruby
<maasha> hrm, lots of testing frameworks to consider. minitest, zentest, baretest ...
atyz has quit [Ping timeout: 276 seconds]
pepper_chico has quit [Client Quit]
<maasha> nope, zentest is something different.
hiroyuki has joined #ruby
Kuifje has joined #ruby
Domon has quit [Remote host closed the connection]
hasimo-t has joined #ruby
VinceThePrince has joined #ruby
ngotho has quit [Read error: Connection reset by peer]
pac1 has joined #ruby
Virunga has joined #ruby
banister`sleep has quit [Remote host closed the connection]
samphippen has joined #ruby
arya has quit [Ping timeout: 248 seconds]
khismetix has joined #ruby
ozgura has quit [Read error: Connection reset by peer]
ozgura has joined #ruby
sepp2k has joined #ruby
apod has joined #ruby
<vandemar> k610: if the hash only has simple objects like string/number/boolean, you could specify it as json (which allows commas to be at beginnings of lines) and JSON.parse it, but then you have to deal with json syntax.
hbpoison has joined #ruby
jetblack has quit [Ping timeout: 245 seconds]
beiter has joined #ruby
arya has joined #ruby
kofno has joined #ruby
wreckimnaked has quit [Ping timeout: 240 seconds]
<MrZYX> vandemar: I played a bit since I'm bored :P https://gist.github.com/MrZYX/69243840d439fbf0fc04 this way you can easily split the whole stuff into different files, making each one more readable
pyrac_ has quit [Read error: Connection reset by peer]
pyrac has joined #ruby
<MrZYX> just don't call .extend on an object inside a loop or so since that would slow the whole thing down too much (it voids rubys method caches)
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
arya has quit [Ping timeout: 248 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
Quebert has joined #ruby
chichou has quit [Remote host closed the connection]
chichou has joined #ruby
grizlo42 has joined #ruby
Proshot has joined #ruby
rocket has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 245 seconds]
arya has joined #ruby
himsin has quit [Remote host closed the connection]
banister`sleep has joined #ruby
himsin has joined #ruby
angusiguess has joined #ruby
Phoop has left #ruby [#ruby]
chichou has quit [Ping timeout: 250 seconds]
hiroyuki has quit [Ping timeout: 255 seconds]
monkegjinni has quit [Remote host closed the connection]
hasimo-t has quit [Remote host closed the connection]
nkr has joined #ruby
agjacome has joined #ruby
chussenot has quit [Quit: chussenot]
divout has quit [Remote host closed the connection]
Clownz has quit [Ping timeout: 255 seconds]
<vandemar> MrZYX: oh, neat. I think it could use a regex validator type too, just for fun. :) What were you saying about using send? Did you use .call on purpose inside validate()?
blacktulip has joined #ruby
Phoop has joined #ruby
tux91 has joined #ruby
<MrZYX> send(:foo, :bar) is equivalent to method(:foo).call(:bar) but skips the conversion to a proc
<MrZYX> and just calls it directly
Phoop has quit [Client Quit]
<Hanmac> ... no its not so equal as you think
tux91 has quit [Remote host closed the connection]
<MrZYX> vandemar: that .call is just so that you can pass a proc/lambda as mapping
Phoop has joined #ruby
<MrZYX> if it's not worth having the validator in the base class
<MrZYX> Hanmac: mind elaborating?
chussenot has joined #ruby
locriani has quit [Remote host closed the connection]
<vandemar> oh right so send wouldn't work unless the proc was part of a class?
<MrZYX> send calls the method on a object
hiroyuki has joined #ruby
<vandemar> since .send has to be called on *something*
yacks has quit [Ping timeout: 255 seconds]
<MrZYX> "foo".send(:upcase) -> "foo".upcase
<vandemar> yeah but in this case there's no "foo", it would be like trying to call .send on nothing, and that's why it can't be used?
<MrZYX> it's self.send
pac1 has quit [Ping timeout: 272 seconds]
jayne has joined #ruby
<MrZYX> the self is just implicit in a method definition
<dawkirst> hello, here's a fundamental Ruby question that I'm trying to understand. I have variable foo that I want to set to bar, unless bar is baz, then I want to set it to bacon. Can I do that in a single line?
<vandemar> MrZYX: oh, I see, I meant line 28 (the proc one) not line 26. I hadn't even noticed the existing classes were handled using send(). What I meant was, is there an equivalent to line 28 (the anonymous function .call) that uses send, and is there any advantage to using send() if it's possible?
<realDAB> dawkirst: foo = bar == baz ? bacon : bar
<akam_> hello
fire has quit [Quit: WeeChat 0.4.0]
<MrZYX> vandemar: no there isn't as far as I'm aware of
Emplitz has quit [Quit: Leaving]
<MrZYX> I really was talking that about that obj.send(:foo) is better than ob.method(:foo).call
MehLaptop has quit [Remote host closed the connection]
drale2k has joined #ruby
DrShoggoth has quit [Ping timeout: 272 seconds]
<MrZYX> dawkirst: foo = bar == baz ? bacon : bar
<akam_> I have hash_array = [{:id=>1, :value=>"first"}, {:id=>2, :value=>"second"}, {:id=>3, :label=>"third"}]
keymone has joined #ruby
<akam_> How can I get hash with id==2? something like hash_array{:id==2}?
<realDAB> MrZYX: you didn't like it when i typed it? :-)
<MrZYX> realDAB: woah overlooked, sorry
Spooner_ has joined #ruby
<realDAB> MrZYX: i'm just teasing -- happens all the time
jamesfung14 has quit [Ping timeout: 245 seconds]
<MrZYX> :)
grizlo42 has quit [Quit: Leaving.]
arya has quit [Ping timeout: 248 seconds]
<MrZYX> akam_: hash_array.detect { |hash| hash[:id] == 2 }
fermion has joined #ruby
<akam_> MrZYX, thanks! Is it the best way to emulate database structure?
grizlo42 has joined #ruby
DrShoggoth has joined #ruby
[Neurotic]_ has quit [Remote host closed the connection]
yacks has joined #ruby
guilleiguaran has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 240 seconds]
<MrZYX> akam_: not sure, tell more about your greater goal/project
arya has joined #ruby
realDAB has quit [Ping timeout: 272 seconds]
<vandemar> akam_: .select is an alternative to .detect in case you have multiple hashes with the same id (e.g. not a unique primary key)
RonScagz has joined #ruby
__Big0__ has joined #ruby
F1skr has joined #ruby
elico has joined #ruby
zz_Inoperable has joined #ruby
dsf has quit [Quit: This computer has gone to sleep]
drale2k has quit [Ping timeout: 272 seconds]
hiroyuki has quit [Ping timeout: 250 seconds]
__Big0___ has joined #ruby
drale2k has joined #ruby
<vandemar> akam_: do you need to emulate a database? Can you use something external like redis or postgresql instead?
grizlo42 has quit [Quit: Leaving.]
<akam_> MrZYX, I just read some structured info from binary file (reverse ingineering), and I want to emulate database structure (id, title, description for example)
<akam_> vandemar, I can not do it with hashes?
<MrZYX> if you need a local relational database I'd look into sqlite or something
<MrZYX> maybe a simple datamapper like sequel
__Big0__ has quit [Ping timeout: 260 seconds]
yalue has joined #ruby
<MrZYX> if you need to run complex queries against your data, that is
<vandemar> akam_: you can, but then you have to manage the data structure. Something like redis, sqlite, or postgres should be easy to understand and let you concentrate on other stuff rather than how to structure the data so you can access it again.
keymone has quit [Quit: keymone]
keymone has joined #ruby
atyz has joined #ruby
wallclockbuilder has joined #ruby
sailias has joined #ruby
Stilo has joined #ruby
predator117 has quit [Ping timeout: 245 seconds]
predator117 has joined #ruby
<akam_> vandemar, I just want to read data from file and put it to mysql database, but not line for line. firstly i want to parse data to hash
takeru has joined #ruby
atyz has quit [Ping timeout: 248 seconds]
helvete has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
arya has quit [Ping timeout: 248 seconds]
hemanth has joined #ruby
vagmi has quit [Quit: vagmi]
daniel_- has quit [Read error: Operation timed out]
predator117 has quit [Ping timeout: 240 seconds]
<vandemar> akam_: so what problems are you running into with your list of hashes?
predator117 has joined #ruby
thebastl has quit [Ping timeout: 255 seconds]
khismetix has quit [Quit: Computer has gone to sleep.]
<akam_> vandemar, I asked "Is it the best way to emulate database structure?"
takeru has quit [Ping timeout: 276 seconds]
<vandemar> akam_: what are you doing with the structure other than selecting by id?
sk87 has quit [Quit: sk87]
monkegjinni has joined #ruby
<MrZYX> so you want to build a table, then do ???? and then add it to a MySQL database?
<akam_> yep
<MrZYX> so what is the ????
<vandemar> akam_: a more basic construction would be simply { 1 => "first", 2 => "second", ... }
<akam_> I want to assure all data is parsed without errors
<MrZYX> can't you do that already before adding it to the array?
pavilionXP has quit [Ping timeout: 250 seconds]
<MrZYX> like hash = read_chunk; valid_data << hash if valid(hash)
chichou has joined #ruby
ryotarai has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
yourmysin_ has joined #ruby
yourmysin__ has joined #ruby
wreckimnaked has joined #ruby
predator117 has quit [Ping timeout: 240 seconds]
jamesfung14 has joined #ruby
arya has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
forced_request has quit [Ping timeout: 245 seconds]
yourmysin has quit [Ping timeout: 245 seconds]
daniel_- has joined #ruby
browndawg has joined #ruby
Astral__ has quit [Read error: Connection reset by peer]
skattyadz has joined #ruby
<JonnieCache> >> puts __LINE__
<eval-in> JonnieCache => 2
<eval-in> nil (http://eval.in/11967)
<JonnieCache> >> puts __FILE__
<eval-in> JonnieCache => /tmp/execpad-66dd8343ab8c/source-66dd8343ab8c
<eval-in> nil (http://eval.in/11968)
<JonnieCache> >> puts __method__
<JonnieCache> what gives
<eval-in> JonnieCache => nil (http://eval.in/11969)
<JonnieCache> why does the method one have to be in lowercase?
<JonnieCache> >> puts __METHOD__
<eval-in> JonnieCache => /tmp/execpad-ab5e559854c7/source-ab5e559854c7:2:in `<main>': undefined local variable or method `__METHOD__' for main:Object (NameError) (http://eval.in/11970)
vipjun has joined #ruby
<MrZYX> >> __dir__
<eval-in> MrZYX => "/tmp/execpad-357f048cac40" (http://eval.in/11971)
<MrZYX> dunno but it's not alone ;)
Astralum has joined #ruby
<banister`sleep> JonnieCache: __method__ and __dir_ are methods
<banister`sleep> __FILE__ is not a method it's a weird special constant thing
<JonnieCache> riiight
Alecs has joined #ruby
<JonnieCache> ive not seen __dir__ before. are there any others?
<banister`sleep> JonnieCache: there's a thread on ruby-core will people debate about that
jeremywrowe_ has joined #ruby
<banister`sleep> i.e about whether it should be __DIR__ or __dir__
<banister`sleep> __dir__ is new to 2.0 :)
tjbiddle has joined #ruby
<banister`sleep> JonnieCache: ther's __callee__ too
<banister`sleep> which is slightly different to __method__
<JonnieCache> hmmm
<banister`sleep> __callee__ respects alias names (in 2.0) whereas __method__ does not, iirc
carloslopes has joined #ruby
jeremywrowe_ has quit [Client Quit]
<JonnieCache> hmm rubydoc makes no distinction between them
<banister`sleep> yeah, in 2.0 they're different though
<JonnieCache> also it lists __callee__() and __callee__ separately
<banister`sleep> they *used* to be different in one of the early 1.9's, but then that difference was squashed
<JonnieCache> this is the 2.0 rdoc im reading
<banister`sleep> and in 2.0 the difference was reintroduced
<Spooner_> banister`sleep, Either it should be __DIR__ or it should have come with __file__ - being inconsistent is unhelpful.
<banister`sleep> well they probably just forgot to update the docs ;)
<JonnieCache> yeah probably just doc laxness
<banister`sleep> let me check actually
<banister`sleep> i just read the difference was reintroduced on the ruby-core mailing list
browndawg has quit [Ping timeout: 245 seconds]
<banister`sleep> could have been lying
mengu has quit [Ping timeout: 245 seconds]
mengu has joined #ruby
sailias has quit [Quit: Leaving.]
khismetix has joined #ruby
yshh_ has quit [Remote host closed the connection]
<banister`sleep> JonnieCache: https://gist.github.com/banister/5099071
<banister`sleep> seems they are different
<banister`sleep> __callee__ respects alias name
<dawkirst> realDAB, MrZYX, thanks
hasimo has joined #ruby
<JonnieCache> aha i can see how that would be useful
pkordel__ has quit [Remote host closed the connection]
<dawkirst> MrZYX, in foo = bar == baz ? bacon : bar, what does the ? and the : do?
RonScagz has quit [Quit: Linkinus - http://linkinus.com]
<MrZYX> ?: is the tenery operator you'll find in almost any language it's short for foo = if exp then true else false end
wallclockbuilder has quit [Ping timeout: 276 seconds]
mengu_ has joined #ruby
dustint has joined #ruby
mengu has quit [Ping timeout: 245 seconds]
<MrZYX> so you got "exp ? returned_if_exp_is_true : returned_if_exp_is_false"
tish has quit [Quit: Leaving.]
arya has quit [Ping timeout: 245 seconds]
skattyadz has quit [Quit: skattyadz]
jef_abraham has joined #ruby
<dawkirst> MrZYX, ok, that makes sense
<dawkirst> MrZYX, thanks
Rioji has joined #ruby
dhruvasagar has joined #ruby
pdamer has joined #ruby
arya has joined #ruby
jurassic has joined #ruby
deadalus has quit [Changing host]
deadalus has joined #ruby
<dawkirst> MrZYX, just out of curiosity, just did a search on "tenery' in Pickaxe with no results. Would it be called something else?
noop has quit [Ping timeout: 245 seconds]
<tobiasvl> ternary
<banister`sleep> lols
<MrZYX> heh, it's hard to remeber for a non native :P
iamjarvo has joined #ruby
verysoftoiletppr has joined #ruby
ngotho has joined #ruby
<apeiros> maasha: I'm here. what's up?
_carloslopes has joined #ruby
carloslopes has quit [Read error: Connection reset by peer]
<maasha> apeiros: hiyas. I have had it with Test::Unit - It was a mistake to stick with it just to avoid a dependency. In short I am looking for a Unit Testing framework for non-rails ruby.
<apeiros> ah
<maasha> apeiros: and I would think you had an opinion ...
<maasha> IIRC
includex has quit [Quit: Computer has gone to sleep.]
<apeiros> I wrote one, but the rewrite of it has been in the works for ~2y now. So I'd call that vaporware (unless baretest 0.4 is good enough for you - but API changes in 0.5)
iamjarvo has quit [Client Quit]
<apeiros> other than that, I use test/unit for the moment to have a minimal dependency. but I fully understand your dissatisfaction. I have the same, after all, that's why I wrote baretest :)
dblack__ has joined #ruby
<maasha> apeiros: I remember you suggested me baretest long time ago, but I sort of just stuck with Test::Unit.
khismetix has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
NiteRain has quit [Ping timeout: 246 seconds]
<maasha> apeiros: so baretest is not being maintained?
<apeiros> correct. baretest is currently to be considered unmaintained. as much as that pains me.
<apeiros> I mean, I'm around, and small fixes I could probably do. but atm, that's about it.
<whitequark> there's also bacon
mark_locklear has joined #ruby
angusiguess has joined #ruby
hasimo has quit [Remote host closed the connection]
<apeiros> there are a lot of unit testing frameworks
<maasha> apeiros: that is a shame. I am afraid that scares me away ..
<apeiros> maasha: understandable
<maasha> Yeah, I was looking at this list: https://www.ruby-toolbox.com/categories/testing_frameworks.html
<apeiros> rspec is probably the most popular. but personally, I don't like that one at all.
robustus has quit [Ping timeout: 276 seconds]
ryotarai has quit [Remote host closed the connection]
<maasha> RSpec seems to be very rails oriented, right?
<apeiros> minitest is probably well maintained, and test/unit of 1.9 is afaik based on it
<apeiros> no
iamjarvo has joined #ruby
browndawg has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<apeiros> rspec has a lot of rails-ready things, and rails "plugins". but it itself is afaik not tied to rails in any way
_carloslopes has quit [Read error: Connection reset by peer]
vomit has joined #ruby
hogeo has quit [Remote host closed the connection]
hasimo has joined #ruby
pigoz has quit [Ping timeout: 245 seconds]
robustus has joined #ruby
nomenkun has quit [Ping timeout: 256 seconds]
<maasha> apeiros: so which is less like learning a new programming language :o) (freely quoted from barewords)
v0n has joined #ruby
idkazuma has joined #ruby
<apeiros> I don't know. I'm not up to date with current test frameworks. but the "learn a new programming language" thing is what puts me off rspec
sie has quit [Ping timeout: 240 seconds]
<maasha> apeiros: so you use ... ?
<apeiros> as said, currently test/unit for the same reason as you do - no dependency.
<maasha> apeiros: right.
nomenkun has joined #ruby
carloslopes has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
<apeiros> I beefed it slightly up, so I can write `suite "foo" do; test "bar" do …assert_blah… end end`
<apeiros> but that's all
MrZYX is now known as MrZYX|off
angusiguess has quit [Ping timeout: 276 seconds]
Blaze_Boy has joined #ruby
BizarreCake has joined #ruby
pasties has quit [Ping timeout: 250 seconds]
hasimo has quit [Remote host closed the connection]
<apeiros> wrong looks nice
<maasha> apeiros: oh, is that something you care to share?
<apeiros> not mine. seen it in that ruby-toolbox list: https://github.com/sconover/wrong
<maasha> maybe that is just what I need instead of a new suite ...
<maasha> ah, wrong - now I get it :o)
MrZYX|off is now known as MrZYX
<maasha> apeiros: so you do not use the 'wrong' gem (a dependency), but then how?
Virunga has quit [Remote host closed the connection]
predator117 has joined #ruby
blaxter has quit [Quit: foo]
AndChat| has quit [Ping timeout: 250 seconds]
chussenot has quit [Quit: chussenot]
Banistergalaxy has joined #ruby
ToTo has joined #ruby
<Spooner_> I liked the look of wrong myself. I used something similar in Python and it felt so much nicer than what I'd used in Ruby before.
<apeiros> to avoid boilerplate, I run my tests using `ruby test/runner.rb`: https://github.com/apeiros/sorting/blob/master/test/runner.rb
timonv has quit [Read error: Connection reset by peer]
<apeiros> writing a rake task for that is simple enough: https://github.com/apeiros/sorting/blob/master/rake/tasks/test.rb
girija has quit [Ping timeout: 276 seconds]
timonv has joined #ruby
chussenot has joined #ruby
sandGorgon has quit [Read error: Connection reset by peer]
noop has joined #ruby
jprovazn has quit [Quit: Leaving]
beiter has quit [Quit: beiter]
atno has quit [Ping timeout: 276 seconds]
sandGorgon has joined #ruby
sandGorgon has quit [Read error: Connection reset by peer]
<maasha> ok, thanks - let me study this
sandGorgon has joined #ruby
pigoz has joined #ruby
swoosh has joined #ruby
pyrac has quit [Read error: Connection reset by peer]
pyrac_ has joined #ruby
blaxter has joined #ruby
jef_abraham has quit [Quit: jef_abraham]
jamesfung14 has quit [Ping timeout: 252 seconds]
stopbit has joined #ruby
banister`sleep has quit [Remote host closed the connection]
jetblack has joined #ruby
geekbri has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
grayson has joined #ruby
Banistergalaxy has quit [Read error: Connection reset by peer]
RonScagz has joined #ruby
blaxter has quit [Quit: foo]
emocakes has quit [Ping timeout: 245 seconds]
Banistergalaxy has joined #ruby
G________ has joined #ruby
<G________> does anyone know how to use ruby-ldap to return a cn entry after performing a successful bind()?
G________ is now known as Guest1234
<Guest1234> does anyone know how to use ruby-ldap to return a cn entry after performing a successful bind()?
nomenkun_ has joined #ruby
bobdobbs has quit [Ping timeout: 245 seconds]
nomenkun has quit [Read error: Connection reset by peer]
bobdobbs has joined #ruby
jamesfung14 has joined #ruby
jurassic has quit [Quit: jurassic]
skattyadz has joined #ruby
tk_ has joined #ruby
_carloslopes has joined #ruby
banister`sleep has joined #ruby
raza61 has joined #ruby
carloslopes has quit [Read error: Connection reset by peer]
soc42 has quit [Remote host closed the connection]
keymone has quit [Quit: keymone]
segv- has joined #ruby
pasties has joined #ruby
predator117 has quit [Ping timeout: 255 seconds]
skattyadz has quit [Read error: Connection reset by peer]
predator117 has joined #ruby
pdamer has quit [Quit: pdamer]
samphippen has quit [Quit: Computer has gone to sleep.]
chussenot_ has joined #ruby
skattyadz has joined #ruby
luckyruby has quit [Remote host closed the connection]
anonymuse has joined #ruby
wmoxam has joined #ruby
chussenot has quit [Ping timeout: 272 seconds]
chussenot_ is now known as chussenot
raza61 has quit []
sambao21 has joined #ruby
verysoftoiletppr has quit []
idkazuma has quit [Remote host closed the connection]
verysoftoiletppr has joined #ruby
nykc has joined #ruby
Nisstyre-laptop has joined #ruby
Goles has joined #ruby
BizarreCake has quit [Read error: Operation timed out]
workmad3 has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
<chiel> anyone here ever implemented an oauth2 server in ruby?
rippa has quit [Ping timeout: 240 seconds]
sk87 has joined #ruby
[eDu] has joined #ruby
_carloslopes has quit [Ping timeout: 245 seconds]
vomit has left #ruby ["WeeChat 0.3.9.2"]
philcrissman has joined #ruby
helvete has quit [Quit: Leaving...]
carloslopes has joined #ruby
EPIK has quit [Ping timeout: 245 seconds]
joofsh has joined #ruby
nykc has left #ruby ["Leaving"]
pyrac_ has quit [Ping timeout: 252 seconds]
ferdev_ has joined #ruby
nfk has joined #ruby
ferdev has quit [Ping timeout: 240 seconds]
ferdev_ is now known as ferdev
atno has joined #ruby
yshh has joined #ruby
mattbl has joined #ruby
johnnygoodmancpa has joined #ruby
pdamer has joined #ruby
philcrissman has quit [Remote host closed the connection]
johnnygoodmancpa has left #ruby [#ruby]
daniel_- has quit [Ping timeout: 245 seconds]
jerius has joined #ruby
atno has quit [Remote host closed the connection]
Gwyxx has quit [Quit: Leaving]
Criztian has joined #ruby
atno has joined #ruby
postmodern has quit [Quit: Leaving]
BRMatt has joined #ruby
browndawg has quit [Quit: Leaving.]
beiter has joined #ruby
yshh has quit [Ping timeout: 245 seconds]
jgarvey has joined #ruby
monkegjinni has quit [Remote host closed the connection]
sambao21 has quit [Quit: sambao21]
nomenkun has joined #ruby
krawchyk has joined #ruby
pkordel has joined #ruby
BizarreCake has joined #ruby
Takehiro has joined #ruby
tommyvyo has joined #ruby
Nisstyre-laptop has quit [Ping timeout: 260 seconds]
hasimo has joined #ruby
nomenkun_ has quit [Ping timeout: 272 seconds]
velCzupa has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
v0n has quit [Ping timeout: 250 seconds]
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
sailias has joined #ruby
predator117 has quit [Ping timeout: 240 seconds]
sandGorgon has quit [Ping timeout: 245 seconds]
adkron has joined #ruby
pdamer has quit [Quit: pdamer]
vandemar has quit [Quit: leaving]
browndawg has joined #ruby
breakingthings has joined #ruby
browndawg has quit [Max SendQ exceeded]
__Big0___ has quit [Remote host closed the connection]
browndawg has joined #ruby
solidoodlesuppor has joined #ruby
elux has joined #ruby
Elhu has joined #ruby
clooth has joined #ruby
DrShoggoth has quit [Read error: Connection reset by peer]
iamjarvo1 has joined #ruby
predator117 has joined #ruby
jtharris has joined #ruby
danieldocki has joined #ruby
chomp has joined #ruby
sayan_ has joined #ruby
apeiros has quit [Remote host closed the connection]
iamjarvo has quit [Ping timeout: 240 seconds]
freeayu has quit [Remote host closed the connection]
ananthakumaran1 has quit [Quit: Leaving.]
whitedawg has quit [Quit: Leaving.]
predator117 has quit [Ping timeout: 252 seconds]
tish has joined #ruby
dsf_ has joined #ruby
samphippen has joined #ruby
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
becom33 has quit [Quit: Leaving]
dsf_ has quit [Client Quit]
blacktulip has quit [Remote host closed the connection]
philcrissman has joined #ruby
kpshek has joined #ruby
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
velCzupa has quit [Remote host closed the connection]
jamescarr has joined #ruby
dsf has joined #ruby
pdamer has joined #ruby
Es0teric has joined #ruby
ozgura has quit [Read error: Connection reset by peer]
ozgura has joined #ruby
enroxorz is now known as enroxorz-work
predator117 has joined #ruby
dsf has quit [Client Quit]
ttt has quit [Remote host closed the connection]
mattbl has quit [Quit: This computer has gone to sleep]
Quebert has quit [Quit: Linkinus - http://linkinus.com]
jrajav has joined #ruby
uris has joined #ruby
invisime has joined #ruby
caveat- has quit [Ping timeout: 240 seconds]
NiteRain has joined #ruby
thone_ has quit [Ping timeout: 276 seconds]
monkegjinni has joined #ruby
generalissimo has joined #ruby
enroxorz-work is now known as BlancheDevereaux
philcrissman has quit [Remote host closed the connection]
ozgura has quit [Read error: Connection reset by peer]
yekta has joined #ruby
codecop has quit [Remote host closed the connection]
ozgura has joined #ruby
haxrbyte has quit [Ping timeout: 245 seconds]
axhlf has joined #ruby
mattbl has joined #ruby
yshh has joined #ruby
hasimo has quit [Remote host closed the connection]
hemanth_ has joined #ruby
caveat- has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
caveat- has quit [Read error: Connection reset by peer]
BlancheDevereaux has left #ruby ["Leaving"]
danman has joined #ruby
jamescarr has quit [Quit: jamescarr]
nari has quit [Ping timeout: 256 seconds]
ozgura has quit [Read error: Connection reset by peer]
ozgura has joined #ruby
Flex has joined #ruby
apeiros_ has joined #ruby
caveat- has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
allaire has joined #ruby
banister`sleep is now known as banisterfiend
thone has joined #ruby
imitkit has quit [Quit: imitkit]
nateberkopec has joined #ruby
predator117 has quit [Ping timeout: 240 seconds]
a_a_g has quit [Quit: Leaving.]
ToTo has quit [Quit: Leaving...]
philcrissman has joined #ruby
dsf has joined #ruby
* hemanth_ paws at Hanmac
frem has joined #ruby
frem has quit [Excess Flood]
<Hanmac> huch ?
chrishunt has joined #ruby
io_syl has joined #ruby
eliasp has quit [Ping timeout: 256 seconds]
adam12 has quit [Remote host closed the connection]
frem has joined #ruby
haxrbyte has joined #ruby
phantasm66 has joined #ruby
fumbe has joined #ruby
enebo has joined #ruby
tk_ has quit [Quit: ばいばい]
haxrbyte has quit [Remote host closed the connection]
heyitsdave has joined #ruby
ffranz has joined #ruby
haxrbyte has joined #ruby
tommyvyo has quit [Quit:]
hemanth_ has quit [Ping timeout: 260 seconds]
sambao21 has joined #ruby
quazimodo has quit [Ping timeout: 245 seconds]
mattbl has quit [Quit: This computer has gone to sleep]
tomzx_mac has joined #ruby
dsf has quit [Quit: This computer has gone to sleep]
predator117 has joined #ruby
caveat- has quit [Ping timeout: 255 seconds]
quazimodo has joined #ruby
sailias has quit [Ping timeout: 250 seconds]
KevinSjoberg has joined #ruby
pyrac has joined #ruby
adam12 has joined #ruby
KevinSjoberg has quit [Client Quit]
samphippen has joined #ruby
VinceThePrince has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
KevinSjoberg has joined #ruby
KevinSjoberg has quit [Client Quit]
daniel_- has joined #ruby
caveat- has joined #ruby
vagmi_ has joined #ruby
KevinSjoberg has joined #ruby
__Big0__ has joined #ruby
chrishough has joined #ruby
philcrissman has quit [Remote host closed the connection]
pyrac has quit [Ping timeout: 245 seconds]
browndawg has quit [Quit: Leaving.]
philcrissman has joined #ruby
joeycarmello has quit [Remote host closed the connection]
uris has quit [Ping timeout: 245 seconds]
newUser1234 has joined #ruby
kaen has quit [Ping timeout: 276 seconds]
ozgura has quit [Read error: Connection reset by peer]
Kevin___ has joined #ruby
philcrissman has quit [Remote host closed the connection]
ozgura has joined #ruby
maasha has quit [Ping timeout: 245 seconds]
atyz has joined #ruby
Kevin___ has quit [Client Quit]
KevinSjoberg has quit [Client Quit]
dross has quit [Read error: Operation timed out]
chrishough has quit [Client Quit]
atyz has quit [Read error: Connection reset by peer]
Kevin___ has joined #ruby
lewix has joined #ruby
lewix has quit [Changing host]
lewix has joined #ruby
atyz has joined #ruby
Kevin___ has quit [Remote host closed the connection]
dross has joined #ruby
daniel_- has quit [Ping timeout: 276 seconds]
KevinSjoberg has joined #ruby
puppeh has quit [Remote host closed the connection]
caveat- has quit [Ping timeout: 252 seconds]
pyrac has joined #ruby
KevinSjoberg has quit [Remote host closed the connection]
v0n has joined #ruby
KevinSjoberg has joined #ruby
jlast has joined #ruby
tommyvyo has joined #ruby
KevinSjoberg has quit [Remote host closed the connection]
rippa has joined #ruby
KevinSjoberg has joined #ruby
slainer68 has quit [Read error: Connection reset by peer]
slainer68 has joined #ruby
sailias has joined #ruby
SCommette has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
caveat- has joined #ruby
VinceThePrince has joined #ruby
imami|afk is now known as banseljaj
uris has joined #ruby
arya_ has joined #ruby
jamescarr_ has joined #ruby
skattyadz has quit [Read error: Connection reset by peer]
hekin has joined #ruby
<hekin> hi, guys, is there a gem with which i can check if a chunk of text containing a valid url in it?
jjbohn has joined #ruby
ffranz has quit [Quit: Leaving]
joofsh has quit [Remote host closed the connection]
bluOxigen has joined #ruby
skattyadz has joined #ruby
<Hanmac> hekin you mean something that begins with http(s):// ?
philcrissman has joined #ruby
<hekin> Hanmac: yes
<hekin> or not
spacebug_ is now known as spacebug
<hekin> just valid links
<hekin> say, google.com
<Hanmac> so is "abc.xyz" valid too?
arya has quit [Ping timeout: 245 seconds]
caveat- has quit [Ping timeout: 276 seconds]
ffranz has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
ngotho has quit [Quit: Leaving.]
objectivemo has joined #ruby
_nitti has joined #ruby
ngotho has joined #ruby
Takehiro has quit [Remote host closed the connection]
sambio has joined #ruby
bean__ has joined #ruby
justsee has quit [Quit: Leaving...]
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
Giorgio has quit [Ping timeout: 250 seconds]
Flex has quit [Remote host closed the connection]
stonevil has joined #ruby
jmeeuwen has joined #ruby
caveat- has joined #ruby
JohnBat26 has quit [Ping timeout: 272 seconds]
andikr has quit [Remote host closed the connection]
dsf_ has joined #ruby
dsf_ has quit [Client Quit]
braoru has quit [Quit: Leaving]
hbpoison has quit [Ping timeout: 255 seconds]
Coolhand|laptop has joined #ruby
Neandre has quit [Ping timeout: 250 seconds]
joshman_ has joined #ruby
_nitti has quit [Remote host closed the connection]
`p has quit [Read error: Connection reset by peer]
interactionjaxsn has joined #ruby
tomzx_mac has quit [Ping timeout: 272 seconds]
sayan_ has quit [Read error: Connection reset by peer]
_nitti has joined #ruby
caveat- has quit [Ping timeout: 272 seconds]
Targen has joined #ruby
_jc has joined #ruby
`p has joined #ruby
blacktulip has joined #ruby
<JonnieCache> >> puts URI.regexp
<eval-in> JonnieCache => /tmp/execpad-10328d38e822/source-10328d38e822:2:in `<main>': uninitialized constant URI (NameError) (http://eval.in/12012)
<JonnieCache> boo
ttt has joined #ruby
girija has joined #ruby
arya_ has quit [Ping timeout: 276 seconds]
<JonnieCache> but yeah if you remember to require 'uri' that gives you a massive regex for recognising urls, have a look
thone has quit [Ping timeout: 272 seconds]
hemanth_ has joined #ruby
thone_ has joined #ruby
djwonk has joined #ruby
<hemanth_> Hanmac just like a coding cat :)
razibog has quit [Quit: Leaving.]
<whitequark> >> require 'uri'; URI.regexp
<eval-in> whitequark => /
<eval-in> ([a-zA-Z][\-+.a-zA-Z\d]*): (?# 1: scheme)
<eval-in> ((?:[\-_.!~*'()a-zA-Z\d;?:@&=+$,]|%[a-fA-F\d]{2})(?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{ ... (http://eval.in/12013)
<eval-in> (?:
razibog1 has joined #ruby
arya has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
<JonnieCache> its way longer than that :)
browndawg has joined #ruby
tagrudev has quit [Read error: Connection reset by peer]
ttt has quit [Ping timeout: 256 seconds]
browndawg has quit [Max SendQ exceeded]
rafacv has joined #ruby
browndawg has joined #ruby
danman has quit [Quit: danman]
danman has joined #ruby
KevinSjoberg has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
razibog1 has quit [Ping timeout: 255 seconds]
eval-in has quit [Ping timeout: 256 seconds]
Hanmac has quit [Ping timeout: 240 seconds]
eval-in has joined #ruby
philcrissman has quit [Remote host closed the connection]
hasimo has joined #ruby
slainer68 has quit [Ping timeout: 244 seconds]
_maes_ has joined #ruby
ssm2017 has joined #ruby
<ssm2017> hello
includex has joined #ruby
<mbduino> no
<hoelzro> ahoy
atyz has quit [Quit: Linkinus - http://linkinus.com]
<ssm2017> using this simple code, i have the error "oops couldn't open config file ...." and the file exists https://github.com/coyled/sras/blob/master/lib/sras/helpers/config.rb
slainer68 has joined #ruby
<ssm2017> file perms are 644
<hoelzro> ssm2017: are you sure it's in the right directory?
caveat- has joined #ruby
philcrissman has joined #ruby
`p has quit [Remote host closed the connection]
<hoelzro> also, actually printing the exception details would probably help
m3pow has quit [Ping timeout: 245 seconds]
<ssm2017> yes hoelzro i have also taken the result file path to edit it to see if it can be editable
tish has quit [Quit: Leaving.]
S1kx has quit [Quit: Leaving]
<ssm2017> where to get the "exception details" ?
<ssm2017> im not a ruby dev, i just would like to run an app (the app dev has left on mars)
segv- has quit [Remote host closed the connection]
d2dchat has joined #ruby
<hoelzro> ssm2017: puts $!
<hoelzro> in the rescue block
nachtwandler has joined #ruby
elico has quit [Quit: elico]
hasimo has quit [Ping timeout: 272 seconds]
tcstar has joined #ruby
<ssm2017> im sorry hoelzro but what you are saying is a foreigner language
caveat- has quit [Ping timeout: 250 seconds]
soc42 has joined #ruby
<chiel> ssm2017: put that line in the rescue block
jamescarr_ has left #ruby [#ruby]
<chiel> to see what the actual exception is
<chiel> puts $!
<mbduino> anyone know of a good SSO solution (e.g. gem) for web apps in ror
Hanmac has joined #ruby
<ssm2017> hoelzro, do i need to go to /opt/opensim/.rvm/gems/ruby-2.0.0-p0/gems/sras-2.1.5/lib/sras/helpers/config.rb and then just add $! at the end of line 22 ?
maletor has joined #ruby
apeiros_ has quit [Remote host closed the connection]
danman has quit [Quit: danman]
<ssm2017> or create a new line with "puts $!" (i dont know if "puts" is a command or if you ask me to put $!
locriani has joined #ruby
DrShoggoth has joined #ruby
`p has joined #ruby
vagmi_ has quit [Quit: vagmi_]
alfakini has joined #ruby
sambao21 has quit [Quit: sambao21]
jgrevich has joined #ruby
danman has joined #ruby
vagmi has joined #ruby
Mo0O has quit [Ping timeout: 245 seconds]
predator117 has quit [Ping timeout: 272 seconds]
vagmi has quit [Client Quit]
johnmilton has joined #ruby
danneu has joined #ruby
Mo0O has joined #ruby
wudofyr_ has quit [Quit: wudofyr_]
wudofyr has joined #ruby
danman has quit [Client Quit]
sambao21 has joined #ruby
k610 has quit [Ping timeout: 276 seconds]
markalanevans has quit [Quit: markalanevans]
predator117 has joined #ruby
v0n has quit [Read error: Connection reset by peer]
_nitti has quit [Remote host closed the connection]
danman has joined #ruby
includex has quit [Quit: Leaving...]
_nitti has joined #ruby
_nitti has quit [Remote host closed the connection]
caveat- has joined #ruby
BizarreCake has quit [Ping timeout: 245 seconds]
zenguy_pc has joined #ruby
_nitti has joined #ruby
sayan has joined #ruby
sn0wb1rd has joined #ruby
<zenguy_pc> how can i run a ruby script thats meant to generate a html page from the commandline in a browser?
hekin has quit [Read error: Connection reset by peer]
<zenguy_pc> i set it as executable
<zenguy_pc> file:///path/to/script.rbv
<zenguy_pc> didn't work
jjbohn is now known as jjbohn|afk
mercwithamouth has quit [Ping timeout: 255 seconds]
AlSquire has quit [Ping timeout: 245 seconds]
<Hanmac> zenguy_pc you cant do it that whay ... you need a local server like apache to handle that
BizarreCake has joined #ruby
<ssm2017> hoelzro, chiel ok, i have added "puts $!" (without "") and i could see that the file contains tabs instead of spaces
<ssm2017> thank you for attention
<zenguy_pc> Hanmac: ok.. whats the smallest server i can install to do that.. i want to avoid apache.. i dont't know anythign about server security
chussenot has quit [Quit: chussenot]
<Hanmac> i dont know
stonevil has quit [Quit: stonevil]
<mbduino> lighttpd?
<mbduino> light httpd
ngotho has quit [Ping timeout: 240 seconds]
<mbduino> something like that
alex__c2022 has joined #ruby
pygmael has quit [Quit: pygmael]
pencilcheck has joined #ruby
<zenguy_pc> mbduino: ok
jjbohn|afk is now known as jjbohn
* Hanmac could write an server in C that runs and output an ruby script
predator117 has quit [Ping timeout: 250 seconds]
predator117 has joined #ruby
buscon has quit [Quit: Leaving]
Morkel has quit [Quit: Morkel]
<ssm2017> now im having this errro : http://pastebin.com/6qFqQk7i with this code : https://github.com/coyled/sras/blob/master/bin/sras
pen has quit [Ping timeout: 245 seconds]
j^2 has joined #ruby
chrishunt has quit [Quit: ZzZzZz...]
stonevil has joined #ruby
chrishunt has joined #ruby
<shevy> Hanmac hehe well I wouldnt know as I dont eat animals myself
chussenot has joined #ruby
<Hanmac> shevy the test says: "we dont know that it is, but it is not meat" :P
yacks has quit [Read error: Connection reset by peer]
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
pkordel has quit [Remote host closed the connection]
sebastianb has quit [Ping timeout: 246 seconds]
Takehiro has joined #ruby
threesome has quit [Ping timeout: 245 seconds]
yacks has joined #ruby
yacks has quit [Max SendQ exceeded]
puppeh has joined #ruby
yacks has joined #ruby
DrCode has quit [Ping timeout: 276 seconds]
aganov has quit [Read error: Connection reset by peer]
lethjakman has joined #ruby
stonevil has quit [Quit: stonevil]
philcrissman has quit [Remote host closed the connection]
end_guy has quit [Ping timeout: 276 seconds]
jonathanwallace has joined #ruby
splud has quit [Quit: splud]
jurassic has joined #ruby
p3rror has joined #ruby
<p3rror> please I need to build fpm-cookery
hbpoison has joined #ruby
caveat- has quit [Ping timeout: 245 seconds]
<p3rror> I run "gem install fpm-cookery"
<p3rror> and I get ERROR: Failed to build gem native extension.
mikepack has joined #ruby
_nitti has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 240 seconds]
browndawg has quit [Quit: Leaving.]
takeru has joined #ruby
Stilo has joined #ruby
browndawg has joined #ruby
mercwithamouth has joined #ruby
browndawg has quit [Max SendQ exceeded]
hemanth_ has quit [Quit: This computer has gone to sleep]
akhet has joined #ruby
DrCode has joined #ruby
wallerdev has joined #ruby
s__dana has joined #ruby
browndawg has joined #ruby
endzyme has joined #ruby
<ssm2017> p3rror, there should be something else notified like a missing lib or something like this ?
carlyle has joined #ruby
_nitti has joined #ruby
mibitzi has quit [Ping timeout: 276 seconds]
Neomex has joined #ruby
skattyadz has quit [Read error: Connection reset by peer]
stonevil has joined #ruby
baroquebobcat has joined #ruby
rlb3 has joined #ruby
takeru has quit [Ping timeout: 276 seconds]
juco has left #ruby ["Leaving..."]
RonScagz has quit [Quit: Linkinus - http://linkinus.com]
`p has quit [Remote host closed the connection]
hoelzro is now known as hoelzro|away
philcrissman has joined #ruby
<p3rror> ssm2017, now I get ERROR: Could not find a valid gem 'fmp-cookery' (>= 0) in any repository
maletor has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
JarJar has joined #ruby
<ssm2017> p3rror, im not able to help you with that, sorry, i m not even able to help myself
swingha has joined #ruby
<ssm2017> im trying to run a ruby app and im getting crazy
bnjamin has quit [Remote host closed the connection]
frem has quit [Ping timeout: 260 seconds]
end_guy has joined #ruby
Vert has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
Squarepy has quit [Quit: Leaving]
<p3rror> Please I'm tring to install fpm-cookery and I get this error http://paste.debian.net/240151/
<p3rror> can you help me
mercwithamouth has quit [Ping timeout: 256 seconds]
apeiros_ has joined #ruby
eAlchemist has joined #ruby
carloslopes has joined #ruby
sk87 has quit [Quit: sk87]
joeycarmello has joined #ruby
danneu has quit [Read error: Connection reset by peer]
danneu has joined #ruby
apod has quit []
mikepack has quit [Remote host closed the connection]
Xeago has joined #ruby
freakazoid0223 has quit [Read error: Connection reset by peer]
rlb3 has quit [Remote host closed the connection]
splud has joined #ruby
hbpoison has quit [Ping timeout: 255 seconds]
cantonic has joined #ruby
chrishough has joined #ruby
chrishough has quit [Client Quit]
chrishough has joined #ruby
hbpoison has joined #ruby
R_Macy has joined #ruby
_br_ has quit [Excess Flood]
<Xeago> had brunch outside this morning, was too warm to wear anything more than a thin t-shirt
<Xeago> in bus home in sweden: 1 meter of snow
<p3rror> Please I'm tring to install fpm-cookery and I get this error http://paste.debian.net/240151/
<p3rror> can you help
`p has joined #ruby
<p3rror> what lib I miss ?
mercwithamouth has joined #ruby
bnjamin has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
mafolz has quit [Remote host closed the connection]
F1skr has quit [Quit: WeeChat 0.4.0]
samflores has joined #ruby
philcrissman has quit [Remote host closed the connection]
PragCypher has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
<samflores> I'm not sure here's the place to talk about mruby, but can someone help me compiling it?
philcrissman has joined #ruby
wrench has joined #ruby
<wrench> Anyone that's used the dashing gem: how can I pass a variable to the coffeescript of a widget?
philcrissman has quit [Remote host closed the connection]
<sheerun> How to convert Proc to UnboundMethod?
sailias1 has joined #ruby
philcrissman has joined #ruby
razibog has joined #ruby
sailias has quit [Ping timeout: 245 seconds]
<Hanmac> sheerun i dont think its possible in this direction
<sheerun> Why?
rubarlion has joined #ruby
VinceThePrince has quit [Read error: Connection reset by peer]
ssm2017 has left #ruby ["goodbye..."]
<sheerun> I could create blank class, define_method and call instance_method on it
_br_ has joined #ruby
<sheerun> But that's the long way
BRMatt has quit [Quit: Leaving]
<apeiros_> why do you want to convert it to an UnboundMethod?
<sheerun> to bind it later
_br_ has quit [Excess Flood]
<apeiros_> you already said the solution to that
<apeiros_> define_method
<apeiros_> no need to convert it first
Al____ has joined #ruby
alfakini has quit [Quit: Computer has gone to sleep.]
<sheerun> I don't want to define_method, but call this proc in context of another object
p3rror has left #ruby ["Leaving"]
ngotho has joined #ruby
<apeiros_> instance_eval then
<apeiros_> or instance_exec if you want params
tobor_one has joined #ruby
<sheerun> instance_exec does not support passing block to that proc
<sheerun> probably?
<apeiros_> it does.
<apeiros_> unless you use antiquated rubies
samflores has quit []
rubarlion has quit [Remote host closed the connection]
<sheerun> OK, I'll try this, thanks :)
<apeiros_> but with antiquated rubies, you can't define a proc which accepts a block in the first place.
mahmoudimus has joined #ruby
Ontolog has joined #ruby
<apeiros_> any yield within a proc would be lexical, iirc
Ontolog has quit [Remote host closed the connection]
samuelj has joined #ruby
<samuelj> Hey guys, anyone got any recommendations on how to suppress the Float class to 2dp? I guess I could just override it's to_s, but I'd also like to only use 2dp for comparisons
<apeiros_> 2dp?
Ontolog has joined #ruby
eAlchemist has quit [Remote host closed the connection]
_br_ has joined #ruby
elkclone has joined #ruby
eAlchemist has joined #ruby
rubarlion has joined #ruby
wreckimnaked has quit [Ping timeout: 245 seconds]
daniel_- has joined #ruby
mengu_ has quit [Quit: Konversation terminated!]
<apeiros_> nice. no answer to follow up question. well then… off I go
<Spooner_> decimal places. samuelj "%.2f" % (10.0 / 3) #=> 3.33
cantonic has quit [Quit: cantonic]
mbduino has quit [Read error: Connection reset by peer]
samphippen has joined #ruby
samuelj has quit [Ping timeout: 255 seconds]
rupee has joined #ruby
etcetera has joined #ruby
mark9 has left #ruby [#ruby]
sn0wb1rd has joined #ruby
ckrailo has joined #ruby
samuelj has joined #ruby
<withnale> hello. silly question. I've got filenames that are sometimes wrapped in escaped quotes when they contain spaces( \" ). However, I need to pass it to File.stat - whats the easiest way to strip starting and ending escaped quotes? I thought I could use ^ and $ as in perl but that doesn't seem to fly.
sailias1 has quit [Ping timeout: 272 seconds]
cantonic has joined #ruby
<Spooner_> withnale, ^ and $ work just the same as in Perl. Can you give an example of what you are doing?
carlyle has quit [Read error: Connection reset by peer]
sepp2k1 has joined #ruby
ozgura has quit [Read error: Connection reset by peer]
<Spooner_> You shouldn't get those quotes, however, if you are reading ARGV.
sepp2k has quit [Ping timeout: 245 seconds]
ozgura has joined #ruby
carlyle has joined #ruby
<withnale> a = "\"/var/tmp/some file with spaces.txt\"" - I want to get the unquoted filename out of the middle so I can use it with stat
<Spooner_> The easiest way, however, is just str.gsub('"', '')
<withnale> yeah, it's fine if i separate it out, but I'm digging into someone elses code and he's already encoded it
ozgura has quit [Remote host closed the connection]
<withnale> I think i need \A and \Z
<Spooner_> Or str[1..-2] if you just want to remove the first and last.
carlyle has quit [Read error: Connection reset by peer]
<Spooner_> Why? Are you expecting quotes in the middle too?
<dblack__> Spooner_: i thought ^ and $ were beginning and end of string in perl
<dblack__> Spooner_: my perl memory may be rusty though
<Spooner_> They are, but there is no real reason why you need to worry in this case.
<sheerun> apeiros_: How to do that exactly? Following does not work: http://pastie.org/private/kiabvzlhcsfjkbpz3mhog
carlyle has joined #ruby
<apeiros_> dblack__: just checked that. it's the same as in ruby.
<apeiros_> dblack__: at least `man perlre` says that
PragCypher has quit [Quit: Leaving]
<apeiros_> (Perl v5.12.4)
<withnale> Spooner: I don't want to unencode other values.
<dblack__> apeiros_: interesting -- i wonder if that's changed recently
<withnale> hmm. or maybe I do.
<apeiros_> dblack__: I wonder too, because I thought ^$ were different in perl
<dblack__> me too
<apeiros_> and I don't think I remember \A\z. but I coded perl quite a few years back, and I only just started using regexen then.
adkron has quit [Ping timeout: 255 seconds]
<Spooner_> Strictly ^$ are begin and end of line (but if you don't have newlines, then it is begin and end of string). \A\z are true ends of the string in all cases.
<apeiros_> bad habit. don't.
<apeiros_> always say what you mean. use \A and \z even for supposedly single line strings.
<apeiros_> just my 0.02€
stonevil has quit [Quit: stonevil]
<Spooner_> I agree, but I still use ^$ from habit :$
<dblack__> apeiros_: see the m modifier description in perlre
<apeiros_> the use of ^$ instead of \A\z is probably one of the more widespread vulnerabilities in validations.
<sheerun> Anyone knows how to make that work? http://pastie.org/private/kiabvzlhcsfjkbpz3mhog
filipe_ has quit [Remote host closed the connection]
yekta has quit [Ping timeout: 240 seconds]
<Spooner_> sheerun, How can we know how to make it work if we don't know what you want to achieve withit?
<apeiros_> dblack__: ah, I remember that. I think it was always that way.
* dblack__ also uses \A and \z habitually
<dblack__> apeiros_: yeah. i think they are indeed different from ruby.
<apeiros_> I remember having had difficulties with that since m/s flags are different in ruby.
<sheerun> I'd like to pass block to procedure (named procedure there)
iamjarvo1 has quit [Quit: Leaving.]
Coolhand|laptop has quit [Read error: Operation timed out]
mpfundstein has quit [Remote host closed the connection]
<sheerun> More exactly run procedure in context of instance of Test class with parameters and block passed.
lkba has quit [Read error: Connection reset by peer]
AndChat| has joined #ruby
Voodoofish430 has joined #ruby
AndChat| has quit [Remote host closed the connection]
jef_abraham has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
<rubarlion> How do I scan a hash for a symbol?(key) & => value?
NightCreature is now known as SDr
SDr has quit [Changing host]
SDr has joined #ruby
lkba has joined #ruby
<Spooner_> rubarlion, "scan"?
mikepack has joined #ruby
<rubarlion> word = gets.chomp; if word.to_sym == list[?]
browndawg has quit [Quit: Leaving.]
<rubarlion> i'm confused on how to call the position of the matched
<rubarlion> key
hbpoison has joined #ruby
<Hanmac> to_sym on userinput is UGLY
Vainoharhainen has quit [Quit: Leaving...]
atyz has joined #ruby
Mattix has joined #ruby
francisfish has quit [Remote host closed the connection]
dmiller has joined #ruby
BizarreCake has quit [Ping timeout: 276 seconds]
<workmad3> Hanmac: and dangerous in long-running processes
francisfish has joined #ruby
QaDeS has joined #ruby
jrajav has joined #ruby
Ontolog has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 245 seconds]
francisfish has quit [Ping timeout: 272 seconds]
rakl has joined #ruby
<pseudonymous> I'm trying to monkey patch 'raise' (yes, from 'kernel') and I find that it only works for the files which has "require_relative 'common'" where 'common' is the file in which my patch is written
edemkumodzi has joined #ruby
girija has quit [Ping timeout: 245 seconds]
<pseudonymous> Now - there's a reason why I want to do this, I want to log everything so I can send mails back to myself with what went wrong. It may be dirty, but humour me :) Is there a way to ensure any other 'raise' happening from the ruby API uses my monkey patch ?
nkts has quit [Quit: leaving]
apod has joined #ruby
<Hanmac> pseudonymous ... i think the problem is that C-API calls to rb_raise are not captured ...
twoism has joined #ruby
edemkumodzi has quit [Remote host closed the connection]
dougireton has joined #ruby
<banisterfiend> pseudonymous: yes
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<banisterfiend> pseudonymous: patch Exception#exception or Exception#initialize
<banisterfiend> that will hook C exceptions too
sebastianb has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
<apeiros_> unless something inherits from Exception and doesn't invoke super in initialize…
monkegjinni has joined #ruby
Bry8Star has joined #ruby
dougireton has quit [Client Quit]
<banisterfiend> apeiros_: how do u do those tiny litlte ...
<apeiros_> on mac? opt-.
markalanevans has joined #ruby
<banisterfiend> ≥≥≥≥
<banisterfiend> ˘˘˘
sailias has joined #ruby
<apeiros_> I have swiss-german keyboard layout, though
tommyvyo has quit [Quit:]
<apeiros_> you know the keyboard helper app? which shows you what chars are on which key?
zeade has joined #ruby
<Hanmac> apeiros_
<apeiros_> Hanmac
Wilfred has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
<Hanmac> on what OS are you?
samuelj has quit [Ping timeout: 255 seconds]
dblack__ has quit [Quit: dblack__]
Xeago has quit [Remote host closed the connection]
R_Macy has quit [Quit: Computer has gone to sleep.]
_nitti has quit [Remote host closed the connection]
unflores has quit [Quit: unflores]
danneu has joined #ruby
rubarlion has quit [Remote host closed the connection]
krawchyk has quit [Remote host closed the connection]
ner0x has joined #ruby
Ontolog has joined #ruby
<apeiros_> osx, 10.8
_nitti has joined #ruby
hashmal has quit [Quit: Computer has gone to sleep.]
<Hanmac> apeiros_ ups ... then i cant help you :P
Ontolog has quit [Remote host closed the connection]
<apeiros_> with what?
Ontolog has joined #ruby
DDark has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
carlyle has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
BizarreCake has joined #ruby
_jc has quit [Quit: Textual IRC Client: www.textualapp.com]
slainer68 has quit [Remote host closed the connection]
rheoli has joined #ruby
d2dchat has quit [Remote host closed the connection]
skattyadz has joined #ruby
ngoldman has joined #ruby
bobdobbs has quit [Ping timeout: 245 seconds]
swoosh has quit [Quit: Computer has gone to sleep.]
ryannielson has joined #ruby
Wilfred has left #ruby [#ruby]
Mattix has quit [Read error: Connection reset by peer]
sayan has joined #ruby
Mattix has joined #ruby
jef_abraham has quit [Quit: jef_abraham]
ngoldman_ has joined #ruby
Banistergalaxy has quit [Remote host closed the connection]
<lectrick> Is it possible to do a regex in a way that would make this result in a match? '55555'.match(/(.){\1}/)
<lectrick> Basically I want something that will match '1', '22', '333', '4444' etc
eldariof has joined #ruby
akhet has left #ruby ["none"]
jdunck has joined #ruby
<lectrick> I also tried '55555'.match(/(.){#{$1}}/) #=> nil
tylersmith has joined #ruby
R_Macy has joined #ruby
dougireton has joined #ruby
chussenot has quit [Quit: chussenot]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Hanmac> lectrick: '55555'.match(/(.)\1+/) #=> #<MatchData "55555" 1:"5">
danneu has quit [Quit: WeeChat 0.3.8]
ngoldman has quit [Ping timeout: 272 seconds]
<jrajav> lectrick: Not purely with regex, no.
<jrajav> Regexes can't count, at least not like that
Goles has quit [Ping timeout: 240 seconds]
carlyle has joined #ruby
<lectrick> Hanmac: '1'.match(/(.)\1+/) #=> nil . '222222'.match(/(.)\1+/) #=> not nil (it should be nil). ;)
<lectrick> jrajav: is there a way to bastardize it to do so? I am purely interested in the exercise, this is not for production code
akashj87 has joined #ruby
<jrajav> Hanmac was pointing out that you get the number of matches back
blaxter has joined #ruby
<jrajav> lectrick: No. Pure regexes cannot do that simply by their nature (take a Formal Automata class), and as far as I'm aware of there are no extensions in any variant that would allow it either
Goles has joined #ruby
<lectrick> jrajav: I think it only returns the first matched character, not the number of matches
ngoldman has joined #ruby
<jrajav> You would need to use the value that you're matching to basically recompile the regex
<jrajav> Since you want to use it as a parameter to { }
<lectrick> jrajav: exactly. re: "take a Formal Automata class"... well, i'm outta college, maybe there's an online course I can hit up out of curiosity :)
danieldocki has quit [Quit: Linkinus - http://linkinus.com]
havenwood has joined #ruby
<jrajav> I would tell you to just read up on it but it's a fairly complex subject
<jrajav> One worth knowing if you're interested, though
<lectrick> jrajav: Does the problem revolve around needing to maintain state outside the immediate pattern?
<jrajav> Maybe look for a good book or a free online course
<lectrick> jrajav: I'm a fairly complex dude
<jrajav> Yes
<sheerun> apeiros_: FYI http://apidock.com/rails/Proc/bind
Dloko has joined #ruby
Spooner_ has quit [Remote host closed the connection]
aedornm has joined #ruby
<epitron> lectrick: is this a toy problem? or is there actually a problem you're trying to solve?
<jrajav> Basically you can write a state machine to compute any known, finite pattern - you can "count" with separate states, basically
<jrajav> So saying "2{5,54}" is possible - between 5 and 54 "2"'s
Mon_Ouie has joined #ruby
<jrajav> But to say "2{(2)}" (dependent on the number) is impossible because the machine would have to modify itself as it runs
<jrajav> The state machines that normal regular expressions are equivalent to is not as powerful as a computer
ngoldman_ has quit [Ping timeout: 272 seconds]
mityaz has joined #ruby
<jrajav> The situation becomes more complicated than that due to POSIX and PCRE extensions - they become a lot more powerful - but re: this issue it's still the same story
sambao21 has quit [Quit: sambao21]
alvaro_o has joined #ruby
<lectrick> jrajav: I fairly understand http://en.wikipedia.org/wiki/Automata_theory and I read up on BNF grammars one night while digging deeply into regex :)
<jrajav> Well, to write a grammar that does this, you would essentially need to write separate rules for each number.
<jrajav> That's where the issue lies
<epitron> the difference between a computer and a BNF/regex is that a computer can write things down :)
<lectrick> jrajav: ah i see, the state transition function (aka regex) would have to itself change based on the input
<jrajav> You want the grammar itself to depend on the matching set
<jrajav> Yeah
<epitron> you can simulate writing things down by making many many states, one for each thing you wanna write down
samphippen has quit [Quit: Computer has gone to sleep.]
<epitron> that gets combinatorially explosive though
<epitron> :)
<lectrick> right, I thought of that
<lectrick> and yes, I thought of that too :)
maxmanders has quit [Quit: Computer has gone to sleep.]
Davey has joined #ruby
<epitron> combinatorial dynamite
joeycarm_ has joined #ruby
<lectrick> sounds like a good band name
sunnym has joined #ruby
Dloko has quit [Ping timeout: 245 seconds]
<epitron> hahaha
<epitron> yesss
swingha has quit [Quit: WeeChat 0.4.0]
yekta has joined #ruby
<lectrick> there needs to be a website. goodhypotheticalbandnames.com
<jrajav> So unfortunately the short answer is "no"
<epitron> or bandnamegenerator.com
ferdev has quit [Quit: ferdev]
sunnym has left #ruby [#ruby]
<jrajav> And the long answer is (find out a whole crapton about formal automata and state machines and figure out exactly why the answer is) "no"
ngoldman_ has joined #ruby
joeycarmello has quit [Read error: Connection reset by peer]
<lectrick> jrajav: I may pursue the long answer for fun. I am the type of dude who read feynman's "QED" for fun though
axl_ has joined #ruby
<lectrick> offtopic: feynman (RIP) was the MAN.
<epitron> werd.
<axl_> is there a way i can convert a yday (day of year) to a Date object ?
gregor3005 has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
<lectrick> his autobio, http://www.amazon.com/Surely-Feynman-Adventures-Curious-Character/dp/0393316041, was one of the best I've ever read. Pure nerd inspiration
gregor3005 has left #ruby [#ruby]
<jrajav> lectrick: 5th result here may be a good book on it: https://www.google.com/search?q=formal+automata
ngoldman_ has quit [Remote host closed the connection]
<jrajav> lectrick: It may or may not be the book I used in college (which was good).. looks like it could be... it looks fine anyway, paging through it
mahmoudimus has joined #ruby
ngoldman_ has joined #ruby
<Amnesia> anyone using a tiling window manager over here?
pencilcheck has quit [Remote host closed the connection]
ngoldman has quit [Ping timeout: 245 seconds]
frem has joined #ruby
huoxito has joined #ruby
squidBits has joined #ruby
rubarlion has joined #ruby
<lectrick> jrajav: "Formal Languages and Automata Theory"?
<jrajav> Yup
dankest has joined #ruby
mahmoudi_ has joined #ruby
mpfundstein has joined #ruby
UberNerdGirl has joined #ruby
<epitron> jrajav: heh.. saying "5th book" on google isn't very reliable :)
<epitron> google is a filter bubble
mahmoudimus has quit [Read error: Connection reset by peer]
<jrajav> You're saying he could have a different result from me?
<epitron> yep
kpshek has quit []
apod has quit []
<epitron> try searching google regularly, and then in incognito mode
<UberNerdGirl> Hi, I have a question on inserting comma's into an array
<apeiros_> axl_: Date.ordinal
<jrajav> I was working in incognito mode.
plantseeker has quit [Quit: Nettalk6 - www.ntalk.de]
<epitron> ok :)
mahmoudi_ has quit [Client Quit]
freakazoid0223 has joined #ruby
<jrajav> I usually do unless I'm logging on to social websites and wasting time
<epitron> ah
akashj87 has quit []
<epitron> so you have no google biases
<epitron> you got the world bias :)
<UberNerdGirl> suppose array = ["9","8","7","6","5","4","3","2","1","0"]
<jrajav> I am kind of curious what "google biases" you think would skew results for different people
<UberNerdGirl> and threes = [3,6,9]
<jrajav> As far as I know the "personal results" are clearly demarcated
<epitron> google customizes your results based on what you click
<jrajav> Are you sure about that?
<epitron> yep
<apeiros_> +1 @ customized google
QF-MichaelK has joined #ruby
<epitron> i turned off my google search history once, and suddenly i couldn't find anything on ruby
<axl_> apeiros_: interesting! thanks a bunch
jjbohn is now known as jjbohn|afk
<UberNerdGirl> how do I get comma's inserted into "array" using each of the indices from "threes"?
soc42 has quit [Remote host closed the connection]
breakingthings has quit []
<epitron> it took me like 2 days of clicking the right things to get it back
<epitron> machine learning is why google is so effective
d2dchat has joined #ruby
<epitron> but it's also a filter bubble :)
Banistergalaxy has joined #ruby
<apeiros_> UberNerdGirl: not sure I understand your question
<havenwood> UberNerdGirl: What should the output look like? Where do the commas go?
<apeiros_> UberNerdGirl: what'd be the desired result?
<jrajav> I understand that, but I don't think that they have anything in place that will key off of your personal tracking or profile
<jrajav> That wouldn't be clearly marked, that is
<UberNerdGirl> the desired result would be
<jrajav> When I'm logged in to Google+ I can see Gmail and Drive results on the side, as well as results at the top that are marked with "You've visited this page 5 times. Last visit: 2/28/13"
<apeiros_> jrajav: google even bypassed safari privacy settings (not by chance, or coincidence, that was intentional)
<QF-MichaelK> I tried to run some ruby tk file and it's giving me errors related to `_invoke, so I tried to install libtcltk-ruby but that claimed broken packages, so I tried v 1.9.1 of that, then reinstalled ruby1.9.3... Any thoughts on how to get that to run?
<apeiros_> so I wouldn't bet on that
<jrajav> But other than those results (or if I click the tab to hide those) it is, as far as I can tell, precisely the same as logged-out results
<UberNerdGirl> ["9", "8", "7", ",", "6", "5", "4", ",", "3", "2", "1",",", "0"]
iamjarvo has joined #ruby
omani has joined #ruby
<UberNerdGirl> whoa that looks ghastly :D
<apeiros_> UberNerdGirl: ah
dougireton has quit [Remote host closed the connection]
omani has left #ruby [#ruby]
<jrajav> Whether they track or not or in what cases isn't the issue here
<UberNerdGirl> i tried the .insert
<apeiros_> you'll probably want to start with the rightmost
<apeiros_> since inserting an item will move the rest
<UberNerdGirl> .insert works only on 1 pass, and on the next pass it doesn't work
<UberNerdGirl> is there a way I can insert going from left to right?
<apeiros_> so e.g. indicies.sort.reverse.each do |index| ary[index,0] = [","] end # there is probably a nicer way
monkegjinni has quit [Remote host closed the connection]
<aedornm> Read this: http://37signals.com/svn/posts/3461-b-environment-merits-b-effort ... too bad my work place is more like a D- environment. /endbitching.
<apeiros_> alternatively you keep track of how much you've moved stuff
<UberNerdGirl> i will make a pastie to better illuminate my progress
<lectrick> UberNerdGirl: There is an array method that takes groups of objects
ssm2017 has joined #ruby
<ssm2017> do you have an idea on how to solve this ? https://gist.github.com/anonymous/5101588
<Hanmac> UberNerdGirl:
<Hanmac> >> ["9","8","7","6","5","4","3","2","1","0"].each_slice(3).map {|a|a + (a.size == 3 ? [","] : [])}.flatten
<eval-in> Hanmac => ["9", "8", "7", ",", "6", "5", "4", ",", "3", "2", "1", ",", "0"] (http://eval.in/12028)
<UberNerdGirl> here's what i have
<UberNerdGirl> Hanmac: I am aware of each_slice, but I am attempting to do this w/o that, and instead with what i currently have
R_Macy has quit [Quit: Computer has gone to sleep.]
<havenwood> UberNerdGirl: threes.each { |e| array[e] = ',' }
chrishough has quit [Ping timeout: 276 seconds]
<UberNerdGirl> havenwood: which line?
<QF-MichaelK> If anyone could help me settle this runtime error, I'd appreciate it: http://pastebin.com/r2K96dHP
c0rn has joined #ruby
<clooth> hullo sirs.
<UberNerdGirl> (my goal is to optimize my code with my current methods), then i would like to look at more sophisticated solutions :)
<UberNerdGirl> i am looking to fix my current mistakes first
<havenwood> UberNerdGirl: nvm, i didn't match expected output! oops.
<Hanmac> UberNerdGirl: array.each_with_index.map {|c,i| (threes.include?(i) ? [","] : []) + [c]}.flatten
<UberNerdGirl> then I am going to move onto better ways
rezzack has joined #ruby
samuelj_ has joined #ruby
<UberNerdGirl> Hanmac: what does |c,i| stand for?
<lectrick> UberNerdGirl: "optimize my code with current methods"... ok, let's run with that. how are the current methods more optimal than other methods?
<UberNerdGirl> lectrick: i didn't say my current methods are more optimal
samuelj_ has left #ruby [#ruby]
<UberNerdGirl> before i move onto truly more sophisticated strategies, there are some basic mistakes on my current code that I'd like to fix first
<Hanmac> UberNerdGirl c is the char of the array, and i is the index
<UberNerdGirl> once I fix my basic mistakes and get it actually _working_, then I'd like to move onto more efficient solutions
Bry8Star has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 250 seconds]
mrsolo has joined #ruby
c0rn has quit [Client Quit]
stkowski has joined #ruby
<UberNerdGirl> Hanmac: hm, what do you mean by char?
akashj87 has joined #ruby
<havenwood> UberNerdGirl: A single letter is a char. Like "9" or "h".
predator117 has joined #ruby
ilyam has joined #ruby
predator117 has quit [Client Quit]
<UberNerdGirl> havenwood: oh, so the first 'char' of [9,8,7,6] is the value returned when we take index 0 of it?
predator117 has joined #ruby
<UberNerdGirl> ["dog", "muffin", "cat"]
<UberNerdGirl> oops, i meant to say
<UberNerdGirl> random = ["dog", "muffin", "cat"]
<havenwood> UberNerdGirl: On line 6, i'd drop [1..-1] and just do 1.upto instead of 0.upto
<UberNerdGirl> random[0] is the first 'char' of that array?
carlyle has quit [Read error: Connection reset by peer]
Bry8Star has joined #ruby
<havenwood> UberNerdGirl: First element of the array. ?d is the first char of the first element
<havenwood> s/?d/'d'
chrishough has joined #ruby
<havenwood> e.g., 'dog'.each_char { |char| puts char }
_jc has joined #ruby
_nitti has quit [Ping timeout: 276 seconds]
<UberNerdGirl> I see
pygmael has joined #ruby
_nitti has joined #ruby
<UberNerdGirl> ah…. " kazu.reverse.each_with_index.map {|c,i| (threes.include?(i) ? [","] : []) + [c]}.flatten "
<UberNerdGirl> very eloquent
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
alvaro_o_ has joined #ruby
takeru has joined #ruby
maasha has joined #ruby
carlyle has joined #ruby
Stilo has joined #ruby
kpshek has joined #ruby
<UberNerdGirl> eugh… sudden bout of mind fuzz. brb while I decrypt all your nice codes
<havenwood> UberNerdGirl: Slight edit of Hanmac's solution: kazu.reverse_each.with_index.flat_map { |c, i| (threes.include?(i) ? [","] : []) + [c] }
<maasha> evening
ebobby has joined #ruby
segv- has joined #ruby
<UberNerdGirl> hm, what does the [c] mean, and why is it surrounded by brackets?
Rioji has quit [Remote host closed the connection]
rgbdev has joined #ruby
segv- has left #ruby [#ruby]
mockra has joined #ruby
mahmoudimus has joined #ruby
unflores has joined #ruby
alvaro_o has quit [Ping timeout: 255 seconds]
<havenwood> reverse.each_with_index swapped for reverse_each.with_index and map/flatten for flat_map
workmad3 has quit [Ping timeout: 272 seconds]
Rioji has joined #ruby
unflores has quit [Client Quit]
takeru has quit [Ping timeout: 255 seconds]
jrajav has quit [Quit: I tend to be neutral about apples]
<Hanmac> UberNerdGirl & havenwood: i build something like that :P ([0] + threes + [-1]).each_cons(2).flat_map {|x,y| y < 0 ? array[-1,1] : (array[x...y] + [","])} #=> ["9", "8", "7", ",", "6", "5", "4", ",", "3", "2", "1", ",", "0"]
rgbdev has quit [Remote host closed the connection]
<havenwood> Hanmac: haha, now you've lost me, i need coffee!
rgbdev has joined #ruby
fivethre1o has joined #ruby
tvw has quit []
kpshek has quit [Ping timeout: 255 seconds]
tommyvyo has joined #ruby
<maasha> apeiros_: ?
Bry8Star has quit [Remote host closed the connection]
<fivethre1o> hi can anyone tell me why the print here only ever says web1 https://gist.github.com/fivethreeo/5101781
rubarlion has quit [Remote host closed the connection]
mattbl has joined #ruby
<havenwood> UberNerdGirl: ['9', '8'].each { |c| puts c } # c is for char, could be named e or element or char or whatev
<havenwood> just a block arg
[eDu] has quit [Quit: [eDu]]
<lectrick> Hanmac: UberNerdGirl: Here's my solution: old_ary = %w[1 2 3 4 5 6 7 8]; new_ary = []; old_ary.each_with_index{|e,i| new_ary << e; new_ary << ',' if (i+1)%3==0}
c0rn has joined #ruby
<UberNerdGirl> brb AFK momentarily
<axl_> is there a way i can generate the routes I want better than the way I am doing it? https://gist.github.com/gaganawhad/5101810
akashj87 has quit [Read error: Connection reset by peer]
<maasha> axl_: I think you want #rails
m3pow has joined #ruby
<axl_> oops! sorry
Bry8Star has joined #ruby
<maasha> axl_: no
<maasha> err np
<maasha> :o)
Guest49024 is now known as mephux
mephux is now known as mephux_
<Hanmac> lectrick i thought that the want different indexes too
mephux_ is now known as mephux
mephux has quit [Changing host]
mephux has joined #ruby
Rioji has quit [Remote host closed the connection]
<lectrick> Hanmac: I don't know, I was aiming for "readable yet concise" :) (cc UberNerdGirl)
timmow has quit [Ping timeout: 252 seconds]
Ontolog has quit [Remote host closed the connection]
frem has quit [Ping timeout: 272 seconds]
bean__ has quit [Quit: Computer has gone to sleep.]
Al____ has quit [Quit: Al____]
<ssm2017> do you have an idea on how to solve this ? https://gist.github.com/anonymous/5101588
hbpoison has quit [Ping timeout: 272 seconds]
<Hanmac> lectrick and your sample does look bad when the old_array is accact %3 size big, so [1,2,3,4,5,6] is turned into [1,2,3,",",4,5,6,","] i think the last of the "," is wrong
_nitti has quit [Remote host closed the connection]
<fivethre1o> nvmn, each works better than for :)
<apeiros_> maasha: what?
tenmilestereo has joined #ruby
rburton- has joined #ruby
<havenwood> fivethre1o: what is the =begin =end about in the salt_minions array?
<maasha> apeiros_: hey there, I have been studying some more unit testing framework stuff. What is exactly the problem with DSL style?
<fivethre1o> commented out
predator117 has quit [Ping timeout: 256 seconds]
<apeiros_> maasha: with DSL itself nothing
predator117 has joined #ruby
adkron has joined #ruby
<havenwood> fivethre1o: Definitely more Ruby to use `salt_minions.each do salt_minion` but with your for loop I still get: database1web1
<maasha> apeiros_: so DSL for unit testing then?
<apeiros_> maasha: I have problems with a) frameworks which are invasive (i.e., "contaminate" your unit under test)
<havenwood> fivethre1o: (First element printed then second.)
<fivethre1o> as i expect
<Hanmac> havenwood you forgot the ||
<apeiros_> and b) with frameworks which are so vast, that you need serious knowledge in order to use and/or understand them
Mattix has quit [Quit: Leaving]
<lectrick> Hanmac: good point re: extra comma. sigh
<havenwood> <3 MiniTest
<maasha> apeiros_: I am totally following you on those issues. Also, I really like the test "description" { } that you have (was also in barewords?).
<apeiros_> baretest, not barewords ;-)
<apeiros_> and yes, that's how baretest started. with 38 LoC, and suite/test do :)
QF-MichaelK has left #ruby [#ruby]
Ontolog has joined #ruby
<maasha> apeiros_: right, so how do your tests look like when run (ok and fail)?
<maasha> the output of the testing suite
<apeiros_> with baretest? or with my test/unit extension?
<maasha> apeiros_: the latter
<apeiros_> my test/unit extension doesn't change the output format
<apeiros_> I sometimes run them with the "turn" gem
codecop has joined #ruby
ry4nn has quit [Ping timeout: 255 seconds]
<maasha> apeiros_: so the description in test "description" {} is not shown if a test fails?
ilyam has quit [Quit: ilyam]
apod has joined #ruby
<apeiros_> maasha: http://imgur.com/3t3tjtG
<apeiros_> that's with turn. without turn it's just the good old dots.
<UberNerdGirl> gee thank you for your eloquent tidbits and advice :D :D
<maasha> apeiros_: that looks very nice.
pygmael has quit [Quit: pygmael]
<UberNerdGirl> Hanmac: I always had a "fetish" for ternaries so I think yours was neat
Catbuntu has joined #ruby
<Catbuntu> Hi
R_Macy has joined #ruby
<UberNerdGirl> Catbuntu: hi, what a cute name you have
<Catbuntu> Yes haha
* UberNerdGirl obviously has AHDH :P
<maasha> apeiros_: so you have me pretty much convinced that your way is most excellent
yekta has quit [Quit: yekta]
<apeiros_> maasha: funny, I consider it a stop-gap :D
<maasha> apeiros_: well, what else? like if you were to allow a dependency?
mercwithamouth has quit [Ping timeout: 256 seconds]
<maasha> I was looking at wrong, but I miss the description
<apeiros_> I'd want what baretest should become
<apeiros_> anything less, I'm not interested in.
<maasha> Same for minitest
<banisterfiend> apeiros_: what are the k00 features of baretest
<maasha> apeiros_: and we are back to the stop-gap ...
<apeiros_> banisterfiend: proper separation of the test phases. multiple isolated verifications against the same exercise. nice, intuitive DSL without polluting the unit under test.
sepp2k1 has quit [Remote host closed the connection]
<maasha> banisterfiend: that it is not maintained :o/
<apeiros_> and the issue would be that it isn't done :)
rdark has quit [Quit: leaving]
_jc has quit [Quit: Computer has gone to sleep.]
<apeiros_> oh, also a nice test-runner (works in 0.4 already), which allows you to only run failed tests, and/or new tests or pretty much any selector you want.
djwonk has quit []
<apeiros_> and through the test-runner a nice boilerplate-free (no yucky "require_relative '../../../../test_helper'"!) test suite
mikurubeam has joined #ruby
Bry8Star has quit [Remote host closed the connection]
mattbl has quit [Quit: This computer has gone to sleep]
lewix has quit [Remote host closed the connection]
<maasha> yeah, that stinks
<apeiros_> that's why I have test/runner.rb in my stop-gap :)
mattbl has joined #ruby
Neomex has quit [Quit: Neomex]
<apeiros_> allows me to be boilerplate free with test/unit
<apeiros_> I'll probably even move that little bit of code into its own gem
m8 has joined #ruby
lewix has joined #ruby
stkowski_ has joined #ruby
khismetix has joined #ruby
stkowski has quit [Ping timeout: 272 seconds]
stkowski_ is now known as stkowski
llaskin1 has joined #ruby
lewix has quit [Remote host closed the connection]
nmabry has joined #ruby
<llaskin1> anyone here use rubymine?
<llaskin1> I'm trying to create a file template but It for some reason keeps blowing up on a line with ":" in it
Bry8Star has joined #ruby
banjara has joined #ruby
<llaskin1> specifically this line: "$waiter.until{ $browser.find_element(:css, "input[type='password']") }"
nmabry has quit [Client Quit]
DrShoggoth has quit [Ping timeout: 245 seconds]
JarJar has quit [Quit: Leaving]
nmabry has joined #ruby
xybre has quit [Ping timeout: 264 seconds]
shtirlic has quit [Ping timeout: 260 seconds]
<maasha> apeiros_: yeah, I find the layout of the file tree confusing.
Kovensky has quit [Ping timeout: 248 seconds]
etcetera has quit []
sambio has quit [Ping timeout: 252 seconds]
<maasha> apeiros_: like the helper.rb - when is that loaded?
<apeiros_> test/unit contains all your tests
<apeiros_> test/lib contains libs related to testing (not libs under test)
<maasha> got that
<apeiros_> all the rest is done by test/runner.rb
bonhoeffer has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
adkron_ has joined #ruby
adkron__ has joined #ruby
<apeiros_> loading of helper and preparing $LOAD_PATH
Criztian has quit [Remote host closed the connection]
khismetix has quit [Ping timeout: 272 seconds]
Bry8Star has quit [Remote host closed the connection]
<bonhoeffer> i'm in rib -- trying to test a gem -- how can i load my environment require 'lib/govtrack.rb' only causes problems because it is filled with require statements that need the correct paths
kpshek has joined #ruby
carlyle has quit [Remote host closed the connection]
<bonhoeffer> rib = irb (autocorrect!!)
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikurubeam has quit [Quit: +1 (Yes). -1 (No). i (WTF?).]
<maasha> apeiros_: I guess I should be able to make that work. I will play with that tomorrow.
etcetera has joined #ruby
BizarreCake has quit [Ping timeout: 245 seconds]
<maasha> apeiros_: so - I forgot - why was it that baretest is not moving forward?
kpshek has quit [Client Quit]
<bonhoeffer> for example, i require 'rubygems', then require "/Users/tim/Sites/govtrack/lib/govtrack.rb", which produces: LoadError: cannot load such file -- govtrack/base
Bry8Star has joined #ruby
etcetera has quit [Client Quit]
v0n has joined #ruby
Kovensky has joined #ruby
xybre has joined #ruby
squidBits_ has joined #ruby
shtirlic has joined #ruby
khismetix has joined #ruby
squidBits has quit [Read error: Connection reset by peer]
squidBits_ has quit [Read error: Connection reset by peer]
mikurubeam has joined #ruby
<apeiros_> maasha: lack of time, too many other funky stuff to do
squidBits has joined #ruby
<apeiros_> *much
etcetera has joined #ruby
<banisterfiend> starcraft.
<banisterfiend> :P
monkegjinni has joined #ruby
<bonhoeffer> i think there is some missing configuration to get the gem working -- some way to specify paths in the gem spec?
hbpoison has joined #ruby
ngoldman has joined #ruby
kirun has joined #ruby
<apeiros_> banisterfiend: indeed, that'd be one of those funky things
<maasha> apeiros_: hm, well, perhaps one day. Anyway, thanks for the answers.
jjbohn|afk is now known as jjbohn
dblack_ has joined #ruby
<Hanmac> apeiros_ did you notic that in ruby2.0 little floats has fixed object ids too?
yourmysin_ has quit [Read error: Connection reset by peer]
yourmysin__ has quit [Read error: Connection reset by peer]
<maasha> banisterfiend: startcraft written in ruby by apeiros_ ? funky!
Rioji has joined #ruby
forced_request has joined #ruby
yourmysin has joined #ruby
yekta has joined #ruby
Choobie has quit [Quit: End]
killer-dinosaur has joined #ruby
ngoldman_ has quit [Ping timeout: 276 seconds]
jerius has quit [Ping timeout: 245 seconds]
ngoldman has quit [Ping timeout: 250 seconds]
chussenot has joined #ruby
_nitti has joined #ruby
<Hanmac> banisterfiend ... floats does have fixed object_ids now ... does you like that? :D
apod has quit []
UberNerdGirl has quit [Ping timeout: 245 seconds]
killer-dinosaur is now known as UberNerdGirl
dougireton has joined #ruby
<banisterfiend> Hanmac: good for ruby game developers
<banisterfiend> flonums i think they're called
stonevil has joined #ruby
_jc has joined #ruby
JMcAfreak has joined #ruby
FailDrain has joined #ruby
mercwithamouth has joined #ruby
<bonhoeffer> i tried to write up my quandary here: https://gist.github.com/tbbooher/5102130
Rioji has quit [Ping timeout: 248 seconds]
m3pow has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0/20130227155931]]
<bonhoeffer> maybe i should modify $LOAD_PATH?
m3pow has joined #ruby
carlyle has joined #ruby
nachtwandler has quit [Quit: leaving]
Criztian has joined #ruby
<Hanmac> bonhoeffer require_relative
sailias has quit [Ping timeout: 276 seconds]
alvaro_o_ has quit [Read error: Connection reset by peer]
<bonhoeffer> Hanmac: ok
alvaro_o has joined #ruby
FailDrain has left #ruby ["Leaving"]
<bonhoeffer> ah -- i also did $LOAD_PATH.push(Dir.pwd + "/lib/") -- then my require worked
<bonhoeffer> i guess otherwise, i would have to set the basepath
endzyme has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 256 seconds]
ssm2017 has left #ruby ["goodbye..."]
frem has joined #ruby
frem has quit [Excess Flood]
jerius has joined #ruby
bean__ has joined #ruby
chrishough has quit [Quit: chrishough]
bean__ has quit [Max SendQ exceeded]
chussenot has quit [Ping timeout: 272 seconds]
bean__ has joined #ruby
bean__ has quit [Max SendQ exceeded]
alvaro_o has quit [Client Quit]
<bonhoeffer> works well with irb -I .
bean__ has joined #ruby
mattbl has joined #ruby
rheoli has quit [Quit: Computer has gone to sleep.]
axl__ has joined #ruby
llaskin1 has left #ruby [#ruby]
pseudonymous has quit [Ping timeout: 255 seconds]
Mon_Ouie has quit [Ping timeout: 260 seconds]
kpshek has joined #ruby
kpshek has quit [Remote host closed the connection]
tvw has joined #ruby
yacks has quit [Quit: Leaving]
ilyam has joined #ruby
rezzack has quit [Quit: Leaving.]
mercwithamouth has quit [Ping timeout: 260 seconds]
generalissimo has quit [Remote host closed the connection]
danneu has joined #ruby
axl_ has quit [Ping timeout: 264 seconds]
axl__ is now known as axl_
breakingthings has joined #ruby
<Hanmac> bonoeffer ... manipulating the $LOAD_PATH is a no-go .. it can BITE you in your ass
mattbl has quit [Ping timeout: 276 seconds]
elaptics is now known as elaptics`away
mattbl has joined #ruby
dustint has quit [Quit: Leaving]
<Hanmac> i wonder why NO ONE UNDERSTANDS that its a security risk to add "." to the load path ... and then they are also to dump to google why its a risk
<banisterfiend> Hanmac: some people pay good money to be bitten in the ass
chrishough has joined #ruby
danneu has quit [Client Quit]
<Hanmac> yeah ... apple users :P
threesome has joined #ruby
ryanf has joined #ruby
dustint has joined #ruby
EPIK has joined #ruby
reset has joined #ruby
Goles has quit [Ping timeout: 240 seconds]
dougireton has quit [Quit: Leaving.]
Goles has joined #ruby
jrajav has joined #ruby
<ddd> yet to be bit in the ass by any of my apple products
maasha has quit [Ping timeout: 245 seconds]
Eldariof-ru has joined #ruby
khismetix has quit [Ping timeout: 245 seconds]
<aedornm> hmmmm... I don't see anything wrong with '.' in the load path. But then I tend to sandbox a lot
khismetix has joined #ruby
<whitequark> aedornm: same reason why PATH=. is bad
sambao21 has joined #ruby
<whitequark> anyone who can plant a file in your fs might trick you into code execution
DrShoggoth has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
<whitequark> like by calling a script `ls` and +x'ing it
jurassic has quit [Quit: jurassic]
dblack_ has quit [Quit: dblack_]
<aedornm> Oh I understand the reason, but I don't understand why anyone would let it do anything to begin with.
<whitequark> 'it'?
<zastern> Is there a reason why this code isn't succesfully printing REDACTED when I expect it to?
UberNerdGirl has quit [Quit: UberNerdGirl]
Mattix has joined #ruby
eldariof has quit [Ping timeout: 264 seconds]
<zastern> E.g. if I set text to foo bar foo bar foo bar, and then set redact to foo and redact2 to bar, it still just prints out foo bar foo bar foo bar
Xeago has joined #ruby
<aedornm> Yeah, you can't do anything to the file system if it's in a sandbox (or jail if we're running BSD, generally.) You also can't do anything if permissions are correct. I suppose if you're running a service specifically as root, but then.. why?
rismoney has joined #ruby
<whitequark> aedornm: it's designed to prevent privilege escalation in multiuser systems
artofraw has joined #ruby
<whitequark> besides, there isn't really a _reason_ to keep . in any load paths
<Hanmac> aedornm information: EVERY sandbox can be broken ...
<shevy> ddd I want a RubyOS!
<ddd> shevy: Build it and they will come!
frem has joined #ruby
jurassic has joined #ruby
<shevy> hehe
<aedornm> hmmmm..
<whitequark> Hanmac: it's really freaking hard to climb out of a hardware vm
<whitequark> to the point where it's easier to exploit
<aedornm> Hanmac: I'll concede to that, but if they're breaking your sandbox you probably have bigger problems.
_nitti has joined #ruby
<whitequark> other OSes as if they were on network
Eldariof93-ru has joined #ruby
blaxter has quit [Quit: foo]
<Hanmac> aedornm if you can make solid sandboxes you should go to #java and ask then why they didnt get it currect
<zastern> I think I need AND not OR
<zastern> ok
rubarlion has joined #ruby
blaxter has joined #ruby
Eldariof-ru has quit [Ping timeout: 245 seconds]
<interactionjaxsn> zastern: right
Radnor has joined #ruby
asdfqwer has joined #ruby
elkclone has quit [Quit: It's never too late to unplug and run.]
jimeh has quit [Quit: Computer has gone to sleep.]
rubarlion has quit [Ping timeout: 240 seconds]
sayan has quit [Ping timeout: 250 seconds]
chussenot has joined #ruby
horofox has joined #ruby
slainer68 has joined #ruby
neku has joined #ruby
emmanuelux has joined #ruby
dougireton has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
qubit has quit [Ping timeout: 245 seconds]
maxmanders has joined #ruby
Xeago has quit [Remote host closed the connection]
eka has quit [Read error: Connection reset by peer]
dougireton has quit [Client Quit]
alexim has joined #ruby
<zastern> Ok, another maybe dumb question - why doesn't my if statement match the downcase things? Doing the operations individually in irb tells me they should, but I'm stil seeing things like FOO in my string if i set the redact var to foo. https://gist.github.com/5102492
icole has joined #ruby
eka has joined #ruby
nomenkun has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<zastern> e.g. if text = "foo bar foo bar FOO bar", and redact = "foo" and redact2 = "bar" then I end up with the string REDACTED REDACTED REDACTED REDACTED FOO REDACTED
Takehiro has joined #ruby
jurassic has quit [Quit: jurassic]
carloslopes has quit [Read error: Connection reset by peer]
rburton- has quit [Quit: Leaving...]
<aedornm> Hanmac: I don't think we can compare the JVM sandbox with something at the OS level that would have to encompass a user running a Ruby script. You are correct, nothing is infallible
Ontolog_ has joined #ruby
kpshek has joined #ruby
enebo_ has joined #ruby
Goles has quit [Read error: Connection reset by peer]
Ontolog has quit [Ping timeout: 248 seconds]
Catbuntu has quit [Quit: Leaving]
Goles has joined #ruby
sonda has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 255 seconds]
allaire has quit []
markalanevans has quit [Ping timeout: 240 seconds]
enebo has quit [Ping timeout: 240 seconds]
enebo_ is now known as enebo
DoctorWedgeworth has joined #ruby
<MrZYX> zastern: I got that right you wonder why "FOO" != "foo".downcase is true?
pygmael has joined #ruby
bapa has left #ruby [#ruby]
Hanmac has quit [Ping timeout: 240 seconds]
Giorgio has joined #ruby
<DoctorWedgeworth> hey, sorry if this a stupid question (I'm new to Ruby and trying to learn by doing), but if I do some_object.function and then inside that function add a 'puts "hello"' it works, but if I try to use sprintf it seems to get lost somewhere. What am I doing wrong?
generalissimo has joined #ruby
Hanmac has joined #ruby
<DoctorWedgeworth> eg. if the last two lines of the function are sprintf("%s", "sprintf test") \n puts("puts test") I'll see output of "puts test" only
Eldariof93-ru has quit []
Goles_ has joined #ruby
huoxito has quit [Quit: Leaving]
havenwood has quit [Remote host closed the connection]
mattbl has quit [Quit: This computer has gone to sleep]
<MrZYX> DoctorWedgeworth: http://www.ruby-doc.org/core-1.9.3/Kernel.html#method-i-sprintf carefully read what the function does
<bw_> DoctorWedgeworth: sprintf like the c version prints into a string (i'm not a ruby guy tho)
<banseljaj> calling now
<bw_> you're looking for printf, i guess
<DoctorWedgeworth> ah. Thanks :)
stonevil has quit [Quit: stonevil]
Goles has quit [Ping timeout: 276 seconds]
mercwithamouth has joined #ruby
<DoctorWedgeworth> I knew it was a stupid question
adamjleonard has joined #ruby
* Hanmac likes the % method more
arya has quit [Ping timeout: 256 seconds]
khismetix has quit [Quit: Computer has gone to sleep.]
<DoctorWedgeworth> is there a Ruby equivalent to Perl's use warnings; that would warn me about stupid mistakes I make?
kirun has quit [Ping timeout: 250 seconds]
ozgura has joined #ruby
sambao21 has quit [Quit: sambao21]
arya has joined #ruby
swex_ has joined #ruby
swex has quit [Ping timeout: 245 seconds]
Hanmac1 has quit [Quit: Leaving.]
chussenot has quit [Quit: chussenot]
rippa has quit [Ping timeout: 240 seconds]
Hanmac1 has joined #ruby
endzyme has joined #ruby
jonahR has joined #ruby
sambio has joined #ruby
reset has quit [Ping timeout: 248 seconds]
carraroj has quit [Quit: Konversation terminated!]
threesome has quit [Ping timeout: 276 seconds]
kirun has joined #ruby
jimeh has joined #ruby
prudhvi has left #ruby [#ruby]
mattbl has joined #ruby
haxrbyte_ has joined #ruby
sambao21 has joined #ruby
haxrbyte has quit [Ping timeout: 245 seconds]
jurassic has joined #ruby
emocakes has joined #ruby
dankest has quit [Quit: Leaving...]
khismetix has joined #ruby
timonv has quit [Remote host closed the connection]
dougireton has joined #ruby
KDiddy has joined #ruby
blaxter has quit [Quit: foo]
khismetix has quit [Client Quit]
philcrissman has quit [Remote host closed the connection]
dougireton has quit [Client Quit]
mattbl has quit [Quit: This computer has gone to sleep]
ericmathison has joined #ruby
ericmathison has quit [Client Quit]
anderse has quit [Quit: anderse]
bigkevmcd has quit [Quit: Ex-Chat]
workmad3 has joined #ruby
bigkevmcd has joined #ruby
eka has quit [Quit: Textual IRC Client: www.textualapp.com]
takeru has joined #ruby
v0n has quit [Quit: WeeChat 0.4.0]
philcrissman has joined #ruby
v0n has joined #ruby
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
daniel_hinojosa has joined #ruby
pygmael has quit [Quit: pygmael]
threesome has joined #ruby
vlad_starkov has joined #ruby
<shevy> DoctorWedgeworth unfortunately not quite so, only thing you could use is -w switch ... hmm and.. what was the name...
<shevy> $VERBOSE = true or some ugly shit like that
takeru has quit [Ping timeout: 260 seconds]
emocakes has quit [Read error: Connection reset by peer]
Ontolog_ is now known as Ontolog
_main_ has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
__main__ has quit [Read error: No route to host]
adkron__ has quit [Ping timeout: 276 seconds]
adkron_ has quit [Ping timeout: 276 seconds]
Guest1234 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
_main_ has joined #ruby
jonahR has quit [Quit: jonahR]
emocakes has joined #ruby
jamesfung14 has quit [Ping timeout: 272 seconds]
zommi has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
zommi has quit [Read error: Connection reset by peer]
KDiddy has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
_main_ is now known as __main__
aedornm has quit [Quit: Leaving]
XVirus has quit [Quit: I was somebody who, is no business of yours ...]
eka has joined #ruby
eindoofus has joined #ruby
eka has quit [Client Quit]
mercwithamouth has quit [Ping timeout: 255 seconds]
Stilo has joined #ruby
tonini has joined #ruby
Splacknuck is now known as Nuck
<eindoofus> hi, I'm going through "The Well-Grounded Rubyist" and when I do "require 'stacklike'" from "cargohold.rb" I get some error about custom_require.rb:36 even though "stacklike.rb" exists in that same directory. What am I doing wrong?
<eindoofus> I have ruby version 1.9.3p385 installed through rvm
<Hanmac> eindoofus require_relative
<TTilus> eindoofus: 1.8 had . in default loadpath, 1.9 does not
<eindoofus> Hanmac, thanks. is this something that is new? is my book outdated? It says it's for Ruby 1.9
swills has left #ruby [#ruby]
<Hanmac> hm it was changed in 1.9.2 ... maybe your book was for 1.9.1
* bean__ is not a big fan of books for learning programming
<Hanmac> i use require and require_relative in the same way like #include <> and #include "" in C/C++
<eindoofus> so in order to achieve . in the loadpath it is customary to use require_relative?
<bean__> especially because stuff changes
beiter has quit [Quit: beiter]
<whitequark> bean__: well it's a reference, not a tutorial
<bean__> require "./cargohold.rb" would work too i think
<TTilus> oh, it was only 1.9.2 that changed default loadpath
<whitequark> you don't learn programming by reading a reference
<Hanmac> eindoofus require_relative loads relative the the file, not to the current dir, thats why its better
<Hanmac> bean__ yeah, but not allways ...
<bean__> fact.
<eindoofus> good to know, thanks guys
DoctorWedgeworth has quit [Read error: Connection reset by peer]
rafacv has quit [Remote host closed the connection]
rburton- has joined #ruby
rburton- has quit [Remote host closed the connection]
rburton- has joined #ruby
eka has joined #ruby
<TTilus> eindoofus: require_relative replaces the require File.join(File.dirname(__FILE__), 'foo') idiom
<shevy> hmm guys, say you have a text file with 10 lines
<Hanmac> C has two different #include too
tonini has quit []
tonini has joined #ruby
<shevy> you want to append a string to line 5, string would be ' []'
<shevy> is it worth to turn such an action into a standalone gem?
<TTilus> no
<eindoofus> TTilus, thanks. I'll try to remember that for the future
tonini has quit [Client Quit]
eka has quit [Client Quit]
bonhoeffer has quit [Quit: bonhoeffer]
tonini has joined #ruby
tonini has quit [Remote host closed the connection]
zastav has joined #ruby
zastav has quit [Remote host closed the connection]
tonini has joined #ruby
Xeago has joined #ruby
<Blaze_Boy> #webdevelopment
_nitti has quit [Read error: Connection reset by peer]
_nitti has joined #ruby
* Blaze_Boy sorry
tvw has quit [Ping timeout: 248 seconds]
eka has joined #ruby
motto has joined #ruby
programmerq has joined #ruby
adamjleonard has quit [Quit: Leaving...]
<TTilus> shevy: those who would be likely to install such a gem most likely already have sed ;)
dougireton has joined #ruby
m8 has quit [Ping timeout: 240 seconds]
eka has quit [Client Quit]
<shevy> unbelievers!!!!!
<shevy> there shall be only ruby
<Hanmac> shevy your problem can be done in one line with one command ... :P
sirish has joined #ruby
<Hanmac> shevy: look at str[/(\n.+){5-1}()/,2]=" []"
chrishough has quit [Quit: chrishough]
<Hanmac> ups its : str[/(\n.+){4}()/,2]=" []"
vierja has joined #ruby
<shevy> Hanmac I am sorry
sambao21 has quit [Quit: sambao21]
<shevy> I can't use code like that
<Hanmac> why? :(
<shevy> it's like cryptic alien grunts to me
sn0wb1rd has quit [Read error: Connection reset by peer]
eka has joined #ruby
eliasp has joined #ruby
<shevy> you do this on purpose :)
eka has quit [Client Quit]
<shevy> "There is more than one way to solve something - and Hanmac will find the most cryptic way."
<programmerq> I'm trying to use ruby's net/ldap to do some queries against my corporate ldap. ldapsearch -h ldap.example.com -x -b ou=People,o=example.com '(uid=me@example.com)' does work. Every time we try to do a search with Net::LDAP, it says Net::LDAP::LdapError: no connection to server. Here's the code I'm using: Net::LDAP.new(:host => 'ldap.example.com', :base => 'o=example.com').search(:filter => 'uid=me@example.com')
lewix has joined #ruby
<Hanmac> shevy its the only way to manipulate the string directly without calling each_line and join
chrishough has joined #ruby
<Hanmac> without each_line, map, join
<lewix> hi
<shevy> hmm
<lewix> Hanmac: what is
ryannielson has quit [Quit: ryannielson]
<Hanmac> lewix: shevy wants to add something to line n in string str
dougireton has quit [Remote host closed the connection]
dougireton has joined #ruby
eka has joined #ruby
Quebert has joined #ruby
sn0wb1rd has joined #ruby
<Hanmac> my code was str[/(\n?.*){#{nr}}()/,2]=ctr
<Hanmac> lewix and now say it into my face that you understand my code :P
codecop has quit [Quit: Išeinu]
<lewix> Hanmac: just what i wanted to say. how straight forward it is
Rioji has joined #ruby
eka has quit [Client Quit]
<lewix> Hanmac: it reads like plain english
philcrissman has quit [Remote host closed the connection]
<Hanmac> my regex too? :D47
axhlf has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
<lewix> Hanmac: I don't understand it at all. =)
Rioji has quit [Remote host closed the connection]
Rioji has joined #ruby
Quebert has quit [Ping timeout: 248 seconds]
Goles_ has quit [Remote host closed the connection]
fuzai has quit [Read error: Connection reset by peer]
slainer68 has quit [Remote host closed the connection]
fuzai has joined #ruby
_jc has quit [Quit: Textual IRC Client: www.textualapp.com]
jrajav has quit [Quit: I tend to be neutral about apples]
tvw has joined #ruby
slainer68 has joined #ruby
<TTilus> shevy: with sed it is nice and clean, heavens sake, it is Stream EDitor \o/
tonini has quit [Remote host closed the connection]
testingb0t has joined #ruby
Trudko has joined #ruby
<Trudko> guys in ruby 1.9.3 I use # encoding: UTF-8 for file encoding what is alternative in 1.8.7?
<TTilus> shevy: sed '5 s/$/[]/'
<TTilus> shevy: reads nicely too: put '[]' at the end of 5th line
<whitequark> Trudko: nothing, 1.8.7 is strictly ASCII
Davey has joined #ruby
neku has quit [Read error: Connection reset by peer]
<Hanmac> TTilus but what if he wants it platform Indipend? then he cant use sed
dougireton has quit [Quit: Leaving.]
dougireton has joined #ruby
<Trudko> whitequark: wait so i cant have ruby 1.8.7 with spec characters?
tenmilestereo has quit [Quit: Leaving]
spider-mario has joined #ruby
jerius has quit []
<whitequark> Trudko: spec characters?
<Trudko> special characters
philcrissman has joined #ruby
<whitequark> you can write them
<Hanmac> Trudko: you can, but you can not trust your files
<whitequark> but don't expect ruby to understand you
jjbohn is now known as jjbohn|afk
<whitequark> ie "ä"[0] will return bullshit
<Trudko> and what am I expect to do ? I have strings (for rails apps)
elux has quit [Quit: Bye!]
<Trudko> sorry that i did not metnioned it , i use special characters only for strings. not for name of variables etc
eka has joined #ruby
eka has quit [Client Quit]
noop has quit [Ping timeout: 256 seconds]
<Hanmac> whitequark you are very right ... oO ...
<baroquebobcat> Trudko: what kind of special characters? I think 1.8.7 should be ok. Earlier versions might have issues.
<Trudko> baroquebobcat: slovak characters š ť, č ô etc
<Hanmac> Trudko 1.8 is dead ... it only gets "life-supporting" for at least 3 months ... then it will DIE
<Trudko> and that is great :)
Honeycomb has joined #ruby
<Trudko> but i have hosting for rails app which refuse to upgrade it
<baroquebobcat> that should be fine I think. You might have to do some funny things as the encoding stuff is different between the two
<baroquebobcat> "ä"[0] being a good example
<whitequark> Trudko: google for mb_chars
tjbiddle has joined #ruby
<Hanmac> Turdko: because of what?? it should be updateable, newer rails versions does exist, when your users dont want to update, they will get what they deserved
<Trudko> baroquebobcat: unfortunatelly if i just delete # encoding: UTF-8 i get error and I think that is ruby problem.
<baroquebobcat> whitequark: slovak chars are not multi byte
<Trudko> Hanmac not sure situation is complicatad dont want to explain trust me i would love to be on 1.9.3
<baroquebobcat> encoding: UTF-8 works
<baroquebobcat> or should
<Trudko> crappy project stupid people etc
<Trudko> baroquebobcat: should work but not for 1.8.7 ?!
zaltekk has quit [Read error: Connection reset by peer]
<whitequark> baroquebobcat: ok. never had a clue
<Hanmac> Trudko information: on ruby2.0 you dont need encoding: UTF-8 anymore because this is the default
mityaz has quit [Quit: See ya!]
adambeynon has joined #ruby
motto has quit [Quit: Sto andando via]
<Trudko> Hanmac good to know seemed bit odd to have to use it explicitly , so what can i do on 1.8.7
ngoldman has joined #ruby
jjbohn|afk is now known as jjbohn
Mattix has quit [Quit: Leaving]
<Hanmac> " baroquebobcat: whitequark: slovak chars are not multi byte" wrong
dankest has joined #ruby
<baroquebobcat> Hanmac: the more accurate answer is, as always, it depends.
<Hanmac> "ô" for sample is multibyte
<TTilus> Hanmac: if thats what counts, more platforms have sed available out of box
vierja has quit [Quit: Textual IRC Client: www.textualapp.com]
rafacv has joined #ruby
<TTilus> Hanmac: ;)
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
rburton- has quit [Quit: Leaving...]
banseljaj is now known as imami|afk
vierja has joined #ruby
vierja has quit [Excess Flood]
monkegjinni has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 256 seconds]
vierja has joined #ruby
vierja has quit [Excess Flood]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<Trudko> guys so what is solution for 1.8.7 sorry if I missed
otherj has joined #ruby
<TTilus> Trudko: for 1.8 strings are basically just byte sequences
<Hanmac> trudko: delete it :P
<Trudko> not really solution
<TTilus> Trudko: http://blog.grayproductions.net/articles/bytes_and_characters_in_ruby_18 might shed some light on the issue
<Trudko> so i cant use special characters as strings in ruby 1.8.7 at all?
m8 has joined #ruby
pyrac has quit [Quit: pyrac]
alexim has quit [Read error: Connection reset by peer]
lewix has quit [Remote host closed the connection]
Hanmac1 has quit [Quit: Leaving.]
jerius has joined #ruby
<TTilus> Trudko: you can put _anything_ in strings in ruby 1.8.7 and it wont care :)
Beoran_ has joined #ruby
<Trudko> ,,awesome" love this project more and more
Hanmac1 has joined #ruby
zaltekk has joined #ruby
dustint has quit [Quit: Leaving]
Morkel has joined #ruby
dougireton has quit [Remote host closed the connection]
<TTilus> Trudko: you definitely should also read hudakatz.com/2010/05/05/ruby-1-9-encodings-a-primer-and-the-solution-for-rails/ "Postscript: What Happened in 1.8!?" onwards
<scrogson> I'm developing an asset gem which specifies bootstrap-sass as dependency. How can I access the scss files from bootstrap-sass within my gem (i.e @import "bootstrap";)
<whitequark> ;)
<whitequark> sneaky
<Trudko> TTilus: i will but i just want to know if there is solution / workaround in that article?
Beoran__ has quit [Ping timeout: 252 seconds]
<TTilus> Trudko: in 1.8.7 theres nothing to solve
testingb0t has quit [Quit: Leaving.]
Blaze_Boy has quit [Ping timeout: 245 seconds]
<Trudko> i am confused what i see from start of article i need to set encoding manulay or something like thet
<Trudko> i also found iconv gem
carlyle has quit [Ping timeout: 245 seconds]
xiphiasx_ has quit [Ping timeout: 276 seconds]
DoctorWedgeworth has joined #ruby
xiphiasx_ has joined #ruby
tonini has joined #ruby
carlyle has joined #ruby
<TTilus> Trudko: what exactly is your problem
<DoctorWedgeworth> you guys are amazing. I've been struggling with something for 15 minutes, and just joining this channel made the solution come to me
<apeiros_> TTilus: you can put anything in strings in 1.9 too
<Hanmac> 1.8 :P
Mattix has joined #ruby
<TTilus> apeiros_: ok, yes
Hanmac1 has quit [Read error: Connection reset by peer]
<TTilus> DoctorWedgeworth: np
<TTilus> =D
<apeiros_> and if anybody really craves the retarded standard that was 1.8, just set every encoding to binary
Hanmac1 has joined #ruby
<Trudko> TTilus: well i i have syntax error with rails apps. You question seems to imply that spec. chars should not be problem at all
razibog has quit [Ping timeout: 272 seconds]
rezzack has joined #ruby
mercwithamouth has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
<TTilus> Trudko: could you possibly pastie/gist that erraneous code and the error?
axhlf has joined #ruby
chomp has quit [Quit: Leaving]
<TTilus> Trudko: non-ascii character (sequences) within string literal should really not be a source of syntax error
tonini has quit [Remote host closed the connection]
<Trudko> ok i will check it then
<TTilus> or comments for that matter
EPIK has quit [Ping timeout: 240 seconds]
<apeiros_> especially since SyntaxError is something entirely different from ArgumentError
artofraw has quit [Remote host closed the connection]
<apeiros_> (srsly? they didn't bother to make a separate EncodingError? OO)
<TTilus> Trudko: it would be leaps and bounds easier to help you if we just knew the exact error
<Hanmac> i think the problem is in a case when like case obj; when 14:
* TTilus clearly missed something, was the code+error pastied already?
lewix has joined #ruby
* Hanmac has a great crystal ball :P
<apeiros_> TTilus: no, you didn't miss a thing
wmoxam has quit [Ping timeout: 272 seconds]
geekbri has quit [Remote host closed the connection]
* TTilus wants one too, would be immensely useful at work
<apeiros_> TTilus: maybe you're missing a nose-hook, by which to pull information…
<Hanmac> TTilus: i have a extension for my IRC client where i can use /8ball :P
<apeiros_> TTilus: just spend some time in this channel. your latent psychic abilities will waken by all those poorly based questions
anderse has joined #ruby
<Trudko> ok here is my code http://pastie.org/6407200
<TTilus> apeiros_: maybe a skull drill? "Sinuhe the Egyptian" -style
<apeiros_> ^^
<apeiros_> now did I miss something?
motto has joined #ruby
<apeiros_> I thought Trudko had an encoding issue?
bonhoeffer has joined #ruby
motto has quit [Read error: Connection reset by peer]
hybris has joined #ruby
<apeiros_> Trudko: that's not the full code.
<TTilus> apeiros_: nose-hook just brought skull-drilling into my mind, somehow
<TTilus> Trudko: it says "unexpected kEND"
<apeiros_> that code says "Syntax OK"
<Hanmac> ... the code is valid for all of my rubies (1.9 has a encoding problem but nothing wrong)
rburton- has joined #ruby
julianxk has joined #ruby
<apeiros_> so we have 2 things - a) Syntax errors have nothing to do with encodings, b) this code is in all likeliness not the offending code (or not the complete)
ngotho has quit [Ping timeout: 259 seconds]
<Hanmac> i get "syntax error, unexpected $end, expecting keyword_end" only for 1.9.1
marcux has joined #ruby
m8 has quit [Ping timeout: 276 seconds]
v0n has quit [Ping timeout: 250 seconds]
<julianxk> class Foo; end; Foo::ARGV => "warning: toplevel constant ARGV referenced by Foo::ARGV" what is the thinking behind this warning? what is the problem? what does Ruby mean by top-level constants? don't all constants live in some object? ARGV lives in Object doesn't it? Any thoughts?
* apeiros_ thinks TTilus is already fully in the game of pulling stuff out of the nose, and therefore leaves that noble task up to him :D
markalanevans has joined #ruby
<TTilus> Syntax OK for 1.8.7
yalue has quit [Quit: Leaving]
Giorgio has quit [Remote host closed the connection]
tobor_one has quit [Quit: tobor_one]
<apeiros_> julianxk: it means that there is no Foo::ARGV
<apeiros_> julianxk: but that ruby will give assume that you want ::ARGV and gives you that.
c0rn has joined #ruby
flip_dig_ has joined #ruby
flip_dig_ is now known as flip_digits
carlyle has quit [Ping timeout: 245 seconds]
<apeiros_> (technicalities are slightly different, but that's the gist of it)
jdunck has quit [Quit: Computer has gone to sleep.]
carlyle has joined #ruby
<julianxk> apeiros_: it seems to be this is normal operation for constant lookup - constants can be looked up through subclasses, eg "class Bar; X = 14; end; class Baz < Bar; end; Baz::X", so why is ARGV given a special warning?
<apeiros_> it's not ARGV being special
<apeiros_> try Array::Array
<apeiros_> or Array::String::Object::Hash
pygmael has joined #ruby
<TTilus> Trudko: what ruby is it that says "syntax error, unexpected kEND, expecting $end" for that player.rb?
<julianxk> apeiros_: yeah, i don't mean ARGV is special, why are these constants, defined in Object, treated different to my constant X in the second example? there's no semantic difference is there?
<apeiros_> julianxk: because you fully qualify it
<apeiros_> and there's nothing there.
<apeiros_> so you either screwed up or don't understand constants. which is why ruby warns you.
Atrophius has joined #ruby
<julianxk> apeiros_: but i get no warning when I fully qualify in the example "class Bar; X = 14; end; class Baz < Bar; end; Baz::X"
<lectrick> What is the best way to ask, "do any of my superclasses respond_to this method?"
lsoa has joined #ruby
<lectrick> or ancestors, rather
<apeiros_> lectrick: superclass.method_defined?
<lsoa> gentlemen, any recommended reading on ruby C extensions?
<lectrick> apeiros_: would that return true if the superclass' superclass defined the method?
<apeiros_> since it checks ancestry by default too
<apeiros_> lectrick: docs :-p
aaronmcadam has joined #ruby
<lectrick> apeiros_: on it, ty
hbpoison has joined #ruby
tenmilestereo has joined #ruby
kpshek has quit []
ebobby has quit [Ping timeout: 272 seconds]
miskander has joined #ruby
carlyle has quit [Read error: Connection reset by peer]
m8 has joined #ruby
pdamer has quit [Quit: pdamer]
jdunck has joined #ruby
zodiak has quit [Remote host closed the connection]
stkowski has quit [Quit: stkowski]
pygmael has quit [Client Quit]
mark_locklear has quit [Ping timeout: 255 seconds]
kenneth has joined #ruby
dankest has quit [Quit: Leaving...]
poikon has joined #ruby
<kenneth> hey, is there a way to wrap a string with an IO object?
<lectrick> apeiros_: close but no cigar- i want to test whether the method is defined on any ancestors, basically. superclass doesn't include methods from modules
<Hanmac> lsoa: do you want to read C exts or do you want to write C exts?
<Hanmac> kenneth: stringIO ?
carlyle has joined #ruby
<apeiros_> lectrick: wrong
pygmael has joined #ruby
<apeiros_> >> class Z < Array; end; Z.superclass.method_defined?(:any?)
<eval-in> apeiros_ => true (http://eval.in/12041)
<lectrick> apeiros_: basically I want a "super" that will just return nil instead of raising
<apeiros_> >> Array.instance_method(:any?)
<eval-in> apeiros_ => #<UnboundMethod: Array(Enumerable)#any?> (http://eval.in/12042)
<kenneth> Hanmac: oh… right
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
blacktulip has quit [Remote host closed the connection]
<apeiros_> unless you mean modules in the current class. in that case your question was wrongly worded :-p
<lectrick> apeiros_: I want something like a "super if defined_in_super?" sort of call
<lectrick> apeiros_: It may have been poorly worded :)
<Trudko> TTilus: what do you mean?
<apeiros_> super if defined? super
havenwood has joined #ruby
tommyvyo has quit [Quit:]
kpshek has joined #ruby
<TTilus> Trudko: ruby --version
<apeiros_> and yes, that actually works. I use that somewhere.
<lectrick> apeiros_: oh nice
<apeiros_> (I have no idea anymore where I do)
<julianxk> apeiros_: thanks for your help - but I'm pretty sure you're wrong on this - constant lookup works just fine though a subclass, and it actually looks like for some reason in 1.8.0 they specifically added this warning just for constants defined in Object. I've got no idea why they did this though
<apeiros_> lectrick: next time, maybe tell what problem you try to solve instead of asking how to fix your "solution" :-p
<Hanmac> >> class E; def abc; end; end; class A < E; alias xyz abc;end; A.instance_method(:xyz)
<eval-in> Hanmac => #<UnboundMethod: A#abc> (http://eval.in/12043)
<lsoa> Hanmac: write C exts
<apeiros_> lectrick: however, it's always a good idea to present your incomplete/partial solution along with it, if only to show that you tried yourself.
_jc has joined #ruby
<lectrick> apeiros_: sigh, sometimes phrasing the question properly is difficult due to not knowing the answer lol
<lectrick> apeiros_: "super rescue someotherval" was the best I had but I didn't like that
nomenkun has quit [Remote host closed the connection]
tcstar has quit [Ping timeout: 245 seconds]
<apeiros_> lectrick: well, you wanted to call the super method if present - and in that the question lies already.
<Hanmac> lsoa i write C(++) exts you can look at this code: https://github.com/Hanmac/rwx
jonahR has joined #ruby
sam113101 has quit []
<apeiros_> julianxk: I didn't say constant lookup wouldn't work through subclasses.
<Trudko> TTilus: ruby 1.8.7
<apeiros_> julianxk: I said it's silly to use Array::Array instead of plain Array, and indicative of you doing something wrong, and that's why ruby warns you.
Morkel has quit [Quit: Morkel]
<apeiros_> don't put words into my mouth I didn't say.
<lewix> julianxk: but why not add the warning
tommyvyo has joined #ruby
<TTilus> Trudko: ruby 1.8.7 (2011-06-30 patchlevel 352) says "Syntax OK"
<apeiros_> julianxk: or do you have any good reason to use Foo::ARGV over ARGV?
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<lsoa> Hanmac: that main.cpp is clearer than the explanations I found so far
pygmael has quit [Quit: pygmael]
<julianxk> apeiros_: why anyone would want to do it is irrelevant if it's valid semantically. you said when it looks up Foo::ARGV there's nothing there, but constant lookup semantics say that it is found via the superclass
<lsoa> if only I had searched ruby-doc first, instead of googling ruby C extensions
kevinfagan has quit [Quit: Leaving...]
clooth has quit [Quit: clooth]
<lsoa> the docs are reasonably good as well
<Hanmac> lsoa, you mean more clean than the other *.cpp files? :P
dankest has joined #ruby
<apeiros_> julianxk: you wanted to know why, I told you why. If you now refuse it, well, duh. end of discussion I'd say, there's no point.
<TTilus> julianxk: well, it _does_ find Foo::ARGV, it only _warns_ you
<apeiros_> ^
<TTilus> julianxk: and imo theres pretty valid reason to warn
<julianxk> ok, but still why does it warn only for some arbitrary constants - those defined in Object?
<julianxk> if it's a valid warning, why not for any constant found through a superclass?
Spooner has joined #ruby
Virunga has joined #ruby
tommyvyo has quit [Client Quit]
<TTilus> julianxk: Object happens to be the main level, it is not "arbitrary" by any standard i can come up with
ferdev has joined #ruby
adamjleonard has joined #ruby
ner0x has quit [Quit: Leaving]
poikon has quit [Read error: Connection reset by peer]
<apeiros_> because "why anyone would do it" *IS* relevant
<apeiros_> one thing makes sense, the other doesn't.
poikon has joined #ruby
<TTilus> julianxk: if you explicitly reach "global" constant via subclass, theres pretty damn good chance it was not what you inteded
<lsoa> Hanmac: no, cleaner than the first hits on google
poikon has quit [Remote host closed the connection]
<lsoa> Hanmac: I read fast, but not THAT fast :D
<julianxk> TTilus: but you're using a concept in your argument that doesn't exist in Ruby - there are no global constants. there's absolutely no semantic difference between Object::ARGV and Foo::Bar, but the interpreter is inventing a difference with this warning
carlyle has quit [Remote host closed the connection]
<TTilus> julianxk: that's why i said "global" not global
<TTilus> julianxk: theres importat practical difference between Object and Foo
locriani has quit [Remote host closed the connection]
fugetsu has joined #ruby
<Hanmac> lsoa if you try to understand the code, macro_attr is an combined constuct of multible C macros that generates attr_accessor methods for me ... _self is a macro defined per file that unwraps the self object, and wrap/unwrap are template and overloaded functions that does the C++ <-> Ruby for you (with addional features)
<julianxk> TTilus: there are no operational semantic difference at all
hybris has quit [Quit: hybris]
fugetsu has quit [Client Quit]
<DrShoggoth> I'm having an ssl issue: http://pastebin.com/G19xmxSR
atyz has quit [Ping timeout: 272 seconds]
<TTilus> julianxk: ...and thats why they both work the same way
kofno has quit [Remote host closed the connection]
fugetsu has joined #ruby
locriani has joined #ruby
idkazuma has joined #ruby
<TTilus> julianxk: the practical difference makes the warning userfull
<apeiros_> yes, there is an operational difference. while Object::ARGV is the same as ::ARGV, Foo::ARGV isn't. Object is the root namespace (toplevel), Foo isn't.
dmiller has quit [Ping timeout: 264 seconds]
<apeiros_> and that's also why you don't get a warning for Object::ARGV
<TTilus> apeiros_: well, yes, you are right as allways, Object being toplevel is operational difference ... too
<apeiros_> in fact, you won't get a warning for ::Object::Object::Object::Object::Object::ARGV either.
<julianxk> but that's an operational semantic property of the :: operator, which isn't involved in an evaluation of the semantics of Object::ARGV and Foo::ARGV
<apeiros_> julianxk: are you intentionally making up things in order to prove that your question has no answer?
alexim has joined #ruby
<TTilus> the warning really boils down to the "why anyone would do it"
<apeiros_> TTilus: noooo! that's irrelevant!
dankest has quit [Quit: Leaving...]
adamjleonard has quit [Quit: Leaving...]
* apeiros_ walks off, could as well talk to walls…
takeru has joined #ruby
<julianxk> apeiros_: i don't think i've made anything up - am i wrong about some semantics of ruby?
mpfundstein has quit [Remote host closed the connection]
hydrozen has joined #ruby
<TTilus> apeiros_: =D
<julianxk> apeiros_: look i'm not trying to be an ass, i'm just trying to think through the reason for the warning, and what it was based on
<julianxk> and the answer seems to be idiom, rather than logic
<apeiros_> 23:16 apeiros_: because "why anyone would do it" *IS* relevant
Davey has quit [Quit: Computer has gone to sleep.]
<julianxk> and i guess idiom is a fine reason in some sense
<aaronmcadam> anyone know of any gems I can use to test my code against GitHub's style guide?
<Hanmac> beware, this is valid ruby and it does not do an warning :P "Array ::ARGV"
fugetsu has quit [Quit: WeeChat 0.4.0]
<bean__> >> p Array ::ARGV
<eval-in> bean__ => []
fugetsu has joined #ruby
adamjleonard has joined #ruby
<bean__> you sir are correct
<banisterfiend> julianxk: same reason ruby warns you if you define a variable but dont use it
<apeiros_> Hanmac: that's Kernel#Array, though
<lsoa> Hanmac: I'll study your ways :D thanks for sharing that code
<banisterfiend> "you probably didnt mean to do that"
<apeiros_> not Kernel::Array
bricker_ has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
maxmanders has quit [Ping timeout: 252 seconds]
francisfish has joined #ruby
takeru has quit [Ping timeout: 245 seconds]
ebobby has joined #ruby
<Hanmac> lsoa its not finish yet, and i may need to rewrite the way it does wrap and unwrap wxEventObjects to make it more safe, but its better than swig shitted code
IceDragon has joined #ruby
fugetsu has quit [Client Quit]
bricker has quit [Ping timeout: 255 seconds]
maxmanders has joined #ruby
adkron_ has joined #ruby
adkron__ has joined #ruby
horofox has quit [Quit: horofox]
tommyvyo has joined #ruby
nkr has quit [Quit: Linkinus - http://linkinus.com]
carlyle has joined #ruby
<lewix> banisterfiend: 17:31 banister`sleep: lewix: the strangest of all though, is this: A = 10; module M; A; end #=> 10 <--- this shouldn't work. why not if module M is mixed in Object
<lsoa> Hanmac: it helped a lot, really.
fugetsu has joined #ruby
<banisterfiend> lewix: it's not mixed in Object into anything in that example
<lsoa> well, enough work for today, see you later
<banisterfiend> lewix: it's not mixed into anything in that example*
lsoa has quit [Quit: leaving]
<Hanmac> lewix it works because M is an Object
<banisterfiend> Hanmac: no
bricker_ is now known as bricker
<banisterfiend> Hanmac: it works because ruby makes an exception for modules
thomas` has quit [Ping timeout: 252 seconds]
<lewix> banisterfiend: Hanmac
<lewix> :
<lewix> Ithat's what i thought Hanmac , I don't understand banisterfiend explanation
<banisterfiend> lewix: consider BasicObject
<banisterfiend> BasicObject is an Object yet it can't access top-level constants
gabrielrotbart has joined #ruby
<banisterfiend> modules are objects too, yet they can, it's because ruby makes an exception
idkazuma has quit [Remote host closed the connection]
<banisterfiend> you can actually find the exact place in the C source code where it makes the exception
_jc has quit [Quit: Computer has gone to sleep.]
nfk has quit [Quit: yawn]
<whitequark> banisterfiend: why should it require an exception?
<whitequark> >> module M; Module.nesting; end
<eval-in> whitequark => [M] (http://eval.in/12045)
<banisterfiend> because it doesn't subclass Object
<whitequark> banisterfiend: but it's in cref
yekta has quit [Quit: yekta]
<banisterfiend> whitequark: hwat did Module.nesting just tell you? :)
<whitequark> so it will be found while searching lexical scoping
ebobby has quit [Ping timeout: 245 seconds]
<whitequark> banisterfiend: cref?
bonhoeffer has quit [Quit: bonhoeffer]
thomas` has joined #ruby
<banisterfiend> whitequark: right, and it didnt have Object in it
jbueza has joined #ruby
kristofers has quit [Ping timeout: 245 seconds]
<lewix> banisterfiend: how about ruby makes an exception for BasicObject
<whitequark> banisterfiend: oh. right.
<whitequark> banisterfiend: why the fuck is it this way
<whitequark> that is insane
Ontolog has quit [Remote host closed the connection]
squidBits is now known as yourmom
Ontolog has joined #ruby
dawkirst has quit [Ping timeout: 260 seconds]
<banisterfiend> lewix: not an exception for BasicObject, rightly BasicObject can't access toplevel constants
<banisterfiend> and the reason it can't is because it doesnt sublcass Object
yourmom is now known as Guest98070
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest98070 is now known as squidBits
robbyoconnor has joined #ruby
reset has joined #ruby
<banisterfiend> but modules dont subclass Object either yet they cant access toplevel constants, like i said you can find the line in the MRI source where it makes the exception
<whitequark> banisterfiend: if there had to be an exception it should've been BasicObject
<banisterfiend> it has some comment like "try again from Object if it's a module" or something
idkazuma has joined #ruby
ebobby has joined #ruby
<whitequark> banisterfiend: so that Object would always be in cref
miskander has quit [Quit: miskander]
phantasm66 has quit [Quit: *sleeeep….]
<whitequark> actually I don't really understand why shouldn't BasicObject be able to access toplevel constants
Stilo has joined #ruby
<apeiros_> whitequark: enable const_missing
_veer has quit [Ping timeout: 245 seconds]
j^2 has quit [Quit: for i in `/names` ; do adios $i; done]
cyberflux has joined #ruby
workmad3 has joined #ruby
<apeiros_> and you can always use ::Foo to access toplevel constants
<whitequark> apeiros_: const_missing, right
DrShoggoth has quit [Ping timeout: 256 seconds]
julianxk has quit [Quit: Page closed]
bonhoeffer has joined #ruby
<banisterfiend> lewix: sorry, should have been "but modules dont subclass Object either yet they *can* access toplevel constants,"
<whitequark> >> class A;end; class B<A;Module.nesting;end
<eval-in> whitequark => [B] (http://eval.in/12046)
<whitequark> >> class A;end; class B<A;end; class<<B;self.ancestors;end
<eval-in> whitequark => [Class, Module, Object, Kernel, BasicObject] (http://eval.in/12047)
DoctorWedgeworth has quit [Remote host closed the connection]
<banisterfiend> i dont see the point of Kernel
<banisterfiend> im sure i did once, but i've forgotten it now :)
Kuifje has quit [Ping timeout: 272 seconds]
<whitequark> banisterfiend: so that you could override its methods by defining smth on Object and then calling super
<whitequark> *override and reuse
robbyoconnor has quit [Ping timeout: 252 seconds]
<whitequark> a poor man's prepend
axl_ has quit [Quit: axl_]
<banisterfiend> whitequark: yeah that makes sense
<banisterfiend> cool
Criztian has quit [Remote host closed the connection]
<lectrick> Hanmac: UberNerdGirl (missing, sigh), I wrote this to answer the earlier question: https://gist.github.com/pmarreck/5103911
emocakes has quit [Quit: emocakes]
lethjakman has quit [Quit: WeeChat 0.3.9]
dawkirst has joined #ruby
tvw has quit []
<lewix> banisterfiend: ok. I'll revisit all that later =)
flip_digits has quit [Quit: Computer has gone to sleep.]
Bry8Star_ has joined #ruby
enroxorz has joined #ruby
jdunck has quit [Ping timeout: 252 seconds]
bean__ has quit [Quit: Computer has gone to sleep.]
hasimo has joined #ruby
rakl has quit [Quit: sleeping]
agjacome has left #ruby [#ruby]
Bry8Star has quit [Ping timeout: 276 seconds]
jdunck has joined #ruby
hydrozen has quit [Quit: Computer has gone to sleep.]
jerius has quit []
araujo has quit [Ping timeout: 252 seconds]
dawkirst has quit [Ping timeout: 264 seconds]
Proshot has quit [Quit: Leaving]
kpshek has quit []
alanp_ has joined #ruby
wrench has left #ruby [#ruby]
jonahR has quit [Quit: jonahR]
zigidias has quit [Ping timeout: 260 seconds]
apeiros_ has quit [Remote host closed the connection]
<Spooner> lectrick, Want me to pass that link on to UberNerdGirl?
<lectrick> Spooner: Sure, thanks!
pygmael has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
pygmael has quit [Client Quit]
<lectrick> Spooner: I had the tab/file open and got distracted by work but I thought it a common enough use case to bang some code out for, for fun
<Spooner> lectrick, Emailed.
<lectrick> Spooner: thank you sir
alanp has quit [Disconnected by services]
alanp_ is now known as alanp
asdfqwer has quit []
zigidias has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
enroxorz is now known as LocutusOfBorg
yekta has joined #ruby
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
aedornm has joined #ruby
vierja has joined #ruby
fugetsu has quit [Quit: WeeChat 0.4.0]
adkron__ has quit [Ping timeout: 255 seconds]
adkron_ has quit [Ping timeout: 255 seconds]
jjbohn has quit [Quit: Leaving...]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
nmabry has quit [Quit: nmabry]
bluOxigen has quit [Ping timeout: 260 seconds]
tealmage has joined #ruby
adkron_ has joined #ruby
danneu has joined #ruby
tenmilestereo has quit [Quit: Leaving]
samphippen has joined #ruby
dawkirst has joined #ruby
zeade has quit [Quit: Leaving.]
danneu has quit [Client Quit]
shevy has quit [Ping timeout: 245 seconds]
solidoodlesuppor has quit [Remote host closed the connection]
adkron__ has joined #ruby
__Big0__ has quit [Remote host closed the connection]
<Spooner> lectrick, And here is a hideous one-liner version (which, admittedly, is different because it is not in-place).
Davey has joined #ruby
<lectrick> Spooner: Love it. Yeah, mine should be a ! method since it's in-place, eh?
<Spooner> Only if there is also a non-inplace version.
axhlf has quit [Remote host closed the connection]
<aedornm> I've been promoted to electrical engineer. And by promoted, I really mean "hey, we need these 10 things built into this case, and we saw you use some solder at some point in time! Job's yours!"
<splud> beh. have an array ["bssid", "2455", "-64", "string", "name"]
swoosh has joined #ruby
<splud> (actually, an array of arrays, but I'm iterating)
_nitti has quit [Remote host closed the connection]
zeade has joined #ruby
CVirus has joined #ruby
<CVirus> What's the difference between gem 'awesome_print' and require 'awesome_print'
<splud> a[2].to_int SHOULD be -64, right?
swoosh has quit [Client Quit]
<aedornm> splud: a[2].to_i should be -64, yes.
zeade has quit [Client Quit]
jrajav has joined #ruby
sam113101 has joined #ruby
dawkirst has quit [Ping timeout: 260 seconds]
<splud> I get "undefined method `to_int' for "-64":String"
<Spooner> splud, to_i is quite different to to_int
<splud> after using it, I see that - it _works_ <g>
breakingthings has quit []
jtharris has quit [Quit: WeeChat 0.4.0]
<eindoofus> hi, I'm slightly confused about this code from "The Well-Grounded Rubyist": https://gist.github.com/anonymous/5104173
<eindoofus> He describes the class as keeping track of all "persons" but how is that possible? Does the constant "PEOPLE" act as a class variable? If so, should it be written as "@@PEOPLE" ?
rakl has joined #ruby
<Spooner> to_int and to_str and to_float are only for objects that can be automatically type-cast into those types (For example, MyObject has to_int defined on it, you can write "MyObject.new + 2" and it will be happy with it.
kenneth has quit [Ping timeout: 260 seconds]
<Spooner> With to_str, you can write MyObject.new + "fish" and it will work....etc, etc.
anderse has quit [Quit: anderse]
vipjun has quit [Ping timeout: 245 seconds]
Vert has joined #ruby
<eindoofus> Is a constant declared at the class level treated like a class variable?: https://gist.github.com/anonymous/5104173
<Spooner> eindoofus, PEOPLE is a constant, but that just means it can't be set to another object. Nothing stops that Array being altered though.
nari has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
adkron has quit [Ping timeout: 245 seconds]
<Spooner> I don't like that code. It should really be using a class instance variable (rather than a constant or a @@classvar).
<eindoofus> Spooner, but how accessible is it? Can instance methods use it, class methods, both?
zz_Inoperable has quit [Quit: ZNC - http://znc.in]
sam113101 has quit []
<Spooner> Both can.
zz_Inoperable has joined #ruby
<eindoofus> is it treated like a @@classvar?
<Spooner> No, it is treated just like a constant because that is what it is.
jekotia has joined #ruby
luckyruby has joined #ruby
<Spooner> It can be overridden in inherited classes, for example, which a @@classvar isn't.
mercwithamouth has quit [Ping timeout: 240 seconds]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<eindoofus> would @@classvar be accessible by instance methods, class methods, or both?
lewix has quit [Remote host closed the connection]
<Spooner> And you can't read it from within its parent class.
<Spooner> instance methods, class methods and my_person::PEOPLE and Person::PEOPLE
dEPy has quit []
kenneth has joined #ruby
<Spooner> Very different to a @@class_var
<eindoofus> what would be the case for a @@class_var ?
shevy has joined #ruby
<Spooner> No-one uses @@ any more. We use "class instance variables".
dmiller has joined #ruby
walbert has joined #ruby
Takehiro has joined #ruby
<Spooner> However, a class instance variable is not directly accessible from outside the class, since it is accessed via accessors rather than directly like a constant.
Takehiro has quit [Read error: Connection reset by peer]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
theRoUS has quit [Ping timeout: 245 seconds]
zz_Inoperable is now known as Inoperable
<Quadlex> Anyone have experience with Travis?
<Quadlex> I just want to run two builds with two gemfiles but it's not... doing that.
ad_AA has joined #ruby
rgbdev has left #ruby [#ruby]
cflux has joined #ruby
apeiros_ has joined #ruby
<eindoofus> Spooner, are constants almost like global variables, except that they shouldn't be changed?
dawkirst has joined #ruby
sambio_ has joined #ruby
dmiller has quit [Ping timeout: 250 seconds]
felipe has quit [Ping timeout: 248 seconds]
kstephens_ has joined #ruby
lupine has quit [Ping timeout: 264 seconds]
XVirus has joined #ruby
adkron has joined #ruby
<Spooner> Not really. Globals only exist in the main scope. A constant is accessible from whatever scope it is created in (for example, within that class).
Mch1 has joined #ruby
wildcard1 has joined #ruby
emocakes has joined #ruby
tommyvyo_ has joined #ruby
<Spooner> Admittedly, a constant defined in the main scope is pretty much the same a global (except giving a warning on changing it, of course).
jso_ has joined #ruby
aaronmcadam has quit [Quit: Linkinus - http://linkinus.com]
cyberflux has quit [Read error: Connection reset by peer]
jso has quit [Ping timeout: 252 seconds]
kstephens has quit [Ping timeout: 252 seconds]
wildcard0 has quit [Ping timeout: 252 seconds]
tommyvyo has quit [Ping timeout: 252 seconds]
Mchl has quit [Quit: ZNC - http://znc.sourceforge.net]
naquad has quit [Ping timeout: 252 seconds]
nari has quit [Ping timeout: 252 seconds]
ndngvr` has quit [Ping timeout: 252 seconds]
kstephens_ is now known as kstephens
Mch1 is now known as Mchl
walbert has quit [Read error: Operation timed out]
sambio has quit [Ping timeout: 252 seconds]
tommyvyo_ is now known as tommyvyo
walbert has joined #ruby
vereteran has joined #ruby
nari has joined #ruby
yekta has quit [Quit: yekta]
<lectrick> Spooner: I added a clever recursive version which cleans up the state maintenance quite a bit (by embedding it in the stack of course): https://gist.github.com/pmarreck/5103911
<eindoofus> There is nothing like a constant in C# or Java, is there? I don't remember anything that is accessible by both static and instance methods.
maxmanders has quit [Quit: Computer has gone to sleep.]
crankycoder has quit [Ping timeout: 276 seconds]
lupine has joined #ruby
CVirus has quit [Ping timeout: 252 seconds]
<eindoofus> Then again, my memory is fuzzy. I'm going to get back to this book. Thanks for you help
frem has quit [Ping timeout: 240 seconds]
garbagecollectio has joined #ruby
<garbagecollectio> is this valid
ad_AA has quit [Ping timeout: 260 seconds]
<garbagecollectio> = form_for @package, :url => approve_note_note_path(@package), html: {class: 'form-continue'}, do |f|
jgrevich has quit [Quit: jgrevich]
francisfish has quit [Remote host closed the connection]
<garbagecollectio> is there supposed to be a comma there
<Spooner> eindoofus, There is const in Java. Think also in C# is something similar.
<garbagecollectio> , do |F|
stkowski has joined #ruby
walbert1 has joined #ruby
<Spooner> garbagecollectio, It is valid in Ruby 1.8 to have a trailing comma after the last argument, but not in 1.9.
<garbagecollectio> Spooner: so this would be
<garbagecollectio> correct
<garbagecollectio> = form_for @package, :url => approve_note_note_path(@package), html: {class: 'form-continue'} do |f|
ad_AA has joined #ruby
<Spooner> Yes, that is correct in both versions.
walbert has quit [Read error: Operation timed out]
jlast has quit [Remote host closed the connection]
<Spooner> Note though, that you are mixing Ruby 1.8 and 1.9 hash formatting in that.
<Spooner> Which works, but is a bit ugly :D
walbert1 has quit [Read error: Connection reset by peer]
jacky is now known as jalcine
stkowski has quit [Client Quit]
stkowski has joined #ruby
arya has quit [Ping timeout: 248 seconds]
walbert has joined #ruby
mockra_ has joined #ruby
walbert has quit [Client Quit]
<Spooner> That is, for consistency, it should be " url: ", not " :url => "
jstultz has joined #ruby
<eindoofus> Spooner, so as new "Person"s are created, does each get a constant "PEOPLE" along with the class object? If not, then does "PEOPLE" just live in the class object? Are there multiple "PERSON" arrays existing after new instances are created?
mattbl has joined #ruby
apeiros_ has quit [Ping timeout: 245 seconds]
walbert has joined #ruby
mockra has quit [Ping timeout: 255 seconds]
admitted_limited has joined #ruby
kirun has quit [Quit: Client exiting]
seanmccann has joined #ruby
arya has joined #ruby
dpn` has quit [Excess Flood]
<eindoofus> You said in the scope, would that mean that a constant declared in an instance variable can multiply with instances? and a constant declared only in the class exists only in the class object?
dpn` has joined #ruby
<jstultz> i'm seeing some strange behavior with threads and IO.pipe in 1.9.2 that i can't figure out, in this code: https://gist.github.com/jstultz/3e33837f6f1c120dcff8
<jstultz> its hanging on read_thread.value
<Spooner> lectrick, I realised there was a nicer way than both our methods: https://gist.github.com/Spooner/5104066
workmad3 has quit [Ping timeout: 256 seconds]
dmiller has joined #ruby
<jstultz> immediate suspicion of course is that rd.read is hanging because the write half of the pipe is still open, but... it's not
<Spooner> eindoofus, No, PEOPLE is on the class.
<jstultz> (lsof verifies that it is, in fact, closed)
mercwithamouth has joined #ruby
<eindoofus> thanks Spooner
<Spooner> eindoofus, Every Person ever created will be in Person::PEOPLE in the order of their creation.
<lectrick> Spooner: range stepping. brilliant. :)
<Spooner> eindoofus, Instances can't have constants on them (well, you could put them on their metaclass, but that is something different :D).
arya has quit [Client Quit]
apok has joined #ruby
SCommette has quit [Quit: SCommette]
spider-mario has quit [Read error: Connection reset by peer]
<eindoofus> ahhh. That simplifies things a bit
garbagecollectio has quit [Quit: garbagecollectio]
adkron has quit [Ping timeout: 276 seconds]
malte_ has joined #ruby
R_Macy_ has joined #ruby
<Spooner> lectrick, To be consistent with other ! methods, I wonder if it should return nil if the array size is <= skip? (that is, no change will occur).
emocakes has quit [Quit: emocakes]
zeade has joined #ruby
chipotle_ has joined #ruby
otherj has quit []
<lectrick> Spooner: Yeah, possibly
<lectrick> Spooner: Also there's only one solution now: Benchmarking those motherf***ers
mattbl has quit [Quit: This computer has gone to sleep]
<Spooner> You feel free to go to town with benching them :D
<lectrick> That could actually be a cool Ruby site- Come up with an algorithm for a simple problem, and the site scores it based on runtime and resource utilizaiton
bobdobbs has joined #ruby
R_Macy has quit [Ping timeout: 256 seconds]
<Spooner> It exists. rubygame.org
<Spooner> Ranks both on number of characters and run-time, I think.
R_Macy_ is now known as R_Macy
<lectrick> Spooner: What about GC thrashing? :)
<Spooner> Nope, not rubygame.org - I mean http://www.therubygame.com/ which is currently deeed.
<lectrick> awww.
<Spooner> lectrick, Thrashing the GC would use up time.
freeayu has joined #ruby
unlimiter has joined #ruby
R_Macy has quit [Client Quit]
<lectrick> Spooner: You can stall GC and consume resources without using up time, no? Cheating is one GC.disable away :)
<Spooner> lectrick, It ends up with stuff like this: https://gist.github.com/zetter/1712932
adkron__ has quit [Ping timeout: 245 seconds]
<Spooner> Yes, people did try to cheat in many ways.
mercwithamouth has quit [Ping timeout: 252 seconds]
iamjarvo has quit [Quit: Leaving.]
adkron_ has quit [Ping timeout: 276 seconds]
<lectrick> Spooner re: arabic-from-roman function: But that is amazing! :)
<Spooner> Scary stuff indeed!