Jdubs_ has quit [Remote host closed the connection]
<banisterfiend>
volty what's your native language (just curious)
<volty>
you can ask that when (and if) you learn to behave in a correct way
dodosan has joined #ruby
sectionme has quit [Ping timeout: 245 seconds]
<banisterfiend>
:))
Thelixinoe- has quit [Ping timeout: 264 seconds]
mansi has joined #ruby
<sam113101>
I'll take some of your drug
<sam113101>
thanks
Atrumx has joined #ruby
petey_ has quit [Ping timeout: 240 seconds]
kvirani has joined #ruby
KobraKao has quit [Ping timeout: 252 seconds]
amacgregor has joined #ruby
amacgregor_ has joined #ruby
havenwood has joined #ruby
funburn has joined #ruby
thinkclay has joined #ruby
thinkclay has quit [Client Quit]
amacgregor has quit [Read error: Connection reset by peer]
amacgregor__ has quit [Ping timeout: 256 seconds]
nfk has quit [Quit: yawn]
nanoxd has joined #ruby
freerobby has joined #ruby
ffranz has quit [Quit: Leaving]
freakcult has joined #ruby
<freakcult>
hello there
kitak has joined #ruby
<freakcult>
i have a question about ruby's require & include
KobraKao has joined #ruby
<freakcult>
is there a way i can list all the rb files thats inside a directory and also include all the modules that each file contain
<freakcult>
dynamically ofcourse
dayepa1 has quit [Quit: dayepa1]
dayepa has joined #ruby
freakcult is now known as sexybozy
<sexybozy>
is there a way i can list all the rb files thats inside a directory and also include all the modules that each file contain
<sexybozy>
dynamically ofcourse
<sexybozy>
??
popl has joined #ruby
freerobby has quit [Ping timeout: 245 seconds]
vxxr has joined #ruby
anotherwise has quit [Quit: anotherwise]
kvirani has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
jonr22 has joined #ruby
kvirani has joined #ruby
jonr22 has quit [Client Quit]
jonr22 has joined #ruby
Davey has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
maroloccio has quit [Quit: WeeChat 0.4.0]
kvirani has quit [Ping timeout: 248 seconds]
davedev24 has quit [Remote host closed the connection]
lukec has quit [Quit: lukec]
ssvo has quit [Ping timeout: 260 seconds]
fijimunkii has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<banisterfiend>
sexybozy not really
vlad_starkov has quit [Ping timeout: 260 seconds]
dqfan2012 has joined #ruby
dqfan2012 has left #ruby [#ruby]
fijimunkii has quit [Read error: Connection reset by peer]
iliketurtles has quit [Quit: zzzzz…..]
anotherwise has joined #ruby
neo_ has quit [Quit: Leaving]
mrsolo has quit [Quit: This computer has gone to sleep]
emergion has joined #ruby
apfelbox has joined #ruby
Ivo has quit [Ping timeout: 240 seconds]
jefflyne has joined #ruby
zeade has quit [Quit: Leaving.]
endash has quit [Quit: endash]
hogeo has joined #ruby
gyre007 has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
brupeb has joined #ruby
apfelbox has quit [Ping timeout: 240 seconds]
xk_id has quit [Quit:
drumsrgr8forn8_ has quit [Ping timeout: 240 seconds]
volty has quit [Quit: Konversation terminated!]
jcromartie has joined #ruby
mary5030 has quit [Remote host closed the connection]
freerobby has joined #ruby
Inside has quit [Ping timeout: 248 seconds]
burlyscudd has joined #ruby
soheil has joined #ruby
Valesk_ has joined #ruby
ewnd9 has joined #ruby
ocnam has joined #ruby
Valesk has quit [Ping timeout: 260 seconds]
freerobby has quit [Ping timeout: 245 seconds]
phantasm66 has joined #ruby
tkuchiki has joined #ruby
theRoUS has joined #ruby
dodosan has quit [Remote host closed the connection]
anotherwise has quit [Quit: anotherwise]
jonathanwallace has joined #ruby
freezey has joined #ruby
nanoxd has quit [Read error: Connection reset by peer]
fuhgeddaboudit has quit [Ping timeout: 248 seconds]
mmitchell has joined #ruby
mmitchell has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
mrsolo has joined #ruby
butblack has quit [Quit: butblack]
T_T has quit [Remote host closed the connection]
fuhgeddaboudit has joined #ruby
g0bl1n has joined #ruby
butblack has joined #ruby
lukec has joined #ruby
kevinykchan has joined #ruby
lfox has quit [Quit: ZZZzzz…]
cescalante is now known as ce_afk
iliketurtles has joined #ruby
anotherwise has joined #ruby
T_T has joined #ruby
justsee has joined #ruby
havenwood has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
sevenseacat has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
saarinen has quit [Quit: saarinen]
deception has joined #ruby
havenwood has joined #ruby
jerius has joined #ruby
dcunit3d has quit [Ping timeout: 248 seconds]
sarlalian has quit [Ping timeout: 248 seconds]
amsi has quit [Ping timeout: 257 seconds]
julweber_ has joined #ruby
brennanMKE has joined #ruby
Beoran__ has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
c0rn has quit [Quit: Computer has gone to sleep.]
julweber has quit [Ping timeout: 256 seconds]
kevinykchan has quit [Quit: Computer has gone to sleep.]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
Beoran_ has quit [Ping timeout: 252 seconds]
sarkis has joined #ruby
petey has quit [Remote host closed the connection]
asteros has quit [Quit: asteros]
randomnick_ has quit [Quit: Leaving]
g0bl1n has quit [Quit: g0bl1n]
justsee has quit [Ping timeout: 246 seconds]
<pontiki>
system("grep 'module' *.rb")
petey has joined #ruby
vlad_starkov has joined #ruby
adeponte has quit [Remote host closed the connection]
<pontiki>
that will get at least all the .rb files that contain the string 'module'
amacgregor has joined #ruby
fridim_ has joined #ruby
<sexybozy>
ok
<sexybozy>
thats one idea
<sexybozy>
but i was hoping for somthing more solid, i can imagine rack or rspec would do
goleldar has joined #ruby
jcromartie has quit [Ping timeout: 240 seconds]
<sexybozy>
rake*
amacgregor_ has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Ping timeout: 256 seconds]
fgo has joined #ruby
DrCode has quit [Remote host closed the connection]
anoldhacker has joined #ruby
<anoldhacker>
Any of the core team here?
saarinen has joined #ruby
<goleldar>
I am looking to get an older mac mini for dev work until I get a new mac book pro. How old do you think I could go and still dev comfortably?
<anoldhacker>
Depends entirely on what you are trying to develop.
DrCode has joined #ruby
jcromartie has joined #ruby
<anoldhacker>
And if you are addicted to the newest, shiniest dev toys.
<sam113101>
uh, I'd just wait until I get the macbook pro
vishal has joined #ruby
<sevenseacat>
i'd save your money and get something other than a mac
<sam113101>
is your current computer unusable?
<sam113101>
please sevenseacat, please
Thelixinoe- has joined #ruby
<sam113101>
macbooks are the best laptops
<sevenseacat>
lol
<sam113101>
I will never understand your hatred for them
mrsolo has quit [Quit: This computer has gone to sleep]
dankest has quit [Quit: dankest]
<zaltekk>
so overpriced. i'd just install linux on it anyway
mrsolo has joined #ruby
<sam113101>
they are indeed extremely expensive
<zaltekk>
all laptops have shot up in price now that huge amounts of ram and large SSDs are becoming standard options
<sevenseacat>
they're extremely expensive, and they run an OS that seems designed to make a developer's life hard
fridim_ has quit [Ping timeout: 246 seconds]
<sam113101>
but I wouldn't say they are overpriced
<sevenseacat>
i would
<goleldar>
why do you say they make dev lifes hard?
<sevenseacat>
my laptop was half the price and the only thing it has less is a retina screen
<goleldar>
which distro of linux do you run?
<sevenseacat>
ubuntu
<sam113101>
which one is it?
<zaltekk>
the retina's are horrible. the ram, battery, etc are soldered in
<sam113101>
and what about build quality?
<goleldar>
macs hold value pretty well
<sevenseacat>
i have a samsung series 9 and the build quality is fine
<zaltekk>
i'd personally go for a lenovo thinkpad t530
<anoldhacker>
The retina screens are Vnice. On the eyes. If you don't hook up to a 30" monitor for your real work...
<anoldhacker>
And if the company is paying...
<sam113101>
what about battery life?
skysploit has joined #ruby
<sam113101>
does it exceed the macbook air's?
<zaltekk>
i opted for a dell laptop with linux at work over a macbook pro
<sevenseacat>
6-7 hours, same as a MBP
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
lfox has joined #ruby
<zaltekk>
sam113101: it's the same internals
<zaltekk>
of course it lasts the same
dodosan has joined #ruby
<zaltekk>
everything is going to haswell now, which has great battery life
<zaltekk>
not that ivy bridge is too low for a day's work
<sam113101>
the macbook air lasts 12 hours
<zaltekk>
it's an ultrabook
<sam113101>
I don't know about the previous macbook air though
Jdubs_ has joined #ruby
<zaltekk>
other ultrabooks last all day too
<sam113101>
prove it
Jdubs_ has quit [Remote host closed the connection]
<zaltekk>
google is your friend
<sam113101>
even the x1 carbon doesn't last as long
<zaltekk>
not sure what an x1 carbon is
<sevenseacat>
a lenovo thinkpad
<sam113101>
an ultrabook
nadirvardar has quit [Ping timeout: 246 seconds]
<sam113101>
the x1 carbon is more expensive than the macbook air and not really higher quality
<sevenseacat>
the x1 carbon is great quality, except for the screen
<sam113101>
and battery life
<zaltekk>
looks like the lenovo t440s has 12 hours life
<sevenseacat>
sigh
<jcromartie>
bleh… return value class… DON'T DO IT
<zaltekk>
but is larger than the air
<sevenseacat>
good for you. have your shitty overpriced macbook air.
<zaltekk>
(14")
kreeves has joined #ruby
<sam113101>
sevenseacat: your hatred is unfounded
<sevenseacat>
its very founded
<sam113101>
I don't have a macbook air, I wish I had one though
<sevenseacat>
you dont have one, you must hate htem
<sam113101>
you just hate the OS, replace it, done.
<jcromartie>
I have one, it's great.
<sexybozy>
lenovo s110
<sevenseacat>
so i spend twice the money to use the same OS on the same hardware?
<sevenseacat>
really?
<jcromartie>
twice the money?
goleldar has quit [Ping timeout: 260 seconds]
<sam113101>
I don't really _need_ a laptop right now, but if I did I'd probably choose a macbook
apfelbox has joined #ruby
<sevenseacat>
a MBP is twice what this samsung cost
<zaltekk>
it's also a pita to use linux on a macbook
<jcromartie>
sevenseacat: which one?
<sexybozy>
thats a mini.. 6hrs battery, debian install.. vim,tmux and go crazy
<zaltekk>
crazy things like the firmware holding the volume level for the chime
<jcromartie>
zaltekk: it's a PITA to use Linux on any ultrabook
<sam113101>
^
<zaltekk>
never had any issues on the netbooks i've used. i've never actually owned an ultrabook
<sevenseacat>
jcromartie: which MBP? a standard retina one, specced up to match this laptop (increased SSD size + RAM)
<zaltekk>
but any macbook is a pita
<zaltekk>
not just the air
<sevenseacat>
over $3k
<pontiki>
isn't this the ruby channel?
<jcromartie>
sevenseacat: which Samsung? I thought we were comparing the Air
<sam113101>
not anymore
<pontiki>
i thought #pissingoverhardware was somewhere else
Jdubs_ has joined #ruby
<jcromartie>
(TIL Samsung makes laptops…)
<sevenseacat>
jcromartie: we werent, sam113101 just decided to put the air in
<sexybozy>
how can i include modules from a folder that contains rb files
<sam113101>
uh
<zaltekk>
welp, someone is asking ruby questions. back on topic.
<sevenseacat>
absolutely
<sam113101>
isn't the series 9 an ultrabook?
<sevenseacat>
yes
<sam113101>
I like to compare apples with apples, that's why I brought up the macbook air
<jcromartie>
sexybozy: you want "require"
<sevenseacat>
i compared it to the MBP because you can spec up a MBP to the same stats as this laptop
<sevenseacat>
you cant with an air
<jcromartie>
sexybozy: and you need to add the directory to the Ruby load path
whunt has quit [Quit: Computer has gone to sleep.]
<jcromartie>
sexybozy: that is, the global array $LOAD_PATH
<sevenseacat>
unless you want to show me a 15" air with a quadcore i7 CPU and 16GB RAM
osvico has joined #ruby
<jcromartie>
sevenseacat: link to the Samsung?
<jcromartie>
:P
<pontiki>
the air is for casual computer
<pontiki>
computing*
<pontiki>
not development
<sevenseacat>
looking up a link now
<sam113101>
anyway, the retina display and the build quality amount for the difference
<sam113101>
as well as the high quality battery
<zaltekk>
sure it is; just ssh into your linux/bsd machine and you're good :P
<pontiki>
zaltekk: you can do that with an eeepc, too
<zaltekk>
yeah but it doesn't make you look cool to use
<sexybozy>
this way i can dynamically load any newly added rb files that i would put later on his sub folder
freerobby has quit [Ping timeout: 240 seconds]
<jcromartie>
your modules need to register themselves somehow
<jcromartie>
set up a global or similar variable where you can add the module to the list, then iterate the list and include() each module where you need them
<sexybozy>
yes but i want the files to be simple as module MyModule; end.. no heavy logic
<jcromartie>
then you need some kind of naming convention to follow so you can translate file names into module names
<pontiki>
you might not need to include them at all
<jcromartie>
then you can get the module with Kernel.const_get(module_name)
<sexybozy>
I thought its Object.const_get?
<sexybozy>
pontiki, why?
dmiller has joined #ruby
v0n has quit [Ping timeout: 256 seconds]
siwica has quit [Quit: siwica]
<pontiki>
sexybozy: i'm going to turn the question around: why do you think you need to include each module? what is it you think include does for you?
deception has quit [Quit: Goodbye]
Popple has joined #ruby
kofno has joined #ruby
<sexybozy>
include lets me have the instance methods into the parent module
<pontiki>
then why not just write them all for the same module?
<pontiki>
why have submodules at all?
burlyscudd has quit [Quit: Leaving.]
<sexybozy>
u r missing the point, i want to have the folder as a place where somebody following the convention can drop a module and it will automatically required and inclded in the program
<pontiki>
any module at all?
<pontiki>
like a plugin?
<sexybozy>
thats following a convention
visof has quit [Remote host closed the connection]
<sexybozy>
even a gem, he can bundle it as a gem if this thing is to advance
<jcromartie>
there is an order of magnitude more test code than library code for this library
<jcromartie>
and the library is bad, and the tests are bad
<jcromartie>
so… nuke the tests
<jcromartie>
?
Thelixinoe- has joined #ruby
JoeScis has joined #ruby
adeponte has joined #ruby
<JoeScis>
Any NYC/NJ developers here?
zeade has joined #ruby
mikepack has joined #ruby
iamjarvo has quit [Ping timeout: 240 seconds]
<jblack>
There's probably a user group in the area
<__nh___>
JoeScis: How about Hudson Valley?
cj3kim_ has joined #ruby
mikepack has quit [Remote host closed the connection]
freerobby has joined #ruby
ehc has quit [Quit: ehc]
<pontiki>
if the library code is bad, nuke the library, regardless of the tests
kevinykchan has quit [Quit: Computer has gone to sleep.]
adeponte has quit [Ping timeout: 256 seconds]
tgraham_ has joined #ruby
apfelbox has joined #ruby
tgraham_ has quit [Client Quit]
tgraham has joined #ruby
<pontiki>
jcromartie: is the library raising an error and passing back a specific (but arbitrary) value on the exception?
Targen has quit [Ping timeout: 246 seconds]
amacgregor_ has joined #ruby
<jcromartie>
the old design was to return a "Result" object, with #success and #value attributes
<pontiki>
nod
tgraham has quit [Client Quit]
Popple has quit [Quit: Computer has gone to sleep.]
<JoeScis>
jayblack: Do you know about one?
<pontiki>
reasonable
<jcromartie>
pontiki: really?
KobraKao has quit [Ping timeout: 246 seconds]
<pontiki>
sure
<jcromartie>
vs. just returning the value?
<JoeScis>
nh: Is that upstate NY?
<jcromartie>
I expect methods to just return the value
amacgregor__ has joined #ruby
apfelbox has quit [Read error: Operation timed out]
<pontiki>
it depends on what the method does
<jcromartie>
and if something *exceptional* happens, then raise an exception with information as to why it failed
iliketurtles has quit [Quit: zzzzz…..]
<jcromartie>
this is a HTTP API wrapper
<pontiki>
failing isn't necessarily and exception though
<pontiki>
an* not and
<jcromartie>
maybe not all the time
kvirani has joined #ruby
amacgregor has quit [Ping timeout: 256 seconds]
<pontiki>
it sort of depends on whether the possibility of a failure is something exceptional, or something one should expect sometimes
<jcromartie>
I modeled the redesign after ActiveRecord to a degree
<jcromartie>
so Users#get(username) throws when not found, but Users#find(attributes) where attributes == {:username => "foo"} would return an empty list if the username didn't exist
<jcromartie>
and creating a new users raises a ValidationError with a hash of fields and messages under the #fields attribute
amacgregor_ has quit [Ping timeout: 245 seconds]
<pontiki>
well, okay, your API, you get to choose
mrsolo has quit [Quit: This computer has gone to sleep]
dodosan has quit [Remote host closed the connection]
Monie has joined #ruby
oddalot has joined #ruby
Jdubs_ has quit [Remote host closed the connection]
AieshaDot_ has joined #ruby
einarj has joined #ruby
cj3kim_ has quit [Remote host closed the connection]
<jcromartie>
pontiki: are there any libraries that use the "result object" pattern?
<jcromartie>
there's HTTP requests
Thelixinoe- has quit [Remote host closed the connection]
<jcromartie>
but even the HTTP library I'm using returns the response when it's a 200, and raises an error (where you can access the rest of the response) for any other "unexpected" status
Thelixinoe- has joined #ruby
kemist has joined #ruby
<pontiki>
i don't know
<pontiki>
i do know i see far more exceptions raised to simply report an error
<__nh___>
JoeScis: Yep, about an hour and a half north of NYC
asteros has quit [Quit: asteros]
piratebroadcast has joined #ruby
<__nh___>
A beautiful train ride
<pontiki>
so maybe i'm the one who's wrong about it
ewnd9 has quit [Ping timeout: 240 seconds]
<pontiki>
but i also see lots of code that never bothers to guard exceptions
kilophoton has quit [Ping timeout: 260 seconds]
Spami has joined #ruby
einarj has quit [Ping timeout: 248 seconds]
ukd1_ has quit [Remote host closed the connection]
<pontiki>
but then, i also see a lot of code that never bothers to check error conditions
AieshaDot_ has quit [Ping timeout: 250 seconds]
mrsolo has joined #ruby
Thelixinoe- has quit [Ping timeout: 246 seconds]
<pontiki>
and being able to chain this.that.andthe.other without checking intermediate conditions is a bonus for some
dmiller has joined #ruby
asteros has joined #ruby
<anoldhacker>
ActiveRecord is NOT something to be copied.
<sevenseacat>
heh
<anoldhacker>
There is a technical term for this.that.andthe.other: train wreck.
<pontiki>
right
<pontiki>
but it's done all over
<anoldhacker>
I'm REALLY annoyed that rspec supports it.
<anoldhacker>
Doesn't make it a good idea.
Inside has joined #ruby
<pontiki>
somestr.gsub(..).gsub(..).gsub(..).squeeze(..)... and so on
braincra- has joined #ruby
<pontiki>
i'm sure you have some in your code, as do i
amacgregor has joined #ruby
<anoldhacker>
There are LOTs of stupid people out there--many of them are programmers.
<anoldhacker>
I don't think I've ever chained gsubs.
<sevenseacat>
thats abit harsh
<anoldhacker>
You don't know what I do for a living.
dankest has joined #ruby
jonr22 has quit [Ping timeout: 264 seconds]
KobraKao has joined #ruby
thesheff17 has joined #ruby
<anoldhacker>
My point is this: if you see a bunch of wreckage at the bottom of a hill, you should take it slow no matter how many people you see driving fast.
asteros has quit [Client Quit]
johnkary has joined #ruby
piratebroadcast has left #ruby [#ruby]
<pontiki>
do not disagree
<anoldhacker>
"Lots of people do it" is a dangerous way to live.
ehc has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
amacgregor__ has quit [Ping timeout: 246 seconds]
<pontiki>
but lots of people only see the open highway ahead of them, wide and free, and the natural tempation is the speed up
<anoldhacker>
Have you read/seen "Exceptional Ruby"?
dankest has quit [Client Quit]
<pontiki>
wait, why are you down on me about this?
dodosan has joined #ruby
dmiller has quit [Ping timeout: 260 seconds]
<pontiki>
i'm saying it's generally a problem
ixti has quit [Ping timeout: 252 seconds]
<pontiki>
and i'm saying we're all prone to such things from time to time
<pontiki>
what's *your* personal blind spot?
<anoldhacker>
You seemed to be justifying.
<pontiki>
i'm not justifying
<pontiki>
i'm describing a condition
<anoldhacker>
K.
braincrash has quit [Ping timeout: 256 seconds]
nanoxd has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
<anoldhacker>
But that condition does not appear relevant to the conversation.
jefflyne has quit [Ping timeout: 252 seconds]
<pontiki>
then we are done
JoeScis has quit []
<anoldhacker>
I'm attempting to aid you in writing code that won't make your life miserable.
iamjarvo has joined #ruby
<pontiki>
ffs shut up
* sevenseacat
gets popcorn
<anoldhacker>
Please read "Exceptional Ruby". Or watch one of Avdi's talks.
<pontiki>
you know nothing, arnold hacker
<Inside>
anoldhacker: go on
chairabanta has joined #ruby
Thelixinoe- has joined #ruby
<popl>
put your egos back in your pants
<pontiki>
i was talking to jcromartie about the concepts around returning error conditions or raising exceptions
<popl>
:P
<anoldhacker>
Exceptions should be just that: exceptional. To use them as goto's creates a lot of trouble.
<pontiki>
and the way coders frequently ignore both
Valesk_ has quit [Remote host closed the connection]
<jrobeson>
seems to be more of a presentational problem here than substance..
butblack has joined #ruby
<lewellyn>
still rather pointless.
<jrobeson>
lewellyn, which part?
<pontiki>
then i never expect to see anyone, ever again, wonder why they get a whiny nil error
julweber_ has quit [Remote host closed the connection]
<lewellyn>
the parallel arguments.
<jcromartie>
so
butblack has quit [Client Quit]
<jcromartie>
anoldhacker: when do you vote for "result objects"
<lewellyn>
arguments are only useful if both parties agree upon what's being argued about.
<jrobeson>
true nuf
<lewellyn>
(it applies to code, too, of course)
<bnagy>
but here we all are, on IRC
<pontiki>
which is why i wondered why i was being argued with
forced_request has joined #ruby
iamjarvo has quit [Ping timeout: 248 seconds]
sethetter has joined #ruby
<jrobeson>
hi pontiki :)
nutella has joined #ruby
<jrobeson>
i'm gonna go write code with exceptions as flow control now
ehc has quit [Quit: ehc]
<pontiki>
jrobeson: you can *only* use exceptions for flow control
Tearan has joined #ruby
<jrobeson>
pontiki, i meant int he sense people say it.. :(
<pontiki>
yeah, but what an exercise!
<anoldhacker>
I was trained that "result object" is a bad thing. I'm not so sure, though. When you cross the process boundary, they make it a lot easier to ensure conherant results.
Targen has joined #ruby
<lewellyn>
i wonder whether you could be pathological and replace almost all flow control statements with exceptions.
kilophoton has joined #ruby
Thelixinoe- has quit [Remote host closed the connection]
<jrobeson>
pontiki, it was meant to be a joke :(
postmodern has quit [Quit: Leaving]
<anoldhacker>
lewellyn: since you can retry inside a rescue, I would say so.
<pontiki>
so was mine, jrobeson
<jrobeson>
:(
<anoldhacker>
You can also stir the souls of all dead programmers to come after you... :P
<jrobeson>
they are less dangerous than the living ones
<pontiki>
sounds like an elder god
<pontiki>
could be a good thing to be
<anoldhacker>
They don't sleep...
<jrobeson>
i'm going to goto right now
<jcromartie>
I think it's silly to have an object with methods like Result#success Result#value, where success == true and value == nil
varfoo has joined #ruby
<jcromartie>
and then success == false and value == message
dodosan has quit [Remote host closed the connection]
krz has joined #ruby
<jrobeson>
i'm pretty used to seeing ResultSet object type thingies
<jcromartie>
vs simply DOING IT or raising an error
<jcromartie>
in the case of methods with side effects
<jcromartie>
in the case of methods that fetch a value, just return it or raise an error
Mars` has joined #ruby
<anoldhacker>
If #value is set on error, then it is very poorly named.
<jcromartie>
yeah it's multi-purpose
<jcromartie>
:|
<jrobeson>
better to just have message
chairabanta has quit [Quit: Leaving...]
<anoldhacker>
That's the problem, then.
<anoldhacker>
In many cases, failure is not exceptional.
<anoldhacker>
Sometimes it is.
<pontiki>
wow, does *this* sound familiar
<jrobeson>
parsing words is funny
<anoldhacker>
Sometimes, your library can't really tell.
<anoldhacker>
Only raise in the truly exceptional case.
<anoldhacker>
Your caller can always raise if needed.
mansi has joined #ruby
<jcromartie>
then nobody would raise
<anoldhacker>
Not true.
<jcromartie>
I think it's exceptional if server-side validation fails while creating a user
<anoldhacker>
Suppose you are making a web service call that has to connect in order for your application to continue.
petey has quit [Remote host closed the connection]
<jcromartie>
(which I am doing...)
<anoldhacker>
jcromartie: You trolling?
fgo has quit [Remote host closed the connection]
<jcromartie>
no
<jcromartie>
let me rephrase that
<anoldhacker>
Why would it be even rare to have server-side validations fail?
<jcromartie>
when User#validate fails, it is not exceptional
<jcromartie>
when User#save! fails, it is exceptional
<anoldhacker>
That depends on a couple of things.
<jcromartie>
so, User#save! interprets the normally un-exceptional User#validate as an exceptional condition, because the contract implied by the "!" is that the method is purely for side effects
<anoldhacker>
(imo)
johnkary has left #ruby ["@johnkary"]
<anoldhacker>
WAT?
<jcromartie>
do I misunderstand the conventional use of "!"
<jcromartie>
?
<anoldhacker>
According to matz, "!" implies that there is a safe way to do the operation, and this is not it.
<jcromartie>
it implies side effects
Mars` has quit [Ping timeout: 264 seconds]
<jcromartie>
side effects <=> unsafe
<anoldhacker>
ORMs are notorious for doing other things with it.
<anoldhacker>
Is there a side-effect-free way to do a save?
osvico has quit [Ping timeout: 240 seconds]
mansi has quit [Ping timeout: 240 seconds]
<jcromartie>
no, which is why all ORM save methods should have bangs
gwb3 has quit [Remote host closed the connection]
<jrobeson>
you can't have a bang method without a non bang
<anoldhacker>
Not according to matz.
<bnagy>
uh.. wat?
<jrobeson>
s/cant'/shouldn't/
AieshaDot1 has joined #ruby
<anoldhacker>
better!
<bnagy>
holy shit are you guys all tripping balls right now?
<anoldhacker>
I mean... better.
Aloysius1 has quit [Quit: No Ping reply in 180 seconds.]
WhiteHorse has quit [Ping timeout: 248 seconds]
<anoldhacker>
:P
gsvolt has joined #ruby
<jrobeson>
anoldhacker :)
<bnagy>
this conversation is surreal
devoldmx has joined #ruby
<jcromartie>
bnagy: am I crazy?
* sevenseacat
shares popcorn with bnagy
Aloysius1 has joined #ruby
<anoldhacker>
No, just misinformed.
<jcromartie>
I think a "result object" is OK for a long-running operation
<jcromartie>
basically, a future
dodosan has joined #ruby
AieshaDot1 has left #ruby [#ruby]
<anoldhacker>
Using save for the non-exception-throwing version and save! for the exception-throwing version conforms to matz's description of how '!' is to be used.
<jcromartie>
where your methods answer "is it done yet?", "was it successful?", and "what is the ultimate value?"
dodosan has quit [Remote host closed the connection]
<jcromartie>
but if it's not long-running/async then just return a flippin' value
<jcromartie>
or do it
mercwithamouth has joined #ruby
vlad_starkov has joined #ruby
<anoldhacker>
I think that your concept of long-running probably coincides roughly with Avdi's advice not to raise unless you are willing to end the program right now.
rainbyte has joined #ruby
kvirani has quit [Remote host closed the connection]
<jrobeson>
all i know about avdi is his book objectonrails.. :(
kvirani has joined #ruby
amacgregor_ has joined #ruby
<sevenseacat>
jrobeson: you need more rubytapas
<anoldhacker>
Exceptional Ruby is REALLY good stuff.
<jrobeson>
i appreciate his writing style in that.. so it's worth seeing what else he has to say
amacgregor has quit [Ping timeout: 256 seconds]
<jrobeson>
sevenseacat, tiny dishes of rubies.. sure.. bring em on :)
thetristan has quit [Quit: thetristan]
<jrobeson>
i'll make a mint
<pontiki>
kinda crunchy
<pontiki>
broke a tooth
<bnagy>
rubies are really hard
<jcromartie>
hm, maybe this gem that wraps an HTTP API should't be tested by mocking EVERY SINGLE API METHOD, and should be integration tested instead
<jrobeson>
thus.. i'll make a mint.. not by eating them..
<jcromartie>
because right now, our tests tell us absolutely NOTHING about wether the gem works with the API or not
adoming has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
<jcromartie>
(whether)
kvirani has quit [Ping timeout: 248 seconds]
<jcromartie>
I'm just coming back into Ruby and TDD for the most part, having done iOS for about a year
Spami has quit [Quit: Leaving]
Tricon has joined #ruby
<anoldhacker>
I usually recommend both.
cads has joined #ruby
ce_afk is now known as cescalante
<anoldhacker>
Unless the wrapper is really thin.
<jcromartie>
the wrapper is fairly thin
<anoldhacker>
Testing pass-throughs is pretty dubious.
mercwithamouth has quit [Ping timeout: 240 seconds]
brennanMKE has joined #ruby
<anoldhacker>
But if there is ANY logic--mock & test.
<anoldhacker>
But you still need to run integration tests across every mocked call.
mercwithamouth has joined #ruby
<anoldhacker>
Because otherwise, the ground will move under you.
Bira has quit [Remote host closed the connection]
<jcromartie>
250 LoC in the refactored library, 750 lines of 100% HTTP-request-mocking tests
<anoldhacker>
3:1 is pretty much standard ratio by many books.
<anoldhacker>
I tend to do more.
<jcromartie>
but it tells me nothing about whether it actually works
pen has quit [Remote host closed the connection]
<anoldhacker>
Which is why you still need the integration tests.
gwb3_ has joined #ruby
<jcromartie>
so I think I need to devote most of that LoC to integration testing
peterhellberg has quit [Ping timeout: 264 seconds]
pen has joined #ruby
gwb3_ is now known as gwb3
<anoldhacker>
Nope. 3:1 is about the norm for unit tests.
<anoldhacker>
Integration tests are on top of that.
<jcromartie>
seriously, though, it's awful test code
gwb3 has quit [Changing host]
gwb3 has joined #ruby
<anoldhacker>
That's entirely possible.
pencilcheck has joined #ruby
<anoldhacker>
It's still just code, after all.
nanoxd has quit [Quit: nanoxd]
julweber_ has joined #ruby
<jcromartie>
like, testing every API method that it returns success == false value == nil for HTTP 500
felixjet has quit [Read error: Connection reset by peer]
<jcromartie>
which, as I previously expressed, I believe to be utterly silly
__nh___ has quit [Remote host closed the connection]
ehc has joined #ruby
alx- has quit [Quit: Leaving...]
banisterfiend has quit [Read error: Connection reset by peer]
coderhs has joined #ruby
Mars` has joined #ruby
banisterfiend has joined #ruby
huoxito has quit [Quit: Leaving]
polaco is now known as polaco_zZz
alx- has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
Jetchisel has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
cescalante is now known as ce_afk
greenride has joined #ruby
russt has joined #ruby
phantasm66 has quit [Quit: *poof*]
iliketurtles has quit [Ping timeout: 240 seconds]
fschuindt has joined #ruby
pencilcheck has quit [Remote host closed the connection]
brupeb has quit [Remote host closed the connection]
iliketurtles has joined #ruby
mrsolo has joined #ruby
mrsolo has quit [Client Quit]
mrsolo has joined #ruby
rahulkmr has joined #ruby
KobraKao has quit [Ping timeout: 245 seconds]
lewtds has joined #ruby
Ivo has joined #ruby
petey has joined #ruby
brupeb has joined #ruby
<lewtds>
Hi friends, I'm looking for a Ruby library that can "wrap" long running REPL process (think bash, irb) and give me a programmable inteface
virt|a has quit []
classix has quit [Ping timeout: 245 seconds]
<lewtds>
I'm expecting an API similar to this
<lewtds>
client = Client.new("bash")
<lewtds>
client.send("ls")
<lewtds>
result = client.read()
<anoldhacker>
What a straight line!
<lewtds>
anoldhacker: would you elaborate?
virtualentity has joined #ruby
<bnagy>
lewtds: did you look at Open3?
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<anoldhacker>
There was a signficant...discussion earlier about result objects & calls.
Ivo has quit [Ping timeout: 248 seconds]
<anoldhacker>
But really, I wonder why you want to do things in such a way, instead of doing it directly.
brupeb has quit [Remote host closed the connection]
brennanMKE has joined #ruby
ce_afk is now known as cescalante
anotherwise has joined #ruby
soba has joined #ruby
mary5030 has joined #ruby
ukd1 has joined #ruby
<lewtds>
bnagy: thanks. Looks simple enough.
brennanMKE has quit [Ping timeout: 252 seconds]
<lewtds>
anoldhacker: I have to work with a VERY slow starting java admin console command
<lewtds>
so I need a way to avoid creating a new process too often
araujo has quit [Read error: Operation timed out]
amacgregor__ has quit [Ping timeout: 246 seconds]
Inside has quit [Ping timeout: 246 seconds]
artmann has quit [Quit: No Ping reply in 180 seconds.]
alx- has quit [Quit: Leaving...]
gja has quit [Quit: This computer has gone to sleep]
<bnagy>
if it ( the console) has a sane API you might be able to use java requires + jruby to make it nicer
apfelbox has joined #ruby
<bnagy>
juggling pipes can be irritating ime :/
anotherwise has quit [Ping timeout: 245 seconds]
<BraddPitt>
hi guys, I have a coding interview next tuesday and im wondering if there are any good practice resources you can recommend me?
cescalante is now known as ce_afk
<BraddPitt>
its for a very junior/intern level job
gja has joined #ruby
apfelbox has quit [Read error: Operation timed out]
freezey has quit [Remote host closed the connection]
<anoldhacker>
Yeah. Look up the Code Katas.
skysploit has quit [Quit: Leaving]
araujo has joined #ruby
<anoldhacker>
If you can ace them, you can skip the internship. ;)
<anoldhacker>
Who is it with?
anotherwise has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
fgo has joined #ruby
artmann has joined #ruby
Atrumx has quit [Quit: Quitting]
ukd1 has quit [Ping timeout: 248 seconds]
russt has quit [Quit: russt]
vpretzel has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 248 seconds]
lewtds has quit [Quit: Leaving.]
vlad_starkov has joined #ruby
lnormous has quit [Ping timeout: 260 seconds]
ehc has quit [Quit: ehc]
das3in has joined #ruby
nadirvardar has joined #ruby
schaerli has joined #ruby
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
freerobby has quit [Quit: Leaving.]
vlad_starkov has quit [Read error: Operation timed out]
pen has joined #ruby
apeiros has joined #ruby
mary5030 has quit [Remote host closed the connection]
Lewix has joined #ruby
<das3in>
HI! I'm relatively new to programming and I think i have a scope question. I have an array with 8 strings. I want to push 2 at a time into a new array until there are none left in the original array.
lukec has quit [Quit: lukec]
<das3in>
I know that test = [1, 2, 3, 4, 5, 6, 7, 8], new1 << test.delete_at(0)
<das3in>
but I don't know how to dynamically create 'new1' and only push 2 at a time
jenrzzz has joined #ruby
Domon has quit [Ping timeout: 252 seconds]
jefflyne has joined #ruby
rickmasta has quit [Quit: Leaving...]
rickmasta has joined #ruby
<bnagy>
something like a=[1,2,3,4,5,6];b=[];b.append(a.shift(2)) until a.empty?
mansi_ has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
mansi has joined #ruby
ce_afk is now known as cescalante
mansi has quit [Remote host closed the connection]
nutella has quit [Read error: Connection reset by peer]
mansi has joined #ruby
nutella has joined #ruby
sectionme has joined #ruby
zz_michael_mbp is now known as michael_mbp
whunt has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
jwicked has joined #ruby
browndawg has quit [Quit: Leaving.]
sectionme has quit [Ping timeout: 260 seconds]
schaerli has joined #ruby
apeiros has quit [Remote host closed the connection]
anotherwise has quit [Ping timeout: 240 seconds]
nutella has quit [Read error: Connection reset by peer]
nutella has joined #ruby
cescalante is now known as ce_afk
voidPirate has quit [Remote host closed the connection]
nutella has quit [Read error: Connection reset by peer]
mansi has joined #ruby
dcunit3d has joined #ruby
Domon has joined #ruby
nutella has joined #ruby
apfelbox has joined #ruby
mansi has quit [Remote host closed the connection]
jwicked has quit [Ping timeout: 256 seconds]
mansi has joined #ruby
haxrbyte has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
haxrbyte has quit [Remote host closed the connection]
vim_shim has joined #ruby
haxrbyte has joined #ruby
roadt_ has joined #ruby
apfelbox has quit [Ping timeout: 252 seconds]
mansi has quit [Ping timeout: 252 seconds]
classix has joined #ruby
tagrudev has joined #ruby
nutella has quit [Ping timeout: 240 seconds]
finnnnnnnnnnn has joined #ruby
fgo has joined #ruby
adoming has quit [Quit: adoming]
nutella has joined #ruby
roadt has quit [Ping timeout: 248 seconds]
finnnnnnnnnnn has quit [Client Quit]
fgo has quit [Ping timeout: 240 seconds]
mike1992 has quit [Ping timeout: 252 seconds]
schaerli has quit [Remote host closed the connection]
rahulkmr1 has joined #ruby
nutella has quit [Ping timeout: 264 seconds]
rahulkmr has quit [Ping timeout: 246 seconds]
nutella has joined #ruby
Fuzai has joined #ruby
Ripp__ has joined #ruby
dmiller has joined #ruby
mmozuras has quit [Quit: leaving]
mmozuras has joined #ruby
anotherwise has joined #ruby
zets has joined #ruby
zoee has joined #ruby
dmiller has quit [Ping timeout: 260 seconds]
jefflyne has quit [Ping timeout: 260 seconds]
araujo has quit [Read error: Operation timed out]
vim_shim has quit [Ping timeout: 240 seconds]
ics has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Ping timeout: 245 seconds]
wallerdev has quit [Quit: wallerdev]
dawkirst has quit [Read error: Operation timed out]
dangerousdave has joined #ruby
dhruvasagar has joined #ruby
nadirvardar has quit [Quit: Computer has gone to sleep.]
apeiros has joined #ruby
FDj has quit [Read error: Connection reset by peer]
FDj has joined #ruby
Elhu has joined #ruby
mengu has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
Macaveli has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
zeade has quit [Quit: Leaving.]
petey has quit [Remote host closed the connection]
Ripp__ has quit []
dawkirst has joined #ruby
zarubin has joined #ruby
T_T has joined #ruby
petey has joined #ruby
ukd1 has joined #ruby
ukd1 has quit [Remote host closed the connection]
ukd1 has joined #ruby
ukd1_ has joined #ruby
tonni has quit [Remote host closed the connection]
tonni has joined #ruby
aganov has joined #ruby
mengu has quit [Remote host closed the connection]
dodosan has quit [Remote host closed the connection]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
ukd1_ has quit [Remote host closed the connection]
ukd1_ has joined #ruby
ninegrid has quit [Read error: Connection reset by peer]
ukd1 has quit [Ping timeout: 260 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
b00stfr3ak has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
tonni has quit [Ping timeout: 264 seconds]
gcds has joined #ruby
russt has joined #ruby
browndawg has joined #ruby
pontiki has quit [Quit: He who makes a beast of himself gets rid of the pain of being a man]
mengu has joined #ruby
kilophoton has quit [Ping timeout: 246 seconds]
gcds has quit [Read error: Operation timed out]
jb41 has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
tesuji has joined #ruby
mrsolo has joined #ruby
gf3 has quit [Ping timeout: 264 seconds]
orionstein_away has quit [Ping timeout: 264 seconds]
tjad has quit [Ping timeout: 252 seconds]
sweeper has quit [Ping timeout: 240 seconds]
sweeper has joined #ruby
ayaz has joined #ruby
paul_k has quit [Ping timeout: 248 seconds]
philtr has quit [Ping timeout: 248 seconds]
philtr has joined #ruby
onewheelskyward has quit [Ping timeout: 256 seconds]
justinmcp has joined #ruby
onewheelskyward has joined #ruby
scottstamp is now known as zz_scottstamp
pen has quit [Remote host closed the connection]
renanoronfle has joined #ruby
paul_k has joined #ruby
gf3 has joined #ruby
orionstein_away has joined #ruby
orionstein_away is now known as orionstein
coderhs has quit [Ping timeout: 240 seconds]
apfelbox has joined #ruby
mansi has joined #ruby
aagdbl has joined #ruby
classix has quit [Ping timeout: 260 seconds]
sectionme has joined #ruby
Sp4rKy_ is now known as Sp4rKy
Sp4rKy has quit [Changing host]
Sp4rKy has joined #ruby
leonidlm has joined #ruby
apfelbox has quit [Ping timeout: 245 seconds]
mansi has quit [Ping timeout: 240 seconds]
gcds has joined #ruby
mengu has quit [Remote host closed the connection]
tonni has joined #ruby
T_T has quit [Remote host closed the connection]
leonidlm has quit [Read error: Operation timed out]
DanKnox is now known as DanKnox_away
mengu has joined #ruby
amacgregor has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
DanKnox_away is now known as DanKnox
andikr has joined #ruby
tonni has quit [Read error: Connection reset by peer]
jb41 has quit [Ping timeout: 260 seconds]
funburn has quit [Quit: funburn]
yacks has quit [Ping timeout: 246 seconds]
jwicked has joined #ruby
tjad has joined #ruby
funburn has joined #ruby
ukd1_ has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
filipe has joined #ruby
funburn has quit [Client Quit]
julweber has joined #ruby
zz_tsykoduk is now known as tsykoduk
amsi has joined #ruby
Hganavak has joined #ruby
tsykoduk is now known as zz_tsykoduk
canton7 has joined #ruby
leonidlm has joined #ruby
julweber has quit [Ping timeout: 252 seconds]
ianclarksmith has joined #ruby
emergion has joined #ruby
amsi has quit [Ping timeout: 264 seconds]
DanKnox is now known as DanKnox_away
ianclarksmith is now known as ics
tonni has joined #ruby
cj3kim has joined #ruby
schaerli has joined #ruby
Xeago has joined #ruby
anoldhacker has quit [Quit: KVIrc Insomnia 4.0.0, revision: 3900, sources date: 20100125, built on: 2011-03-15 15:32:03 UTC 3900 http://www.kvirc.net/]
tonni has quit [Read error: Connection reset by peer]
zarubin has quit [Ping timeout: 245 seconds]
adeponte has quit [Remote host closed the connection]
apfelbox has joined #ruby
Xeago has quit [Remote host closed the connection]
adeponte has joined #ruby
robbyoconnor has joined #ruby
Kelet_ is now known as Kelet
matrix9180 has joined #ruby
BizarreCake has joined #ruby
Kelet has quit [Changing host]
Kelet has joined #ruby
leonidlm has quit [Read error: Connection reset by peer]
h_kon has joined #ruby
Xeago has joined #ruby
ahawkins has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
zz_scottstamp is now known as scottstamp
jprovazn has joined #ruby
Xeago has quit [Remote host closed the connection]
adeponte has quit [Ping timeout: 252 seconds]
nutella has quit [Ping timeout: 264 seconds]
sarkis has quit [Ping timeout: 264 seconds]
marius has quit [Quit: oh nooo]
kiri has joined #ruby
coderhs has joined #ruby
workmad3 has joined #ruby
pen has joined #ruby
vxxr has quit [Ping timeout: 252 seconds]
adeponte has joined #ruby
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
yacks has joined #ruby
Zai00 has joined #ruby
senayar has joined #ruby
vxxr has joined #ruby
tonni has joined #ruby
Mars` has quit [Remote host closed the connection]
rdark has joined #ruby
workmad3 has quit [Read error: Operation timed out]
tobiasvl has quit [Quit: Nytt kontor]
claymore has joined #ruby
aagdbl has quit [Quit: Leaving.]
Dave has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
Dave is now known as Guest50804
leonidlm has joined #ruby
dayepa has quit [Quit: dayepa]
mike1992 has joined #ruby
tonni has quit [Ping timeout: 252 seconds]
admin0 has joined #ruby
kiri has quit [Ping timeout: 240 seconds]
dayepa has joined #ruby
matrix9180 has quit [Ping timeout: 245 seconds]
arturaz has joined #ruby
dodosan has joined #ruby
kil0byte has quit [Ping timeout: 264 seconds]
tatsuya_o has quit [Remote host closed the connection]
scottstamp is now known as zz_scottstamp
troessner has joined #ruby
zarubin has joined #ruby
brianpWins has quit [Quit: brianpWins]
obs has joined #ruby
obs has quit [Remote host closed the connection]
obs has joined #ruby
leonidlm has quit [Read error: Operation timed out]
fgo has quit [Remote host closed the connection]
anotherwise has quit [Quit: anotherwise]
russt has quit [Quit: russt]
dodosan has quit [Ping timeout: 248 seconds]
julweber has joined #ruby
_maes_ has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
finnnnnnnnnnn has joined #ruby
brianpWins has joined #ruby
Hanmac has joined #ruby
tonni has joined #ruby
funburn has joined #ruby
Anticom has joined #ruby
tvw has joined #ruby
cads has quit [Ping timeout: 240 seconds]
dagobah has joined #ruby
Coffers has joined #ruby
swordsmanz has quit [Remote host closed the connection]
ephemerian has joined #ruby
threesome has joined #ruby
swordsmanz has joined #ruby
tvl has joined #ruby
tvl is now known as tobiasvl
kil0byte has joined #ruby
alup has joined #ruby
blaxter has joined #ruby
Elhu has joined #ruby
buibex has joined #ruby
Kabaka has joined #ruby
dmiller has joined #ruby
vlad_starkov has joined #ruby
leonidlm has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
jefflyne has joined #ruby
kiri has joined #ruby
djdb has joined #ruby
blaxter has quit [Read error: Connection reset by peer]
mengu has quit [Remote host closed the connection]
blaxter has joined #ruby
gyzmodo has joined #ruby
bricker`1A has quit [Ping timeout: 248 seconds]
dmiller has quit [Ping timeout: 240 seconds]
tonni has quit [Ping timeout: 260 seconds]
Guest50804 has quit [Quit: Leaving...]
kiri has quit [Read error: Operation timed out]
mengu has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
Xeago has joined #ruby
greenride has left #ruby [#ruby]
jbw has joined #ruby
mikecmpbll has joined #ruby
bricker`LA has joined #ruby
blz37 has left #ruby ["WeeChat 0.4.1"]
leonidlm has quit [Read error: Connection reset by peer]
jbpros has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
jwicked has quit [Ping timeout: 260 seconds]
relix has joined #ruby
julweber has quit [Remote host closed the connection]
berson has joined #ruby
Bry8Star{T2 has joined #ruby
adambeynon has joined #ruby
whunt has quit [Quit: Computer has gone to sleep.]
<berson>
hello, I downloaded ruby on rails and I'm trying to start a web application but I havent figured out how exactly link the text editor with ruby.
<xybre>
berson: "link the text editor"? (also there's a #rubyonrails channel)
kiri has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
adeponte has quit [Remote host closed the connection]
pushpak has joined #ruby
whunt has joined #ruby
adeponte has joined #ruby
shaunbaker has joined #ruby
<berson>
xybre: I'm new to ruby... and I'm watching a tutrial on treehouse, but they didn't fully explain some steps on how to start a new project on ruby
dangerousdave has joined #ruby
tonni has joined #ruby
adeponte has quit [Ping timeout: 240 seconds]
<likemike>
berson: read about design patterns first
<xybre>
berson: There's nothing to do. Just make a file. Like, open up your editor and write `puts "hello world"`, save it as hello_world.rb and then run `ruby hello_world.rb` from the command line.
leonidlm has joined #ruby
<sevenseacat>
magic!
obs has quit [Ping timeout: 264 seconds]
classix has joined #ruby
<xybre>
berson: there's no process to create a Ruby project, you don't need much boilerplate. If you want to wrap up all your external dependencies (gems) you can use bundler and Gemfiles, but thats not much more difficult.
amacgregor_ has joined #ruby
greengriminal has joined #ruby
amacgregor has quit [Ping timeout: 240 seconds]
elaptics`away is now known as elaptics
visof has joined #ruby
brianpWins has quit [Quit: brianpWins]
whunt has quit [Quit: Computer has gone to sleep.]
pedda has joined #ruby
staafl has quit [Ping timeout: 256 seconds]
whunt has joined #ruby
s2r2 has left #ruby [#ruby]
fgh has quit [Quit: Leaving]
io_syl has quit []
mike1992 has quit [Ping timeout: 252 seconds]
joonty has quit [Quit: WeeChat 0.4.1]
Vasari has joined #ruby
joonty has joined #ruby
julweber has joined #ruby
Matriks has joined #ruby
berson has quit [Quit: Page closed]
simplyaubs has quit [Quit: simplyaubs]
jprovazn has quit [Quit: Odcházím]
simplyaubs has joined #ruby
simplyaubs has quit [Client Quit]
einarj has joined #ruby
Dave has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
Mars` has joined #ruby
Dave is now known as Guest64576
vlad_starkov has joined #ruby
simplyaubs has joined #ruby
skaflem has joined #ruby
simplyaubs has quit [Client Quit]
Jetchisel has joined #ruby
leonidlm has quit [Ping timeout: 252 seconds]
ehaliewicz has quit [Ping timeout: 240 seconds]
noname001__ has joined #ruby
lele` has quit [Ping timeout: 245 seconds]
simplyaubs has joined #ruby
simplyaubs has quit [Client Quit]
aryaching has quit [Ping timeout: 240 seconds]
lele has joined #ruby
simplyaubs has joined #ruby
julweber has quit [Remote host closed the connection]
mansi has joined #ruby
Mars` has quit [Ping timeout: 245 seconds]
ingof has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
cibs has quit [Ping timeout: 240 seconds]
apfelbox has quit [Remote host closed the connection]
jan1337z has joined #ruby
cibs has joined #ruby
simplyaubs has quit [Client Quit]
aryaching has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
r0bgl33s0n has quit [Ping timeout: 264 seconds]
petey has quit [Remote host closed the connection]
classix has quit [Ping timeout: 246 seconds]
tatsuya_o has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
julweber has joined #ruby
Lewix has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 240 seconds]
fschuindt has quit [Quit: Computer has gone to sleep.]
obs has joined #ruby
leonidlm has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
dmiller has joined #ruby
mistertim has joined #ruby
mistertim has quit [Remote host closed the connection]
<BraddPitt>
what is … in ruby>?
<BraddPitt>
inclusive range?
BRMatt has joined #ruby
sarbull_ has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
<lupine>
exclusive range
<lupine>
0...1 is [0], 0..1 is [0,1]
<BraddPitt>
ah, thank you
leonidlm has quit [Read error: Connection reset by peer]
<lupine>
it gets a bit weird when combined with array subsets
dmiller has quit [Ping timeout: 240 seconds]
Macaveli has joined #ruby
Macaveli has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
classix has joined #ruby
mrsolo has joined #ruby
jefflyne has quit [Ping timeout: 240 seconds]
mrsolo has quit [Client Quit]
buibex has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
lkba has joined #ruby
quoin has joined #ruby
leonidlm has quit [Ping timeout: 248 seconds]
adeponte has joined #ruby
sevenseacat has quit [Quit: Leaving.]
kiri has quit [Ping timeout: 264 seconds]
cads has joined #ruby
Xeago has joined #ruby
<Hanmac>
active support still smells a bit … (i have seen users that are not possible to write ruby code without it anymore)
<grahamsavage>
ah i'm using rails anyway
<grahamsavage>
so i might as well
<Hanmac>
imo rails is still a bit bad for rubys reputation … like when there is a bug in rails that makes it possible to put data inside because rails does not escape, all other blame ruby for it even if its not rubys fault …
hamakn has quit [Read error: Connection reset by peer]
<Hanmac>
and then the rails users come to ruby itself and "demand" that they classes are become core classes and replace the orginal classes … or that some core classes are kicked out because rails user does not understand they purpose ...
adeponte has quit [Ping timeout: 240 seconds]
zeel has joined #ruby
kiri has joined #ruby
ayaz has joined #ruby
Vasari has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 240 seconds]
<grahamsavage>
yeah although stuff like that should probably be a core class
<grahamsavage>
or an extension to a core class
sayan has joined #ruby
<grahamsavage>
i.e. one class that has all the basic date operations which you can mix in a ton of other date functions if you need it
Kar- has joined #ruby
<Hanmac>
most of the active support stuff looks shitty for me, like "3.weeks.ago" … imo it should be better and not so stupid like that
<lupine>
mm, I strongly prefer Time.now - ( 3 * 7 * 86400 )
leonidlm has joined #ruby
<lupine>
or, you know, Chronic.parse( "three weeks ago" )
razi has joined #ruby
Macaveli has quit [Remote host closed the connection]
<Hanmac>
lupine: yeah for sample this Chronic does make more sense for me ( and you see what you have … 3.weeks still returns an integer)
<visof>
hi
<lupine>
I do like chronic. A lot.
<visof>
how can i deal with paths with spaces like /foo/bar/hello world/ ?
<lupine>
"deal with" ?
<lupine>
they should Just Work(tm)
jbpros has quit [Quit: jbpros]
Kar- has quit [Ping timeout: 248 seconds]
jbpros has joined #ruby
jbpros has quit [Client Quit]
nari has quit [Ping timeout: 245 seconds]
mengu has quit [Remote host closed the connection]
Stygia has joined #ruby
siwica has joined #ruby
saimaz has joined #ruby
allsystemsarego has quit [Read error: Operation timed out]
allsystemsarego has joined #ruby
sylt has joined #ruby
ziyadb has quit [Ping timeout: 246 seconds]
fourq__ has quit [Ping timeout: 240 seconds]
pen has quit [Remote host closed the connection]
chuk_ has quit [Ping timeout: 260 seconds]
denysonique has quit [Ping timeout: 260 seconds]
zero7 has quit [Ping timeout: 246 seconds]
randym_ has quit [Ping timeout: 256 seconds]
rndstr has quit [Ping timeout: 264 seconds]
davidboy has quit [Ping timeout: 264 seconds]
tommyvyo has quit [Read error: Operation timed out]
xerxas has quit [Ping timeout: 248 seconds]
karlfreeman has quit [Ping timeout: 240 seconds]
lectrick has quit [Ping timeout: 245 seconds]
bluehavana has quit [Ping timeout: 240 seconds]
mattyohe has quit [Ping timeout: 264 seconds]
leonidlm has quit [Ping timeout: 260 seconds]
Guest85414___ has quit [Ping timeout: 240 seconds]
<sylt>
Hi if I define the function <=> in a class it should also define all the other comparison operators correct?
heidar has quit [Ping timeout: 248 seconds]
keyvan_ has quit [Ping timeout: 240 seconds]
kapowaz has quit [Ping timeout: 248 seconds]
rubyguy has quit [Ping timeout: 240 seconds]
dnyy has quit [Ping timeout: 240 seconds]
<tobiasvl>
yes
<tobiasvl>
implement Comparable
jbpros has joined #ruby
guilleiguaran_ has quit [Ping timeout: 264 seconds]
<Hanmac>
ruby does not have something like "Clippy" like "oh i see you defined <=> method … do you want to include the Comparable Module? [yes] [no] [help] !
<Hanmac>
hm i mean its possible to implement such stuff via #method_added but its a bit black magic
aaroncm has quit [Quit: No Ping reply in 180 seconds.]
<krz>
i have a class Foobar that extends Foo and includes Bar. what would it take for class Foobar to "include" one file which extends Foo and includes Bar?
aaroncm has joined #ruby
<krz>
do i need a require for this?
<krz>
i.e. require Baz. Baz has include Foo; extend Bar ?
<Hanmac>
krz use require_relative
<krz>
in ruby on rails. where should required files be stored?
<krz>
in /lib?
x0nic has quit [Ping timeout: 245 seconds]
aaroncm has quit [Client Quit]
MrZYX|off is now known as MrZYX
aaroncm has joined #ruby
einarj has joined #ruby
<Hanmac>
krz #rubyonrails
zz_michael_mbp is now known as michael_mbp
x0nic has joined #ruby
lkba has joined #ruby
<Hanmac>
krz for sample i put my files in /ext but the important files are automaticlly copied into /lib
<krz>
i see
zarubin has quit [Ping timeout: 248 seconds]
mengu has joined #ruby
<krz>
safe for a module to override the new method?
andikr has quit [Ping timeout: 240 seconds]
<Hanmac>
krz in ruby nothing is safe because nearly everything can be altered ;D
<Hanmac>
(and with dark Art even the classes of objects itself ;D)
andikr has joined #ruby
leonidlm has quit [Ping timeout: 264 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
<krz>
if a class has a constant variable defined. the same class extends a module. how can the module have access to constant var
<Hanmac>
beware that the nesting is important for that
enricostn has joined #ruby
obs has quit [Quit: Saliendo]
khushildep has joined #ruby
cj3kim has quit [Remote host closed the connection]
mengu has quit [Ping timeout: 248 seconds]
zoee has joined #ruby
jb41 has joined #ruby
<enricostn>
hi there, I'm using #popen3 like this stdin, stdout, stderr, wait_thr = Open3.popen3('/usr/bin/env mysqldump -uroot database_name > #{dump_path}')
jeffreyio2 has quit [Read error: Connection reset by peer]
<enricostn>
should I close the streams and/or the wait_thr ?
<catphish>
you should almost certainly close stdin if you're not going to write to it, and you should read the output streams
<catphish>
but since you don't need the streams, why not just use system()
<enricostn>
i need to read the stderr
jeffreyio2 has joined #ruby
kil0byte has quit [Remote host closed the connection]
<catphish>
oh ok, in that case, your method is fine
schaerli has joined #ruby
drumsrgr8forn8_ has joined #ruby
<catphish>
close stdin to show you're not writing anything to it
<enricostn>
because the command I call
mengu has joined #ruby
<catphish>
and ensure you read the streams
<enricostn>
ok thanks, and what about the thread?
<enricostn>
does it'll create zombies if I don't close it?
rickmasta has quit [Quit: Leaving...]
<catphish>
you don't "close it"
<enricostn>
or #popen3 close it after it's done?
tesuji has quit [Read error: Connection reset by peer]
<catphish>
i think you need to run exit_status = wait_thr.value
Hganavak has quit [Read error: Connection reset by peer]
<catphish>
in order to read the exit code and let the zombie die
<catphish>
it's normally easier to use the block form though
<enricostn>
this is what I actually do after calling it
<shevy>
krz did you try yet? through extend self for instance... I do not see module Bar in your code
Barbaren has quit [Quit: Lost terminal]
sarbull_ has quit [Quit: Leaving]
<krz>
shevy: i updated the gist
xk_id has joined #ruby
<shevy>
ok so the first part already works, you added a method to your class, now you want a class method too
<krz>
how/where should i define baz? so it can be accessed as a singleton mothond by class Foo?
saimaz has quit [Remote host closed the connection]
<Hanmac>
krz i send you a link about that … i cant open the link for you
<krz>
def self.baz?
<shevy>
well it must be added to your module too I suppose
vxxr has quit [Quit: leaving]
<Hanmac>
shevy: you know 'let me google it for you' right? i want also 'let me open that link for you', and 'let me read the page for you' and 'let me understand that for you' ...
dmiller has quit [Ping timeout: 240 seconds]
shaunbaker has quit [Remote host closed the connection]
<Hanmac>
i mean if i send others links that help with there problem and they dont read them … what else can i do without hacking they computers? ;D
<shevy>
and I dont think that blog entry helps much really
<catphish>
enricostn: sorry, don't have any time to look now
<Hanmac>
shevy it does
withnale has quit [Read error: Operation timed out]
leonidlm has joined #ruby
<shevy>
krz did the link help you?
<Hanmac>
when you would read the section
<krz>
shevy: im trying with self.included base.extend
jefflyne has joined #ruby
shaunbak_ has joined #ruby
shaunbaker has quit [Read error: Connection reset by peer]
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
hogeo has quit [Remote host closed the connection]
decoponio has joined #ruby
hogeo has joined #ruby
<krz>
shevy: yea it does actually. so i guess through meta programming
<krz>
and a couple of handy methods
Speed has joined #ruby
<shevy>
cool
<krz>
def baz
<krz>
whops
<shevy>
I gave up on this kind of "meta" programming, it leads to too much complexity for little gain. stuff like self.included base.extend I would never use
buibex has quit [Remote host closed the connection]
karlfreeman_ has joined #ruby
Boohbah has quit [Ping timeout: 240 seconds]
leonidlm has quit [Ping timeout: 245 seconds]
buibex has joined #ruby
rockets has quit [Ping timeout: 240 seconds]
marius has quit [Quit: oh nooo]
aryaching_ has joined #ruby
varfoo has quit [Quit: WeeChat 0.4.0]
marius has joined #ruby
karlfreeman_ has quit [Client Quit]
aryaching has quit [Ping timeout: 246 seconds]
Boohbah has joined #ruby
xcv has quit [Remote host closed the connection]
mattp_ has quit [Ping timeout: 248 seconds]
quoin has joined #ruby
aryaching has joined #ruby
classix has joined #ruby
geekbri has joined #ruby
boxmein has joined #ruby
aryaching_ has quit [Ping timeout: 246 seconds]
gwb3 has quit [Quit: brb]
tommyvyo has joined #ruby
kapowaz has joined #ruby
davidboy has joined #ruby
mattp_ has joined #ruby
quoin has quit [Remote host closed the connection]
heidar has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
dnyy has joined #ruby
ziyadb has joined #ruby
randym_ has joined #ruby
dweeb has joined #ruby
rndstr has joined #ruby
krz has quit [Quit: krz]
keyvan_ has joined #ruby
pellenation has joined #ruby
zero7 has joined #ruby
mneorr has joined #ruby
quoin has joined #ruby
intuxicated has quit [Ping timeout: 246 seconds]
pontiki has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
browndawg has quit [Quit: Leaving.]
Guest85414___ has joined #ruby
pellenation has quit [Client Quit]
lectrick has joined #ruby
fourq__ has joined #ruby
rubyguy has joined #ruby
chuk_ has joined #ruby
mneorr_ has quit [Ping timeout: 260 seconds]
ugoldw has quit [Remote host closed the connection]
mattyohe has joined #ruby
ugoldw has joined #ruby
bluehavana has joined #ruby
guilleiguaran_ has joined #ruby
leonidlm has joined #ruby
ce_afk is now known as cescalante
denysonique has joined #ruby
scarolan has joined #ruby
greengriminal has quit [Ping timeout: 245 seconds]
Clooth has joined #ruby
ChronocityLC has quit [Ping timeout: 260 seconds]
renanoronfle has quit [Quit: This computer has gone to sleep]
aleron has joined #ruby
kiri has joined #ruby
mark_locklear has joined #ruby
phutchins has quit [Ping timeout: 248 seconds]
leonidlm has quit [Read error: Operation timed out]
pellenation has joined #ruby
ArchBeOS has joined #ruby
sailias has joined #ruby
intuxicated has joined #ruby
phutchins has joined #ruby
Elhu has joined #ruby
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sayan has quit [Quit: Leaving]
Banistergalaxy has joined #ruby
failshell has quit [Ping timeout: 248 seconds]
banisterfiend has quit [Quit: Computer has gone to sleep.]
failshell has joined #ruby
phenocode has quit [Read error: Connection reset by peer]
phenocode has joined #ruby
simao_ has joined #ruby
niklasb has joined #ruby
simao_ has quit [Client Quit]
cescalante is now known as ce_afk
simao_ has joined #ruby
simao_ has quit [Client Quit]
failshell has quit [Remote host closed the connection]
simao_ has joined #ruby
simao_ has quit [Client Quit]
schaerli has joined #ruby
atno has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
yalue has joined #ruby
mansi has joined #ruby
burlyscudd has joined #ruby
banisterfiend has joined #ruby
jibi has joined #ruby
Fuzai has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 246 seconds]
burlyscudd has quit [Client Quit]
leonidlm has joined #ruby
marcgg has quit [Remote host closed the connection]
jbpros has joined #ruby
devoldmx has joined #ruby
mercwithamouth has joined #ruby
TheBrainWork has joined #ruby
mansi has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
shaunbaker has joined #ruby
burlyscudd has joined #ruby
m8 has joined #ruby
supergeek has joined #ruby
Guest33959 has joined #ruby
evenix has joined #ruby
endash has joined #ruby
kaldrenon has joined #ruby
shaunbak_ has joined #ruby
breakingthings has joined #ruby
siwica has quit [Ping timeout: 264 seconds]
devoldmx has quit [Ping timeout: 245 seconds]
nouitfvf has joined #ruby
burlyscudd has quit [Client Quit]
devoldmx has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
kil0byte_ has joined #ruby
Banistergalaxy has joined #ruby
jkamenik has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
vpretzel has joined #ruby
mary5030 has joined #ruby
kil0byte has quit [Ping timeout: 256 seconds]
atno has quit [Ping timeout: 240 seconds]
leonidlm has quit [Read error: Operation timed out]
karlfreeman has joined #ruby
karlfreeman is now known as Guest88749
DrCode has quit [Ping timeout: 240 seconds]
kvirani has joined #ruby
ewnd9 has quit [Ping timeout: 248 seconds]
andredublin has quit []
blackratdog has joined #ruby
browndawg has joined #ruby
atno has joined #ruby
mary5030 has quit [Remote host closed the connection]
freerobby has joined #ruby
xk_id has quit [Quit:
codelette has joined #ruby
lessless has joined #ruby
DrCode has joined #ruby
<lessless>
what driver I want to use with ruby - Mongoid or Moped or something else?
buibex has quit [Remote host closed the connection]
banisterfiend has quit [Quit: Computer has gone to sleep.]
xk_id has joined #ruby
boxmein has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
intuxicated has quit [Quit: Leaving]
browndawg has quit [Ping timeout: 240 seconds]
<xybre>
lessless: Mongoid is built on Moped.
<xybre>
lessless: Moped is just the driver. Mongoid is an ORM.
tonini_ has joined #ruby
<lessless>
ok, cool
<lessless>
so Mongoid than :D
einarj has quit [Ping timeout: 252 seconds]
<xybre>
lessless: Mongoid should be fine. There's also MongoMapper if you're looking for options.
pellenation has quit [Quit: Leaving.]
Banistergalaxy has quit [Ping timeout: 240 seconds]
freerobby has quit [Quit: Leaving.]
noop has quit [Ping timeout: 248 seconds]
devoldmx3 has joined #ruby
<dawkirst>
hi, when I'm writing tests for a method, does each possible return permutation get its own test method, or do I test all permutations in one method?
noop has joined #ruby
dallasm_ has quit [Remote host closed the connection]
zipace has quit [Remote host closed the connection]
<hoelzro>
dawkirst: it's up to you, but I prefer to keep my test methods small
<hoelzro>
so I favor the former
<dawkirst>
hoelzro, makes sense. Thanks.
devoldmx has quit [Ping timeout: 260 seconds]
<xybre>
dawkirst: You want your tests granular so you can see where the failures are. A large test could fail for many reasons and it will likely take longer to debug.
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
mlpinit has quit [Read error: Operation timed out]
interactionjaxsn has joined #ruby
tonini_ has quit [Ping timeout: 252 seconds]
brisbin has quit [Quit: WeeChat 0.4.1]
brisbin has joined #ruby
snovak has joined #ruby
<catphish>
i'm having trouble with sqlite3 and character encodings, it seems that a binary string won't match ascii data in the database, not sure why :(
niklasb has quit [Ping timeout: 246 seconds]
burlyscudd has joined #ruby
buibex has joined #ruby
rickmasta has joined #ruby
cody-- has joined #ruby
Xeago has quit [Remote host closed the connection]
zcourts has joined #ruby
leonidlm has quit [Read error: Operation timed out]
nikeita has joined #ruby
krz has joined #ruby
mary5030 has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 240 seconds]
devoldmx3 has quit [Ping timeout: 264 seconds]
hamakn has joined #ruby
tonini_ has joined #ruby
devoldmx has joined #ruby
polaco_zZz is now known as polaco
ZoanthusR has joined #ruby
dmiller has joined #ruby
ewnd9 has joined #ruby
Banistergalaxy has joined #ruby
burlyscudd has quit [Read error: Operation timed out]
jerius has joined #ruby
fuhgeddaboudit has quit [Remote host closed the connection]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
jlast has joined #ruby
zoee has quit [Quit: zoee]
atno has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
tonini_ has quit [Ping timeout: 240 seconds]
dmiller has quit [Ping timeout: 240 seconds]
alx- has joined #ruby
devoldmx3 has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
pellenation has joined #ruby
devoldmx has quit [Ping timeout: 252 seconds]
lupine has quit [Ping timeout: 245 seconds]
mansi has joined #ruby
cody-- has quit [Quit: derp]
codecop has quit [Remote host closed the connection]
supergeek has quit []
mansi has quit [Remote host closed the connection]
lupine has joined #ruby
mansi has joined #ruby
joofsh has joined #ruby
Banistergalaxy has joined #ruby
nhhagen has joined #ruby
adoming has joined #ruby
xcv has joined #ruby
petey has joined #ruby
theRoUS has quit [Ping timeout: 246 seconds]
ce_afk is now known as cescalante
derf-- is now known as derf-
derf- is now known as derf-_
VTLob has joined #ruby
leonidlm has joined #ruby
derf-_ is now known as derf-
mansi has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
kay_ has joined #ruby
nikeita has quit [Quit: sleep]
jbpros has quit [Quit: jbpros]
abstrusenick has quit [Quit: abstrusenick]
scarolan has quit [Ping timeout: 240 seconds]
duggiefresh has joined #ruby
LMolr has quit [Read error: Operation timed out]
gwb3 has joined #ruby
mark- has quit [Ping timeout: 260 seconds]
duggiefresh has quit [Remote host closed the connection]
nikeita has joined #ruby
duggiefresh has joined #ruby
gwb3 has quit [Client Quit]
Matriks has joined #ruby
mark- has joined #ruby
udoprog has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
poikon has joined #ruby
leonidlm has quit [Ping timeout: 260 seconds]
gwb3 has joined #ruby
gwb3 has quit [Changing host]
gwb3 has joined #ruby
kpshek has joined #ruby
<udoprog>
Does anyone have experience with building fully working and isolated ruby environments (rvm/rbenv/?) bundled in debian packages? I've been working both with rvm and rbenv and both make assumptions that your environment folder cannot be moved after it has been built (rvm being the worse of the two).
duggiefresh has quit [Ping timeout: 246 seconds]
evenix has quit [Remote host closed the connection]
admin0 has quit [Read error: Connection reset by peer]
<nyuszika7h>
either way, you're misunderstanding something
hadees has quit [Read error: Connection reset by peer]
<bean__>
object.hash says
<bean__>
The hash value is used along with eql? by the Hash class to determine if two objects reference the same hash key. Any hash value that exceeds the capacity of a Fixnum will be truncated before being used.
mklappstuhl has quit [Remote host closed the connection]
<bean__>
The hash value for an object may not be identical across invocations or implementations of ruby. If you need a stable identifier across ruby invocations and implementations you will need to generate one with a custom method.
hadees has joined #ruby
mikepack has joined #ruby
<kraljev2>
The hash value is used along with eql? by the Hash class to determine if two objects reference the same hash key.
<kraljev2>
sure
<bean__>
>> a = "string"; b = "string"; [a.hash, b.hash]
mikepack has quit [Remote host closed the connection]
<kraljev2>
we are closer
larissa has quit [Quit: Leaving]
alyi has joined #ruby
<kraljev2>
the hash values are equal in the same invocation of the program
<bean__>
correct
<kraljev2>
but why are they not in consequent runs
<nyuszika7h>
kraljev2: because they're different objects
|jemc| has joined #ruby
hadees has left #ruby [#ruby]
<kraljev2>
a and b are different objects too
Squarepy__ has quit [Client Quit]
<kraljev2>
but, you see, same hash
Squarepy_ has quit [Ping timeout: 264 seconds]
<bean__>
The hash value for an object may not be identical across invocations or implementations of ruby.
thetristan has joined #ruby
<bean__>
as it says
<lectrick>
Is there something like Object#hash, but which gives the same value for an identical object? For example, the output of {1 => 2}.hash is different on different IRB runs, ostensibly due to incorporation of object_id or something. I need something deterministic
<bean__>
in Object#hash
codecop has joined #ruby
<bean__>
its likely due to the object Id
<bean__>
i'd imagine
adeponte has joined #ruby
<nyuszika7h>
lectrick, kraljev2: why don't you use Digest::SHA1?
|jemc| has quit [Client Quit]
<lectrick>
ok this is weird, I did not see the prior conversation before I posted that question
<kraljev2>
overhead
<nyuszika7h>
you can even convert the hex digest to an integer if you must
<lectrick>
what are the chances that I post a hash question in the middle of a hash conversation?
mrsolo has joined #ruby
Squarepy has quit [Ping timeout: 248 seconds]
<bean__>
lectrick: haha, yeah
<siezer>
I'm using pry to debug some rspec... anyone know how I can list the mocks/stubs I've set?
swordsmanz has quit [Quit: swordsmanz]
coderhs has joined #ruby
quoin has joined #ruby
|jemc| has joined #ruby
<lectrick>
nyuszika7h: I can't use that unless I have a way to identify the hash of any object in a deterministic fashion. I could Digest::SHA1 the .inspect of the object I guess, but the .inspect incorporates the object_id which is not deterministic
bamdad has quit [Quit: bamdad]
mikepack has joined #ruby
krz has quit [Quit: krz]
<nyuszika7h>
lectrick: oh, you aren't looking for hashing strings... well, I don't know then
<lectrick>
I can't even 1.hash the same number between different runs of IRB
<bean__>
lectrick: that is correct
<bean__>
as it should be
kraljev2 has left #ruby [#ruby]
<nyuszika7h>
>> require 'digest/sha1'; p Digest::SHA1.new('test')
<eval-in>
nyuszika7h => wrong number of arguments (1 for 0) (ArgumentError) ... (https://eval.in/51993)
<nyuszika7h>
>> require 'digest/sha1'; p Digest::SHA1('test')
tylersmith has quit [Remote host closed the connection]
<lectrick>
that ideally doesn't just work with strings. perhaps what I need is a deterministic string representation of any object (like a YAML.dump?) and maybe then just SHA hash that?
renanoronfle has quit [Quit: This computer has gone to sleep]
blackratdog has joined #ruby
tylersmith has joined #ruby
sectionme has quit [Ping timeout: 240 seconds]
<nyuszika7h>
lectrick: out of curiosity, why do you need an ID?
mikepack has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
<lectrick>
nyuszika7h: where did I say I needed an ID?
blob has quit [Ping timeout: 245 seconds]
<nyuszika7h>
you said you need a hash/ID/whatever
<nyuszika7h>
that is same across different runs
iamjarvo has quit [Remote host closed the connection]
<nyuszika7h>
also, if you were to hash a representation, I'd use JSON
<lectrick>
basically, I discovered the concept of "consistent hash" just yesterday, promptly wrote this https://gist.github.com/pmarreck/6784834 and realized I don't like the crc32 hash of a .inspect lol
iamjarvo has joined #ruby
<bean__>
me too.
<lectrick>
JSON is a good idea if I could as_json all ruby objects
aleron has quit [Quit: leaving]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bean__>
you could marshall the object
aleron has joined #ruby
<lectrick>
to a string?
tylersmith has quit [Ping timeout: 240 seconds]
vince_prignano has joined #ruby
quoin has quit [Ping timeout: 252 seconds]
geekbri has quit [Remote host closed the connection]
BSaboia has joined #ruby
deception has joined #ruby
Macaveli has joined #ruby
_JamieD_ has quit [Quit: _JamieD_]
joofsh has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
<apeiros>
sadly, kraljev2 has gone already as it seems
blob has quit [Ping timeout: 248 seconds]
ThePicard has quit [Ping timeout: 240 seconds]
cescalante is now known as ce_afk
thisirs has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
leonidlm has quit [Ping timeout: 252 seconds]
MrZYX is now known as MrZYX|off
pellenation has joined #ruby
tkuchiki has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
MrZYX|off is now known as MrZYX
sambao21 has joined #ruby
tkuchiki has joined #ruby
rickmasta has quit [Quit: Leaving...]
hamed_r has joined #ruby
mansi has quit [Read error: Connection reset by peer]
kilophoton has joined #ruby
mansi has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.1]
dagobah has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
freezey has joined #ruby
rickmasta has joined #ruby
RicFlair is now known as ArchBeOS
cj3kim has joined #ruby
xcv has joined #ruby
g0bl1n has quit [Quit: g0bl1n]
jbynum has quit [Quit: Computer has gone to sleep.]
blob has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
tonni has quit [Remote host closed the connection]
cj3kim has quit [Remote host closed the connection]
Stalkr has joined #ruby
user258467 has quit [Quit: Quitte]
cj3kim has joined #ruby
ehaliewicz has joined #ruby
KobraKao has joined #ruby
amsi has joined #ruby
volty has joined #ruby
ce_afk is now known as cescalante
wallerdev has joined #ruby
Stalkr has quit [Ping timeout: 260 seconds]
mneorr has quit [Remote host closed the connection]
sarlalian has joined #ruby
spider-mario has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
kil0byte_ has quit [Remote host closed the connection]
hamed_r has quit [Quit: Ex-Chat]
atno has quit [Read error: Connection reset by peer]
alup has quit [Quit: Leaving]
ukd1 has joined #ruby
quoin has joined #ruby
tjad has quit [Ping timeout: 252 seconds]
Stygia has quit [Quit: Leaving]
KobraKao has quit [Quit: Saindo]
leonidlm has joined #ruby
duggiefresh has joined #ruby
lmickh has joined #ruby
<lectrick>
apeiros: can you manually seed the hash with your own value?
mlpinit has joined #ruby
pushpak has quit [Ping timeout: 245 seconds]
colonolGron has joined #ruby
<lectrick>
Or is there another way to make ruby's hash deterministic?
<apeiros>
sadly it's not tied to srand
Mars` has joined #ruby
<lectrick>
damn.
headius has joined #ruby
<apeiros>
and last I checked I saw no way to force a specific seed
blackratdog has quit [Quit: This computer has gone to sleep]
<apeiros>
I'd ask in the ML
<apeiros>
headius might know too…
julweber has quit [Remote host closed the connection]
nemesit|znc has quit [Ping timeout: 264 seconds]
ukd1 has quit [Remote host closed the connection]
<lectrick>
What I'm looking for is a deterministic hash of any arbitrary Ruby object. I suppose I'm considering a crc32 of a YAML.dump but I'm not entirely happy with that.
<apeiros>
understandable
<apeiros>
(that you're not happy with that)
tonni has joined #ruby
pel_daniel has joined #ruby
<lectrick>
;)
julweber has joined #ruby
<headius>
lectrick: I don't think there's a way in MRI, but JRuby has a setting to do consistent hashes
<apeiros>
headius: btw., java port of ZXing might finally do the trick and bring me to jruby :D
Macaveli has quit [Quit: Computer has gone to sleep.]
threesome has joined #ruby
<nhmood_>
I'm trying to use Digest::MD5.digest() inside a Module->Class of mine but it keeps trying to scope it within MyModule::MyClass::Digest, how can I access just Digest::?
<lectrick>
headius: interesting that only jruby has a way. Is a consistent hash considered a possible security problem? Is that why it might be by design? I do wish userland runtime Ruby let you pick how hashes work
<avril14th>
nhmood_: write ::Digest::MD5
<avril14th>
the '::' prepend set general scope
<avril14th>
IIRC
<nhmood_>
avril14th : is :: the "global" Ruby scope?
<avril14th>
yes :)
<nhmood_>
Ahh, I see I'll give that a try
wyan has left #ruby [#ruby]
<headius>
apeiros: oh, you meant because that library is java, it might bring you to JRuby…got it :-)
schaerli has joined #ruby
<headius>
lectrick: well consistent hashes proved to be a security issue of a sort, which is what brought on all the many iterations of hashing
r0bgl33s0n has quit [Ping timeout: 256 seconds]
<headius>
but if it's a system not exposed to uncontrolled data (the original issue was hash keys coming in from web requests) consistent hashing can be a nice thing to have
io_syl has joined #ruby
<apeiros>
headius: yes :)
r0bgl33s0n has joined #ruby
xk_id has quit [Quit:
<apeiros>
headius: I know there's some lib which lets you use java classes in MRI, but that one's cheating :)
asteros has joined #ruby
freezey has quit [Remote host closed the connection]
sambao21 has quit [Read error: Connection reset by peer]
klaut has quit [Remote host closed the connection]
<apeiros>
headius, lectrick: I think defaulting to seeded hashes is a good thing. but things like testing should have a way for #hash to be explicitly seeded. also it'd be nice if there was an explicit #consistent_hash for things like distributed systems
leonidlm has joined #ruby
<apeiros>
I mean of course one can rebuild #hash's functionality. but it's a) already there and b) it'd be tedious and error prone
<headius>
apeiros: yeah it works, but not as nice as JRuby
<headius>
apeiros: and MRI doesn't dispatch to #hash in many places
<apeiros>
headius: I thought it actually just started jruby in the back and used drb?
<apeiros>
not sure, though
tylersmith has joined #ruby
spider-mario has quit [Quit: No Ping reply in 180 seconds.]
platzhirsch1 has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
<apeiros>
eh, now I'm confused which topic we're talking about :D
adeponte has quit [Remote host closed the connection]
Guest23985 has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
platzhirsch has quit [Ping timeout: 248 seconds]
Xeago has quit [Remote host closed the connection]
<enricostn>
I'm trying this one
<enricostn>
ActiveRecord::Base.stub(:connection, {:instance_values => { "config" => "mysql"}}) do .. end
cjs226 has joined #ruby
<enricostn>
but I get
endash_ has quit [Quit: endash_]
<enricostn>
NoMethodError: undefined method `stub' for ActiveRecord::Base:Class
spider-mario has joined #ruby
geekbri has joined #ruby
pellenation has quit [Quit: Leaving.]
devoldmx has joined #ruby
b00stfr3ak has joined #ruby
nikeita has joined #ruby
zastern__ has quit [Remote host closed the connection]
duggiefr_ has joined #ruby
deception has quit [Quit: Goodbye]
<headius>
apeiros: which lib does that?
allsystemsarego has quit [Read error: Connection reset by peer]
<headius>
rjb actually boots a jvm in process
duggiefr_ has quit [Remote host closed the connection]
conner has joined #ruby
duggiefr_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
zeade has joined #ruby
schaerli has quit [Remote host closed the connection]
adeponte has quit [Ping timeout: 245 seconds]
segmond has joined #ruby
rickmasta has quit [Quit: Leaving...]
lukec has joined #ruby
DanKnox_away is now known as DanKnox
maoko has joined #ruby
<apeiros>
hrmpf, don't remember the name
Mars` has quit [Remote host closed the connection]
enebo has joined #ruby
slash_ni1k is now known as slash_munge
sandelius has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
geekbri has quit [Read error: Operation timed out]
leonidlm has quit [Read error: Operation timed out]
xk_id has joined #ruby
cjs226 has quit [Remote host closed the connection]
Rollabunna has quit [Remote host closed the connection]
duggiefr_ has quit [Ping timeout: 252 seconds]
cjs226 has joined #ruby
<apeiros>
searching for java MRI yields interesting results - nothing to do with what I was looking for, though :D
Zai00 has quit [Ping timeout: 240 seconds]
<apeiros>
maybe it was rjb
benlieb has quit [Quit: benlieb]
johnnyfuchs has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Operation timed out]
johnnyfuchs has joined #ruby
Zai00 has joined #ruby
conner has quit [Ping timeout: 260 seconds]
Goopyo has quit [Quit: Goopyo]
saarinen has joined #ruby
twoism has joined #ruby
alx- has quit [Read error: Connection reset by peer]
Alex- has joined #ruby
whunt has quit [Quit: Computer has gone to sleep.]
Macaveli has joined #ruby
Stalkr^ has joined #ruby
mike1992 has joined #ruby
momomomomo has quit [Quit: momomomomo]
beaky has joined #ruby
<beaky>
hello
iamstalkr has joined #ruby
Alex- has quit [Read error: Connection reset by peer]
Stalkr^ has quit [Read error: Connection reset by peer]
<havenwood>
Nothing is faster at Haskelling than Haskelling Haskell.
<Morrolan>
Also, what kind of files are you operating on that the speed difference matters?
superscott[8] has joined #ruby
<Morrolan>
They must be quite big. :P
neku has joined #ruby
<beaky>
wow how did you guys port it so fast how do i motivate myself to learn more elegant ruby like you
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<beaky>
i am operating on codebases
Guest33959 has quit [Remote host closed the connection]
<bean__>
you just write a lot of ruby.
<bean__>
is all
andikr has quit [Remote host closed the connection]
<deepy>
Didn't you ask the exact same question in #python?
iamjarvo has joined #ruby
elaptics is now known as elaptics`away
Kovensky has joined #ruby
<beaky>
ah yes
<beaky>
ok i will try to write my own python version
<beaky>
and i will see which langauge i like best
<beaky>
so far i like ruby
* Morrolan
looks at the Haskell version
<Morrolan>
Aaah, my eyes.
shanlar has quit [Quit: Be back later]
<beaky>
yes my haskell is bad too
<beaky>
i suck at programing
<Morrolan>
Practice makes perfect. :)
c0rn has quit [Quit: Computer has gone to sleep.]
<roflmaus>
My question is about gem dependencies. If gems A and B depend on different versions of gem C, and i use both A and B in a project, will there be a conflict?
<volty>
i want to thank beaky for showing me how ugly haskell is :)
<volty>
lisp/scheme repackaged
dangerousdave has quit [Quit: Leaving...]
<beaky>
maybe i can rewrite the haskell one as a onelineer
<Morrolan>
I assume it can be done prettier. But I wouldn't know, don't know Haskell. :)
dmiller__ has joined #ruby
shanlar has joined #ruby
<apeiros>
roflmaus: possible. can't be deduced just from that information.
Banistergalaxy has joined #ruby
<volty>
beaky: could you show us the benchmarks ?
<apeiros>
roflmaus: you'd use the newer version and depending on how backwards compatible is and what features the one depending on the older version needs you'll have or have not conflicts
<beaky>
beaky@archive ~/longlines % time ./longlines ~/git/*.c ~/git/*.h >/dev/null
<beaky>
0.01s user 0.02s system 96% cpu 0.031 total
<beaky>
:D
<roflmaus>
apeiros, so Ruby gem system does not allow different versions of the same gem, like Node does?
<volty>
and the ruby's ?
<beaky>
ruby ./longlines.rb ~/git/*.c ~/git/*.h > /dev/null 0.15s user 0.00s system 96% cpu 0.151 total
quoin has joined #ruby
<beaky>
not bad
lewtds has joined #ruby
<apeiros>
roflmaus: loaded at the same time? no
rezzack has joined #ruby
<apeiros>
roflmaus: node allows "packages" (however they're called in node) of different version at the same time?
<beaky>
my microbenchmarks are not very scientific :(
<volty>
we see it :)
<lewtds>
bnagy: earlier today I asked about a library to talk to interactive programs, turns out there really is one:
cj3kim has quit [Remote host closed the connection]
<sandelius>
I have an array with data in my Rack app and I need it to be reloaded after each request since new data is putted in. Right now it's just appending the data.
saarinen has quit [Quit: saarinen]
iliketurtles has joined #ruby
michael_mbp is now known as zz_michael_mbp
mansi has quit [Remote host closed the connection]
mmitchell has joined #ruby
<roflmaus>
apeiros, yes. For every dependency listed in Node's Gemfile counterpart, it downloads a tree of dependencies into your project's folder locally. A blank DerbyJS project weighs 144 MiB and contains 12990 files (sic!).
<apeiros>
roflmaus: that's not really an answer to my question
<apeiros>
what you just said is the same with ruby & bundler
quoin has quit [Ping timeout: 246 seconds]
nadirvardar has joined #ruby
razi has quit [Ping timeout: 248 seconds]
<roflmaus>
apeiros, Ruby and Bundler store all gems in a single place, right? Every version of the gem is represented by exactly one copy?
boxmein has joined #ruby
tsykoduk is now known as zz_tsykoduk
carraroj has quit [Quit: Konversation terminated!]
<apeiros>
roflmaus: depends. you can have that per project. again, this is not the point of my question.
<apeiros>
the question is about *loaded in the same runtime*
sambao21 has quit [Quit: Computer has gone to sleep.]
<apeiros>
you can have as many versions of a gem as you want. you can't activate more than one version at the same time (== in the same runtime)
geekbri has joined #ruby
codelette has quit [Remote host closed the connection]
<apeiros>
roflmaus: it doesn't seem to talk about "loaded at the same time in the runtime"
<apeiros>
what he describes is the same with rubygems
carraroj has joined #ruby
<atmosx>
When I define a method in a module, is it the same as classes? Because I changed a class to a module and now it can't find the a defined method inside the module, while classes are able to read methods defined lower (or higher) in them.
<roflmaus>
apeiros, you said that with Ruby there will be a conflict (if backward compatibility is broken). That guy sais it will work unconditionally.
<apeiros>
roflmaus: you should pay attention.
<apeiros>
roflmaus: *runtime* vs. *installed*
<apeiros>
really, the difference matters.
sambao21 has joined #ruby
<zaltekk>
i'm using websockets to communicate with chromium's remote debugger api. currently, i'm using faye-websocket which builds on eventmachine. is there any way to abstract the eventmachine stuff away into a class?
ananthakumaran has quit [Quit: Leaving.]
<apeiros>
atmosx: what?
<zaltekk>
ideally you would be able to use this class rather than understanding the API going over the websocket
<apeiros>
atmosx: yes, methods in modules work the same as in classes. just that since modules can't be instantiated, you need it included in a class or extended on an object in order to call it.
<zaltekk>
i guess i'm at a loss on how to design this because it is trying to make an event loop into a synchronized api
<atmosx>
apeiros: https://gist.github.com/6797492 <-- this was a class. Now I siwtched it to a module and I get an error from unicorn "unknown method get_id" in line 20
<atmosx>
was a private class defined a coulpe of lines lower
<apeiros>
atmosx: that'd be the same if it was a class
<vpretzel>
volty: you may not recall who i am, but i managed to solve my ruby-1.9.3-p125 installation errors by wiping my system and rolling back to OS X 10.8
<apeiros>
there is no class-method .get_id
neku has quit [Quit: Leaving...]
<apeiros>
only an instance method. which means you need an instance (hence "instance" method)
mikepack has joined #ruby
T_T has quit [Remote host closed the connection]
vince_prignano has quit [Remote host closed the connection]
zz_tsykoduk is now known as tsykoduk
<apeiros>
atmosx: also you should probably not gist db credentials ;-)
<atmosx>
apeiros: so it was working because I was initializing the object before?
Banistergalaxy has quit [Ping timeout: 245 seconds]
elplatt has joined #ruby
<apeiros>
atmosx: no. because you instantiated the an object. and called the method on that instance.
<volty>
vpretzel: happy for you // i have good memory
<atmosx>
apeiros: heh good point.
<apeiros>
unrelated to initializing.
_JamieD_ has joined #ruby
vishal has quit [Remote host closed the connection]
Matriks_ has joined #ruby
Matriks has quit [Ping timeout: 256 seconds]
<apeiros>
atmosx: and tabs for indent is heresy :-p
<atmosx>
okay then I'm kinda lost, becuase it was working when instead of a module was a class.
<atmosx>
apeiros: oh, wanna take than on #vim ? :-P
<apeiros>
atmosx: like that? definitively not.
<atmosx>
yeah, I didn't change anything.
<roflmaus>
apeiros, when you do Node's `bundle install` equivalent, it stores packages as tree of folders. So both A and B folders will have a C subfolder. Dependencies are required from each package's subfolders. I don't know how it works, but from what i see i consider that it does allow different versions of the same package at runtime.
Nogbit has joined #ruby
<atmosx>
apeiros: still have the code unchanged in the master-branch.
<apeiros>
roflmaus: I don't work off from assumptions.
<volty>
atmosx: you are not lost
<apeiros>
atmosx: you somewhere did Pharmacy.new
<atmosx>
apeiros: yes sure.
<volty>
if you need the object id you call it from inside self.extended or self.included (or both)
<apeiros>
otherwise you simply can't call get_id
Matriks has joined #ruby
Matriks_ has quit [Read error: No route to host]
burlyscudd has quit [Quit: Leaving.]
<apeiros>
atmosx: you can't do Pharmacy.new with a module.
<volty>
if I understood what are you talking about
<apeiros>
that's instantiation. modules can't create an instance of themselves.
<volty>
yes apeiros
<apeiros>
as said before, you have to include it into a class and create an instance of that class
<apeiros>
or use extend on an object
freezey has joined #ruby
<atmosx>
okay
<atmosx>
so either I revert it back to a class...
<atmosx>
or I 'extend' it?
Macaveli has quit [Quit: Computer has gone to sleep.]
<apeiros>
atmosx: but I don't believe you that all you changed was `class` -> `module`
aleron has quit [Quit: Lost terminal]
<apeiros>
because the code you pasted there does definitively NOT work.
<roflmaus>
apeiros, i asked at #node.js. They say, JS has function scope, so multiple vesrions of the same package are perfectly possible at runtime.
poikon has quit [Remote host closed the connection]
<apeiros>
@address in line 12 & 20 is a different @address than in line 35 e.g.
<apeiros>
roflmaus: good. that part, ruby does not allow. you'd have to use namespaces or similar.
closer has quit [Ping timeout: 252 seconds]
dangerousdave has joined #ruby
<apeiros>
roflmaus: you could have understood that from what I said waaaaay earlier, though.
cj3kim has joined #ruby
renanoronfle has joined #ruby
duggiefr_ has joined #ruby
Es0teric has joined #ruby
closer has joined #ruby
<atmosx>
apeiros: address in line 35 was never actually called/tested but should just display info about the given 'id', you say it won't work? @address just fetches an object (info) from the db using a given 'id' that's all.
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duggiefr_ has quit [Remote host closed the connection]
LMolr has joined #ruby
<apeiros>
atmosx: as said, it's not the same variable
<apeiros>
class methods belong to the class, which is a different object than instance of a class
burlyscudd has joined #ruby
duggiefr_ has joined #ruby
<apeiros>
sorry. *instance variables in class methods belong to the class
<roflmaus>
apeiros, but Node's approach produces tremendous duplication. Gonna have to store my code elsewhere, otherwise Node will beat the f#@k out of my Dropbox account. Thx for clarifications and sorry for offtopic.
zz_michael_mbp is now known as michael_mbp
enebo has quit [Quit: enebo]
sepp2k has joined #ruby
Dwarf_ has quit [Ping timeout: 260 seconds]
carraroj has quit [Remote host closed the connection]
interactionjaxsn has quit [Remote host closed the connection]
ji9t has joined #ruby
nikeita has joined #ruby
interactionjaxsn has joined #ruby
xk_id has quit [Quit:
saarinen has joined #ruby
apeiros has joined #ruby
<ji9t>
hi could someone help me with a simple syntax question? I'm trying to create this command with rmagick to save a file, but i'm not sure the syntax to include multiple arguments in the curly braces... the self.density and self.quality arguments http://pastebin.com/zjfAiSAk
<ji9t>
seems like a comma is not the way to separate them?
<ji9t>
sorry for my novice question :)
kevind_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
<bean__>
ji9t: combined_image.density and combined_image.info.quality
interactionjaxsn has quit [Ping timeout: 240 seconds]
<ji9t>
ill try that
<bean__>
could try a semicolon tho
kevind has quit [Ping timeout: 248 seconds]
tonni has joined #ruby
dangerousdave has quit [Quit: Leaving...]
kevind_ is now known as kevind
endash_ has quit [Ping timeout: 246 seconds]
<ji9t>
ah! looks like it was a semicolon
<ji9t>
thanks for your help bean__
<bean__>
np
<ji9t>
i probably should have been able to figure that out on my own :P
<ji9t>
thx again, bye bye
<rumours>
self.density, self.quality = 300, 100 but not sure
ji9t has quit [Quit: Page closed]
iamjarvo has joined #ruby
dangerousdave has joined #ruby
interactionjaxsn has joined #ruby
ADot has quit [Quit: Leaving.]
oozeman has joined #ruby
oozeman has quit [Client Quit]
oktapodi_ has left #ruby [#ruby]
tatsuya_o has joined #ruby
zygew has joined #ruby
cj3kim has quit [Remote host closed the connection]
duggiefr_ has joined #ruby
duggiefr_ has quit [Remote host closed the connection]
dmiller__ has joined #ruby
duggiefr_ has joined #ruby
troessner has quit [Quit: Leaving]
end_guy has quit [Remote host closed the connection]
platzhirsch has joined #ruby
<platzhirsch>
Is there a block symbol notation for hash access? array_of_hashes.map(&:"[:id]") ?
schaerli has joined #ruby
quoin has joined #ruby
brennanMKE has quit [Remote host closed the connection]
dmiller__ has quit [Ping timeout: 240 seconds]
duggief__ has joined #ruby
duggiefr_ has quit [Ping timeout: 245 seconds]
Stalkr has joined #ruby
lmickh has quit [Read error: Connection reset by peer]
<rumours>
rumours: yep works, nice
dhruvasagar has quit [Ping timeout: 245 seconds]
lmickh has joined #ruby
schaerli has quit [Ping timeout: 245 seconds]
duggief__ has quit [Remote host closed the connection]
smashwilson has joined #ruby
quoin has quit [Ping timeout: 248 seconds]
bricker has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
saarinen has quit [Quit: saarinen]
volty has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
havenwood has quit [Remote host closed the connection]
<shevy>
platzhirsch I think you need to pass in a valid symbol name to this
benlieb has quit [Quit: benlieb]
<BraddPitt>
would (0...arr.length-1) be the same as (0..arr.length-2) ?
<shevy>
platzhirsch and without trying your code, it seems you send a string object here
havenwood has joined #ruby
nemesit|znc has quit [Ping timeout: 264 seconds]
<shevy>
BraddPitt yeah, but that is one fucked up way to compare...
zizzl has joined #ruby
<shevy>
most of the time I feel .. is more useful
<BraddPitt>
right, was just checking because my solution was the latter, provided solution was the former
dsferreira has quit [Quit: Leaving]
carraroj has quit [Quit: Konversation terminated!]
<bean__>
BraddPitt: are you iterating over an array?
pipecloud has joined #ruby
dhruvasagar has joined #ruby
huoxito has quit [Read error: Connection reset by peer]
jefflyne has quit [Quit: WeeChat 0.4.1]
xcv has quit [Remote host closed the connection]
bricker has joined #ruby
aeontech has joined #ruby
lmickh1 has joined #ruby
lmickh has quit [Read error: Connection reset by peer]
nemesit|znc has joined #ruby
aeontech has quit [Read error: Connection reset by peer]
codeFiend has joined #ruby
<platzhirsch>
shevy: okay, just did a bit of research, this won't work because it's just an underlying to_proc implementation of Symbol. I thought I can pass method name AND arguments with this syntax
staafl has quit [Quit: Leaving]
codecop has quit [Remote host closed the connection]
Bira_ has quit [Remote host closed the connection]
staafl has joined #ruby
tjsousa has quit [Read error: Operation timed out]
michael_mbp is now known as zz_michael_mbp
diegoviola has joined #ruby
momomomomo has joined #ruby
<apeiros>
platzhirsch: some people made libs to allow that
<apeiros>
I don't like them, though
<apeiros>
(the libs, not the people)
zastern has joined #ruby
<platzhirsch>
It's not an advantage anymore if your invocation becomes so obscure
spider-mario has quit [Remote host closed the connection]
<platzhirsch>
just got curious
einarj has joined #ruby
codeFiend has quit [Ping timeout: 252 seconds]
<shevy>
I use &: only when it's a simple method alone
zastern_ has quit [Ping timeout: 240 seconds]
<shevy>
like &:strip
<canton7>
your example was the same number of chars as just using a block, ommitting whitespac
<canton7>
*whitespace
jerius has quit [Ping timeout: 246 seconds]
russt_ has joined #ruby
russt_ has quit [Client Quit]
cjs226 has joined #ruby
Aloysius1 has quit [Ping timeout: 240 seconds]
DrCode has quit [Ping timeout: 240 seconds]
tonni has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
<apeiros>
hm, scan_args the only way to capture a block in C ruby?
iamjarvo has quit [Ping timeout: 264 seconds]
nwertman has quit [Ping timeout: 264 seconds]
joofsh has quit [Read error: No route to host]
joofsh_ has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
DrCode has joined #ruby
jenrzzz has joined #ruby
codeFiend has joined #ruby
einarj has quit [Ping timeout: 260 seconds]
Monie has joined #ruby
g0bl1n has joined #ruby
freezey has joined #ruby
noop has quit [Ping timeout: 246 seconds]
codecop has joined #ruby
jlast_ has joined #ruby
<RubyPanther>
apeiros: I'm no help, I can't tell what you're asking in general, what you mean by "capture a block," or what (rb_)scan_args would have to do with that
iliketurtles has quit [Quit: zzzzz…..]
jerius has joined #ruby
<apeiros>
capture a block -> assign it to a variable of type VALUE (to be then assigned to an ivar via rb_ivar_set)
gyzmodo has quit [Ping timeout: 240 seconds]
<apeiros>
rb_scan_args with '&' can capture a block
thelamest has quit [Quit: thelamest]
tonni has joined #ruby
jlast has quit [Ping timeout: 240 seconds]
MrZYX is now known as MrZYX|off
jlast_ has quit [Ping timeout: 248 seconds]
jlast has joined #ruby
<RubyPanther>
apeiros: does that mean creating it from a string similarly to eval?
dhruvasagar has quit [Ping timeout: 248 seconds]
fuhgeddaboudit has joined #ruby
renanoronfle_ has joined #ruby
<apeiros>
no. the equivalent of `def foo(&block); @block = block; end` in C
iamjarvo has joined #ruby
c0rn has quit [Ping timeout: 264 seconds]
kyle__ has joined #ruby
haxrbyte_ has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
<apeiros>
hm, at the moment I'm obviously doing something wrong with rb_scan_args too, otherwise I'd provide an example of using that…
<kyle__>
I'm running into a problem with the ruby-msg gem, specifically the Mapi/Pst portion. Is anyone out there familiar enough with it to lend a hand?
<endless_walrus>
hi all. im working with Net::HTTP::Persistent and i'm trying to discern why certain methods are called. does anyone know what the actual difference between shutdown and finished is, and when reset would be called?
kofno has quit [Ping timeout: 240 seconds]
tsykoduk is now known as zz_tsykoduk
<RubyPanther>
apeiros: rb_block_proc() will convert an implicit block into a proc, then you can use rb_funcall(proc, rb_intern("call"),...)
iamjarvo has quit [Ping timeout: 256 seconds]
nwertman has joined #ruby
<apeiros>
ugh, it wants -1 as argcount, that was my issue
huoxito has joined #ruby
<apeiros>
RubyPanther: ah, thanks
<apeiros>
`rb_define_method(rb_cFastEPT, "initialize", rb_eptables_initialize, -1);` and then in rb_eptables_initialize: `rb_scan_args(argc, argv, "0&", &proc);`
haxrbyte_ has quit [Ping timeout: 246 seconds]
<apeiros>
that's what I was using (or tried to, since I had the argcount set to 0, then to 1 - and both resulted in funny errors)
<apeiros>
I'll try rb_block_proc now too. for a zero arg method, that seems nicer.
<RubyPanther>
yeah, the -1 stuff can be... sigh inducing
mark_locklear has quit [Quit: Leaving]
beaky has quit [Quit: leaving]
MrThePla_ has joined #ruby
<apeiros>
works fine too
<apeiros>
rb_block_proc that is. IMO the nicer solution. will use that. thanks RubyPanther!
<RubyPanther>
yw :) <3 C
nomenkun has joined #ruby
rahulkmr1 has joined #ruby
<apeiros>
I hate C, mostly because I just know too little about it and can't find good resources :-/
<apeiros>
i.e., I don't hate C for being C but because of the circumstances
wyan has joined #ruby
dhruvasagar has joined #ruby
<IceDragon>
apeiros, I learnt C by studying ruby's extensions and code..
_JamieD_ has quit [Quit: _JamieD_]
<IceDragon>
>-> C doesn't have any good tutorials up for grabs
MrZYX|off is now known as MrZYX
<weeb1e>
Anyone know what could cause this on random Windows systems? warning: failed to load encoding (CP1250); use ASCII-8BIT instead
headius has quit [Quit: headius]
<kyle__>
apeiros: C is great. Start out here: http://cm.bell-labs.com/cm/cs/cbook/ There are DOZENS of places that host pdfs or epubs of this book. Some of them even belivably legitimate.
<weeb1e>
Using the same package containing ruby and all dependencies works fine on most windows machines, but one user reported warnings like that on the following line: Encoding.default_external = 'utf-8'
rahulkmr has quit [Ping timeout: 256 seconds]
MrThePlague has quit [Ping timeout: 264 seconds]
Bira_ has joined #ruby
brennanMKE has joined #ruby
<apeiros>
IceDragon: all C I currently know is for the same reason :)
<apeiros>
kyle__: thanks for the link!
<IceDragon>
O: Well I love C, but I'm starting to like C++...
<IceDragon>
I think its SFML cause the change in me
<weeb1e>
Apparently Encoding.default_external = 'utf-8' causes "warning: failed to load encoding (CP1250); use ASCII-8BIT instead" on Windows 8
<weeb1e>
I wonder if there are any solutions
<apeiros>
I hope there's still that many C coders around when I'm done with this, to review my code a bit :)
headius has joined #ruby
<IceDragon>
>.> remove the encoding line
vince_prignano has joined #ruby
vince_prignano has quit [Remote host closed the connection]
<IceDragon>
If you really need it in a particular encoding just force_encoding on it
<weeb1e>
IceDragon: I needed it to solve inconsistencies between platforms
vince_prignano has joined #ruby
spider-mario has joined #ruby
<IceDragon>
;(
<weeb1e>
I couldn't solve all inconsistencies by only using force_encoding everywhere, probably due to one of the gems I'm using
<IceDragon>
Well can't help you there
* IceDragon
bows out
<weeb1e>
But surely force_encoding('utf-8') would cause the same issue if default_encoding does on Windows 8?
MrThePla_ has quit [Remote host closed the connection]
<weeb1e>
*default_external
MrThePlague has joined #ruby
vince_prignano has quit [Remote host closed the connection]
boxmein is now known as [boxmein]
<weeb1e>
I'm just trying to figure out why that warning occurs on Windows 8, what is different compared to 7 or XP
vince_prignano has joined #ruby
vince_prignano has quit [Client Quit]
bean__ has quit [Quit: Computer has gone to sleep.]
yaroslav has joined #ruby
<shevy>
hah
<shevy>
every 3rd time or so, when I look at #ruby, it's an encoding related problem
vince_prignano has quit [Remote host closed the connection]
vince_prignano has joined #ruby
<havenwood>
^ someone pointed out to me this week, poor soul stuck on a Win dev machine
<shevy>
sad fate
<havenwood>
self-imposed too
jinie has quit [Ping timeout: 245 seconds]
Davey has joined #ruby
danman has joined #ruby
<banisterfiend>
havenwood i remember my time spent getting C extensions to work on windows environments, it's a real pain
<banisterfiend>
i used to just build the binaries and ship "fatgems"
SHyx0rmZ has joined #ruby
<weeb1e>
havenwood: Good thing I chose to stick with 1.9.2 for my packaged windows application
sethetter has joined #ruby
<weeb1e>
But Win8 not supporting UTF-8 is somewhat worrying
vince_prignano has quit [Client Quit]
quoin has joined #ruby
<havenwood>
admittedly it baffles me
vince_prignano has joined #ruby
tonni has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
<havenwood>
anyone know of a Skein implementation in Ruby?
jinie has joined #ruby
coderhs has quit [Ping timeout: 240 seconds]
vince_prignano has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
<havenwood>
was thinking of porting a JavaScript implementation to pure Ruby since i can't find one in Ruby but might make more sense to take an existing C implementation and roll a gem: https://github.com/wernerd/Skein3Fish/tree/master/c
<sethetter>
I'm on ubuntu server 13.04 and having a lot of trouble getting nokogiri 1.5.x installing. I'm told libxslt is missing, but it's there. Everything I have found on google has not worked.
<platzhirsch>
lovely thing that hashes can take nil as a key... Groundbug Day
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy>
ubuntu probably has one from 8 years ago :P
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
<shevy>
checking for xsltParseStylesheetDoc() in -lxslt... -------------------- no
alvaro_o has joined #ruby
<shevy>
/usr/lib/libxslt.so
<sethetter>
shevy: I'll try to install from source. Thanks
<shevy>
actually, when I did "gem install nokogiri" some days ago, it also failed. perhaps we must come to realize that nokogiri is slowly dying
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
shevy: naw :P
<shevy>
havenwood it's all adding up slowly!
<shevy>
soon we all will be using ruby 2.1
nitish has joined #ruby
nitish has quit [Changing host]
nitish has joined #ruby
<Morrolan>
I'd prod #nokogiri before bothering with installing from source.
nitish has quit [Remote host closed the connection]
diegoviola has joined #ruby
rahulkmr1 has quit [Ping timeout: 260 seconds]
<Morrolan>
I *believe* I compiled Nokogiri on Debian stable a while ago, would be odd if Ubuntu 13 had older packages than that one.
<Morrolan>
But it might have been Debian testing, so no guarantees.
Valesk has quit [Ping timeout: 248 seconds]
amsi has quit [Ping timeout: 240 seconds]
skaflem has quit [Quit: Leaving]
sambao21 has joined #ruby
<platzhirsch>
I did gem install nokogiri some days ago and it worked on 13.10
<platzhirsch>
libxml dependency are just a pain
codeFiend has quit [Ping timeout: 245 seconds]
lmickh has joined #ruby
lmickh1 has quit [Read error: Connection reset by peer]
quoin has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
<sethetter>
Hmm.. Ok. I thought I had tried purging all libxml stuff and then reinstalling it all with apt-get, but no avail.
<sethetter>
Yes! Installing libxslt from source worked :D
lucazi is now known as lucazi_away
<Morrolan>
You did install the headers, right?
<Morrolan>
i.e. the ...-dev packages.
ferr has joined #ruby
<sethetter>
Morrolan: yep. I guess whatever apt-get was giving me didn't work.
i_s has joined #ruby
nemesit|znc has joined #ruby
lessless has quit [Remote host closed the connection]
schaerli has joined #ruby
wyan has left #ruby [#ruby]
ferr has quit [Client Quit]
Guest32927 has quit [Ping timeout: 245 seconds]
ferr_ has joined #ruby
<diegoviola>
how do you deal with a person that expects you to spoonfeed you everything he needs to know to do his/her job properly?
ferr_ has quit [Client Quit]
Valesk has joined #ruby
ferr_ has joined #ruby
<diegoviola>
i'm getting frustrated because i'm dealing with this situation righ tnow at my job, i have been assigned to "help" someone who is clueless and at the same time lacks the motivation to google and learn things on his own
ferr_ is now known as Ferr
<plotter>
you quit feeding them
Xeago has joined #ruby
<diegoviola>
it's suckingup my energy so much now
<plotter>
or you show them how to google properly
<havenwood>
diegoviola: a help vampire...
mary5030 has joined #ruby
<diegoviola>
he's waiting for me in Skype right now, I just uninstalled skype
mary5030 has quit [Remote host closed the connection]
Macaveli has joined #ruby
<shevy>
diegoviola lol
<Morrolan>
Depends on why you're spoonfeeding him. :P
<diegoviola>
i had to help him install/configure chruby/ruby-install yesterday, step by step over skype, while he shared his "precious" screen
bean__ has joined #ruby
robustus has quit [Ping timeout: 245 seconds]
mary5030 has joined #ruby
<diegoviola>
then i noticed he didn't know anything, not even bash or Git
<Morrolan>
Can you get away with just stopping doing so? :P
<diegoviola>
and he was copy/pasting all commands i gave to him in his shell
codeFiend has joined #ruby
<diegoviola>
then he came with questions "Right now I see Display all 2536 possibilities? (y or n) -- what do I do now?"
guardian has joined #ruby
<Morrolan>
Hahaha.
<diegoviola>
fucking idiot
<MrZYX>
I usually reply with things like "what do you think?" etc.
schaerli has quit [Ping timeout: 246 seconds]
<MrZYX>
just don't let them get away with such questions
<Morrolan>
Then he'd have pressed "y" and asked why his terminal was getting flooded.
coderhs has joined #ruby
<MrZYX>
force them to make decisions
elplatt has quit [Quit: elplatt]
<guardian>
hi, I have an array of strings. I want to find the last item that matches a string. I found there's rindex, is there something more direct than going through rindex?
<diegoviola>
he asked me if i can spoonfeed him on skype again, i told him i'm not in my computer and that i don't have a microphone
<MrZYX>
Morrolan: it's not my terminal. Not my issue ;)
sniffingcats has joined #ruby
<shevy>
diegoviola teach him bash first
robustus has joined #ruby
<billiam>
diegoviola: are your employers aware of just how much effort is going into this process, and how much more will be required?
amsi has joined #ruby
nomenkun has quit [Remote host closed the connection]
g0bl1n has quit [Quit: g0bl1n]
<diegoviola>
billiam: i don't think they know, no
<plotter>
has this guy never used a nix based system before?
<plotter>
ill work for a fraction of whatever he is being paid if i can telecommute =\
<diegoviola>
plotter: he's a designer, he knows a little of wordpress and photoshop, etc, but he knows nothing about bash, git or even what a terminal is
<plotter>
oh pfft designer
<diegoviola>
plotter: he was getting frustrated when i told him to open a terminal
<plotter>
i'm a developer
<plotter>
big difference
blackratdog has joined #ruby
sethetter has left #ruby [#ruby]
<plotter>
im colorblind
<diegoviola>
they have to be do some front end crap and i was told by the employer to teach him "how to be a developer" so he can do his work
<diegoviola>
but that's bullshit
<plotter>
if i make a ui other people will cringe
<diegoviola>
to do*
<billiam>
diegoviola: sounds like 4-6 months of solid 1 on 1 could get him up to speed if he tries. I assume you have no other work to do during that time, yes? :)
Bira_ has joined #ruby
<diegoviola>
billiam: i have other work to do, but i was told that i should make this a priority
bean__ has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
bean__ has joined #ruby
pwh has quit []
pellenation has joined #ruby
Bry8Star{T2 has joined #ruby
<diegoviola>
i have no patience for teaching at this point, not sure what i can do
<MrZYX>
has he been told to do everything you say?
nouitfvf has quit []
<diegoviola>
i'd be happy if someone else can take over really
<platzhirsch>
ok, so what are the odds that you can generate all possibilities out of a regular expression?
<diegoviola>
MrZYX: i believe so
renanoronfle_ has quit [Quit: This computer has gone to sleep]
joofsh_ has quit [Remote host closed the connection]
<MrZYX>
give him "figure out xyz and come back if you're stuck at one point for more than half an hour" tasks
xcv has joined #ruby
<shevy>
Ferr in general, when you use an if, you must also use an end
<yxhuvud>
diego: so what is the purpose of helping him? What is he supposed to do when everything is up and running?
<shevy>
Ferr the second thing you must do is to properly indent
<shevy>
if foo
<shevy>
if bar
<shevy>
end
<shevy>
^^^ not proper!
jlast has joined #ruby
<diegoviola>
MrZYX: i asked him to give me the full output of why postgresql is not starting for him, so i can try to help over email, but he won't respond to my emails when i ask that, he instead wants me to come to Skype and hold his hand step-by-step, giving him one-liners so he can copy-paste, etc
jlast has quit [Remote host closed the connection]
tjad has joined #ruby
nikeita has joined #ruby
jlast has joined #ruby
yalue has quit [Quit: Leaving]
<shevy>
diegoviola sounds like a girl
<diegoviola>
which is very frustrating, not to mention that screen-sharing skype crap is tedious as hell to use
<MrZYX>
who said he's making the rules. Just say no, we do it my way
<diegoviola>
shevy: ?
<shevy>
diegoviola hand holding for every miniscule step
lmickh has quit [Read error: Connection reset by peer]
joofsh has joined #ruby
<diegoviola>
right
lmickh has joined #ruby
<shevy>
*minuscule
<Ferr>
shevy, but if I use lots of ifs in ifs so just those have end where program stops, right?
kindjal has joined #ruby
peterhel_ has joined #ruby
peterhel_ has quit [Remote host closed the connection]
<yxhuvud>
ferr: don't use lots of ifs in ifs.
peterhel_ has joined #ruby
* |jemc|
is both amused and full of pity
<shevy>
Ferr see, ruby is dumb, you must usually tell it when you want to stop your conditionals
<shevy>
Ferr in the code you showed, you started a new if branch, but you did not use "end" to end it
* |jemc|
wants never to be put in that situation
<MrZYX>
s/usually//
peterhel_ is now known as peterhellberg_
peterhellberg_ has quit [Remote host closed the connection]
<Ferr>
so indenting would help me
<shevy>
MrZYX puts 'hi' if x < y
<shevy>
Ferr it should, but you forgot at least one end!
freezey has quit [Remote host closed the connection]
<diegoviola>
well, thanks guys, i appreciate your advice, i'll see what i end up doing
<diegoviola>
:)
Macaveli has quit [Quit: Computer has gone to sleep.]
<shevy>
diegoviola tell him to use IRC
<shevy>
and come here
<Ferr>
ok, thank you for the help
<shevy>
please
yacks has joined #ruby
<diegoviola>
shevy: ok
<Ferr>
I'll search some guides for proper indentation
Kabaka has quit [Remote host closed the connection]
<diegoviola>
shevy: i will suggest that as soon as he contacts me again
<diegoviola>
shevy: thanks
<shevy>
Ferr well, you already indent, but you forgot one "end", or you wanted to indent the rest of your code. look at line 26 in your own code
<billiam>
diegoviola: addtl suggestions: a) Set expectations with your employer for training timeline/effort. b) replace training with a configured VM and call it done.
<shevy>
diegoviola cool
<shevy>
diegoviola I hope he comes!
<shevy>
we have the chance to turn a designer into a developer guys
<diegoviola>
lol
<diegoviola>
nice
* MrZYX
prepares popcorn
Kabaka has joined #ruby
guardian has left #ruby [#ruby]
lucazi_away is now known as lucazi
<momomomomo>
who's the designer?
Valesk has quit [Ping timeout: 248 seconds]
volty has joined #ruby
<shevy>
some random guy who has been hired by diegoviola's bosses to steal his time
<momomomomo>
ah, diegoviola mentioned this in #ror
<diegoviola>
i did, sorry to bring it here as well
<shevy>
yeah, next step is that this guy will stalk him in reallife, from door to door
<diegoviola>
:p
<Ferr>
I see end on the line 26
<momomomomo>
:p
<shevy>
"hey man, skype is no longer working between the two of us ... can we talk face to face?"
<shevy>
Ferr yes but why is it there
Macaveli has joined #ruby
<shevy>
Ferr it has an indent level of 0, but your are already in the next if branch at line 16
codeFiend has quit [Quit: codeFiend]
<shevy>
if foo
<shevy>
if bar
Xaitec has joined #ruby
<shevy>
end # ^^^ close the if bar here
<shevy>
end # close if foo here
peregrine81 has joined #ruby
<Ferr>
I see
<shevy>
Ferr perhaps it is easier for you if you start from an empty file again
<shevy>
then you can build the conditional again
<Ferr>
Ye
Mars` has joined #ruby
saarinen has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
blackratdog has quit [Quit: This computer has gone to sleep]
elplatt has joined #ruby
asteros has joined #ruby
momomomomo has quit [Quit: momomomomo]
swordsmanz has joined #ruby
zygew has quit [Quit: Lost terminal]
Mars` has quit [Ping timeout: 240 seconds]
kil0byte has joined #ruby
mansi has quit [Remote host closed the connection]
Xiti has quit [Read error: Connection reset by peer]
<jokke>
hey
xcv has quit [Remote host closed the connection]
<jokke>
i'm trying to write a weechat plugin which uses drb. when i want to connect to the server (which is started by the plugin) i get the error DRb::DRbServerNotFound
<sarmiena_>
volty: hmmm so i have to define all defs in class_eval?
<sarmiena_>
why doesn't the include work?
pwh has quit [Ping timeout: 252 seconds]
<shevy>
sweeper on average? you mean they don't represent equal proportions? :P
neo_ has joined #ruby
neo_ has quit [Remote host closed the connection]
lmickh has quit [Read error: Connection reset by peer]
lmickh has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
nikeita has quit [Quit: bye bye]
<volty>
sarmiena_: If I were you I should think to change that implementation
dangerousdave has joined #ruby
<sarmiena_>
volty: well i'm trying to do a monkey patch on a class that includes another module
cads has quit [Max SendQ exceeded]
<sarmiena_>
i want to include my module and override some methods, but then call them after i'm done doing other stuff
cads has joined #ruby
<sarmiena_>
but obv super doesn't work because there's no inheritance
freezey has quit [Remote host closed the connection]
pwh has joined #ruby
<sarmiena_>
volty: what do you think?
evenix_ has quit [Remote host closed the connection]
evenix has quit [Remote host closed the connection]
evenix has joined #ruby
evenix_ has joined #ruby
cads has quit [Max SendQ exceeded]
xcv has joined #ruby
<volty>
it depends on exact requiments
cads has joined #ruby
BSaboia has quit [Ping timeout: 256 seconds]
kpshek has quit []
<volty>
i'm doing that when i cannot do it another, reasonable, way
QKO_ has quit [Ping timeout: 245 seconds]
Trynemjoel has quit [Ping timeout: 245 seconds]
Trynemjoel2 has joined #ruby
joofsh has joined #ruby
intuxicated has joined #ruby
evenix_ has quit [Ping timeout: 245 seconds]
evenix has quit [Ping timeout: 245 seconds]
<sarmiena_>
volty: so. PostgresqlAdapter includes ConnectionMethods (module). ConnectionMethods has methods I want to run custom code before, but then call original code
freezey has joined #ruby
<sarmiena_>
so i thought i could write a module that does alias.. override methods, then call original ones
sniffingcats has quit [Quit: Til rivido Idisti!]
Valesk has joined #ruby
QKO has joined #ruby
boboc has joined #ruby
Xeago has quit [Remote host closed the connection]
bline79 has joined #ruby
starfox21 has quit [Quit: starfox21]
<boboc>
guys, i have a question, i'm new to ruby and i follow a tutorial on a website. I would like to know where can i find the Ruby classes ivars? from the official docs i only see the methods: http://www.ruby-doc.org/core-2.0.0/
tjad has quit [Ping timeout: 246 seconds]
mercwithamouth has quit [Ping timeout: 246 seconds]
<bline79>
hello, I'm trying to get the variable $hostname to appear inside the parenthesis here. Can anyone help ? http://pastie.org/8373092
adambeyn_ has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
SteveBenner9 has joined #ruby
mrsolo has joined #ruby
agent_white has quit [Quit: leaving]
Monie has joined #ruby
snovak has quit [Remote host closed the connection]
kpshek has joined #ruby
<volty>
def self.included /* or extended */(obj); methods.each ... on obj.singleton_class.class_eval // alias ... def ... _prefix_connection_method; old_method
zz_tsykoduk is now known as tsykoduk
mansi has joined #ruby
sectionme has joined #ruby
mark_locklear has joined #ruby
renanoronfle has quit [Quit: This computer has gone to sleep]
kvirani has quit [Remote host closed the connection]
kvirani has joined #ruby
<shevy>
sweeper cool, I didn't know wikipedia even has statistics like that
evenix_ has joined #ruby
evenix has joined #ruby
quoin has joined #ruby
jbynum has joined #ruby
mlpinit has quit [Remote host closed the connection]
<SloggerKhan>
Anyone know what the best equivalent is to ::find_one in active record when you need to look up by a unique key that's not the primary key?
renanoronfle has joined #ruby
tsykoduk is now known as zz_tsykoduk
<bnagy>
you'll probably have more luck in one of the rails channels
sarlalian has quit [Quit: WeeChat 0.4.1]
ravster has quit [Quit: Leaving.]
sarlalian has joined #ruby
sectionme has quit [Ping timeout: 252 seconds]
zz_tsykoduk is now known as tsykoduk
carraroj has joined #ruby
MrThePlague has quit [Remote host closed the connection]
kvirani has quit [Read error: Connection reset by peer]
kvirani_ has joined #ruby
freezey has quit [Remote host closed the connection]
mol has quit [Read error: Connection reset by peer]
senayar has joined #ruby
lfox has quit [Quit: ZZZzzz…]
tonni has joined #ruby
funburn has joined #ruby
geekbri has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
<bean__>
bline79: A) you don't need to use a $ and B) use double quotes (") and then use #{hostname} once you've removed the $
ce_afk is now known as cescalante
tatsuya_o has joined #ruby
mark_locklear has quit [Ping timeout: 245 seconds]
codecop has quit [Remote host closed the connection]
allanm_ has joined #ruby
Nogbit has quit [Ping timeout: 256 seconds]
i_s has quit [Remote host closed the connection]
allanm has quit [Ping timeout: 248 seconds]
tonni has quit [Ping timeout: 245 seconds]
Elhu has joined #ruby
sarlalian has quit [Quit: WeeChat 0.4.1]
sarlalian has joined #ruby
carraroj has quit [Ping timeout: 245 seconds]
phantasm66 has quit [Quit: *sleeeep….]
Xaitec has quit [Remote host closed the connection]
* apeiros
wants people to be forced to pay 1$ for a good cause whenever they describe their problem with "not working"
<apeiros>
srsly
maycon has quit [Quit: Saindo]
<bean__>
bline79: where is "domain" defined
alyi has quit [Read error: Connection reset by peer]
BraddPitt is now known as w33dWizard[420]
alyi has joined #ruby
cjs226 has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby
joofsh has quit [Remote host closed the connection]
<bline79>
bean__: I have it defined above that. It is called out like: domain = 'domain.com'
<bean__>
okay
<bean__>
so what do you mean by "not working"
cjs226 has joined #ruby
Nogbit has joined #ruby
<bean__>
what is it doing instead :)
joofsh has joined #ruby
<apeiros>
the answer is obvious: he does it wrong.
<bean__>
right
zz_tsykoduk is now known as tsykoduk
<apeiros>
and you get it to work by fixing the part which is wrong. so simple.
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby
<canton7>
bline79, is it the ssh-ing that's broken, or the command it's running?
c0rn has quit [Quit: Computer has gone to sleep.]
agent_white has joined #ruby
<bline79>
the ssh part works fine, but this is not delivering the output I expect
<bline79>
can I echo this line inside ruby somehow ?
zizzl has quit [Quit: Page closed]
<canton7>
if it's the former, then what's the error? if you can execute something like 'touch tmp' and that works fine, then it's the command you're executing that's the problem, and we won't have a clue on how to fix that
<bline79>
I have the command running okay through ssh
jkamenik has quit [Quit: Leaving.]
<bline79>
and without these variables declared it works fine w/ ruby
interactionjaxsn has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
<bline79>
okie :)
<bline79>
this is working now
i_s has quit [Remote host closed the connection]
<bline79>
thanks for all the help guys
heathjs is now known as heath
<canton7>
what was the issue?
ShellFu has joined #ruby
tsykoduk is now known as zz_tsykoduk
<bean__>
yeah, bline79, don't leave us hangin'. What was it :p
havenwood has quit [Remote host closed the connection]
<bline79>
the #{hostname}.#{domain}
<bline79>
I changed it to #{hostname}
<canton7>
aand what was wrong?
<bline79>
that dot broke some stuff
<bean__>
that doesn't really make sense, but okay :)
havenwood has joined #ruby
<bline79>
I don't get it either :)
workmad3 has joined #ruby
<canton7>
did the -vmid option not like having an argument with a dot in it?
zz_tsykoduk is now known as tsykoduk
ldnunes has quit [Quit: Leaving]
|jemc| has quit [Quit: WeeChat 0.4.1]
heftig has quit [Ping timeout: 252 seconds]
zeropx has quit [Quit: has left the room … Or did he?]
interactionjaxsn has quit [Ping timeout: 252 seconds]
zeropx has joined #ruby
sarmiena_ has joined #ruby
rezzack has quit [Quit: Leaving.]
c0rn has quit [Quit: Computer has gone to sleep.]
platzhirsch1 has left #ruby [#ruby]
leehambley has quit [Ping timeout: 264 seconds]
heftig has joined #ruby
adoming has quit [Quit: adoming]
leehambley has joined #ruby
rezzack has joined #ruby
c0rn has joined #ruby
Bira_ has quit [Remote host closed the connection]
ravster has joined #ruby
fgh has joined #ruby
SteveBenner9 has quit [Quit: Leaving]
zets has quit [Ping timeout: 240 seconds]
<ShellFu>
I have a lot of hashes that all have key >:inherit<. My hashes can inherit their data from other hashes. How can I effectively follow a chain of inheritance without knowing how many times a given hash inherits another. So HashA. HashB inherits from HashA, HashC inherits from HashB.
funburn has quit [Quit: funburn]
tsykoduk is now known as zz_tsykoduk
<ShellFu>
I can inherit fine if i know the number, but not if its more than ive accounted for
jbynum has quit [Quit: Computer has gone to sleep.]
zz_tsykoduk is now known as tsykoduk
mrsolo has joined #ruby
<ShellFu>
if that makes sense at all
funburn has joined #ruby
zarubin has quit [Read error: Operation timed out]
MTen has joined #ruby
<ShellFu>
Perhaps a loop that keeps adding data to a final hash and stops when :inherit == null
<ShellFu>
hmmm
catphish has quit [Quit: Leaving]
<bnagy>
inherit is a really poor choice of name
burlyscudd has joined #ruby
<ShellFu>
perhaps, but that is what its doing its inheriting data from another source. I know i may be confusing with inheritance in the OO sense.
<ShellFu>
open to suggestion however.
<volty>
inherits
sambao21 has quit [Quit: Computer has gone to sleep.]
<ShellFu>
heh easy enough.
<banisterfiend>
ShellFu why use a hash rather than a class? :)
<banisterfiend>
sounds like you're recreating the object system in ruby
zets has joined #ruby
<bnagy>
anyway your idea sounds ok, final={} this=first_hsh; while this; final = final.merge this; this=this[:inherit]; end
mercwithamouth has joined #ruby
sambao21 has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
joofsh has quit [Remote host closed the connection]
fridim_ has joined #ruby
<ShellFu>
Im parsing a bunch of yaml docs into hashes giving the user the ability to search them for data, and make new docs that inherit data from other yaml files.
<volty>
you need to save a root hash (even if dummy) to do that
funburn has quit [Quit: funburn]
<ShellFu>
Pain in the ass, but it is what it is :) I didnt make the system in which the data has to be consumed. I just need to deliver the output.
<ShellFu>
trying to do it the best way i personally know how being not a professional programmer but a unix admin
breakingthings has quit []
<bnagy>
I'd suggest onclude instead of inherit, but that's a loaded term as well :/
<bnagy>
I think I need coffee
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bnagy>
dammit all the names I like are methods or keywords :)
<volty>
i'm not sure what you want, but cnt = 0; cur = h; loop { h = h[:inherits]; cnt += 1; break unless h } .... something like that
<volty>
?
<bnagy>
include, merge...
sambao21 has quit [Ping timeout: 240 seconds]
<volty>
s/h/cur/
<ShellFu>
HA
joofsh has joined #ruby
mlpinit has joined #ruby
jalcine has quit [Excess Flood]
JZTech101 has quit [Ping timeout: 245 seconds]
<bnagy>
you can only have one key to 'inherit' ?
cescalante is now known as ce_afk
<bnagy>
thought about making it an array of subhashes?
sambao21 has joined #ruby
<ShellFu>
no the inherit is the name of a yaml doc. the yaml doc contains a variety of keys.
<ShellFu>
they all have 3 main keys in common
<ShellFu>
the rest....
<ShellFu>
up in the air
jrobeson has quit [Ping timeout: 260 seconds]
punkintheresomeh has joined #ruby
punkintheresomeh is now known as thelixinoe-
<volty>
create level counter as you walk
lfox has joined #ruby
<bnagy>
just saying that instead of a < b < c you could just a < b, c
kofno has joined #ruby
butblack has joined #ruby
dangerousdave has quit [Quit: Leaving...]
<ShellFu>
what if c inherits from z. then you get to z and z inherits from g then g inherits from nothing so the final hash should be the sum of all previous
lmickh has quit [Read error: Connection reset by peer]
lmickh1 has joined #ruby
<ShellFu>
the hash at the end overwrites previous keys if encountered
<ShellFu>
let me work up an example.
thelixinoe- is now known as Thelixinoe-
vim_shim has joined #ruby
<volty>
sum them while walking
T_T has quit [Remote host closed the connection]
<ShellFu>
i think I got it worked in my head but just so you understand wtf im trying to do here
RORgasm_ has quit [Remote host closed the connection]
<Amnesia>
but it's not possible to do the following: spawn("...", :out => [ '/dev/null', 'w' ] if false
kevinykchan has quit [Quit: Computer has gone to sleep.]
sectionme has joined #ruby
v0n has quit [Read error: Operation timed out]
workmad3 has quit [Ping timeout: 248 seconds]
kpshek has quit []
<Amnesia>
volty: and why exactly are two pairs of { }'s required? (I'd like to understand it:) )
xk_id has joined #ruby
<volty>
the outer are proc's and the inner are the hash's
<bnagy>
why do you want to redirect the output?
m8 has quit [Quit: Sto andando via]
<bnagy>
if you want the output then read it, if not then don't ask for it or ignore it
aspires has joined #ruby
tylersmith has joined #ruby
<Amnesia>
well, i'm trying to prevent to use an if, else condition..
mneorr has joined #ruby
simplyaubs has quit [Quit: simplyaubs]
Nogbit has left #ruby [#ruby]
joast has joined #ruby
threesome has quit [Ping timeout: 246 seconds]
dmiller has joined #ruby
sectionme has quit [Ping timeout: 246 seconds]
kindjal has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
<Amnesia>
hm, nvm found an alternative way to do it
<Amnesia>
thanks anyway:)
cj3kim_ has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
kofno has joined #ruby
snovak has joined #ruby
dmiller has quit [Ping timeout: 248 seconds]
aspires has quit [Quit: aspires]
leonidlm has quit [Ping timeout: 248 seconds]
mike1992 has quit [Read error: Connection reset by peer]
baordog_ has quit [Remote host closed the connection]
lmickh has quit [Read error: Connection reset by peer]
lmickh has joined #ruby
vim_shim has quit [Ping timeout: 264 seconds]
fuhgeddaboudit has quit [Ping timeout: 264 seconds]
jonahR has quit [Quit: jonahR]
skysploit has joined #ruby
skysploit has quit [Changing host]
skysploit has joined #ruby
Voodoofish430 has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
fijimunkii has quit [Read error: Connection reset by peer]
ShellFu has quit [Quit: Leaving]
funburn has joined #ruby
aspires has joined #ruby
kofno has quit [Ping timeout: 252 seconds]
lmickh has quit [Client Quit]
DanKnox is now known as DanKnox_away
sarlalian has quit [Quit: WeeChat 0.4.1]
adoming has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
snovak has quit [Ping timeout: 240 seconds]
ce_afk is now known as cescalante
adoming has joined #ruby
<Eiam>
god.. I'm always happy when I finally force some code to do what I want..
<Eiam>
then I have that sinking feeling because I know the code sucks
<Eiam>
but it works.
sarlalian has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]
funburn has quit [Ping timeout: 248 seconds]
mansi has quit [Remote host closed the connection]
aspires has quit [Client Quit]
funburn has joined #ruby
mansi has joined #ruby
tino097 has joined #ruby
<MTen>
working code is better what I write :)
zz_tsykoduk is now known as tsykoduk
enebo has quit [Quit: enebo]
<MTen>
(see what I did there)
aspires has joined #ruby
<bnagy>
forgot an auxiliary?
Spleeze has quit [Ping timeout: 256 seconds]
mansi has quit [Ping timeout: 260 seconds]
doritostains has joined #ruby
<ivanoats>
Can minispec use "feature" and "scenario" instead of "describe" and "it" ?
Popple has joined #ruby
freerobby has joined #ruby
mmitchell has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 246 seconds]
cescalante is now known as ce_afk
boxmein has quit [Quit: [02:26.00] <Ristovski> mozzarella filofax fadget]
agent_white has quit [Read error: Connection reset by peer]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aspires has quit [Quit: aspires]
DanKnox_away is now known as DanKnox
brennanMKE has quit [Remote host closed the connection]
osvico has joined #ruby
tjbiddle has joined #ruby
fijimunkii has joined #ruby
mneorr has quit [Remote host closed the connection]
<tjbiddle>
Hey guys - Are there any Rails limitations on upload size limit? I want to use Grape api framework and want to accept files - possibly being ~150mb in some edge cases (Internal application)
duggiefresh has quit [Remote host closed the connection]
headius has quit [Client Quit]
mlpinit has joined #ruby
duggiefresh has joined #ruby
larissa has joined #ruby
colonolGron has quit [Quit: Lost terminal]
havenn has joined #ruby
Muz has joined #ruby
klaas has quit [Read error: Connection reset by peer]
havenwood has quit [Remote host closed the connection]
klaas_ has joined #ruby
Muz_ has quit [Ping timeout: 264 seconds]
Kabaka has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
mlpinit has quit [Ping timeout: 246 seconds]
duggiefresh has quit [Read error: Operation timed out]
Kabaka has joined #ruby
nanoxd has quit [Quit: nanoxd]
tino097 has quit [Quit: Leaving]
snovak has joined #ruby
havenn has quit [Ping timeout: 240 seconds]
boboc has quit [Ping timeout: 256 seconds]
nanoxd has joined #ruby
kevind has quit [Quit: kevind]
pwh has joined #ruby
diegoviola has quit [Ping timeout: 264 seconds]
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
io_syl has quit []
quoin has quit [Ping timeout: 240 seconds]
snovak has quit [Ping timeout: 256 seconds]
lsmola has joined #ruby
funburn has quit [Ping timeout: 248 seconds]
skysploit has quit [Read error: Connection reset by peer]
skysploit has joined #ruby
skysploit has quit [Read error: Connection reset by peer]
rrichardsr3 has quit [Quit: -- I'm out --]
mary5030 has quit [Remote host closed the connection]
tsykoduk is now known as zz_tsykoduk
asteros has quit [Remote host closed the connection]
asteros has joined #ruby
asteros has quit [Client Quit]
asteros has joined #ruby
tjsousa has joined #ruby
ADot has joined #ruby
Mars` has quit [Read error: Connection reset by peer]
Mars` has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
ephemerian has quit [Quit: Leaving.]
Aryasam has joined #ruby
platzhirsch has quit [Ping timeout: 248 seconds]
Stalkr has quit [Quit: Leaving...]
kofno has joined #ruby
clov3r has quit [Remote host closed the connection]
Matriks has quit [Remote host closed the connection]
clov3r has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
c0rn has joined #ruby
jrhe_ is now known as jrhe
senayar has joined #ruby
clov3r has quit [Ping timeout: 240 seconds]
xk_id has quit [Quit:
Lewix has quit [Remote host closed the connection]
tylerjones has joined #ruby
tylerjones has left #ruby [#ruby]
predator117 has joined #ruby
socialmage has joined #ruby
<socialmage>
clear
<socialmage>
when ever I run a ruby script that expects a gem under sudo it cannot see the gem
c0rn has quit [Ping timeout: 240 seconds]
ericmathison has joined #ruby
<socialmage>
but when I run it as a typical user the gem is seen
<popl>
socialmage: what's different in those two cases?
<socialmage>
I have done a gem install and sudo gem install
<julian-delphiki>
socialmage, it's likely that root and you have different GEM_PATHS
<socialmage>
even if I sudo gem install the same gem?
<julian-delphiki>
do "gem env" and "sudo gem env" and compare the differences.
<julian-delphiki>
perhaps.
<socialmage>
hmmm ok
senayar has quit [Ping timeout: 245 seconds]
dmiller__ has joined #ruby
<socialmage>
yeah they are different. and even different versions of ruby
<socialmage>
:/
predator217 has quit [Ping timeout: 240 seconds]
fuhgeddaboudit has joined #ruby
bean has joined #ruby
kadoo has joined #ruby
c0rn has joined #ruby
<socialmage>
I am trying to use the "nfqueue" gem but get an error on an nfq_unbind_pf function in the initialization
<socialmage>
I was guessing that maybe the script lacks permissions needed
<socialmage>
so I was trying to run it as root
pwh has quit []
havenwood has joined #ruby
julian-delphiki has quit [Ping timeout: 246 seconds]
<smashwilson>
socialmage: are you using rvm?
<smashwilson>
socialmage: there's an "rvmsudo" command that preserves your rvm environment.
<socialmage>
i think so
<socialmage>
ill try it
iliketurtles has quit [Quit: zzzzz…..]
Aryasam has quit [Ping timeout: 246 seconds]
havenn has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
ADot has quit [Quit: Leaving.]
dcunit3d has joined #ruby
<socialmage>
im not entirely familiar with rvm. it recognized the rvmsudo cmd though so I must have it. is there a way to say "export" my users rvm profile to the root profile?
ADot has joined #ruby
mikeric has joined #ruby
<socialmage>
so root uses the same version of ruby and the same gems/gempaths
havenn has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
Aryasam has joined #ruby
dallasm has joined #ruby
duggiefresh has joined #ruby
<smashwilson>
hmmm. not really. generally you'd do an rvm install for root as well, use a .ruby-version file to specify the preferred ruby, and use bundler to control gem versions and such.
renanoronfle has quit [Quit: This computer has gone to sleep]
zeade has quit [Quit: Leaving.]
iliketurtles has joined #ruby
xcv has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
pwh has joined #ruby
pwh has quit [Client Quit]
duggiefresh has quit [Remote host closed the connection]
<smashwilson>
reference for .ruby-version: https://rvm.io/workflow/projects (note that it's compatible with alternatives like rbenv, too)
<smashwilson>
and a reference for using bundler to manage dependencies: http://bundler.io/
havenwood has quit [Ping timeout: 240 seconds]
butblack has quit [Quit: butblack]
kofno has quit [Ping timeout: 240 seconds]
simplyaubs has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
Aryasam has joined #ruby
danman has quit [Quit: danman]
<socialmage>
what could be going on where a sudo gem list will show that the gem i need is installed. AND the install path and gem path shown from sudo gem env is the same