sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
hermanmunster has joined #ruby
<boom>
i right bad_Code
<shevy>
what python practice
<shevy>
python even disagrees between versions
<shevy>
print x vs. print(x)
mgorbach has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<george2>
ha
<george2>
and ruby doesn't?
wowXD has joined #ruby
<AntelopeSalad>
battling python 2 vs 3 is really frustrating
<george2>
:)
<shevy>
george2 in ruby I usually alias
<shevy>
either: alias e puts
Wolland has joined #ruby
<shevy>
or alias e cme, the latter being a method that will handle colourizing output for me
<george2>
It's not so bad once you get the hang of it. I can usually support 2.6 through 3.5 without too much hassle. before 2.5 it kinda gets hairy though.
x1337807x has joined #ruby
<george2>
e?
<shevy>
ruby has the advantage that () are not mandatory when the ruby parser can resolve it unambigously
<shevy>
yeah
<AntelopeSalad>
george2: what bothered me was the fragmentation in the community
<shevy>
nothing better than using just one character for output man :)
<shevy>
p object
<shevy>
e 'You are a stupid person, stop using my code!'
<george2>
sounds like some irb shorthand. why use that in real code?
<shevy>
eh?
MmmmPie has joined #ruby
<george2>
it just doesn't seem very readable
<shevy>
irb shorthand?
<george2>
something you'd type into an interactive shell because you're lazy
nicksanford has joined #ruby
<shevy>
is p object readable to you
<george2>
no :)
<AntelopeSalad>
there's pp too
<shevy>
but default ruby has that
<george2>
how do I know p is puts?
nicksanf_ has joined #ruby
<shevy>
no
<shevy>
it is not
<shevy>
it should be Kernel#p
<shevy>
let me check on the doc
<george2>
Maybe it's idiomatic, but coming from outside of ruby "p" isn't readable.
srnty has quit [Quit: srnty]
<shevy>
that's a fair statement to make
<AntelopeSalad>
i always use "puts"
<shevy>
I merely point out that default ruby has p
<george2>
JSON is used more in the Python world I think, because it's so close to builtin syntax, but I've noticed YAML is still used by Rails and things like Travis-CI.
<IceDragon>
JSON and Python
ascarter has joined #ruby
<shevy>
yaml allows you to easily use symbols too
ascarter has quit [Max SendQ exceeded]
<IceDragon>
shevy, why are we not surprised there
mawuli has left #ruby ["Leaving"]
<shevy>
in my config, I usually go with this rule:
<shevy>
one config option, one yaml file
<shevy>
so I may have a file called debug.yml
ascarter has joined #ruby
ddv has quit [Ping timeout: 245 seconds]
<shevy>
usually its content is false, but sometimes when I debug, it is true
pierre1_ has joined #ruby
<shevy>
and the Configuration object can toggle its value from the commandline
<IceDragon>
thats not much of a yaml file...
ddv has joined #ruby
<shevy>
haha
<shevy>
I used to have huge yaml config files
<shevy>
but I also commented them a lot
<shevy>
and when you store that in ruby, the comments are gone
<shevy>
*via ruby
timgauthier has joined #ruby
<IceDragon>
yup, it just dumps the yaml again
<boom>
shevy, can i see what your comments look like. I am a beginner at best
<shevy>
boom it's just some huge long verbose shit really
<shevy>
so when I look at a setting 1 year afterwards, I remember why I used it
replay has joined #ruby
<shevy>
show_long_names.yml
<george2>
I tend to make things over-configurable, and ending up with a mess of YAGNI code... trying to break that habit. :/
<shevy>
toggle whether to show the full name and path, or just the name
<boom>
shevy, i still want to see real world applicable comments
bradhe has joined #ruby
<boom>
shevy, because everything i learned came from books. you and I know that books != real-world
<boom>
shevy, this way i know what and how to comment. how long, where should it be, etc...
<shevy>
2 years ago I wanted to go with zero comments
<shevy>
class Foo
<shevy>
def test
<shevy>
do_something
<shevy>
end
<shevy>
def bla
<shevy>
do_something_else
<shevy>
end
<shevy>
end
<Eiam>
my JS headers are usually pretty big, Description, Input, Output, Error case, Example Usage
<shevy>
I liked the zero comment style
nicksanf_ has joined #ruby
<shevy>
until I started to comment on more complicated methods
<shevy>
and then suddenly it all feels wrong
<shevy>
because I comment only the big methods but not the small ones
Anarch has quit [Ping timeout: 245 seconds]
<boom>
shevy, i went back to some of the stuff i worked on when i was learning. Thinking, this makes perfect sense, no need to comment. Future me wants to punch past me in the face. :(
<shevy>
perhaps I can find a way to avoid complicated methods
jfran has quit [Remote host closed the connection]
<shevy>
boom yeah
Anarch has joined #ruby
<Eiam>
shevy: i always try to tell myself "methods should do one thing"
<shevy>
I had to rewrite 2 large projects because I did not comment
<shevy>
I stared at code I wrote years ago and was thinking "wtf, why did I do that..."
<george2>
in the Python world at least, the general feeling is "if you think you need comments, you probably need refactoring instead." The code should explain itself, or you aren't doing it right. Obviously there are exceptions, like when you're commenting to explain some more advanced algorithm.
<boom>
oh good, so this happens to good devs too.
<shevy>
Eiam that's fine but what about methods that bundle other methods? or hooked methods that are invoked when certain conditions happen?
<Eiam>
I dunno, there is code that explains itself, and there is code that explains itself when you wrote it.
<shevy>
hehe
<boom>
george2, that is what eloquent ruby by russ olsen told me. And i thought it made sense.
<george2>
true :)
<Eiam>
sometimes when you get out of the magic for awhile
<Eiam>
you forget how all that magic works and what was once obvious isn't so much
<IceDragon>
shevy: make the code do the talking, I usually only add param/return statements
<george2>
Now, there's also the other rule, "every method, class and module must have a docstring."
<george2>
but ruby has no docstrings :'(
<shevy>
george2 yeah
fgo has quit [Ping timeout: 272 seconds]
nicksanford has quit [Ping timeout: 260 seconds]
<shevy>
george2 the best you can do is to comment your method on top :P
testcore has quit [Quit: BitchX: it's shagadellic, baby!]
<shevy>
I wrote a tiny class that just reads the first header of my .rb files
<shevy>
like I have a class called Cat, and it is in file cat.rb
<shevy>
I explain in the beginning of the file
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
"This is a cat. It hunts and kills mice. It also steals your breath at moon."
<boom>
shevy, so your files usually has heavy comments at the top?
<shevy>
then I do: rubydoc cat.rb
codeurge has quit [Quit: Sleep.]
Tricon has joined #ruby
<shevy>
boom no, just some explanations what the class does
<boom>
shevy, im trying to pick up good habits and practice them
<shevy>
so I dont have to read code
amargherio has joined #ruby
<shevy>
boom you must comment, but you must optimize the comments
<george2>
that's another question I should ask - what automatic doc generator(s) exist for ruby? I assume there's some Sphinx equivalent?
<Eiam>
yard
<boom>
this is wild, ruby devs are helpful. rails devs are elitist jerks
<george2>
I haven't had too much trouble with #rubyonrails when I ask stupid questions there :)
<george2>
even when the answer is "you need an 's' at the end of that method, or it does something totally different."
replay has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<george2>
I think I spent about 6 hours trying to figure that one out. :/
baroquebobcat has joined #ruby
iamjusthatdude has joined #ruby
jdj_dk_ has joined #ruby
<boom>
george2, i haven't been to that channel as most of my rails devs live up to the stereotype
<boom>
most of my friends who are rails devs*
<george2>
ah
oo_ has joined #ruby
zorak has quit [Ping timeout: 260 seconds]
<boom>
i decided to ramp up my ruby knowledge, which is why i am lurking
yubrew has quit [Ping timeout: 264 seconds]
<george2>
There are some guys from Pivotal Labs and some other local companies that I talk to in the local Ruby users' group, that are always pretty nice.
<george2>
some of the others are a bit know-it-all-y though :)
<boom>
george2, yeah, im going to my first ruby meet up this thursday. im pretty stoked
marr has quit []
<george2>
nice :)
northfurr has joined #ruby
<george2>
I don't think there's a single straight-up "Ruby" dev in our group, they're all Rails people :)
bricker`work has quit [Quit: leaving]
oo_ has quit [Remote host closed the connection]
<boom>
george2, i'm hoping that is the case. I am learning ruby because of rails.
<george2>
ah
<boom>
but now i get the architecture of rails and I realize im not as good at ruby as I should be
Shidash has quit [Ping timeout: 248 seconds]
<george2>
question then: why pick Rails over Node, or one of thy Python frameworks like Django? any specific reason?
<george2>
*the
Tricon has quit [Quit: Leaving...]
<Eiam>
george2: you like Ruby?
<george2>
Most of the time, yes
lw has joined #ruby
replay has joined #ruby
<Eiam>
george2: no, that was an answer to your question.
<boom>
my friends told me to learn rails as they sold it as the end-all solution. I thought they were going to help me, but that was not the case
maximski has joined #ruby
lw has quit [Client Quit]
<Eiam>
boom: learning Ruby via Rails is just the start of a painful journey
maximski has quit [Max SendQ exceeded]
<Eiam>
Rails as the end all solution is the beginning of a journey looking for a lot of solutions to a lot of problems that started with Rails.
<george2>
I'm just asking out of curiosity. I'm a Python guy, so I knew Django and Pyramid before I was introduced to Rails, and I've never liked Rails very much in comparison.
<boom>
Eiam, it has been a painful year
maximski has joined #ruby
<Eiam>
george2: I'm not a Rails fan in particular, and its how I started into Ruby. I was using Python, Django & Twisted prior to Ruby and Rails myself.
<boom>
george2, i had no programming experience, they told me that it was easy to learn ruby on rails
<Eiam>
george2: and I used Rails because I changed jobs and they used Rails. nothing so glamorous otherwise. =)
<boom>
then i had to go back and learn a little about a lot of different languages
jdj_dk_ has quit [Ping timeout: 248 seconds]
<george2>
interesting :)
<Eiam>
given a choice, I'd avoid Node myself, because I don't like javascript =)
<george2>
ha
<george2>
JS has some good parts :)
<Eiam>
yeah i have the book, its really thin.
<george2>
xD
<george2>
I had to learn more about JS in order to do a MongoDB project, and found it not as bad as I had expected
<Eiam>
I program because I enjoy it, I like to have fun and express ideas. JS takes the joy out of programming for me so, I avoid it when I can.
<Eiam>
I don't want to see paste its warts, I don't want to remember its stupid WATs.
<george2>
functional stuff in JS isn't too bad, but I can imagine trying to do OOP in it is pretty terrible.
saarinen has quit [Quit: saarinen]
Takle has quit [Ping timeout: 240 seconds]
<cashnguns>
I think learning sinatra is better for beginning framework work in ruby than rails
Channel6 has joined #ruby
<cashnguns>
less magic, more learning
<Eiam>
cashnguns: completely agree for sure.
<george2>
yeah, going back and doing sinatra after banging my head against rails for a while really helped, I think
<Eiam>
cashnguns: not that I normally recommend Ruby to beginners anyway, I usually direct them to Python personally.
<cashnguns>
I'm about 9 months into learning programming, first tried Hartl's rails tutorial and I was so confused, so I went to sinatra and I felt like I learned a lot
Dysruption has joined #ruby
absolutezeroff has quit [Ping timeout: 264 seconds]
<george2>
Rails still feels magic to me, though that may be because I just haven't used it enough.
<Dysruption>
does ruby create an anonymous class (eigenclass) on object creation, or only when a singleton method is defined?
<cashnguns>
I think ruby is a great starter language - especially compared to java
<tus>
dumb q, but is it possible to do array.delete('x', 'a', 'b') instead of one line for each? (tried that one already didn't work, but anything similiar maybe works?)
<cashnguns>
george2, if you look into ActiveRecord and ActiveModel and ActionController it makes (a little) more sense
<george2>
imo, python > ruby > C++ > Java. but anything > Java for me :D
zorak has joined #ruby
<Dysruption>
does anyone know ;_;
<george2>
cashnguns: yeah, you're right, the more I poke around in those the more sense it begins to make.
<cashnguns>
george2, I'm hoping java will give some better comp sci incite for me, yea its annoying
<cashnguns>
ya all those mystery methods are hidden in there. I often times was like "how are you doing that" then looked it up in docs
<george2>
cashnguns: also, Haskell and Guile. Because learning real functional programming blows your mind. :)
<Eiam>
method_missing is just the start of the problems
<cashnguns>
george2, I think its gonna be while before I touch those :)
bamyyyooo14335 has quit [Quit: bamyyyooo14335]
<george2>
meh, the learnyouahaskell book makes it easy.
oo_ has joined #ruby
Photism has quit [Quit: Leaving]
Dysruption has quit [Client Quit]
<cashnguns>
I'm still a newb :) but I'll look into it at some point
jamto11 has joined #ruby
Cache_Money has joined #ruby
<tus>
Eiam hmm that seemed like it would work but it's giving me error: "wrong number of arguments(3 for 1)"
<Eiam>
oh, sorry i think i swapped around the value
<Eiam>
let me open irb
wjimenez5271 has quit [Quit: Leaving.]
nicksanf_ has quit [Remote host closed the connection]
<cashnguns>
include takes one argument right?
pierre1_ has quit [Quit: Leaving]
<Eiam>
yeah
bradhe has quit [Remote host closed the connection]
<Eiam>
swap the x.include and its value
<Eiam>
('x','a','b').include?(x)
<tus>
hm what difference does that make? if it's not way too complicated or you can't be arsed to explain ;p
<Eiam>
=0
<Eiam>
well, include? isn't a method on Fixnum
<Eiam>
its a method on an Array
<Eiam>
so what that line says, expanded out, is something like "For the array <array> reject when this condition evaluates to true, The condition is when the value you call me with (x) is one of the values in this array"
Shidash has joined #ruby
troyready has quit [Ping timeout: 244 seconds]
binaryhat has quit [Remote host closed the connection]
<Eiam>
and also do it in place (hence the reject!)
CodeBunny has quit [Ping timeout: 252 seconds]
<george2>
ugh, this json api uses {"0": "first item, "1": "second item"}. Why not just use a list? :(
<Eiam>
as in "mutate the collection I'm enumerating"
johnmolina has quit [Remote host closed the connection]
binaryhat has joined #ruby
<tus>
ah now i see
<tus>
thanks
<Eiam>
man I miss Ruby
hermanmunster has quit [Remote host closed the connection]
<Eiam>
what a fun language, seriously.
johnmolina has joined #ruby
replay has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
edgarjs is now known as edgarjs_afk
<tus>
i really like it, it's simple to understand
hermanmunster has joined #ruby
<george2>
open classes are the best :)
sevenseacat has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
spinx_ has quit [Remote host closed the connection]
<RubyPanther>
<3 <3 <3 Monkeys!
<Eiam>
get yer monkey patches outta my code!
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cashnguns>
Eiam, its so great
replay has joined #ruby
<Eiam>
I think I get a little depressed when I stop writing Ruby for awhile =)
<RubyPanther>
Never take your slippers off
wowXD has joined #ruby
<cashnguns>
TRUTH
<Eiam>
sometimes, it can't be helped.
narcan has joined #ruby
arrubin has joined #ruby
<RubyPanther>
That's what mRuby is for
johnmolina has quit [Ping timeout: 244 seconds]
<Eiam>
=)
absolutezeroff has joined #ruby
<Eiam>
sometimes you just need to suck it up and use the right tool for the job =)
hermanmunster has quit [Ping timeout: 252 seconds]
jdj_dk has joined #ruby
<george2>
you mean Python? :p
jonahR has quit [Remote host closed the connection]
hermanmunster has joined #ruby
SouL___ has joined #ruby
nateberkopec has quit [Quit: Leaving...]
johnmolina has joined #ruby
jonahR has joined #ruby
tokik has joined #ruby
<RubyPanther>
Between C and mRuby you can make it through most jobs
Wolland has joined #ruby
Rubass has quit [Remote host closed the connection]
<RubyPanther>
COBOL extension? No problem!
benzrf|offline is now known as benzrf
baroquebobcat has joined #ruby
<benzrf>
Eiam: write haskell when youre not writing ruby
<benzrf>
then youll never be depressed
b00stfr3ak has quit [Ping timeout: 255 seconds]
hermanmunster has quit [Remote host closed the connection]
hermanmunster has joined #ruby
<tus>
hey. just need to be pointed into the right direction. i got this: result = JSON.parse(open(url).read)
<tus>
but how can i make sure that the code doesn't get crazy if the website goes down? thinking of some error checking. am i thinking right when i think of JSON::ParserError? or is there something else i should do?
LadyRainicorn has quit [Ping timeout: 252 seconds]
<benzrf>
tus: catch the exc
<george2>
benzrf: unless you have to do I/O of any kind :)
hermanmunster has quit [Read error: Connection reset by peer]
<benzrf>
george2: yes, then you'll be even happier
hermanmunster has joined #ruby
Wolland has quit [Ping timeout: 255 seconds]
kaku has joined #ruby
<george2>
haskell is heaven for pure data processing, and then you start having to mix in monads and they destroy the beautiful functions.
<benzrf>
forever (putStrLn "bitches dont know bout monadic I/O")
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
bruno- has joined #ruby
<benzrf>
george2: use pipes or something
<benzrf>
or frp
<benzrf>
there are solutions
<benzrf>
and some of them are even nicer than impure code, depending on if they're the right fit
<Eiam>
benzrf: can't really commit Haskell to the repo =)
Zenigor has joined #ruby
<benzrf>
Eiam: lame!
<george2>
but your typeclasses get all janky, with IO splashed about
thumpba_ has quit [Remote host closed the connection]
thumpba has joined #ruby
MmmmPie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 240 seconds]
PanPan has joined #ruby
maestroj_ has quit [Quit: Computer has gone to sleep.]
bmurt has joined #ruby
nobitanobi has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
thumpba has quit [Ping timeout: 255 seconds]
hermanmunster has quit [Read error: Connection timed out]
datafirm has quit [Quit: Computer has gone to sleep.]
bradleyprice has quit [Remote host closed the connection]
hermanmunster has joined #ruby
pu22l3r has quit [Ping timeout: 272 seconds]
datafirm has joined #ruby
blackgoat has joined #ruby
recurrence has joined #ruby
jamto11 has quit [Remote host closed the connection]
<tus>
benzrf: i did a recuse => e, then case e with different exc. good idea? think i can cover a few that way
fgo has joined #ruby
moritzs has joined #ruby
<benzrf>
tus: never do rescue => e
<benzrf>
you might catch something like a NoMethodError that was your problem
<benzrf>
rescue SPECIFIC EXCEPTIONS
datafirm has quit [Ping timeout: 240 seconds]
<tus>
but isn't that what i am doing by having a case after? like "when SocketError"
<benzrf>
tus: uh
<benzrf>
you know that you can do
<benzrf>
rescue SocketError => e
yubrew has joined #ruby
<tus>
yup! just wanted to cover a few errors but i got ya.
<benzrf>
you can have multiple rescue clauses...
endash has quit [Quit: endash]
<tus>
didn't know that, tried and it looks good. thanks man
<benzrf>
np
fgo has quit [Ping timeout: 252 seconds]
kame355 has quit [Read error: Connection reset by peer]
robustus has quit [Ping timeout: 252 seconds]
nateberkopec has joined #ruby
yubrew has quit [Ping timeout: 255 seconds]
crazysim has quit [Ping timeout: 245 seconds]
davidcelis has quit [Ping timeout: 245 seconds]
jdj_dk has quit [Ping timeout: 272 seconds]
quantsini has quit [Ping timeout: 245 seconds]
robustus has joined #ruby
finges has quit [Ping timeout: 252 seconds]
riotjone_ has joined #ruby
binaryhat has quit [Read error: Connection reset by peer]
riotjones has quit [Ping timeout: 264 seconds]
stytown has joined #ruby
quantsini has joined #ruby
binaryhat has joined #ruby
crazysim has joined #ruby
<hfp>
Hey guys, could someone explain in layman terms what a graph is? I can't understand the definitions I find on Google
davidcelis has joined #ruby
<toertore>
a bunch of points with lines between them
<hfp>
A graph as an object I mean, not a mathematical graph
<toertore>
oh
<toertore>
you mean like in powerpoint?
<sevenseacat>
not much difference really
finges has joined #ruby
<hfp>
"A graph is a collection of nodes that interconnect with each other arbitrarily. (A tree is a special case of a graph.)"
<toertore>
if you're talking about graphs as data structures, it's basically the same
zorak has quit [Ping timeout: 252 seconds]
Spami has quit [Quit: This computer has gone to sleep]
nicksanford has joined #ruby
Hanmac1 has quit [Ping timeout: 264 seconds]
tus has quit []
andrewjanssen has quit [Ping timeout: 264 seconds]
nateberkopec has quit [Quit: Leaving...]
MmmmPie has joined #ruby
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
benzine21 has joined #ruby
Mattx has joined #ruby
<Mattx>
Hi
<Mattx>
what's the lib I should use to do unit test for non-rails apps?
hermanmunster has quit [Remote host closed the connection]
hermanmunster has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
<sevenseacat>
the same as you would use for rails apps
<Mattx>
what is it? rspec?
<sevenseacat>
rspec or test unit
Zamerick has joined #ruby
gilest has joined #ruby
gilest has quit [Remote host closed the connection]
<Mattx>
well, which one is better in your opinion?
<sevenseacat>
in my opinion? rspec
hermanmunster has quit [Ping timeout: 244 seconds]
moted has quit [Quit: moted]
hermanmunster has joined #ruby
<eam>
I stick to test unit as the syntax matches all my non-ruby tests as well
godd2 has joined #ruby
<sevenseacat>
i hate xunit sytax
<sevenseacat>
syntax
<eam>
I hate rspec syntax :)
<sevenseacat>
good thing there's both so we can both be happy then :)
<boom>
as a beginner I find it hard to write tests, anyone have suggestions?
<eam>
I see a lot of folks who do multiple languages fluently move between java, python, perl, etc, but then they see rspec and need help to change anything
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hamakn has quit [Remote host closed the connection]
zorak has joined #ruby
<boom>
I feel a lot of the tests are examples out of the books and they feel like learning examples rather than real life applications
bmurt has quit []
Mattttt_ has joined #ruby
<sevenseacat>
eam: i dont see the problem with that - yes you need to know rspec before you can work with rspec tests
edgarjs_afk is now known as edgarjs
<sevenseacat>
yes, rspec is a different tool than all the xunit tools
<eam>
the problem is it's the odd man out
<sevenseacat>
by design
ixti has quit [Ping timeout: 264 seconds]
maximski has quit []
<sevenseacat>
its good for ruby, its not meant to apply to every other language
<eam>
intent is irrelevent when considering effect :)
<eam>
it makes ruby projects harder to work on
<sevenseacat>
if you dont know the tool, sure
<sevenseacat>
thats like saying rake makes ruby projects harder to work on
<sevenseacat>
because its not make
<eam>
it does :)
<sevenseacat>
lol
<boom>
lol
dorei has quit []
<eam>
rake is significantly less important; people (should be) writing tests more often than editing rake
edgarjs is now known as edgarjs_afk
<eam>
but since you bring it up, I do roll my eyes when I see a Rakefile
pu22l3r has joined #ruby
moritzs has quit [Ping timeout: 240 seconds]
pu22l3r has quit [Remote host closed the connection]
Zamerick has quit [Remote host closed the connection]
jdj_dk has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
moritzs has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonahR has quit [Remote host closed the connection]
jonahR has joined #ruby
St_Marx has quit [Remote host closed the connection]
hamakn_ has joined #ruby
codeurge has joined #ruby
Deele has quit [Ping timeout: 255 seconds]
St_Marx has joined #ruby
Wolland has quit [Ping timeout: 252 seconds]
toordog_ has quit [Ping timeout: 264 seconds]
Wolland has joined #ruby
yetanotherdave has quit [Ping timeout: 264 seconds]
_KaszpiR_ has joined #ruby
hamakn has quit [Ping timeout: 264 seconds]
<RubyPanther>
They say you need to write tests so that you can change code without fear. I say, just let go of the fear. Learn to take chances with confidence.
<boom>
RubyPanther, thank you
jonahR has quit [Ping timeout: 264 seconds]
<boom>
RubyPanther, any advice on writing tests for projects?
Fire-Dragon-DoL has quit [Quit: Leaving.]
<RubyPanther>
boom: frameworks don't deliver much of what they claim
thumpba has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<boom>
RubyPanther, right, so I'm looking for examples of good tests used in real applications.
fayimora has joined #ruby
<boom>
RubyPanther, I feel like the test I write are copy/paste from the books I have learned from
gigetoo has quit [Remote host closed the connection]
<banisterfiend>
i've used it a couple of times
<banisterfiend>
i think when using group_by or something similar
gigetoo has joined #ruby
mattmcclure has quit [Quit: Connection closed for inactivity]
jdj_dk has quit [Ping timeout: 264 seconds]
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
<krz>
whats a good ruby module exercise scenario for a beginner?
<krz>
a greeter app?
saarinen has joined #ruby
Takle has quit [Ping timeout: 255 seconds]
<krz>
or something better?
<benzrf>
banisterfiend: what does presence do
fgo has joined #ruby
towbes has quit [Ping timeout: 244 seconds]
<banisterfiend>
benzrf just returns self
<benzrf>
ah
Tricon has joined #ruby
<banisterfiend>
benzrf so i guess it's not quite id, but the method equivalent
Mon_Ouie has quit [Quit: WeeChat 0.4.3]
hermanmunster has quit [Remote host closed the connection]
<krz>
anyone?
hermanmunster has joined #ruby
<sevenseacat>
thats a vague question - what sa 'moduie exercise scenario'?
<krz>
module*
<krz>
looking for a subject i can talk someone through with modules
<krz>
an simple app that we can create together
mattlins has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<krz>
a*
hermanmunster has quit [Read error: Connection reset by peer]
fgo has quit [Ping timeout: 252 seconds]
hermanmu_ has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
<banisterfiend>
krz write your own class that supports iteration via Enumerable
edgarjs_afk is now known as edgarjs
initself has joined #ruby
<initself>
\quit
initself has quit [Quit: leaving]
initself has joined #ruby
nateberkopec has quit [Quit: Leaving...]
towbes has joined #ruby
mattlins has joined #ruby
Doppp has joined #ruby
earthquake has quit [Quit: earthquake]
bluOxigen has joined #ruby
edgarjs is now known as edgarjs_afk
sputnik13 has joined #ruby
sputnik13 has quit [Client Quit]
initself has quit [Quit: leaving]
initself has joined #ruby
initself has quit [Client Quit]
initself has joined #ruby
garndt has quit [Ping timeout: 260 seconds]
garndt has joined #ruby
jdj_dk has joined #ruby
recurrence has joined #ruby
aniM has quit [Ping timeout: 244 seconds]
Hanmac has joined #ruby
recurrence has quit [Read error: Connection reset by peer]
jrhe has quit [Ping timeout: 260 seconds]
fgo has joined #ruby
jrhe has joined #ruby
crazysim has quit [Excess Flood]
kyb3r_ has quit [Read error: Connection reset by peer]
mikesplain has joined #ruby
oo_ has quit [Remote host closed the connection]
aniM has joined #ruby
GriffinH_ has quit [Remote host closed the connection]
sent-hil has quit [Quit: Connection closed for inactivity]
kyb3r_ has joined #ruby
nateberkopec has joined #ruby
crazysim has joined #ruby
rodri_gore has quit [Quit: rodri_gore]
musty has joined #ruby
zartoosh has quit [Read error: Connection reset by peer]
musty has left #ruby [#ruby]
Zenigor has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
<pipework>
krz: What would a module have to do with it?
zartoosh has joined #ruby
yubrew has joined #ruby
tacos1de has quit [Remote host closed the connection]
<pipework>
Think of them as tables of methods for lookup that you can architect in any hierarchy you want.
mikesplain has quit [Ping timeout: 252 seconds]
comma8 has quit [Ping timeout: 252 seconds]
<pipework>
Don't forget eigenclasses and classes which are souped up modules that create instances where the class also inserts methods in the lookup table for those objects.
oo_ has joined #ruby
dbu has quit [Ping timeout: 252 seconds]
<pipework>
Pretty simple stuff.
dbu has joined #ruby
* sevenseacat
brain asplodes
hermanmu_ has quit [Remote host closed the connection]
chrisbolton has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
tacos1de has joined #ruby
hermanmunster has joined #ruby
jswensen has joined #ruby
Wolland has quit [Remote host closed the connection]
hermanmu_ has joined #ruby
papercode has quit [Quit: WeeChat 0.4.3]
hermanmunster has quit [Read error: Connection reset by peer]
thesheff17 has quit [Ping timeout: 255 seconds]
yubrew has quit [Ping timeout: 264 seconds]
jdj_dk has quit [Ping timeout: 248 seconds]
Wolland has joined #ruby
<jswensen>
Ruby newbie here. Getting used to the syntax. I am using the Amazon S3 SDK and they use a syntax I can’t find much about searching google. There is a select.do loop where they filter using “object.key.include? ‘ext’”. It works great, but can anyone give a website with more detail about how to construct more complex filtering using this tchnique?
benzrf is now known as benzrf|offline
mjsmith2 has quit [Remote host closed the connection]
<sevenseacat>
well i would presume object.key is a string, and strings have an include? method that takes another string
<jswensen>
I see. That was what I was missing. So with this select..do construct, the output only contains those things for which the interior holds true? Can I have multiple statement or should I make one logical evauation with ANDs and ORs?
utkarsh_ has quit [Quit: No Ping reply in 180 seconds.]
utkarsh_ has joined #ruby
<sevenseacat>
you might need to provide some more context about the code you're looking a
<sevenseacat>
at
<sevenseacat>
or provide the actual code
akoz has quit [Ping timeout: 252 seconds]
Wolland has quit [Ping timeout: 255 seconds]
zastern has quit [Ping timeout: 252 seconds]
jrhe has quit [Quit: Connection closed for inactivity]
akosednar has joined #ruby
<jswensen>
see http://pastebin.com/TNhcLyXh. Super simple, but I really want to get my head wrapped around this for future hacking (just working on a simple server-side script that will run as a cron job)
<jswensen>
What I am really trying to do is find the MP4 files on S3 that don’t have a corresponding folder on S3 of the same name (indicating the video has already been processed)
<sevenseacat>
select will return all values for which the block is true
brunops has quit [Ping timeout: 264 seconds]
brunops has joined #ruby
<jswensen>
can I nest the selects (probably a super inefficient way to do what I am trying to do, but it would work)
<sevenseacat>
why would you want to do that?
<sevenseacat>
why not just put multiple clauses into the select block?
oo_ has quit [Remote host closed the connection]
hermanmu_ has quit [Remote host closed the connection]
<jswensen>
because I am dumb and don’t know the “right way”.
<jswensen>
I actually need something more like “select { |o| o.include? ‘mp4’ || all_but_o != o.chomp(File.extname(o) )”, but I don’t know how to do the all_but_o part without making a second select
<jswensen>
oops, change that || to &&
Takumo has joined #ruby
Kamilion has joined #ruby
<sevenseacat>
i am not sure what that code is trying to do
cnj has joined #ruby
<krz>
ill stick with a simple orm
<sevenseacat>
thats an oxymoron
<jswensen>
I am trying to find all the mp4 files that don’t have a corresponding folder of the same name (without the mp4 extension)
<krz>
as a module exercise
shevy has quit [Ping timeout: 264 seconds]
hermanmunster has quit [Ping timeout: 240 seconds]
musty_ has quit []
northfurr has joined #ruby
fgo has joined #ruby
razum2um1 has joined #ruby
_maes_ has joined #ruby
initself has joined #ruby
Guest67852 has joined #ruby
ltd has joined #ruby
towbes has joined #ruby
erichmenge has joined #ruby
kaku has joined #ruby
davedev24_ has joined #ruby
Urocyon has joined #ruby
Mattx has joined #ruby
shanlar has joined #ruby
bartdorsey has joined #ruby
zaargy_ has joined #ruby
happytux_ has joined #ruby
dylannorthrup has joined #ruby
jonathanwallace_ has joined #ruby
kiri has joined #ruby
RandyT has joined #ruby
mityaz has joined #ruby
speakingcode has joined #ruby
Kilo`byte has joined #ruby
MindfulMonk has joined #ruby
paul_k has joined #ruby
Sigma00 has joined #ruby
nemesit|znc has joined #ruby
froy has joined #ruby
SecretAgent has joined #ruby
SloggerKhan has joined #ruby
hfp has joined #ruby
toertore has joined #ruby
chaos___________ has joined #ruby
cobakobodob has joined #ruby
jayne has joined #ruby
Jamo has joined #ruby
dhruvasagar has joined #ruby
marahin has joined #ruby
jumblemuddle_ has joined #ruby
thoolihan has joined #ruby
thejoecarroll has joined #ruby
FifthWall has joined #ruby
psmolen has joined #ruby
sindork has joined #ruby
faulkner has joined #ruby
ccooke has joined #ruby
camt has joined #ruby
nug has joined #ruby
pickle__ has joined #ruby
bbloom has joined #ruby
Dr3amc0d3r|away has joined #ruby
_izz has joined #ruby
pavelz has joined #ruby
tiguser has joined #ruby
zonetti has joined #ruby
Gnubie_ has joined #ruby
michael_mbp has joined #ruby
mr_rich101 has joined #ruby
willgorman_ has joined #ruby
Killerkeksdose_ has joined #ruby
philtr_ has joined #ruby
ihme-TTilus has joined #ruby
csmrfx has joined #ruby
segmond has joined #ruby
Kruppe has joined #ruby
GeekOnCoffee has joined #ruby
sonofflynn has joined #ruby
qpls has joined #ruby
Roa_ has joined #ruby
sn0wb1rd has joined #ruby
franka_ has joined #ruby
gtc has joined #ruby
harryk has joined #ruby
bahar has joined #ruby
JarJarBinks has joined #ruby
katlogic has joined #ruby
justinmcp has joined #ruby
cid404 has joined #ruby
nw has joined #ruby
adeponte has joined #ruby
wlanboy has joined #ruby
mahlon has joined #ruby
bmn has joined #ruby
divbell has joined #ruby
Tarential has joined #ruby
shaquile has joined #ruby
b1nd has joined #ruby
fumduq has joined #ruby
Akuma has joined #ruby
Sou|cutter has joined #ruby
chihhsin_wego has joined #ruby
Authenticator has joined #ruby
Lulzon has joined #ruby
bbloom has joined #ruby
LACP has joined #ruby
<sevenseacat>
but anyway
rs0 has joined #ruby
rcs has joined #ruby
SJr has joined #ruby
ahuman has joined #ruby
<sevenseacat>
i'm not too familiar with the FIle stuff in ruby
<sevenseacat>
so is that
cwc has joined #ruby
PhilK has joined #ruby
fwaokda has joined #ruby
freannrak has joined #ruby
Steve21 has joined #ruby
maxmanders has joined #ruby
xiphias has joined #ruby
Xuerian has joined #ruby
ItSANgo_ has joined #ruby
Spleeze has joined #ruby
skinny_much has joined #ruby
bbloom has quit [Max SendQ exceeded]
farn has quit [Remote host closed the connection]
MetaCosm has quit [Ping timeout: 252 seconds]
yo61 has quit [Ping timeout: 252 seconds]
msch has quit [Ping timeout: 252 seconds]
pusewicz has quit [Ping timeout: 252 seconds]
mroth has quit [Ping timeout: 252 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
bjeanes has quit [Ping timeout: 252 seconds]
halfdan has quit [Ping timeout: 252 seconds]
metadave has quit [Ping timeout: 252 seconds]
hermanmunster has joined #ruby
Dreamer3 has quit [Ping timeout: 252 seconds]
jeffreybaird has quit [Ping timeout: 252 seconds]
skmp has quit [Ping timeout: 252 seconds]
zzak__ has quit [Ping timeout: 252 seconds]
cmaxw_____ has quit [Ping timeout: 252 seconds]
zaargy has joined #ruby
ph8 has joined #ruby
kapowaz has quit [Ping timeout: 252 seconds]
tiagonobre has quit [Ping timeout: 252 seconds]
ssut has quit [Ping timeout: 252 seconds]
Olipro has joined #ruby
speaking1ode has joined #ruby
msch has joined #ruby
edmellum has quit [Ping timeout: 252 seconds]
amitchellbullard has quit [Ping timeout: 252 seconds]
franka__ has joined #ruby
initself_ has joined #ruby
skmp has joined #ruby
wjimenez5271 has joined #ruby
bjeanes has joined #ruby
mroth has joined #ruby
clamstar has joined #ruby
kapowaz_ has joined #ruby
chrisbolton has quit [Quit: chrisbolton]
jeffreybaird_ has joined #ruby
metadave_ has joined #ruby
cmaxw_____ has joined #ruby
pusewicz has joined #ruby
ssut has joined #ruby
tiagonobre has joined #ruby
halfdan_ has joined #ruby
zzak__ has joined #ruby
initself has quit [Write error: Broken pipe]
franka_ has quit [Write error: Broken pipe]
ltd has quit [Write error: Broken pipe]
zaargy_ has quit [Write error: Broken pipe]
aniM has quit [Ping timeout: 240 seconds]
<Steve21>
anyone use GitHub for Project management on your projects? Like tracking issues, milestones etc?
yo61 has joined #ruby
<pipework>
what is this jeethubb?
amitchellbullard has joined #ruby
edmellum has joined #ruby
saarinen has quit [Quit: saarinen]
Steve21 has quit [Remote host closed the connection]
camt has quit [Read error: Connection reset by peer]
speakingcode has quit [Remote host closed the connection]
ltd has joined #ruby
towbes has joined #ruby
towbes has joined #ruby
mattlins has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
saarinen has joined #ruby
<sevenseacat>
you need your own exercise :P
Lewix has joined #ruby
shevy has joined #ruby
Lewix has quit [Remote host closed the connection]
jdj_dk has joined #ruby
mjmac has quit [Ping timeout: 240 seconds]
camt has joined #ruby
autonomousdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mordocai` has joined #ruby
<krz>
any ideas?
nevans has joined #ruby
mjmac has joined #ruby
Dreamer3 has joined #ruby
havenwood has joined #ruby
Lewix has joined #ruby
mordocai has quit [Remote host closed the connection]
<krz>
i get zzzz.rb:23:in `<main>': undefined method `first' for #<User:0x00000001675948> (NoMethodError)
razum2um has joined #ruby
zastern has joined #ruby
<krz>
should i be using somethng like self.included(base)
bruno- has joined #ruby
<jswensen>
OK…this is almost working http://pastebin.com/CDHb5iv4 The problem is that while the output of the puts in the inner .select is correct, the contents of the uuid_obj list is not filtered (it is exactly the same as bucket_contents.
yacks has quit [Quit: Leaving]
<krz>
ah got it
aspires has joined #ruby
alexju has quit [Remote host closed the connection]
<shevy>
any of you have experience with ruby on BSD? I am downloading PCBSD right now, considering to replace slackware here with it... but without ruby I am non-functional
<eam>
it's not any different
<shevy>
hey
<shevy>
I even failed to mount something on freebsd years ago!
<shevy>
I still don't remember the command...
<shevy>
and those slices for a hdinstall are just weird
datafirm has quit [Quit: Computer has gone to sleep.]
Wolland has joined #ruby
datafirm has joined #ruby
edwardthefma has quit [Read error: Connection reset by peer]
bal has joined #ruby
setra has quit [Ping timeout: 244 seconds]
<eam>
ok seriously, what's the default class name?
<eam>
>> self.inspect
<shevy>
main?
Wolland has quit [Read error: No route to host]
<eam>
"main" isn't a class though
Wolland has joined #ruby
<sevenseacat>
no, its an instance of type Object
kireevco has joined #ruby
<sevenseacat>
self.class # Object
hermanmunster has quit [Remote host closed the connection]
<eam>
so I'm in its instance?
hermanmunster has joined #ruby
Mon_Ouie has quit [Ping timeout: 252 seconds]
JJMalina has quit [Ping timeout: 240 seconds]
<eam>
>> self.send methods.sample
<eval-in>
eam => wrong number of arguments (0 for 1) (ArgumentError) ... (https://eval.in/168329)
<sevenseacat>
see i cant look at that and know what it does
<eam>
we'll never know what it did
abdulsattar has joined #ruby
<eam>
but we know what it resulted in
garndt has quit [Quit: Connection closed for inactivity]
<sevenseacat>
oh i see
<sevenseacat>
weird, but okay :P
exgf_c has joined #ruby
bahar has quit [Ping timeout: 244 seconds]
kwd has quit [Quit: kwd]
exgf has quit [Ping timeout: 264 seconds]
bruno- has quit [Ping timeout: 264 seconds]
aspires has quit []
ddv has joined #ruby
ddv has quit [Changing host]
mupkoo has joined #ruby
mupkoo has quit [Remote host closed the connection]
mupkoo has joined #ruby
<godd2>
>> y = 0; x = methods.sample; returned = self.send(x, *Array.new(self.method(x).arity.abs) { y = ObjectSpace.each_object.to_a.sample }); x.to_s + y.to_s
<wasamasa>
I end up wrecking my irb sessions in emacs because I forgot to end a block easily
<maasha>
*response
<wasamasa>
so that's a lot better
pranny has joined #ruby
fgo has quit []
<maasha>
one thing about pry I never figures out is how to stop a job without exiting pry. in irb you can to ctrl-c, but in pry it exists pry alltogether.
<wasamasa>
also, why the hell does the inf-ruby mode not offer customizing the default implementation
<maasha>
jottr: you can do: response['businesses'].each { |business| pp business }
<maasha>
or response['businesses'].each { |business| puts business[:name] }
mordocai` has quit [Remote host closed the connection]
nateberkopec has joined #ruby
<jottr>
maasha: thx
mordocai` has joined #ruby
yubrew has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
Takle has quit [Remote host closed the connection]
<daxroc_>
Should bundler work with an index generated by gem generate_index -d ... ?
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_justin has joined #ruby
<daxroc_>
After setting it in source 'http...' I get a 400 error with bundler but gem search --source http.. seems to find items
<maasha>
jottr: pp is your friend. It precisely tells you the layout of the data structure. It takes some time to get used to, but if you break down the data structure one level at a time, you well soon be there.
Poky has joined #ruby
<jottr>
maasha: You're probably right. I really need to further dig into how the different data structures are handled in ruby though
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
oo_ has quit [Remote host closed the connection]
kaspergrubbe has quit [Read error: Connection reset by peer]
yubrew has quit [Ping timeout: 264 seconds]
Takle has joined #ruby
kaspergrubbe has joined #ruby
mjmac has joined #ruby
claymore has joined #ruby
klaut has quit [Remote host closed the connection]
Shidash has quit [Quit: Leaving.]
oo_ has joined #ruby
Joulse has quit [Quit: Joulse]
pranny has quit [Quit: Leaving.]
jottr_ has joined #ruby
banjara has joined #ruby
jottr has quit [Disconnected by services]
jottr_ is now known as jottr
Robbo` has left #ruby ["Konversation terminated!"]
gruz0[russia] has joined #ruby
seitensei has quit [Read error: Connection reset by peer]
endash has joined #ruby
postmodern has quit [Quit: Leaving]
seitensei has joined #ruby
seitensei has joined #ruby
seitensei has quit [Changing host]
Xeago has joined #ruby
ldnunes has joined #ruby
andrewjanssen has joined #ruby
banjara has quit [Ping timeout: 248 seconds]
ridget has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tus has joined #ruby
shredding has quit [Quit: shredding]
anaeem1__ has quit [Remote host closed the connection]
Alina-malina has quit [Ping timeout: 260 seconds]
andrewjanssen has quit [Quit: Leaving...]
kiri has quit [Ping timeout: 272 seconds]
n3byt3 has joined #ruby
Joulse has joined #ruby
phutchins has joined #ruby
matled- has joined #ruby
iaj_ has joined #ruby
relix has quit [Remote host closed the connection]
adac has joined #ruby
matled has quit [Read error: Connection reset by peer]
relix has joined #ruby
matled- is now known as matled
Giorgio has joined #ruby
<adac>
Having an URL that has one or more redirections, how to follow these redirections so to find out what the "end" URL is?
germanstudent_ has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
flori_ has joined #ruby
doev has quit [Quit: Verlassend]
<Giorgio>
it is possible to invert hash {"top" => [1,2,3]} to become {1 => "Top", 2 => "Top", 3 => "Top" }
<workmad3>
adac: if you get a redirect status code, the location should be in the Location: header field
exgf_c has quit [Remote host closed the connection]
germanstudent has quit [Ping timeout: 245 seconds]
tacos1de has quit [Ping timeout: 264 seconds]
iaj has quit [Ping timeout: 245 seconds]
<workmad3>
adac: so if you have an HTTP client that doesn't follow redirects already, you just grab the Location header in those cases and make a new request
<MrDoctor>
Even after the process finishes execution
<MrDoctor>
What am I doing wrong?
chipotle has quit [Client Quit]
yubrew has quit [Ping timeout: 255 seconds]
banister has joined #ruby
akshay_kumar has joined #ruby
bahar has joined #ruby
bahar has quit [Changing host]
workmad3 is now known as wm3|away
kaspergrubbe has quit [Ping timeout: 248 seconds]
Takle has quit [Remote host closed the connection]
paulfm has joined #ruby
banister has quit [Client Quit]
jespada has joined #ruby
lolmaus has quit [Ping timeout: 240 seconds]
sacoetzee has left #ruby ["Leaving"]
halfdan is now known as HALFDAN
railzForDaiz has quit []
r_rios has joined #ruby
happytux has quit [Ping timeout: 240 seconds]
towbes has joined #ruby
happytux_ has joined #ruby
lolmaus has joined #ruby
lw has joined #ruby
autonomousdev has joined #ruby
gruz0[russia] has quit [Quit: Leaving]
krz has quit [Quit: WeeChat 0.4.3]
banjara has joined #ruby
<adac>
How to map symbols guys?
<adac>
like :symbol1 shoudl be :symbol
lolmaus has quit [Ping timeout: 248 seconds]
bmurt has joined #ruby
<LadyRainicorn>
adac: Don't do that.
lolmaus has joined #ruby
techsethi has quit [Quit: techsethi]
<LadyRainicorn>
sym.to_s.rstrip('1').to_sym will do it, but it will probably leak memory
ClarusCogitatio has quit [Ping timeout: 248 seconds]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<adac>
LadyRainicorn, thank you. I will figure out another way to do it!
bal1 has joined #ruby
alem0lars has joined #ruby
LekeFly has joined #ruby
<adac>
mean to not to map it :)
banjara has quit [Ping timeout: 240 seconds]
bal has quit [Ping timeout: 252 seconds]
<MrDoctor>
Is the hash except function only exclusive to rails?
lw has quit [Ping timeout: 264 seconds]
Takle has joined #ruby
moritzs has joined #ruby
<daxroc_>
Is gem generate_index compatable with bundler ? I'm sourcing from a gem-repo here within my Gemfile. I get this error from bundler list --verbose "Retrying source fetch due to error (3/3): Bundler::HTTPError Could not fetch specs from http://.../path/to/repo/"
<daxroc_>
its fetching file *specs.4.8.gz
<daxroc_>
The file I curl is the same as what's on the server.
<daxroc_>
*via checksums
ClarusCogitatio has joined #ruby
zorak has quit [Ping timeout: 255 seconds]
Takle has quit [Remote host closed the connection]
dblessing has joined #ruby
nateberkopec has quit [Quit: Leaving...]
yacks has quit [Ping timeout: 240 seconds]
nateberkopec has joined #ruby
nateberkopec has quit [Client Quit]
pu22l3r has joined #ruby
Takle has joined #ruby
wm3|away has quit [Ping timeout: 240 seconds]
eka has joined #ruby
cout_ is now known as cout
zkay11 has joined #ruby
sdwrage has joined #ruby
andrewjanssen has joined #ruby
XenoWolf has joined #ruby
einarj has quit [Remote host closed the connection]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
lolipop has quit []
centrx has joined #ruby
nateberkopec has joined #ruby
hermanmunster has quit [Remote host closed the connection]
andrewjanssen has quit [Ping timeout: 255 seconds]
hermanmunster has joined #ruby
kaspergrubbe has joined #ruby
Sirupsen has joined #ruby
lxsameer has quit [Quit: Leaving]
sdwrage has quit [Quit: This computer has gone to sleep]
oo_ has quit [Remote host closed the connection]
kaspergrubbe has quit [Read error: Connection reset by peer]
pu22l3r has quit [Remote host closed the connection]
klaut has joined #ruby
Trynemjoel has left #ruby [#ruby]
pu22l3r has joined #ruby
kaspergrubbe has joined #ruby
kaspergr_ has quit [Read error: Connection reset by peer]
Sirupsen has quit [Client Quit]
oo_ has joined #ruby
hermanmunster has quit [Ping timeout: 255 seconds]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
Hanmac has quit [Remote host closed the connection]
alem0lars has quit [Quit: Going AFK...]
narcan has quit [Remote host closed the connection]
Wolland has joined #ruby
kiri has joined #ruby
yubrew has quit [Ping timeout: 264 seconds]
JasonG_ has joined #ruby
mengu has joined #ruby
jerius has joined #ruby
Morkel has quit [Quit: Morkel]
Wolland has quit [Ping timeout: 252 seconds]
_justin has quit [Quit: _justin]
lw has joined #ruby
eka has joined #ruby
robertodecurnex has joined #ruby
Zenigor has joined #ruby
banister has quit [Ping timeout: 248 seconds]
_justin has joined #ruby
mikemac has joined #ruby
<certainty>
tagrudev: yow
jottr has joined #ruby
Mon_Ouie has joined #ruby
aniM has joined #ruby
banister has joined #ruby
n3byt3 has quit [Quit: Leaving]
mattstratton has joined #ruby
einarj has joined #ruby
einarj has quit [Remote host closed the connection]
einarj has joined #ruby
Takle has quit [Remote host closed the connection]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
mikesplain has joined #ruby
yacks has joined #ruby
akshay_kumar has left #ruby ["Leaving"]
anaeem1 has joined #ruby
Photism has joined #ruby
eka has joined #ruby
LadyRainicorn has quit [Ping timeout: 272 seconds]
jottr has quit [Ping timeout: 264 seconds]
banjara has joined #ruby
banjara has quit [Changing host]
banjara has joined #ruby
wm3|away has joined #ruby
coderhs has quit [Ping timeout: 252 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LexicalScope has joined #ruby
tesuji has quit [Ping timeout: 272 seconds]
djcp has joined #ruby
djcp has left #ruby [#ruby]
<maasha>
I need to quote this string: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$III as a literal without having to escape meta chars. %q{} and %Q{} doesn't do the trick?
unshadow has joined #ruby
thesheff17 has joined #ruby
Hanmac has joined #ruby
banjara has quit [Ping timeout: 240 seconds]
Channel6 has joined #ruby
godd2 has quit [Ping timeout: 246 seconds]
LadyRainicorn has joined #ruby
cory_ has joined #ruby
SilverKey has joined #ruby
yekta has quit [Quit: yekta]
<apeiros>
maasha: what happens when you try?
wm3|away is now known as workmad3
mr_foobar has joined #ruby
anaeem1 has quit [Remote host closed the connection]
garndt has joined #ruby
aniM has quit [Ping timeout: 240 seconds]
LadyRainicorn has quit [Read error: Connection reset by peer]
LadyRainicorn has quit [Read error: Connection reset by peer]
trswoi has quit [Ping timeout: 272 seconds]
freerobby has joined #ruby
mr-foobar has joined #ruby
LadyRainicorn has joined #ruby
Takle has joined #ruby
Fire-Dragon-DoL has joined #ruby
tmtwd has joined #ruby
csiefa has joined #ruby
endash has quit [Quit: endash]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maximski has joined #ruby
zarul has joined #ruby
SilverKey has joined #ruby
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
codeurge has joined #ruby
snath has joined #ruby
duallain has joined #ruby
discr33t has joined #ruby
enebo has joined #ruby
GriffinHeart has joined #ruby
andrewjanssen has joined #ruby
<discr33t>
hey everyone, i'm pretty new to ruby and i'm trying to create an erb template that will generate a new server block for each site based off of a for loop. can anyone help me out with this?
jhass is now known as jhass|off
wildroman2 has quit [Remote host closed the connection]
<godd2>
or 'for site in sites' if you want a for loop, but it's not recommended to use one.
<discr33t>
godd2: i think so. can you explain it for me? where is the server block generated from?
alem0lars has joined #ruby
csiefa has quit [Ping timeout: 244 seconds]
lw has joined #ruby
mconnolly has joined #ruby
<godd2>
Well presumably whatever is loading your erb template has it defined. I have no idea what you mean by server block, so I just assumed it was a predefined class you had.
<discr33t>
godd2: i have an array of sites: $site_urls = ["site1", "site2", "site3"]. I want to take that and for each site, generate a server block in a single vhost file
bal1 has quit [Quit: bal1]
aganov has quit [Remote host closed the connection]
bal has joined #ruby
<discr33t>
godd2: here is an example of my server block: http://pastebin.com/t1jnYPp5 i need to generate one per site
bal has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
<discr33t>
godd2: that is my erb template btw
wildroman2 has quit [Ping timeout: 260 seconds]
nfk has quit [Quit: yawn]
Macaveli has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
PLATOSCAVE has joined #ruby
eilbue has joined #ruby
<godd2>
so you want a whole new block for each site right? cause that makes it look like you want several sites in the same block
HACKING-TWITTER has quit [Ping timeout: 272 seconds]
<discr33t>
godd2: sorry that is bad code but it was the quickest example i could grab
<discr33t>
godd2: i do want a whole new block for each site
<godd2>
okay then you want to yield back to an array from the block
GriffinHeart has quit [Remote host closed the connection]
apeiros has joined #ruby
<discr33t>
godd2: how would i do that? i'm pretty new to ruby.
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
nfk has joined #ruby
wildroman2 has joined #ruby
jprovazn is now known as jprovazn_afk
mikesplain has quit [Read error: Connection reset by peer]
<godd2>
lemme make sure I understand. basically you're just trying to build a big string, yes? so you can shove it into some file?
Eyes has quit [Quit: X probably crashed]
mikesplain has joined #ruby
lw has quit [Quit: s]
mikespla_ has joined #ruby
moted has joined #ruby
<discr33t>
godd2: pretty much i guess. i basically need that entire pastebin per number of sites in the array in a single file
olivier_bK1 has quit [Remote host closed the connection]
olivier_bK has joined #ruby
keystonelemur has joined #ruby
banjara has joined #ruby
nerdy has quit [Quit: Computer has gone to sleep.]
Takle has joined #ruby
parduse has quit [Remote host closed the connection]
<discr33t>
godd2: sorry one thing i forgot to ask, if i add a new site to my array will a new string be generated?
<godd2>
as long as you run the loop again. keep in mind the entire string will be generated every time you run the loop, at least for every site still in the array.
<discr33t>
so would i get duplicates?
lemur has quit [Ping timeout: 264 seconds]
Burgestrand has quit [Quit: Burgestrand]
buub has quit [Ping timeout: 264 seconds]
banjara has quit [Ping timeout: 264 seconds]
parduse has joined #ruby
lxsameer has quit [Ping timeout: 272 seconds]
tmtwd has quit [Ping timeout: 272 seconds]
nemesit|znc has quit [Ping timeout: 240 seconds]
jfran has joined #ruby
Morkel has joined #ruby
Takle has quit [Remote host closed the connection]
isthisreallife has joined #ruby
mijicd has quit [Remote host closed the connection]
r_rios has quit [Ping timeout: 240 seconds]
isthisreallife has left #ruby [#ruby]
_maes_ has joined #ruby
hamakn has quit [Remote host closed the connection]
maestrojed has joined #ruby
_maes_ has quit [Client Quit]
banister has quit [Ping timeout: 260 seconds]
nemesit|znc has joined #ruby
tmtwd has joined #ruby
_maes_ has joined #ruby
mr_rich101 has quit [Read error: Connection reset by peer]
<workmad3>
discr33t: just clear out and re-create the file each time you need to
pontiki has joined #ruby
lw has joined #ruby
lw has quit [Max SendQ exceeded]
kiri has quit [Remote host closed the connection]
lw has joined #ruby
Ankhers has quit [Remote host closed the connection]
shredding has joined #ruby
Aryasam has joined #ruby
Layke has joined #ruby
mr_rich101 has joined #ruby
<Layke>
I'm confused. I'm trying to install ruby 1.9.3. Which installs fine. Then I install ruby-bundler, and my ruby -v seems to pop back to 1.8.7?
<Layke>
Whenever I then try to update nokogiri it says I don't have the correct version of ruby (1.9.3)
terrell_t has joined #ruby
Macaveli has joined #ruby
Wismer has joined #ruby
<Layke>
Okay. I guess I shouldn't be using ruby-bundler, and instead should be `gem install bundler`
lw has quit [Ping timeout: 260 seconds]
maximski has quit []
aspires has joined #ruby
Ankhers has joined #ruby
lw has joined #ruby
Takle has joined #ruby
terrellt has quit [Ping timeout: 264 seconds]
terrell_t is now known as terrellt
alex88 has quit [Quit: Leaving...]
schaerli has joined #ruby
dorei has quit [Read error: Connection reset by peer]
laudace has quit [Quit: Leaving.]
CaptainJet has joined #ruby
Biohazard has joined #ruby
banister has joined #ruby
schaerli has quit [Remote host closed the connection]
pietr0 has joined #ruby
jaimef has quit [Excess Flood]
jaimef has joined #ruby
Lulzon has quit [Read error: Connection reset by peer]
stytown has quit [Quit: stytown]
endash has joined #ruby
shredding has quit [Quit: shredding]
kireevco has joined #ruby
laudace has joined #ruby
p0sixpscl has quit [Quit: p0sixpscl]
keystonelemur has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
fumk has joined #ruby
Lulzon has joined #ruby
edgarjs_afk is now known as edgarjs
pu22l3r_ has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
einarj has quit [Remote host closed the connection]
havenwood has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
TheLarkInn has left #ruby [#ruby]
MrDoctor has quit [Quit: Lost terminal]
binaryhat has quit [Remote host closed the connection]
binaryhat has joined #ruby
pu22l3r has quit [Ping timeout: 244 seconds]
troyready has joined #ruby
Wolland has joined #ruby
sdwrage_ has joined #ruby
Lulzon has quit [Read error: Connection reset by peer]
dorei has joined #ruby
claymore has quit [Ping timeout: 260 seconds]
j_mcnally has joined #ruby
wildroman2 has quit [Ping timeout: 255 seconds]
ndrei has joined #ruby
claymore has joined #ruby
Wolland has quit [Ping timeout: 240 seconds]
replay has joined #ruby
techsethi has quit [Ping timeout: 252 seconds]
Skipp_OSXI has joined #ruby
sdwrage_ has quit [Quit: This computer has gone to sleep]
<Skipp_OSXI>
hello, is there a test suite that you can run to look for regressions in ruby itself?
Lulzon has joined #ruby
<momomomomo>
Skipp_OSXI: that depends on the implementation you're using
hamakn has joined #ruby
<Skipp_OSXI>
momomomomo, how so? as in the platform?
<canton7>
MRI, rubular, jruby, ironruby, etc
<momomomomo>
ruby MRI is different than JRuby etc
<canton7>
lots of people have implemented ruby
charliesome has quit [Remote host closed the connection]
techsethi has joined #ruby
chipotle has quit [Quit: cya]
<Skipp_OSXI>
oh, well, I mean ruby, as in the language ruby versions 1.9.1 and 1.9.3 specifically, I don't kno about MRI, tubular, jruby, or ironruby
<Skipp_OSXI>
rubular...
charliesome has joined #ruby
sdwrage_ has joined #ruby
<momomomomo>
Skipp_OSXI: if you're not sure about the versions or interpreters, I'm wondering why you'd be looking for regressions there?
<workmad3>
Skipp_OSXI: so next... what are you counting as a 'regression'... are you talking syntax? or are you meaning a check that every ruby program on 1.9.1 works the same on 1.9.3?
<workmad3>
Skipp_OSXI: or somewhere in-between?
mikesplain has joined #ruby
ephemerian has quit [Quit: Leaving.]
Lulzon has joined #ruby
zz_jrhorn424 has joined #ruby
Giorgio has quit [Ping timeout: 264 seconds]
greenarrow has quit [Quit: 500]
<Skipp_OSXI>
workmad3, well, if I were to do the process myself, I would take a sample of a few dozen ruby apps and make sure that they work both on 1.9.1 and 1.9.3
<Skipp_OSXI>
basically I'm asking if there is a more automated process available than that?
sunya7a has joined #ruby
<Skipp_OSXI>
well, I should say I would take a few apps that I know work on 1.9.1 and make sure that they still work on 1.9.3
tockitj has joined #ruby
havenwood has quit [Remote host closed the connection]
<workmad3>
Skipp_OSXI: there's a good chance that apps developed on 1.9.1 won't work on 1.9.3 btw, depending on what assumptions the dev made about the load path
djbkd has joined #ruby
mr_rich101 has joined #ruby
<workmad3>
Skipp_OSXI: 1.9.1 to 1.9.2 removed '.' from the default load path, so an app that assumes that . is there will most likely break when going to 1.9.3
<Skipp_OSXI>
hmmm, okay, well, I'm really not trying to test ruby itself though, just that the compiled binaries work as intended, so if there are purposeful incompatible changes from 1.9.1 to 1.9.3 then that would be okay.
<olivier_bK>
do you know if it's possible with nokogiri to find a params in html page
<olivier_bK>
?
stytown has joined #ruby
senayar has joined #ruby
<Skipp_OSXI>
I guess I'd need to find a few apps that are known to work on both 1.9.1 and 1.9.3 first
icedp has joined #ruby
stytown has quit [Client Quit]
<xxneolithicxx>
olivier_bK: can you elaborate on params... URL params?
froy has quit [Remote host closed the connection]
rdark has quit [Ping timeout: 264 seconds]
<workmad3>
Skipp_OSXI: 'compiled binaries work as intended' <-- that would be the exact definition of 'test ruby itself' :P
edgarjs is now known as edgarjs_afk
<workmad3>
Skipp_OSXI: and if that's what you want... I believe there's a test suite you could run as part of the compilation... in a compiled source tree, try 'make test'
mikesplain has quit [Ping timeout: 272 seconds]
<olivier_bK>
xxneolithicxx, ok
<Skipp_OSXI>
oh, okay... that sounds good
rdark has joined #ruby
<Skipp_OSXI>
yeah that's all I want
rdark has quit [Client Quit]
rdark has joined #ruby
<olivier_bK>
xxneolithicxx, i would want to find the params price in a url page
lemur has quit [Remote host closed the connection]
techsethi has quit [Quit: techsethi]
r_rios has quit [Ping timeout: 272 seconds]
pasties has joined #ruby
yfeldblum has joined #ruby
krz has joined #ruby
zz_jrhorn424 has quit [Ping timeout: 240 seconds]
Poky has quit [Remote host closed the connection]
<Skipp_OSXI>
so, I'm getting failing tests on 1.9.1
<Skipp_OSXI>
sample/test.rb:gc ....not ok bignum 5 -- ./sample/test.rb:1451:in `<main>'
mikesplain has joined #ruby
<Skipp_OSXI>
1.9.3 passes
smathieu has quit [Remote host closed the connection]
<Skipp_OSXI>
I'm not sure what that tells me really
lemur has joined #ruby
<havenwood>
Skipp_OSXI: 1.9.1 is past end of life, heck it was never a stable release anyways.
smathieu has joined #ruby
<havenwood>
It isn't meant to be actually used.
mr_rich101 has quit [Read error: Connection reset by peer]
<Skipp_OSXI>
havenwood, right, okay
kenneth has joined #ruby
r_rios has joined #ruby
<havenwood>
Skipp_OSXI: Any particular reason to use 1.9.1?
workmad3 has quit [Ping timeout: 255 seconds]
zz_jrhorn424 has joined #ruby
<havenwood>
(If it happens to be apt-get on 1.9.1, that is just the ABI number, it is really 1.9.3.)
poimen has joined #ruby
<Skipp_OSXI>
havenwood, well, we are using 1.9.1 right now, trying to upgrade to 1.9.3 and I'm testing to make sure things don't break.
<havenwood>
ouch
<havenwood>
Skipp_OSXI: aha, at least moving off it not onto it. ;)
Lulzon has quit [Ping timeout: 264 seconds]
<Skipp_OSXI>
yes, that's true :)
CorpusCallosum has joined #ruby
mikesplain has quit [Read error: Connection reset by peer]
kenneth has quit [Client Quit]
djbkd has quit [Remote host closed the connection]
mikesplain has joined #ruby
<havenwood>
Skipp_OSXI: How'd you end up on 1.9.1? I've actually never seen anyone really using it. Usually people just think they're using it (thanks Debian).
sputnik13 has joined #ruby
sputnik13 has quit [Max SendQ exceeded]
nanoyak has quit [Quit: Computer has gone to sleep.]
discr33t has quit [Ping timeout: 246 seconds]
mikesplain has quit [Client Quit]
sputnik13 has joined #ruby
e-jambon has joined #ruby
mr_rich101 has joined #ruby
Kricir has joined #ruby
mikesplain has joined #ruby
nanoyak has joined #ruby
djbkd has joined #ruby
<Skipp_OSXI>
I'm gonna try running mspec
icedp has quit [Ping timeout: 248 seconds]
Lulzon has joined #ruby
Biohazard has quit [Read error: Connection reset by peer]
pu22l3r_ has quit [Remote host closed the connection]
Biohazard has joined #ruby
pu22l3r has joined #ruby
sfr^ has quit [Ping timeout: 240 seconds]
djbkd has quit [Remote host closed the connection]
sk87 has joined #ruby
sfr^ has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
icedp has joined #ruby
Hobogrammer has joined #ruby
sk87 has quit [Client Quit]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
DrShoggoth has quit [Quit: Leaving]
yfeldblu_ has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
AlSquire has joined #ruby
replay_ has joined #ruby
yfeldblu_ has quit [Read error: Connection reset by peer]
jprovazn_afk is now known as jprovazn
alem0lars has quit [Quit: alem0lars]
Kricir has quit [Read error: Connection reset by peer]
Kricir_ has joined #ruby
replay has quit [Ping timeout: 244 seconds]
Rainicorn has joined #ruby
Lulzon has quit [Read error: Connection reset by peer]
Kricir_ has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
fabrice31 has joined #ruby
LadyRainicorn has quit [Ping timeout: 248 seconds]
tcstar has quit [Ping timeout: 264 seconds]
_ixti_ has joined #ruby
terrell_t has joined #ruby
adac has quit [Ping timeout: 244 seconds]
ixti has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Quit: Konversation terminated!]
AlSquire has quit [Quit: This computer has gone to sleep]
bricker`work has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
Lulzon has joined #ruby
himself_ has joined #ruby
terrellt has quit [Ping timeout: 252 seconds]
<Skipp_OSXI>
havenwood, okay... well, if you really need to know, it's because I'm on Haiku and somebody built the 1.9.1 package so that's what we've got
smathieu has quit [Remote host closed the connection]
RaCx has joined #ruby
smathieu has joined #ruby
Rainicorn has quit [Read error: Connection reset by peer]
replay has joined #ruby
JKABC has left #ruby [#ruby]
LadyRainicorn has joined #ruby
mconnolly has quit [Quit: mconnolly]
Wolland has joined #ruby
nobitanobi has joined #ruby
RaCx has quit [Read error: Connection reset by peer]
ejnahc has quit [Ping timeout: 248 seconds]
RaCx has joined #ruby
<nobitanobi>
Hi guys. I am trying to modify the $LOAD_PATH and I am doing it like this: $LOAD_PATH << './lib' - However, I have seen many people doing $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib")- Any advantages/disadvantages on one or the other?
mr_foobar_baz has joined #ruby
ndrei has joined #ruby
replay_ has quit [Ping timeout: 264 seconds]
ejnahc has joined #ruby
cuqa has quit [Changing host]
cuqa has joined #ruby
heptadecagram has joined #ruby
rezzack has quit [Quit: Leaving.]
<heptadecagram>
I'm trying to get some sense of what the most common OS is for Ruby development, and no combination of google-fu seems to be yielding me a good survey of those numbers.
end_guy has quit [Remote host closed the connection]
RaCx has quit [Client Quit]
<heptadecagram>
I *feel* like it's largely OS X, but I want something to even vaguely back that up. Any ideas where I should look?
tcstar has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<wasamasa>
well, there's no way to deny people like os x as overall best operating system for pretty much everything
<heptadecagram>
Just searching for "ruby programming on X" gave X=windows the biggest number of results. But that seemed to be mostly installing ruby, which might point to just beginner/tutorial stuff instead of actual development.
adac has joined #ruby
rdark has quit [Quit: leaving]
Hobogrammer_ has joined #ruby
RaCx has joined #ruby
RaCx has quit [Client Quit]
Notte has joined #ruby
sputnik13 has joined #ruby
<havenwood>
heptadecagram: OS X is certainly popular. I see a lot of Arch, Debian/Ubuntu and Fedora as well.
RaCx has joined #ruby
testcore has joined #ruby
alem0lars has joined #ruby
<wasamasa>
heptadecagram: the other problem is whether all ruby developers will ever show up in public or a web search
end_guy has joined #ruby
Takle has joined #ruby
Rainicorn has joined #ruby
terrell_t has quit [Remote host closed the connection]
<xxneolithicxx>
nobitanobi: those operations add to different spots in the load path array thus affecting inclusion order
<xxneolithicxx>
it depends what you need
terrellt has joined #ruby
jay_ has joined #ruby
<xxneolithicxx>
if you want to force your directory first, then unshift, otherwise append using <<
Hobogrammer has quit [Ping timeout: 272 seconds]
<wallerdev>
see how many github repos have .DS_Store files lol
<nobitanobi>
Say I want my script to be abel to use classes that are in /lib
<wallerdev>
vs thumbs.db
<nobitanobi>
oh interesting.
<nobitanobi>
thanks
maestrojed has joined #ruby
replay_ has joined #ruby
tvw has quit []
replay__ has joined #ruby
replay has quit [Read error: Connection reset by peer]
jprovazn is now known as jprovazn_afk
LadyRainicorn has quit [Ping timeout: 264 seconds]
kaspergrubbe has joined #ruby
Takle has quit [Ping timeout: 255 seconds]
<Skipp_OSXI>
hey so, I'm trying to run rubyspec here and the instructions on https://github.com/rubyspec/rubyspec/ aren't working, it needs me to specify a path
<Skipp_OSXI>
can I run `mspec .` instead?
lolmaus has quit [Ping timeout: 252 seconds]
replay_ has quit [Ping timeout: 255 seconds]
lolmaus has joined #ruby
<Skipp_OSXI>
wait, I think I'm in the 2.x branch
Takle has joined #ruby
JasonG_ has quit [Quit: Leaving]
bluOxigen has joined #ruby
Rainicorn has quit [Ping timeout: 264 seconds]
havenwood has quit [Remote host closed the connection]
<xxneolithicxx>
are you trying to correlate test failures to ruby compatibility/language issues on platform?
Xeago has quit [Remote host closed the connection]
<Skipp_OSXI>
xxneolithicxx, yeah, I guess, trying to get a baseline for what should and should not work.
codeurge has quit [Quit: Quit.]
CodeLicker has joined #ruby
workmad3 has joined #ruby
Hanmac1 has joined #ruby
Kricir has quit [Remote host closed the connection]
Bira has quit [Remote host closed the connection]
jfran_ has joined #ruby
<Skipp_OSXI>
originally I was trying `make test` but that fails on 1.9.1 so I'm trying mspec (which someone here recommended)
Hanmac has quit [Ping timeout: 272 seconds]
lemur has joined #ruby
RaCx has quit [Read error: Connection timed out]
RaCx has joined #ruby
jfran has quit [Read error: Connection reset by peer]
yetanotherdave has joined #ruby
halogenandtoast has joined #ruby
LadyRainicorn has joined #ruby
<xxneolithicxx>
my 02 cents: i would always take tests like that with a grain of salt when using it especially the way you are just from the point of view that most software out there will often commonly fail tests when compiled or run like this but otherwise work fine. I would not worry about it until you hit a specific case that just seems flat out wrong. But... given that you said you are using Haiku, if you are porting ruby or something the
icarus_ has joined #ruby
replay has joined #ruby
icarus_ is now known as icarus
replay__ has quit [Read error: Connection reset by peer]
<Skipp_OSXI>
xxneolithicxx, correct, see, we are on ruby 1.9.1 and we'd like to upgrade to 1.9.3, how would you recommend that I do testing?
momomomomo has joined #ruby
Notte has quit [Remote host closed the connection]
mattmcclure has joined #ruby
<havenwood>
minitest or rspec
RaCx has quit [Quit: Computer has gone to sleep.]
jcromartie has joined #ruby
shredding has quit [Quit: shredding]
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
smathieu has quit [Read error: Connection reset by peer]
<xxneolithicxx>
honestly, just install the new version, any needed gems and run the code. I write code between Ubuntu and Redhat everyday and I use 1.8.7 and 1.9.1 (Ubuntu/deb version) and the only compatibility issues ive ever hit were more along the lines having the right version of a gem that is compatible with the version of ruby in use. But this would also depend on how good you are with coding standards as there are a few places where syn
smathieu has joined #ruby
schaerli has joined #ruby
<workmad3>
xxneolithicxx: you know the ubuntu 'ruby1.9.1' package installs 1.9.3, right? :)
testcore has joined #ruby
Nahra has joined #ruby
<Skipp_OSXI>
xxneolithicxx, well, but you are using packages... I am building packages, meaning I am compiling sources, although I guess your advice still stands
<xxneolithicxx>
so ive heard but ubuntu confounds the whole debacle by having pkgs for 1.8,.1.9.1, and 1.9.3 (never really looked into it, it works for me dont really care if its 1.9.1 or really 1.9.3)
<Skipp_OSXI>
right now dealing with build issues though...
<workmad3>
xxneolithicxx: last I looked, ruby1.9.3 was an alias for ruby1.9.1, which installs ruby 1.9.3... how's that for screwy? :)
<havenwood>
debian's 1.9.1 is actually 1.9.3
<xxneolithicxx>
the only way that building packages would make a difference is if you used different compile time options from whats normally used for the packaged version
<halogenandtoast>
Skipp_OSXI: Unless your using internals or C extensions, most code on 1.9.1 is going to run perfectly fine on 1.9.3 since not much change at the top level.
<workmad3>
Skipp_OSXI: using something like ruby-install can ease with compiling from source :)
<xxneolithicxx>
that may be so, i havent looked but like i said, its not something that mattered to me as 1.9.x is good enough for what I do
jfran_ has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<workmad3>
xxneolithicxx: well, it would matter as 1.9.1 was quickly classed as too buggy for any real use and the advice was to upgrade to 1.9.2 pretty much as soon as it was released (going back quite a few years now though :) )
<workmad3>
tbh, I'm surprised someone was/is using 1.9.1 :)
<Skipp_OSXI>
workmad3, maybe, I'd have to provide ruby-install with patches though, is there a way to do that?
<xxneolithicxx>
thats why i let my pkg manager handle that crap, id assume they wouldnt put a buggy one as standard
<workmad3>
Skipp_OSXI: yup
<workmad3>
xxneolithicxx: hahahaha
jfran_ has joined #ruby
<halogenandtoast>
xxneolithicxx: Are you using debian? Because that might not be true...
kirun has joined #ruby
<xxneolithicxx>
halogenandtoast: no im on Ubuntu 12.04
<halogenandtoast>
Ubuntu is debian packages.
alem0lars has quit [Quit: Going AFK...]
<havenwood>
xxneolithicxx: ruby -v
<halogenandtoast>
They have “notoriously” (at least in my book) released buggy software (read OpenSSH)
<halogenandtoast>
It might have gotten better.
schaerli has quit [Remote host closed the connection]
<xxneolithicxx>
1.9.3p0
lemur has quit [Remote host closed the connection]
<halogenandtoast>
ruby-install is really nice though, it’s a great solution.
bluOxigen has quit [Ping timeout: 252 seconds]
larsam has joined #ruby
<workmad3>
xxneolithicxx: so, now you've got to wonder/hope that the package maintainers have backported the multiple security fixes since p0 onto their build while keeping the patchlevel at 0...
senayar has quit [Remote host closed the connection]
LadyRainicorn has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
senayar has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
<workmad3>
xxneolithicxx: unless you're not using it for anything critical that is :)
<xxneolithicxx>
workmad3: im not using it for anything exposed to commercial customer so its not really a concern for me. I just have to make sure it "functionally" works from 1.8.7 to newer so it can be installed on RHEL 5/6 or Ubuntu
<RubyPanther>
Never assume your package maintainers have a better idea than upstream (unless they're a *BSD, then maybe)
<RubyPanther>
Upstream is always supposed to know more
<xxneolithicxx>
I dont assume, I just work with so many different distros my baseline is whatever is in the standard repo for the distro unless I have a reason to move to newer
testcore has quit [Remote host closed the connection]
<eam>
xxneolithicxx: totally reasonable
starkhallo is now known as starhalo
starhalo is now known as starkhalo
m8 has joined #ruby
Notte has joined #ruby
ghr has quit [Ping timeout: 252 seconds]
senayar has quit [Ping timeout: 244 seconds]
tvw has joined #ruby
lemur has joined #ruby
Takle has joined #ruby
LadyRainicorn has joined #ruby
tesaf has quit [Quit: Lost terminal]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
treehug88 has quit []
dwayhs has joined #ruby
phutchins has quit [Ping timeout: 244 seconds]
gverri has joined #ruby
jottr has quit [Ping timeout: 255 seconds]
jxport_ is now known as jxport
Hobogrammer_ has quit [Read error: Connection reset by peer]
jhass|off is now known as jhass
CaptainJet has quit []
gregf has quit [Quit: WeeChat 0.4.3]
smathieu has quit [Remote host closed the connection]
Bira has joined #ruby
smathieu has joined #ruby
Soda has quit [Remote host closed the connection]
gverri has left #ruby [#ruby]
m8 has quit [Quit: Sto andando via]
glaukommatos has joined #ruby
centrx has joined #ruby
p0sixpscl has joined #ruby
phutchins has joined #ruby
m8 has joined #ruby
<glaukommatos>
I'm looking for a method on Array that works like #detect, but instead of returning the array member returns the result from executing the block. Might there be some method that does this that I'm missing?
testcore has joined #ruby
toordog has joined #ruby
shredding has joined #ruby
Bira has quit [Ping timeout: 248 seconds]
Notte has quit [Remote host closed the connection]
seanosaur has joined #ruby
<xxneolithicxx>
select then map?
krz has quit [Quit: WeeChat 0.4.3]
<centrx>
glaukommatos, How about my_array.lazy.map { |it| fn(it) }.first
<glaukommatos>
Let me read up on it and see if it'll work. Thanks.
postmodern has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
jprovazn_afk is now known as jprovazn
RaCx has joined #ruby
<glaukommatos>
That works wonderfully. Thank you.
phutchins has quit [Ping timeout: 244 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jcalsb has quit [Read error: Connection reset by peer]
yekta has quit [Quit: yekta]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jxf has joined #ruby
moted has quit [Quit: moted]
Kricir has quit [Remote host closed the connection]
gregf has joined #ruby
LiohAu has quit [Quit: LiohAu]
schaerli has joined #ruby
havenwood has quit []
Kricir has joined #ruby
endash has quit [Quit: endash]
<andrewcarter>
test
<testol>
test success
moritzs has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Notte has joined #ruby
wildroman2 has joined #ruby
Notte has quit [Client Quit]
dangerou_ has quit [Read error: Connection reset by peer]
Azure has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
dangerousdave has joined #ruby
XenoWolf_ has joined #ruby
Matip has joined #ruby
Matip has joined #ruby
Matip has quit [Changing host]
sdwrage has quit [Quit: This computer has gone to sleep]
dideler has quit [Ping timeout: 264 seconds]
XenoWolf has quit [Ping timeout: 252 seconds]
XenoWolf_ has quit [Client Quit]
agent_white has joined #ruby
<agent_white>
Ello all
<Edelwin>
ehlo
pu22l3r_ has joined #ruby
Mattx has quit [Ping timeout: 244 seconds]
alvaro_o has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
pu22l3r has quit [Ping timeout: 244 seconds]
Kricir has quit [Remote host closed the connection]
moritzs has quit [Ping timeout: 260 seconds]
jxf has quit [Ping timeout: 248 seconds]
Hobogrammer has joined #ruby
heptadecagram has quit [Quit: leaving]
decoponio has quit [Quit: Leaving...]
pu22l3r_ has quit [Remote host closed the connection]
pu22l3r has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
DivineEntity has quit [Ping timeout: 255 seconds]
shredding has quit [Quit: shredding]
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
Zenigor has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
smathieu has joined #ruby
buub has joined #ruby
nanoyak has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
Hamburglr has joined #ruby
moritzs has joined #ruby
ikanobori has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
Takle has quit [Remote host closed the connection]
Zenigor has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
shredding has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
jottr has joined #ruby
moritzs has quit [Ping timeout: 260 seconds]
beneggett has joined #ruby
jfran_ has quit [Quit: Going offline, see ya! (www.adiirc.com)]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
seanosaur has quit []
nfk has quit [Quit: yawn]
dangerousdave has joined #ruby
dangerousdave has quit [Max SendQ exceeded]
Kricir has joined #ruby
terrell_t has joined #ruby
terrell_t has quit [Read error: Connection reset by peer]
SCHAAP137 has joined #ruby
terrell_t has joined #ruby
nfk has joined #ruby
Takle has joined #ruby
sdwrage has joined #ruby
heftig has joined #ruby
sputnik13 has joined #ruby
einarj has joined #ruby
terrellt has quit [Ping timeout: 264 seconds]
terrell_t is now known as terrellt
RaCx has quit [Ping timeout: 248 seconds]
dangerousdave has joined #ruby
LadyRainicorn has quit [Ping timeout: 272 seconds]
jottr has quit [Ping timeout: 260 seconds]
rezzack has joined #ruby
sputnik13 has quit [Client Quit]
LadyRainicorn has joined #ruby
lmickh has joined #ruby
djbkd has quit [Remote host closed the connection]
nmokru has quit [Quit: nmokru]
ekinmur has joined #ruby
HACKING-TWITTER has quit [Ping timeout: 272 seconds]
superscott[8] has joined #ruby
lemur has quit [Remote host closed the connection]
sputnik13 has joined #ruby
jottr has joined #ruby
senayar has joined #ruby
Vivekananda_y510 has joined #ruby
jackneill has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
mr_foobar_baz has quit [Remote host closed the connection]
Poky has joined #ruby
mr_foobar_baz has joined #ruby
Vivekananda_y510 has quit [Read error: Connection reset by peer]
Vivekananda_y510 has joined #ruby
einarj has quit [Read error: Connection reset by peer]
einarj has joined #ruby
sinkensabe has joined #ruby
senayar has joined #ruby
DrCode has joined #ruby
anaeem1 has joined #ruby
ghr has joined #ruby
anaeem1 has quit [Remote host closed the connection]
mjburgess has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
cmoneylulz has joined #ruby
einarj has quit [Read error: Connection reset by peer]
einarj_ has joined #ruby
mjsmith2 has quit [Remote host closed the connection]
moted has joined #ruby
mjsmith2 has joined #ruby
tvw has quit []
edgarjs is now known as edgarjs_afk
dc_ has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 240 seconds]
Atttwww has joined #ruby
edgarjs_afk is now known as edgarjs
mr_foobar_baz has quit [Remote host closed the connection]
mr_foobar_baz has joined #ruby
Guest70625 has joined #ruby
timonv has joined #ruby
sdouglas has joined #ruby
schaerli has quit [Remote host closed the connection]
mjburgess has quit []
edgarjs is now known as edgarjs_afk
CodeLicker has quit [Ping timeout: 264 seconds]
jottr has joined #ruby
testcore has quit [Ping timeout: 264 seconds]
Hanmac1 is now known as Hanmac
AlHafoudh has quit [Max SendQ exceeded]
Poky has quit [Ping timeout: 240 seconds]
e-jambon has quit [Remote host closed the connection]
AlHafoudh has joined #ruby
chrstphrhrt has joined #ruby
chrstphrhrt has left #ruby [#ruby]
Guest70625 has quit []
shredding has quit [Quit: shredding]
sdouglas has quit [Ping timeout: 264 seconds]
timonv has quit [Ping timeout: 252 seconds]
jprovazn has quit [Quit: Odcházím]
lolmaus has quit [Quit: No Ping reply in 180 seconds.]
Vivekananda_y510 has quit [Quit: Leaving]
Vivekananda_y510 has joined #ruby
jottr has quit [Ping timeout: 255 seconds]
lolmaus has joined #ruby
moritzs has joined #ruby
goshdarnyou is now known as BELGIUMdarnyou
moritzs has quit [Max SendQ exceeded]
jottr has joined #ruby
wjimenez5271 has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
x1337807x has joined #ruby
wjimenez5271 has joined #ruby
sdelmore has quit [Ping timeout: 245 seconds]
sdelmore has joined #ruby
cmoneylulz has quit [Remote host closed the connection]
recurrence has joined #ruby
jaimef has quit [Excess Flood]
recurrence has left #ruby [#ruby]
kies has quit [Ping timeout: 248 seconds]
moritzs has joined #ruby
terrellt has quit [Remote host closed the connection]
icarus has quit [Ping timeout: 252 seconds]
wildroman2 has quit [Read error: Connection reset by peer]
jerius has quit []
shevy has joined #ruby
Biohazard has quit [Remote host closed the connection]
wildroman2 has joined #ruby
terrellt has joined #ruby
jerius has joined #ruby
RaCx has joined #ruby
sputnik13 has joined #ruby
Kricir has quit [Remote host closed the connection]
Nahra has quit [Remote host closed the connection]
terrellt has quit [Remote host closed the connection]
moritzs has quit [Ping timeout: 240 seconds]
jaimef has joined #ruby
troyready has quit [Ping timeout: 255 seconds]
St_Marx has quit [Quit: Ex-Chat]
dc_ has joined #ruby
Matip has quit [Quit: Leaving]
oponder has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
SouL___ has joined #ruby
charliesome has joined #ruby
zorak has joined #ruby
centrx has quit [Quit: Mission accomplished. Ready for self-termination.]
terrellt has joined #ruby
bradhe has joined #ruby
Fractional has joined #ruby
dc_ has quit [Remote host closed the connection]
jhass is now known as jhass|off
charliesome has quit [Client Quit]
<Fractional>
I have a question regarding namespaces in Ruby. I create a module named "Network", within the module I define a method called "send_packet". I then require this file to main, and try to access the method by Network::send_packet. It tells me the namespace can not be found.
<Fractional>
Why is that?
<Norrin>
show the code
<wasamasa>
you should be using Network.send_packet anyways if it's a method
einarj has joined #ruby
<halogenandtoast>
What wasamasa said.
einarj_ has quit [Read error: Connection reset by peer]
ppinto has quit [Quit: ppinto]
<halogenandtoast>
:: is for accessing constants.
<wasamasa>
and constructors!
<halogenandtoast>
constructors?
<wasamasa>
therefore, Nokogiri::HTML(uri) should be fine
<Fractional>
Wasamasa: Thank you for the advice! I will make sure to use this! :)
<xxneolithicxx>
TIL about github highlighting
<xxneolithicxx>
:-) nice
<Fractional>
xxneolithicxx: Mind if I ask how you selected two?
<wasamasa>
Fractional: oh and if you want to highlight other people's nicknames, hit tab in your irc client to complete them correctly after typing an arbitrary number of letters
<xxneolithicxx>
hold shift
<xxneolithicxx>
while clickign
<wasamasa>
halogenandtoast: so you'd advise for being explicit in this case?
moritzs has joined #ruby
<Fractional>
wasamasa: Sometimes I am too lazy to move my finger to tab rather than finishing typing someone's name.
<wasamasa>
some clients don't even require typing anything before hitting tab
_djbkd has joined #ruby
<halogenandtoast>
wasamasa: I like to know when I’m creating an object and when I’m not. So in this case yes expliciteness is my preference.
blackmesa has joined #ruby
<wasamasa>
halogenandtoast: I see, thanks
<shevy>
Fractional I sometimes copy paste
<halogenandtoast>
I feel like that was something _why introduced with Hpricot and it felt wrong.
<shevy>
double click on Fractional, then hit middle mouse button
djbkd has quit [Read error: Connection reset by peer]
<wasamasa>
shevy: as long as you don't paste the angular brackets
<halogenandtoast>
by the way Fractional if you’re going to call Network::new_user you need to define new_user as def self.new_user
<Fractional>
Oh, is that the source of the problem? I will give it a go, thanks halogenandtoast!
phantasm66 has quit [Quit: *sleeeep….]
<halogenandtoast>
Well that’s a different error.
_djbkd has quit [Remote host closed the connection]
lkba has joined #ruby
<halogenandtoast>
So it probably won’t change the error message, but it would have been the next error you go to :p
djbkd has joined #ruby
<Fractional>
Solved the error, also took action and followed the ruby styleguide. (From Network::method to Class.method)
lemur has joined #ruby
<Fractional>
Everything works now, thanks! :)
moritzs has quit [Ping timeout: 255 seconds]
<halogenandtoast>
Great, glad to hear it Fractional
Logiztik has joined #ruby
<Fractional>
halogenandtoast: Oh, I have one last problem if you do not midn!
naw has quit [Read error: Connection reset by peer]
<eam>
all software used to be smaller
naw has joined #ruby
naw has quit [Read error: Connection reset by peer]
Arkaniad|Laptop has quit [Ping timeout: 248 seconds]
nobitanobi has quit [Remote host closed the connection]
Soda has joined #ruby
mconnolly has joined #ruby
nmokru has quit [Quit: nmokru]
dangerousdave has quit [Ping timeout: 272 seconds]
smathieu has quit [Remote host closed the connection]
Arkaniad|Laptop has joined #ruby
Arkaniad has joined #ruby
Arkaniad|Laptop has quit [Read error: Connection reset by peer]
smathieu has joined #ruby
timonv has joined #ruby
Mattias has quit [Ping timeout: 245 seconds]
Takle has joined #ruby
yetanotherdave has quit [Ping timeout: 272 seconds]
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
<shevy>
:(
Mattias has joined #ruby
mjsmith2 has quit [Remote host closed the connection]
Bira has quit [Remote host closed the connection]
cmoneylulz has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
ghr has joined #ruby
Vivekananda_y510 has quit [Ping timeout: 244 seconds]
alec-c4 has quit [Remote host closed the connection]
alec-c4 has joined #ruby
<Fractional>
How do I get my public IP in a Ruby program? I tried -most of the methods on stackoverflow, but they always seem to fail. (Giving me lolal IPs etc.)
soulcake has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
<shevy>
I want them all to lose
<shevy>
why does there have to be a winner anyway?
<wallerdev>
lol
<shevy>
I think they should enter a cage and pitfight it out instead
<shevy>
like in the colosseum days in the arena
<wallerdev>
thatd be cool
<wallerdev>
or if they played that mayan game where you get the ball in the hole on the slope
nateberkopec has quit [Quit: Leaving...]
<eam>
Fractional: sorry, intermittant connection to irc. getpeername() or whatever ruby maps that to is what you need
einarj has quit [Read error: Connection reset by peer]
einarj_ has joined #ruby
<eam>
for the local end, you have that address already from bind()
einarj_ has quit [Remote host closed the connection]
arrubin has joined #ruby
alexju has quit [Remote host closed the connection]
snath has quit [Ping timeout: 240 seconds]
alexju has joined #ruby
geggam_ has joined #ruby
Zebroid has quit [Remote host closed the connection]
<eam>
Fractional: like I was saying though, if you bind to 0.0.0.0 you may need to look at the routing configuration of the system to determine which IP your peer is going to see (and even then, consider NAT, etc)
geggam has quit [Ping timeout: 255 seconds]
<eam>
strictly speaking it's an intractable issue, but you can make some pretty decent educated guesses most of the time
Hobogrammer has quit [Ping timeout: 255 seconds]
Parker0 has joined #ruby
smathieu has quit [Read error: Connection reset by peer]
relix has joined #ruby
Wolland has joined #ruby
smathieu has joined #ruby
parkeror has joined #ruby
alexju has quit [Ping timeout: 272 seconds]
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
geggam_ has quit [Ping timeout: 240 seconds]
iceden has quit [Ping timeout: 264 seconds]
sunya7a has joined #ruby
Wolland has quit [Ping timeout: 248 seconds]
EminenceHC has joined #ruby
djbkd has joined #ruby
<EminenceHC>
I am having difficulty parsing this hash: {"clock_in_1"=>[nil, Tue, 01 Jul 2014 12:07:58 -0700]} There are two values per key. I am trying to print both the values for a particular key. What is the correct way to do this?
benzrf is now known as benzrf|offline
yetanotherdave has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
nanoyak has joined #ruby
sdwrage has joined #ruby
mr_foobar_baz has quit [Quit: WeeChat 0.4.3]
mr_foobar_baz has joined #ruby
djcp has joined #ruby
<Fractional>
eam: I am sorry but I do not quite understand. Is there not a simple way, even for people like me, to get the public IP from the machine through Ruby code? Its all thats stopping me from completing my program. :D
<shevy>
so I am quite sure your real hash does not look like this
<shevy>
otherwise there would be no syntax error
j_mcnally has quit [Ping timeout: 260 seconds]
<eam>
Fractional: not in a cross platform way. I can tell you how to do it in linux
<eam>
or most unixes
<EminenceHC>
shevy That is how a particular gem gives me information. I am trying to parse it but you are right it doesn't seem to be in correct syntax. What about this? {"clock_in_1"=>[2014-07-01 19:07:58 UTC, 2014-07-01 19:07:00 UTC], "start_lunch"=>[nil, Tue, 01 Jul 2014 12:08:28 -0700]}
jxf has quit [Ping timeout: 240 seconds]
<eam>
unless someone's written a gem to do interface/route discovery and heuristics you're going to have to write some code
<Fractional>
eam: What about getting the address from where the TCPSocket was sent?
<EminenceHC>
shevy: clock_in_1 has two values in an array. start_lunch has two values in an array. One is nil and one is a date.
<Fractional>
eam: I figured it out with UDPSockets, but not TCP :P
<eam>
Fractional: are you the server, or client?
<Fractional>
eam: Both right now.
<EminenceHC>
shevy: It confuses me because the date has a comma after the weekday which would seem to make it just another item in the array.
brunops has joined #ruby
<eam>
Fractional: getsockname() or the easier to use #local_address will give you the IP you bound to
<eam>
Fractional: when you say "listen on port 80, any interface (aka 0.0.0.0)" then connections can actually occur over any of the various interfaces on the box
<shevy>
If I have to make a guess, it is trying to display a time object
<EminenceHC>
shevy: What about this? {"clock_in_1"=>[2014-07-01 19:07:58 UTC, 2014-07-01 19:07:00 UTC]}
<shevy>
it's all the same EminenceHC
<EminenceHC>
shevy: What makes it an improper array? The values in the array should be quoted?
<shevy>
whatever displays this to you is in the wrong; it is 100% not a valid Array nor a valid Hash
sdwrage_ has joined #ruby
<shevy>
that would be one way, then you'd have a string object
iceden has joined #ruby
mr_foobar_baz has quit [Quit: WeeChat 0.4.3]
<shevy>
you could try to construct a time or DateTime object from a string
mr_foobar_baz has joined #ruby
<Fractional>
eam: The thing is I want there to be a way for the server to send TCPSockets to the clients. Since I do not know what IPs the clients have, I want to store it when they are authenticating with the server. So, I need a way to get their IP whether they are on linux or windows.
sdwrage has quit [Ping timeout: 244 seconds]
<eam>
Fractional: #remote_address and #local_address give you the ip endpoints
<eam>
BUT
snath has joined #ruby
yetanotherdave has quit [Ping timeout: 272 seconds]
<eam>
for local, you'll just get back the ip address you bound to
<eam>
you shouldn't ever need to call it
<eam>
it will likely return "0.0.0.0"
<Fractional>
Yeah, it returned an array of different IPs and endpoints. I was able to access the correct one by #local_address[6] but figured that it would not be the same everywhere.
zarul has quit [Remote host closed the connection]
<eam>
right
IceDragon has quit [Ping timeout: 264 seconds]
<eam>
the best guess for the majority of non-multihomed systems is going to be whatever interface the default route is on
<eam>
that's the `route -n|grep UG` stuff for linux
<shevy>
huh
<eam>
the problem is when you start looking at routing you're into system specific stuff
<eam>
Fractional: the good news is you can probably write that code
<Fractional>
eam: I am completely new to this so it sounds challenging :P
<Lewix>
anyone in toronto?
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Fractional>
eam: I suppose I could always make the client check every second if a new socket has arrived to the server, and if it has, i retrieve those messages to the client. Would that be better instead of the server starting the transfer to the client?
cashnguns has joined #ruby
dideler has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
<eam>
Fractional: what do you mean "check if a new socket has arrived?"
<Fractional>
eam: I am trying to write a simple chatting application. What I meant was that I could make the client check every second if a new message has arrived to the server, and if it have, the client will retrieve that message. Then I do not need to know the client's IP.
nateberkopec has joined #ruby
beneggett has joined #ruby
<Fractional>
eam: Would that be a better approach?
beneggett has quit [Client Quit]
<eam>
Fractional: in TCP you shouldn't need to know any ip information after establishing the connection
<eam>
hosts won't need to know their own IP at all
klaut has quit [Remote host closed the connection]
zarul has joined #ruby
zarul has quit [Changing host]
zarul has joined #ruby
endash has quit [Quit: endash]
<eam>
Fractional: there are frameworks to abstract away most of this for you, but if you're doing it to learn networking: you will open a bunch of connections and use something like IO.select() to wait for read/write events
kireevco has left #ruby [#ruby]
alan_ has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
brunops has quit [Ping timeout: 264 seconds]
momomomomo has quit [Quit: momomomomo]
momomomomo_ is now known as momomomomo
alan_ is now known as Guest73335
Hobogrammer has joined #ruby
<eam>
an IP address is only used when the client connects to the server. The server doesn't need to know any IP information
duallain has quit [Ping timeout: 248 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
sdwrage_ has quit [Quit: This computer has gone to sleep]
brunops has joined #ruby
Soda has quit [Remote host closed the connection]
glaukommatos has quit [Ping timeout: 260 seconds]
<Fractional>
eam: So the server should never 'connect' to the IP?
<eam>
that's right - this is one way TCP differs from UDP
<Fractional>
eam: Then the way I was thinking about doing it was wrong. Instead, the client should check for messages, instead of letting the server update the clients.
<xxneolithicxx>
ruby really doesnt have a module like python ethtools or something?
Soda has joined #ruby
<eam>
Fractional: in TCP the client connects to the server and establishes a bi-directional connection. After that, each side has a socket and can write back and forth in a stream
S0da has joined #ruby
<eam>
you can message either way you like
<eam>
but the client will do the connecting and setup
<Fractional>
eam: Could you write me a minimal example of this? I think I am a little bit confused. Would appreciate it a lot eam!
Soda has quit [Remote host closed the connection]
S0da has quit [Remote host closed the connection]
IceDragon has joined #ruby
Soda has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
<xxneolithicxx>
Fractional: Once your client connects to the server your server needs to keep track of the clients, which clients can see what messages/from whom and the server should send messages to those clients as it receives them from sending clients
sdwrage_ has joined #ruby
<xxneolithicxx>
not sure why you would even want to use UDP for a chatting system
<xxneolithicxx>
can you here me now?
<xxneolithicxx>
nope, message lost
<eam>
Fractional: ruby docs have pretty good examples
sdwrage_ has quit [Client Quit]
hermanmunster has joined #ruby
<Fractional>
eam: I think I have been doing this entire project wrong haha.
spider-mario has quit [Remote host closed the connection]
<xxneolithicxx>
as long as you learn something it doesnt matter if its wrong
<eam>
pretty much
lemur has joined #ruby
<Fractional>
Ok, now that there are people here with knowledge in networking I will ask you another question. So, I recently wrote a program that used UDP sockets. Whenever I send one, the program 'freezes' at this point- no idea why.