<Ox0dea>
Not a massive change, of course, but there nonetheless.
<Ox0dea>
I suppose it didn't end up mattering much on account of nobu's rewriting the extension bits to be incredibly concise and elegant for such a useful feature.
<Ox0dea>
Is it possible to invoke instance methods of singleton classes?
bryancp has quit [Ping timeout: 250 seconds]
ksteck has joined #ruby
<shevy>
I don't understand the change
cmoneylulz has joined #ruby
nk8 has joined #ruby
<shevy>
then again I also don't understand the did_you_mean gem either
<[k->
>> Array.singleton_class.[](1,2,3)
<shevy>
but it seems to be fairly minor
<ruboto>
[k- # => undefined method `[]' for #<Class:Array> (NoMethodError) ...check link for more (https://eval.in/448519)
<[k->
it is defined!
<shevy>
Ox0dea have you finally embraced frozen strings with your full heart?
<Ox0dea>
shevy: No, of course not.
<Ox0dea>
>> ('foo'.bar rescue $!).receiver
<ruboto>
Ox0dea # => undefined method `receiver' for #<NoMethodError: undefined method `bar' for "foo":String> (NoMethodE ...check link for more (https://eval.in/448520)
<Ox0dea>
shevy: That's "foo" in 2.3+.
<shevy>
wat
<Ox0dea>
That did_you_mean can just hook NameErrors and NoMethodErrors to determine the object on which to search for corrections is pretty convenient.
<[k->
>> Array.singleton_class.new(3)
<ruboto>
[k- # => can't create instance of singleton class (TypeError) ...check link for more (https://eval.in/448521)
patdohere has joined #ruby
<Ox0dea>
[k-: You simply cannot create instances of singleton classes, mate.
<Ox0dea>
But we can define instance methods just fine: `class << Class.new; def foo; end; end`.
<shevy>
<Radar> Diabolik: 2nd edition has the most up-to-date content :)
pawnbox_ has quit [Remote host closed the connection]
<ohcibi>
hi, i have a time like "13:00" and i want to add minutes... i'm not adding more than 200 minutes, so there is no daychange involved and I dont need to mess with timezones or anything, i just want to be able to 13:00 + 80 = 14:20.. can I do this with the Time class somehow? all i'm finding is adding or deleting times to a specific date
<ohcibi>
shevy: read what I wrote.... i'm asking how to do this without referencing a specific date and time, which is all I found in google..
<apeiros>
nonono @strptime
<apeiros>
Time != Duration, and "13:00" in the sense of "13 hours" is a duration, not a time.
beauby has joined #ruby
karapetyan has joined #ruby
shoutsid has quit [Remote host closed the connection]
<jhass>
ohcibi: might be 13:00 o'clock, question was vague in that regard
<jhass>
er, apeiros ^
kalusn has quit [Remote host closed the connection]
<ohcibi>
its NOT 13 o clock
<ohcibi>
its 13 hours and zero minutes
<apeiros>
jhass: ok, true. but now we have clarification :)
<shevy>
aaaah
<ohcibi>
13 hours and zero minutes can usually be displayed as 13:00
<ohcibi>
same as 13 o clock would be displayed
<shevy>
yes!
<jhass>
13 minutes and 0 seconds is too
<shevy>
haha
<ohcibi>
so i want to add 20 minutes to 13 hours and zero minutes and not to 13 o clock
<jhass>
well see my link and add :00 to make it unambiguous
<shevy>
I needed something like that for calculating how much video to cut away via ffmpeg once
roshanav_ has quit [Read error: Connection reset by peer]
<ohcibi>
so there is no builtin class that can deal with this, is this kind of math hardcoded into the Time class? i'd expect that the Time class uses some independent module to do such calculations?
<jhass>
doesn't it use libc for most of that stuff?
YankNYC has quit [Quit: Connection closed for inactivity]
<jhass>
so no, there isn't
<jhass>
Time deals with points in time only, not duration
<ohcibi>
idk... its terribly hard to google for this, as 99% is related to "Time" and not "Duration" problems
<shevy>
didn't apeiros have some gem called chronos or so for that?
<ohcibi>
nah i dont want to use an extra gem
<ohcibi>
i'm writing a rakefile and the only thing I want to expect from the users is that they have ruby installed
<jhass>
hours, minutes = .split(":").map(&:to_i) works too I guess
<shevy>
:)
skade has quit [Quit: Computer has gone to sleep.]
<ohcibi>
what I need is the other way around, but yes, it'll work
<jhass>
"the other way around" is a simple divmod
<ohcibi>
i know
<ohcibi>
but i dont need to do this when dealing with Time
<ohcibi>
so i've asked if this is possible with durations but not with Time
<jhass>
you're not dealing with times though, you're dealing with durations
<ohcibi>
yes
<ohcibi>
thats what we learned some lines above 8-)
<jhass>
and the answer is no, stdlib doesn't have any duration handling
peteykun has quit [Ping timeout: 250 seconds]
<shevy>
stdlib understands time though!
joonty has quit [Quit: joonty]
<ohcibi>
jhass: youve already told me that 8-)
<shevy>
jhass: you already told him that several times!
<jhass>
then why are we still talking?
<ohcibi>
jhass: idk
<ohcibi>
shevy: time but not duration
<shevy>
perhaps a Time.duration method
sheperson has joined #ruby
mllie has joined #ruby
<shevy>
but duration is not time!
<shevy>
assumingly ruby core would not want to add a new Duration toplevel namespace either
<jhass>
the question is if Time#-(Time) is duration
bowl323 has joined #ruby
<jhass>
shevy: in Crystal we're calling it Time::Span for now
<shevy>
aha
<bowl323>
I'm looking to learn either Ruby or Python, which is the better choice?
<jhass>
bowl323: Ruby. Now ask #python and get Python as reply.
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<shevy>
no idea if python has such an interview
<shevy>
I still wonder what would have been different if I would have picked python back then
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<jhass>
mllie: seems pretty clear, any questions?
<jhass>
?better bowl323
<ruboto>
bowl323, "Best" and "better" are subjective. Try to use a different term.
shoutsid has joined #ruby
<shevy>
you could also try to go with perl 6 past 2015 bowl323 :)
pawnbox has quit [Remote host closed the connection]
<mllie>
jhass: Yes, for example what does rvm cleanup all?
<shevy>
larry wall's keynote was all about hobbits
pawnbox has joined #ruby
<havenn>
mllie: You can read about the `rvm cleanup all` command with `rvm help cleanup`.
<jhass>
mllie: I would expect rvm help cleanup explains it
leafybasil has joined #ruby
lkba has joined #ruby
<havenn>
shevy: hobbitses do make good programmers
<mllie>
jhass: Alright, and what do I need to fix for these warnings then? And how do I recheck if I've done right?
<jhass>
you did read them, right?
tk__ has joined #ruby
bowl323 has left #ruby [#ruby]
bonhoeffer has joined #ruby
<mllie>
jhass: yes
<jhass>
so what do you think you would need to do?
<mllie>
jhass: And I also think it's look a bit weird in my path variable with all these rvm-paths. Is that correct?
CloCkWeRX has quit [Ping timeout: 240 seconds]
mm_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
pili-h has quit [Ping timeout: 250 seconds]
shoutsid has quit [Remote host closed the connection]
jgt has quit [Ping timeout: 250 seconds]
<jhass>
isn't RVM just telling you it isn't?
leafybasil has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
zotherstupidguy has joined #ruby
zotherstupidguy has quit [Client Quit]
<mllie>
jhass:true
karapetyan has joined #ruby
riotjone_ has joined #ruby
<havenn>
mllie: `PATH="$PATH:/stuff"` is appending to PATH. `PATH="/stuff:$PATH"` is prepending to PATH. One of the RVM warnings is that you're nuking PATH like `PATH="/stuff:/existing/path/ignored"`.
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jamesaxl has quit [Ping timeout: 246 seconds]
brunto has joined #ruby
jamto11 has joined #ruby
PaulCapestany has joined #ruby
lkba_ has joined #ruby
DoubleMalt has quit [Ping timeout: 264 seconds]
PaulCape_ has quit [Ping timeout: 250 seconds]
PaulCapestany has quit [Max SendQ exceeded]
stardiviner has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 264 seconds]
jamto11 has quit [Ping timeout: 244 seconds]
PaulCapestany has joined #ruby
SylarRuby has quit []
sameerynho has quit [Quit: Leaving]
Zamyatin has joined #ruby
DoubleMalt has joined #ruby
Soda has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
grzegorz has joined #ruby
ericjphillips has joined #ruby
arup_r has joined #ruby
The_Phoenix has quit [Ping timeout: 268 seconds]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
<yardenbar>
Hi all, can anyone suggest how to connvet from a ruby 1.8.6 script(yep, can't upgrade) to a Vertica node?
<shevy>
what is a vertica node
dawkirst has quit [Quit: Leaving...]
The_Phoenix1 has joined #ruby
ericjphillips has quit [Quit: Leaving.]
ericjphillips has joined #ruby
mm_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shredding has quit [Ping timeout: 255 seconds]
The_Phoenix has quit [Ping timeout: 255 seconds]
mm_ has joined #ruby
<[k->
we don't even know if such a thing as a vertical node exists
<[k->
and all these weird nomenclature floating around doesnt help!
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
yeah and people using 1.8.6
<shevy>
it's like the past comes alive!
shinnya has joined #ruby
mm_ has quit [Ping timeout: 240 seconds]
jessemcgilallen has quit [Quit: jessemcgilallen]
tkuchiki_ has quit [Remote host closed the connection]
freezevee has quit [Ping timeout: 260 seconds]
<yardenbar>
I meant HP Vertica
ruurd has joined #ruby
jdawgaz has joined #ruby
jamto11 has joined #ruby
freezeve_ has joined #ruby
karapetyan has joined #ruby
<noethics>
step 1. find someone who knows ruby and vertica
<noethics>
step 2. hire them
freezeve_ has quit []
freezevee has joined #ruby
roshanavand has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
<yardenbar>
Done :)
apt-get has joined #ruby
chipotle has quit [Quit: cheerio]
roshanavand has quit [Ping timeout: 268 seconds]
ruurd has joined #ruby
brunto has quit [Ping timeout: 256 seconds]
Emmanuel_Chanel has joined #ruby
karapetyan has quit [Remote host closed the connection]
lolmaus has quit [Ping timeout: 240 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Emmanuel_Chanel>
Hello! Is there a good web explanation how to save IMAP folder's mails into local Maildir?
<bougyman>
what did you google for?
<bougyman>
fetchmail should be able to cut that pretty easily.
<bougyman>
are you looking for a ruby solution, or just a solution?
<Emmanuel_Chanel>
I saw some ruby scripts. And I edited one into my own script reading an IMAP folder and saving them into my local IMAP server.
<Emmanuel_Chanel>
It categorize those mails to some. But I don't want to show my local shell password.
<jhass>
fetchmail + sieve ?
<Emmanuel_Chanel>
Ruby solution.
<Emmanuel_Chanel>
ok. I check.
apt-get has quit [Ping timeout: 250 seconds]
<jhass>
for example pigeonhole for dovecot
Xiti has quit [Quit: Xiti]
<shevy>
yardenbar well when it comes to ruby, such as syntax problems, you can always put problematic code on a pastie and people can try to help; HP Vertica though, I don't think many people know it, I never heard of it before for instance
lolmaus has joined #ruby
Cyther has quit [Quit: Leaving]
<yardenbar>
shevy, thank you, I'll persue a solution through Vertica and not deal with ruby stuff
guardianL has joined #ruby
mfb2 has quit [Quit: Leaving.]
<yardenbar>
Its not a must
guardianL has left #ruby [#ruby]
Mia has quit [Read error: Connection reset by peer]
<DEA7TH>
def A.bar '' end - after I did that, can I undo it?
grenierm has joined #ruby
<DEA7TH>
I need to mock a method, but instead of returning a constant value, I want the output to depend on the input
<adaedra>
You can override it by re-defining it again
<noethics>
if i had a module embedded in a class, how do i access stuff inside the module with an instance of the class?
<DEA7TH>
I want to restore the original implementation, but I don't want to copypaste it.
vdamewood has quit [Ping timeout: 252 seconds]
<shevy>
DEA7TH you can knock out methods; remove_method; undefine_method, however had if you have not captured the original implementation somewhere then there is no way to restore to it
<noethics>
>> class A; module B; def C(); puts 'o'; end; end; end; a = new A::B; a.C()
<ruboto>
noethics # => undefined method `new' for main:Object (NoMethodError) ...check link for more (https://eval.in/448628)
acke_ has joined #ruby
acke has quit [Read error: Connection reset by peer]
<noethics>
A::B.new
<noethics>
?
<shevy>
a non-ruby user!!!
<noethics>
>> class A; module B; def C(); puts 'o'; end; end; end; a = A.new; a::B.C()
<ruboto>
noethics # => #<A:0x4083bd60> is not a class/module (TypeError) ...check link for more (https://eval.in/448629)
<shevy>
he put the new on the left side !
<noethics>
:'(
fon has joined #ruby
moeabdol has quit [Ping timeout: 252 seconds]
tier_ has joined #ruby
riskish has joined #ruby
<fon>
In Ruby, what exactly is the top-level scope? Is it a class? A module?
sankaber has joined #ruby
sankaber has quit [Remote host closed the connection]
<jhass>
fon: an anonymous instance of Object called main
<adaedra>
noethics: C is a module, you have to include it somewhere to use methods inside.
<noethics>
ive read these docs
<noethics>
but they dont show an instance like this
apt-get has joined #ruby
<noethics>
do i refer to it with A::B and extend that?
<jhass>
yes
<fon>
jhass: I just don't understand how the top-level scope is an instance of Object. That must mean the code at the top-level is being writting inside an instance of Object. How can we write code inside an instance?
<noethics>
ruby is like the wild west of languages
<fon>
I want to read The Programming Language by Matz but it's too old.
<fon>
The Ruby Programming Language*
<jhass>
DEA7TH: Write delegator and unwrap. See SimpleDelegator in the delegate stdlib
roshanavand has quit [Ping timeout: 250 seconds]
<jhass>
Write a *
lubarch has joined #ruby
<fon>
jhass: Okay what happens when we require a file? Does the file get executed in a top-level scope that's above the main scope?
moeabdol has joined #ruby
_blizzy_ has quit [Ping timeout: 268 seconds]
<jhass>
fon: each file gets its own main instance, local variables are local to a file
<DEA7TH>
jhass: that only seems to work for instances, but I'm using a class method
<shevy>
if we have class Foo; end, and two different modules, can we uninclude one module, then attach the second one, then remove the second one again, and attach the first one? like module flip-flopping?
diegoaguilar has joined #ruby
justin_pdx has joined #ruby
<jhass>
fon: the definee is Object, so constants get childs of the Object namespace, methods get private methods on Object
<jhass>
DEA7TH: a class is just an instance of Class
<jhass>
shevy: delegator for you too
<noethics>
ok team i did it
Mon_Ouie has quit [Ping timeout: 272 seconds]
<noethics>
i dont understand why the author of this code decided to do this
<jhass>
solve your problems with composition, not inheritance
pawnbox has quit [Remote host closed the connection]
<DEA7TH>
ugh. Is there a simple way to stub a method so that it returns a value depending on the input? And then unstub it
ruurd has quit [Quit: ZZZzzz…]
<jhass>
DEA7TH: are you doing this for testing?
<noethics>
whats the point of putting a module in a class if you can't reference the module with an instance of the class
justin_pdx has quit [Client Quit]
pawnbox has joined #ruby
<noethics>
are there legitimate use cases?
<jhass>
noethics: the fact that it's a class is irrelevant, it's simply used as a namespace here
<DEA7TH>
jhass: Yes. The tested method takes an array and saves the adjacency matrix for its elements. Internally it uses a class to query Google Maps API in order to get the distances.
<DEA7TH>
I want to stub the internal class so that it returns certain things, which then I expect to be saved to the DB
<DEA7TH>
It sometimes recursively calls itself, and I don't want to tightly couple tests to that. I want to test for correct behavior only
<noethics>
jhass, oh
yardenbar has quit [Ping timeout: 252 seconds]
<DEA7TH>
But I have a simple solution as long as I can make a dynamic stub
ruurd has joined #ruby
<jhass>
DEA7TH: ideally you would make that class a parameter so you could pass a stub one in your class. But which testing framework?
<jhass>
* in your tests
<DEA7TH>
jhass: TestUnit with shoulda-context, mocha and factory girl.
candelabra has joined #ruby
<shevy>
aha so all of them
fon has quit [Quit: Page closed]
<candelabra>
If I'm trying to programatically access the data at this url: https://transcription.si.edu/json/October062015TransGeo.json and I have the username and password it's asking for, whats the best approach? What would you call that type of authentication?
andykingking has quit [Quit: Leaving.]
<jhass>
DEA7TH: so use mocha?
<DEA7TH>
will try that
<jhass>
candelabra: that's called basic auth most commonly
Xiti has joined #ruby
<candelabra>
jhass: Would I use net/http for that? open-uri?
<jhass>
I *think* most convenience wrappers will parse it in formats like https://user:password@transcript....
ttilley has quit [Read error: Connection reset by peer]
<ruboto>
candelabra, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<candelabra>
thanks everyone*
<jhass>
:)
<candelabra>
i immediately said guys and almost said "and/or gals" and should have
<candelabra>
but everyone, folks, all would have been better
<jhass>
DEA7TH: so throw out mocha and implement your own mocking framework I guess
<DEA7TH>
jhass: I hope that for the remaining 99%, it will work fine
<jhass>
because not invented here or something
CloCkWeRX has quit [Ping timeout: 272 seconds]
<jhass>
if it doesn't work for that it's a worthless pile of junk
<dorei>
is monkey patching a subtle reference to monkeys typing random stuff that'll eventually type shakespear's works? :D
<DEA7TH>
jhass: mocha didn't support that use case
<DEA7TH>
it was a very obscure use of recursion where each recursive call won't call itself again. And I wanted to test in a certain way.
bluOxigen has quit [Ping timeout: 260 seconds]
<jhass>
sounds like you test implementation instead of observable behavior
s00pcan has quit [Ping timeout: 250 seconds]
shinnya has quit [Ping timeout: 256 seconds]
weihan has quit [Quit: Leaving...]
ndrei has quit [Ping timeout: 240 seconds]
<shevy>
dorei good question, not entirely sure how it originated. I think monkeys are awesome but it's often used as if it were a bad thing to be able to modify core behaviour (except for not being able to restore to the tabula rasa state, I think ruby should offer that for core/stdlib components)
roshanavand has quit [Ping timeout: 264 seconds]
eminencehc has joined #ruby
simplyianm has quit [Remote host closed the connection]
s00pcan has joined #ruby
simplyianm has joined #ruby
cashnguns has joined #ruby
codecop has quit [Remote host closed the connection]
<shevy>
one day monkeys may be able to program
<shevy>
bonobos can do sign language, for about 300 or 400 elements
<shevy>
hmm nope... I meant to say, they can *understand* it... I don't think they can do so on their own
bonhoeffer has joined #ruby
tkuchiki has joined #ruby
<noethics>
they can play games on ipads
vdamewood has joined #ruby
<shevy>
I see them in the subway!
moeabdol has quit [Ping timeout: 240 seconds]
<DEA7TH>
(Actually I had to use Foo.singleton_class.send(:alias_method, :old_bar, :bar) for class methods but it works now)
fooxbar has joined #ruby
<noethics>
i'm not sure that i like ruby at all
<noethics>
everything feels like i'm doing reflection
<noethics>
like i'm referring to runtime variables because of limitations in the language or something
soosfarm has joined #ruby
<noethics>
i feel like maybe if i wrote this codebase then i could design it the way i want and not have to rely on this stuff though
<DEA7TH>
it is a rare use case
<noethics>
so maybe slightly biased opinion
kalusn has joined #ruby
acke has joined #ruby
The_Phoenix has joined #ruby
soosfarm has quit [Excess Flood]
soosfarm has joined #ruby
<noethics>
i learn ruby again every 6 months it seems like
<shevy>
the names can be strange yeah
<shevy>
.instance_eval versus .class_eval
<noethics>
like the fact that using that is even a thing
<noethics>
i could see if you were doing it for serialization or instrumentation
<shevy>
I don't think I ever had to do Foo.singleton_class though
<[spoiler]>
they can be useful
<noethics>
but it's totally normal to use these runtime thingies in common code
rgtk_ has quit []
<noethics>
which seems bad to me intuitively
<[spoiler]>
instance_eval can be useful when you're making a DSL, altho other than that I'd not use it unless it's debugging
acke_ has quit [Ping timeout: 255 seconds]
tmtwd has joined #ruby
Coldblackice_ has quit [Ping timeout: 244 seconds]
jsuth has joined #ruby
<noethics>
fwiw .to_json should do whatever YAML::dump does. i ended up dumping to YAML, passing it to a proper language, parsing the YAML and dumping the json
<shevy>
why
<shevy>
yaml is different to json isn't it?
<noethics>
you can represent everything that YAML::dump marshals as json
shoutsid has quit [Remote host closed the connection]
EllisTAA has joined #ruby
patdohere has quit [Read error: Connection reset by peer]
<shevy>
we need that in ruby too, noethics will be the main author :)
jamto11 has joined #ruby
<noethics>
" based on whether the language makes it difficult for its developers to write error-free code"
<noethics>
Kappa
stamina has quit [Ping timeout: 255 seconds]
The_Phoenix has quit [Read error: Connection reset by peer]
<shevy>
computers should program
sczizzo has joined #ruby
jamto11_ has joined #ruby
UtkarshRay has quit [Ping timeout: 240 seconds]
shoutsid has joined #ruby
tier_ has joined #ruby
jamto11 has quit [Ping timeout: 260 seconds]
sczizzo has quit []
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
acke has quit [Remote host closed the connection]
nerium has joined #ruby
Kerber0s has joined #ruby
<jhass>
yaml is a superset of json these days
mistermocha has joined #ruby
PaulCape_ has joined #ruby
jgt has joined #ruby
<nerium>
If I have a pam file (SSL root certificate), do I need to add it to my servers list of certificates or can I just pass it a long when doing the request?
PaulCapestany has quit [Ping timeout: 250 seconds]
tmtwd has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
_Kerber0s_ has joined #ruby
mistermocha has quit [Remote host closed the connection]
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
inteq has quit [Remote host closed the connection]
maletor_ has joined #ruby
davedev24 has joined #ruby
last_staff has joined #ruby
ericjphillips has quit [Quit: Leaving.]
hanmac has joined #ruby
grzegorz has quit [Remote host closed the connection]
<bonhoeffer>
are there any docs for ffi inputs, etc — for example, should [:string] stand for an array that contains a tokenized copy of the input text
jgt has quit [Ping timeout: 264 seconds]
eminencehc has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
stamina has joined #ruby
Kendos-Kenlen has joined #ruby
speakingcode has joined #ruby
otherj has joined #ruby
Zamyatin has joined #ruby
ruurd has joined #ruby
grzegorz has joined #ruby
jamto11_ has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
atmosx has joined #ruby
karapetyan has joined #ruby
mistermocha has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
aaeron has joined #ruby
aaeron has quit [Client Quit]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
framling has joined #ruby
bonhoeffer has joined #ruby
vdamewood has quit [Quit: Life beckons.]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<bonhoeffer>
what does output like this mean: 8a��� — i’m exporting char** to :string in ffi
mistermocha has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
inteq has joined #ruby
northfurr has quit [Quit: northfurr]
Zamyatin has quit [Ping timeout: 265 seconds]
tinyhippo is now known as cowconfirmer
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
beauby has joined #ruby
grenierm has joined #ruby
exadeci has joined #ruby
swgillespie has joined #ruby
grenierm has quit [Client Quit]
stamina has quit [Quit: WeeChat 1.3]
ruurd has quit [Ping timeout: 256 seconds]
bonhoeffer has quit [Quit: bonhoeffer]
ruurd has joined #ruby
Zamyatin has joined #ruby
lokson has joined #ruby
cowconfirmer is now known as tinyhippo
jamto11 has joined #ruby
tmtwd has quit [Ping timeout: 260 seconds]
jamto11 has quit [Remote host closed the connection]
shredding has quit [Ping timeout: 260 seconds]
roshanavand has joined #ruby
<nerium>
jhass: Sorry, missed your message.
peteykun has quit [Ping timeout: 264 seconds]
kies^ has quit [Ping timeout: 264 seconds]
jamto11 has joined #ruby
<nerium>
jhass: Yeah, that must be the same thing as adding the certificate to the server directly
<prateekp>
it just puts README.md which i am passing through extra_rdoc_files option in gempec
ericjphillips has joined #ruby
Zamyatin has quit [Ping timeout: 252 seconds]
<Cache_Money>
jhass: I tried `gem pristine --all` didn't work. I've tried running `gem prestine <gem>` before and it didn't get rid of the notifications
<prateekp>
i think the reason is that the directory of source is differnect
<prateekp>
its like project/dir/ruby/lib/*
<prateekp>
oops
<prateekp>
projectdir/ruby/lib/*
<jhass>
probably
toretore has joined #ruby
<havenwood>
Cache_Money: Try my comment on your gist.
<prateekp>
shevy: can i specifically build only project/dir/ruby/lib/* sources documentation
<jhass>
prateekp: why not put your C stuff into ext and have everything in ruby/ at the root?
ramfjord has joined #ruby
<Cache_Money>
havenwood: I tried `gem pristine eventmachine --version 1.0.3` and got `ERROR: While executing gem ... (Gem::Exception) Failed to find gems ["eventmachine"] = 1.0.3`
<jhass>
that be a much more standard structure and give you less similar surprises
shredding has joined #ruby
beast has joined #ruby
dagda1_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
northfurr has quit [Quit: northfurr]
<shevy>
ah, a C-gem. no idea how to work with C-gems really
<prateekp>
hmm
<havenwood>
Cache_Money: Did EM 1.0.3 get uninstalled since you did the initial gist?
tier_ has joined #ruby
<havenwood>
Cache_Money: Update your gist with the latest output.
<prateekp>
can i hide documentation link?
<jhass>
I don't think so
k3asd` has joined #ruby
shinnya has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
roshanavand has joined #ruby
ericjphillips has quit [Quit: Leaving.]
ruurd has quit [Read error: Connection reset by peer]
<mehwork>
speaking of rbenv, is there a way to make it rehash automatically somehow? I hate having to type 'rbenv rehash' every time i install any command
leafybas_ has quit [Ping timeout: 272 seconds]
<havenwood>
kimegede: This way no shims to have to reshim and it uses your Homebrew OpenSSL.
<havenwood>
mehwork: Switch to chruby? :P
<kimegede>
:D
<mehwork>
i just switched to rbenv from rvm
<havenwood>
mehwork: You can even use your rbenv-installed Rubies still if you'd like: RUBIES+=(~/.rbenv/versions/*)
<mehwork>
how do i know switching to chruby won't require switchign to somehing else in a week :p
<havenwood>
mehwork: It's a 100 lines shell script. It just works. It'll keep working.
yardenbar has joined #ruby
diegoaguilar has quit [Ping timeout: 240 seconds]
<mehwork>
all i hear is 100 lines of hell
<havenwood>
mehwork: Better than > 10,000 lines of hell. :P
<mehwork>
i use zsh, will that matter?
<havenwood>
mehwork: Fully supported.
<havenwood>
mehwork: I use zsh and test chruby and ruby-install against it.
<mehwork>
i guess i'll try it after i upgrade to el capitan
oetjenj has joined #ruby
<havenwood>
mehwork: Tested with El Capitan as well.
<havenwood>
mehwork: Actually has tests!
<mehwork>
cool
Kendos-Kenlen has quit [Quit: Konversation terminated!]
<kimegede>
havenwood: Fixed it, uninstalled openssl and installed it again.
eikood has quit [Remote host closed the connection]
finisherr has left #ruby [#ruby]
gregf has quit [Quit: WeeChat 1.3]
eikood has joined #ruby
lokson has quit [Quit: WeeChat 1.0.1]
tier_ has joined #ruby
ruurd has joined #ruby
<benlieb>
can I pipe code to execute to ruby?
ruurd has quit [Client Quit]
<jhass>
?try
<ruboto>
Why don't you try it and see for yourself?
<benlieb>
I know about -e, but
<benlieb>
jhass: don't be silly
<benlieb>
the question is how
<apeiros>
jhass: in ruby I it's always .each_byte, even with unicode
<benlieb>
not can I
<shevy>
I shall declare - the next year will be the year of Hurd, with systemd AND the desktop of the year!
atmosx has quit [Quit: Lost in trance]
<jhass>
benlieb: I don't think you tried
<benlieb>
jhass: jesus
eikood has quit [Remote host closed the connection]
<shevy>
jhass: god
<shevy>
just wanted to get spiritual :-)
<jhass>
there's only one godess and its Eris
<jhass>
I'm a pope though
eikood has joined #ruby
<apeiros>
benlieb: your question literally was "can I". and yes, you can. and how - the same way piping works with all other exes, with a | sign.
<apeiros>
benlieb: so jhass ?try was a quite adequate answer.
l_tonz has joined #ruby
jun_ has joined #ruby
shoutsid has quit [Remote host closed the connection]
eikood has quit [Remote host closed the connection]
tkuchiki has joined #ruby
bonhoeffer has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
eikood has joined #ruby
framlinqp has quit [Remote host closed the connection]
gregf has joined #ruby
framlinqp has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
<shevy>
benlieb there is a cool way to pipe ruby code on the commandline and have it colourized, via the gem "coderay", this should work when code is installed: "cat foo.rb | coderay -ruby"
l_tonz has quit [Ping timeout: 260 seconds]
leafybasil has joined #ruby
lkba_ has quit [Remote host closed the connection]
gregoriokusowski has quit [Quit: gregoriokusowski]
tkuchiki has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 240 seconds]
zapata has quit [Ping timeout: 240 seconds]
bonhoeffer has quit [Quit: bonhoeffer]
subscope has quit [Quit: Leaving]
speakingcode has quit [Ping timeout: 244 seconds]
mozzarella has quit [Quit: WeeChat 1.2]
shoutsid has joined #ruby
mozzarella has joined #ruby
roshanavand has quit [Ping timeout: 252 seconds]
Alina-malina has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
jun_ has quit [Remote host closed the connection]
l_tonz has joined #ruby
zapata has joined #ruby
jamto11 has quit [Remote host closed the connection]
patdohere has joined #ruby
devbug_ has joined #ruby
jamto11 has joined #ruby
patdohere has quit [Max SendQ exceeded]
ZucchiniZe- is now known as ZucchiniZe
yardenbar has quit [Ping timeout: 255 seconds]
devbug has quit [Ping timeout: 250 seconds]
shoutsid has quit [Remote host closed the connection]
shoutsid has joined #ruby
jamto11 has quit [Ping timeout: 255 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
codecop has quit [Remote host closed the connection]
shoutsid has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phutchins has quit [Ping timeout: 256 seconds]
jun_ has joined #ruby
nettoweb has joined #ruby
roshanavand has joined #ruby
fastAndSlow has joined #ruby
<dorei>
i've got a hash and i want to compare it with another hash for equality but dont take into account one the keys, what's the most elegant way to do it?
maletor_ has quit [Quit: Computer has gone to sleep.]
beauby has quit [Ping timeout: 244 seconds]
benlieb has quit [Quit: benlieb]
<toretore>
you should do it the other way around probably: explicitly enumerat the keys you want to compare
<toretore>
%w[foo bar baz].all?{|k| h1[k] == h2[k] }
<havenwood>
i guess you don't want to mutate the Hash >.>
some_body has joined #ruby
<dorei>
it's part of a spec for a rest service and i can't possibly know beforehand what id will be assigned to it
<some_body>
im trying to read a regular .txt file with File.readlines, but I'm getting an invalid byte sequence in US-ASCII error, and I'm trying to call .split on each line
<some_body>
my code also has the magic comment # encoding: utf-8, so how can I read a txt file in as utf8?
<havenwood>
dorei: How about #reject the key you don't want then compare?
jun_ has quit [Remote host closed the connection]
finisherr has joined #ruby
<dorei>
havenwood: yeah, i'm doing that, but i'm looking for something more elegant, bcoz i dont want to repeat that for almost every expect in the spec
<finisherr>
How can I get option parser to give me summary info about ARGV[1]?
eikood has quit [Remote host closed the connection]
Channel6 has joined #ruby
<havenwood>
dorei: I don't understand what the rules for them being equal are. You have a Hash. You want to check if all of its keys/value pairs are present in another Hash? Can the other Hash have unlimited additional key/value pairs you don't know about and you don't care?
eikood has joined #ruby
<havenwood>
dorei: Or are there only certain additional keys allowed? Say more?
beauby has joined #ruby
Rollabunna has quit [Remote host closed the connection]
wallerdev has joined #ruby
roshanavand has quit [Ping timeout: 255 seconds]
shoutsid has quit [Remote host closed the connection]
<havenwood>
dorei: Or Gist examples.
<dorei>
havenwood: i want all the values be equal except for the value of :id keys which i dont know beforehand
dstarh has joined #ruby
<havenwood>
dorei: so the :id key should be there but you don't know the value?
<dorei>
yeap
Kerber0s has joined #ruby
<kimegede>
havenwood: After upgrading to 2.2.3 I need to reinstall all gems right?
<yorickpeterse>
hi
<finisherr>
I’m just going to have it be a param to a flag and call it a day
<yorickpeterse>
After spending the weekend continueing work on porting Addrinfo to Rubinius, I can see why people drink
odt has joined #ruby
<havenwood>
kimegede: I'd suggest installing gems fresh in your case. If you set `gem: "--env-shebang"` in your ~/.gemrc you'll not need to reinstall gems with 2.2.4 but you'll always need to with MINOR version bumps like this Christmas with 2.3.0.
<havenwood>
kimegede: If you don't need local docs might as well also skip that to make it go quickly: gem: "--no-document --env-shebang"
casadei has joined #ruby
<havenwood>
yorickpeterse: hi
<odt>
would i be correct in assuming ERB is the way to go to convert yaml into some other format, ie. m3u file?
<jhass>
mbff: it's a regular expression, not a glob pattern
<jhass>
.*\.rb
<jhass>
or .+\.rb
Rollabunna has quit [Ping timeout: 264 seconds]
Zamyatin has quit [Ping timeout: 255 seconds]
Zamyatin has joined #ruby
<toretore>
>> clearing :on; guard :minitest do; watch(%r{*.rb); end
<ruboto>
toretore # => /tmp/execpad-91748c3e4883/source-91748c3e4883:2: unterminated regexp meets end of file ...check link for more (https://eval.in/448716)
simplyianm has quit [Remote host closed the connection]
MasterNayru has joined #ruby
simplyianm has joined #ruby
<jhass>
yeah, also that
riotjone_ has joined #ruby
riotjone_ has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
<mbff>
true....
nerium has quit [Quit: nerium]
califerno has joined #ruby
riotjone_ has joined #ruby
riotjone_ has quit [Read error: Connection reset by peer]
nerium has joined #ruby
riotjone_ has joined #ruby
l_tonz has quit [Remote host closed the connection]
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
Kerber0s has joined #ruby
Jackneill has quit [Remote host closed the connection]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MasterNayru has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
jun_ has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby
gwendall has joined #ruby
beauby has quit [Ping timeout: 246 seconds]
jun_ has joined #ruby
riotjone_ has quit [Ping timeout: 255 seconds]
l_tonz has joined #ruby
RobertBirnie has quit [Client Quit]
SenpaiSilver has quit [Quit: Leaving]
rakm has joined #ruby
MasterNayru has joined #ruby
Kerber0s has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby
fastAndSlow has joined #ruby
Kerber0s has joined #ruby
cashnguns has quit [Ping timeout: 240 seconds]
l_tonz has quit [Ping timeout: 246 seconds]
diegoaguilar has joined #ruby
nerium has quit [Quit: nerium]
Zamyatin has quit [Ping timeout: 250 seconds]
shredding has quit [Ping timeout: 252 seconds]
nerium has joined #ruby
sheperson has joined #ruby
<sheperson>
Hi
baroquebobcat has joined #ruby
<sheperson>
I am really confused
<sheperson>
I have a class, with attr_accessor :data
marr has joined #ruby
<sheperson>
and in the initializer I set the data to hash
<sheperson>
but when I try to read it, it is nil
solocshaw has quit [Ping timeout: 264 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jessemcgilallen has quit [Quit: jessemcgilallen]
MasterNayru has quit [Ping timeout: 244 seconds]
l_tonz has joined #ruby
charliesome has joined #ruby
MasterNayru has joined #ruby
patdohere has joined #ruby
rushed has joined #ruby
swgillespie has joined #ruby
podman has joined #ruby
monod has joined #ruby
jobewan has joined #ruby
MasterNayru has quit [Read error: Connection reset by peer]
l_tonz has quit [Ping timeout: 264 seconds]
cdolan has joined #ruby
nerium has quit [Quit: nerium]
<shevy>
not possible
<shevy>
show code
Zamyatin has joined #ruby
nerium has joined #ruby
jokke has quit [Quit: WeeChat 1.3]
patdohere has quit [Read error: Connection reset by peer]
sheperson has quit [Ping timeout: 268 seconds]
sheperson_ has joined #ruby
l_tonz has joined #ruby
jokke has joined #ruby
tkuchiki has joined #ruby
sheperson_ has quit [Client Quit]
acke has quit [Remote host closed the connection]
bb010g has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
perturbation has joined #ruby
S_Walker has quit [Ping timeout: 264 seconds]
finisherr has quit [Quit: finisherr]
l_tonz has quit [Ping timeout: 264 seconds]
SenpaiSilver has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
benlieb_ has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
naftilos76 has joined #ruby
wallerdev has quit [Quit: wallerdev]
matp has quit [Ping timeout: 240 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nateberkopec has joined #ruby
S_Walker has joined #ruby
l_tonz has joined #ruby
matp has joined #ruby
matp has quit [Max SendQ exceeded]
matp has joined #ruby
tubuliferous has joined #ruby
freezevee has quit [Ping timeout: 264 seconds]
haylon has joined #ruby
l_tonz has quit [Ping timeout: 268 seconds]
jamesaxl|2 is now known as jamesaxl
tier_ has quit [Remote host closed the connection]