<RubyPanther>
How good does it have to be? Bulgarians translate most of the legal documents in Europe. Even French voter registrations, and the French don't even spell their own names consistently
<platzhirsch>
that makes sense now
Noldorin has joined #ruby
BackEndCoder has quit [Ping timeout: 276 seconds]
<gizmore>
Hackers don´t care about countries and borders.... they care about grammar and spelling!
<gizmore>
i am 33 years old, btw, and the most skilled trainee ever :P
<platzhirsch>
nice
<gizmore>
2nd "Lehrjahr"
<gizmore>
i was home a long time and had a weird past... but now i got a cool profession... hobby into profession :)
bthesorceror has joined #ruby
<gizmore>
platzhirsch: do you know java?
mando has joined #ruby
<platzhirsch>
gizmore: yes, was my strongest language before 2013
<gizmore>
nice
<gizmore>
maybe applicate on our company
<gizmore>
how old?
<platzhirsch>
gizmore: 25. That's a nice offer, thanks. But there is no way I move from Berlin to Braunschweig
<gizmore>
i see
<gizmore>
are you unemployed atm?
<gizmore>
so... is it urgent?
TheGreatDogesby has quit [Remote host closed the connection]
<gizmore>
if so, you could try to ask for "Halbtags" with remote
<gizmore>
maybe need to travel 1 week for instructions
<gizmore>
not sure... but i assume you are skilled :)
nettoweb has joined #ruby
<platzhirsch>
gizmore: no, I am in the privileged position to be currently employed :)
<platzhirsch>
I always feel like a caveman in Python. Today I wanted to run .uniq on a list. Oh, not implemented. I have to put it into a set. Well, actually that's okay, but you get quite snobby with Ruby
bthesorceror has quit [Read error: Operation timed out]
acoyfellow has joined #ruby
<benzrf>
platzhirsch: yeah
<benzrf>
it's a design difference
<gizmore>
RubyPanther: that looks awefully slow :P
<benzrf>
in ruby everything should always be available anywhere if anybody might someday need it
lethjakman has left #ruby ["WeeChat 0.4.0"]
<echosystm>
ok next question... im writing a script to parse thousands of rows of csv data
<RubyPanther>
gizmore: regexes are fast. very fast.
<benzrf>
in python there is a way to do anything but it is hidden if fewer than 90% of people use it
<RubyPanther>
mostly because of how regular they are
<benzrf>
echosystm: require 'csv'
<echosystm>
it seems like hashes are really slow
<gizmore>
RubyPanther: substrUntil is way more faster
enape_101 has joined #ruby
allaire has joined #ruby
<echosystm>
is there some special library with fast hashes?
<gizmore>
How do i monkeypatch String in rubyonrails?
<terrellt>
platzhirsch: You can do that with a set.
<bricker`work>
gizmore: class String; def yourmonkeypatch; end; end
kitak has joined #ruby
<gizmore>
bricker`work: you are my hero!
i_s has quit [Remote host closed the connection]
<terrellt>
platzhirsch: Hell, even better, if you always want it sorted use a SortedSet.
<bricker`work>
gizmore: or you can turn on Refinements!
jonr22 has quit [Client Quit]
pr1x has joined #ruby
<benzrf>
gizmore: you do it the same way as in ruby
<benzrf>
because you are using ruby
<gizmore>
yeah... like in js
<gizmore>
thanks guys :)
<platzhirsch>
terrellt: for processing array data I don't think it's very Rubyish. If you want to work with the set later on, that would be something else in my eyes
<lpvn>
gizmore, everytime you monkey patches something jesus cries
<mjc_>
freedom patching
Lewix has quit [Remote host closed the connection]
<platzhirsch>
Viva la revolution
<gizmore>
RubyPanther: yeah... i would like that to read "Peter likes Mary".substrUntil(' ');
<RubyPanther>
Monkey patching is not bad in Ruby, who heard of that? It is bad in some other language, I'm sure
sdelmore has quit [Quit: Leaving.]
<platzhirsch>
RubyPanther: it's plain rude
<RubyPanther>
gizmore: removing temp vars does not improve an algorithm
<gizmore>
RubyPanther: readability
<RubyPanther>
platzhirsch: compared to what , claiming standard Ruby patterns are bad... in Ruby?
<RubyPanther>
seems a slap in Matz' face to me
stonevil__ has quit [Ping timeout: 245 seconds]
<RubyPanther>
Monkey patching is good, because duck typing is divine
<platzhirsch>
RubyPanther: Depends on how it's encapsulated, doesn't it? If you distribute a library and it changes some stdlib classes conflicting with other monkey patched stuff?
<deepy>
Quack
<benzrf>
mlnkey patching is bad
<terrellt>
Monkey patching to override functionality is no good. I'm pretty okay with extending functionality though.
<benzrf>
*monkey
<benzrf>
there should be optionally scoped patching
<RubyPanther>
platzhirsch: as with everything else, yes, if you do it wrong, it sucks
<terrellt>
Making a new function on String? Sure, whatever.
<benzrf>
i.e. refinements
<platzhirsch>
I did heavy monkey patching in my machine learning class, because it made my code oh so readable
<echosystm>
lpvn: it's just a script that parses csvs and outputs json
sdelmore has joined #ruby
<platzhirsch>
RubyPanther: how do you do it right? I think the last I tried I failed
<RubyPanther>
for example you would add a method #to_foo not #to_f ;)
<platzhirsch>
banisterfiend said something about putting it into a module I think
bleak2 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
<RubyPanther>
platzhirsch: right, you put in a module, then monkey patch with the module
<platzhirsch>
and then dynamically executing the include if required
<gizmore>
class String
<gizmore>
def substrTo(to, default=nil)
<gizmore>
return self[0..i]
<gizmore>
return default if i.nil?
<gizmore>
i = self.index(to)
<gizmore>
end
<gizmore>
end
<lpvn>
echosystm, I think ruby hash is fast enough for you
<benzrf>
gizmore: why not 'return default unless i'
<RubyPanther>
you normally only add methods, not replace them, and when you do replace them, you use properly named method changing. You also ONLY use generic names like #to_s_with_platzhirsch and not #to_s_with_person
<gizmore>
benzrf: right... my favorite "unless"... the anti-if :)
bleak has joined #ruby
<gizmore>
benzrf: ahh... it can be 0?
<platzhirsch>
RubyPanther: yeah, I have never thought about that anyway
<lpvn>
RubyPanther, tenderlove talks about monkey patching in his last blog post
<RubyPanther>
these are the simple rules of thumb to monkey patch without stomping on the starmonkies
<platzhirsch>
lpvn: link
<RubyPanther>
lpvn: thanks, I'll go read it right away
pitzips has quit [Remote host closed the connection]
<echosystm>
lpvn: ive read hash lookups on a hash with 8,000 records takes around 6 seconds
<lpvn>
it's like singletons, it's a valid feature but something I'd rather not use
<echosystm>
which is o_O
<gizmore>
new ruby namespace stuff for monkeypatches are available... and "substrTo" is like nice convention
robustus has quit [Ping timeout: 245 seconds]
<echosystm>
would string indexes be slower than symbols for any reason?
<benzrf>
gizmore: only false and nil are false
<benzrf>
gizmore: 0, [], and so on are true
<gizmore>
benzrf: thanks!!
<benzrf>
np
<RubyPanther>
Okay, read it, and I agree, at least within the context of his (controversial) point; libraries doing lots of monkey patching can be confusing
<platzhirsch>
lpvn: yeah well, Rails is of course a whole other issue
bricker`work has quit [Ping timeout: 265 seconds]
<platzhirsch>
Rails does not care, it just takes
bricker__ has quit [Ping timeout: 252 seconds]
<gizmore>
benzrf: i do ruby since one year at work... like 500 hours now... and since i went ruby for private projects (1 month) ... i learned more than in the last year :P
<gizmore>
well not really true... i go deeper though ;)
<terrellt>
gizmore: y u slack at work?
<RubyPanther>
whereas if you explicitly release the monkeys inside an application, then it is less unclear.
<platzhirsch>
parasite, hosting into your code
<gizmore>
terrellt: the time pressure... not really art
<RubyPanther>
But even in a library, if you're only adding methods you don't create that confusion
obs has left #ruby [#ruby]
robustus has joined #ruby
<RubyPanther>
"substrTo" is improperly named for Ruby
<gizmore>
suggestions are welcome
ffranz has quit [Quit: Leaving]
<platzhirsch>
snake_case
<RubyPanther>
also it is 100% generic, somebody else adding a substr_to would get stomped. Better would be to name it #gizmore_substr
<gizmore>
what else would "substr_to" do?
<benzrf>
i need a new project..
<gizmore>
benzrf: work on my new irc bot
<gizmore>
"ricer"
<platzhirsch>
benzrf: Take one of your chairs and smash it on the ground
<RubyPanther>
You don't need to worry what it would do, you only need to worry if you're choosing a generic name or a non-generic name
<benzrf>
RubyPanther: i made a toy lisp in haskell that enforces purity unless you explicitly say not to
<benzrf>
WHERE IS YOUR GOD ONW
<benzrf>
*NOW
<lpvn>
echosystm, weird
<RubyPanther>
You won't know what other people will want and write
<platzhirsch>
lol
<gizmore>
benzrf: join #shadowlamb to see what i could do with a php irc bot
<benzrf>
i dont want anything to do with stuff in php
<gizmore>
me neither
<platzhirsch>
Why are people still writing IRC bots? Is this a god complex?
<benzrf>
that language gives me nightmares
ggherdov_ has quit [Changing host]
ggherdov_ has joined #ruby
ggherdov_ has quit [Changing host]
ggherdov_ has joined #ruby
<benzrf>
not unlike shadow lambs
mary5030 has joined #ruby
mlpinit has joined #ruby
ggherdov_ is now known as ggherdov
<RubyPanther>
benzrf: God is cat /dev/random
<gizmore>
benzrf: i coded the most awesome bot ever in php.... now i port it to ruby :)
<gizmore>
because i quit php... 28.dec.2013
<gizmore>
5 years wasted
saarinen has quit [Quit: saarinen]
<RubyPanther>
You think that is bad, I did 8 years of Perl and forgot it all in 2
<gizmore>
perl is at least powerful
<benzrf>
perl is worse than php
<gizmore>
like regex everywhere
nfk has quit [Quit: yawn]
<benzrf>
perl is designed to be the way it is
<RubyPanther>
It appears to be, I looked at my old code and wow, it seems to be doing a lot!
<gizmore>
in php you have 4 functions for regex
tkuchiki has joined #ruby
<gizmore>
2 are deprecated
<benzrf>
php is supposed to be elegant or whatever but the creators are incompetent
<benzrf>
bbiab
<gizmore>
one requires you to write an extra line for matches
benzrf is now known as benzrf|tagpro
<benzrf|tagpro>
-afk-
<RubyPanther>
perl is totally awesome, the problem is the Perl it wants as input
<gizmore>
then you need to call preg_get_errors to check if something is weird
<RubyPanther>
If your errors are pregnant, change your name and language
<gizmore>
indeed
jgoss has quit [Quit: Leaving]
<gizmore>
gizmore sticks, though
<platzhirsch>
Gizmo
jamesaanderson has joined #ruby
jrobertfox has quit [Remote host closed the connection]
<gizmore>
yeah, like that name :)
deception has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
itadder has joined #ruby
<itadder>
this is so cool this ruby meetup
<itadder>
I am at constant contact ruby meet up office
mary5030 has quit [Ping timeout: 245 seconds]
<platzhirsch>
itadder: where?
Radcircle has joined #ruby
<itadder>
NYC
<itadder>
china town
<platzhirsch>
itadder: Nice, I was there last summer
<itadder>
I am with the developers for constant contact they are huge ruby people
<itadder>
oh yea
<itadder>
I am also working on KOANS
<platzhirsch>
itadder: well, say hello from me. I am looking for a Ruby Job in NYC ;)
bradhe has joined #ruby
<lpvn>
hey guys, look at what I read today u.u
<itadder>
I think I want to make a Getting things done (task management, project mangaement ) app just for learning
<RubyPanther>
Radcircle: by storing times in UTC and then casting it with the time zones on every input/output
hamakn has joined #ruby
<benzrf|tagpro>
right
<Radcircle>
ok
jamesaanderson has quit [Ping timeout: 260 seconds]
<Radcircle>
thanks
allaire has quit []
centrx has joined #ruby
bleak has quit [Ping timeout: 245 seconds]
iamdoo2 has joined #ruby
mojjojo has quit [Quit: mojjojo]
zz_karupanerura is now known as karupanerura
<RubyPanther>
"So, instead of foo.endswith('bar'), you must use Perl syntax RegularExpression matching: foo =~ /bar$/ " d'oh! if you use the regex, you can just say foo[/bar\Z/]
`petey` has quit [Ping timeout: 245 seconds]
<RubyPanther>
The only time you "need" the Perlisms are for code golfing
nateberkopec has quit [Quit: Leaving...]
mikepack has joined #ruby
<centrx>
How old is that page if it doesn't know about String#end_with?
<pignata>
I've been squinting at it for several minutes with no ideas.
<RubyPanther>
it mentions the new behavior, I'm just addressing the old way and that he totally skipped the Rubyish way
rismoney has joined #ruby
<centrx>
pignata, Open your eyes wide and it will come to you
aspires has quit []
<pignata>
My eyes are so wide.
<RubyPanther>
also... 'RDoc-generated documentation sucks The gray backgrounds are too dark. Spotting a method name against medium gray is difficult' I'm assuming this is complement-by-faint-insult
<benzrf|tagpro>
pignata: reference equality
chrisseaton has joined #ruby
<lpvn>
pignata, you're mapping the variable letter to 15 numbers
i_s has joined #ruby
mikepack has quit [Ping timeout: 245 seconds]
<pignata>
yep. that makes total sense.
<lpvn>
as you succ! 15 times 'a' is now 'p'
uglybandersnatch has quit [Quit: Leaving.]
snath has quit [Ping timeout: 252 seconds]
wsandin has quit [Ping timeout: 276 seconds]
<pignata>
thanks! flawed assumptions on my part.
mando has quit [Ping timeout: 265 seconds]
crazymykl has quit [Quit: Konversation terminated!]
crazymykl has joined #ruby
dx7 has joined #ruby
_maes_ has joined #ruby
Dude007 has quit [Remote host closed the connection]
Dude007 has joined #ruby
whatasunnyday has joined #ruby
raphaelivan has joined #ruby
bradhe has joined #ruby
PixeIs is now known as Pixels
Pixels is now known as PixeIs
browndawg has joined #ruby
Guest67757 is now known as wang
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
araujo has quit [Remote host closed the connection]
wsandin has joined #ruby
wang is now known as Guest95957
allaire has joined #ruby
grzywacz has quit [Ping timeout: 260 seconds]
Guest95957 has quit [Changing host]
Guest95957 has joined #ruby
nari has joined #ruby
dx7 has quit [Ping timeout: 260 seconds]
i_s has quit [Ping timeout: 252 seconds]
fedesilva has quit [Remote host closed the connection]
snath has joined #ruby
jonahR has joined #ruby
Megtastique has quit []
bleak has joined #ruby
nszceta has quit [Remote host closed the connection]
habanany has quit [Quit: Leaving.]
habanany1 has joined #ruby
thomasxie has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
EngierkO has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
[krisbulman] is now known as krisbulman
stryek has joined #ruby
bradhe has quit [Remote host closed the connection]
<itadder>
anyone here use herko
fedesilva has joined #ruby
<itadder>
heroku
rm_ has quit [Read error: Connection reset by peer]
<centrx>
herkaderka
lagweezle has quit [Read error: Operation timed out]
<platzhirsch>
Hero
rm_ has joined #ruby
krisbulman is now known as krisbulman|afk
<deepy>
itadder: what's your question? also, there's a #heroku iirc
<gizmore>
def shortname
<gizmore>
c = self.class.name
<gizmore>
c.rsubstr_from('::') || c
<gizmore>
end
<itadder>
Ahh sorry
<itadder>
is it usefull to keep my ruby code in to start with
kenndel_ has quit [Read error: Connection reset by peer]
kenndel_ has joined #ruby
_mtr has joined #ruby
nateberkopec has joined #ruby
<gizmore>
does this work?
<gizmore>
class String
<gizmore>
def substr_to(to)
<gizmore>
self[0..i] if i = self.index(to)
<gizmore>
end
nari has quit [Ping timeout: 260 seconds]
<centrx>
which one
<gizmore>
the latter
<gizmore>
the first should work charmy :)
<centrx>
Maybe. I think it would be clear on two lines, setting i first
<centrx>
clearer
<gizmore>
i would prefer my optimization
bradhe has joined #ruby
araujo has joined #ruby
<gizmore>
it´s a super cute monkeypatch 5 liner...
<gizmore>
class String
astomp has joined #ruby
<gizmore>
def substr_to(to)
<gizmore>
self[0..i] if i = self.index(to)
<gizmore>
end
<gizmore>
end
mlpinit has quit [Remote host closed the connection]
<gizmore>
5 lines already... that´s like documenting version 1.0 in php 1.0
endash has quit [Ping timeout: 245 seconds]
<platzhirsch>
gizmore: stop pasting so many lines
<platzhirsch>
please
<gizmore>
it was handwritten
<platzhirsch>
lol, well then this is a total different matter
<gizmore>
i am learning ruby
<platzhirsch>
Who isn't
<gizmore>
the dead
<gizmore>
and the tards
jonah_k has quit [Remote host closed the connection]
<gizmore>
i should maybe look at python too
<deepy>
duck typing is neat
<benzrf|tagpro>
python is pretty cool
nanoyak has quit [Quit: Computer has gone to sleep.]
bleak has quit [Ping timeout: 245 seconds]
<benzrf|tagpro>
gizmore: must you be ableist
benzrf|tagpro is now known as benzrf
<platzhirsch>
gizmore: #python
<gizmore>
what worries me most is that many ruby people like python
<platzhirsch>
but don't lol there. They only lol in the basement, when no one can see it
<gizmore>
i am afraid my tab and spacebar are quirky
pr0ggie has quit [Ping timeout: 260 seconds]
<gizmore>
probably get syntax error there
<deepy>
Get Sublime Text
<benzrf>
ew
Shidash has quit [Ping timeout: 245 seconds]
<benzrf>
use vim
<gizmore>
i use sed
<benzrf>
vim or emacs
<benzrf>
anything else is pleb
<gizmore>
sed /^/module Ricer
<itadder>
I have an idea for a ruby app
<gizmore>
sed s/^/module Ricer
<deepy>
But anyways, all editors should put in 4 spaces when you hit tab
jlast has joined #ruby
<itadder>
WOuld it be possible to create a ruby based wrapper for omnifocus
kcombs has quit [Ping timeout: 260 seconds]
<gizmore>
sed s/(.*)$/g$1class Foo
raphaelivan has quit [Remote host closed the connection]
<gizmore>
itadder: yes
<itadder>
I use omnifocus a lot, but it it not webbased and runs only on my ipad or mac. I sync the database using omnifocus webdav server. Would that be a good project
raphaelivan has joined #ruby
mlpinit has joined #ruby
Dude007 has quit [Read error: Connection reset by peer]
<gizmore>
itadder: you maybe need RE?
Dude007 has joined #ruby
jonr22 has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
sepp2k has quit [Quit: Leaving.]
jonr22 has joined #ruby
mando has joined #ruby
chipotle has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
<platzhirsch>
RubyPanther: I am talking to a 13 year old, who totally freaked out when someone from #defocus sent an abuse report email to the free DynDNS service he uses where it clearly states you have to be over 18 to use their service. Now he went completely paranoid that he broke the law. Reminded me of the climate.com guy
mikepack has joined #ruby
<gizmore>
centrx: patentworthy!
<pontiki>
i am really pretty sure that 13yo is not responsible for the net connection, either
<RubyPanther>
platzhirsch: the climate.com guy was committing fraud, the kid was just violating terms of service
<pontiki>
what an arse
<platzhirsch>
RubyPanther: Do you think it was fraud?
<platzhirsch>
oh fraud, yeah right
<RubyPanther>
Clearly, unquestionably
mando has quit [Ping timeout: 265 seconds]
bleak has joined #ruby
<platzhirsch>
I found also found climate.com in the monthly Who is Hiring Thread on Hacker News
<RubyPanther>
He admitted to being a competitor who was trying to get into their office by posing as an applicant
<gizmore>
sounds also like threatening maybe
i_s has quit [Remote host closed the connection]
<platzhirsch>
RubyPanther: did he? It was quite confusing. I mean what would he do in their office?
<gizmore>
it could have been even worse... like bullying or mobbing
<itadder>
what is RE
<RubyPanther>
he says he was going to make a "pitch" that had already been rejected by mail or phone or something
<gizmore>
itadder: ReverseEngineering
Alina-malina has quit [Max SendQ exceeded]
<itadder>
oh
dr0ff has left #ruby [#ruby]
<gizmore>
itadder: or do you know the fmt? :P
<platzhirsch>
RubyPanther: I believe he just wanted to do an on-side/in person interview and they didn't want to skip the initial phone screening
<RubyPanther>
my opinion, he admitted to dishonestly he was probably trying to get a look inside their operations, which is why I emailed them
<gizmore>
itadder: apple stuff, no?
<itadder>
it from OMNIFOCUS
<RubyPanther>
I got a thank-you letter from a VP lol
<gizmore>
itadder: do you know the dataformat you wanna display?
<platzhirsch>
lol, really?
<gizmore>
itadder: like "thought4\r\nHack omnifocus\r\00\00"
maximski has quit []
<itadder>
I think it a flatfile database
diegoviola has joined #ruby
<itadder>
the dataform
<gizmore>
itadder: i think you could just try it out... if it is not... you can come back to me :)
machindo has quit [Quit: machindo]
<platzhirsch>
but climate.com is really just a software shop, too. You don't get intel by doing an on-site observation of a company
<platzhirsch>
Maybe he would have kicked someone's monitor down
<RubyPanther>
My view was, half the people in here do B2B consulting, and informing them helps protect the reputation of everybody who helps on IRC
<lpvn>
platzhirsch, who is the climate.com guy?
<platzhirsch>
RubyPanther: yeah absolutely, even if he told the truth, giving money so someone else does the interview is still not cool
<itadder>
yea
<platzhirsch>
lpvn: Cannot remember
<itadder>
I am not sure what dataformt it is
<itadder>
I belive .xml
<platzhirsch>
lpvn: jwhorto1
<RubyPanther>
We get kids in here offering pay for homework, I never try to turn them in I just laugh at them
<lpvn>
platzhirsch, wat
<platzhirsch>
Homework in Ruby? What's that? A Clown College
<RubyPanther>
Why wouldn't there be college classes in Ruby? Ruby has been around for decades
Voodoofish430 has quit [Quit: Leaving.]
<itadder>
"This is probably a little technical, but for the curious: OmniFocus uses compressed XML transaction files to store its data, with a SQL cache for efficient access. (Each time you update the application, we rebuild the SQL cache to ensure that it's consistent with the latest schema."
TheGreatDogesby has joined #ruby
<RubyPanther>
pontiki: pretty much anybody at their institute
Spami has quit [Quit: This computer has gone to sleep]
<platzhirsch>
It's too language specific. Basic classes use different languages. And in my graduate studies we were always free to use the language
<RubyPanther>
One was from Brazil
<platzhirsch>
doesn't make much sense to make it language specific, if you want to teach concepts
<RubyPanther>
People in "graduate studies" wouldn't be hiring help from IRC, they would have an existing cheating network
<platzhirsch>
but of course, obviously, there are always cases
<pontiki>
could be tech colleges
<platzhirsch>
pontiki: yep
<pontiki>
but it'd be strange to think of a tech college teaching ruby...
<platzhirsch>
RubyPanther: yeah exactly, I was just lamenting about my idealistic view of higher education. lol
<RubyPanther>
Right, first year tech school, people trying to get a piece of paper to get a job, who shouldn't even be near a keyboard. I figure they'll fail harmlessly on their own, cheating or not
<pontiki>
also, for some reason, i thought kids < 18
<RubyPanther>
No, if you're still in school you're still a "kid"
<pontiki>
yeah, i get it
papito has joined #ruby
<RubyPanther>
Also, if you're under 30 and not famous... kid ;)
<platzhirsch>
or as long as your parents live
<pontiki>
just that my daughter turned 27 today, is still in (grad) school
Hobogrammer has quit [Ping timeout: 245 seconds]
<pontiki>
it's hard to think of her as a kid
vlad_starkov has joined #ruby
<RubyPanther>
pontiki: not for everybody else :P
<pontiki>
i still remember being 27
<platzhirsch>
pontiki: country?
<pontiki>
us
<platzhirsch>
yeah ok
griffindy has quit [Ping timeout: 245 seconds]
<RubyPanther>
"college kids" is a standard term for "students" in the US
<pontiki>
she just finished her masters, is now working on phd
<pontiki>
idk, it's not set in stone
itadder has quit [Remote host closed the connection]
<platzhirsch>
that's cool
<lpvn>
pontiki, what's her field?
<pontiki>
social anthropology, focusing on prison reform
<platzhirsch>
sweet
<lpvn>
pontiki, (:
<RubyPanther>
That's true, the Turkmanbasi declared that Youth lasts until 37
lagweezle has joined #ruby
<platzhirsch>
pontiki: so ponbiki is your daughter here, isn't she?
<pontiki>
shaddap
<pontiki>
i have no idea who ponbiki is
Speed has quit [Ping timeout: 260 seconds]
<platzhirsch>
: D : D
browndawg has quit [Ping timeout: 245 seconds]
bleak has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
<pontiki>
soon i shall return to my old nick
<platzhirsch>
and what's that?
amclain has joined #ruby
pontiki is now known as tamouse__
<platzhirsch>
that's ridiculous, change back
<tamouse__>
just for that, i'm not
<platzhirsch>
pontiki is so much cooler. It reminds me of Hawaii
<bnagy>
bottom answer - just get the root ca certs and set an env var
<RubyTitmouse>
MJBrune: normally you use an option like :verify_mode => OpenSSL::SSL::VERIFY_NONE
jhn has joined #ruby
bleak has joined #ruby
<bnagy>
but I'm still surprised they don't do that for you with ruby installer. Weird.
<RubyTitmouse>
I've never ran any of my web crawlers on `doze, though
<bnagy>
I use jruby on windows, so no problem
<RubyTitmouse>
regardless of the interpreter, it is common to have to turn off verification
<bnagy>
for some values of 'have to'
<RubyTitmouse>
lol right
digifiv5e has quit [Quit: quit]
<RubyTitmouse>
"can't we just restrict our service to users who configured their domains properly?" "No, the ones who are all screwed up are going to spend the most money"
bklane has joined #ruby
sweettangerine_ has joined #ruby
<RubyTitmouse>
I really did have that conversation with a client, approximately
platzhirsch has quit [Ping timeout: 245 seconds]
i_s has quit [Ping timeout: 252 seconds]
danman has joined #ruby
<MJBrune>
RubyTitmouse: that should set it globally?
<RubyTitmouse>
MJBrune: No
eka has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<MJBrune>
bnagy: that link you gave for setting a system variable doesn't work
<MJBrune>
RubyTitmouse: I need to set it globally because I am using a gem that is throwing the error in it's call.
<MJBrune>
this isn't a rails thing
<RubyTitmouse>
I remember monkey patching it to set it globally years ago, then they added a configuration for it, then they took it away I think
<bnagy>
MJBrune: define 'doesn't work' more precisely
<MJBrune>
bnagy: I did the steps exactly added a system variable called SSL_CERT_FILE that points to that cacert.perm and reran my code. Obviously this library doesn't use that system variable to check or something.
chihhsin has joined #ruby
<RubyTitmouse>
MJBrune: http.verify_mode = OpenSSL::SSL::VERIFY_NONE # if you have the right Ruby version
<RubyTitmouse>
if you can get at the object
<MJBrune>
RubyTitmouse: http isn't a variable I can access.
<bnagy>
MJBrune: does the open-uri test they give work?
<RubyTitmouse>
You probably "can" since it is Ruby ;)
bradhe has quit [Remote host closed the connection]
wallerdev has joined #ruby
<firewater>
bnagy: Thanks, that is exactly the thing I think solves it.
<RubyTitmouse>
MJBrune: OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:verify_mode] = OpenSSL::SSL::VERIFY_NONE ####### BAD BAD BAD For educational purposes only ;)
<RubyTitmouse>
oh, man, I went to all that trouble and it is 2.0 lol
<bnagy>
MJBrune: if you don't have any nasty cexts I highly recommend jruby on windows
<beardofbees>
bnagy, i mistyped heh
<RubyTitmouse>
^ may or may not work on 2.x
bleak has joined #ruby
<bnagy>
openssl is a pile of crap in any case, and jruby has x64 support
<RubyTitmouse>
<3 openssl
<bnagy>
but there are some situations where you can't. Not many, ime, but some
<MJBrune>
bnagy: what is jruby?
bklane has quit [Remote host closed the connection]
<RubyTitmouse>
<3 MRI
bleak has quit [Read error: Connection reset by peer]
<beardofbees>
"all the objects will return false to the .nil? message except for the object nil itself, while the object using the == message will perform a tiny micro comparison with the other object to determine if it is the same object."
<Radcircle>
Circular dependency detected while autoloading constant
<bnagy>
MJBrune: it's a ruby interpreter implemented on the JVM
sweettangerine_ has left #ruby [#ruby]
troyready has quit [Ping timeout: 245 seconds]
<MJBrune>
bnagy: why?
<MJBrune>
bnagy: just so you can write java to interact with ruby?
<RubyTitmouse>
jruby is the sadness I get subjected to in order to get Ruby onto android
<bnagy>
because it's faster than MRI and has parallel threading
<bnagy>
you can use native java stuff, but you don't have to, it's just ruby
<MJBrune>
eh I have a hard time believing C bindings for ruby is slower than Java bindings for ruby
<bnagy>
well your personal incredulity aside, it's a fact
<bnagy>
the thing is, all the interpreters run a VM
<bnagy>
the JVM is a Good VM. The YARV VM is ... much improved
<bnagy>
but still not in the same league
bleak has joined #ruby
<chrisseaton>
MJBrune: a C extension that does something like allocate a hash, will always do that - it will always actually call malloc, but if you're in a powerful VM like the JVM, you can do things like elide allocations, even of a hash, saving lots of time
<MJBrune>
bnagy: really because I see that ruby 1.9 is faster than jruby.
<bnagy>
yewah no
<bnagy>
I have used both for 'heavy' stuff for many years, and it's almost impossible to create a test where MRI 1.9 will beat jruby
<centrx>
Unfortunately those kind of benchmarks are not very useful at showing real-wolrd performance
<RubyTitmouse>
The worst thing about jruby isn't even the jruby, but the FUD
<firewater>
When you set up a time object, do you have to include a year, month, day? Even though the only thing you want is hour:minutes:seconds? I am making an object, and put in fake numbers for the year month and date, but I feel there must be a cleaner way of doing this. Does anyone know?
platzhirsch has joined #ruby
mando has joined #ruby
<centrx>
MJBrune, And between different languages, the implementations of the benchmarks can be significantly diffferent
<firewater>
PS: Also, I know how to make it only print hours:minutes:seconds. But when making the object, that is where I feel there must be a way to get away with not including fake year and months stuff, no?
<bnagy>
I must be reading those benchmarks wrong, because it looks like jruby owns?
<MJBrune>
just saying, not here to fight about it. Just saying that I've provided data that contradicts the statements made.
Hanmac1 has joined #ruby
<bnagy>
like 3x faster on wall for mandelbrot?
<RubyTitmouse>
If you're serious about Ruby, the first thing to know is that many of the common gems are written in C
coderhs has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<RubyTitmouse>
And Java is not faster than C
<firewater>
Anyone know the answer to my question above :/?
mlpinit has quit [Remote host closed the connection]
<bnagy>
firewater: a time is a big number, it represents an exact point in time
<RubyTitmouse>
firewater: there is not a clean way, in general, to deal with dates and times in Ruby :/
<bnagy>
you can't strip any of it out
carif has quit [Quit: Ex-Chat]
<bnagy>
all the stuff about months and years is just human presentation fluff
<firewater>
Ok, I will just pad it with fake years, months, and days and leave the rest as editable.
<MJBrune>
very little is faster than C. Although arguing about speed in an intrepid language is kind of dumb to start with as we should just use lua if we are worried about milliseconds of speed.
Hanmac has quit [Ping timeout: 260 seconds]
<RubyTitmouse>
There is no standard support for intervals
binaryhat has joined #ruby
<RubyTitmouse>
MJBrune: no, we have mRuby for that ;) Matz had "lua envy" (his words)
mando has quit [Ping timeout: 252 seconds]
bleak has quit [Ping timeout: 252 seconds]
Zunonia has quit [Quit: Computer has gone to sleep.]
mercwithamouth has joined #ruby
rhys has quit [Ping timeout: 265 seconds]
<MJBrune>
RubyTitmouse: lol well I haven't seen mruby yet but it looks cool too.
<MJBrune>
either way jruby seems alright but not for me as I want to directly interface with ruby for the time being and not bind it into java.
Sid05 has left #ruby [#ruby]
rezzack has quit [Ping timeout: 245 seconds]
jrobertfox has joined #ruby
<bnagy>
jruby has nothing to do with java
firewater has quit [Quit: Page closed]
<bnagy>
it's just an interpreter on the vm. You don't build jars or any of that crap, it runs .rb files exactly the same as mri
agent_white has joined #ruby
Sid05 has joined #ruby
<lpvn>
chrisseaton, I've been told that sun hotspot java vm is the fastest vm ever, do you know if this is tu
<lpvn>
true?
<agent_white>
Evenin folks
<chrisseaton>
lpvn: that's not an easy question to answer - for what definition of 'fast' - you'd have to precisely define that first
jtdowney has joined #ruby
<MJBrune>
why use a VM if you are worried about speed though?
<chrisseaton>
lpvn: you can't compare VMs for different languages, as they have different semantics that require more or less work, irrespective of the VM implementation
<RubyTitmouse>
Nobody actually uses jruby for speed, that is just a talking point of the fans
<chrisseaton>
MJBrune: one advantage of a VM over compilation is that you can de-optimise - you can go back and recompile at runtime if the circumstances change - a program compiled with gcc cannot do that
juni0r has quit [Ping timeout: 245 seconds]
<MJBrune>
JVM is great for usability, portability and security. Not nessarily speed. It's not horrible at speed but I wouldn't make a video game in java. (inb4 minecraft gets brought up without deep knowledge of it's systems)
Radcircle has quit []
theleft has quit [Ping timeout: 260 seconds]
_reset has quit [Quit: Leaving...]
reset has joined #ruby
<bnagy>
RubyTitmouse: this conversation would be a lot more engaging if you gave any idea of knowing what you're talking about
<RubyTitmouse>
bnagy: [citation needed]
<RubyTitmouse>
maybe I do know what I'm talking about, eh?
<bnagy>
openssl is great. jruby is not faster than mri
<RubyTitmouse>
insults don't really add to it
<lpvn>
chrisseaton, I meant the VM that will generate the fastest binary but I got what you meant
Spami has quit [Quit: This computer has gone to sleep]
tjr9898 has joined #ruby
juni0r has joined #ruby
<bnagy>
RubyTitmouse: you may indeed, which is why I was just observing that there hasn't yet been an indication of it
<bnagy>
as opposed to actually saying it
<RubyTitmouse>
No need, it is just insult for no reason.
Dude007 has quit [Remote host closed the connection]
<centrx>
RubyAnimal prefers to talk about things he does not know about!
<RubyTitmouse>
as far as you know I love openssl because I've been using the technology since before there was an open source version of it
Dude007 has joined #ruby
<centrx>
Supposedly the openssl code base is a mess
jfelchner has quit [Quit: zzzzzzzzzzzzz………]
<RubyTitmouse>
Supposedly, but why would somebody be mucking in the source of their ssl lib? Is that even a good idea? what is the use case?
<bnagy>
having a secure ssl lib is a good use case?
papito has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
reset has quit [Ping timeout: 245 seconds]
bambanx has joined #ruby
<RubyTitmouse>
having a secure ssl lib is enhanced by not mucking with the source, and using a crufty old version (aka "stable")
<bnagy>
or one with sane defaults. Or sane cipher suites
<bambanx>
guys a easy way to convert html , css to pdf?
<RubyTitmouse>
bambanx: with a cli tool
<bnagy>
how would you propose fixing security bugs _other_ than 'mucking with the source'?
<RubyTitmouse>
what unpatched security bug is this?
<bambanx>
RubyTitmouse, can i do it for work in the browser?
<RubyTitmouse>
if the maintainers release updates in a timely manner might be more relevant
Dwarf has joined #ruby
<RubyTitmouse>
People who aren't the maintainers almost always will say "wtf" if they look at the code, Java code is no different in that regard
Dude007 has quit [Ping timeout: 245 seconds]
<slowcon_>
quick question about the .(dot) wildcard. will it return both results ( .question) (Tquestion) (ThisQuestion)
vlad_starkov has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby
itadder has joined #ruby
<bnagy>
slowcon_: check out rubular.com
itshandicapable has joined #ruby
<bnagy>
good resource for learning regex
<itadder>
hi
<itadder>
what is the rubykoans channel
<slowcon_>
bnagy: thanks dude
<itshandicapable>
I am moving from python to ruby how hard is the transition?
platzhirsch has left #ruby [#ruby]
<itadder>
gizmore: did you see what I posted eariler
<RubyTitmouse>
Matz chooses C, who is a better source of advice, you, or Matz? I vote Matz
<RubyTitmouse>
itshandicapable: They're both modern high level dynamic languages, they're practically interchangeable
zachallett has quit [Remote host closed the connection]
<itshandicapable>
Why did you choose ruby? :P
<itadder>
"This is probably a little technical, but for the curious: OmniFocus uses compressed XML transaction files to store its data, with a SQL cache for efficient access. (Each time you update the application, we rebuild the SQL cache to ensure that it's consistent with the latest schema." <---- would I be able to wrap this around in ruby
<itadder>
for when I am not on my mac or ipad or iphone
<itadder>
wrap around ruby + html or ruby on rails in the future
TheGreatDogesby has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 260 seconds]
<itadder>
it stinks I can not access omnifocus quickly on my pc AT work
<itadder>
I have to whip out my mac :)
`petey` has joined #ruby
<itshandicapable>
Question, is this the right channel for a new ruby developer?
<itadder>
centrx: oh I could not find a koans chanel
<itadder>
itshandicapable: it seems like it safe for newbie
<centrx>
Yeah I don't think there is one
<itshandicapable>
Ok thanks :)
<itadder>
but I might be wrong, but people been helpfull here
dx7 has joined #ruby
theleft has joined #ruby
tjr9898 has quit [Remote host closed the connection]
<itshandicapable>
Thanks for the reply
<slowcon_>
bnagy: ok so that won't work
iamdoo2 has joined #ruby
itshandicapable has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
s2013 has joined #ruby
krisbulman|afk is now known as [krisbulman|afk]
`petey` has quit [Ping timeout: 260 seconds]
<s2013>
https://gist.github.com/ss2k/5e81e2097260cc9471bd i need to turn the top one into a hash like the bottom one. i can do this but i feel the way im doing is highly inefficient by doing a split on "\r" and then split on ":" and also deleting "\n"
<s2013>
can someone suggest another way?
dx7 has quit [Ping timeout: 245 seconds]
[krisbulman|afk] is now known as krisbulman
<bnagy>
not really
<bnagy>
I'd split on \r\n then on : then use Hash[]
fedesilva has quit [Remote host closed the connection]
<bnagy>
but I don't see how you're going to get your keys exactly like that without specific logic
habanany1 has quit [Ping timeout: 265 seconds]
<bnagy>
cause you have the first word of CB Date and the last word of Ground Wiring
SCommette has joined #ruby
<s2013>
well i was doing that by manually adding the keys and going through an array after splitting on th e:
e^0 has joined #ruby
<s2013>
when i split on ":" it createsa 2d array
<s2013>
so i loop through it, getting the second value of each array if that makes sense
iamdoo2 has quit [Ping timeout: 260 seconds]
mando has joined #ruby
<bnagy>
if you know the keys in advance then you can use zip
<s2013>
you sure zip would work here?
<bnagy>
yes
<s2013>
zip on the [1] and the keys?
<slowcon_>
bnagy: what if i put the wildcard inside a regular expression
<bnagy>
s.lines.map(&:chomp).map {|e| e.split(': ').last} will get you just the values
<s2013>
o
digifiv5e has joined #ruby
<s2013>
true
<bnagy>
so it would be Hash[keys.zip(values)]
mlpinit has joined #ruby
digifiv5e is now known as Guest24279
<s2013>
i need to actually add other stuff to the hash, but its not from that text
<bnagy>
slowcon_: I have no idea what question you're asking
sski has quit [Remote host closed the connection]
chrisseaton has quit []
sski has joined #ruby
<s2013>
but that helps bnagy .thanks
mando has quit [Ping timeout: 265 seconds]
cpruitt has joined #ruby
<slowcon_>
question about the .(dot) wildcard and regular expressions. can i put the wildcard into a regular expression to make it multi character?
<bnagy>
yes, use .*
<bnagy>
or .+
bambanx has quit [Quit: Saliendo]
<bnagy>
or ...... or .{2,3}
mgdixon has quit [Ping timeout: 245 seconds]
ics has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Noldorin has quit []
e^0 is now known as sudo
<slowcon_>
i like .* or .+
<slowcon_>
thanks man
mlpinit has quit [Ping timeout: 260 seconds]
<bnagy>
they all do different things, all of which are explained on that website
<s2013>
bnagy, how do i add something to the beginning of a hash
v0n has joined #ruby
<bnagy>
s2013: add it first
<s2013>
and then?
<slowcon_>
bnagy: agh i see now. 0 or more = .*
<bnagy>
that's it, hashes are ordered now ( for better or worse )
mocfive has quit [Remote host closed the connection]
sski has quit [Ping timeout: 252 seconds]
<s2013>
no i want to add to the beginning
<bnagy>
you can't
<s2013>
oh
<s2013>
gotcha
sski has joined #ruby
<bnagy>
you can make a new hash and add your thing first - but if you're using hash order you're probably Doing It Wrong imho
mocfive has joined #ruby
mocfive has quit [Remote host closed the connection]
<s2013>
i guess i can merge 2 hashes
<s2013>
yeah that would work. thanks
Tentra has joined #ruby
hamakn has joined #ruby
Zunonia has joined #ruby
mehlah has quit [Quit: Leaving...]
danman has quit [Read error: Connection reset by peer]
griffindy has quit [Quit: Computer has gone to sleep.]
mgdixon has joined #ruby
danman has joined #ruby
jaimef has quit [Excess Flood]
angusiguess has joined #ruby
hamakn has quit [Ping timeout: 245 seconds]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xcv has joined #ruby
Zunonia has quit [Ping timeout: 245 seconds]
postmodern has quit [Quit: Leaving]
Wolland has joined #ruby
smtp has quit []
`petey` has joined #ruby
hamakn has joined #ruby
krisbulman is now known as [krisbulman]
danman has quit [Quit: danman]
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
mando has joined #ruby
hamakn_ has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
robbyoconnor has quit [Ping timeout: 260 seconds]
angusiguess has quit [Ping timeout: 260 seconds]
brennanMKE has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
jonah_k has joined #ruby
chipotle has quit [Quit: cya]
cpruitt has quit [Quit: cpruitt]
brennanM_ has quit [Ping timeout: 260 seconds]
bitcycle has joined #ruby
sudo has quit [Quit: WeeChat 0.4.2]
jaimef has joined #ruby
werdnativ has quit [Quit: werdnativ]
`petey` has quit []
LaPetiteFromage has joined #ruby
LaPetiteFromage has left #ruby [#ruby]
coderhs has quit [Ping timeout: 245 seconds]
hamakn has quit [Read error: Connection reset by peer]
whatasunnyday has quit [Quit: whatasunnyday]
venkat has quit [Remote host closed the connection]
hamakn has joined #ruby
venkat has joined #ruby
radic has quit [Ping timeout: 272 seconds]
bitcycle has quit [Ping timeout: 245 seconds]
werdnativ has joined #ruby
tylersmith has joined #ruby
bleak has joined #ruby
ixti has quit [Ping timeout: 260 seconds]
carif has joined #ruby
Atrumx has joined #ruby
robbyoconnor has joined #ruby
radic has joined #ruby
estebistec has quit [Remote host closed the connection]
Hobogrammer has joined #ruby
vpretzel has joined #ruby
shadoi has quit [Quit: Leaving.]
shadoi has joined #ruby
venkat has quit [Ping timeout: 245 seconds]
cpruitt has joined #ruby
yacks has joined #ruby
rickruby has joined #ruby
* centrx
shadoi has quit [Ping timeout: 260 seconds]
mary5030 has joined #ruby
braincrash has quit [Quit: bye bye]
soba has joined #ruby
Es0teric has joined #ruby
braincrash has joined #ruby
xcv has quit [Read error: Connection reset by peer]
xcv has joined #ruby
xcv has quit [Read error: Connection reset by peer]
xcv_ has joined #ruby
Zunonia has joined #ruby
danshultz has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
saarinen has joined #ruby
coderhs has joined #ruby
coderhs has quit [Read error: Connection reset by peer]
<tamouse__>
centrx: you what?
Sid05 has quit [Quit: Leaving.]
jonahR has quit [Quit: jonahR]
soba has left #ruby ["See you..."]
CaptainJet has quit []
xcv_ has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
* centrx
dx7 has joined #ruby
saarinen has quit [Client Quit]
xcv has joined #ruby
xcv has quit [Remote host closed the connection]
xcv has joined #ruby
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tyl has joined #ruby
dx7 has quit [Ping timeout: 252 seconds]
maroloccio has quit [Quit: WeeChat 0.4.2]
<tamouse__>
hashes are ordered now??
xcv has quit [Ping timeout: 245 seconds]
mgberlin has joined #ruby
tyl has quit [Client Quit]
<mgberlin>
can someone point me to a cannonical definition of === ?
CourtJesterG has joined #ruby
<mgberlin>
or otherwise explain what it is?
iamdoo2 has joined #ruby
jamto11 has joined #ruby
bthesorceror has quit [Remote host closed the connection]
bthesorceror has joined #ruby
uglybandersnatch has joined #ruby
venkat has joined #ruby
bthesorceror has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
zachallett has joined #ruby
iamdoo2 has quit [Ping timeout: 245 seconds]
e^0 has joined #ruby
nomenkun has quit [Remote host closed the connection]
<tamouse__>
it means "equality" but it's specific definition depends on which class is implementing it
mgberlin has quit [Quit: mgberlin]
<RubyTitmouse>
equal-ish
<tamouse__>
yep
nomenkun has joined #ruby
nomenkun has quit [Remote host closed the connection]
mgberlin has joined #ruby
<tamouse__>
doing ri === should show all the various definitions
postmodern has quit [Client Quit]
<tamouse__>
so, essentially, there is no cannonical definition
venkat has quit [Ping timeout: 245 seconds]
Atrumx has quit [Ping timeout: 240 seconds]
<RubyTitmouse>
it is =='s junk drawer ;)
mlpinit has joined #ruby
zachallett has quit [Ping timeout: 245 seconds]
<tamouse__>
hee
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
xiphias has joined #ruby
xiphias is now known as xiphiasx_
JohnBat26 has joined #ruby
itadder has quit [Remote host closed the connection]
binaryhat has quit [Quit: Leaving]
mlpinit has quit [Ping timeout: 245 seconds]
Shidash has joined #ruby
bradhe has joined #ruby
iamdoo2 has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
tjr9898 has joined #ruby
freerobby has quit [Quit: Leaving.]
RSTJNII has quit [Read error: Connection reset by peer]
rm_ has quit [Read error: Connection reset by peer]
rm_ has joined #ruby
Bumptious has joined #ruby
werdnativ has quit [Quit: werdnativ]
jlast has quit [Remote host closed the connection]
angusiguess has joined #ruby
venkat has joined #ruby
lnormous has joined #ruby
rickruby has quit [Remote host closed the connection]
mgdixon has quit [Ping timeout: 260 seconds]
e^0 has quit [Quit: WeeChat 0.4.2]
e^0 has joined #ruby
rickruby has joined #ruby
s2013 has quit [Quit: Leaving]
ner0x has quit [Quit: Leaving]
angusiguess has quit [Ping timeout: 252 seconds]
mgberlin has quit [Quit: mgberlin]
agjacome has quit [Ping timeout: 265 seconds]
tfittsy has joined #ruby
io has joined #ruby
io is now known as Guest18767
<Guest18767>
which is the most toughest/complex concept of ruby programming to understand?
bleak has quit [Read error: Connection reset by peer]
e^0 has quit [Quit: WeeChat 0.4.2]
e^0 has joined #ruby
mando_ has joined #ruby
<tfittsy>
if I have a hash like {:block => 1, :total => 235.98} where blocks go from 1-48 and totals can be almost anything, is there a simple way to collect the block and sum the previous totals so that the number I collect for block2 = block 1's total + block 2's total, and block 3's is the sum of all 3?
levity_island has joined #ruby
rickruby has quit [Remote host closed the connection]
levity_island has quit [Client Quit]
e^0 is now known as e^0_
Deele has joined #ruby
e^0_ has quit [Client Quit]
Guest18767 has quit [Client Quit]
mando has quit [Ping timeout: 265 seconds]
bleak has joined #ruby
<tfittsy>
figured it out
tfittsy has left #ruby [#ruby]
mocfive has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
rickruby has joined #ruby
jrist has quit [Read error: Connection reset by peer]
diegoviola has quit [Ping timeout: 260 seconds]
mgdixon has joined #ruby
yasushi has joined #ruby
<agent_white>
tfittsy: Post what you found! I was interested!
Hanmac1 has quit [Ping timeout: 252 seconds]
yasushi_ has joined #ruby
aagdbl has joined #ruby
theleft has quit [Ping timeout: 260 seconds]
dx7 has joined #ruby
fieldfirst has joined #ruby
Hanmac has joined #ruby
yasushi has quit [Ping timeout: 260 seconds]
fuhgeddaboudit has joined #ruby
kate_r has joined #ruby
vlad_starkov has joined #ruby
iamsean has joined #ruby
fgo has quit [Ping timeout: 245 seconds]
dx7 has quit [Ping timeout: 265 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
sensen has joined #ruby
venkat has quit [Read error: Connection reset by peer]
artm has joined #ruby
venkat has joined #ruby
browndawg has quit [Ping timeout: 245 seconds]
Hanmac1 has joined #ruby
yarou has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 245 seconds]
fieldfirst has quit [Ping timeout: 260 seconds]
danshultz has joined #ruby
yacks has quit [Quit: Leaving]
wca has quit [Ping timeout: 252 seconds]
Megtastique has joined #ruby
Megtastique has quit [Client Quit]
sski has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
centrx has quit [Quit: Leaving]
danshultz has quit [Read error: Operation timed out]
enape_101 has quit [Ping timeout: 245 seconds]
kenndel_ is now known as kenndel
mocfive has quit [Remote host closed the connection]
<derek_c>
so, there is not a function like object that you can call like foo()?
Lewix has joined #ruby
jsilver has quit [Ping timeout: 260 seconds]
dik_dak has quit [Quit: Leaving]
dseitz has joined #ruby
felixjet has quit [Read error: Connection reset by peer]
felixjet has joined #ruby
venkat has quit [Read error: Connection reset by peer]
venkat has joined #ruby
<lpvn>
derek_c, in ruby functions are not first class citizens, this means they aren't like functions in javascript where you can assign them to variables and etc
cpruitt has quit [Quit: cpruitt]
weeb1e_ has quit [Read error: Connection reset by peer]
weeb1e has joined #ruby
fieldfirst has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
bigkevmcd has quit [Ping timeout: 252 seconds]
<Mon_Ouie>
>> x = method(:puts); x.call("Hello, world!")
<eval-in>
Mon_Ouie => undefined local variable or method ` x' for main:Object (NameError) ... (https://eval.in/98401)
<Mon_Ouie>
>> x = method(:puts); x.call("Hello, world!")
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
craigp has joined #ruby
<Mon_Ouie>
The syntax only allows foo() to be a call to the method called foo, regardless of what variables are there, but you can still manipulate methods and procs to do whatever you want, it's just a syntax difference
JasmeetQA has joined #ruby
x77686d has quit [Quit: x77686d]
Renich has left #ruby [#ruby]
gja has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
<lpvn>
Mon_Ouie, I suspect that derek_c wants to know if you can manipulate methods as if they were first class citizens and the answer is no
himsin has joined #ruby
<Mon_Ouie>
But you can
<Mon_Ouie>
You can assign them to variable, call them, return them, pass them as arguments to other methods, etc.
bradhe has quit [Ping timeout: 260 seconds]
<Mon_Ouie>
The one thing you can't do is call them using the regular syntax foo()
<lpvn>
Mon_Ouie, you can wrap them with the method method but they aren't first class
<lpvn>
you can't do something like a = def hello; puts 'hello' end; a()
mando_ has quit [Remote host closed the connection]
<Mon_Ouie>
method(def hello; …; end) — the only problem in that code is the way you call it and the fact def doesn't evaluate to a method
mando has joined #ruby
iamdoo2 has quit [Remote host closed the connection]
giantdildo has quit []
<lpvn>
Mon_Ouie, def doesn't evaluate to an object because it's not an object, methods aren't first class citizens
<Mon_Ouie>
What definition of first-class are you using?
<Mon_Ouie>
Wikipedia's is "this means the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structure"
<lpvn>
Mon_Ouie, I mean yeah you can reference methods and bind them to other classes but they are not like functions in javascript
ktosiek has joined #ruby
<Mon_Ouie>
Sure, but the difference is mostly syntax — it doesn't stop you from accomplishing anything. The point of them being first class is that you can manipulate them.
tagrudev has joined #ruby
mando has quit [Ping timeout: 265 seconds]
pwh has quit []
saarinen has joined #ruby
mlpinit has quit [Ping timeout: 260 seconds]
kenndel_ has quit [Read error: Connection reset by peer]
kenndel_ has joined #ruby
SirFunk- has quit [Remote host closed the connection]
<lpvn>
Mon_Ouie, I didn't say that methods in ruby stop you from accomplishing things, the fact though is that they aren't objects and this is an important design decision
saarinen has quit [Client Quit]
phansch has joined #ruby
monkegjinni has joined #ruby
mengu has joined #ruby
<Mon_Ouie>
I'm no arguing that, I'm arguing the fact they're still first-class data.
<erGoline>
Hi :) I need to recover from a backup a subset of data that have some associations, any help please? My setup: Ruby 1.8 + Rails 2.3 + Activerecord + Postgres
whatasunnyday has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
venkat has joined #ruby
baroquebobcat has joined #ruby
venkat has quit [Client Quit]
mikecmpbll has quit [Quit: i've nodded off.]
r0bby_ has quit [Ping timeout: 260 seconds]
rubyracer has quit [Quit: Konversation terminated!]
aganov has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RubyTitmouse>
erGoline: how many different models/tables?
mlpinit has joined #ruby
relix has joined #ruby
pen has quit []
<erGoline>
RubyTitmouse: ~ 7
apeiros has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Remote host closed the connection]
<RubyTitmouse>
erGoline: what I would probably do is to restore the backups into differently named tables, then for each table figure out the SELECT needed to get the data, then UPDATE FROM that, but you'd have to do it 7 times
<RubyTitmouse>
and in the right order
<erGoline>
RubyTitmouse: using this method I have to recreate the relations manually because the ids will change
mlpinit has quit [Ping timeout: 260 seconds]
slowcon_ has quit [Quit: slowcon_]
<RubyTitmouse>
erGoline: why would they change?
<erGoline>
RubyTitmouse: probably I will take this approach but it would be interesting to have a way to cherry-pick data from a database and copy to another one
mikecmpbll has quit [Quit: i've nodded off.]
jrobertfox has quit [Remote host closed the connection]
<RubyTitmouse>
erGoline: you can with dblink
<bgy>
Hi
bradhe has quit [Remote host closed the connection]
olivier_bK has joined #ruby
<erGoline>
RubyTitmouse: ah yes, you are right, I can force the same ids, sorry
<RubyTitmouse>
yeah, with UPDATE it is easier than with INSERT :)
<erGoline>
RubyTitmouse: yes I read something about it...
bradhe has joined #ruby
<RubyTitmouse>
with dblink you can connect a backup db, but it is probably not the best time to learn about it with live data
malthe has joined #ruby
<erGoline>
RubyTitmouse: the *exact* reason I put it in the read later list ;)
<erGoline>
RubyTitmouse: I'm preparing the backup db to try the pg_restore method, do you think it could work?
sk87 has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
blaxter_ has joined #ruby
<RubyTitmouse>
erGoline: it could work... I'd make a full export first and do a trial run there
Bumptious has quit [Remote host closed the connection]
Bumptious has joined #ruby
troessner has joined #ruby
rootshift has joined #ruby
greenarrow has joined #ruby
fgo has quit [Remote host closed the connection]
fantasticsid has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
phansch has joined #ruby
eka has joined #ruby
Bumptious has quit [Remote host closed the connection]
jlebrech has joined #ruby
Bumptious has joined #ruby
<erGoline>
RubyTitmouse: I use => I could use, the gist is not mine ;)
<RubyTitmouse>
erGoline: good luck, I have to sleep now :)
<erGoline>
RubyTitmouse: good night! thank you for the help :)
jackneill has joined #ruby
Al___ has joined #ruby
Shidash has quit [Ping timeout: 260 seconds]
<tamouse__>
*sigh*
mando has joined #ruby
Sp4rKy_ has quit [Quit: leaving]
Sp4rKy has joined #ruby
iamdoo2 has joined #ruby
timonv has joined #ruby
apeiros has joined #ruby
* agent_white
dances
nettoweb has joined #ruby
eka has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<agent_white>
I like how programming makes you learn about the most random stuff.
mando has quit [Ping timeout: 252 seconds]
asmodlol has joined #ruby
<agent_white>
I really have had no interest in stock markets, but I'm building my first 'collaborative' rails app with another noob; thus, I learn how to stocks!
banister has joined #ruby
<agent_white>
Rather, we are building some 'personal-stock-watcher-thing'. So now, learn stocks!
stewartmatheson has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
claymore has quit [Quit: Leaving]
user258467 has joined #ruby
blaxter_ is now known as blaxter
nhhagen has joined #ruby
bradhe has joined #ruby
timonv has quit [Ping timeout: 260 seconds]
bradhe has quit [Ping timeout: 260 seconds]
timonv has joined #ruby
stonevil__ has joined #ruby
iamdoo2 has quit [Remote host closed the connection]
shanlar has quit [Read error: Connection reset by peer]
heftig has joined #ruby
mikecmpbll has joined #ruby
PLejeck has quit [Ping timeout: 272 seconds]
atmosx has joined #ruby
<atmosx>
hello
timonv has quit [Read error: Connection reset by peer]
asmodlol has quit [Remote host closed the connection]
jamto11 has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
timonv has joined #ruby
elaptics`away is now known as elaptics
asmodlol has joined #ruby
PLejeck has joined #ruby
RoxasShadowRS has joined #ruby
grzywacz has joined #ruby
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nvrch has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
browndawg has quit [Ping timeout: 265 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
cusco has left #ruby [#ruby]
CourtJesterG has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
xiphiasx_ has quit [Read error: Connection reset by peer]
xiphiasx1 has joined #ruby
banister has joined #ruby
dx7 has joined #ruby
ramblex has joined #ruby
Xiti` has joined #ruby
weems has quit [Read error: Connection reset by peer]
danshult_ has joined #ruby
mengu__ has joined #ruby
mengu__ has quit [Remote host closed the connection]
himsin has quit [Quit: himsin]
Xiti` has quit [Client Quit]
nettoweb has joined #ruby
danshultz has quit [Ping timeout: 272 seconds]
xcv has joined #ruby
mengu has quit [Ping timeout: 272 seconds]
Xiti has quit [Ping timeout: 272 seconds]
craigp_ has joined #ruby
stonevil_ has quit [Quit: Computer has gone to sleep.]
nomenkun has quit [Remote host closed the connection]
shabgard has joined #ruby
craigp has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
jovon has joined #ruby
stonevil__ has joined #ruby
jsilver_ has quit [Read error: Connection reset by peer]
ratcorz has joined #ruby
jsilver has joined #ruby
browndawg has joined #ruby
mando has joined #ruby
ratcorz is now known as PINGwin4IK
phutchins has quit [Ping timeout: 245 seconds]
craigp_ has quit [Read error: Connection reset by peer]
craigp has joined #ruby
dblessing has joined #ruby
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mando has quit [Ping timeout: 265 seconds]
wallerdev has joined #ruby
nomenkun has joined #ruby
pwh has joined #ruby
Azure has quit [Ping timeout: 260 seconds]
eka has joined #ruby
atmosx has joined #ruby
jtdowney has quit []
v0n has quit [Ping timeout: 245 seconds]
SCommette has joined #ruby
Azure has joined #ruby
puppeh has joined #ruby
<puppeh>
I was using chruby but I also now compiled and installed my own ruby. Now when I'm inside my rails app and I do something like $ bundle exec etc.... the ruby I installed with chruby is used instead
nszceta has joined #ruby
<puppeh>
but when I do $ ruby -v the one that I compiled is used
<puppeh>
also when I do a $ gem list I see all the gems that was present in my chruby installation
stringoO has joined #ruby
<puppeh>
any ideas?
v0n has joined #ruby
<jhass>
try chruby_use /usr/local/bin/ruby (or wherever your own ruby is)
marcgg_ has joined #ruby
enebo has joined #ruby
axsuul has joined #ruby
<puppeh>
jhass: I get chruby: /usr/local/bin/ruby/bin/ruby not executable
<jhass>
what's your which ruby then?
<puppeh>
it seems I should do chruby_use /usr/local
<puppeh>
that works
<jhass>
oh yeah, it was just the prefix then
<puppeh>
ok
<puppeh>
now I get the openssl error
<puppeh>
it seems I must compile ruby with providing the dir of my openssl installation (I installed using RVM)
<puppeh>
I mean brew sry
pwh has quit []
Davey has joined #ruby
dtcrshr has joined #ruby
acrussell has joined #ruby
marcgg has quit [Ping timeout: 265 seconds]
kaldrenon has joined #ruby
<puppeh>
nah I still get /usr/local/lib/ruby/2.1.0/net/https.rb:22:in `require': cannot load such file -- openssl (LoadError)
<puppeh>
when doing $ bundle exec rails runner 'puts RUBY_VERSION'
chipotle has joined #ruby
nomenkun has quit [Remote host closed the connection]
<jhass>
don't know the specifics on OS X but that means ruby couldn't find openssl (or the necessary dev headers) at compile time
momomomomo has joined #ruby
mengu has joined #ruby
tonni has quit [Remote host closed the connection]
samtuke has joined #ruby
<puppeh>
jhass: but it compiled just fine
<puppeh>
no errors at compile time
<jhass>
sure, compiling ruby without openssl support is a valid thing
tonni has joined #ruby
<samtuke>
Hi, on Linux, I can't get any gems to work. Reinstalled ruby, gubygems, and rvm, but after successful "gem install foo" I get require errors and failed execution. How to debug?
SCommette has quit [Quit: SCommette]
<puppeh>
jhass: but I did $ ./configure --with-openssl-dir=/usr/local/Cellar/openssl/1.0.1f/
<puppeh>
and then I compiled it
fedesilva has joined #ruby
<puppeh>
and I saw the "configuring openssl..." message when it was compiling
<jhass>
samtuke: check that bundler doesn't interfere, that gem env at gem install and at execution time match, etc
makara has quit [Read error: Operation timed out]
chipotle has quit [Ping timeout: 260 seconds]
dp has joined #ruby
deception has joined #ruby
_bart has quit [Remote host closed the connection]
bricker`LA has joined #ruby
tonni_ has joined #ruby
tonni has quit [Read error: Connection reset by peer]
jerius has joined #ruby
yfeldblum has joined #ruby
allaire has joined #ruby
freerobby has joined #ruby
aboudreault has quit [Ping timeout: 252 seconds]
<samtuke>
jhass, right so it seems they dont. in order to install a gem I have to use sudo, and sudo gem env shows v. 2.0.0, and gem path = /usr/local/share/gems, whereas at execution time its 1.8.24 and /usr/local/rvm/gems/ruby-1.9.3-p327. How do I realign these?
digifiv5e has joined #ruby
<jhass>
samtuke: get rid of your RVM installation and reinstall as your normal user, not as root. it's just too hard to get right as root
<dp>
I'm reading a file line by line checking for a regex match. once a match is found, I want to stop reading, and see what the match was. why doesn't this do that? http://paste2.org/KJJG7wPw
<lpvn>
samtuke, don't use sudo if you're using rvm
_bart has joined #ruby
kpshek has quit []
snooc has joined #ruby
bricker`LA has quit [Ping timeout: 248 seconds]
jrist has joined #ruby
glanotte has joined #ruby
<jhass>
dp: s will never be set, a block does inherit variables in the scope it's defined in, but it can't define new variables into it (easily)
maroloccio has joined #ruby
Czupa has joined #ruby
claymore has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<dp>
jhass: I can move the puts line inside the first if; but how do I stop reading said files' lines?
sski has quit [Remote host closed the connection]
sk87 has joined #ruby
sski has joined #ruby
<nhhagen>
what is the difference between enumerable find_all and select?
Speed has joined #ruby
sailias has joined #ruby
pabloh has quit [Read error: Operation timed out]
bradhe has joined #ruby
Speed is now known as Guest46038
<jhass>
hm, you could just break out of it, I'd probably just file.each_line do |line| s = line.match(/foo/); next unless s; whatever(line); break; end
pabloh has joined #ruby
irc_help has quit [Ping timeout: 245 seconds]
<waxjar>
dp: File is an Enumerable, so you can just use #find or #select
<jhass>
waxjar: he wants the match though, not the line where it matches
nateberkopec has quit [Quit: Leaving...]
<waxjar>
nhhagen: they're aliases :)
hamakn has joined #ruby
Czupa has quit [Client Quit]
yasu__ is now known as yasu
allaire has quit []
<nhhagen>
waxjar: great to know, doc said the same things about them so, I was wondering if there were any implementation differences
<dp>
jhass: looks like that works perfectly. thanks
hamakn_ has quit [Ping timeout: 265 seconds]
efra has quit [Ping timeout: 265 seconds]
LekeFly has joined #ruby
sski has quit [Ping timeout: 260 seconds]
switchspan has joined #ruby
efra has joined #ruby
chaos__ is now known as soahccc
* soahccc
tuned some dubstep and cat suddenly started to purr
bradhe has quit [Ping timeout: 260 seconds]
Wolland has joined #ruby
<momomomomo>
soahccc: that's disturbing
v0n has quit [Ping timeout: 245 seconds]
<soahccc>
I just have to imagine the dubstep cat on youtube :D But I can't do this with my one without loosing a finger
nateberkopec has joined #ruby
mmcclimon has joined #ruby
lxsameer has quit [Quit: Leaving]
papito has joined #ruby
Megtastique has joined #ruby
shaunbaker has joined #ruby
griffindy has quit [Quit: Computer has gone to sleep.]
aboudreault has joined #ruby
shaunbaker has quit [Remote host closed the connection]
shaunbaker has joined #ruby
artm has quit [Ping timeout: 265 seconds]
nateberkopec has quit [Client Quit]
<samtuke>
jhass, I ran "gem uninstall rvm" as root and my user, and also yum removed rvm, but still "rvm" command works as my user, prints copyright notice. Any ideas how it's still installed?
vlad_starkov has joined #ruby
<jhass>
any idea how you have installed it?
<jhass>
maybe try rvmsudo implode
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
papito has quit [Ping timeout: 252 seconds]
papito_ has joined #ruby
chrisseaton has joined #ruby
kpshek has joined #ruby
sambao21 has joined #ruby
<samtuke>
jhass, unfortunately can't remember. Output of that command is: sudo: implode: command not found
<lpvn>
dp, f = File.new('bar.txt'); line = f.readline while (line =~ /bar/).nil?; puts line
<jhass>
eh, rvmsudo rvm implode? or sudo rvm implode? or just rvm implode?
Thanatermesis has joined #ruby
zoscoy has joined #ruby
<jhass>
lpvn: don't forget f.close that way, and it's basically reimplementing .find, he still wants the match not the line
failshell has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
<lpvn>
jhass, I just wanted to get rid of your next
mikepack has joined #ruby
<samtuke>
jhass, thanks, yes rvm implode is looking good (under root rvm is not found). got permission problems but see if I can fix them...
PINGwin4IK has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
Kricir has joined #ruby
<dachi_>
Hi. Is there any article I can read about use cases of /bin/my_ruby_application versus rake tasks?
<dachi_>
When do I use one and when do I use another...
<lagweezle>
My suspicion is that bin/* is for running, and rake tasks are for building/packaging/deploying
<soahccc>
dachi_: I think application tasks are usually put into rake tasks. I only know the bin directory from gems and binstubs
jamto11 has quit [Remote host closed the connection]
stonevil__ has quit [Ping timeout: 246 seconds]
jtdowney has joined #ruby
yalue has joined #ruby
teddyp1cker has joined #ruby
LadyRainicorn has quit [Ping timeout: 245 seconds]
<dachi_>
I mean, I made a gem, and people can require tasks by creating Rakefile, adding require 'my_gem/tasks' and executing bundle exec my_gem:version.. but same could have been done by just executing my_gem --show-me-version for example..
noop has quit [Ping timeout: 265 seconds]
yarou has quit [Remote host closed the connection]
Davey has quit [Read error: Connection reset by peer]
papito_ has quit [Ping timeout: 245 seconds]
snuffeluffegus has joined #ruby
<dachi_>
lagweezle I see
artm has joined #ruby
<soahccc>
yeah that's more like a preference I think. I prefer a "binary" since rake paramaters are awful
<dachi_>
thanks, so I don't make such things as rake my_gem:version
<soahccc>
my spelling sucks today
<dachi_>
thanks! :)
Davey has joined #ruby
rins has joined #ruby
<soahccc>
dachi_: Well you could just call the rake task from within your bin file if you don' want to port it now
stonevil__ has joined #ruby
mercwithamouth has joined #ruby
Hanmac1 has joined #ruby
dkamioka has joined #ruby
<dachi_>
yes tnx for responding
iMe has joined #ruby
snuffeluffegus has quit [Read error: Connection reset by peer]
atmosx has quit [Quit: Lost in trance]
mary5030 has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
mary5030 has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
mary5030 has joined #ruby
acrussell has left #ruby [#ruby]
chrisseaton has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
monkegjinni has quit [Remote host closed the connection]
Vivekananda has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 272 seconds]
<AlexRussia>
if me require 'sequel' in file 1.rb and 2.rb(for example), and then require 2.rb in 1.rb, isn't make conflict?
<derek_c>
someone might want to report this to Github: if you go to https://github.com/trending?l=ruby , all projects listed there are actually Mirah projects
wallerdev has quit [Quit: wallerdev]
tkuchiki has joined #ruby
Vivekananda has joined #ruby
yfeldblum has joined #ruby
chrisseaton has joined #ruby
samtuke has joined #ruby
bradhe has joined #ruby
<AlexRussia>
hey
monkegjinni has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
xcv has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
<lagweezle>
AlexRussia: That does sound like a circular dependancy, yes.
tagrudev has quit [Remote host closed the connection]
_bart has quit []
<AlexRussia>
lagweezle: hmm, i try it in irb, but work!
_bart has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
<lagweezle>
Yay for magic. :)
jibi has quit [Read error: Connection reset by peer]
<AlexRussia>
lagweezle: spam:
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
chrisseaton has quit [Client Quit]
<AlexRussia>
[alx@manjaro-alx lite-twitter]$ irb
<AlexRussia>
irb(main):001:0> require 'sequel'
<AlexRussia>
=> true
<AlexRussia>
irb(main):002:0> require './posts'
<AlexRussia>
=> true
<AlexRussia>
irb(main):003:0> last_post_id
<AlexRussia>
=> 1
<AlexRussia>
irb(main):004:0>
jibi has joined #ruby
bean has joined #ruby
phutchins has joined #ruby
momomomomo has joined #ruby
<AlexRussia>
lagweezle: circular is when 1.rb require 2.rb, a 2.rb require 1.rb
yfeldblum has quit [Ping timeout: 245 seconds]
<AlexRussia>
?
JBreit has quit [Read error: Connection reset by peer]
<lagweezle>
Yes.
<lagweezle>
Circular definition: See Definition, Circular
griffindy has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
<AlexRussia>
lagweezle: ty
<lagweezle>
I may be misunderstanding what you mean, though.
<lagweezle>
Not familiar with sequel.
<lagweezle>
Sadly, I must scamper off towards work, and have no connectivity during the commute. :(
jibi has quit [Read error: Connection reset by peer]
[gmi] has quit [Read error: Connection reset by peer]
seanBE has quit [Ping timeout: 260 seconds]
browndawg has quit [Quit: Leaving.]
<AlexRussia>
lagweezle: simple, exmaple in: when some file included in 2 file and one file included in some file, what is do?
<AlexRussia>
lagweezle: i say it not abstract....
browndawg has joined #ruby
<AlexRussia>
lagweezle: good work! work isn't wolf, in wood dont leave!
jibi has joined #ruby
tyl has joined #ruby
RaCx has joined #ruby
<jhass>
circular dependencies shouldn't be a problem in ruby, if you require a.rb in b.rb and b.rb in a.rb and you require a.rb in c.rb, by the time the require in b.rb is run a.rb is already loaded and the require is a noop
nomenkun has joined #ruby
gyKa has left #ruby ["Leaving"]
griffindy has quit [Client Quit]
JBreit has joined #ruby
griffindy has joined #ruby
monkegjinni has quit [Remote host closed the connection]
freezey has joined #ruby
[gmi] has joined #ruby
Davey has joined #ruby
dtcrshr has quit [Quit: poff]
chrisseaton has joined #ruby
Davey has quit [Client Quit]
machindo has quit [Quit: machindo]
Mattx has joined #ruby
<Mattx>
Hello guys
Al___ has quit [Quit: Al___]
nomenkun has quit [Ping timeout: 245 seconds]
<Mattx>
I really really really need to use a lib which is only availalble for python. is there any way to use it anyway? maybe a project like jRuby for Java that I'm not aware of?
colli5ion has quit []
<samtuke>
jhass, I've removed all traces of rvm that I can find (though strangely rvm on cli is still available, but just initiates implode when called). now I try and install a new gem, and get "Permission denied - /usr/local/rvm" - but /usr/local/rvm doesn't exist. Should I reinstall rvm as user?
<jhass>
Mattx: there's topaz, which is ruby implemented on the same stuff that pypy uses, not sure how production ready that is though
<jhass>
Mattx: I think I'd rather try to write a small python daemon and do some IPC stuff or so
angusiguess has quit [Ping timeout: 245 seconds]
<Mattx>
it's a huge lib I'm going to use extensively
<Mattx>
writing a python daemon for that would be like writing the lib again I guess :P
snath has quit [Read error: Operation timed out]
<waxjar>
the obvious solution would be to use python :p
<samtuke>
jhass, mkdir: cannot create directory ‘/usr/local/rvm’: Permission denied, but I need to do this as user, right?
<jhass>
Mattx: http://docs.topazruby.com/en/latest/ so if you're lucky that works good enough for you. but probably easier to just write the entire thing in python
<jhass>
samtuke: yes
<jhass>
samtuke: you ran it as user and it still tried to install globally?
atmosx has joined #ruby
<samtuke>
jhass, as user I executed "curl -sSL https://get.rvm.io | bash -s stable" and got "cannot create directory ‘/usr/local/rvm’: Permission denied". so in short, it seems yet
<samtuke>
*yes
maroloccio has quit [Quit: WeeChat 0.4.2]
nomenkun has joined #ruby
Astralum has quit [Ping timeout: 245 seconds]
tongcx has joined #ruby
<tongcx>
hi guys, can you use cursor to remove documents in mongodb
<tongcx>
?
<jhass>
samtuke: lets just manually purge all references then. sudo rm -Rf /usr/local/rvm and clean your ~/.bashrc, /etc/profile.d etc, whatever you can find
<jhass>
samtuke: then open a new shell and try again
gregf has quit [Quit: WeeChat 0.4.2]
<samtuke>
jhass, cool thanks
Vivekananda has quit [Remote host closed the connection]
SHyx0rmZ has joined #ruby
jimeh has joined #ruby
machindo has joined #ruby
Solid-State has quit [Quit: Lost terminal]
pskosinski has joined #ruby
jamto11 has joined #ruby
Spami has joined #ruby
derek_c has quit [Ping timeout: 250 seconds]
rurban__ has quit [Quit: Leaving]
<Mattx>
jhass, interesting but I prefer to just use a bridge to python, not an entire different interpreter of Ruby!
z_ is now known as z
monkegjinni has joined #ruby
<samtuke>
jhass, yes there was some stuff in bash rc that was providing the rvm command. cleaned, retrying the curl step
<samtuke>
jhass, meh, still get mkdir: cannot create directory ‘/usr/local/rvm’: Permission denied :\
<jhass>
Mattx: uhm, jruby isn't a bridge, it's what topaz is for python for the jvm
<Mattx>
yep, you're right about that. I used the wrong example :P
<jhass>
samtuke: you did reopen the shell?
machindo has quit [Client Quit]
<samtuke>
jhass, yes, I'll do it again
relix has joined #ruby
<samtuke>
jhass, yup, new shell, still get it. what am I looking for in /etc/profile.d? I grepped all files, found no reference to rvm, so I removed no references there
xcv has joined #ruby
tongcx has quit [Ping timeout: 250 seconds]
LadyRainicorn has joined #ruby
<jhass>
samtuke: maybe take it to #rvm, they certainly know better. I'd continue looking, some systems have a ~/.profile /etc/bashrc etc.
Guest46038 has joined #ruby
<mjc_>
.bashrc, .bash_profile ...
momomomomo has quit [Quit: momomomomo]
yarou has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
xcv has quit [Remote host closed the connection]
ixti has joined #ruby
<jhass>
samtuke: also check if env | grep -i rvm is empty
davidroy has joined #ruby
Vivekananda has joined #ruby
Dwarf has joined #ruby
kpshek has quit []
Es0teric has joined #ruby
<davidroy>
hi can anyone tell me what <=> is for, i am trying to convert some ruby into coffee script and can't seem to find a equivalent.
firefly20131 has joined #ruby
<ericwood>
it's for comparison
<davidroy>
this is my ruby new_outcome_list[(outcome.extra_key1 <=> outcome.extra_key2) + 1] << outcome
<ericwood>
google for the "diamond operator"
adambeynon has quit [Excess Flood]
<davidroy>
cheers, i'll have a nose on google for diamond operator, without knowing what it was called it has been rather tricky
adambeynon has joined #ruby
<ericwood>
yeah googling for language syntax is really tough!
<davidroy>
mjc_: ok cheers, that looks exactly like what i have. now to convert it to js/coffee
<samtuke>
jhass, wow that's a good one, loads of refs in env | grep -i rvm
mansi_ has joined #ruby
<samtuke>
nothing in the other bash config files
_maes_ has joined #ruby
nhhagen has quit [Ping timeout: 245 seconds]
<jhass>
samtuke: maybe they go away if you login again
RaCx has joined #ruby
rayners has joined #ruby
<dp>
perl has Text::Table which allows you to output tabular text in a formatted table. Does ruby have a similar gem? https://metacpan.org/pod/Text::Table
momomomomo has joined #ruby
monkegjinni has quit [Remote host closed the connection]
mando has joined #ruby
bal has quit [Quit: bal]
mando has quit [Read error: Connection reset by peer]
<samtuke>
jhass, yup just had the same thought. will try. thanks for all your help. brb
samtuke has quit [Read error: Connection reset by peer]
<mjc_>
I think tp is more flexible
<mjc_>
depends what you want to do with it really though
<dp>
tp probably is, but in this case, I just need a simple text table on the console
IceDragon has joined #ruby
artm has quit [Ping timeout: 250 seconds]
heftig has quit [Quit: Quitting]
samtuke has joined #ruby
angusiguess has joined #ruby
mikepack has quit [Remote host closed the connection]
<samtuke>
jhass, phew rvm now installed from script correctly (after logout/in)
jhass is now known as jhass|off
dachi_ has quit [Quit: Bouncer]
einarj has quit [Remote host closed the connection]
xcv has joined #ruby
r0bby_ has joined #ruby
r0bby_ has quit [Client Quit]
Sawbones has joined #ruby
davidroy has quit [Quit: davidroy]
<dp>
thanks!
mikepack has joined #ruby
aryaching has joined #ruby
fuhgeddaboudit has joined #ruby
angusiguess has quit [Ping timeout: 272 seconds]
mehlah has quit [Quit: Leaving...]
ndrei has quit [Read error: Operation timed out]
xcv has quit [Remote host closed the connection]
snath has joined #ruby
jprovazn is now known as jprovazn_afk
bradhe has joined #ruby
petey has quit [Remote host closed the connection]
Hanmac has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
FifthWall has joined #ruby
craigp has quit [Remote host closed the connection]
craigp has joined #ruby
endash has joined #ruby
Guest57811 has joined #ruby
Hanmac1 has quit [Ping timeout: 245 seconds]
derek_c has quit [Ping timeout: 250 seconds]
<Guest57811>
I'm trying to learn ruby. one of my first tasks is to build a class that pulls in a URL and parses the JSON returned. Super simple. What would be the best tutorial/document to go to to learn this?
bradhe has quit [Ping timeout: 248 seconds]
teddyp1cker has quit [Remote host closed the connection]
petey_ has joined #ruby
<waxjar>
do you know the basics of http Guest57811?
RaCx has quit [Quit: Computer has gone to sleep.]
thesheff17 has quit [Read error: Operation timed out]
hamakn has quit [Remote host closed the connection]
xcv has quit [Read error: Connection reset by peer]
zoo-zed has joined #ruby
pwh has joined #ruby
xcv_ has joined #ruby
ndrei has joined #ruby
mikepack_ has quit [Ping timeout: 250 seconds]
mansi_ has quit [Read error: Connection reset by peer]
Hobogrammer has quit [Ping timeout: 265 seconds]
mansi_ has joined #ruby
nomenkun_ has joined #ruby
enape_101 has quit [Ping timeout: 252 seconds]
nomenkun_ has quit [Read error: Connection reset by peer]
mansi_ has quit [Remote host closed the connection]
mansi_ has joined #ruby
aspires has joined #ruby
zachallett has quit [Remote host closed the connection]
tylersmith has joined #ruby
Guest46038 has quit [Changing host]
Guest46038 has joined #ruby
nomenkun has quit [Ping timeout: 272 seconds]
Guest46038 is now known as Speed
Cornflake|Zzz has joined #ruby
tkuchiki has quit [Remote host closed the connection]
freezey has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
nomenkun has joined #ruby
Asitha has quit [Read error: Operation timed out]
AxonetBE has quit [Quit: AxonetBE]
vlad_starkov has quit [Remote host closed the connection]
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
drumusician has quit [Ping timeout: 265 seconds]
ndrei has joined #ruby
lsmola has quit [Ping timeout: 265 seconds]
mansi_ has quit [Ping timeout: 248 seconds]
einarj has joined #ruby
verto has quit [Ping timeout: 264 seconds]
mansi_ has joined #ruby
senj has quit [Quit: Sleep Now]
senj has joined #ruby
colli5ion has quit []
enape_101 has joined #ruby
cschneid has quit [Ping timeout: 264 seconds]
G has quit [Ping timeout: 264 seconds]
verto has joined #ruby
freezey has quit [Read error: Operation timed out]
G has joined #ruby
burlyscudd has quit [Quit: Leaving.]
pu22l3r has joined #ruby
kpshek has quit []
interactionjaxsn has quit [Remote host closed the connection]
DrShoggoth has joined #ruby
geggam has quit [Remote host closed the connection]
nhhagen has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
colli5ion has joined #ruby
interactionjaxsn has joined #ruby
bradhe has joined #ruby
yasushi has quit [Remote host closed the connection]
securitycrush has quit [Remote host closed the connection]
axsuul has joined #ruby
teddyp1cker has joined #ruby
securitycrush has joined #ruby
cschneid has joined #ruby
vlad_starkov has joined #ruby
jlebrech has quit [Quit: Konversation terminated!]
JustinAiken has joined #ruby
xcv_ has quit [Read error: Connection reset by peer]
xcv has joined #ruby
jhass is now known as jhass|off
sambao21 has quit [Quit: Computer has gone to sleep.]
mj12albert has joined #ruby
mj12albert has quit [Max SendQ exceeded]
geggam has joined #ruby
willb is now known as Guest43550
fixxxermet has left #ruby [#ruby]
rurban_ has joined #ruby
coder_neo has quit [Quit: Leaving]
jhass|off is now known as jhass
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
shaunbaker has quit []
Kricir_ has joined #ruby
Mattx has quit [Ping timeout: 246 seconds]
Wolland has joined #ruby
Kricir_ has quit [Remote host closed the connection]
Kricir has quit [Read error: No route to host]
samtuke has quit [Ping timeout: 245 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dagobah has quit [Quit: Leaving...]
Kricir has joined #ruby
ahawkins has quit [Quit: leaving]
sambao21 has joined #ruby
maximski has quit []
tvw has quit []
tuxninja has joined #ruby
RaCx has joined #ruby
aganov has quit [Quit: Leaving]
kaldrenon has quit [Remote host closed the connection]
CaptainJet has joined #ruby
xcv has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 245 seconds]
xcv has joined #ruby
<lagweezle>
Heh. The Google.
fijimunkii has joined #ruby
yarou has quit [Remote host closed the connection]
clov3r has joined #ruby
<shevy>
and the penis!
ndrei has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
kpshek has joined #ruby
tjr9898 has joined #ruby
xcv has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
xcv has joined #ruby
kobain has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
angusiguess has joined #ruby
vlad_starkov has joined #ruby
Xeago_ has joined #ruby
bricker`LA has joined #ruby
nvrch has quit [Quit: nvrch]
<lagweezle>
I don't believe I've used that search engine before ...
bradhe has quit [Ping timeout: 260 seconds]
shanlar has joined #ruby
tjr9898 has quit [Ping timeout: 252 seconds]
tuxninja has quit [Ping timeout: 272 seconds]
Mattx has joined #ruby
Mattx has quit [Changing host]
Mattx has joined #ruby
<shevy>
that's how I feel whenever someone shouts out YAHOOOOO
xcv has quit [Read error: Connection reset by peer]
xcv has joined #ruby
LadyRainicorn has quit [Ping timeout: 250 seconds]
askz has quit [Read error: Connection reset by peer]
endash has quit [Quit: endash]
shadoi has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
xcv_ has joined #ruby
xcv has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 260 seconds]
angusiguess has quit [Ping timeout: 260 seconds]
patteh_ has quit [Remote host closed the connection]
dp has left #ruby [#ruby]
einarj has quit [Remote host closed the connection]
albertgrala has joined #ruby
xcv_ has quit [Read error: Connection reset by peer]
zachallett has joined #ruby
mercwithamouth has joined #ruby
xcv has joined #ruby
LekeFly has quit [Read error: Operation timed out]
rh1n0 has joined #ruby
claymore has quit [Read error: Operation timed out]
philcrissman has quit [Ping timeout: 246 seconds]
xcv has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby
xcv has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
derek_c has joined #ruby
banister has joined #ruby
zcreative has joined #ruby
xcv has quit [Read error: Connection reset by peer]
xcv has joined #ruby
mark_locklear has quit [Read error: Operation timed out]
mercwithamouth has quit [Ping timeout: 246 seconds]
werdnativ has joined #ruby
Cornflake|Zzz has quit [Ping timeout: 246 seconds]
marcoecc has joined #ruby
pel_daniel has joined #ruby
jefflyne_ has joined #ruby
xcv_ has joined #ruby
noop has joined #ruby
xcv has quit [Read error: Connection reset by peer]
patteh has joined #ruby
patteh is now known as Patteh
railsmagnet has joined #ruby
axsuul has quit [Ping timeout: 272 seconds]
mrnugget has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
rm_ has quit [Read error: Connection reset by peer]
mrnugget has quit [Client Quit]
kpshek has quit []
mrnugget has joined #ruby
rm_ has joined #ruby
saarinen has joined #ruby
DaniG2k has quit [Quit: leaving]
claymore has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
derek_c has quit [Quit: Leaving]
phansch has quit [Remote host closed the connection]
<slowcon>
hows it goin guys
saarinen has quit [Client Quit]
hobodave_ has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby
pr0ggie has quit [Read error: Operation timed out]
machindo has joined #ruby
allaire has joined #ruby
saarinen has joined #ruby
daxroc has quit [Ping timeout: 245 seconds]
kpshek has joined #ruby
jonah_k has joined #ruby
jobewan has joined #ruby
samtuke has joined #ruby
clov3r has quit []
yfeldblum has quit [Ping timeout: 252 seconds]
freezey has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
IceDragon has quit [Ping timeout: 248 seconds]
graeme has quit [Read error: Connection reset by peer]
IceDragon has joined #ruby
graeme has joined #ruby
burlyscudd has joined #ruby
zigomir has joined #ruby
habanany has joined #ruby
enape_101 has quit [Ping timeout: 260 seconds]
asmodlol has quit [Remote host closed the connection]
i_s has joined #ruby
mansi_ has quit [Remote host closed the connection]
mansi has joined #ruby
<shevy>
good
graeme_ has joined #ruby
<ericwood>
hi
snooc has quit [Ping timeout: 252 seconds]
graeme has quit [Read error: Connection reset by peer]
graeme__ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
browndawg has quit [Quit: Leaving.]
eka has quit [Ping timeout: 256 seconds]
mansi has joined #ruby
axsuul has joined #ruby
<Sawbones>
I'm a bit stuck on activating mysql for my rails install
<Sawbones>
I try rails generate model item
mansi has quit [Remote host closed the connection]
xcv_ has quit [Read error: Connection reset by peer]
kaldrenon has joined #ruby
xcv has joined #ruby
mansi has joined #ruby
<ericwood>
#rubyonrails is a better choice
<Sawbones>
but I get this: /Users/joseph/.rvm/gems/ruby-2.0.0-p247/gems/mysql2-0.3.15/lib/mysql2.rb:8:in `require': cannot load such file -- mysql2/mysql2 (LoadError)
rootshift has joined #ruby
fijimunkii has quit [Ping timeout: 265 seconds]
xcv has quit [Read error: Connection reset by peer]
xcv_ has joined #ruby
i_s has quit []
<shevy>
ewwww rails
graeme__ has quit [Client Quit]
<shevy>
AND rvm :-)
graeme_ has quit [Ping timeout: 252 seconds]
securitycrush has quit [Quit: Leaving]
<lagweezle>
... and MySQL. :3
xcv_ has quit [Read error: Connection reset by peer]
xcv has joined #ruby
i_s has joined #ruby
mansi has quit [Ping timeout: 252 seconds]
<shevy>
Sawbones in general when you install something via gems, it is available in a listing through "gem list"
<shevy>
it works for me fine but I dont use layers like rvm
sambao21 has quit [Quit: Computer has gone to sleep.]
intuxicated has joined #ruby
freezey has quit [Remote host closed the connection]
marcoecc has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
asmodlol has joined #ruby
xcv_ has joined #ruby
kpshek has quit []
marcoecc has joined #ruby
bradhe has joined #ruby
xcv has quit [Ping timeout: 260 seconds]
jefflyne_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
bradhe has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
daxroc has joined #ruby
troyready has joined #ruby
greenarrow has quit [Quit: 500]
xcv has joined #ruby
mansi has joined #ruby
mark_locklear has joined #ruby
spyderma_ has quit []
bradhe has joined #ruby
xcv_ has quit [Ping timeout: 245 seconds]
evilbug has joined #ruby
puppeh has quit [Read error: No route to host]
jackal has joined #ruby
danshult_ has quit [Remote host closed the connection]
SCommette has joined #ruby
brunops has quit [Ping timeout: 250 seconds]
jackal is now known as Guest78749
SCommette has quit [Read error: Connection reset by peer]
Guest78749 is now known as trentont101
Kricir has quit [Remote host closed the connection]
mikepack has joined #ruby
<trentont101>
hello?
<trentont101>
anyone awake
senj has quit [Quit: Sleep Now]
<jhass>
no
<trentont101>
woohoo
senj has joined #ruby
<trentont101>
is this a good place to ask a ruby question?
<trentont101>
i am struggling with a method
<jhass>
sure
Spami has joined #ruby
<trentont101>
I havnt made the method yet, I am trying to figure out the most effective way of writing it. Ive searched methods and havn't found anything that fits... here is the question
timonv has quit [Remote host closed the connection]
troessner has quit [Quit: Leaving]
sambao21 has joined #ruby
mikecmpbll has joined #ruby
danshult_ has joined #ruby
<trentont101>
I am currently making a mud, working on the fighting. I want there to be a method called round which breaks combat into 1 sec intervals rather than just BLAH on the screen... what is the most effective way to code this?? the only way i can think is a = time.now ; b = time.new + 1 sec; if a == b continue... i feel there MUST be a better way
<trentont101>
b = time.now*
momomomomo has quit [Quit: momomomomo]
pwh has quit []
venkat has joined #ruby
<trentont101>
if you can even just point me to another class or method i can use to accomplish this, that would be amazing. i cant find anything in the time class that will do this
Voodoofish430 has joined #ruby
mansi has quit [Quit: Leaving...]
<jhass>
so you want to sleep for one second or...?
<trentont101>
yes
<trentont101>
i was also thinking of a yield of some sort
<jhass>
what about Kernel#sleep ?
klaut has quit [Remote host closed the connection]
<trentont101>
any others you can think of? I will make a list and look into them? thank you so much for your help jhass
_bart has quit [Remote host closed the connection]
kpshek has joined #ruby
centrx has joined #ruby
zachallett has quit [Remote host closed the connection]
<jhass>
I'd go with sleep if I just want to wait for a second
shadoi has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
mityaz has joined #ruby
rudisimo has joined #ruby
<trentont101>
ok thank you
<jhass>
of course you could do something like start = Time.now; true while Time.now-start < 1 but that's just wasting CPU
<trentont101>
do i need a time object to use sleep? looking at it in doc now
xcv has quit [Read error: Connection reset by peer]
<CaptainJet>
sleep takes floats as well doesn't it?
<trentont101>
yes it does
<JustinAiken>
yeah sleep can do floats
<centrx>
sleep 1.1111433223352
<trentont101>
so if i use sleep, should i yield to it, or put it in the method
Es0teric has quit [Quit: Computer has gone to sleep.]
baroquebobcat has joined #ruby
<shevy>
wat
<trentont101>
eh, nvm ive got it figured out
<trentont101>
thank you all so much!!!
<shevy>
sleep 60.5 # 60.5 seconds sleep
pwh has joined #ruby
<shevy>
continue_here_method()
pkrnj has joined #ruby
<trentont101>
you will be impressed shevy
<shevy>
I hope so!
zachallett has joined #ruby
<trentont101>
i showed you my mud a while back, it was very ugly
xcv_ has quit [Read error: Connection reset by peer]
<shevy>
your code should make everyone proud
xcv has joined #ruby
<shevy>
aaah
<trentont101>
lookin good now
<shevy>
I kinda gave up on my MUD :(
<trentont101>
aw!
<trentont101>
i will be sure to send you a copy so you can see how i did it
<trentont101>
its comin together nicely
VTLob has joined #ruby
xcv has quit [Read error: Connection reset by peer]
<trentont101>
very simple
<shevy>
for some reason in ruby, complexity can creep in so quickly
<trentont101>
yes it can
obs has left #ruby [#ruby]
xcv has joined #ruby
<trentont101>
fixing one thing leads you to want to fix more ha
<shevy>
:(
mansi has joined #ruby
<trentont101>
later yall thanks again better get started
philcrissman has joined #ruby
Mon_Ouie has joined #ruby
trentont101 has left #ruby ["Leaving"]
Wolland has quit []
Hanmac1 has joined #ruby
SCommette has joined #ruby
blaxter has quit [Read error: Operation timed out]
ping-pong has joined #ruby
enape_101 has joined #ruby
maletor has quit [Ping timeout: 250 seconds]
burlyscudd has quit [Quit: Leaving.]
Hanmac has quit [Ping timeout: 260 seconds]
joncanady has joined #ruby
<RubyTitmouse>
shevy: because it should be a MOO instead of a MUD
ktosiek_ is now known as ktosiek
<RubyTitmouse>
in Ruby
maletor has joined #ruby
Kricir has joined #ruby
monkegjinni has joined #ruby
ktosiek is now known as ktosiek_
pwh has quit []
<shevy>
nah
Advocation has quit [Quit: Advocation]
<shevy>
it just is way too much work
Kricir has quit [Remote host closed the connection]
<shevy>
I think I will realize sub-components of it that can be useful on their own
Al___ has quit [Quit: Al___]
Kricir has joined #ruby
ktosiek_ is now known as ktosiek
angusiguess has joined #ruby
papito_ has joined #ruby
jamto11 has joined #ruby
nari has quit [Ping timeout: 246 seconds]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
maletor has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
heidi has joined #ruby
Kricir has quit [Ping timeout: 246 seconds]
snooc has joined #ruby
papito_ has quit [Client Quit]
maletor has joined #ruby
angusiguess has quit [Ping timeout: 250 seconds]
_bart has joined #ruby
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
freezey has joined #ruby
Hanmac has joined #ruby
SCommette has quit [Read error: Connection reset by peer]
teddyp1cker has quit []
albertgrala has quit [Quit: Leaving]
vky has joined #ruby
nomenkun_ has joined #ruby
Hanmac1 has quit [Ping timeout: 245 seconds]
nhhagen has quit [Remote host closed the connection]
kpshek has quit []
jefflyne has joined #ruby
Advocation has joined #ruby
centrx has quit [Quit: CHOOO CHOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!!!!!]
jefflyne has quit [Max SendQ exceeded]
colli5ion has quit []
pabloh has quit [Quit: Saliendo]
x77686d has joined #ruby
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
jefflyne has joined #ruby
nomenkun has quit [Ping timeout: 252 seconds]
jefflyne has quit [Max SendQ exceeded]
Tomasso has joined #ruby
eka has joined #ruby
timonv has joined #ruby
jefflyne has joined #ruby
yfeldblum has joined #ruby
jefflyne has quit [Max SendQ exceeded]
mehlah has quit [Quit: Leaving...]
jefflyne has joined #ruby
havenwood has quit [Remote host closed the connection]
mocfive has joined #ruby
sepp2k has joined #ruby
x1337807x has joined #ruby
tuxninja has joined #ruby
tuxninja has left #ruby [#ruby]
Kricir has joined #ruby
EminenceHC has joined #ruby
tuxninja has joined #ruby
<EminenceHC>
In my very simple API I am running into a problem where if a "discharge_date" value does not come over in an XML hash it breaks. I think what is happening is I am trying to .strptime on a potentially non existent or blank value. How can this be avoided? https://gist.github.com/EminenceHC/8849696
mallu has joined #ruby
<EminenceHC>
Where can I check to see if the value is non existent before passing it to the hash?
olivier_bK has joined #ruby
fijimunkii has joined #ruby
Hobogrammer has joined #ruby
tvw has joined #ruby
Mon_Ouie has quit [Read error: Operation timed out]
workmad3 has quit [Ping timeout: 246 seconds]
alexherbo2 has joined #ruby
<mallu>
hi, I'm trying to see how many process of an app running in ruby.. but it is showing wrong number... total_process = `ps -eLf| grep [h]ttp|wc -l` ...
<mallu>
if I do ps -eLf| grep [h]ttp|wc -l in the shell (bash) I get "0" however total_process = `ps -eLf| grep [h]ttp|wc -l giving me "2"
urbanslug has joined #ruby
<mallu>
any help would be greatly appreciated
Xeago has joined #ruby
<EminenceHC>
JustinAiken: Do I also need rescue nonexistent or something? What if "discharge_date" is not contained in the hash at all?
zcreative has joined #ruby
<freerobby>
Is anybody here familiar with this rbenv error? "Errno::EACCES: Permission denied - /opt/rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/build_info/rake-10.1.0.info"
<freerobby>
I suspected permissions, but it turns out that file doesn't even exist
Hanmac has quit [Ping timeout: 246 seconds]
<freerobby>
it happens when i run bundle instlal
<JustinAiken>
rescue will catch any errors, and silently insert nil, including if discharge_data isn't in the hash at all
mikepack has quit [Remote host closed the connection]
pwh has joined #ruby
Slavox is now known as Slavox|AFK
hobodave has joined #ruby
<EminenceHC>
JustinAiken: I see, thanks again!
mikepack_ has quit [Ping timeout: 260 seconds]
Trynemjoel has quit [Ping timeout: 245 seconds]
<mjc_>
yay viki's first off by one :P
ramblex has quit [Remote host closed the connection]
petey_ has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 250 seconds]
xcv has quit [Read error: Connection reset by peer]
* lagweezle
throws confetti.
xcv has joined #ruby
artm has joined #ruby
Xeago has quit [Ping timeout: 265 seconds]
Kricir has quit [Remote host closed the connection]
danshult_ has quit [Remote host closed the connection]
<mallu>
any help please... I'm kind of lost
jamto11 has quit [Remote host closed the connection]
i8igmac has quit [Ping timeout: 245 seconds]
<EminenceHC>
JustinAiken: Hmm, that seemed to break the ruby script. Is there any syntax I may be missing? "discharge_date" => Date.strptime("#{@discharge_date_time}","%m/%d/%Y") rescue nil
<RubyTitmouse>
freerobby: there are some problems there, you're clearly using a system rbenv install since it is in /opt/ and not ~, but with a permissions error that means you're doing bundle install as regular user. You certainly have a permissions error. The file may not exist, but probably the user you're doing bundle install as doesn't have execute permissions on the directory, so can't tell if the file is there or not
rezzack has joined #ruby
Trynemjoel has joined #ruby
carraroj has joined #ruby
<urbanslug>
Is there a way to have an if statement as a parameter. eg foo (if x then y else end)
monkegjinni has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
saarinen has joined #ruby
kpshek has joined #ruby
<RubyTitmouse>
>> def foo bar; bar end ; foo(if true;"TRUE"end)
<viki>
uh, so apparently i have my first off-by-one error and i'm not sure how to fix it, would anybody mind helping? I can paste into a gist, if needed, but I think you can see this with a github account: http://exercism.io/submissions/1d1258617eac40d63dc8e05a
<RubyTitmouse>
urbanslug: if blocks are just regular statements in Ruby, and can be put almost anywhere
bradhe has quit [Remote host closed the connection]
<urbanslug>
RubyTitmouse: Well it fails in my case.
nhhagen has quit [Ping timeout: 260 seconds]
monkegjinni has joined #ruby
bradhe has joined #ruby
saarinen has quit [Client Quit]
<RubyTitmouse>
code or it didn't happen ;)
pwh has quit [Ping timeout: 246 seconds]
arietis has joined #ruby
freggles has joined #ruby
<EminenceHC>
JustinAiken: slash_nick: What seems to still be happening is that if @discharge_date_time is not in the hash, it uses the last @discharge_date_time variable it remembers. Is there a way to clear this from memory or something?
<slash_nick>
>> { key: (@value.nil? ? "yo its nil" : @value) }[:key] #not sure what you're asking urbanslug
<JustinAiken>
just set @discharge_data_time to nil before starting each thing
sree has quit []
_maes_ has joined #ruby
Fire-Dragon-DoL has joined #ruby
oso|away is now known as oso96_2000
i8igmac has joined #ruby
interactionjaxsn has joined #ruby
bradhe_ has joined #ruby
<RubyTitmouse>
match (if /np (.+)/ then /np (.+)/ else "np" end) should be match (if /np (.+)/ ; /np (.+)/ ; else "np" end) # or something
rootshift has joined #ruby
<EminenceHC>
JustinAiken: like: @discharge_data_time = nil ? Where would I put that in the ruby file?
pwh has joined #ruby
<RubyTitmouse>
but don't leave it on one line
bradhe has quit [Read error: Connection reset by peer]
<RubyTitmouse>
break that baby down, newlines are FREE
<urbanslug>
RubyTitmouse: I will give you an update
jprovazn_afk has quit [Quit: Odcházím]
* RubyTitmouse
*holds breath*
<JustinAiken>
@EminenceHC before importData.each_pair { |k, v| instance_variable_set("@#{k}", v) }
SHyx0rmZ has quit [Ping timeout: 245 seconds]
rickruby has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
<EminenceHC>
JustinAiken: Would it even know what @discharge_date_time is before setting the variable in that line though?
e^0 has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<mallu>
if I do ps -eLf| grep [h]ttp|wc -l in the shell (bash) I get "0" however total_process = `ps -eLf| grep [h]ttp|wc -l, puts "#{total_process} giving me "2". Can someone please please tell me what I am doing wrong?
rh1n0 has quit [Remote host closed the connection]
LekeFly has joined #ruby
<JustinAiken>
not sure, you didn't post enough code for full context…
gnephiak has quit [Quit: Konversation terminated!]
monkegjinni has quit [Remote host closed the connection]
<JustinAiken>
mallu, remove the wc -l and see -which- two processes are showing up...
<EminenceHC>
JustinAiken: Putting it where you said seems to have worked. I still don't understand how it understands @discharge_date_time variable at that time though.
bricker_ has joined #ruby
e^0 has quit [Quit: WeeChat 0.4.2]
<EminenceHC>
JustinAiken: Must be from memory.
thesheff17 has joined #ruby
e^0 has joined #ruby
platzhirsch has joined #ruby
<platzhirsch>
Anyone living in London?
<JustinAiken>
yep, each time an instance variable is set, it stays set in that scope unless something changes it
nomenkun has joined #ruby
<RubyTitmouse>
instance variables live inside the instance, that is the most basic difference between OOP and other forms of structured programming; data and code live together
jobewan has quit [Read error: Operation timed out]
pu22l3r_ has joined #ruby
dubsteph has joined #ruby
rubyracer has joined #ruby
pu22l3r has quit [Ping timeout: 245 seconds]
<EminenceHC>
JustinAiken: Ah I see.. thanks for your time and patience.
aspires has quit []
nomenkun_ has quit [Ping timeout: 260 seconds]
fieldfirst has quit [Remote host closed the connection]
e^0 has quit [Client Quit]
Slavox|AFK is now known as Slavox
arietis has quit [Quit: Computer has gone to sleep.]
timonv has quit [Ping timeout: 250 seconds]
venkat has quit [Remote host closed the connection]
i8igmac has quit [Ping timeout: 250 seconds]
habanany has quit [Ping timeout: 250 seconds]
venkat has joined #ruby
nanoyak has joined #ruby
brunops has joined #ruby
Shidash has joined #ruby
urbanslug has quit [Quit: Lost terminal]
<viki>
ah, have to go for a bit, i'll come back and ask later
Hiall has quit [Quit: hiall]
pfg has joined #ruby
fedesilv_ has joined #ruby
<lagweezle>
mallu: Try doing the same check but w/o the '|wc -l' to see what Ruby is seeing as the process list vs what the shell is outputting.
venkat has quit [Ping timeout: 245 seconds]
kate_r has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
newton has quit [Ping timeout: 250 seconds]
fedesilva has quit [Ping timeout: 260 seconds]
<freerobby>
RubyTitmouse: Thank you, will investigate that.
nomenkun has quit [Remote host closed the connection]
nomenkun has joined #ruby
craigp has quit [Remote host closed the connection]
xcv_ has quit [Read error: Connection reset by peer]
xcv has joined #ruby
miah has joined #ruby
intuxicated has quit [Read error: No route to host]
heftig has joined #ruby
miah has quit [Changing host]
miah has joined #ruby
mallu has quit [Quit: Page closed]
aspires has joined #ruby
xcv has quit [Remote host closed the connection]
RaCx has joined #ruby
gja has joined #ruby
nomenkun has quit [Ping timeout: 260 seconds]
angusiguess has joined #ruby
`petey` has joined #ruby
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pfg has joined #ruby
ukd1 has joined #ruby
grzywacz has quit [Ping timeout: 245 seconds]
EminenceHC has quit [Ping timeout: 246 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
nanoyak has quit [Quit: Computer has gone to sleep.]
nolamesa2 has joined #ruby
venkat has joined #ruby
raphaelivan has quit [Quit: Leaving.]
saarinen has quit [Quit: saarinen]
mehlah has quit [Quit: Leaving...]
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
monkegjinni has joined #ruby
havenwood has quit [Remote host closed the connection]
bradhe_ has quit [Remote host closed the connection]
<freerobby>
Is it considered a best practice in production to have rbenv have its own user for installing gems? Or do people just have it run as whatever the app runs as?
craigp has joined #ruby
angusiguess has quit [Ping timeout: 272 seconds]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
Speed has joined #ruby
zcreative has quit [Ping timeout: 245 seconds]
Speed has quit [Changing host]
Speed has joined #ruby
Sc0rp10n has joined #ruby
jefflyne has joined #ruby
momomomomo has joined #ruby
jefflyne has quit [Max SendQ exceeded]
jonah_k has quit [Remote host closed the connection]
pwh has quit []
endash has quit [Quit: endash]
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
jefflyne has joined #ruby
zcreative has joined #ruby
mocfive has quit [Remote host closed the connection]
machindo has joined #ruby
poulson has quit [Read error: Connection reset by peer]
mocfive has joined #ruby
Astralum has joined #ruby
endash has joined #ruby
<miah>
freerobby: most people probably use 'bundler' in production to segregate gems between apps
burlyscudd has joined #ruby
nolamesa2 has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
<RubyTitmouse>
freerobby: the normal practice is to have a project user (because of the shortcomings of the *nix groups) that represents the team
mikepack has quit [Remote host closed the connection]
stryek has quit [Quit: Leaving]
chrisseaton has quit []
<RubyTitmouse>
so then everything can go into userspace, and you don't need somebody with root to set things up or fix permissions, etc
<miah>
what are the shortcomings with unix groups?
zipper has joined #ruby
`petey` has quit [Remote host closed the connection]
rm_ has quit [Read error: Connection reset by peer]
nhhagen has joined #ruby
lethjakman has joined #ruby
rm_ has joined #ruby
nhhagen has quit [Remote host closed the connection]
<RubyTitmouse>
miah: lots, you need a sysadmin to manage it, you have to manage default permissions, apps will set their own permissions for some files, when a permission is wrong you need somebody to have root
yarou has joined #ruby
aloysius1 has joined #ruby
claymore has quit [Ping timeout: 245 seconds]
ghr_ has joined #ruby
<RubyTitmouse>
plus for executables you have to mess with it a lot. it is much smoother to have a user that can run stuff
nomenkun has joined #ruby
mforrester has quit [Ping timeout: 260 seconds]
aloysius1 has quit [Client Quit]
<RubyTitmouse>
like apache runs as the "apache" user, mycoolwebapp should run as the mycoolwebapp user
aloysius1 has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
aloysius1 has quit [Client Quit]
Lewix has joined #ruby
aloysius1 has joined #ruby
aloysius1 has quit [Client Quit]
aloysius1 has joined #ruby
aloysius1 has quit [Client Quit]
einarj has joined #ruby
zenojis has quit [Read error: No route to host]
sambao21 has joined #ruby
claymore has joined #ruby
<RubyTitmouse>
also since a file only has one user and one group, who owns the files? the user account of the dev? how does another dev make changes? what if you make a mistake on a permission? And how do you give apache access? you can add apache to the group, but now other apps have access to each other
enape_101 has quit [Ping timeout: 245 seconds]
<RubyTitmouse>
I'm sure there are 42 other reasons I'm forgetting, too ;)
monkegjinni has quit [Remote host closed the connection]
<lagweezle>
It can be automated, to make sure the group stuff is alwasy set, but yeah ... it can get complex quickly.
ndrei has quit [Ping timeout: 260 seconds]
`petey` has joined #ruby
mark_locklear has quit [Quit: Leaving]
kleinerdrache has joined #ruby
<RubyTitmouse>
right, some of these have other solutions, but some don't, like having apps protected from each other
ukd1 has quit [Quit: Leaving...]
aloysius1 has joined #ruby
<RubyTitmouse>
which usually isn't needed these days, but the standard practice of having project users always works, and is actually easier to manage
aloysius1 has quit [Client Quit]
rudisimo has quit [Ping timeout: 246 seconds]
aloysius1 has joined #ruby
aloysius1 has quit [Client Quit]
aloysius1 has joined #ruby
aloysius1 has quit [Client Quit]
aloysius1 has joined #ruby
aloysius1 has quit [Client Quit]
endash has quit [Quit: endash]
aloysius_ has joined #ruby
<lagweezle>
mmhmm
Tomasso has quit [Ping timeout: 272 seconds]
yarou has quit [Remote host closed the connection]
rudisimo has joined #ruby
<zipper>
uh how do I check whether a param was passed or not?
stkowski has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<zipper>
RubyTitmouse: So I can give it a default value with which I will check to make sure it was passed/changed?
<jhass>
zipper: well, that's more a cinchrb question than a ruby question, but iirc that'd result in empty string
RaCx has quit [Quit: Computer has gone to sleep.]
noop has quit [Ping timeout: 260 seconds]
havenwood has joined #ruby
<jhass>
zipper: so I'd check for nick.strip.empty?
<RubyTitmouse>
zipper: No, if you DON'T have a default value, then a value has to be passed or you get an argument error.
<jhass>
zipper: just keep in mind this is because how cinch works, not how ruby works
stonevil__ has quit [Quit: Computer has gone to sleep.]
<zipper>
execute(m, nick=nil)
<zipper>
Then check if nickis nil
<jhass>
iirc. you'd have to define two matchers then
<RubyTitmouse>
zipper: you generally should be more worried about what is passed in that where it came from
<jhass>
match /np\s*$/ and match /np\s+(.+)/
<RubyTitmouse>
so just worry about, now that we're in the method, what is in nick
gigetoo has joined #ruby
rubyracer has quit [Quit: Konversation terminated!]
<zipper>
It worked with nick.strip.empty?
havenwood has quit [Ping timeout: 245 seconds]
mmoretti has quit []
coder_neo has quit [Quit: Leaving]
samtuke has quit [Ping timeout: 246 seconds]
maletor has quit [Read error: Connection reset by peer]
<zipper>
RubyTitmouse: What is passed when?
caveat- has joined #ruby
maletor has joined #ruby
burlyscudd has quit [Quit: Leaving.]
burlyscudd has joined #ruby
fijimunkii has quit [Quit: leaving]
havenwood has joined #ruby
timonv has joined #ruby
fijimunkii has joined #ruby
fijimunkii has quit [Client Quit]
mocfive has quit [Remote host closed the connection]
interactionjaxsn has quit [Remote host closed the connection]
mocfive has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
bigmac has joined #ruby
havenwood has joined #ruby
newbie|9 has joined #ruby
<RubyTitmouse>
zipper: inside the method, it has already been passed and it is too late to be worrying when. Worry about when at the next level up, outside of the method definition
aryaching has joined #ruby
fijimunkii has joined #ruby
fijimunkii has quit [Client Quit]
axsuul has quit [Ping timeout: 250 seconds]
nomenkun_ has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
dik_dak has joined #ruby
newbie|9 has quit [Client Quit]
mocfive has quit [Ping timeout: 252 seconds]
Geophit has quit [Ping timeout: 252 seconds]
tchebb has quit [Ping timeout: 240 seconds]
tchebb has joined #ruby
momomomomo has quit [Quit: momomomomo]
havenwood has quit [Ping timeout: 260 seconds]
mikepack has joined #ruby
nomenku__ has joined #ruby
predator117 has quit [Ping timeout: 245 seconds]
nomenkun has quit [Ping timeout: 272 seconds]
rm_ has quit [Ping timeout: 265 seconds]
interactionjaxsn has joined #ruby
RaCx has joined #ruby
bigmac has quit [Ping timeout: 260 seconds]
gja has joined #ruby
rm_ has joined #ruby
bitri has joined #ruby
predator117 has joined #ruby
endash has joined #ruby
<viki>
lagweezle: thanks, i'll check it out
endash has quit [Client Quit]
nomenkun_ has quit [Ping timeout: 248 seconds]
zz_jrhorn424 is now known as jrhorn424
ozzloy_ is now known as ozzloy
mocfive has joined #ruby
ozzloy has quit [Changing host]
ozzloy has joined #ruby
nanoyak has joined #ruby
railsmagnet has left #ruby [" ....."]
mando_ has joined #ruby
jtdowney has quit []
mikepack has quit [Remote host closed the connection]
danshult_ has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
mando has quit [Ping timeout: 272 seconds]
yarou has joined #ruby
mando_ has quit [Ping timeout: 260 seconds]
Yahkob has quit [Remote host closed the connection]
maletor has quit [Ping timeout: 260 seconds]
zeade has joined #ruby
Yahkob has joined #ruby
joncanady has quit [Quit: Lost terminal]
maletor has joined #ruby
Yahkob has quit [Read error: No route to host]
aspires has quit []
Yahkob has joined #ruby
dubsteph has quit [Remote host closed the connection]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dubsteph has joined #ruby
craigp has quit [Read error: Connection reset by peer]
jfelchner has joined #ruby
angusigu1ss has joined #ruby
craigp has joined #ruby
jamto11 has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
pochemu has joined #ruby
aspires has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
aspires has quit [Remote host closed the connection]
<viki>
lagweezle: i imagine so. i'm not sure it is a good tool for me just yet, i've had trouble using github on the various computers i use (work, borrowed boyfriend's laptop, home computer is probably ok but I do most of my learning at work)
bigkevmcd has quit [Ping timeout: 252 seconds]
<lagweezle>
viki: What kind of trouble?
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
aspires has joined #ruby
angusigu1ss has quit [Ping timeout: 250 seconds]
<viki>
i think i had some kind of authorization issue the last time i tried? i don't recall exactly.
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
endash has joined #ruby
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
mrnugget has quit [Quit: mrnugget]
spyderman4g63 has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
jefflyne has joined #ruby
axsuul has joined #ruby
bigkevmcd has joined #ruby
pu22l3r has joined #ruby
mikepack has quit [Ping timeout: 265 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
jobewan has joined #ruby
endash has quit [Client Quit]
freezey has quit [Remote host closed the connection]
agent_white has joined #ruby
freerobby has quit [Quit: Leaving.]
<viki>
i don't remember what it was exactly, i'm trying to find where i mentioned it before (might've been here, might've been in chat with my boyfriend somewhere)
alvaro_o_ has joined #ruby
freerobby has joined #ruby
enape_101 has joined #ruby
rickruby has quit [Remote host closed the connection]
maletor has joined #ruby
allaire has quit []
drumusician has joined #ruby
vermele has joined #ruby
<viki>
anyway there are lots of other learning resources that don't involve github much if at all
kpshek has quit []
krisbulman is now known as [krisbulman]
sambao21 has quit [Quit: Computer has gone to sleep.]
kpshek has joined #ruby
mocfive has quit [Remote host closed the connection]
maletor has quit [Ping timeout: 260 seconds]
mocfive has joined #ruby
maletor has joined #ruby
kirun has joined #ruby
<viki>
would anybody mind helping me with this exercism.io assignment? i have it mostly done, just the last test is failing because the output is one more than it should be, and i'm not sure why. http://exercism.io/submissions/1d1258617eac40d63dc8e05a
<lagweezle>
viki: There are two ways of pulling things from github. SSH and HTTPS. If you use SSH, you must have uploaded the public SSH key for the keypair you are using to talk w/the github servers. HTTPS does not care about your identity verification* though.
<lpvn>
viki, not available for unlogged users
<jhass>
viki: transfer your solution and the tests into a gist
<shevy>
how can there be something if there was nothing canton7!
<Giddeon>
shevy: They are processed in order from the bottom up
<shevy>
Giddeon hmm
<canton7>
because maths ;)
<viki>
jhass: i don't know what you are trying to show me
Yahkob has quit [Ping timeout: 252 seconds]
<jhass>
viki: nah that last one wasn't for you
<Giddeon>
shevy: last end block get's executed first in my script
mikepack has quit [Remote host closed the connection]
<shevy>
aha
<viki>
oh ok
<shevy>
that sounds legit
hooper has joined #ruby
mando has joined #ruby
<shevy>
it's weird how sometimes the same explanation, with different words, makes so much more sense :)
<jhass>
viki: since lpvn already spoiled it I make it explicit: def square(n); 2**(n-1); end
nettoweb has quit [Quit: nettoweb]
centrx has joined #ruby
<viki>
is there a way to get rid of the float while still using the approach i'm using, since i don't understand and didn't come up with lpvn's solution?
daxroc1 has quit [Read error: Connection reset by peer]
aspires has quit []
<jhass>
you should rather spend time understanding that solution
daxroc has joined #ruby
rudisimo has quit [Ping timeout: 260 seconds]
ktosiek has quit [Read error: Connection reset by peer]
carraroj has quit [Quit: Konversation terminated!]
vlad_starkov has quit [Remote host closed the connection]
<lfox>
shevy: proc vs lambda?
heidi has left #ruby [#ruby]
rudisimo has joined #ruby
pwh has quit [Ping timeout: 252 seconds]
<shevy>
lfox I hate lambda
<shevy>
but then again I also hate module vs. class distinction
Yahkob has joined #ruby
pwh has joined #ruby
freerobby has quit [Quit: Leaving.]
enape_101 has quit [Ping timeout: 252 seconds]
kleinerdrache has quit [Quit: Ex-Chat]
<mjc_>
sounds like you hate what you don't understand
<shevy>
sounds like you make assumptions what you can't reason for
ktosiek has quit [Read error: Connection reset by peer]
<lagweezle>
I /echo
ktosiek has joined #ruby
freezey has quit [Remote host closed the connection]
<mjc_>
lambdas and modules are useful for making intent clear and preventing things from being used in ways they weren't intended to be
<mjc_>
that is what they are for
<shevy>
hmmm making intent clear hmm
<shevy>
can we use module Foo vs class Foo as namespace
benlieb has quit [Quit: benlieb]
dramagods has quit [Remote host closed the connection]
freerobby has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Atrumx has joined #ruby
pu22l3r has quit [Ping timeout: 245 seconds]
jfelchner has quit [Quit: jfelchner]
<shevy>
preventing things from being used is also a nice statement, it's the old discussion - should you rather use mixins or should you rather subclass
<shevy>
or both!
claymore has joined #ruby
<mjc_>
both depend on intent, again
jfelchner has joined #ruby
enape_101 has joined #ruby
danshultz has quit [Remote host closed the connection]
hooper has quit [Quit: [BX] Hrm... I wonder if I paid this month's electr...EOF From client]
zachallett has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
<mjc_>
shevy: again, a crippled class is useful for preventing people from using your code in ways it is not designed to be used
apeiros has joined #ruby
postmodern has joined #ruby
<mjc_>
easier and more elegant to implement a module for some things than to muck with what happens when someone instantiates a thing that doesn't need to be instantiated and won't behave the way they expect
<mjc_>
similarly for reusing code, if a module isn't a complete thing people shouldn't be trying to instantiate it
Spami has quit [Quit: This computer has gone to sleep]
<RubyTitmouse>
fsckin' IEEE lol
<centrx>
"It is therefore impressive that Captain Kirk (William Shatner) is able to detect one more heartbeat aboard the starship Enterprise than can be accounted for by amplifying an auditory sensor intensified by a factor of "1 to the fourth power" in the Season 1 Star Trek episode "Court Martial" (1967)."
<mjc_>
viki: your math is rusty and that's OK
nomenku__ has quit [Remote host closed the connection]
`petey`_ has joined #ruby
<viki>
veryveryvery rusty and underdeveloped to begin with
<RubyTitmouse>
Ruby strictly follows all the formal IEEE math for floats and ints
tvw has joined #ruby
<mjc_>
viki: totally ok, you will brush up as you go
einarj has quit [Remote host closed the connection]
lfox has quit []
<lpvn>
viki, 2**0 is 1 because otherwise the exponential function wouldn't be smooth and therefore non-differentiable
pwh has quit []
rh1n0 has joined #ruby
<RubyTitmouse>
mjc_: that link lost me at "my train of thought"
<lpvn>
viki, if you ever study calculus you'll understand why
<RubyTitmouse>
Thinking is the last thing you should do
lkba has quit [Ping timeout: 260 seconds]
havenwood has quit [Ping timeout: 250 seconds]
<mjc_>
RubyTitmouse: look at the answer
<mjc_>
:P
<atmosx>
lpvn: you mean there's an actual explanation? (I didn't open the link yet)
`petey` has quit [Ping timeout: 245 seconds]
<RubyTitmouse>
If you're "thinking" you'll expect 1/0 and 1/0.0 to be the same, same for 0/0 and 0/0.0
<atmosx>
I always admired mathematicians (pure ones) more than anything else. I believe they are able to grasp all possible concepts with ease (except from the most complicated one that is)
IceyEC has quit [Quit: IceyEC]
<centrx>
love...
<atmosx>
centrx: no, that can be explained by chemistry.
<atmosx>
centrx: human relationshipts
<RubyTitmouse>
The best way for a programmer to understand math is as a set of software functions that return values as defined by IEEE
<atmosx>
without the 't' lol
<atmosx>
RubyTitmouse: hahaha nice quote :-P
<mjc_>
heh
Spami has joined #ruby
<lpvn>
atmosx, yeah
<RubyTitmouse>
Everybody agrees I am quotable, the disagreement is on if it is a "Ruby WTF" or not lol
vlad_starkov has quit [Remote host closed the connection]
tauebel1 has joined #ruby
<lpvn>
atmosx, I'm not a mathematician though, just a humble comp sci guy lol
vlad_starkov has joined #ruby
freezey has joined #ruby
Hanmac has joined #ruby
tauebel has quit [Ping timeout: 260 seconds]
axsuul has joined #ruby
<atmosx>
lpvn: SO scares the shit out of me. I see people with such an extraordinary skills.
Hanmac1 has quit [Ping timeout: 245 seconds]
daxroc has quit [Quit: Leaving.]
mgdixon has joined #ruby
interactionjaxsn has quit [Ping timeout: 250 seconds]
<RubyTitmouse>
in college I hung out with a lot of math majors, but they were mostly idiots when it came to science
rootshift has joined #ruby
<MJBrune>
so I have jruby and ruby installed on my windows machine. Is there a way to tell which gem command connects to which ruby environment?
rh1n0 has quit [Quit: im out!]
<RubyTitmouse>
stuck in Plato's cave, declaring the shadows to be Ideal Forms
daxroc has joined #ruby
<atmosx>
RubyTitmouse: yeah when I was talking about mathematicians I had in mind Euclides, Euler, Gauss, Rieman and Ramanujan
<RubyTitmouse>
oh, okay, yeah
Sawbones has quit []
<lpvn>
yeah, Euler studied graphs before it was cool
<lpvn>
lol
<platzhirsch>
so what's going on here?
<lpvn>
should we declare him a hipster?
mikepack has joined #ruby
<platzhirsch>
lpvn: you called?
<atmosx>
RubyTitmouse: Platoo, there's this podcast "The history of philosophy without any gaps". It features 1 episode per centuary. When it came to Socrates it had 2 episodes and when it came to Platoo I think 4 or 5 (so far)... didn't finnish Platoo yet.
<RubyTitmouse>
The problem with pure math is that it is 100% abstraction, it is entirely fake, a tool, but the people that tend to be drawn to it want it to be some sort of property of the Universe... but if that was true, the "natural" numbers would e, c, pi, etc
<lpvn>
platzhirsch, wat m8?
<atmosx>
lpvn: actually, he invented the internet in an indirect way.
<atmosx>
lpvn: or to be more precise, 'routig'.
<platzhirsch>
atmosx: That sounds nice, let me look for it
apeiros has quit [Remote host closed the connection]
<MJBrune>
yeah jruby sucks, you install jruby, install the gems and then it throws some BS error dealing with the gem you installed. Regular ruby you simply just install ruby, the gems and run without issues. Jruby's implimentations are flawed in my case.
<atmosx>
platzhirsch: I was familiar with some concepts, mostly with Socrates and Sofists, not so much with Platoo himself. It's very interesting podcast.
<atmosx>
MJBrune: what is the purpose of JRuby?
<platzhirsch>
I only had one class Philosophy in my Master's studies, but left me hungry for more
<RubyTitmouse>
atmosx: I am grateful to Plato though, for relating Solon's account of Atlantis that he received from the Egyptian priests. Otherwise I'd still think that Western culture came from Greece, and not the Minoans
<atmosx>
oh jvm
efra is now known as efra_away
fgo has joined #ruby
werdnativ has quit [Quit: werdnativ]
<atmosx>
RubyTitmouse: I'm Greek (half Greek) so I'm flattered, but I don't really care. I mean, the important thing is what we do with that knowledge not specifically where it came from.
<lpvn>
RubyTitmouse, your brain that processes pure math is part of the universe so your objection is mostly a problem with your definition of 'fake' and 'property of the universe'
<MJBrune>
atmosx: I wanted a gui, I tried fxruby and simple gui ruby and decided those both weren't what I needed so but I saw someone was using jruby with java swing which I've used before and I know would work perfectly for my implementation.
Steve445 has joined #ruby
<atmosx>
MJBrune: we have someone here (Hanmak iirc) who is developing a gui library for ruby
LuvLinuxOS has joined #ruby
<RubyTitmouse>
atmosx: for me, JRuby is for android.... I spent 3 days trying to compile MRI with google's cross compiler... I made a lot of progress but gave up :(
mikepack has quit [Ping timeout: 245 seconds]
<MJBrune>
atmosx: that would be great in the future but I need something stable :)
<RubyTitmouse>
atmosx: the knowledge is the important part, I'm just a nerd who likes historical geography :)
nomenkun has joined #ruby
DaniG2k has joined #ruby
<atmosx>
MJBrune: I don't think that ruby makes a great tool for guy programming actually. You might want to consider your options (python i.e.)
<Giddeon>
is 'true' in ruby a constant?
werdnativ has joined #ruby
<DaniG2k>
what's a good gem for taking screenshots of webpages automagically?
<RubyTitmouse>
Giddeon: depends what you mean by "constant"
adamnbowen has quit [Remote host closed the connection]
<RubyTitmouse>
#define Qtrue ((VALUE)RUBY_Qtrue)
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
<RubyTitmouse>
RUBY_Qtrue = 2
<Giddeon>
RubyTitmouse: I got asked that question on a test, and didn't get any more info. My choices were "Instance Variable", "Psuedo Variable", "Class Variable" or "Constant"
<lagweezle>
What is the means used to run ruby code repeatedly to get a good idea of it's performance?
<ericwood>
oh wow there's a Qt bindings thing
lkba has joined #ruby
<MJBrune>
atmosx: what do you mean it's not a good tool for a guy programming?
<RubyTitmouse>
Giddeon: I'd have said Psuedo Variable
<centrx>
lagweezle, Why "repeatedly"?
<centrx>
lagweezle, Benchmark.bmbm
<RubyTitmouse>
it isn't capitalized so on the Ruby side it shouldn't be a "constant"
interactionjaxsn has joined #ruby
<lpvn>
Giddeon, I'd say that like integers true is an immutable object
<lagweezle>
centrx: If only run once, or a small number of times, other things the system is doing will affect the metrics significantly more.
hostess has quit [Excess Flood]
<Giddeon>
RubyTitmouse: Thanks
<RubyTitmouse>
integers are generally referred to as "immediate values"
kaldrenon has quit [Remote host closed the connection]
<centrx>
lagweezle, Okay, use a loop :)
<DaniG2k>
what's a good gem for taking screenshots of webpages automagically?
<RubyTitmouse>
They're not really real objects, but they really are wrapped with a real object on the Ruby side
<centrx>
lagweezle, Benchmarks track "user" time as well as "real" time
hostess has joined #ruby
<centrx>
lagweezle, So for processes that do not depend on network latency, or database latency, a simple benchmark still accurately tests performance regardless of what is happening elsewhere on the computer
<centrx>
or accessing files, I suppose
failshell has quit [Ping timeout: 250 seconds]
angusigu1ss has joined #ruby
<AlexRussia>
shevy: also, freelsd ;)
<Giddeon>
RubyTitmouse: You are correct, I found some documentation that refers to them as pseudo variables
daxroc has quit [Quit: Leaving.]
stonevil___ has quit [Quit: Computer has gone to sleep.]
venkat has quit [Remote host closed the connection]
stonevil___ has joined #ruby
bigmac has joined #ruby
venkat has joined #ruby
vky has quit [Ping timeout: 260 seconds]
Wolland has quit [Remote host closed the connection]
kpshek has joined #ruby
Kricir_ has joined #ruby
phansch has joined #ruby
<RubyTitmouse>
now I have "the parts of Ruby + chunky bacon" stuck in my head... ~/ variables are any plain lower-case word /~
venkat has quit [Read error: Connection reset by peer]
Kricir has quit [Read error: Operation timed out]
<RubyTitmouse>
~/ constants are words but all constants are capitalized ~/
stonevil___ has quit [Read error: Operation timed out]
saarinen has joined #ruby
daxroc has joined #ruby
angusigu1ss has quit [Ping timeout: 260 seconds]
DaniG2k has quit [Quit: leaving]
Kricir_ has quit [Remote host closed the connection]
`petey`_ has quit [Remote host closed the connection]
PLejeck has quit [Changing host]
PLejeck has joined #ruby
PLejeck is now known as nuck
Zubin has joined #ruby
`petey` has joined #ruby
<lpvn>
platzhirsch, so when will you move to London or NY? :D
xcv has joined #ruby
<platzhirsch>
lpvn: When Santa grants my wish
<lpvn>
platzhirsch, next week, I've been told
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lpvn>
lol
fedesilv_ has quit [Ping timeout: 272 seconds]
<ericwood>
I actually reall love the _why's poignant guide soundtrack
<platzhirsch>
I felt quite fatigued when I looked at possible questions to exercise. Then I went out, took a talk, took some pictures. Now I will probably work a bit on my Rails app. It feels more real than implementing the Java method which checks if a tree is balanced or not
yarou has quit [Remote host closed the connection]
<lpvn>
cool
bigmac has quit [Ping timeout: 272 seconds]
<platzhirsch>
Though I sent an application out for fun today, I think it's good to have some open conservations
Yahkob has quit [Remote host closed the connection]
`petey` has quit [Ping timeout: 245 seconds]
Yahkob has joined #ruby
<lpvn>
platzhirsch, sending applications for fun? into the trash it goes hahaha
<platzhirsch>
hehe
venkat has joined #ruby
mansi has quit [Remote host closed the connection]
Dude007 has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
mansi has joined #ruby
heidi1 has joined #ruby
Dude007 has joined #ruby
Es0teric has joined #ruby
<platzhirsch>
There were some pretty low-paid (I guess) jobs for London. 18-22k Pound sounds awfully low for London
gl0om has joined #ruby
mikepack has joined #ruby
heidi1 has left #ruby [#ruby]
Dude007 has quit [Read error: Connection reset by peer]
IceDragon has quit [Ping timeout: 245 seconds]
gl0om has quit [Read error: Connection reset by peer]
Dude007 has joined #ruby
`petey` has joined #ruby
pochemu has quit [Quit: Leaving]
<RubyTitmouse>
"the PC is the LSD of the 1990s" -- Dr. Timothy Leary
Yahkob has quit [Ping timeout: 250 seconds]
<RubyTitmouse>
Why did they need drugs to expand their minds? No internet!
relix has joined #ruby
mansi has quit [Ping timeout: 246 seconds]
mercwithamouth has joined #ruby
saarinen has quit [Quit: saarinen]
kpshek has quit []
jonr22 has joined #ruby
workmad3 has joined #ruby
<agent_white>
RubyTitmouse: You mean, _to make_ the internet!
<RubyTitmouse>
lol doubtful
fgo has quit [Remote host closed the connection]
russt_ has joined #ruby
burlyscudd has quit [Quit: Leaving.]
mesamoo has joined #ruby
burlyscudd has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<RubyTitmouse>
reminds me of the Netslaves soundtrack... ~ why was the internet created? Free content and commerce? To survive an atomic attack. ~
<agent_white>
RubyTitmouse: The quote is incorrect, but a funny one. ""Two things came out of Berkeley: BSD and LSD. We don't believe this to be a coincidence."
<apeiros>
hu? hofmann was at Berkley?
rudisimo has quit []
<RubyTitmouse>
agent_white: is that a quote from AT&T guys? lol
rayners has quit [Remote host closed the connection]
Notte has joined #ruby
fedesilva has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
platzhirsch has left #ruby [#ruby]
interactionjaxsn has quit [Remote host closed the connection]
<RubyTitmouse>
in 2001 they asked Linus Torvalds if he thought people would still be using linux in 10 years, he said no, he hoped not, something newer and better would come along... I long for a new unix war
<RubyTitmouse>
the best I get is SysV vs systemd :/
[gmi] has quit [Quit: Leaving]
newbie|0 has quit [Ping timeout: 260 seconds]
<agent_white>
apieros: Nah, it's not a true quote. Just a funny one I got once from my fortune package (each time you open a terminal it gives you a saying/quote!)
IceDragon has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
snooc has quit [Ping timeout: 272 seconds]
stonevil___ has joined #ruby
<jsilver>
thats the last time I ever go in #vbox, the dumbest channel of this network
<shevy>
hehe
<bricker>
Can someone remind me how to use `ruby -run`? It's hard to google for
<jsilver>
I go in there, and suddenly now I don't understand how IPs work
<jsilver>
that's news to me, as a 15-year veteran of programming
<shevy>
it's virtual dumbness
<shevy>
they are much dumber in reallife
<bricker>
I remember it being a simple way to start up a server
<jsilver>
yeah
flingbob has joined #ruby
<jsilver>
as soon as Oracle gets their evil little hands on anything
flingbob has quit [Client Quit]
<jsilver>
it gets all sexed out like Oracle SF... in a bad way... in a way that people hate
<shevy>
it's the chasing the stick strategy - you inflate and inflate and inflate until you are the last to be able to manage the complexity
<apeiros>
bricker: `man ruby` shows you all flags nad options
* jsilver
blames oracle
<jsilver>
yeah
<apeiros>
bricker: and -run is -r un, which simply tries to `require 'un'`
<shevy>
one day google and oracle will merge
<jsilver>
its rude
<shevy>
then we will goocle
<jsilver>
I believe in taking care of customers
<agent_white>
shevy: don't make me cry
<shevy>
haha
nszceta has quit [Remote host closed the connection]
<jsilver>
fuck #vbox
<bricker>
apeiros: I know that, I'm wondering about how to use the 'un' library to start a server
<jsilver>
to death
<bricker>
I read about it somewhere but can't find it
<apeiros>
bricker: find it, open it, read it
axsuul has quit [Ping timeout: 245 seconds]
<apeiros>
$LOADED_FEATURES contains the absolute path of required files
grzywacz has joined #ruby
<RubyTitmouse>
if Oracle and Google merged, the motto would be, "Only be evil"
<bricker>
ahhh it was the -e httpd option that I was missing
rickruby has quit [Remote host closed the connection]
<shevy>
RubyTitmouse yeah. "Once we are big, drop the don't be evil motto and start to be evil."
<RubyTitmouse>
"taking care of customers" -- mafia software consulting collection procedures
monkegjinni has joined #ruby
danshultz has joined #ruby
rickruby has joined #ruby
mgdixon has quit [Ping timeout: 245 seconds]
havenwood has quit [Remote host closed the connection]
Notte has quit []
kcombs has quit [Remote host closed the connection]
snuffeluffegus has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
<jsilver>
I wish I knew about overly complex shit that nobody wants so I could hang out with the Oracle cool kids
m8 has quit [Quit: Sto andando via]
<jsilver>
"Nobody likes us" - Overhead at Oracle
<jsilver>
OH*
efra_away has quit [Read error: Connection reset by peer]
wadawadawsda has joined #ruby
Jetchisel has joined #ruby
<jsilver>
I'm not really trolled, I'm just making that sort of Willy Wonka You did nothing! I said good day sir! type of look
<AlexRussia>
jsilver: Onalcle
danshultz has quit [Ping timeout: 250 seconds]
mikepack has quit [Remote host closed the connection]
xcv has quit [Remote host closed the connection]
zachallett has joined #ruby
<jsilver>
I assume that's a pun on "anal", if so, ha ha
sailias has quit [Quit: Leaving.]
* jsilver
closes the last Oracle page and never goes to oracle.com again
<jsilver>
may need to fix things a little by changing oracle.com to localhost in /etc/hosts
wadawadawsda has quit [Client Quit]
sambao21 has joined #ruby
arianit has joined #ruby
arianit has joined #ruby
arianit has quit [Changing host]
tyl has quit [Quit: Computer has gone to sleep.]
baroquebobcat has quit [Quit: baroquebobcat]
dkamioka has quit [Remote host closed the connection]
claymore has quit [Quit: Leaving]
baroquebobcat has joined #ruby
<lagweezle>
(1..500_000).map {|n| 2**(n-1) } consumes an amusing amount of memory.
zachallett has quit [Ping timeout: 272 seconds]
`petey` has quit [Remote host closed the connection]
`petey` has joined #ruby
daxroc has joined #ruby
agjacome has quit [Ping timeout: 245 seconds]
stkowski has quit [Quit: stkowski]
yasushi has joined #ruby
arianit has quit [Ping timeout: 272 seconds]
<lpvn>
my favorite lsd quote: 'LSD is a drug that causes insanity in people who have not taken it'
Wolland has quit [Remote host closed the connection]
freerobby has quit [Read error: Connection reset by peer]
freerobby1 has joined #ruby
Shidash has quit [Quit: Leaving.]
lmickh has quit [Remote host closed the connection]
wiku5_ has joined #ruby
`petey` has quit [Ping timeout: 246 seconds]
Soliah has joined #ruby
kirun has quit [Quit: Client exiting]
fgo has joined #ruby
geggam has quit [Remote host closed the connection]
snuffeluffegus has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
<bricker>
So now I have the ruby -run server serving up static files, but when I go to an audio URL, it just tries to download the file to my computer, instead of letting me listen in the browser (like if I went to file:///path/to/audio.mp3).
aryaching has quit [Ping timeout: 260 seconds]
codeFiend has joined #ruby
charliesome has joined #ruby
<bricker>
Is there something special that needs to be turned on in rack to get that working?
apeiros has quit []
freerobby1 has quit [Read error: Connection reset by peer]
pskosinski has quit [Quit: Til rivido Idisti!]
hobodave has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
stringoO has quit [Quit: stringoO]
`petey` has joined #ruby
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
<RubyTitmouse>
bricker: that is generally a matter of MIME type, see Rack::Mime
DrShoggoth has quit [Quit: Leaving]
ffranz has quit [Quit: Leaving]
shabgard has quit [Quit: Aji maji la taraji]
daxroc has quit [Quit: Leaving.]
<RubyTitmouse>
note that the browser has to also be configured properly for that
artm has quit [Read error: Operation timed out]
[krisbulman] is now known as krisbulman
daxroc has joined #ruby
monkegjinni has quit [Remote host closed the connection]
maximski has joined #ruby
nanoyak has joined #ruby
venkat has quit [Read error: Connection reset by peer]
glanotte has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arianit has joined #ruby
venkat has joined #ruby
andrewhl has joined #ruby
zipper has quit [Quit: leaving]
Zubin has quit [Quit: Leaving]
slowcon has quit []
mlpinit has quit [Remote host closed the connection]
chrisramon has joined #ruby
mlpinit has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
stonevil___ has quit [Quit: Computer has gone to sleep.]
angusiguess has joined #ruby
Nightmare has quit [Quit: DDoS has died, DDoS has risen, DDoS comin' again]
arianit has quit [Ping timeout: 250 seconds]
Nightmare has joined #ruby
mlpinit_ has joined #ruby
daxroc1 has joined #ruby
thesheff17 has quit [Remote host closed the connection]
daxroc has quit [Read error: Connection reset by peer]
Noldorin has quit []
angusiguess has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
mlpinit has quit [Ping timeout: 272 seconds]
ktosiek has quit [Ping timeout: 250 seconds]
atmosx has quit [Quit: WeeChat 0.4.2]
carif has joined #ruby
chrisramon has quit [Quit: chrisramon]
ctp has joined #ruby
sdelmore1 is now known as sdelmore
habanany has joined #ruby
jobewan has quit [Quit: Leaving]
vky has joined #ruby
dblessing has quit [Quit: dblessing]
EngierkO has quit [Ping timeout: 246 seconds]
dx7 has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 250 seconds]
Mars has joined #ruby
digifiv5e has joined #ruby
Mars has quit [Remote host closed the connection]
digifiv5e is now known as Guest97765
asmodlol has quit [Remote host closed the connection]
Wolland has joined #ruby
havenwood has joined #ruby
olivier_bK has quit [Ping timeout: 246 seconds]
aryaching has joined #ruby
localredhead has joined #ruby
<Mars`>
What's a good way to convert a hash into an object? I can use openstruct, but I'm assuming that's not the best way.
<RubyTitmouse>
Mars`: a hash is already an object
griffindy has quit [Quit: Computer has gone to sleep.]
workmad3 has quit [Quit: Lost terminal]
<Mars`>
RubyTitmouse: true. let me rephrase my question. I want to access hash elements as if they were attributes.
workmad3 has joined #ruby
nZac has quit [Read error: Connection reset by peer]
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JustinAiken has quit [Quit: Leaving.]
<grzywacz>
Mars`, an ImmutableStruct maybe, if you don't mind an additional gem?
elementz has joined #ruby
VTLob has quit [Quit: VTLob]
jacekplacek has quit [Quit: This computer has gone to sleep]
<RubyTitmouse>
Mars`: depends what the specific features you want are.
<Steve445>
When installing a gem, what allows you to call commands from that gem in terminal?
localred` has joined #ruby
closer has joined #ruby
Xiti has joined #ruby
enape_101 has quit [Ping timeout: 250 seconds]
<elementz>
... anyways, whats that constuct: /undefined method/ ? shouldn't that be "undefined method" ?
<Steve445>
Example when you install rails you can run the command Rails in terminal after
Beoran_ has quit [Read error: Operation timed out]
phansch has quit [Quit: Leaving]
x1337807x has joined #ruby
localredhead has quit [Ping timeout: 248 seconds]
IceDragon has quit [Quit: Space~~~]
andrewstewart has quit [Quit: Updating details, brb]
andrewstewart has joined #ruby
<Mars`>
RubyTitmouse: something like the stripe gem. How it retrieves the an json from an api route and then converts the json to a Charge object (for instance)
<Mars`>
looking through the code now for it, but it's very specific to this particular use case.
<RubyTitmouse>
yeah, but none of that touches on the differences between hash and openstruct so it leaves it unclear what semantics you want
Wolland has quit [Remote host closed the connection]
sethen has joined #ruby
andrewhl has quit [Quit: andrewhl]
fuhgeddaboudit has quit [Ping timeout: 250 seconds]
<Mars`>
RubyTitmouse: object_from_api[:attribute] vs object_from_api.attribute. The latter is what I want, which openstruct does. Only that now it's limiting because it's an openstruct object and not a Charge object or something. I could just inherent from openstrust, i'm just not sure if that's the best approach.
fgo has quit [Remote host closed the connection]
<RubyTitmouse>
>> class Foo; def initialize hsh={}; @hsh = hsh; @hsh.keys.each {|k| klass = class << self;self;end; klass.send(:define_method, k) {@hsh[k]} ; klass.send(:define_method, "#{k}="){|v| @hsh[k] = v } } end end ; Foo.new(:omg => 'ponies').omg