JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
Davey has quit [Quit: Computer has gone to sleep.]
ehc has quit [Quit: ehc]
hogeo has joined #ruby
havenwood has joined #ruby
terrellt has quit [Ping timeout: 276 seconds]
Christopher37 has joined #ruby
DanKnox is now known as DanKnox_away
iliketurtles has quit [Quit: zzzzz…..]
ckrailo has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
i_s has quit [Remote host closed the connection]
kaspergrubbe has quit [Remote host closed the connection]
Davey has joined #ruby
amacgregor_ has quit [Ping timeout: 256 seconds]
benlieb has quit [Quit: benlieb]
amacgregor has joined #ruby
ELLIOTTCABLE has quit [Remote host closed the connection]
Christopher37 is now known as _Chris__
_Chris__ is now known as `Chris`
chrisja has quit [Quit: leaving]
johnnyfuchs has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]
<WaRori>
So is the main point of Ruby using Rails now or is it still general purpose? Seems like everywhere I go I see rails, but seeing how web development isn't my forté, it'd be nice to know :P
emergion has quit [Quit: Computer has gone to sleep.]
<waxjar>
rails is probably the most popular ruby project, but they haven't become synonyms!
hogeo has quit [Remote host closed the connection]
devth has quit [Remote host closed the connection]
<WaRori>
So I've noticed, but that's good to know!
danman has quit [Quit: danman]
stuartrexking has joined #ruby
<onewheelskyward>
I use ruby for everything these days. Shell scripting, deployment, and also, Sinatra.
<havenwood>
onewheelskyward: Isn't Shell scripting by definition in Shell. :P
iliketurtles has joined #ruby
`p has quit [Ping timeout: 264 seconds]
<onewheelskyward>
Well, let me rephrase. I use it for what I used to use shell scripting for. :)
<havenwood>
onewheelskyward: But totally, Ruby ftw!! :D
<zendeavor>
i'll note that file-extensions don't belong on command names
devoldmx has joined #ruby
<onewheelskyward>
Why not?
<zendeavor>
just for the record
<onewheelskyward>
I agree with you on binaries, but not for uncompiled source.
<havenwood>
i don't know the 'why', but i admit I strip the '.rb' every time i use a shebang.
<zendeavor>
suppose you write a script command.sh which you call from other scripts; now assume you rewrite command.sh in ruby and change the name to command.rb
<zendeavor>
now you have to change every call in every other script s/command\.sh/command\.rb/g
<onewheelskyward>
Yep. And now I know exactly what I'm getting.
<havenwood>
You don't need to know the extension if there's a #!/usr/bin/env ruby, so nice to just omit methinks.
<Rubba>
how do i select the second pair onwards in a hash (i.e. all but the first pair)
mrsolo has quit [Quit: Leaving]
<zendeavor>
onewheelskyward: now suppose you distribute your command.sh, then change it to command.rb; everyone else who called your command.sh also has to update every caller as well
<onewheelskyward>
What about maintaining someone else's code? It'd be nice to see that this file is ruby, that file is python in a folder with dozens of scripts in it.
sean_s has quit [Quit: sean_s]
cody-- has joined #ruby
<zendeavor>
the _command_ shouldn't have an extension
<zendeavor>
you don't execute ls.elf
<waxjar>
i don't think there is such a thing as the first pair Rubba
<havenwood>
onewheelskyward: I dunno, when they open it they see the shebang and no myster.
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
<Rubba>
waxjar i wanna call hash.each do { |key,v| } but ignore the first iteration
<onewheelskyward>
havenwood True, but that doesn't help demystify things at a first glance.
jmeeuwen has joined #ruby
<zendeavor>
onewheelskyward: imo, just symlink command.<ext> into foo/bin/command sans extension
<onewheelskyward>
zendeavor in that type of deployment scenario, yes, a wrapper is the way to go.
<zendeavor>
then you retain it on your _source_ file, just like everyone else
babykosh has quit [Quit: babykosh]
<Rubba>
is there an elegant ruby way besides setting some sort of indicator variable within the block
<zendeavor>
a wrapper? nonsense.
blackmesa has quit [Ping timeout: 240 seconds]
iliketurtles has quit [Quit: zzzzz…..]
<zendeavor>
just remove the extension upon deployment, why wrap it in some other script? that's just an extra shell
cody-- has quit [Read error: Connection reset by peer]
sean_s has joined #ruby
cody-- has joined #ruby
<zendeavor>
onewheelskyward: it's quite common to deploy with `ln -s /usr/local/bin/command /usr/local/share/command/command.ext'
<zendeavor>
it solves the problem neatly, and is perfectly valid solution even for your local ~/bin
pentameter has quit [Remote host closed the connection]
<zendeavor>
it reduces the cognitive burden of having to remember to update every caller to use the new extension
<zendeavor>
i for one forget such things often and have silent failures because i tend to throw away stderr of the caller after i finish debugging it
zeade has quit [Quit: Leaving.]
yshh has quit [Remote host closed the connection]
louism2wash has quit [Quit: This computer has gone to sleep]
xcthulhu has joined #ruby
dankest has quit [Quit: dankest]
druonysuse has joined #ruby
fridim_ has joined #ruby
Giorgio has quit [Ping timeout: 246 seconds]
popl has joined #ruby
nezumi has quit [Ping timeout: 264 seconds]
RichardBaker has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
<havenwood>
Rubba: I'd prolly use #each_with_index
xcthulhu has quit [Ping timeout: 260 seconds]
MrZYX is now known as MrZYX|off
<havenwood>
Rubba: As converting to an Array and back seems hacky
ntus1017 has quit [Remote host closed the connection]
millerti has quit [Quit: millerti]
mikepack has joined #ruby
hogeo has joined #ruby
wmoxam has joined #ruby
iliketurtles has quit [Ping timeout: 246 seconds]
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
JZTech101 has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codeski has quit [Ping timeout: 246 seconds]
sevenseacat has joined #ruby
randomau_ has joined #ruby
pipework has joined #ruby
iliketurtles has joined #ruby
sdegutis has quit [Remote host closed the connection]
chjunior has joined #ruby
grillermo has joined #ruby
L8D has left #ruby [#ruby]
randomautomator has quit [Ping timeout: 264 seconds]
randomau_ has quit [Ping timeout: 264 seconds]
niklasb has quit [Ping timeout: 264 seconds]
ian__ has joined #ruby
<ian__>
I'm trying to implement single variable gradient descent with a linear hypothesis equation. I'm doing it in ruby, and the problem is the theta values aren't converging.
<ian__>
not sure if anyone can help since I'm sure it's not a problem with ruby but my lack of understanding of the algorithm
mikepack has quit [Remote host closed the connection]
<pontiki>
i am not going to study up on what to me is some obscure algorithm
<ian__>
ok sorry I asked
maroloccio has quit [Quit: WeeChat 0.4.0]
<pjeide>
good thing there are so many hundreds of other people who might be interested in such a thing
Lewix has quit [Remote host closed the connection]
RichardBaker has joined #ruby
chjunior has joined #ruby
ssvo has joined #ruby
xaxxon has joined #ruby
machuga|away is now known as machuga
arya__ has quit [Ping timeout: 264 seconds]
<zendeavor>
"single variable gradient descent with a linear hypothesis equation"
<xaxxon>
hey, how do I see what methods of my class come from included modules? My understanding is that it's "above" your class between your class and it's superclass. I know how to say obj.public_methods.. but I can't figure out how to get to the .. whatever.. that has the module methods
<ismaelrb>
ian__ do you know about stackoverflow.com ?
<xaxxon>
what methods available to my object, I mean
BillCriswell has quit [Remote host closed the connection]
julian-delphiki has joined #ruby
gazarsgo has quit [Quit: gazarsgo]
<bnagy>
ian__: where's a link to the algorithm? We can at least check your implementation
<bnagy>
most of those things have a pseudocode version up somewhere...
sdegutis has joined #ruby
grillermo has quit [Ping timeout: 246 seconds]
<ian__>
alright one sec
arya_ has joined #ruby
RichardBaker has quit [Client Quit]
robbyoconnor has quit [Read error: Connection reset by peer]
<xaxxon>
hrmm.. looks like Class has included_modules
robbyoconnor has joined #ruby
gazarsgo has joined #ruby
<xaxxon>
so I guess I could iterate through those..
RichardBaker has joined #ruby
RichardBaker has quit [Client Quit]
bean has quit [Ping timeout: 268 seconds]
JZTech101 has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC]
JZTech101 has joined #ruby
RichardBaker has joined #ruby
dmiller has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
[narcan] has joined #ruby
<bnagy>
sounds promising
<bnagy>
but methods that are defined in your class as well as in an included module will be resolved from your class
<bnagy>
the stuff you pasted uses some kind of reciprocal for all their various versions
RichardBaker has quit [Quit: RichardBaker]
vlad_starkov has joined #ruby
n_blownapart has quit [Remote host closed the connection]
bzitzow has quit [Ping timeout: 245 seconds]
RichardBaker has joined #ruby
<bnagy>
basically keep subtracting alpha 1/some_sum_or_other until it converges
iliketurtles has quit [Quit: zzzzz…..]
<bnagy>
but without the reciprocal I can't intuitively see how it can converge
<ian__>
the reciprocal?
Domon has joined #ruby
<bnagy>
1/something
wmoxam has joined #ruby
<ian__>
I'll try 1/@x_values.length
<bnagy>
like to me, it looks like something similar to 1 - 1/2 - 1/3 - 1/4... until the fraction gets really tiny, at which point we have "converged", yeah?
ckrailo has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Ping timeout: 260 seconds]
rodacato has joined #ruby
<ian__>
I don't know
<ian__>
I have no idea how it's supposed to converge
Yakko has joined #ruby
<bnagy>
ok.. did you read that blog post you linked me to?
<pontiki>
wasp: i have not one clue what your code is supposed to do
<pontiki>
all i can say is that it is syntax clean
<Wasp>
its an issue about syntax not about my intension
iliketurtles has joined #ruby
<pontiki>
the eval.in link shows it is syntactically correct
<pontiki>
no syntax errors or warnings
<ian__>
actually bnagy I need the temp variables because I need to change m and b together since they depend on each other
<Wasp>
okay intension: intension is to store a symbol inside a static class variable and be able to pass it to a function
<pontiki>
if you have something different, paste the error messages
RORgasm has quit [Ping timeout: 264 seconds]
blast_hardcheese has left #ruby ["WeeChat 0.3.8"]
Astralum has quit [Ping timeout: 268 seconds]
asgardBSD has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
optimusprimem has joined #ruby
<Wasp>
@direction seems to be NIL
<Wasp>
"Unknown direction nil. Should be :forward, :backward, :left or :right."
<pontiki>
do you know what a class variable is?
codemonkey010101 has joined #ruby
<Wasp>
global variable for class player
codemonkey010101 has quit [Remote host closed the connection]
<Wasp>
(in my case)
braincrash has quit [Ping timeout: 256 seconds]
JZTech101 has quit [Ping timeout: 245 seconds]
<pontiki>
as i have not seen this ruby warrior until 5 minutes ago, i'm not sure how instruction is given
<Wasp>
just start with level one, thats how i started with warrior as also with ruby ;)
<pontiki>
wasp, do you know how you designate a class variable? and how such a thing is distinct from an instance variable?
Guest21857 is now known as ned
<bnagy>
ian__: ugh, ok.. not how I'd write that but whatever. You're not doing the thing in that post you linked at all
`Chris` has joined #ruby
viszu has quit [Quit: Leaving.]
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
jblack has quit [Quit: Lost terminal]
anonymuse has quit [Remote host closed the connection]
<Wasp>
in fact its a instance varaible but should do as well .. tried class varaible (@@) as well, but it is not allowed
nbouscal has joined #ruby
Kricir has joined #ruby
hippyphysicist has joined #ruby
<havenwood>
Wasp: Try initializing the instance variable in an #initialize method: def intialize; @direction...
<Wasp>
pontiki: okay thx for your syntax check
moos3 has quit [Quit: Computer has gone to sleep.]
<ian__>
bnagy, you're right, it's not quite the same
moos3 has joined #ruby
<havenwood>
def initialize**
nbouscal has quit [Client Quit]
larissa has quit [Quit: Leaving]
hippyphysicist has quit [Read error: Connection reset by peer]
chjunior has quit [Remote host closed the connection]
<Wasp>
havenwood: strange, that was the trick
<havenwood>
Wasp: In a module, you can define an instance variable like that just in the open scope. The class Player is itself instantiated and only has access to instance variables defined in that instance of the class.
<Wasp>
thx man, you saved my some sleep(less) that night :))
<havenwood>
Wasp: de nada
nadirvar_ has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
machuga is now known as machuga|away
<Wasp>
havenwood: gracias
<bnagy>
ian__: oic why the R code looks weird, they've done it as matrix maths
iliketurtles has quit [Ping timeout: 246 seconds]
chjunior has joined #ruby
amacgregor_ has joined #ruby
<Wasp>
havenwood: back inside man real code: strange that all other static variables are fine o.O
<ian__>
yeah, that stuff's beyond me
<ian__>
it's what I'm doing next though lol
io_syl has quit [Ping timeout: 264 seconds]
PhatBaja has joined #ruby
<Wasp>
just the one with the symbol fails -- and i could swear it already worked some time before (when i was deleting clueless some code for debugging)
<havenwood>
Pandee: Most Rubyists don't use an IDE (just a nice text editor and the command line), but only one I've actually ever seen used is RubyMine.
<bnagy>
you keep saying 'partial derivative' .. but you're not really taking one properly
bdd_newbie has joined #ruby
<bnagy>
like it's supposed to be with respect to a cost function, which is the error rate along the 'guessed' curve and the real data
<Pandee>
havenwood: how do rubyists test their program as they go?
PhatBaja has joined #ruby
<bdd_newbie>
can Net::FTP negotiate a secure connection?
<Pandee>
havenwood: i thought the official python ide was very useful because you can test as you go
<sevenseacat>
Pandee: is that a trick question
adman65 has joined #ruby
<Pandee>
not at all
<bnagy>
but you don't have a cost function.. tbh I can see your code works but I don't understand how :P
<sevenseacat>
we write tests, and run them.
<havenwood>
Pandee: So like in TextMate 2 I can do a keystroke and either run my code or a line of it or smart get results where i want them. Not a stupid text editor.
<sevenseacat>
test driven development, usually.
GeissT has quit [Quit: MillBroChat AdIRC User]
<bdd_newbie>
how can I develop a simple secure ftp client
<havenwood>
Pandee: I don't think ST2/3 has a repl built in, but there is a well-supported addon.
<bnagy>
well, not curve. Line.
axeman- has joined #ruby
<ian__>
but I have a cost function
<havenwood>
Pandee: Also yeah, TDD. Minitest is built in to Ruby, you run the command line test from your editor or within your editor.
<Pandee>
havenwood: yea, i saw it doesn't. The addon is installed through a git command. I haven't learned git yet, so i was a little bummed on that
<apeiros>
depends on what you do. I don't know what you use the keys for.
DanielRb has quit [Remote host closed the connection]
avril14th has quit [Remote host closed the connection]
<havenwood>
Wasp: This should suffice for your values truthiness check: a.values.all?
<apeiros>
if all you're interested in is whether you ever have a false value stored, all you need is a flag.
<havenwood>
no need for { |e| e }
<Wasp>
havenwood: me too, should go to bed, it is already morning (again) but like to kill the sludges in level 6 more "cool" ;)
endash has quit [Quit: endash]
DanielRb has joined #ruby
<apeiros>
if your values per key can change from true to false and back, then it gets more complex.
<havenwood>
Nice they made block optional on #all? and friends. :D
<Wasp>
.. its more complex :)
<apeiros>
anyway, main question is: do you prematurely optimize?
PhatBaja has quit [Ping timeout: 245 seconds]
<Wasp>
of cause i do :)
<Wasp>
there is a complte tower of sludges, thick sludges and archers to kill :D
warren has left #ruby ["Leaving"]
* Wasp
is talking about ruby warrior
<zendeavor>
you're supposed to explore the language on your own for that, really
<zendeavor>
kinda the point
nadirvar_ has joined #ruby
<Wasp>
zendeavor: i do, just wondering about some point?
<havenwood>
Well, you'll need some Erlang-like concurrency for RubyWarrior so checkout Celluloid, and maybe pass it through some Go-like channels so look at Agent.
<havenwood>
Need to pull out the big guns fer snake killen!
<apeiros>
inline assembler
<havenwood>
yes, that too!
<apeiros>
neverdie
<Wasp>
are you serious?! there is something else on that topic? :)
<Wasp>
was googling for perl warrior (and friends) but nothing found
<havenwood>
need speed for when we scale to RubyGlobalBattle
<apeiros>
enterprise ruby (not to confuse with ruby enterprise edition)
<havenwood>
RubyEnterpriseWarrior (in XML of course)
<havenwood>
Wasp: I think Ryan Bates made it from scratch. Hadn't seen much of it till the new gui wrapper came out lately and it resurged. Fun stuff.
nadirvar_ has quit [Read error: Connection reset by peer]
TIJ has joined #ruby
ninegrid has joined #ruby
<Wasp>
ehm, what do you mean by erlang? do you mean the ericsson (computer) language?
<havenwood>
popl: Authored by Jose Valim, a Rubyist!
<popl>
ah
<popl>
INBREEDING
<popl>
:)
<havenwood>
hehe
apeiros has quit [Remote host closed the connection]
rickmasta has quit [Quit: Leaving...]
serp` has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
fridim_ has quit [Ping timeout: 260 seconds]
Megtastique has joined #ruby
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
Zolo has quit [Remote host closed the connection]
henn has quit [Quit: Leaving]
avril14th has joined #ruby
dawkirst has quit [Ping timeout: 245 seconds]
soup__ has joined #ruby
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
darth_chatri has joined #ruby
ananthakumaran has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
soup_ has quit [Quit: soup_]
timonv has joined #ruby
Megtastique has quit [Quit: Megtastique]
browndawg has joined #ruby
soup__ has left #ruby [#ruby]
noyb has joined #ruby
guns has joined #ruby
decoponio has joined #ruby
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
dagobah has joined #ruby
hitesh has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
dawkirst has joined #ruby
danman has quit [Quit: danman]
eoinkelly has joined #ruby
optimusprimem has joined #ruby
smathieu has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
pranny has joined #ruby
dmiller has quit [Remote host closed the connection]
optimusprimem has quit [Excess Flood]
m104 has quit [Quit: bye]
smathieu has quit [Ping timeout: 264 seconds]
eoinkelly has quit [Quit: eoinkelly]
optimusprimem has joined #ruby
kaspergrubbe has joined #ruby
fgo has quit [Remote host closed the connection]
mootpointer has quit [Quit: Computer has gone to sleep.]
gstamp has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
fgo has joined #ruby
kaspergrubbe has quit [Ping timeout: 264 seconds]
saintcajetan has quit [Remote host closed the connection]
optimusprimem has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby
noop has joined #ruby
optimusprimem has joined #ruby
echevemaster has quit [Quit: Leaving]
tonini has quit [Remote host closed the connection]
iliketurtles has joined #ruby
zoee has joined #ruby
pjeide` has joined #ruby
ebanoid has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
pjeide has quit [Disconnected by services]
workmad3 has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Remote host closed the connection]
pjeide` has left #ruby [#ruby]
bluOxigen has quit [Remote host closed the connection]
sayan has joined #ruby
pjeide has joined #ruby
sayan has quit [Read error: Connection reset by peer]
sayan has joined #ruby
noyb has quit [Ping timeout: 246 seconds]
andikr has joined #ruby
graydot has joined #ruby
tonini has joined #ruby
saarinen has joined #ruby
apeiros has joined #ruby
tms has joined #ruby
havenwood has quit [Remote host closed the connection]
neonlex has joined #ruby
Yakko has quit [Quit: No Ping reply in 180 seconds.]
dmiller has joined #ruby
Yakko has joined #ruby
ericmathison has quit [Quit: leaving]
krainboltgreene has joined #ruby
tyman has joined #ruby
emilevictor has quit [Quit: emilevictor]
cyong has quit [Quit: Leaving.]
axeman- has quit [Ping timeout: 256 seconds]
axeman- has joined #ruby
aganov has joined #ruby
Kar- has joined #ruby
zeotron has joined #ruby
tommyvyo has quit [Quit:]
xcv has joined #ruby
dmiller has quit [Ping timeout: 260 seconds]
AntelopeSalad_ has joined #ruby
browndawg has quit [Ping timeout: 246 seconds]
bearwithclaws has joined #ruby
AntelopeSalad has quit [Ping timeout: 252 seconds]
poseid has joined #ruby
<poseid>
morning
yshh has quit [Remote host closed the connection]
<poseid>
anyone has a quick example of rounding errors with float, that can be resolved with decimal?
zeotron has quit [Remote host closed the connection]
bearwithclaws has left #ruby [#ruby]
iliketurtles has quit [Quit: zzzzz…..]
<sevenseacat>
ive seen a lot over time, but none i havent resolved a long time ago.
<sevenseacat>
anything involving calculations on things with more than two or three DP
bzitzow has joined #ruby
krz has quit [Ping timeout: 260 seconds]
ejnahc has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 268 seconds]
ejnahc has joined #ruby
codecop has joined #ruby
_droid has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
TacitBlue has joined #ruby
<_droid>
hi people, i'm tryin to install ruby 2.0.0 on my kubuntu system, with shell script from chruby and in around the end I get this error message:
popl has quit [Quit: We must make an idol of our fear, and call it God.]
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
`Chris` has quit [Remote host closed the connection]
postmodern has quit [Ping timeout: 264 seconds]
<_droid>
anyone?
apakatt has joined #ruby
guns has quit [Quit: guns]
RORgasm has joined #ruby
apakatt_ has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
apakatt has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
smathieu has joined #ruby
io_syl has quit [Quit: io_syl]
axeman- has quit [Read error: Connection reset by peer]
BrianJ has quit [Quit: Computer has gone to sleep.]
Domon has quit [Remote host closed the connection]
Gooder` has quit [Ping timeout: 264 seconds]
Gooder has joined #ruby
axeman- has joined #ruby
blaxter has joined #ruby
baroquebobcat has joined #ruby
ewnd9 has quit [Read error: Operation timed out]
RORgasm has quit [Ping timeout: 264 seconds]
kaspergrubbe has joined #ruby
<Crawford>
_droid: does it happen every time you try doing it?
vikhyat_ has quit [Remote host closed the connection]
stayarrr has joined #ruby
stayarrr has quit [Client Quit]
<_droid>
Crawford: im trying it right now for the 3rd time, it runs through all the revriously processed steps but then tries to download that tar.gz file for a minute or 2 then stops
serp` has quit [Ping timeout: 268 seconds]
kaspergrubbe has quit [Remote host closed the connection]
<_droid>
mv: cannot move `/usr/local/src/jruby-1.7.4' to `/opt/rubies/jruby-1.7.4/jruby-1.7.4': Directory not empty
<_droid>
!!! Installation of jruby 1.7.4 failed!
stoffus has joined #ruby
axeman- has quit [Ping timeout: 246 seconds]
stayarrr has quit [Client Quit]
<canton7>
looks like it's already installed there
dash_ has joined #ruby
<_droid>
canton7: the funny thing is that it is kinda nested
axeman- has joined #ruby
<_droid>
canton7: should I delete the jruby-1.7.4 folder and try it again?
<Crawford>
i've got no clue
danman has joined #ruby
DrCode has quit [Ping timeout: 240 seconds]
luckyruby has joined #ruby
postmodern has quit [Ping timeout: 245 seconds]
_Andres has joined #ruby
danman has quit [Ping timeout: 245 seconds]
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
danman has joined #ruby
sayan has quit [Read error: Connection reset by peer]
Domon has joined #ruby
DrCode has joined #ruby
sayan has joined #ruby
tr4656 has quit [Ping timeout: 240 seconds]
jsummerfield has quit [Quit: jsummerfield]
dash_ has quit [Ping timeout: 246 seconds]
d45h has joined #ruby
vlad_starkov has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
tr4656 has joined #ruby
mouse has joined #ruby
flou has joined #ruby
nkts_ has quit [Quit: -]
optimusprimem has quit [Ping timeout: 245 seconds]
greenarrow has joined #ruby
PhatBaja has joined #ruby
browndawg has joined #ruby
justsee has left #ruby [#ruby]
ffio_ has joined #ruby
PhatBaja has quit [Ping timeout: 245 seconds]
<mouse>
hi. Just a small question that I've unable to google an answer. I have a class A, then I have a "class B < A". I create instance for class A and would like to initialize superclass of B with this instance: aobj = A.new; bobj = B.new(aobj); How to do this in B.initialize?
<apeiros>
B.new(obj) will invoke initialize with 1 argument, passing obj as that argument
postmodern has joined #ruby
<apeiros>
if you want to copy over state, you'll have to do it manually
threesome has joined #ruby
Giorgio has joined #ruby
Deele has joined #ruby
<mouse>
apeiros, if class A accepts and checks arguments (such as Mysql2::Client), then simple B.new(client) wouldn't work. ok, I'll set instance variable without inheritance.
axeman- has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
<apeiros>
mouse: it means you have to write your own initialize
Solnse has quit []
<mouse>
right, as an option
<apeiros>
no, not as an option
hamakn has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
<apeiros>
if A#initialize and B#initialize differ, you have no choice
<mouse>
thank you
Evixion has quit [Read error: Connection reset by peer]
mklappstuhl has joined #ruby
mumble has joined #ruby
TheRealPygo is now known as pygospa
jibi has joined #ruby
optimusprimem has joined #ruby
skasio_ has joined #ruby
Al_ has joined #ruby
Evixion has joined #ruby
arturaz has joined #ruby
skasio has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
danman has quit [Quit: danman]
camilasan has joined #ruby
v0apihgt34 has joined #ruby
poga has joined #ruby
ffio has quit [Quit: WeeChat 0.4.1]
optimusprimem has quit [Excess Flood]
browndawg1 has joined #ruby
BizarreCake has joined #ruby
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
browndawg has quit [Ping timeout: 264 seconds]
maxmanders has joined #ruby
v0apihgt34 has quit [Read error: Connection reset by peer]
seivan has left #ruby [#ruby]
danman has joined #ruby
d2dchat has quit [Remote host closed the connection]
lnormous has quit [Ping timeout: 268 seconds]
ian__ has quit [Quit: Leaving]
Lewix has quit [Remote host closed the connection]
v0apihgt34 has joined #ruby
v0apihgt34 has quit [Read error: Connection reset by peer]
optimusprimem has quit [Max SendQ exceeded]
stoffus has quit [Ping timeout: 264 seconds]
Rix has quit [Ping timeout: 264 seconds]
neonlex has quit [Quit: neonlex]
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
ybart has joined #ruby
danman has quit [Read error: Connection reset by peer]
jmimi has quit [Ping timeout: 268 seconds]
danman has joined #ruby
Lewix has joined #ruby
Rix has joined #ruby
anildigital is now known as _anildigital
v0apihgt34 has joined #ruby
v0apihgt34 has quit [Read error: Connection reset by peer]
Es0teric has quit [Quit: Computer has gone to sleep.]
gju has joined #ruby
v0apihgt34 has joined #ruby
v0apihgt34 has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
Mars` has quit [Ping timeout: 268 seconds]
kreisys has joined #ruby
niceguyjames has joined #ruby
Mars` has joined #ruby
jonahR has quit [Quit: jonahR]
<Wasp>
okay need ask for help/tip again -.-
tatsuya_o has joined #ruby
mikecmpbll has joined #ruby
Coffers has joined #ruby
<Wasp>
for some reason the function warrior.feel(d).captive? will not return if it has do be: https://eval.in/39952#
<mikecmpbll>
for example @_routes and the method _with_routes
<mikecmpbll>
and _routes_context
<mikecmpbll>
might be a rails core convention but it's ruby none-the-less.
<hanmac>
mikecmpll i use "_" as variable when i dont want to use it in an each like object.each_slice(3) {| one,_,third | … }
Spooner has joined #ruby
<mikecmpbll>
hanmac, yeah I'm familiar with that use of underscore, this is different however.
<mikecmpbll>
i'll crosspost to #rubyonrails see if their any the wiser.
<hanmac>
mikecmpbll: the methods wich begin with "_" are mostly for internal behavior (but needed outside so they cant be private or protected)
<mikecmpbll>
hanmac: interesting.
graydot has quit [Quit: graydot]
vlad_starkov has joined #ruby
axeman- has quit [Ping timeout: 245 seconds]
Elhu has joined #ruby
jmimi1 has quit [Ping timeout: 268 seconds]
axeman- has joined #ruby
jmimi has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
<hanmac>
mikecmpbll: so for sample it may not a good idea to call _methods directly when you are not know that you are doing (but mostly _methods are undocumented)
v1apihgt34 has joined #ruby
v1apihgt34 has quit [Read error: Connection reset by peer]
v1apihgt34 has quit [Read error: Connection reset by peer]
Gooder has quit [Ping timeout: 246 seconds]
krz has quit [Client Quit]
v1apihgt34 has joined #ruby
v1apihgt34 has quit [Read error: Connection reset by peer]
krz has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
shevy2 is now known as shevy
<shevy>
damn
<shevy>
I am on ruby 2.0.0 something now
axeman- has quit [Ping timeout: 264 seconds]
<shevy>
psych.rb:205:in `parse': (acids.yml): invalid trailing UTF-8 octet at line 1 column 1 (Psych::SyntaxError)
<shevy>
bastards!
axeman- has joined #ruby
apakatt has joined #ruby
smathieu has quit [Ping timeout: 264 seconds]
Kelet has quit [Read error: Connection reset by peer]
niceguyjames has joined #ruby
jprovazn has joined #ruby
AikiLinux has left #ruby ["Leaving is such sweet sorrow."]
jprovazn has quit [Client Quit]
darth_chatri has quit [Quit: Leaving.]
apakatt has quit [Client Quit]
skasio_ has quit [Quit: leaving]
chris____ has joined #ruby
skasio has joined #ruby
iFire has quit [Read error: Connection reset by peer]
chris____ has quit [Remote host closed the connection]
optimusprimem has joined #ruby
optimusprimem has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
iFire has joined #ruby
axeman- has joined #ruby
tatsuya_o has joined #ruby
chris____ has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
teddyp1cker has quit [Remote host closed the connection]
tatsuya__ has quit [Ping timeout: 246 seconds]
rickmasta has joined #ruby
mikecmpbll has joined #ruby
lkba has joined #ruby
r0bgleeson has joined #ruby
Kelet has joined #ruby
ybart has quit [Ping timeout: 268 seconds]
heftig has quit [Ping timeout: 268 seconds]
kaspergrubbe has quit [Remote host closed the connection]
heftig has joined #ruby
javar has joined #ruby
ybart has joined #ruby
ismlages has joined #ruby
rickmasta has quit [Quit: Leaving...]
_ffio_ has quit [Ping timeout: 268 seconds]
schickung has quit [Ping timeout: 246 seconds]
GeissT has quit [Ping timeout: 256 seconds]
Zai00 has joined #ruby
javar has quit [Remote host closed the connection]
Kelet has quit [Read error: Connection reset by peer]
javar has joined #ruby
amacgregor has joined #ruby
AndChat| has joined #ruby
Pandee has quit [Ping timeout: 246 seconds]
jb41 has joined #ruby
mneorr has quit [Remote host closed the connection]
Kricir has joined #ruby
mneorr has joined #ruby
joonty_ has joined #ruby
chris____ has quit [Ping timeout: 245 seconds]
joonty has quit [Ping timeout: 240 seconds]
keen______ has quit [Ping timeout: 246 seconds]
mneorr has quit [Read error: Connection reset by peer]
mneorr_ has joined #ruby
_droid has left #ruby [#ruby]
keen______ has joined #ruby
adeponte has quit [Remote host closed the connection]
<shevy>
when I have a class like:
<shevy>
class Foo;end
<shevy>
is there a way to put it into a new module namespace, without having to edit the file?
Kricir has quit [Ping timeout: 264 seconds]
krainboltgreene has quit [Ping timeout: 256 seconds]
schickung has joined #ruby
<_br_>
shevy: Phew, tricky one. How about serializing it with e.g. ruby2ruby or sourcify and dynamically reloading the whole chunk? While you do remove the object from ObjectSpace before you do so?
schickung has quit [Client Quit]
pusewicz_ has joined #ruby
<_br_>
shevy: Or if its a file, why not read the file and just create a tempfile with the new layout and requiring that?
<shevy>
hmm
juo100 has joined #ruby
juo100 has quit [Client Quit]
joonty_ is now known as joonty
<pusewicz_>
Guys, I'm working on adding support to more countries and updating the current phone format info in a phonie gem https://github.com/wmoxam/phonie
<_br_>
Otherwise I'm not aware its possible to dynamically change object namespaces. Possibly a crazy ObjectSpace hack might be possible.
joonty has quit [Quit: WeeChat 0.4.1]
<shevy>
I see _br_
<shevy>
it did sound like a little extra work
<pusewicz_>
It would be great if some of you had a look here, and ideally reported issues with missing data and or wrong formats?
joonty has joined #ruby
<_br_>
shevy: Yeah, unfortuantely.
<shevy>
didn't have the idea for ObjectSpace before though, that sounds interesting
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<_br_>
I can't advise it though. It will be quite un-maintainable. :)
<shevy>
cool idea pusewicz_
<_br_>
pusewicz_: Yeah, this is nice. Sure, will take a look later :)
<pusewicz_>
Thanks!
relix has joined #ruby
anonymuse has joined #ruby
kaspergrubbe has joined #ruby
dawkirst has quit [Ping timeout: 264 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
Domon has quit [Remote host closed the connection]
realDAB has quit [Quit: realDAB]
anonymuse has quit [Remote host closed the connection]
<_br_>
oh I hate CSS.
camilasan has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
Kelet has joined #ruby
hanmac has quit [Quit: Leaving.]
mouse has quit [Ping timeout: 264 seconds]
camilasan has joined #ruby
cj3kim has quit [Remote host closed the connection]
osvico has joined #ruby
<shevy>
hehe
<shevy>
I think the core idea behind CSS is ok
RORgasm has joined #ruby
<shevy>
it got too complex though
tatsuya_o has joined #ruby
obs__ is now known as obs
dawkirst has joined #ruby
tvw has joined #ruby
RORgasm has quit [Ping timeout: 245 seconds]
keen_______ has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
keen______ has quit [Ping timeout: 245 seconds]
mouse has joined #ruby
razi has joined #ruby
<joonty>
shevy: i think advanced gui is a complex concept though
<shevy>
well, the www showed that there can be elegant solutions to it
<joonty>
i'd say the main problem with css is incompatibility and inconsistency between different browsers
camilasan has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
different browsers? isn't everyone using only chrome already? :-)
<joonty>
hehe that would be nice
<nayena>
unfortunately its like 50% still using IE
<joonty>
we just had a client who required an app to work in IE 6
<joonty>
and that's over 12 years old now!
camilasan has joined #ruby
<joonty>
which is half the lifetime of the internet
ferdev has quit [Quit: ferdev]
<shevy>
ewwwwwww
stonevil has joined #ruby
darth_chatri has joined #ruby
mneorr_ has quit [Remote host closed the connection]
manutter has joined #ruby
Kelet has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
jonahR has joined #ruby
hanmac has joined #ruby
juo100 has joined #ruby
juo100 has quit [Client Quit]
camilasan has quit [Remote host closed the connection]
mneorr has quit [Ping timeout: 264 seconds]
relix has joined #ruby
verto has joined #ruby
mneorr has joined #ruby
krainboltgreene has joined #ruby
<_br_>
shevy: Chrome? Eh? Too slow. Firefox.
kaspergrubbe has joined #ruby
tatsuya__ has joined #ruby
ffio has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
companion has quit [Ping timeout: 240 seconds]
germanstudent has quit [Ping timeout: 264 seconds]
verto has quit [Ping timeout: 264 seconds]
anderson has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
tatsuya_o has quit [Ping timeout: 245 seconds]
anderson has joined #ruby
guiocavalcanti has joined #ruby
zodiak has joined #ruby
companion has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
machuga|away is now known as machuga
jonathanwallace has joined #ruby
Zai00 has quit [Quit: Zai00]
ldnunes has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
germanstudent has joined #ruby
javar has quit [Quit: javar]
atno has joined #ruby
Neomex has joined #ruby
Kricir has joined #ruby
Neomex has quit [Client Quit]
tacos1de has quit [Ping timeout: 240 seconds]
graydot has quit [Quit: graydot]
greenarrow has quit [Ping timeout: 245 seconds]
bdd_newbie has joined #ruby
gustavn has joined #ruby
<bdd_newbie>
Hi everyone , does anyone know how to start a secure connection to Amazon s3 with aws-sdk
codecop has quit [Remote host closed the connection]
PhatBaja has joined #ruby
<bdd_newbie>
also if i need to take any steps to establish a secure connection with ftp server on client side
xcv has quit [Remote host closed the connection]
tacos1de has joined #ruby
<_br_>
bdd_newbie: I don't know about aws-sdk. But FTP is per definition not secure. If you want encrypted tunnel for FTP switch to SFTP.
axeman- has quit [Read error: Connection reset by peer]
Kricir has quit [Ping timeout: 264 seconds]
axeman- has joined #ruby
ExxKA has joined #ruby
LucidDreamZzZz has quit [Remote host closed the connection]
ewnd9 has quit [Remote host closed the connection]
LucidDreamZzZz has joined #ruby
<bdd_newbie>
_br_: is there another library for sftp other than net:sftp
timeout has joined #ruby
Kelet has joined #ruby
PhatBaja has quit [Ping timeout: 245 seconds]
tk has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
axeman- has joined #ruby
tk is now known as Guest76359
jonathanwallace has quit [Ping timeout: 264 seconds]
<_br_>
bdd_newbie: Something wrong with net::sftp? Check out rubytoolbox website, its helpful for questions like this.
homelinen has quit [Ping timeout: 264 seconds]
<bdd_newbie>
ohk...the problem is in the way we use sftp library
mercwithamouth has joined #ruby
Kelet has quit [Client Quit]
<bdd_newbie>
we have to wrap all commands inside sftp.start() block
Beoran_ has quit [Read error: Connection reset by peer]
adambeynon has joined #ruby
nari has joined #ruby
pipework has quit [Remote host closed the connection]
Tricon has joined #ruby
smathieu has joined #ruby
enebo has joined #ruby
sambao21 has joined #ruby
hanmac has quit [Quit: Leaving.]
evenix has joined #ruby
evenix has quit [Remote host closed the connection]
klip has quit [Remote host closed the connection]
Uranio has quit [Quit: while you reading this, a kitty dies]
guiocava_ has joined #ruby
ferdev has joined #ruby
jonahR has quit [Quit: jonahR]
enebo has quit [Client Quit]
decoponio has quit [Ping timeout: 246 seconds]
ExxKA has quit [Quit: This computer has gone to sleep]
guiocavalcanti has quit [Ping timeout: 256 seconds]
smathieu has quit [Ping timeout: 268 seconds]
bluOxigen has quit [Ping timeout: 256 seconds]
mklappst_ has joined #ruby
hanmac has joined #ruby
krainboltgreene has quit [Quit: krainboltgreene]
emergion has quit [Quit: Computer has gone to sleep.]
devoldmx3 has quit [Read error: Connection reset by peer]
mklappstuhl has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
jp- has joined #ruby
ssvo has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
iFire_ has joined #ruby
fermion_ has joined #ruby
breakingthings has joined #ruby
decoponio has joined #ruby
homelinen has joined #ruby
iFire has quit [Ping timeout: 264 seconds]
<bdd_newbie>
on using Net:sftp my command prompt is getting stuck
<bdd_newbie>
any ideas why
Beoran_ has joined #ruby
<bdd_newbie>
my server is connected
dmiller has joined #ruby
pranny has quit [Quit: Leaving.]
blackmesa has joined #ruby
ewnd9 has quit [Ping timeout: 264 seconds]
guiocava_ is now known as guiocavalcanti
gyre007 has quit [Remote host closed the connection]
quickycoder has joined #ruby
fgo has quit [Remote host closed the connection]
colonolGron has quit [Quit: Lost terminal]
thesheff17 has joined #ruby
gyre007 has joined #ruby
Xeago has joined #ruby
realDAB has joined #ruby
arya_ has quit [Ping timeout: 256 seconds]
blackmesa has quit [Remote host closed the connection]
arya_ has joined #ruby
axeman- has quit [Ping timeout: 264 seconds]
dmiller has quit [Remote host closed the connection]
axeman- has joined #ruby
<blip99>
hi all, I need some help making a regular expression to use for gsub. I have a string "abc AS def", I want to get rid of everything from the "AS" onwards so that I end up with "abc" only
Deele has joined #ruby
RORgasm has joined #ruby
noop has quit [Ping timeout: 264 seconds]
xcv has quit [Remote host closed the connection]
nikeita has joined #ruby
blip99 has quit [Remote host closed the connection]
blip99 has joined #ruby
<g3orge>
/abc/ would work
_veer has quit [Read error: Connection reset by peer]
_veer has joined #ruby
<blip99>
g3orge: the problem is abc varies, and so does def. only the "AS" is fixed in every string
tagrudev has quit [Remote host closed the connection]
wagster has joined #ruby
GeissT has quit [Quit: MillBroChat AdIRC User]
kobain has joined #ruby
arya_ has joined #ruby
scarolan has quit [Ping timeout: 246 seconds]
scarolan has joined #ruby
kpshek has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
cantonic has joined #ruby
ntus1017 has quit [Remote host closed the connection]
axeman- has quit [Ping timeout: 268 seconds]
ArchBeOS has quit [Remote host closed the connection]
arturaz has quit [Quit: Leaving]
axeman- has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
vasilakisFiL has joined #ruby
darth_chatri has quit [Quit: Leaving.]
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
<vasilakisFiL>
hey guys, in a project that I use celluoid(an actor based library) accidentally I declared a new class Response.. after a bunge of errors I discovered that there is already a Response class defined in celluloid..so I guess I have to change the name of my class..but is there any other way? sorry new to ruby
scarolan has quit [Ping timeout: 256 seconds]
PaulePanter has quit [Remote host closed the connection]
JZTech101 has quit [Quit: Bye]
scarolan has joined #ruby
xcv has quit [Remote host closed the connection]
v0apihgt34 has quit [Read error: Connection reset by peer]
blip99 has joined #ruby
scarolan has quit [Ping timeout: 246 seconds]
v0n has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
darth_chatri has joined #ruby
scarolan has joined #ruby
axeman- has quit [Ping timeout: 264 seconds]
JZTech101 has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
JZTech101 has quit [Read error: Connection reset by peer]
axeman- has joined #ruby
<Soulcutter>
vasilakisFiL: Celluloid's is namespaced under the Celluloid module - you should probably not be declaring your own classes in that namespace
Bry8Star{T2 has joined #ruby
Evixion has joined #ruby
musl_ has quit [Quit: WeeChat 0.4.1]
ehc has joined #ruby
jonathanwallace has joined #ruby
Rokko11 has quit [Quit: Page closed]
limon7 has quit [Quit: Konversation terminated!]
<jlebrech>
can anyone help me with the oauth2 gem?
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
guiocavalcanti has quit [Read error: Connection timed out]
tacos1de has quit [Remote host closed the connection]
johnnyfuchs has joined #ruby
r0bgleeson has quit [Ping timeout: 256 seconds]
ntus1017 has joined #ruby
tommyvyo has quit [Quit:]
scarolan has quit [Ping timeout: 246 seconds]
<mercwithamouth>
Soulcutter: well no...it deals more so with mocking. i have an idea now....
stonevil has quit [Remote host closed the connection]
kaspergrubbe has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
pyrac has quit [Quit: pyrac]
io_syl has quit [Quit: io_syl]
haxrbyte_ has quit [Read error: Connection reset by peer]
scarolan has joined #ruby
letstest has joined #ruby
threesome has quit [Read error: Operation timed out]
stonevil has joined #ruby
<letstest>
hi, i am trying to use RSpec for some tests, but i want to access the results in the after hook so that I can report the results to a 3rd party api. is this possible?
tacos1de has joined #ruby
kpshek has quit []
jsummerfield has joined #ruby
jlast_ has joined #ruby
gazarsgo has joined #ruby
realDAB has joined #ruby
axeman- has quit [Ping timeout: 256 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
<brisbin>
letstest: the around hook might be better, it's handed the example object which may hold this info after it's run
nathancahill has joined #ruby
scarolan has quit [Ping timeout: 245 seconds]
alex__c2022 has quit [Read error: Operation timed out]
<brisbin>
you also might be able to create a custom formatter, which reports to the API as part of outputting the results
axeman- has joined #ruby
tommyvyo has joined #ruby
jlast has quit [Ping timeout: 245 seconds]
scarolan has joined #ruby
cj3kim has joined #ruby
<letstest>
thanks brisbin, checking out the around hook
endash has joined #ruby
<letstest>
how do i access the result though?
<brisbin>
got me
Krajsnick has joined #ruby
stonevil has quit [Remote host closed the connection]
<letstest>
brisbin - i found a solution
devoldmx has quit [Read error: Connection reset by peer]
<letstest>
after(:each) do if example.exception != nil puts "test failed" end end
scarolan has quit [Ping timeout: 264 seconds]
sventon has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
<shevy>
ok Kelet
<Kelet>
shevy, split on equals - left side is variable name, right side is value. each newline is a new variable. boom.
scarolan has quit [Ping timeout: 245 seconds]
mklappst_ has quit [Remote host closed the connection]
PhatBaja has quit [Ping timeout: 245 seconds]
scarolan has joined #ruby
Cyrus has quit [Quit: Cyrus.sleep()]
camilasan has joined #ruby
thiagopnts has quit [Quit: Leaving.]
bradsmith has joined #ruby
adambeynon has quit [Ping timeout: 240 seconds]
<jb41>
i have two versions of bundler (1.3.5, 1.2.3), rails-4.0.0 needs >=1.3.0, how can I delete bundler 1.2.3, or make rails using 1.3.5?
jefflyne has joined #ruby
<hanmac>
jb41 use gem cleanup
guiocava_ has joined #ruby
scarolan has quit [Ping timeout: 256 seconds]
ssvo has joined #ruby
<jb41>
doesn't works, I still have 1.2.3 and 1.3.5
scarolan has joined #ruby
<Xeago>
jb41: gem uninstall bundler-1.2.3 I suppose
<Xeago>
or you can leave out the version
<Xeago>
I think it prompts
<Xeago>
or just uninstall both
Guest76359 has quit [Quit: ばいばい]
<Xeago>
and then just install bundler again, it'll use the newest
<jb41>
Attempting to uninstall bundler-1.2.3
<jb41>
Unable to uninstall bundler-1.2.3: Gem::InstallError: gem "bundler" is not installed
<jb41>
Clean Up Complete
nikeita has joined #ruby
<jb41>
wtf?
<Xeago>
and then use bundler to install the required version by rails
<shevy>
hanmac do you use bundler?
<jb41>
I think I messed up too much with bundler
anay has quit [Remote host closed the connection]
realDAB has quit [Quit: realDAB]
jlast_ has quit [Remote host closed the connection]
ckrailo has joined #ruby
jlast has joined #ruby
<shevy>
hehe that's what people often say :D
<jb41>
doesn't matter, looks like its working properly, I hope... ;)
denver has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 245 seconds]
senayar_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
kpshek has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
browndawg has joined #ruby
scarolan has joined #ruby
senayar has quit [Ping timeout: 264 seconds]
senayar_ is now known as senayar
fredjean has joined #ruby
xcv has joined #ruby
terrellt has joined #ruby
malcolmva has quit [Read error: Connection reset by peer]
malcolmva has joined #ruby
randomautomator has joined #ruby
momomomomo has joined #ruby
rodacato has joined #ruby
geggam has joined #ruby
zachrab has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 264 seconds]
scarolan has joined #ruby
cj3kim has joined #ruby
onr has joined #ruby
sayan has quit [Ping timeout: 246 seconds]
Kricir has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
LiVe0UR0LiFe has joined #ruby
adambeynon has joined #ruby
realDAB has joined #ruby
LiVe0UR0L has joined #ruby
lnormous has joined #ruby
<LiVe0UR0LiFe>
!
scarolan has quit [Ping timeout: 264 seconds]
stoffus has quit [Ping timeout: 264 seconds]
mansi has quit [Read error: Connection reset by peer]
cody-- has quit [Quit: Computer has gone to sleep.]
scarolan has joined #ruby
ananthakumaran has joined #ruby
momomomomo has quit [Quit: momomomomo]
mnaser has quit [Excess Flood]
darth_chatri has quit [Quit: Leaving.]
mansi has joined #ruby
LiVe0UR0LiFe has quit [Quit: LiVe0UR0LiFe]
chris____ has quit [Read error: Connection reset by peer]
wu_lmao has quit [Quit: wu_lmao]
mansi has quit [Read error: Connection reset by peer]
LiVe0UR0L has quit []
stoffus has joined #ruby
chris____ has joined #ruby
markalanevans_ has joined #ruby
mansi has joined #ruby
aganov has quit [Quit: aganov]
stonevil has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 256 seconds]
momomomomo has joined #ruby
enebo has joined #ruby
fantazo has joined #ruby
h4mz1d has joined #ruby
stonevil has joined #ruby
momomomomo has quit [Client Quit]
f1gjam has joined #ruby
scarolan has quit [Ping timeout: 246 seconds]
sambao21 has joined #ruby
guiocava_ has quit [Read error: Connection timed out]
<f1gjam>
hey guys, I am new to ruby and I am trying to get a ruby file call a method from another ruby file, so say, fileA calls method from fileB. The problem I have is that, when I do require_relative('fileB') it seems that this executes fileB which then fails as it doesn't have the required parameters passed
threesome has joined #ruby
alup has quit [Quit: Leaving]
scarolan has joined #ruby
jonathanwallace has quit [Ping timeout: 264 seconds]
mansi has quit [Read error: Connection reset by peer]
anay has joined #ruby
mansi has joined #ruby
ffio has quit [Quit: WeeChat 0.4.1]
<Kelet>
f1gjam, Does your fileB have things outside of classes, modules, methods, etc?
<f1gjam>
well i am not using a class, but yes it does
<f1gjam>
and they are all set
rickruby has quit [Remote host closed the connection]
<f1gjam>
where it fails, is on the method I am trying to call
brennanMKE has joined #ruby
machuga is now known as machuga|away
jonathanwallace has joined #ruby
<qhartman>
Is there a more idiomatic way to to do this sort of test on a variable: 'if !foo.nil? and foo == "bar"'. That feels clunky but I haven't thought of anything better yet.
<Kelet>
The general idiom is to stick your outer code into a method or something, and call it as-needed.
<robert_>
zeade: I haven't touched my paths. it shows other gems just fine.
scarolan has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
vasilakisFiL has left #ruby ["Konversation terminated!"]
javar has quit [Quit: javar]
scarolan has joined #ruby
Kar- has joined #ruby
Tarential has quit [Excess Flood]
bradsmith has quit [Remote host closed the connection]
Tarential has joined #ruby
ehc has quit [Quit: ehc]
iliketurtles has joined #ruby
axl_ has joined #ruby
apeiros has quit [Remote host closed the connection]
Spooner has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 264 seconds]
ItsAshleyP has joined #ruby
byprdct has joined #ruby
scarolan has joined #ruby
<ItsAshleyP>
Hello! I'm new to programming, so just joining to learn some tips and get some advice!
rupee has joined #ruby
<zendeavor>
start with C
jsummerfield has quit [Quit: jsummerfield]
l3ck has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
<ItsAshleyP>
really? I'm been told to start with ruby?!
saarinen has joined #ruby
<zendeavor>
how misleading
<ItsAshleyP>
really? How come?
<zendeavor>
you actually should start with some maths background
<MrZYX>
ItsAshleyP: zendeavor is just trolling ;)
<zendeavor>
not so much trolling as being perfectly honest.
h4mz1d has joined #ruby
bradsmith has joined #ruby
<ItsAshleyP>
I'm so confused! Everyone is telling me something different, haha...some are telling me to start with Java, Ruby, PHP, etc...I don't know where to start!
thomasle_ has joined #ruby
cads has joined #ruby
RichardBaker has joined #ruby
<MrZYX>
ruby is a perfect choice ;)
<hanmac>
going C -> C++ -> Ruby is good because with this you allways feel better ;P
<brisbin>
start by finding a problem to solve, solve it in any language
<zendeavor>
ruby will suit you just fine if you can accept that you won't be likely to write inefficient algorithms by default
<alienaut>
i think c is good choice for beginning
<zendeavor>
s/won't/will/
<spike|spiegel>
hanmac: C -> C++ doesn't make me feel better :)
<hanmac>
when you do C++ you are happy that you dont need to do pure C anymore ;P
<spike|spiegel>
it makes me want to stab someone.
<ItsAshleyP>
I'm looking more for mobile web and app development...so which is the best
<ItsAshleyP>
iOS...
<Xeago>
none
blaxter_ has joined #ruby
<zendeavor>
they all blow
<alienaut>
pure c is good for learning basics.
<ItsAshleyP>
lwow..
scarolan has quit [Ping timeout: 256 seconds]
<Xeago>
ItsAshleyP: you want a background
<Xeago>
write some pseudo code to find the first 10 prime numbers
<zendeavor>
you can't just dive straight into mobile development
<ItsAshleyP>
I'm basically learning from scratch...
<zendeavor>
it requires special attention to detail
popl has joined #ruby
<brisbin>
sure you can, there's a small chance it'll end well
scarolan has joined #ruby
trepidaciousMBR has quit [Ping timeout: 264 seconds]
<hanmac>
you can programm for iOS? i thought you need to sell your soul to apple to do that
<Xeago>
then show people that pseudocode - that is the most important part
<ItsAshleyP>
hanmac: lol
<Xeago>
as long as you know what heck you are doing
<alienaut>
ItsAshleyP: do you know how to use command line?
nitish has quit [Remote host closed the connection]
<zendeavor>
ItsAshleyP: you need to learn from scratch with mathematics and a lower level high-level language like C
<Xeago>
language, framework - it all becomes irrelevant
<aedorn>
C->Prolog->OCAML->INTERCAL is the path to true insanity.
<zendeavor>
anything that ends in INTERCAL is insanity
<Xeago>
Prolog was cool..
axeman- has quit [Ping timeout: 256 seconds]
<Xeago>
so was OCAML
<zendeavor>
prolog is mindboggling to reason about
<ItsAshleyP>
Who here is self taught?
<Xeago>
mostly
* brisbin
raises hand
<Xeago>
taught by others of course, but on my own accord
<zendeavor>
beginners should absolutely start with memory management
<resure>
ItsAshleyP: because there a lot of things that should be in first language
vlad_starkov has quit [Read error: Connection reset by peer]
<aedorn>
ItsAshleyP: So what you should get from this is that everyone has an opinion, and it's all right, or wrong. Your best bet is exploring everything you can and figuring out what directly gets your attention first and then going that route until something else grabs it.
<zendeavor>
that's one of the most fundamental and important concepts to consider when writing any and every algorithm.
<resure>
What is include? What is main function? Why they should be in simple program? Etc etc.
<endash>
I definitely have a different idea of what makes a beginner
<wmoxam>
I'd say that Go is also decent for beginners
<resure>
Beginner should learn basic algorithms and _programming_, not parts of C language. That's why I think it's better to start with something more simple (without sugar, just simple and logical language).
scarolan has joined #ruby
<wmoxam>
Go doesn't have a ton of concepts to learn
<wmoxam>
which is good
<endash>
I definitely agree that we start people off way too high, with a "writing rails controllers for dummies" approach, but I'd handle the very low level stuff (like working space or complexity) academically and keep the language itself simple
<ItsAshleyP>
I've heard the most popular, at the moment, are PHP , Objective C and Ruby
<zendeavor>
C is an extremely minimal grammar, that makes it fit *great* for beginner programming
<zendeavor>
ItsAshleyP: never touch php, ever, in your life.
<ItsAshleyP>
zendeavor: why not?
<spike|spiegel>
PHP is awesome. just for the lulz.
timonv has quit [Remote host closed the connection]
<aedorn>
ItsAshleyP: As a side note, I know quite a few people who started specifically with basic iOS applications before anything else and they're programming just fine in all things now. Same with those who start with HTML/JavaScript first, or Ruby, or Erlang, or C, or even Prolog.
<ItsAshleyP>
aedorn: how long have you been programming?
<endash>
We don't gotta tear new programmers down to brass tacks and rebuild them in order for them to be good programmers, though
BillCris_ is now known as BillCriswell
<aedorn>
just under 30 years
<zendeavor>
ItsAshleyP: consider formal education; they don't start by teaching you how to write objective-C.
<superscott[8]>
you should learn php only to learn why you should never touch any language that is like php
<ItsAshleyP>
aedorn: wow, thats great
bklane has quit [Remote host closed the connection]
<ItsAshleyP>
aedorn: do you use any other chat platforms? kik? twitter?
<zendeavor>
ItsAshleyP: computer science courses DO teach languages like java and python as a means of teaching how to construct algorithms
<zendeavor>
but not as a means of teaching how to *program*
<ItsAshleyP>
zendeavor: I sign up for CS101...online
<ItsAshleyP>
signed*
<ItsAshleyP>
so I will be starting that soon
<zendeavor>
i know, and i'm a bit disappointed that it uses a web-spider as the target program
<alienaut>
ItsAshleyP: go for it. when it's done try other courses too.
<zendeavor>
prefer not to involve WWW in beginner programming
rodacato has quit [Remote host closed the connection]
<ItsAshleyP>
alienaut: I will!
AndChat- has quit [Quit: Bye]
iAreBaboon_ has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
cody-- has joined #ruby
<alienaut>
ItsAshleyP: try coursera.org too
iAreBaboon_ has quit [Remote host closed the connection]
lkba has joined #ruby
<ItsAshleyP>
alienaut: ok
<zendeavor>
khanacademy
scarolan has joined #ruby
<ItsAshleyP>
zeadeavor: will do
<Kelet>
My first CS course was taught in C, my second CS course was taught in MIPS assembly :|
<popl>
khaaaaaaaaaaaaaaaaaanacademy.com
<zendeavor>
lolol Kelet
<aedorn>
ItsAshleyP: Just Google Talk (gmail chat now, I guess, or is it Google+ chat? heh)
<Kelet>
Then they cram Java down our throat but never allow us to use any of the standard API that's of worth
vy has joined #ruby
zcreative has joined #ruby
<ItsAshleyP>
alienaut:will do
itcharlie has joined #ruby
<alienaut>
khanacademy is awesome for math learning but i never liked their cs programs
<zendeavor>
Kelet: yeah, sounds a lot like CIS courses that teach shell scripting
<vy>
What's wrong with pygments? When I try to gem install pygments it complains that Could not find a valid gem 'pygments' (>= 0) in any repository. Any ideas?
<zendeavor>
alienaut: that is the point, entirely.
rodacato has joined #ruby
<ItsAshleyP>
alienaut: I'm actually enrolled in that program!
<zendeavor>
ItsAshleyP: if you want exercises to get started with, try euler
<ItsAshleyP>
zendeavor: thanks....so your saying that I have to be great in Math to program?
tkuchiki has quit [Remote host closed the connection]
rdark has quit [Quit: leaving]
<zendeavor>
no but you need a good grasp
<Xeago>
ItsAshleyP: no, but math can be a good thing to fall back on
dhruvasagar has quit [Ping timeout: 264 seconds]
blip99 has quit [Ping timeout: 264 seconds]
<zendeavor>
you can get by with just a logical approach to most algorithms
<Kelet>
vy, gem install pygments.rb
<ItsAshleyP>
zendeavor: ok
Dwarf has quit [Max SendQ exceeded]
<zendeavor>
having a good grasp on mathematics is important for writing optimal algos
<Kelet>
.rb is part of the actual project name
<Kelet>
as yuck as that is
ferdev has quit [Quit: ferdev]
* Kelet
thinks of PDF.rb
<zendeavor>
you have to understand the numerical relationships
<vy>
Kelet: Thanks so much.
<ItsAshleyP>
zendeavor: this seems HARD
<Xeago>
ItsAshleyP: as I said, a good, rough and tough first excercise is the calculate the first 10 prime numbers
<ItsAshleyP>
I feel lost! lol
<zendeavor>
i'm gonna stick with "write in C"
scarolan has quit [Ping timeout: 256 seconds]
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
<zendeavor>
you don't even have to get *good* at C
awarner has quit [Ping timeout: 240 seconds]
<Kelet>
I'd say see what your CS class uses and use whatever they use
<zendeavor>
just learn the minimal grammar and how to create and manage a variety of data structures
scarolan has joined #ruby
nathancahill has joined #ruby
awarner has joined #ruby
<zendeavor>
then when you move to something like python or ruby, the creation of data structures will be more or less
<zendeavor>
automatic
_anildigital is now known as anildigital
<zendeavor>
and you will only need to think back on your C days and think "this would work better as a ... instead of a ..."
spider-mario has joined #ruby
<ItsAshleyP>
thanks for the advice everyone!
alienaut has left #ruby [#ruby]
<zendeavor>
whoever led you here deserves a chop in the neck btw.
<ItsAshleyP>
zendeavor: why?
<zendeavor>
because they should have told you all of this instead.
<zendeavor>
passing the buck, blegh.
sepp2k has joined #ruby
<ItsAshleyP>
zendeavor: very true
<ItsAshleyP>
zendeavor: thx
<zendeavor>
what they really meant was
dhruvasagar has joined #ruby
grzywacz has joined #ruby
<zendeavor>
"i don't want to be the one who has to explain why your implementation sucks, so just go use another language and ask them instead"
<aedorn>
heh
scarolan has quit [Ping timeout: 245 seconds]
<zendeavor>
on that note, i don't want to be the one to tell you why your ruby sucks, so go use C and ask them instead
LucidDreamZzZz has quit [Ping timeout: 240 seconds]
mikeg has joined #ruby
<zendeavor>
^_^
Zai00 has quit [Quit: Zai00]
Mars` has quit [Ping timeout: 245 seconds]
<ItsAshleyP>
zeadeavor: I'm going to try C also
ItsAshleyP has quit [Quit: Page closed]
scarolan has joined #ruby
hitesh has joined #ruby
cj3kim has joined #ruby
anay has quit [Read error: Connection reset by peer]
luckyruby has joined #ruby
maniacal has quit [Ping timeout: 256 seconds]
mupkoo has quit [Read error: Connection reset by peer]
mupkoo has joined #ruby
mupkoo has quit [Remote host closed the connection]
bklane has joined #ruby
mneorr has joined #ruby
gansbrest has joined #ruby
axeman- has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
c0rn has joined #ruby
<gansbrest>
hi. Getting this error duplicate argument name def get_target_ips(role, env, role, context)
<gansbrest>
what would that mean, I can't see any duplicates there
scarolan has joined #ruby
apeiros has joined #ruby
<gansbrest>
oh wait
saarinen has quit [Quit: saarinen]
cj3kim has quit [Ping timeout: 268 seconds]
<gansbrest>
getting crazy )
dhruvasagar has quit [Ping timeout: 264 seconds]
pskosinski has quit [Quit: Til rivido Idisti!]
nignaztic has joined #ruby
<Kelet>
lol
reset has joined #ruby
TIJ has joined #ruby
Hien has quit [Quit: leaving]
s00pcan_ has joined #ruby
scarolan has quit [Ping timeout: 256 seconds]
nazty has quit [Ping timeout: 264 seconds]
saarinen has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
scarolan has joined #ruby
Hien has joined #ruby
LucidDreamZzZz has joined #ruby
cantonic has quit [Quit: cantonic]
saarinen has quit [Client Quit]
Giorgio has quit [Ping timeout: 246 seconds]
sailias1 is now known as sailias
mneorr has quit [Remote host closed the connection]
gansbrest has quit [Quit: Ex-Chat]
suporte85 has quit [Quit: Saindo]
AndChat| has quit [Ping timeout: 268 seconds]
mneorr has joined #ruby
TIJ has quit [Quit: Konversation terminated!]
c0rn has joined #ruby
x1337807x has joined #ruby
chris____ has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
<tjbiddle>
I'm writing a CLI and don't want to display stack traces unless --debug is specified. Can I catch exceptions inside a class rather than inside a method?
scarolan has quit [Ping timeout: 264 seconds]
rodacato has quit [Remote host closed the connection]
jorge_ has quit [Remote host closed the connection]
ehc has joined #ruby
scarolan has joined #ruby
<apeiros>
tjbiddle: you can, but it won't do what you expect it to
jorge_ has joined #ruby
eldariof has joined #ruby
<tjbiddle>
apeiros: Meaning?
<apeiros>
it'll rescue (not *catch*, catch means something entirely different) exceptions raised by the class body code
stoffus has joined #ruby
<apeiros>
restructure your code to have a single "main" method from which the rest of the code runs
rippa has joined #ruby
<apeiros>
typically this is done in the fashion of your executable simply containing this:
<apeiros>
and then you'd have the rescue in CLI::run
codesoda has joined #ruby
anildigital is now known as _anildigital
tatsuya_o has joined #ruby
chris____ has joined #ruby
pyrac has joined #ruby
mneorr has quit [Ping timeout: 264 seconds]
hitesh has quit [Read error: Connection reset by peer]
<apeiros>
(this has the positive side effect of making your whole app easier to test)
<tjbiddle>
apeiros: Hm. Trying to figure out if I can still inherit from Thor (CLI parsing gem) to grab the --verbose and --debug args, yet have a 'main' method. Been getting closer to that every time I've refactored - but haven't hit it yet. Probably just thinking about it wrong. Thanks!
<apeiros>
k, don't know about Thor. yw, good luck :)
scarolan has quit [Ping timeout: 264 seconds]
robbyoconnor has quit [Read error: Connection reset by peer]
rippa has quit [Client Quit]
guiocavalcanti has quit [Ping timeout: 264 seconds]
guiocavalcanti has joined #ruby
robbyoconnor has joined #ruby
jorge_ has quit [Ping timeout: 268 seconds]
scarolan has joined #ruby
sn0wb1rdz has joined #ruby
kpshek has quit [Ping timeout: 256 seconds]
swordsmanz has quit [Ping timeout: 256 seconds]
robscomputer has joined #ruby
cj3kim has joined #ruby
vy has quit []
Dwarf has joined #ruby
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
cody-- has quit [Quit: Computer has gone to sleep.]
mikeg has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 264 seconds]
erry has quit [Read error: Operation timed out]
robscomputer has quit [Remote host closed the connection]
scarolan has joined #ruby
io_syl has joined #ruby
ferdev has joined #ruby
blaxter_ has quit [Quit: foo]
terrellt has joined #ruby
kpshek has joined #ruby
rippa has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lectrick>
Idea: Embed a class' unit tests inside itself. Crazy-talk?
mariappp has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
<fryguy>
lectrick: not really, it's somewhat common in python (doctest, etc)
<lectrick>
so I could just do Classname.test and if nothing raises, unit test good
maria_ has joined #ruby
chris____ has quit [Remote host closed the connection]
jonahR has joined #ruby
chasep_work has joined #ruby
<fryguy>
i don't know if anybody in ruby community does it though
scarolan has joined #ruby
<lectrick>
fryguy: I can start.
maria_ has quit [Client Quit]
mariappp has quit [Client Quit]
<Krajsnick>
fryguy: thanks!
mariappp has joined #ruby
<chasep_work>
I've installed a gem (barometer) but when I do 'require barometer' in a script, it errors out, saying "cannot load such file -- barometer (LoadError)"
<chasep_work>
any ideas?
<maniacal>
test
<MrZYX>
lectrick: not sure I'd like it, I mean is it the responsibility of a class representing, lets say a car, to test itself? Or isn't that rather the job of a distinct class, a car tester so to say
<MrZYX>
chasep_work: can it be that you're still on ruby 1.8?
<fryguy>
chasep_work: does the gem actually install a lib called barometer? are you using the same instance of ruby that you used to gem install it, or is it in a different rvm or something?
interactionjaxsn has quit [Ping timeout: 264 seconds]
lnormous has quit [Ping timeout: 264 seconds]
<apeiros>
lectrick: languages like eiffel even go beyond that and use design by contract. google it. I loved it and am still sad that ruby doesn't offer it.
<apeiros>
(and no, even with rubys awesome metaprogramming you can't really add an equivalent)
<chasep_work>
fryguy: I do not know the answer to those questions, let me see if I can figure them out
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
hehe
<MrZYX>
chasep_work: do other gems work?
<shevy>
apeiros will never stop liking eiffel :D
goshakkk has joined #ruby
<chasep_work>
MrZYX: yes, all the other gems I've installed work fine, in the same scripts
zcreative has quit [Quit: Computer has gone to sleep.]
JimmyAtCMU has joined #ruby
<apeiros>
shevy: that particular aspect belongs into any sane language
LaPetiteFromage has quit [Ping timeout: 264 seconds]
scarolan has quit [Ping timeout: 268 seconds]
<robert_>
I'm having trouble using activesupport from a gemspec; my paths are those from sudo (or from simply logging in to the box); has anybody experienced similar trying to use activesupport and ruby 2.0?
<JimmyAtCMU>
Hi folks, what are some good resources for me to learn Ruby from scratch? (I have programming experience with Python and C.)
kennyvb has joined #ruby
nikeita has quit [Quit: sleep]
mark_locklear has quit [Quit: Leaving]
<chasep_work>
okay, I added the gem to the Gemfile, ran bundle install (which didn't install anything, since it was already installed) and now it works
twoism has quit [Remote host closed the connection]
<MrZYX>
well, that's expected behaviour
<MrZYX>
I was just about to ask if you use bundler
iliketurtles has quit [Quit: zzzzz…..]
<chasep_work>
MrZYX: ah, okay.. I've very little experience with Ruby, even less when you look beyond coding..... but, now I know a little more
<chasep_work>
thanks for everyones help
<lectrick>
apeiros: ah, interesting
saarinen has joined #ruby
saarinen has quit [Client Quit]
<lectrick>
apeiros: surely you could approximate some sort of DbC solution in ruby?
scarolan has quit [Ping timeout: 264 seconds]
twoism has joined #ruby
aces1up has joined #ruby
reset has joined #ruby
Neomex has joined #ruby
scarolan has joined #ruby
<aces1up>
how can i recursively call a method and also pass in a block IF it was passed?
saarinen has joined #ruby
<aces1up>
if i do method(var, &block) it wants to ALWAYS have a block.
<aces1up>
i just want to make it optional and pass it back to recursive method if it exists.
Neomex has quit [Client Quit]
browndawg has joined #ruby
<apeiros>
lectrick: not really, no. one of the most important things is missing: 'old'
interactionjaxsn has joined #ruby
<apeiros>
you can't sanely implement that in pure ruby. it needs language support (you want COW for that)
cantonic has joined #ruby
lemonsparrow_ has joined #ruby
<apeiros>
the rest: yes, you can somewhat approximate. but without 'old', many things are pointless for objects with mutable state.
JimmyAtCMU has left #ruby [#ruby]
<MrZYX>
aces1up: if block; recursive_call_with_block; else recursive_call_without_block; end;
<lectrick>
apeiros: what does "old" do?
c0rn has quit [Ping timeout: 256 seconds]
devoldmx has quit [Read error: No route to host]
c0rn has joined #ruby
<apeiros>
it provides the value prior to the method call
<lectrick>
also, unrelated: Is it unreasonable to expect an object to be able to initialize with .new and no arguments at all?
lemonsparrow_ is now known as lemonsparrow
<apeiros>
so you can perform comparisons between the object's state before and after the call in a method's post-conditions
<robert_>
apeiros: hai.
<apeiros>
hi robert_
<robert_>
how's it going?
<aces1up>
MrZYX cool got that part ok.. but how in this method(var, &block=nil)
LaPetiteFromage has quit [Ping timeout: 256 seconds]
<aces1up>
that won't be allowed.
<lectrick>
apeiros: can't you just use inspection to store that and compare it?
scarolan has quit [Ping timeout: 246 seconds]
<lectrick>
apeiros: introspection I mean
<apeiros>
lectrick: .new with no argument - depends on the class
<MrZYX>
aces1up: yes, block will be nil if you pass no block
<aces1up>
or just have not &block just block?
<lectrick>
apeiros: re: .new ... but expecting ANY class to be able to do so? maybe unreasonable
<apeiros>
lectrick: no. there is no sane way in plain ruby.
<apeiros>
lectrick: you mean *every*?
<aces1up>
rmerge!(other_hash, &block=nil)
<apeiros>
then yes, unreasonable
scarolan has joined #ruby
<lectrick>
apeiros: yeah, every. ok
<aces1up>
won't accept it with the &
<apeiros>
lectrick: are you looking for Class#allocate?
<lectrick>
apeiros: is it at least a good guideline?
<apeiros>
tjbiddle: line 26 is probably a bug (@logger instead of @@logger)
banghouse has quit [Remote host closed the connection]
tvw has quit []
Elhu has joined #ruby
<apeiros>
tjbiddle: if you're new to ruby, don't use @@class_variables - you probably do not know how they *really* work (they have nasty behaviors and are usually not what you want)
<kleinerdrache>
oh params={} just seems to work
<kleinerdrache>
def foo, bar, params={}
<kleinerdrache>
right?
<tjbiddle>
apeiros: It is, but interestingly enough it worked - Unless I somehow deleted it before copying.
<tjbiddle>
apeiros: Not new to Ruby - But have never used class vars. Seemed like it may be what I want - but refactoring now to get rid of it already :p
rickmasta has quit [Quit: Leaving...]
gnufied has quit [Ping timeout: 264 seconds]
<apeiros>
tjbiddle: any specific thing you want to know? or just generic advice?
<tjbiddle>
Generic advice - and is that the correct way to approach what we were talking about earlier with rescuing exceptions on a cli app?
jbpros has joined #ruby
phantummm has joined #ruby
erry__ is now known as erry
scarolan has quit [Ping timeout: 264 seconds]
gnufied has joined #ruby
<apeiros>
tjbiddle: ah, I see. Well, regarding BTInflection::start - yes, that's about what I meant.
scarolan has joined #ruby
<apeiros>
tjbiddle: re generic advice: @@log_level - drop it, not needed. you can write a delegator with patches the call through to @@logger
<apeiros>
you can even easily set the initial level
zmike1234 has quit [Quit: ~]
browndawg has left #ruby [#ruby]
<apeiros>
I'd also probably move initialization of the logger into BTInflection::start and just default to Logger.new(STDOUT) with log-level Logger::WARN
L_p has quit [Quit: l_p]
gnufied has left #ruby [#ruby]
heftig has quit [Read error: Connection reset by peer]
Poloniy has joined #ruby
heftig has joined #ruby
SeySayux has quit [Ping timeout: 256 seconds]
scarolan has quit [Ping timeout: 264 seconds]
SeySayux has joined #ruby
scarolan has joined #ruby
rodacato has joined #ruby
atyz has joined #ruby
anonymuse has quit [Remote host closed the connection]
brennanMKE has quit [Read error: Connection reset by peer]
echevemaster has joined #ruby
unstable has joined #ruby
dmiller has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
alvaro_o has joined #ruby
Olipro has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby
<aces1up>
MrZYX thanks, got it working, MrZYX have any suggestions on how to get this hash working?
<apeiros>
and I hope you get how to delete an array of keys yourself ;-)
zcreative has joined #ruby
<aces1up>
MrZYX yes they will be different.
<Dysruption>
rubyscript2exe isn't working
<Dysruption>
but i'll look at ocra
<havenwood>
Dysruption: You can just put a shebang on the first line if you want to run it as a binary in *nix.
<aces1up>
apeiros cool thanks.
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Dysruption>
havenwood: it has to run in windows also unfortunately :/
timonv has joined #ruby
intuxicated has joined #ruby
<havenwood>
Dysruption: I guess just Ocra the Windows version and `#!/usr/bin/env ruby` for pretty much everything else.
sambao21 has quit [Quit: Computer has gone to sleep.]
<Dysruption>
havenwood: okay I'll give it a shot, thank you
<robert_>
shevy: hai. sup? :D
lkba has quit [Quit: Bye]
lkba has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<aces1up>
apeiros hey also when creating my own hash functions ex monkey patching Hash, when should i use self.key vs key, or does it matter? SHould i just always use self?
<shevy>
hey robert_ ... struggling with moving to ruby 1.9 / 2.0 still ...
<apeiros>
aces1up: it's methods, not functions :-p
sambao21 has joined #ruby
<aces1up>
yeh still can't get that outta my head.
scarolan has quit [Ping timeout: 256 seconds]
<apeiros>
aces1up: def self.method_name creates methods on the class, not for its instances
<aces1up>
methods just seems like weird name.
<Dysruption>
havenwood: does this work with ruby 2.0
<aces1up>
no
<shevy>
aces1up, well methods are just functions more intimately associated with objects
<aces1up>
i meant referencing.
<robert_>
shevy: I see. Same, sort of.
scarolan has joined #ruby
<aces1up>
like class Hash ; def mymethod ; self.keys ; end
<shevy>
robert_ :( it never stops!
<shevy>
robert_ but I am going to have to use something else than yaml
<robert_>
shevy: don't I know it, lol
<aces1up>
or should it just be called direct like "keys"
<aces1up>
i have seen both used.
<havenwood>
Dysruption: I don't target Windows so I haven't tried it. If you have problems with 2.0 start a Github Issue, though it may 'just work'.
<shevy>
robert_ right now I have to fix "circular require" in an ancient project, that is so boring ...
<aces1up>
confused as to why you would use one over the other.
asteve has joined #ruby
<shevy>
aces1up in your example it does not seem to be the same, or?
<shevy>
keys could be a local variable name too, self.keys could never be
RichardBaker has quit [Quit: RichardBaker]
caveat- has quit [Ping timeout: 264 seconds]
<aces1up>
Class Hash ; def mymethod() ; #self.keys would call keys on instance of Hash ; end
rodacato has quit [Remote host closed the connection]
Al_ has joined #ruby
ewnd9 has quit [Ping timeout: 264 seconds]
<shevy>
and why is self. used here at all
<robert_>
shevy: I'm having weird issues with active_support and ruby 2.0; for some reason, it doesn't want to load correctly.
<shevy>
robert_ yay!
scarolan has quit [Ping timeout: 246 seconds]
<shevy>
robert_ time to use php again
sayan has quit [Ping timeout: 245 seconds]
<robert_>
shevy: tell me about it.
<robert_>
I'll take my weird issues over php's nonsequiteur, thanks. :p
<apeiros>
aces1up: I only write self.foo when for some reason necessary (e.g. self.class - due to `class` being a keyword)
<shevy>
^^^ is there a way to disable this warning?
<matled>
Krajsnick: yeah, that works
<shevy>
yeah Krajsnick
browndawg has joined #ruby
tabolario has joined #ruby
<havenwood>
shevy: Have you looked at how Tiobe does it rankings? It is humorously pathetic it turns out.
mikepack has quit [Read error: Connection reset by peer]
kleinerdrache has quit [Quit: Ex-Chat]
mikepack has joined #ruby
<matled>
Krajsnick: same for if, the value of an if is the value of the last expression of the branch that is executed (or nil if there is no else and the condition is false)
<shevy>
apeiros, how do you install for local testing? when you update one of your projects for instance
decoponio has quit [Quit: Leaving...]
vlad_starkov has joined #ruby
scarolan has joined #ruby
<apeiros>
shevy: report a bug then
cody-- has quit [Quit: Computer has gone to sleep.]
<apeiros>
shevy: I don't install for testing
<apeiros>
my test/runner.rb does the setup without the need for an installation
pyrac has quit [Quit: pyrac]
arya_ has quit []
<shevy>
cool
sepp2k1 has joined #ruby
nikeita has quit [Quit: sleep]
pitzips has joined #ruby
scarolan has quit [Ping timeout: 264 seconds]
scarolan has joined #ruby
SiliconDon has joined #ruby
Catbuntu has quit [Quit: Leaving]
vlad_starkov has quit [Ping timeout: 264 seconds]
jbpros has joined #ruby
sepp2k has quit [Ping timeout: 264 seconds]
stoffus has joined #ruby
SiliconDon has quit [Client Quit]
kreisys has joined #ruby
fmcgeough has joined #ruby
colonolGron has joined #ruby
SiliconDon has joined #ruby
Zolo has quit [Remote host closed the connection]
senayar has joined #ruby
farn has quit [Quit: farn]
inf-groupoid has joined #ruby
arya_ has joined #ruby
bradhe has quit [Remote host closed the connection]
davedev24 has joined #ruby
<inf-groupoid>
Noob here. How do I take a slice of an array from a given index to the end of the array? I tried xs[1...] and xs[1...-1], but the former is a syntax error and the latter excludes the last element of the list.
manutter has joined #ruby
tlewin has joined #ruby
scarolan has quit [Ping timeout: 246 seconds]
SiliconDon has quit [Client Quit]
Myconix has joined #ruby
SiliconDon has joined #ruby
dmiller_ has joined #ruby
<tjbiddle>
apeiros: Thanks :-) Reimplemented. Scratched the class vars - But I am using a singleton pattern.
<tlewin>
jon #twitlive
poga has quit [Remote host closed the connection]
<tjbiddle>
apeiros: Mind giving your 2c again? I'll put together another gist if so
Nanuq has quit [Ping timeout: 245 seconds]
scarolan has joined #ruby
<apeiros>
inf-groupoid: 1..-1
<apeiros>
ranges with ... exclude the end
radic__ has quit [Ping timeout: 245 seconds]
poga has joined #ruby
senayar has quit [Ping timeout: 246 seconds]
<inf-groupoid>
apeiros: Ah, thanks!
<apeiros>
tjbiddle: just paste it, somebody else might give his 2c ;-)
<onewheelskyward>
there are a ton of online resources ranging from guided to self-paced.
<onewheelskyward>
Code academy comes to mind. Google learn ruby and see what pops up.
<metrix>
if I throw the following into irb I get an undefined method for nil:nilclass : {}["abc"]["def"] is there a way to check to see if a hash within a hash exists without checking every level?
<shevy>
hey we have array.uniq, but is there a simple way to get all non_uniqs?
JZTech101 has quit [Read error: Connection reset by peer]
<shevy>
as in duplicates
ssvo_ has joined #ruby
mdmcaf has quit [Quit: Leaving]
stoffus has quit [Ping timeout: 245 seconds]
Giorgio has joined #ruby
<shevy>
got it
<shevy>
array.detect { |e| array.count(e) > 1 }
resure has quit [Changing host]
resure has joined #ruby
scarolan has quit [Ping timeout: 256 seconds]
<tjbiddle>
How can I find out what class a method comes from? (In particular - the `warn` method - But in general as well)
Olipro has joined #ruby
Olipro has quit [Read error: Connection reset by peer]
scarolan has joined #ruby
<shevy>
good question tjbiddle
thepumpkin has joined #ruby
trivol has joined #ruby
<shevy>
it must be within .ancestors I think?
ssvo has quit [Ping timeout: 264 seconds]
poga has quit [Remote host closed the connection]
<shevy>
metrix I dont think there is an easy way, but if your hash is complicated, you could use a method to query it, and safeguard against nil entries
<shevy>
{}["abc"]["def"] if your_hash.has_key? 'abc'
<metrix>
I am loading a yaml file that has hash values that don't exist in most cases. I want an empty array for those that don't exist
poga has joined #ruby
<metrix>
and actually nilclass has a to_a feature which may give me what I need.
pipework has quit [Remote host closed the connection]
<shevy>
indeed
scarolan has quit [Ping timeout: 240 seconds]
<shevy>
somehow my brain has already determined that there must be a ' inside
jorge_ has quit [Ping timeout: 264 seconds]
scarolan has joined #ruby
v1rr3n has joined #ruby
<epitron>
been using 'sed' too much? :)
kaspergrubbe has joined #ruby
danman_ has joined #ruby
louism2wash has joined #ruby
<shevy>
no, I actually hate sed, but here is what happened, I think
<shevy>
in IRB, if you input a string with '' it replaces them with ""
<shevy>
x = 'abc' # => "abc"
<shevy>
x # => "abc"
<shevy>
I am unsure if that is ruby behaviour or irb behaviour, but it confused me anyway
<shevy>
I think it would be easier if I would use only this
<shevy>
x = "abc"
<shevy>
do you guys do that?
<apeiros>
it replaces nothing
<graft>
why do you have quotes in your regexp?
<apeiros>
String#inspect just uses "
<graft>
there are no quotes in your string
danman has quit [Ping timeout: 268 seconds]
danman_ is now known as danman
<graft>
oh i am behind by a few lines
<louism2wash>
Hey guys, I am trying to better understand threading. Hypothetically, if you had an application that could have n users simultaneously accessing it would ruby spin up n threads to support these requests? Thanks.
pyrac has quit [Quit: pyrac]
<shevy>
graft I try to find all duplicate entries in a huge case/when structure
<apeiros>
louism2wash: ruby does what you tell it to do
scarolan has quit [Ping timeout: 264 seconds]
<apeiros>
it doesn't magically do whatever
<shevy>
apeiros hmm I see
<apeiros>
if you tell it to spin up a thread per accessing user, then yes, it will
havenwood has joined #ruby
bradhe has quit [Remote host closed the connection]
scarolan has joined #ruby
smathieu has joined #ruby
bamdad has quit [Quit: bamdad]
bradhe has joined #ruby
<louism2wash>
apeiros: what would happen if you tell it to have a max of n threads and then it gets n+1 requests. Would it put that sixth request into a queue and then start executing once another thread is through processing?
<apeiros>
louism2wash: you don't understand. what happens depends *entirely on what code you write on how to deal with it*
christopherhaine has joined #ruby
workmad3 has joined #ruby
<graft>
louism2wash: threading isn't magic, and since threading knows nothing about your users or their connections, no, it won't put anything onto a queue
sailias has quit [Ping timeout: 264 seconds]
<graft>
louism2wash: if you want your n+1 user to wait in a queue you have to build it
vlad_starkov has joined #ruby
marcdel has joined #ruby
<louism2wash>
graft: thanks
christopherhaine has left #ruby [#ruby]
<louism2wash>
apeiros: thanks
chris____ has quit [Read error: Connection reset by peer]
chris____ has joined #ruby
bamdad has joined #ruby
happy4crazy has left #ruby [#ruby]
stonevil has quit [Remote host closed the connection]
scarolan has quit [Ping timeout: 240 seconds]
danman_ has joined #ruby
jmimi has joined #ruby
stonevil has joined #ruby
anonymuse has quit [Remote host closed the connection]
scarolan has joined #ruby
yano has joined #ruby
danman_ has quit [Client Quit]
Zai00 has joined #ruby
danman has quit [Ping timeout: 240 seconds]
bradhe has quit [Ping timeout: 276 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
popl has quit [Quit: We must make an idol of our fear, and call it God.]
vlad_starkov has quit [Ping timeout: 264 seconds]
smathieu has quit [Ping timeout: 240 seconds]
chris____ has quit [Read error: Connection reset by peer]
slap_stick has quit [Quit: CGI:IRC (Session timeout)]
Al_ has joined #ruby
chris____ has joined #ruby
reset has quit [Quit: Leaving...]
Es0teric has joined #ruby
scarolan has quit [Ping timeout: 248 seconds]
anonymuse has joined #ruby
carlyle has quit [Remote host closed the connection]
awarner has quit [Remote host closed the connection]
DocEternal has quit [Quit: Page closed]
tatsuya_o has quit [Remote host closed the connection]
cj3kim has joined #ruby
RichardBaker has quit [Ping timeout: 264 seconds]
spider-mario has quit [Remote host closed the connection]
Coolhand has joined #ruby
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
ldnunes has quit [Quit: Leaving]
scarolan has quit [Ping timeout: 241 seconds]
awarner has joined #ruby
akells` has joined #ruby
kreisys has quit [Quit: Computer has gone to sleep.]
v0n has quit [Ping timeout: 246 seconds]
roger_rabbit has quit [Quit: WeeChat 0.3.2]
Mon_Ouie has quit [Ping timeout: 256 seconds]
scarolan has joined #ruby
OffTheRails has quit [Remote host closed the connection]
soulcake has quit [Ping timeout: 248 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
kayloos has joined #ruby
christopherhaine has joined #ruby
jds_ has joined #ruby
christopherhaine has quit [Client Quit]
rsahae has quit [Ping timeout: 264 seconds]
scarolan has quit [Ping timeout: 276 seconds]
rsahae has joined #ruby
wmoxam has quit [Ping timeout: 256 seconds]
shadoi1 has joined #ruby
Giorgio has quit [Remote host closed the connection]
shadoi has quit [Read error: Connection reset by peer]
soulcake has joined #ruby
MrThePlague has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
stonevil has joined #ruby
brennanM_ has joined #ruby
Al__ has quit [Read error: Connection reset by peer]
colonolGron has quit [Quit: Lost terminal]
tatsuya_o has quit [Remote host closed the connection]
Davey has joined #ruby
Al_ has joined #ruby
brennanMKE has quit [Ping timeout: 246 seconds]
jbpros has quit [Quit: jbpros]
yekta has quit [Quit: yekta]
atno has joined #ruby
mariappp has quit [Ping timeout: 264 seconds]
smathieu has joined #ruby
grzywacz has quit [Quit: :wq]
Xeago has quit [Remote host closed the connection]
mityaz has quit [Quit: See ya!]
niklasb has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
kreisys has joined #ruby
Cyrus_ has joined #ruby
carlyle has joined #ruby
chris____ has quit [Read error: No route to host]
jonathanwallace has quit [Ping timeout: 264 seconds]
chris____ has joined #ruby
ehc has joined #ruby
stuartrexking has joined #ruby
guiocavalcanti has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
guiocavalcanti has joined #ruby
jalcine has quit [Excess Flood]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stonevil has quit [Remote host closed the connection]
apakatt has joined #ruby
Guest10893 has quit [Ping timeout: 264 seconds]
x1337807x has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
Al_ has quit [Read error: Connection reset by peer]
Al_ has joined #ruby
ebanoid has quit [Quit: brbomgwtfbbq]
cj3kim has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
farn has quit [Quit: farn]
sdegutis has joined #ruby
farn has joined #ruby
mariappp has joined #ruby
henn has joined #ruby
<sdegutis>
is it okay to do TCPSocket#read on a background thread?
threesome has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
cj3kim has quit [Read error: Connection reset by peer]
yacks has joined #ruby
<sam113101>
1 thread 1 client?
cj3kim has joined #ruby
<sdegutis>
i dont understand that question
thiagopnts has quit [Quit: Leaving.]
grh has joined #ruby
fgo has joined #ruby
orionstein is now known as orionstein_away
<apeiros>
sdegutis: why should it not be ok?
almostwhitehat has joined #ruby
fgo has quit [Remote host closed the connection]
kreisys has quit [Quit: Computer has gone to sleep.]
<sdegutis>
cuz i was using Golang recently and it made me paranoid about whats ok or not on background threads
<sdegutis>
i basically want to be able to read and write with a TCP socket at the same time. i dont know how threading works in ruby.
<apeiros>
sdegutis: I suspect you're giving us partial information and expect us to read your mind
<sdegutis>
i dont understand Thread#join :(
<apeiros>
sdegutis: is that "background thread" the only thread accessing the socket?
<apeiros>
Thread#join will stop the current thread until the thread you called .join on is finished.
<sdegutis>
apeiros: im writing a client that will talk to a server, but the language is a custom language im creating where you can send and receive messages simultaneously, and i want my client to be able to wait for new messages without blocking it from sending messages to the server
<sdegutis>
apeiros: yeah.
jerius has quit [Ping timeout: 256 seconds]
dEPy has quit [Remote host closed the connection]
<onewheelskyward>
So you're building a message queue?
<sdegutis>
other that this, its a 1-thread app
<sdegutis>
i guess?
Nosnam has joined #ruby
arya__ has joined #ruby
fcahoon has quit [Quit: Leaving]
pentameter has quit [Read error: Connection reset by peer]
smoothbutta has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zcreative has joined #ruby
almostwhitehat has quit [Ping timeout: 240 seconds]
jalcine has joined #ruby
arya_ has quit [Ping timeout: 256 seconds]
Kricir has joined #ruby
m8 has quit [Quit: Sto andando via]
emergion has quit [Quit: Computer has gone to sleep.]
alexim has joined #ruby
Xeago has joined #ruby
akells` has quit [Remote host closed the connection]
<sdegutis>
maybe that will get rid of this error I'm seeing
donal has joined #ruby
<sdegutis>
"`recvfrom': recv for buffered IO (IOError)"
<sdegutis>
oh no, they're unrelated.
Synthead has joined #ruby
donal has left #ruby [#ruby]
dmiller has quit [Ping timeout: 248 seconds]
splittingred has quit [Ping timeout: 264 seconds]
bradhe has quit [Ping timeout: 240 seconds]
mikeg has joined #ruby
Guest10893 has joined #ruby
afd__ has quit [Ping timeout: 264 seconds]
bamdad has joined #ruby
theRoUS has quit [Ping timeout: 268 seconds]
jlast has quit [Remote host closed the connection]
PsiCat has joined #ruby
maniacal has quit [Ping timeout: 256 seconds]
d2dchat has joined #ruby
<havenwood>
sdegutis: If you're really looking for an implementation of channels in Ruby, Ilya Gregorik did the Agent gem, which Matz gave a shout out to a few months back.
mansi has quit [Remote host closed the connection]
<havenwood>
sdegutis: Or EventMachine is the oldy-goldy.
guiocava_ has joined #ruby
mansi has joined #ruby
guiocavalcanti has quit [Ping timeout: 246 seconds]
<sdegutis>
well i think Agent looks right for this queue, thanks
LaPetiteFromage_ has joined #ruby
rsahae has joined #ruby
Vivekananda has quit [Ping timeout: 246 seconds]
sailias has joined #ruby
blitz has joined #ruby
Vivekananda has joined #ruby
<blitz>
I have a function that returns two variables, and I want to append those returned values to two separate lists - results, errors << function() doesn't seem to work
LaPetiteFromage has quit [Ping timeout: 246 seconds]
LaPetiteFromage_ is now known as LaPetiteFromage
<blitz>
I'm guessing there is no way to do this on one line
interactionjaxsn has quit [Ping timeout: 240 seconds]
<terrellt>
You could probably shift it into an array and do something fancy, but it'd be less readable than just writing it out.
<sdegutis>
havenwood: is there some lib for TCP sockets to? TCPSocket seems very low-level and is randomly raising exceptions in #recvfrom, which i cant find anything about
louism2wash has quit [Quit: This computer has gone to sleep]
<havenwood>
sdegutis: Depends what you're trying to do i think.
<havenwood>
sdegutis: There are definately a plethora of libs built on top of Socket.
<sdegutis>
i mean, i need the low-level-ness of reading a certain number of bytes. i just wish it would do error-handling/looping for me
<havenwood>
hmm
afd__ has joined #ruby
<rsahae>
hey #ruby
<rsahae>
I have a convention question
mansi has quit [Ping timeout: 248 seconds]
blitz has left #ruby ["Leaving"]
<rsahae>
I have a method which is 100% just a wrapper for another method
<rsahae>
for example
trivol has quit [Ping timeout: 245 seconds]
<rsahae>
def exec str; ssh.exec! str; end
<rsahae>
where ssh is some ssh instance
<rsahae>
like an instance variable
<rsahae>
since the Net::SSH method is a bang method
<rsahae>
does convention say my method should be a bang method?
<rsahae>
so
<rsahae>
def exec! str; @ssh.exec! str; end
baordog has quit [Remote host closed the connection]
Guest10893 has quit [Ping timeout: 240 seconds]
<rsahae>
or am I free to name it with or without the bang
jinie has quit [Read error: Operation timed out]
zodiak has quit [Ping timeout: 268 seconds]
<rsahae>
obviously I'm free to name it whatever I want
<rsahae>
but what is the convention for a wrapper like this?
senayar has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
nari has joined #ruby
Zai00 has quit [Quit: Zai00]
thiagopnts has joined #ruby
thiagopnts has quit [Changing host]
thiagopnts has joined #ruby
Krajsnick has quit [Remote host closed the connection]
PaulePanter has joined #ruby
Al_ has quit [Read error: Connection reset by peer]
<chasep_work>
it's actually part of a class method, so the @ isn't the issue
<MrZYX>
.strip! returns nil if it doesn't change anything
Xeago has quit [Remote host closed the connection]
<chasep_work>
ah, okay
senayar has joined #ruby
<chasep_work>
I read the description of that wrong
mercwithamouth has joined #ruby
babykosh has joined #ruby
havenwood has quit [Ping timeout: 240 seconds]
jinie has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
<sdegutis>
is there no TCPSocket wrapper for Ruby?
<sdegutis>
im googling like crazy with no luck
<MrZYX>
also to_s() looks weird in ruby :P and #{} calls that anyway
<chasep_work>
MrZYX: is there a method that is going to return the string, but without leading/trailing whitespace?
<MrZYX>
.strip
RichardBaker has joined #ruby
blip- has joined #ruby
<MrZYX>
but there really is no need to call it
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
dorei has joined #ruby
<dorei>
hello, how can I convert a class method into proc ?
h4mz1d has joined #ruby
<beingjohnm>
would ruby (net::http specifically) perform differently on CentOS compared to Ubuntu? I'm receiving an error on one system and I can't figure it out.
<apeiros>
dorei: depends. proc { |*args| Foo.bar(*args) } # one way, Foo.method(:bar) is another (the latter creates a Method instance, but that might be sufficient in most cases)
bradhe has joined #ruby
tatsuya_o has joined #ruby
<apeiros>
oh, cross-poster
<chasep_work>
MrZYX: well, why isn't @page_number @page_number.to_s().strip || rand(2..409).to_s() giving me an empty (or perhaps whitespace) string back? I can leave off the .to_s() or the .strip, and it's still the same
dorei was kicked from #ruby by apeiros [cross-posting without informing in all channels that you cross-post is unwelcome. this is only a kick, not a ban. consider it a warning.]
mikeg has quit [Remote host closed the connection]
dorei has joined #ruby
brennanMKE has joined #ruby
<dorei>
oh, i didnt know about cross posting ,sorry
<apeiros>
it's nothing one needs to know. it's basic decency.
<dorei>
it's really strange that there are two channels about ruby though
<sdegutis>
fwiw i didnt know it was wrong either, and i consider myself a pretty decent person
<zendeavor>
they are about two different topicalities related to ruby.
blip- has quit [Remote host closed the connection]
<sdegutis>
but that wasnt obvious
maniacal has joined #ruby
<apeiros>
zendeavor: no. they were just founded by different people.
<zendeavor>
both official?
thiagopnts has quit [Quit: Leaving.]
<apeiros>
define official. #ruby-lang is mentioned on ruby-lang.org
brennanM_ has quit [Ping timeout: 276 seconds]
<apeiros>
neither was founded by matz
<zendeavor>
by freenode standards
<MrZYX>
chasep_work: an empty string is still true in ruby, so this still won't do what you want
<zendeavor>
## prefix for non-official channels
<apeiros>
by freenode standards, I think both would actually need ##
<zendeavor>
then i concede.
<apeiros>
not entirely sure, though, as I don't really care :)
gazarsgo has quit [Quit: gazarsgo]
<chasep_work>
MrZYX: ah! that explains it
<zendeavor>
means nothing to me, really
breakingthings has quit [Quit: breakingthings]
arya_ has quit [Ping timeout: 276 seconds]
<_br_>
/names
LaPetiteFromage has quit [Quit: LaPetiteFromage]
<apeiros>
dorei: re basic decency: of course you didn't inform #ruby-lang that you got an answer already. somebody else wastes time to answer your question. qed.
maniacal has quit [Ping timeout: 240 seconds]
sailias has quit [Ping timeout: 240 seconds]
mariappp has quit [Ping timeout: 264 seconds]
<apeiros>
your question at least wasn't one where somebody would spend a couple of minutes on it.
rhys has quit [Quit: Leaving]
<chasep_work>
MrZYX: got it working. Thanks again!
tatsuya_o has quit [Ping timeout: 248 seconds]
maniacal has joined #ruby
jds_ has quit [Remote host closed the connection]
zenergi has joined #ruby
mikeg has joined #ruby
senayar has joined #ruby
saarinen has quit [Quit: saarinen]
rubarlion has joined #ruby
nathancahill has quit [Quit: nathancahill]
kpshek has quit []
nemesit|znc has quit [Ping timeout: 240 seconds]
jonathanwallace has joined #ruby
asobrasil has left #ruby [#ruby]
Elhu has quit [Quit: Computer has gone to sleep.]
maniacal has quit [Ping timeout: 240 seconds]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
h4mz1d has quit [Ping timeout: 248 seconds]
zenergi has quit [Ping timeout: 240 seconds]
Kruppe has joined #ruby
jorge_ has joined #ruby
chris____ has quit [Ping timeout: 264 seconds]
h4mz1d has joined #ruby
stayarrr has quit [Quit: Leaving...]
apakatt has quit [Quit: Leaving...]
Nosnam has quit []
devoldmx has joined #ruby
Senjai has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
babykosh has quit [Quit: babykosh]
vlad_starkov has joined #ruby
<bricker>
Sorry for cross-post, thought I was in #ruby when I first posted this:
<bricker>
Why does Ruby's RSS::Parser thing that "Fri, 26 July 2013 15:20:00 EST" is a "not available value" for pubDate?
<bricker>
think*
nemesit|znc has joined #ruby
Megtastique has joined #ruby
tomzx_mac has joined #ruby
bradhe has quit [Remote host closed the connection]
jorge_ has quit [Ping timeout: 240 seconds]
saarinen has joined #ruby
bradhe has joined #ruby
dorei has left #ruby [#ruby]
niklasb has quit [Ping timeout: 245 seconds]
chxane has joined #ruby
mikepack has quit [Ping timeout: 246 seconds]
bklane has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
mikepack has joined #ruby
ravster has left #ruby [#ruby]
fridim__ has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
jefflyne has joined #ruby
h4mz1d has quit [Ping timeout: 276 seconds]
Al_ has quit [Quit: Al_]
mikeg has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
devoldmx3 has joined #ruby
x1337807x has joined #ruby
maniacal has joined #ruby
bklane has joined #ruby
devoldmx has quit [Ping timeout: 241 seconds]
maniacal has quit [Remote host closed the connection]
d2dchat has quit [Remote host closed the connection]
rodacato has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 240 seconds]
gstamp has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
bklane has quit [Remote host closed the connection]
Megtastique has quit [Quit: Megtastique]
larissa has joined #ruby
<sdegutis>
is there a small sinatra-esque lib for sending and receiving custom TCP messages in Ruby?
devoldmx3 has quit [Read error: Connection reset by peer]
dmiller has joined #ruby
bradhe has quit [Remote host closed the connection]
rsahae has quit [Quit: rsahae]
bradhe has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
emergion has joined #ruby
_bart has quit [Remote host closed the connection]
bamdad has quit [Quit: bamdad]
freerobby has quit [Quit: Leaving.]
<xybre>
sdegutis: could you pseudocode what it would look like in gist?
geggam has quit [Remote host closed the connection]
<sdegutis>
xybre: those are the only 3 functions i need. TCPSocket has the first one, but the second one is missing, and the third one (aka #recvfrom) is broken
kayloos has quit [Remote host closed the connection]
nathancahill has quit [Client Quit]
MrZYX is now known as MrZYX|off
mansi has joined #ruby
Ciscoridze has quit [Quit: WeeChat 0.4.1]
alexyz has joined #ruby
fredjean has quit [Quit: Computer has gone to sleep.]
<sdegutis>
xybre: im familiar with TCP. it just seems like someone would have written a lib to wrap all the logic for me
<havenwood>
sdegutis: Great book, all of Storimer's are!
<sdegutis>
kinda like CocoaAsyncSocket did for ObjC
maxmanders has quit [Quit: Computer has gone to sleep.]
maniacal has joined #ruby
chris____ has joined #ruby
mary5030 has quit [Ping timeout: 264 seconds]
<xybre>
sdegutis: Its pretty nifty, Jesse Storimer wrote it. I do agree with you though, Ruby's socket programming interface just plain sucks. readpartial should do your read_to_length bit
<sdegutis>
readpartial eh? hmm
<sdegutis>
xybre: what is #read_to_length defined on?
<xybre>
sdegutis: you can also use gets with your delimiter. For example socket.gets("\r\n").
<xybre>
It's been a few months since I did socket programming, so I had to look at my example app for the answers >.<
<havenwood>
sdegutis: Do you want to block if there is no data to read?
<sdegutis>
havenwood: well, i want to wait until there is data
<sdegutis>
celluloid-io looked maybe relevant but way overkill
<sdegutis>
some context:
max_ has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
stuartrexkin has joined #ruby
<sdegutis>
im writing a window manager for Mac. i want you to be able to register for global hot keys, and to be able to tell it to do things.
chris____ is now known as `Chris`
<sdegutis>
im creating a custom TCP protocol to send JSON messages back and forth describing actions and stuff
<xybre>
celluloid-io seems pretty neat, but last I checked it hadn't fully implemented the functionality, and it doesn't actually improve on the interface, it just makes it more robust.
<sdegutis>
and i want to write a client in ruby that controls the app.
<sdegutis>
later i also want to write clients in python and clojure etc
stuartrexking has quit [Ping timeout: 245 seconds]
Mattix has left #ruby [#ruby]
Tricon has quit [Quit: Leaving...]
brennanM_ has joined #ruby
brennanMKE has quit [Ping timeout: 246 seconds]
max_ has quit [Ping timeout: 245 seconds]
Myconix has joined #ruby
kaspergrubbe has joined #ruby
IceDragon has joined #ruby
razi has joined #ruby
<tjbiddle>
Is there an equivalent to String.index() but look left instead of right?
osvico has joined #ruby
axl_ has quit [Quit: axl_]
jorge_ has joined #ruby
PhatBaja has quit [Quit: Leaving.]
tommyvyo has quit [Quit:]
tommyvyo has joined #ruby
kaspergrubbe has quit [Ping timeout: 245 seconds]
tommyvyo has quit [Client Quit]
devoldmx has joined #ruby
BillCriswell has joined #ruby
codesoda has left #ruby [#ruby]
mannyt has joined #ruby
tommyvyo has joined #ruby
sdegutis has quit [Remote host closed the connection]
tobyo has quit [Ping timeout: 268 seconds]
predator117 has joined #ruby
anonymuse has quit [Remote host closed the connection]
<zendeavor>
reverse it
apeiros has joined #ruby
havenwood has quit [Remote host closed the connection]
predator217 has quit [Ping timeout: 256 seconds]
chrisja has quit [Quit: leaving]
havenwood has joined #ruby
jds_ has joined #ruby
sam113101 is now known as sam113101_afk
<tjbiddle>
zendeavor: Haha, that's exactly what I did - And then added a comment: '# Lmao. there has to be an easier way to do this. Will find it later.'
rubarlion has quit [Ping timeout: 240 seconds]
sam113101_afk is now known as sam113101
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 245 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
jds_ has quit [Ping timeout: 246 seconds]
axl_ has joined #ruby
sambao21 has joined #ruby
Dysruption has joined #ruby
mannyt has quit [Ping timeout: 245 seconds]
<Dysruption>
what's the best way to store a ruby hash in a file for other programs to access
<Dysruption>
i'm using JSON now but I'm having trouble preserving order
Davey has joined #ruby
<zendeavor>
1.9 creates sorted hashes by default
mannyt has joined #ruby
zenergi has joined #ruby
zenergi has quit [Client Quit]
<Nilium>
Pretty sure it also preserves order of insertion. I think.
zachrab has joined #ruby
<zachrab>
does anyone know the opposite of merge? I want to pop a hash off according to a key
<aces1up>
i need help with my recursive merge only existing keys in hash method here : http://codepad.org/MFYi6le1 seems to work until it gets to the top level hash which then just overwrites all the work previously done in the recursive loops.
dmiller has joined #ruby
<Nilium>
zachrab: What's would the opposite of a merge do?
<tjbiddle>
zendeavor: 't' is both the first and last character of 'test' ;-)
randomau_ has joined #ruby
<aces1up>
want the resulting hash to have exactly the same keys as the first hash "h", but with values updated from the second hash "j" #<---- i want this but recusively in a hash.