AndChat| has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 245 seconds]
AndChat| has joined #ruby
sixteneighty has joined #ruby
Russell^^ has joined #ruby
arkham has quit [Quit: WeeChat 0.3.8]
Banistergalaxy has quit [Ping timeout: 244 seconds]
arkham has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has joined #ruby
lggr has joined #ruby
emsilva has quit [Ping timeout: 260 seconds]
Hanmac has quit [Remote host closed the connection]
kjellski_ has joined #ruby
jimeh4 has joined #ruby
cantonic_ has joined #ruby
Smoth has joined #ruby
vlad_starkov has joined #ruby
jgrevich has quit [Quit: jgrevich]
AndChat| has quit [Ping timeout: 244 seconds]
bsilwal1 has joined #ruby
triptec has joined #ruby
bsilwal1 has left #ruby [#ruby]
kjellski has quit [Ping timeout: 246 seconds]
cantonic has quit [Ping timeout: 252 seconds]
cantonic_ is now known as cantonic
bsilwal has quit [Ping timeout: 244 seconds]
baphled has joined #ruby
jimeh4 has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Ping timeout: 245 seconds]
DrShoggoth has quit [Ping timeout: 245 seconds]
Hamed-R has joined #ruby
Hamed-R has quit [Changing host]
Hamed-R has joined #ruby
chambwez has joined #ruby
<chambwez>
Can anyone help out with a newbie test/minitest problem I'm having?
lggr has quit [Ping timeout: 246 seconds]
iCEAGE has quit [Ping timeout: 245 seconds]
seoaqua has joined #ruby
Hanmac has joined #ruby
lggr has joined #ruby
arietis has joined #ruby
<JonnieCache>
chambwez: im not a minitest person but whats the problem
icole has joined #ruby
<A124>
chambwez: No, unless you tell us what.
<chambwez>
I'm having problems getting any tests to run, so to check that out I produced a very basic test (it's a silly example just to highlight the issue I'm having).
<chambwez>
setup isn't getting called and neither are the methods
<JonnieCache>
hmmm i dont know enough about minitest to help you im afraid
<JonnieCache>
i was thinking it might have been a more general testing question
JarJar has quit [Quit: Leaving]
<chambwez>
No worries, mate. Thanks for looking. I'm sure it's something daft on my part.
<JonnieCache>
check if theres a minitest irc channel
<JonnieCache>
probably is
<chambwez>
good call
lggr has quit [Ping timeout: 246 seconds]
fteem has joined #ruby
roadt has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
icole has quit [Ping timeout: 240 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
lggr has joined #ruby
reset has quit [Quit: Leaving...]
<atmosx>
ello people
Eplemosen has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
pskosinski has joined #ruby
crodas has quit [Ping timeout: 245 seconds]
Criztian has quit [Remote host closed the connection]
samphippen has joined #ruby
<chambwez>
no minitest irc chan by the looks of things. will wait until everyone wakes up ;)
lggr has joined #ruby
gvz has joined #ruby
Mon_Ouie has quit [Ping timeout: 246 seconds]
<arkham>
chambwez: probably the methods must begin with "test_"?
<arkham>
never used minitest though, so I may be wrong
Mon_Ouie has joined #ruby
<chambwez>
arg! <3 thanks ma
<chambwez>
man*
<chambwez>
yeah, that's got it - what a newb
<arkham>
don't worry, everybody has to begin somewhere
Jork1 has quit [Read error: Connection reset by peer]
<chambwez>
that we do, cheers again man
Jork1 has joined #ruby
workmad3 has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
darthdeus has joined #ruby
thunderstrike has joined #ruby
margle has joined #ruby
lggr has joined #ruby
tk_ has quit [Ping timeout: 240 seconds]
Takehiro has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 260 seconds]
Takehiro has joined #ruby
<bobbbo>
if I want the "top" x records from a table in rails am I best off just passing in the SQL for SELECT …. ORDER BY DESC LIMIT x? Or is there some sort of magic/indexing tha allows me to do this in a less horrible way?
Bosox20051 has quit [Ping timeout: 244 seconds]
pskosinski has quit [Remote host closed the connection]
chambwez has quit [Quit: chambwez]
<arkham>
bobbbo: Books.limit(x) ?
tk_ has joined #ruby
crodas has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
<bobbbo>
atm I'm doing Books.find(:all, :limit => 5, :order=> 'created_at desc') or similar
<bobbbo>
I guess what I really want is an order_by index if those were real ^_^
<arkham>
oh I see, are you using rails 2?
dmiller has joined #ruby
<bobbbo>
but equally .limit would work
<bobbbo>
I think I've answer my own question, thanks arkham (unless .limit does something crazy I don't know about ofcourse)
pskosinski has joined #ruby
<arkham>
bobbbo: you could write Book.limit(5).order("created_at desc")
<bobbbo>
(of course above is same as doing Books.order.limit right?
<bobbbo>
ye
<arkham>
and that thing could be a scope
<arkham>
so you just call Book.newest
* bobbbo
nods
<bobbbo>
is that the main benefit of the rails 3 way?
<arkham>
basically yes
<bobbbo>
I do love named scopes
<arkham>
the thing I find lovely is that you can take two named scopes and & them
lggr has joined #ruby
<arkham>
i.e. Book.newest & Book.sold
dmiller has quit [Ping timeout: 245 seconds]
<bobbbo>
& as in intersection?
<arkham>
and activerecord will create the sql union query for you
<arkham>
yep
<arkham>
it overrides the array & method
aces1up has quit [Remote host closed the connection]
<bobbbo>
hmm that is loverly
aces1up has joined #ruby
Pochacco has quit [Quit: Pochacco]
mikepack has quit [Remote host closed the connection]
und3f has quit [Quit: Leaving.]
<bobbbo>
I do like ruby, it does some nice things
<bobbbo>
just wish I had occasion to use it more
thunderstrike has quit [Remote host closed the connection]
<bobbbo>
and I didn't know arrays had such nice methods
<burgestrand>
arkham: rails does not override the array & method, and Book.newest is not an array, it’s a relation, which is why rails do not need to override the & method
<bobbbo>
well thanks arkham, given me some nice reading :)
<burgestrand>
ActiveRecord::Relation, to be specific :)
daniel_- has joined #ruby
LouisGB has quit []
<burgestrand>
which is why Book.newest.all & Book.sold won’t work
hiroyuki has quit [Read error: Connection reset by peer]
Bosox20051 has joined #ruby
<bobbbo>
does it make sense to ever want to go array => relation?
Aaaarg has joined #ruby
hiroyuki has joined #ruby
Aaaarg has quit [Excess Flood]
lggr has quit [Ping timeout: 245 seconds]
hiroyuki_ has joined #ruby
<arkham>
burgestrand: of cours
AdamSeabrook1 has joined #ruby
<burgestrand>
bobbbo: once you are an array, you have lost information that could make you a useful relation
<arkham>
thinking about it, the example was pretty stupid too
<arkham>
because you could have done it with Book.newest.sold
<arkham>
the & is useful when you are mixing scopes
AdamSeabrook1 has left #ruby [#ruby]
<burgestrand>
bobbbo: the relation contains information of what fields to select, what tables to merge, the ordering and all that you specify for your scope, once you turn it into an array (.all) that information is gone, because array does not contain that information
<burgestrand>
s/merge/join/
<bobbbo>
makes sense
<bobbbo>
any good examples for when you might want to & scopes?
hiroyuki has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
<burgestrand>
bobbbo: say you have an object, maybe a comment or something like that
<burgestrand>
bobbbo: the comment itself has tags, so you want to load those together with the comment, but you want the tags to appear in a specific order, and you want the tag to be enabled and whatnot
<burgestrand>
bobbbo: you could write a scope on Comment that merges with a scope from Tag, to reuse a previous scope from Tag with your new scope
seanlee has quit [Remote host closed the connection]
icole has joined #ruby
<burgestrand>
bobbbo: so, maybe, Comment.includes(:tags).merge(Tag.not_deleted)
triptec has quit [Ping timeout: 245 seconds]
fteem has quit [Ping timeout: 246 seconds]
<burgestrand>
or whatever you have it. You don’t need to merge scopes that often, but when you do it can be a nice little feature
Xeago has joined #ruby
<bobbbo>
and here the merges is analogous to the & right?
<arkham>
bobbbo: the simplest I can think of is: you have an author with many books. You want to find all the authors with at least a book, so you do Author.joins(:books).group("authors.id")
<arkham>
now you want to find the authors with at least a book that is coming out this month
<arkham>
so you do: Author.joins(:books).group("author.id") & Book.coming_out_this_month
<bobbbo>
hmm ok
hiroyuki_ has quit [Read error: Connection reset by peer]
<bobbbo>
but that will hit the database twice?
<bobbbo>
I would just do that in SQL normally
<JonnieCache>
that is doing it in sql
<bobbbo>
ohhh
<bobbbo>
ok ok
<JonnieCache>
it merges the scopes and produces new sql that covers both
hiroyuki has joined #ruby
<bobbbo>
nice
triptec has joined #ruby
<bobbbo>
so its just great syntactic sugar rather than actually doing anything different
<bobbbo>
I like it
<JonnieCache>
its great if you do it in a loop for building up queries from "advanced search" style forms
<bobbbo>
yea I can imagine
icole has quit [Ping timeout: 244 seconds]
<bobbbo>
does seem rather useful to chain things along
lggr has quit [Ping timeout: 246 seconds]
<bobbbo>
ok thanks all 3
atmosx has quit [Quit: WeeChat 0.3.8]
<bobbbo>
before I was thinking it was essentially doing it post lookup, but makes more sense if I think about it manipulating the query :)
<JonnieCache>
you can do even cleverer things if you interact with arel directly
seoaqua has quit [Ping timeout: 260 seconds]
elico has joined #ruby
thecreators has joined #ruby
lggr has joined #ruby
replore_ has joined #ruby
slainer68 has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
margle has quit [Quit: Computer has gone to sleep.]
<enricostn>
burgestrand: does that should fit for an Archlinux VPS on Linode?
burgestrand1 has joined #ruby
<enricostn>
burgestrand: rvm pkg install libyaml doesn't give me any warning about my architecture
arturaz has quit [Remote host closed the connection]
lggr has joined #ruby
k_89 has joined #ruby
elico has joined #ruby
<burgestrand1>
enricostn: it wouldn’t necessarily give you a warning (why would it? you might want to use 64bit), but if you were using ruby in 32bit and have libyaml in 64bit, ruby would be unable to load libyaml
<burgestrand1>
enricostn: it’s just a theory, I haven’t actually seen your problem before
burgestrand1 has quit [Client Quit]
burgestrand has quit [Ping timeout: 246 seconds]
bapa has quit [Ping timeout: 252 seconds]
<enricostn>
anyone using RVM on a linode VPS here? I've problems with libyaml...
lggr has quit [Ping timeout: 245 seconds]
TomJ has joined #ruby
unrar has joined #ruby
lggr has joined #ruby
Smoth has quit [Remote host closed the connection]
bapa has joined #ruby
Xeago has joined #ruby
Xeago_ has quit [Ping timeout: 260 seconds]
TomJ has quit [Quit: TomJ]
workmad3 has quit [Ping timeout: 240 seconds]
<unrar>
Hi all
lggr has quit [Ping timeout: 246 seconds]
senny has joined #ruby
hsbt_away is now known as hsbt
VegetableSpoon has joined #ruby
lggr has joined #ruby
haxrbyte has joined #ruby
bapa has quit [Ping timeout: 256 seconds]
gmg85 has quit [Quit: ChatZilla 0.9.89 [Firefox 10.0.5/20120622141109]]
snorkdude has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 244 seconds]
senny has joined #ruby
seo has joined #ruby
seo is now known as Guest91241
Guest91241 has quit [Remote host closed the connection]
lggr has joined #ruby
awestroke has joined #ruby
Guedes has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
hekin has joined #ruby
enroxorz-work has quit [Read error: Connection reset by peer]
lggr has joined #ruby
xyzodiac has joined #ruby
hekin has quit [Quit: hekin]
thunderstrike has joined #ruby
fteem has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
Takehiro has quit [Remote host closed the connection]
Eplemosen has quit [Quit: NOPE]
lggr has joined #ruby
lurraca has quit [Quit: This computer has gone to sleep]
bencaron has quit [Quit: bencaron]
waxjar has joined #ruby
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
ZubKonst_ has quit [Ping timeout: 252 seconds]
`brendan has joined #ruby
ZubKonst_ has joined #ruby
<shevy>
slow
<shevy>
slower
<shevy>
RUBY!!!
lggr has quit [Ping timeout: 245 seconds]
<shevy>
enricostn ah but you make yourself dependent on RVM. In the Gobolinux like scheme, every program is installed into a versioned directory. So that is like what RVM does, but for all programs anyway.
<shevy>
the libyaml crap is annoying though, I always have to recompile ruby, then it psych.rb picks up the new libyaml version
fantazo has quit [Remote host closed the connection]
lggr has joined #ruby
fantazo has joined #ruby
<enricostn>
shevy: ehm.. I don't follow you, what I have to do in RVM to fix that issue?
<enricostn>
sorry
verto|off is now known as verto
<shevy>
I dont think you can. You depend on RVM.
stan_man_can has quit [Quit: stan_man_can]
<enricostn>
right, but I see that other people make it to work so I think it's possible to fix it, right?
<enricostn>
thank you very much shevy and Mon_Ouie!!!
arkham has joined #ruby
aboven has joined #ruby
<enricostn>
now it's the turn for capistrano...
<waxjar>
I sort of need a way to define relationships between objects like you would in something like DataMapper, but I don't need the database side of things.
dknight has joined #ruby
<waxjar>
is there something easy that allows me to do that, or should i just man up and work with Ruby's own tools?
<shevy>
cool
Takehiro has quit [Ping timeout: 240 seconds]
<shevy>
enricostn I dont think I ever used capistrano
wallerdev has joined #ruby
<shevy>
all the web stuff scares me
<shevy>
I still use ruby .cgi scripts :(
<shevy>
I just can't get myself to use .ru files... I hate this extension name
Companion has quit [Read error: Connection reset by peer]
emmanuelux has joined #ruby
BMF has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 240 seconds]
Takehiro has joined #ruby
Guedes has quit [Ping timeout: 260 seconds]
Companion has joined #ruby
Inoperable has joined #ruby
<dknight>
while compiling ruby I am getting an error at ./configure step: ruby/version.h:2:0: warning: "RUBY_RELEASE_DATE" redefined [enabled by default]
jokar has joined #ruby
lggr has joined #ruby
fyolnish has quit [Remote host closed the connection]
fteem has quit [Remote host closed the connection]
aboven has quit [Remote host closed the connection]
nari_ has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 246 seconds]
mucker has quit [Quit: leaving]
lggr has joined #ruby
b26 has joined #ruby
gnilit has joined #ruby
`brendan has quit [Read error: Connection reset by peer]
<canton7>
I won't comment on the regex -- I'm sure there's a neater way of doing this, but can't think what it might be
dpk has quit []
<canton7>
surely something like /(.)(.?)/ might work? depends what behaviour exactly you want around punctuation, etc
lggr has joined #ruby
swarley has joined #ruby
<gnilit>
I'd like punctuation to be included, but obviously not modified.
<canton7>
it won't be modified by #upcase :P
<gnilit>
Yeah, I can't think of an upcase '.'.
<gnilit>
:P
<gnilit>
Got it!
<shevy>
hmm an upcased .
<shevy>
could look like
<gnilit>
input.gsub(/(.)(.?)/){ $1+$2.upcase}
<shevy>
'o'
<gnilit>
Brilliant, thanks a million.
<gnilit>
:D
<canton7>
shevy, heh
cwt has joined #ruby
wchun has quit [Ping timeout: 252 seconds]
<gnilit>
Bookmarked Rubular too, thanks for the link!
cwt has left #ruby [#ruby]
<fowkes>
Does anyone have any insight into what could be wrong? I'm completely new to this, so I'm stumped. The link again: http://pastebin.com/dct6SVec Thanks.
daniel_hinojosa has joined #ruby
fyolnish has quit [Ping timeout: 240 seconds]
<gnilit>
fowkes: I'd love to help, but I'm only a learner too.
<fowkes>
gnilit - Thanks. There just doesn't seem to be anyone who can really help. #debian directed me to #git and then #git sort of sent me to #ruby indirectly.
knirhs has quit [Read error: Connection reset by peer]
duder has quit [Client Quit]
sgupta has joined #ruby
jgrevich has joined #ruby
pac1 has joined #ruby
t0rc has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
maletor has joined #ruby
adeponte has quit [Remote host closed the connection]
AlbireoX has joined #ruby
workmad3 has joined #ruby
shevy has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby
wallerdev has joined #ruby
bricker has joined #ruby
<pac1>
I'm looking at a statement in Demo::Application.routes.draw, trying to figure out what each of the elements of the statement are called. match 'Say/hello' => 'say#hello' has four parts. What would you call each part?
VegetableSpoon has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ruby
tgraham has joined #ruby
fyolnish has quit [Remote host closed the connection]
shevy has joined #ruby
<havenn>
pac1: What do you mean 'four parts'? Method, String, HashRocket, String?
<havenn>
pac1: Homework?
<pac1>
no. no course, no teacher (except myself)
jonathanwallace has quit [Remote host closed the connection]
<pac1>
yes those four parts.
<pac1>
ok so match is a method of the class Demo::Application.routes.draw
<pac1>
right?
<havenn>
pac1: Hard for me to tell without seeing more. Can you post a gist of more code?
<havenn>
pac1: Either way, usually I make them public.
<Spaceghostc2c>
FOREVER
ryanf has joined #ruby
<Spaceghostc2c>
They're git repos.
<havenn>
pac1: Github is awesome, by the way.
<havenn>
pac1: Such a good place to read other's code.
<havenn>
**others'
kirun has joined #ruby
richwestcoast has joined #ruby
<pac1>
gist: 3807801
bsilwal has quit [Quit: Leaving.]
<canton7>
pac1, non-anonymous ones stay around for forever, or until you delete them
<canton7>
not sure about anonymous ones
lggr has quit [Ping timeout: 256 seconds]
<havenn>
pac1: Ahh, Rails... that took me way too long (no coffee yet)
<pac1>
ahhh Java...
tgraham is now known as tgraham|away
<pac1>
'' => '' is a dictionary?
lggr has joined #ruby
<havenn>
pac1: So best I can tell, in my hazy state, match() is a method, and it is being sent a naked hash as paraemeter
wedtm|away is now known as wedtm
<pac1>
a naked hash? no hitchcocks...
<havenn>
pac1: Yeah, a more verbose way: match({'this' => 'that'})
bobbbo has quit [Quit: bobbbo]
<canton7>
that's correct
<pac1>
ah ok so a method call doesnt require () and a hash can be naked.
<havenn>
pac1: match() is the method, 'this' is the key, => is the thingy..., and 'that' is the value.
<havenn>
pac1: Actually, in this case MUST be naked - or Ruby would think it was a block.
<pac1>
thingy... I like that.
<havenn>
pac1: {} are used for hashes and blocks, so sometimes you have to disambiguate - method arguements is only place I can think of seeing naked hashes
<pac1>
is it match that can't accept the block, or methods in general?
<havenn>
pac1: Methods in general.
bsilwal has joined #ruby
sepp2k1 has joined #ruby
<pac1>
thanks.
jrajav has quit []
<havenn>
np :)
<havenn>
Now for coffee!!
sepp2k has quit [Ping timeout: 245 seconds]
havenn has quit [Remote host closed the connection]
icole has joined #ruby
ltsstar has joined #ruby
arkham has quit [Quit: WeeChat 0.3.9]
<pac1>
Does routes.rb get called every time there's a url used, or does it set up something else that does the work?
tgraham|away is now known as tgraham
lggr has quit [Ping timeout: 255 seconds]
Guest____ has joined #ruby
baphled has quit [Ping timeout: 260 seconds]
indian has joined #ruby
Inoperable has quit [Quit: Rectified]
Guest____ has quit [Client Quit]
icole has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
punkrawkR has joined #ruby
<pac1>
Answer to Does routes.rb get called every time? No. Just when the server starts. (based on observation: print 'this' printed only once at the server start.
Jork1 has quit [Read error: Connection reset by peer]
zeromodulus has quit [Remote host closed the connection]
dpk has quit [Quit: Asleep at the keyboard.]
jrajav has joined #ruby
bobbbo has joined #ruby
lggr has joined #ruby
BdeUtra has joined #ruby
rburton- has joined #ruby
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Solnse has joined #ruby
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby
bobbbo has quit [Quit: bobbbo]
eldariof has quit []
lggr has quit [Ping timeout: 256 seconds]
uris has quit [Quit: leaving]
dimka has quit [Quit: leaving]
dimka has joined #ruby
lggr has joined #ruby
arkham has joined #ruby
swarley has quit [Ping timeout: 252 seconds]
namidark has quit [Ping timeout: 252 seconds]
lazyPower has quit [Quit: leaving]
catphish has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
JetAway has joined #ruby
CaptainJet has quit [Disconnected by services]
JetAway is now known as CaptainJet
jbw has quit [Ping timeout: 246 seconds]
namidark has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
mohamad_ has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9]
mohamad_ has quit [Client Quit]
nochamani has joined #ruby
samphippen has joined #ruby
lggr has joined #ruby
fyolnish has joined #ruby
pk1001100011 has joined #ruby
butblack has quit [Quit: butblack]
pskosinski has quit [Ping timeout: 244 seconds]
philcrissman has joined #ruby
butblack has joined #ruby
samphippen has quit [Client Quit]
msch has quit [Quit: Coyote finally caught me]
msch has joined #ruby
nochamani has left #ruby [#ruby]
workmad3 has quit [Ping timeout: 252 seconds]
conor_ireland has joined #ruby
pk1001100011 is now known as pskosinski
fbernier has quit [Read error: Connection reset by peer]
fyolnish has quit [Ping timeout: 240 seconds]
fortin has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
butblack has quit [Client Quit]
<matti>
;]
lggr has quit [Ping timeout: 244 seconds]
<fortin>
Hi folks. I'm creating my first gem following http://guides.rubygems.org/make-your-own-gem/ . All good so far, the only thing that is puzzling me is that it works only if I remove the "Hola::" prefix from the required class
mulinux has joined #ruby
adambeynon has joined #ruby
<mulinux>
is there plan for ruby conf in germany?
<mulinux>
is there any plans for a ruby conf in germany?
maletor has joined #ruby
mohamad_ has joined #ruby
chimay has quit [Quit: WeeChat 0.4.0-dev]
mohamad_ has quit [Client Quit]
butblack has joined #ruby
nochamani has joined #ruby
lggr has joined #ruby
nochamani has left #ruby [#ruby]
yoklov has quit [Quit: computer sleeping]
zii has quit [Ping timeout: 260 seconds]
kiyoura has joined #ruby
catphish has quit [Ping timeout: 246 seconds]
indian has quit [Ping timeout: 260 seconds]
butblack has quit [Quit: butblack]
catphish has joined #ruby
bsilwal1 has joined #ruby
stephenjudkins has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
<fortin>
nevermind, understood why: I was using require before the Hola class declaration
bsilwal has quit [Ping timeout: 255 seconds]
lggr has joined #ruby
rakl has joined #ruby
rburton- has quit [Quit: Leaving...]
capsule_toy has joined #ruby
thecreators has quit [Quit: thecreators]
thecreators has joined #ruby
Fretta has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
Takehiro has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
capsule_toy has quit []
F1skr has joined #ruby
arkiver has joined #ruby
Pochacco has joined #ruby
tgraham has quit [Quit: Leaving...]
burgestrand1 has joined #ruby
lggr has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
burgestrand has quit [Ping timeout: 246 seconds]
tgraham has joined #ruby
nochamani has joined #ruby
mulinux has quit [Quit: mulinux]
cakehero has joined #ruby
fredjean has joined #ruby
fredjean has quit [Client Quit]
thunders_ has joined #ruby
leprkhn has joined #ruby
gmci has quit [Quit: Computer has gone to sleep.]
Markvilla has joined #ruby
ianblenke1 has joined #ruby
Cache_Money has joined #ruby
Takehiro has joined #ruby
nochamani has left #ruby [#ruby]
kirun has quit [Ping timeout: 265 seconds]
F1skr has quit [Quit: WeeChat 0.3.9]
lggr has quit [Ping timeout: 240 seconds]
thunderstrike has quit [Ping timeout: 244 seconds]
swarley has joined #ruby
Cache_Money has left #ruby [#ruby]
jrajav has quit []
Xeago has joined #ruby
lggr has joined #ruby
ryanf has quit [Quit: broken pipes |||]
gnilit has quit [Ping timeout: 260 seconds]
ananthakumaran1 has quit [Quit: Leaving.]
lggr has quit [Ping timeout: 245 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
Pochacco has quit [Quit: Pochacco]
Takehiro has quit [Remote host closed the connection]
bsilwal1 has quit [Quit: Leaving.]
ryanf has joined #ruby
headius has joined #ruby
jbw has joined #ruby
gyre007 has quit [Quit: Leaving]
lggr has joined #ruby
xuser has left #ruby [#ruby]
<shevy>
hmmm when comes the RubyOS
kirun has joined #ruby
Nisstyre has joined #ruby
<Spaceghostc2c>
shevy: Tuesday.
<shevy>
\o/
rakl has quit [Quit: sleeping]
daniel_hinojosa has quit [Quit: Leaving.]
lggr has quit [Ping timeout: 245 seconds]
ryanf has quit [Quit: broken pipes |||]
baphled has joined #ruby
triptec has quit [Read error: Connection reset by peer]
lggr has joined #ruby
triptec has joined #ruby
rippa has quit [Ping timeout: 246 seconds]
wedtm is now known as wedtm|away
vitor-br has quit [Ping timeout: 245 seconds]
cakehero has joined #ruby
bigmcq77 has joined #ruby
fantazo has quit [Remote host closed the connection]
F1skr has joined #ruby
workmad3 has joined #ruby
Pochacco has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
yoklov has joined #ruby
jblack has quit [Ping timeout: 255 seconds]
Markvilla has joined #ruby
swarley has quit [Quit: Leaving]
swarley has joined #ruby
zeromodulus has joined #ruby
linoj has quit [Quit: linoj]
risico_ has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
notVert has joined #ruby
unrar has quit [Remote host closed the connection]
rakl has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
awestroke has quit [Remote host closed the connection]
yoklov has quit [Quit: computer sleeping]
jimeh4 has joined #ruby
cuci has joined #ruby
lggr has joined #ruby
awestroke has joined #ruby
<cuci>
hi guys! I'm trying to do the following: unless a.nil? & a.attribute != "something" do stuff. But if a is nil I get an error at the second condition. How do I avoid that?
joofsh has joined #ruby
risico_ has quit [Quit: Leaving]
<cuci>
wait....I'm stupid I need a.not nil
cuci has quit [Client Quit]
wedtm|away is now known as wedtm
linoj has joined #ruby
msch has quit [Quit: Coyote finally caught me]
msch has joined #ruby
vitor-br has joined #ruby
rakl has quit [Quit: sleeping]
zodiak has quit [Quit: Leaving]
vitor-br has quit [Max SendQ exceeded]
stephenjudkins has quit [Quit: stephenjudkins]
Takehiro has joined #ruby
yoklov has joined #ruby
vitor-br has joined #ruby
Nisstyre-laptop has joined #ruby
philcrissman has quit [Remote host closed the connection]
Jonah11_ has joined #ruby
adeponte has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
Tref has joined #ruby
wchun has joined #ruby
<Jonah11_>
Is there a shorter way to return "cd" than "abcd"[2,10] -- that is, i want to omit the 2nd parameter of the array access somehow
Vainoharhainen has joined #ruby
jasonkuhrt has joined #ruby
<shevy>
not really. "abcd"[2..-1] # => "cd"
lggr has joined #ruby
<shevy>
"abcd"[2] defaults to return only one character
<shevy>
your wanted syntax would require to change this default to return "all until the end"
Takehiro has quit [Ping timeout: 244 seconds]
arkiver has quit [Quit: Leaving]
catphish has left #ruby ["Leaving"]
brianpWins has joined #ruby
gani has quit [Quit: leaving..]
imami|afk is now known as banseljaj
vitor-br has quit [Ping timeout: 246 seconds]
Vainoharhainen has quit [Remote host closed the connection]
<Jonah11_>
shevy, thanks
Chryson has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
tommyvyo has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
maletor has joined #ruby
tgraham is now known as tgraham|away
<k_89>
man... YAML::dump() is a blessing
<k_89>
for my var_dump() trained mind ;P
vlad_starkov has joined #ruby
<Jonah11_>
i have a method that breaks text messages greater than 160 chars into multiple messages. any tips how to improve it or shorten it: http://pastie.org/4887792
TomJ has quit [Quit: TomJ]
replore has joined #ruby
<Jonah11_>
156 should be 154 actually in that code
awestroke has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 245 seconds]
replore has quit [Remote host closed the connection]
ltsstar has quit [Quit: ltsstar]
cakehero has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
sepp2k1 has quit [Remote host closed the connection]
awestroke has joined #ruby
<k_89>
Jonah11_, cant think of a way to shorten it, but yes you can make it more flexible by keeping 'line_lengths' and 'indentation' as optional arguments
<k_89>
with default values
bobbbo has joined #ruby
lggr has joined #ruby
HarryHallman has joined #ruby
<HarryHallman>
#join jruby
<Jonah11_>
k_89, yeah good point. something about the ret = [] and the ret at the bottom bothers me, seems unnecessarily verbose
<k_89>
Jonah11_, why return an array?
<k_89>
with indented lines?
bigmcq77 has quit [Quit: Computer has gone to sleep.]
arkham has quit [Ping timeout: 255 seconds]
<Jonah11_>
k_89, lines aren't indented, they just have a page index at the top. the array is so that i can then send each one in a separate sms message in twilio, which allows only 160 chars per text. trying to achieve same functionality as google questions by text, if you've ever used that
tgraham|away is now known as tgraham
<k_89>
oh
<k_89>
yeah .. then i cant think of any improvement :P
linoj has quit [Quit: linoj]
<Jonah11_>
k_89, perhaps i need to ask k_90? :P
slainer68 has quit [Remote host closed the connection]
<k_89>
haha
samphippen has joined #ruby
parzorep has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
headius has quit [Quit: headius]
linoj has joined #ruby
futilegames has quit [Quit: futilegames]
Guest71256 has quit [Quit: Guest71256]
lggr has joined #ruby
Pochacco has quit [Quit: Pochacco]
awestroke has quit [Remote host closed the connection]
arkham has joined #ruby
ly- has joined #ruby
ly- has quit [Remote host closed the connection]
linoj has quit [Read error: Connection reset by peer]
<Hanmac>
information: the result of string[nr] has changed between ruby 1.8 and 1.9
Tref has quit [Ping timeout: 240 seconds]
Tref_ is now known as Tref
<Jonah11_>
Spooner, agreed. tyvm
maletor has joined #ruby
neveirby has left #ruby [#ruby]
lggr has joined #ruby
seoaqua has quit [Ping timeout: 244 seconds]
Takehiro has joined #ruby
wedtm|away is now known as wedtm
<Jonah11_>
Spooner, and you got rid of those ugly ret -- i knew there was a way
<Spooner>
Haven't checked it though. Might even like the edited version better ;)
<Spooner>
Again, not checked. Should give ideas though.
<Spooner>
Jonah11_ : OOps, error in that. edited.
Takehiro has quit [Ping timeout: 245 seconds]
codeFiend has joined #ruby
Vinz| has joined #ruby
samuel02 has joined #ruby
samphippen has quit [Ping timeout: 245 seconds]
recycle has quit [Remote host closed the connection]
tommyvyo has joined #ruby
<matti>
Spooner: ;]
lggr has quit [Ping timeout: 255 seconds]
tvw has joined #ruby
macmartine has joined #ruby
tgraham has quit [Quit: Leaving...]
HarryHallman has joined #ruby
<Jonah11_>
Spooner, I actually prefer the non scan version for readability
fortin has quit [Quit: Leaving.]
atmosx has joined #ruby
SirG has joined #ruby
lggr has joined #ruby
samphippen has joined #ruby
bobbbo has quit [Quit: bb]
jasonkuhrt has quit [Quit: Leaving...]
Guest55992 has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Iszak has joined #ruby
Iszak has quit [Changing host]
Iszak has joined #ruby
butblack has joined #ruby
samuel02 has quit [Remote host closed the connection]
jasonkuhrt has joined #ruby
adeponte has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 240 seconds]
Morkel has quit [Quit: Morkel]
rakuN has joined #ruby
atmosx has quit [Quit: WeeChat 0.3.8]
claymore_ has joined #ruby
ggreer has joined #ruby
lggr has joined #ruby
tvw has quit [Ping timeout: 244 seconds]
ggreer has left #ruby [#ruby]
<claymore_>
what's the tidiest way to create an array of say, integers from 1 to 50? I thought I could write "nums = [1...50]" but this doesn't seem to work
jblack has joined #ruby
adeponte has joined #ruby
<matti>
claymore_: (1..50).to_a
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
alek_b has quit [Remote host closed the connection]
<claymore_>
I see, so this 1..50 notation only works for tuples?
<matti>
Tuples?
<matti>
(x..y) is a Range.
<matti>
Which happens to have to_a
<claymore_>
oh
<claymore_>
sorry, I'm coming from other languages so I wasn't sure what the type was
<matti>
Python ;]
<matti>
No worries.
t0rc has quit [Read error: Connection reset by peer]
<claymore_>
yeah ;)
alek_b_ has joined #ruby
<claymore_>
thanks
<matti>
;]
<matti>
How do you finding Ruby?
<claymore_>
I actually prefer the language to python, in some ways
<matti>
;]
butblack has quit [Quit: butblack]
<Hanmac>
what about: Array(5..50)
Mon_Ouie has quit [Ping timeout: 245 seconds]
jblack has quit [Ping timeout: 246 seconds]
<claymore_>
ah yes, that works too
baphled has quit [Ping timeout: 244 seconds]
<claymore_>
thanks guys
lggr has quit [Ping timeout: 240 seconds]
butblack has joined #ruby
butblack has quit [Client Quit]
Russell^^ has quit [Quit: Russell^^]
jasonkuhrt has quit [Quit: Leaving...]
<HarryHallman>
how can I redefine a class when using embedded ruby?
replore has joined #ruby
lggr has joined #ruby
adeponte has quit [Remote host closed the connection]
<R3dy_>
Is there functionality to extract tables from a binary database file in ruby?
<matti>
Define binarny database?
<R3dy_>
so I have a binary data file
<R3dy_>
and it's a database
<R3dy_>
It's sitting on disk
samphippen has quit [Quit: Computer has gone to sleep.]
<R3dy_>
I want to open it with File.open(file, 'rb')
yakitori has quit [Read error: Operation timed out]
<R3dy_>
and extract the tables I want
Xeago has quit [Remote host closed the connection]
<matti>
Awesome, good luck.
lggr has joined #ruby
<R3dy_>
so you are saying it won't be easy?
g-ram has quit [Quit: Computer has gone to sleep.]
thunders_ has quit [Remote host closed the connection]
ulisse has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
jasonkuhrt has quit [Quit: Leaving...]
kiyoura has quit [Ping timeout: 248 seconds]
<codeFiend>
R3dy_: you're not really providing enough information
ulisse has left #ruby [#ruby]
Tombar has quit [Remote host closed the connection]
<codeFiend>
R3dy_: what's the file format? how was it created?
<codeFiend>
R3dy_: doing File.open will get you a handle on the file and you will be able to read the file contents
<codeFiend>
R3dy_: but we have no idea what format it is in, so how are we supposed to tell you how to extract/decode the contents?
tgraham is now known as tgraham|away
<Spooner>
codeFiend : Maybe R3dy_ was working up to an actual question?
pskosinski has quit [Quit: Some alternative (not-controlled-by-fu*up-developers/moderators) Red Eclipse 1.3.1 (r4131) servers: http://altred.tk/toggle.rb]
<codeFiend>
Spooner: it
<codeFiend>
Spooner: is possible :)
<codeFiend>
Spooner: but he didn't say anything in 5 minutes
<codeFiend>
Spooner: so i thought he completed his question.
adeponte has joined #ruby
jrunning has joined #ruby
<Spooner>
R3dy_ : Use something like http://bindata.rubyforge.org/ though why anyone would make a non-standard binary database in this day and age is beyond me. And yes, I can accept it is ancient legacy carp.
lggr has quit [Ping timeout: 240 seconds]
jblack has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 248 seconds]
jblack has joined #ruby
Pochacco has quit [Quit: Pochacco]
replore_ has joined #ruby
noyb has quit [Ping timeout: 240 seconds]
<R3dy_>
sorry it's ntds.dit
<R3dy_>
the windows domain controller database
lggr has joined #ruby
<R3dy_>
I'm trying to make a ruby equivlant to the tool NTDSXtract
<R3dy_>
which is in python
Pochacco has joined #ruby
<Spooner>
Right, so the format is well-known, at least.
butblack has quit [Ping timeout: 260 seconds]
Takehiro has joined #ruby
awarner has joined #ruby
axl_ has quit [Quit: axl_]
jeff_sebring has joined #ruby
bapa has quit [Quit: No Ping reply in 180 seconds.]
jeff_sebring has quit [Remote host closed the connection]
jeff_sebring has joined #ruby
R3dy_ is now known as R3dy
R3dy has quit [Changing host]
R3dy has joined #ruby
bapa has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 244 seconds]
chimkan___ has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9]
shiki has joined #ruby
adeponte has quit [Remote host closed the connection]
tommyvyo has joined #ruby
lggr has joined #ruby
jeff_sebring has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
replore_ has quit [Remote host closed the connection]