Mia has quit [Read error: Connection reset by peer]
<Radar>
?best
<ruby[bot]>
"better" and "best" depend entirely on your context. Try to describe what quality would make one thing better than the other.
* Radar
was scrolled way too far up'
RegulationD has quit [Ping timeout: 250 seconds]
bkxd has quit [Ping timeout: 252 seconds]
jackjackdripper1 has quit [Quit: Leaving.]
sneakerhax has quit [Ping timeout: 244 seconds]
marr has quit [Ping timeout: 260 seconds]
SilverKey has quit [Quit: Halted.]
benlieb has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
devbug has joined #ruby
xfbs has quit []
workmad3 has joined #ruby
FooMunki has joined #ruby
agent_white has quit [Quit: brb]
stardiviner has quit [Ping timeout: 246 seconds]
n_blownapart has quit []
Spami has joined #ruby
devbug has quit [Ping timeout: 240 seconds]
Puffball has quit [Remote host closed the connection]
stardiviner has joined #ruby
Rasi has quit [Quit: WeeChat 1.4]
Rasi has joined #ruby
madgen has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
rocksynth has joined #ruby
baweaver has quit [Remote host closed the connection]
<rocksynth>
Hello. I've never used IRC before, although I have seen it mentioned for years. I am looking for an active Ruby community, but they seem to be quite rare.
SCHAAP137 has quit [Quit: Leaving]
<Ox0dea>
rocksynth: To what end?
<rocksynth>
Not quite sure I understand the question.
RyanMcCoskrie has left #ruby ["Konversation terminated!"]
pawnbox has joined #ruby
amclain has quit [Quit: Leaving]
Spami has quit [Quit: This computer has gone to sleep]
workmad3 has quit [Ping timeout: 276 seconds]
shaman42 has quit [Ping timeout: 244 seconds]
SCHAAP137 has joined #ruby
ixti has quit [Read error: Connection reset by peer]
hfp has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 276 seconds]
benlieb has quit [Quit: benlieb]
hfp has joined #ruby
rocksynth has quit [Ping timeout: 250 seconds]
hfp_work has joined #ruby
SCHAAP137 has quit [Quit: Exiting...]
devbug has joined #ruby
shaman42 has joined #ruby
Ebok has joined #ruby
idefine has joined #ruby
tubuliferous has quit [Ping timeout: 250 seconds]
devbug has quit [Quit: ZZZzzz…]
arescorpio has quit [Quit: Leaving.]
zacstewart has joined #ruby
wldcordeiro has quit [Ping timeout: 276 seconds]
ur5us has quit [Remote host closed the connection]
torandu has quit [Ping timeout: 244 seconds]
wldcordeiro has joined #ruby
fossel has quit [Quit: fossel]
torandu has joined #ruby
nando293921 has joined #ruby
fossel has joined #ruby
fossel has quit [Max SendQ exceeded]
idefine has quit [Read error: Connection reset by peer]
idefine has joined #ruby
smathy is now known as smathy_afk
chouhoulis has joined #ruby
fossel has joined #ruby
fossel has quit [Client Quit]
tubuliferous has joined #ruby
chouhoulis has quit [Remote host closed the connection]
JakFrist has joined #ruby
lkba_ has quit [Ping timeout: 268 seconds]
chouhoulis has joined #ruby
FooMunki has quit [Quit: FooMunki]
saneax is now known as saneax_AFK
doublemalt_ has quit [Ping timeout: 240 seconds]
elifoster has joined #ruby
siaw has joined #ruby
agent_white has joined #ruby
<agent_white>
Evenin
DefV has quit [Ping timeout: 244 seconds]
DefV has joined #ruby
SilverKey has joined #ruby
zeroDivisible has quit [Ping timeout: 244 seconds]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
bruce_lee has quit [Remote host closed the connection]
<zacts>
evening
<zacts>
=)
jenrzzz has quit [Ping timeout: 252 seconds]
p1k has joined #ruby
statelesscode has joined #ruby
LoneHermit has joined #ruby
LoneHermit has quit [Remote host closed the connection]
cpup has quit [Ping timeout: 268 seconds]
tomeara has quit [Quit: (null)]
cpup has joined #ruby
bronson has joined #ruby
LoneHermit has joined #ruby
Puffball has joined #ruby
diegoaguilar has quit [Ping timeout: 244 seconds]
bronson has quit [Ping timeout: 246 seconds]
northrup has joined #ruby
FooMunki has joined #ruby
zacstewart has quit [Ping timeout: 260 seconds]
null__ has quit [Ping timeout: 264 seconds]
rodfersou has quit [Quit: leaving]
TheMoonMaster has quit [Ping timeout: 250 seconds]
Caelum has quit [Ping timeout: 268 seconds]
dudepare has joined #ruby
FooMunki has quit [Ping timeout: 260 seconds]
SilverKey has quit [Quit: Halted.]
duckpuppy has joined #ruby
yfeldblum has quit [Remote host closed the connection]
hfp_ has joined #ruby
arescorpio has joined #ruby
hfp_work has quit [Ping timeout: 246 seconds]
hfp__work has joined #ruby
hfp__work is now known as hfp_work
hfp has quit [Ping timeout: 260 seconds]
hfp_ is now known as hfp
null__ has joined #ruby
Stazer has quit [Ping timeout: 276 seconds]
DoubleMalt has joined #ruby
A124 has joined #ruby
helpa has quit [Remote host closed the connection]
Caelum has joined #ruby
helpa has joined #ruby
roadt has joined #ruby
roadt has quit [Max SendQ exceeded]
<p1k>
I have rails server taking up 1.5gb -- ideas for detecting memory leaks ?
dudepare has quit [Remote host closed the connection]
Devalo has joined #ruby
roadt has joined #ruby
roadt has quit [Max SendQ exceeded]
yfeldblum has joined #ruby
zacstewart has joined #ruby
roadt has joined #ruby
TheMoonMaster has joined #ruby
Ebok has quit [Quit: This computer has gone to sleep]
Devalo has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
siaw has quit [Quit: siaw]
palms has joined #ruby
siaw has joined #ruby
ryan_notabot has joined #ruby
binaryplease has quit [Read error: Connection reset by peer]
blackwell has quit [Max SendQ exceeded]
ryan_notabot has quit [Client Quit]
binaryplease has joined #ruby
s00pcan_ has quit [Ping timeout: 252 seconds]
s00pcan has joined #ruby
Limix has joined #ruby
agent_white has quit [Quit: back in a bit]
blackwell has joined #ruby
solocshaw has joined #ruby
zacstewart has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
Dimik has joined #ruby
siaw has quit [Quit: siaw]
aeterne has quit [Read error: Connection reset by peer]
yfeldblum has quit [Remote host closed the connection]
baweaver has quit []
skade has joined #ruby
northrup has joined #ruby
Guest85880 has joined #ruby
LoneHermit has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ismaelga has quit [Remote host closed the connection]
nanoz has joined #ruby
codecop has joined #ruby
nisstyre_ has quit [Quit: WeeChat 1.4]
tax has joined #ruby
nanoz has quit [Read error: Connection reset by peer]
Guest85880 has quit [Quit: Off to do something important-sounding]
nanoz has joined #ruby
nisstyre has joined #ruby
nisstyre has quit [Changing host]
nisstyre has joined #ruby
Cohedrin has joined #ruby
smathy_afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bazz_ has joined #ruby
<bazz_>
is it possible in composition, for a class object to know the class it belongs to?
Moosashi has quit [Quit: Moosashi]
<bazz_>
I currently use some modules that are included into a class, so I can refer to the class "natively" -- but I would like to convert them to classes, where I am then unsure how to reference the class
<bazz_>
I am interested in a straight answer rather than "why are you trying to do that?"
elifoster has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
d0lph1n98 has joined #ruby
palms has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
Spami has joined #ruby
lkba has joined #ruby
PaulCape_ has joined #ruby
palms has quit [Ping timeout: 244 seconds]
RegulationD has joined #ruby
PaulCapestany has quit [Ping timeout: 250 seconds]
duckpuppy has quit [Ping timeout: 260 seconds]
finisherr has quit [Quit: finisherr]
baweaver2 has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
<Ox0dea>
bazz_: Could you clarify your understanding of "natively" there?
<bazz_>
sure
<Ox0dea>
If I've not misread, it seems like you're just looking for the Class#superclass method.
<bazz_>
since the module is included into the class itself .. I can use "self.class" to refer to the class
<bazz_>
but in composition .. I will an instance variable inside the class .. from its methods I need to refer to the class .... I *might* get away with just passing the class to the composition's constructor ... but I am still curious about how my original question might be executed
stardiviner has quit [Ping timeout: 252 seconds]
Kallis has quit [Read error: Connection reset by peer]
<Ox0dea>
bazz_: I still can't say I perfectly follow, but I'm willing to bet you want the #inherited hook.
skade has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby
<amincd>
Hi, I'm trying to understand how forking, with the fork system call works. Why does the 'puts "after"' execute before the show_memory_usage("parent") in the "Memory Test" section?
<bazz_>
yeah that's inheritance, which is not what I'm looking for (hence the term "composition" I've been using) .. but it's OK because I'll succeed by just passing the owner to the composed object via initialize() ...
<bazz_>
Ox0dea, ^
baweaver2 has quit []
Moosashi has joined #ruby
yfeldblu_ has joined #ruby
segy has quit [Ping timeout: 252 seconds]
<bazz_>
Ox0dea, I'm going to create an example to make it clear :)
<Ox0dea>
bazz_: There's also the Module#included hook.
zzak has joined #ruby
<Ox0dea>
And #extended, but not #prepended.
<Ox0dea>
Which has always stricken me as something of an oversight.
<bazz_>
yeah I use those for modules tho, I'm using classes this time .. (I've stated that I am migrating from modules to classes)
<bazz_>
Oversight? I am thinking you don't understand OOP at this point ...
<bazz_>
you only extend classes, you don't prepend them (besides, prepend's associative term is append, not extend)
yfeldblum has quit [Ping timeout: 246 seconds]
<bazz_>
tehe
PaulCape_ has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
Hoyt_ has joined #ruby
baweaver3 has joined #ruby
<Hoyt_>
Hey all. I'm getting an ssl certificate error when trying to install the bundler gem from the command line. Googling has led me to download an additional SSL cert, but that didn't seem to do the trick. Any advice?
<amincd>
I can pay $2 for an explanation that I can understand
<ruby[bot]>
bazz_: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<bazz_>
thanks ruby[bot] :) I've been meaning to try gist out
<amincd>
ruby[bot] is back!
bronson has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
benlieb has quit [Quit: benlieb]
segy has joined #ruby
Asher has quit [Ping timeout: 246 seconds]
aghalarp has joined #ruby
PaulePanter has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
benlieb has joined #ruby
benlieb has quit [Client Quit]
bronson has quit [Ping timeout: 260 seconds]
rbennacer has joined #ruby
baweaver3 has quit []
howdoico1 has joined #ruby
nanoz has quit [Quit: <3]
godzillaenlacasa has quit [Quit: ZZZZZ....]
Limix has quit [Quit: Limix]
benlieb has joined #ruby
<amincd>
ok I got it:
statelesscode has joined #ruby
<amincd>
the parent block *is* being executed first, but it does not get to the line that outputs the result before the child block has outputted the "After..." text. This is a consequence of the child block being executed immediately after the parent block is executed, rather than waiting for the parent block to complete
isxek has joined #ruby
codecop has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
berserk_ren has quit [Quit: Arrrgh!]
berserk_ren has joined #ruby
elaptics`away is now known as elaptics
stardiviner has joined #ruby
benlieb has quit [Quit: benlieb]
d0lph1n98 has quit [Ping timeout: 276 seconds]
bb010g has joined #ruby
palms has joined #ruby
sauvin has joined #ruby
Spami has joined #ruby
palms has quit [Ping timeout: 260 seconds]
freerobby has quit [Quit: Leaving.]
tildes has joined #ruby
amincd has quit [Quit: Page closed]
_blizzy_ has joined #ruby
_blizzy_ has quit [Client Quit]
d0lph1n98 has joined #ruby
Rickmast_ has quit [Ping timeout: 244 seconds]
joonty has joined #ruby
Rickmasta has joined #ruby
PedramT has joined #ruby
brianpWins has joined #ruby
kareeoleez has joined #ruby
joonty has quit [Ping timeout: 250 seconds]
rbennacer has quit [Remote host closed the connection]
emilford has joined #ruby
castlelore has quit [Quit: WeeChat 1.4]
emilford has quit [Ping timeout: 240 seconds]
castlelore has joined #ruby
t-richards has quit [Quit: Connection closed for inactivity]
KnownSyntax has quit [Read error: Connection reset by peer]
ljames has quit [Ping timeout: 260 seconds]
brianpWins has quit [Ping timeout: 244 seconds]
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
segy has quit [Ping timeout: 260 seconds]
castlelore has quit [Remote host closed the connection]
yfeldblu_ has quit [Ping timeout: 250 seconds]
ctrutmann has joined #ruby
aghalarp has quit [Read error: Connection reset by peer]
castlelore has joined #ruby
aghalarp has joined #ruby
chipotle has quit [Quit: cheerio]
aghalarp has quit [Client Quit]
framling has joined #ruby
chipotle has joined #ruby
<kareeoleez>
baweaver: thank you for your suggestions yesterday
shibly has joined #ruby
shibly has left #ruby [#ruby]
<baweaver>
not a problem
smoose__ has quit [Remote host closed the connection]
<kareeoleez>
baweaver: I accidentally lost connection but I've been reading all the suggestions
<kareeoleez>
baweaver: sorry
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<baweaver>
it happens
BSaboia has quit [Ping timeout: 244 seconds]
fedexo has joined #ruby
BSaboia has joined #ruby
castlelore has quit [Remote host closed the connection]
dionysus69 has joined #ruby
saneax_AFK is now known as saneax
SilverKey has quit [Quit: Halted.]
Devalo has joined #ruby
dopie has joined #ruby
duckpuppy has joined #ruby
resolve has joined #ruby
RegulationD has joined #ruby
segy has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
LoneHermit has joined #ruby
<ctrutmann>
Hi, sorry to ask an obvious question, but I'm new to the chat and new to Ruby... Is this where the conversation happens?
<baweaver>
For chat about ruby, yes.
<baweaver>
ask away
htmldrum has joined #ruby
<ctrutmann>
Woah, fantastic!
<baweaver>
if it's not, we'll let you know where to go
<ctrutmann>
I don't actually have a question at the moment, I'm just here to join the community and start absorbing context.
<ctrutmann>
But thanks for helping to orient me. It's a different chat/forum format than I'm used to.
<baweaver>
have you found any tutorials, played with ruby at all?
<ctrutmann>
I'm in a bootcamp, working on classes and RSpec this week.
PedramT has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
last_staff has joined #ruby
<baweaver>
well if you find yourself in need of information, feel free to ask
elifoster has quit [Ping timeout: 252 seconds]
<baweaver>
you might also want to look into #RubyOnRails
ctrutmann has quit [Quit: Page closed]
<baweaver>
as I have a feeling that'll be quite relevant given you're at a bootcamp, and I don't think they'd teach only Ruby there.
benlieb has joined #ruby
ctrutmann has joined #ruby
PedramT has joined #ruby
LoneHermit has quit [Ping timeout: 276 seconds]
<ctrutmann>
baweaver: Thanks! I will follow that chat as well!
PedramT has quit [Remote host closed the connection]
nobitanobi has joined #ruby
<ctrutmann>
One question, though the answer may simply be time/experience. Are there examples somewhere of "good" Ruby versus bad Ruby?
<ctrutmann>
I'll get my code to work, but have a hard time seeing how to make it better or DRY
<baweaver>
Look into the Ruby Style Guide for a first step
<baweaver>
a few books on "Good Ruby" would be Eloquent Ruby, Practical Object Oriented Development in Ruby, and Effective Ruby
<baweaver>
As far as Rails, Rails 4 in Action goes through most everything
PedramT has joined #ruby
davee_ has quit [Quit: Leaving]
<ctrutmann>
Thank you! Googling them all now. Is there a most active time to check back in on this channel to observe other people's questions?
idefine has quit [Read error: Connection reset by peer]
roelof has joined #ruby
<roelof>
I have this code : raise "Calculator is empty"
<roelof>
but rspec fails with this errror message : expected Exception with "calculator is empty", got #<RuntimeError: Calculator is empty> with backtrace:
<roelof>
What do I have to change to make this work ?
danman has quit [Quit: danman]
<baweaver>
roelof can you gist both the RSPEC and the actual code?
<roelof>
of course I can , baweaver
<roelof>
moment
<baweaver>
it's probably that you have a lowercase C in one though
Devalo has quit [Remote host closed the connection]
<baweaver>
be back in a minute, food is done
PedramT has quit [Remote host closed the connection]
emilford has joined #ruby
schlosskunde has joined #ruby
Moosashi has quit [Quit: Moosashi]
<Radar>
hi
<Radar>
ctrutmann: Rails 4 in Action is an amazing book I highly recommend it.
<Radar>
ctrutmann: I also wrote it so there's that.
<bazz_>
I have never heard any non-programmers speak of this key, and have only ever referred to it as "pipe" with programmers .. "vertical line" seems appropriate for non-programmers
<shevy>
I had to give a method a name that would insert those | into a string
bronson has joined #ruby
spider-mario has joined #ruby
davee_ has joined #ruby
m_abdelfattah has joined #ruby
emilford has quit [Ping timeout: 246 seconds]
last_staff has quit [Quit: last_staff]
bronson has quit [Ping timeout: 244 seconds]
<kareeoleez>
how to throw an exception if a conditional is false ?
ctrutmann has quit [Quit: Page closed]
yfeldblum has quit [Ping timeout: 250 seconds]
<nofxxxx>
kareeoleez, raise 'Oh my!' unless foo
<kareeoleez>
nofxxxx: do I need a rescue after this ?
m_abdelfattah has quit [Read error: Connection reset by peer]
<nofxxxx>
don't get what you mean. If you need to rescue don't trow an error...
<Diabolik>
is there an easy way to find my .rbenv folder? it's not at ~/.rbenv
rdark has quit [Quit: leaving]
dramagods has quit [Ping timeout: 240 seconds]
<manveru>
the hash.hash has a type of char[32] and i'm not entirely sure how to go from a ruby fixnum to an array of 8 bit fixnums...
tk___ has quit [Ping timeout: 260 seconds]
palms has quit [Ping timeout: 276 seconds]
tk__ has joined #ruby
<manveru>
basically going from 72356286363236526331452798020295219825627762172601973501865183084394422723874 to 08p5gx18yrbnwc6xc0mxvsfaxzgy2y9i78xq7ds0qmdm67q39y4z
<apeiros>
to_s(32) doesn't work because the alphabet is messed: 0123456789abcdfghijklmnpqrsvwxyz
<apeiros>
lacks an "e" f.ex.
<manveru>
yeah, i tried doing my own base32 based on their alphabet too :|
<apeiros>
or you could use to_s(32) + tr
<apeiros>
probably the least amount of code and not necessarily slower than reimplementing base translation
GodFather has quit [Ping timeout: 260 seconds]
<apeiros>
hm, though… seems they still do something different
<manveru>
exactly
<manveru>
at the beginning it only looks like off by one... but later it's just different :(
davedev24 has joined #ruby
<apeiros>
hm, looking at that algorithm I'm not sure it's a base transformation
<apeiros>
at least if it is, it's unnecessarily complex o0
<apeiros>
I'd probably just 1:1 translate the algorithm to ruby
<manveru>
that's what i'm trying
nobitanobi has quit [Remote host closed the connection]
<manveru>
but it stores the hash in a char[32], so i'd have to first convert the fixnum to that
<apeiros>
hash.hash is a string like "72356286363236526331452798020295219825627762172601973501865183084394422723874"?
* apeiros
brb
GodFather has joined #ruby
dima_ has joined #ruby
<dima_>
Hi. Can someone help me with ruby and tar.gz? Ruby can see 1 file of 3 in archive. When i delete this 1st file, ruby can see 2 and 3 files.
<dima_>
So, python, nodejs, golang can see all three files
yude has joined #ruby
<dima_>
Sorry for my bad English
dramagods has joined #ruby
<arahael>
dima_: post a small test case then. i am off to bed. if your english is bad, try speaking in testcases instead. ;)
<arahael>
dima_: or find another group in your native language.
<dima_>
i can send my code via gist for examples
<arahael>
dima_: that said, your english seems fine, but yeah, a code sample would be even clearer ss this is obviously a technical issue.
* arahael
gets to bed.
madgen has quit [Ping timeout: 244 seconds]
lkba has joined #ruby
* apeiros
back
<apeiros>
manveru: ok, took another look. I think I get it now. so you've got the binary representation of 72356286363236526331452798020295219825627762172601973501865183084394422723874 in that 32byte char array
dramagods has quit [Ping timeout: 276 seconds]
<manveru>
i think so, yeah
<apeiros>
you can go to that in ruby via sprintf + pack("B*")
Bugboy1028 has quit [Ping timeout: 250 seconds]
<apeiros>
>> [("%032b" % 72356286363236526331452798020295219825627762172601973501865183084394422723874)].pack("B*") # hope I got that correctly :)
<ruby[bot]>
apeiros: # => "\x9F\xF84\xF01\xB5U\ft;\xB8\xA3\x13\x93\x17\xFE\xFD\xAE\x9C\xDE\xBD\x02\xD6\r\xE3ve\x8FB\x7F\xE5\"" ...check link for more (https://eval.in/562830)
<Ox0dea>
apeiros: That needs to be 256.
<manveru>
oh, so using the string instead of an array
emilford has joined #ruby
<apeiros>
Ox0dea: oh dear, yes of course.
<apeiros>
manveru: you can always .unpack("C*") :)
madgen has joined #ruby
<manveru>
well, i did unpack C*, but that ended up in a way longer array
<apeiros>
I get 32 bytes? both in the string and consequently in the unpacked array?
<manveru>
either way, that with 256 seems to be exactly where i started from
<ruby[bot]>
manveru: # => "\x9F\xF84\xF01\xB5U\ft;\xB8\xA3\x13\x93\x17\xFE\xFD\xAE\x9C\xDE\xBD\x02\xD6\r\xE3ve\x8FB\x7F\xE5\"" ...check link for more (https://eval.in/562831)
<Ox0dea>
apeiros: That format specifier is for padding; it doesn't do truncation.
<apeiros>
it doesn't matter that it can't, because it doesn't have to
<Ox0dea>
"%032b" with a 256-bit number will give you 256 bits.
<apeiros>
yes, as you already correctly pointed out, it should have been "%0256b"
GodFather has quit [Ping timeout: 260 seconds]
<Ox0dea>
I'm trying to determine why you were confused about getting 32 bytes.
<apeiros>
o0
<apeiros>
I'm not confused. I made a mistake which didn't matter with the given data.
Limix has joined #ruby
<Ox0dea>
Oh, that was a response to manveru's bit about `unpack 'C*'`; disregard.
<manveru>
:)
Bugboy1028 has joined #ruby
emilford has quit [Ping timeout: 240 seconds]
<apeiros>
glad that got cleared up :-p
PedramT has joined #ruby
<apeiros>
the %0256 is of course there to ensure you get 256 bits even if the hash is a number which could be represented with less.
madgen has quit [Ping timeout: 276 seconds]
rbennacer has joined #ruby
<Ox0dea>
*fewer
kareeoleez has quit [Ping timeout: 240 seconds]
<Ox0dea>
(Still a Game of Thrones reference.)
dramagods has quit [Ping timeout: 244 seconds]
emilford has joined #ruby
<manveru>
hmm
newjersey has joined #ruby
newjersey has quit [Max SendQ exceeded]
bronson has quit [Ping timeout: 252 seconds]
nando293921 has quit [Quit: Lost terminal]
<apeiros>
manveru: I get almost the correct result. I don't have a leading 08
<apeiros>
the rest seems to fit
<apeiros>
s/seems//
fedexo has joined #ruby
shinnya has joined #ruby
<apeiros>
I copied the algorithm, and for 72356286363236526331452798020295219825627762172601973501865183084394422723874 as input I get "p5gx18yrbnwc6xc0mxvsfaxzgy2y9i78xq7ds0qmdm67q39y4z"
<apeiros>
which fits except for the leading "08"
<manveru>
interesting
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
and I think I know why the to_s(32) + tr didn't work
idle_task has joined #ruby
<apeiros>
they reverse the order if I understand that correctly
<manveru>
yeah
idletask has quit [Ping timeout: 260 seconds]
<apeiros>
or… maybe not
<apeiros>
not sure
<manveru>
i have more examples if you like
<apeiros>
I can also just hand you my code :)
<apeiros>
because I'd prefer to reread schlock mercenary instead ;-)
MaienM_ has quit [Remote host closed the connection]
<manveru>
damn
<manveru>
well, i'm fine with that too :P
<manveru>
will figure it out somehow, my brain just always shuts down when it comes to bit shifting
beatdown_ has quit [Quit: ZNC 1.6.1 - http://znc.in]
Spami has quit [Quit: This computer has gone to sleep]
<apeiros>
if I understand the code correctly, it plucks 5 bit slices from the end of the string, translates it and appends it to the result string (hence reversing the order in 5 bit chunks)
kareeoleez has joined #ruby
mdw has joined #ruby
mdw has quit [Max SendQ exceeded]
<apeiros>
hm, actually that explanation might yield my mistake. len might be wrong. if you set it to the correct value, you'll get your leading "08" too.
mdw has joined #ruby
PedramT has quit [Remote host closed the connection]
PedramT has joined #ruby
<apeiros>
len = 52
<apeiros>
shouldn't have done the `return (hashSize * 8 - 1) / 5 + 1;` from memory. I subtracted 1 before multiplying by 8 :D
Spami has joined #ruby
<apeiros>
if you want, I have a nicer algorithm which should do the same
<manveru>
oO
<manveru>
sure!
<apeiros>
gotta scrap that from my brains too. give me a minute.
n008f4g_ has quit [Ping timeout: 244 seconds]
<apeiros>
we use it for our document and contact id's :)
stardiviner has quit [Ping timeout: 252 seconds]
<apeiros>
hm, getting a different result :-/
tubuliferous has joined #ruby
madgen has joined #ruby
tildes has quit [Ping timeout: 276 seconds]
Asher has joined #ruby
ismaelga has joined #ruby
s00pcan has quit [Ping timeout: 260 seconds]
PedramT has quit [Remote host closed the connection]
PedramT has joined #ruby
palms has joined #ruby
Mia has quit [Ping timeout: 240 seconds]
<manveru>
hmm, i'm pretty close now too
<manveru>
i get a8z5gx1qcrvnwq6ds0mxvsfsxzzy2f9ii8xq7ishamdm6kq3zylz
<manveru>
apeiros: i think the issue is that you can't overflow the char boundary in ruby
<apeiros>
therefore, you'll always call the method named "k"
<apeiros>
manveru: no, that's not the issue. you can't either in C, you'd get random data.
PedramT has quit [Ping timeout: 260 seconds]
<apeiros>
and they handle it with the `i >= hash.hashSize - 1 ? 0` part
mdw has quit [Ping timeout: 276 seconds]
<apeiros>
the issue really is that they handle the overflow completely wrong.
lkba has quit [Ping timeout: 244 seconds]
<apeiros>
unless I misunderstand something about the code…
GinoMan2440 has quit [Read error: Connection reset by peer]
idefine has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 250 seconds]
tubuliferous has joined #ruby
GinoMan2440 has joined #ruby
<apeiros>
but I'm pretty sure at this point that they fucked up
chipotle has quit [Ping timeout: 240 seconds]
<apeiros>
mr_oh: that part about 'k' is a string was at you
<mr_oh>
I saw that, fixed it
troulouliou_div2 has quit [Ping timeout: 276 seconds]
<apeiros>
mr_oh: thanks for the feedback then…
<mr_oh>
Now i get undefined method 'black' for String:Class
<mr_oh>
I was trying different things when I heard your beep. (sorry)
RegulationD has joined #ruby
dramagods has joined #ruby
PedramT has joined #ruby
silentpost has joined #ruby
mdw has joined #ruby
blaxter has quit [Read error: Connection reset by peer]
mdw has quit [Client Quit]
troulouliou_div2 has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
mdw_ has quit [Ping timeout: 240 seconds]
RegulationD has quit [Ping timeout: 240 seconds]
dramagods has quit [Ping timeout: 240 seconds]
Gasher has joined #ruby
siaw has quit [Quit: siaw]
dreinull has joined #ruby
tubuliferous has quit [Ping timeout: 244 seconds]
chipotle has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<apeiros>
manveru: keep me posted about what they have to say about it?
<dreinull>
I need to store options in my slim template files. They are not just views but used for document creation but served through a sinatra app nonetheless. I need to have the options in advance as they have to be catalogued and storing the information elsewhere makes it difficult to create new templates. Is there a safe way to extract these options? Like reading a file and parsing comments?
mrmortondk has quit [Read error: Connection reset by peer]
<apeiros>
manveru: just that that's not what they do
<apeiros>
or what their code does
<apeiros>
but at least I figured their intent correctly :)
<manveru>
well, you can talk with them in #nixos ... i gave up on implementing this shit :P
<manveru>
i thought i could speed up my program by avoiding shelling out to the nix-hash executable and do the hashing myself
futilegames has joined #ruby
<manveru>
but i'm not smart enough for this... C++ just makes my brain explode
AlexRussia has quit [Read error: Connection reset by peer]
AlexRussia has joined #ruby
mr_oh has quit [Quit: Page closed]
<apeiros>
manveru: I have no intention to. it's easy to prove it's wrong, though. get the first 5 bits from binary 72356286363236526331452798020295219825627762172601973501865183084394422723874 and compare it with the last character of the base32 hash ;-)
dramagods has joined #ruby
vishwa has joined #ruby
dramagods has quit [Ping timeout: 260 seconds]
AlexRussia has quit [Read error: Connection reset by peer]
n008f4g_ has joined #ruby
blaxter has joined #ruby
madgen has quit [Read error: Connection reset by peer]
arlek has quit [Read error: Connection reset by peer]
<dima_>
Why it can see 1 file of 3? Sry for a long time
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
jottr has joined #ruby
arlek has joined #ruby
futilegames has quit [Quit: futilegames]
idle_task is now known as idletask
madgen has joined #ruby
noService has quit [Ping timeout: 240 seconds]
palms has joined #ruby
PedramT has quit [Remote host closed the connection]
GinoMan2440 has quit [Read error: No route to host]
blackmes1 has joined #ruby
GinoMan2440 has joined #ruby
s00pcan has quit [Ping timeout: 276 seconds]
palms has quit [Ping timeout: 276 seconds]
kareeoleez has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
s00pcan has joined #ruby
James123 has joined #ruby
kareeole_ has joined #ruby
<James123>
I have an 8-character string and I want to split it in two 4-character pieces, e.g. abcdefgh -> [abcd, efgh]. I can't figure how to do this with .split(). Any ideas?
<apeiros>
just use String#[]
<apeiros>
0,4 and 4,4 will do
<James123>
Thanks!
AlexRussia has joined #ruby
kareeoleez has quit [Ping timeout: 240 seconds]
dramagods has joined #ruby
statelesscode has joined #ruby
SilverKey has joined #ruby
moeabdol has joined #ruby
arlek has quit [Read error: Connection timed out]
d0lph1n98 has quit [Ping timeout: 260 seconds]
akem has joined #ruby
rbennacer has quit [Remote host closed the connection]
futilegames has joined #ruby
futilegames has quit [Client Quit]
kareeoleez has joined #ruby
iaglium has quit [Max SendQ exceeded]
idefine has joined #ruby
c_nick has joined #ruby
<c_nick>
suppose my yml file passed me a string "ENV['name']" how can i decipher it ? as if i need to get the Env Variable from the same.
<ruby[bot]>
toretore: # => /tmp/execpad-b4adc826c93b/source-b4adc826c93b:2: warning: regular expression has ']' without escape: ...check link for more (https://eval.in/562853)
<ruby[bot]>
toretore: I don't know anything about irbnotrubybot
darkxploit has joined #ruby
idefine has quit [Ping timeout: 240 seconds]
<roelof>
How can I check if something between "1" and "9". I thought this would work : element.include? ( "1" .. "9") but no luck
<toretore>
other way around
elaptics`away is now known as elaptics
Asher has joined #ruby
<roelof>
oke, you mean ("1" .. "9").include? element , toretore ?
dionysus70 has joined #ruby
Asher has quit [Client Quit]
<toretore>
yes
dionysus69 has quit [Ping timeout: 260 seconds]
dionysus70 is now known as dionysus69
Hoyt_ has joined #ruby
AlexRussia has quit [Read error: Connection reset by peer]
dramagods has quit [Remote host closed the connection]
<roelof>
toretore: thanks
<roelof>
one step to go and I have solved a challenge of making a rpn calculator
<kareeoleez>
whatever I did I cannot catch "ArgumentError: wrong number of arguments" in a method, with def - rescue ArgumentError -end. What am I missing ?
bronson has joined #ruby
jairojunior has joined #ruby
<Ox0dea>
kareeoleez: You'd have to rescue it at the call site.
codecop has quit [Remote host closed the connection]
<toretore>
kareeoleez: code
s00pcan has quit [Remote host closed the connection]
<Ox0dea>
kareeoleez: If you want to be able to catch bad calls, you'll have to define your method to take any number of arguments and proceed accordingly.
s00pcan has joined #ruby
<kareeoleez>
Ox0dea: the problem is when there is no argument
<mustmodify>
I've heard that you shouldn't give classes verb names ... presumably because actions aren't objects.
<mustmodify>
is that a widely-held best-practice?
Limix has joined #ruby
blaxter has quit [Quit: foo]
dramagods has quit [Ping timeout: 276 seconds]
Limix has quit [Client Quit]
Sharduk is now known as Shardik
<toretore>
mustmodify: can you come up with a case where you'd use a verb for a class name?
DotKite has joined #ruby
Spami has joined #ruby
skweek has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<mustmodify>
I have data, and I have rubrics. Rubrics have a collection of data ranges. And I take a datum and a rubric and produce a grade. So I was thinking of calling that class Grader.
<shevy>
mustmodify do you mean solo words? or in conjunction?
<mustmodify>
it's sort of a verb.
blackmesa has joined #ruby
<shevy>
e. g. class Get versus class GetPackage
<mustmodify>
I mean, it's a verb object.
drusepth has quit [Remote host closed the connection]
blaxter has joined #ruby
<mustmodify>
I guess Grade would be the verb.
<toretore>
grader is not a verb though
blackmes1 has quit [Ping timeout: 260 seconds]
drusepth has joined #ruby
<mustmodify>
ok nevermind then. :)
<toretore>
you can tell a grader to grade
<toretore>
that's perfectly reasonable
<mustmodify>
though now that I'm thinking about it, maybe the Rubric should do that.
<mustmodify>
Rubric is a new abstraction for us (whereas Grader is not.) So that might make more sense.
<toretore>
i like the idea of a separate grader class
AlexRussia has joined #ruby
<toretore>
grading is then decoupled from the representation
nobitanobi has joined #ruby
<mustmodify>
yep, that's true.
<mustmodify>
I like decoupling, but to be fair... they really can't exist sepearately. I can't imagine a scenario where we could use some other thing to grade datum... or anything else that would need grading.
<mustmodify>
I'll leave it separated for now.
Gasher has quit [Quit: Leaving]
dramagods has joined #ruby
northrup has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver>
You grade an assignment
<baweaver>
turning it into a noun doesn't change that
<baweaver>
it's an action of the assignment
<mustmodify>
baweaver: true. I meant in our domain.
<mustmodify>
certainly there are a lot of other things that could be graded.
<baweaver>
Too many nouns and you turn into Java :P
johnny56 has joined #ruby
<mustmodify>
AHHHHHHHHH
<toretore>
i still think an assignment and the "grader" should be though of as separate things
<toretore>
ruby could use some more java tbh ;)
<mustmodify>
In that context, definitely.
noService has joined #ruby
<baweaver>
Then you end up with things like AbstractSingletonProxyFactoryBean after a fashion
<toretore>
especially modeling processes independently of data
Azure has quit [Remote host closed the connection]
<baweaver>
GoF is made incredibly irrelevant by the addition of functional concepts
<mustmodify>
I once gave a presentation in front of some .net devs and I had all kind of crazy class names like BusinessLayer::AbstractMetaDeviceWrapperWrapper ... I didn't get the impression they knew I was poking fun at them.
<dima_>
hi. can some one help me with ruby and tar.gz archives?
<dima_>
i know it. But it snippet did not work for me
Cohedrin has joined #ruby
s00pcan has joined #ruby
berserk_ren has quit [Quit: last man standing]
ramfjord has joined #ruby
<baweaver>
you're trying to open a stream instead of a file
<baweaver>
need to find how to either open a stream or save it as a file first.
<baweaver>
give me a sec to find that
<toretore>
it's a Tempfile
ismaelga has joined #ruby
<dima_>
can you download this archive and watch its content(3 files)
<dima_>
when i delete 1st file i can see 2 files
Vlat- has joined #ruby
<toretore>
i tried the code with a regular File too, same thing
<dima_>
when i do nothing i can see 1st file only
babykosh has quit [Quit: babykosh]
<toretore>
so probably: 1) the archive is borked, or 2) TarReader doesn't work properly
Cohedrin_ has quit [Ping timeout: 246 seconds]
<dima_>
2. Cuz python, nodejs, bash works fine
<dima_>
variants*
<dima_>
I rly need this functional.
<toretore>
dima_: which is why i suggest to just shell out to tar
<baweaver>
tar -zxvf and wget for shell
<dima_>
shell code looks like shit.
Lomex has joined #ruby
<baweaver>
works vs looks like crap
<dima_>
ye)
The_Phoenix has quit [Read error: Connection reset by peer]
ismaelga has quit [Ping timeout: 260 seconds]
<baweaver>
Use shell first, then figure out why that won't work
Flashynuff has joined #ruby
<baweaver>
I've never used it before, I just use shell for that, so I don't know immediately
<dima_>
But can i force someone in RubyTeam for fix it?
<baweaver>
I doubt it's broken, we just don't know how to use it
<dima_>
Ruby can't work with tar.gz in 2016. Sounds like a charm.
<baweaver>
ease back on the rudeness there
<toretore>
they probably don't care. it's not meant to be a general purpose tar reader
nando293921 has quit [Ping timeout: 246 seconds]
<baweaver>
it probably can
Spami has quit [Quit: This computer has gone to sleep]
<dima_>
its just terrible.
crystal77 has joined #ruby
Spami has joined #ruby
<baweaver>
again, easy on the rudeness
Spami has quit [Client Quit]
<mustmodify>
dima_: I don't think it's terrible. Why would a language want to do something that an OS can do better/faster?
<Ox0dea>
mustmodify: Huh?
<baweaver>
mustmodify not the point
<dima_>
Someone knows a native bindings for tar archives?
Shardik is now known as catpoop
<mustmodify>
oh
<mustmodify>
ok then
<Ox0dea>
dima_: There's a libarchive wrapper.
<baweaver>
It probably can, I just don't know how because I never use it
<dima_>
python can it. Ruby cant it. I am not troll, but ruby(high level language) can not open tar.gz. Its rly bad.
<Flashynuff>
Alright, new to ruby, not new to programming. I'm trying to reimplement a method to compute pi that a professor had me do for a previous class in python. Everything looks more or less correct, but my results are way way off in ruby, and I don't know what I'm doing wrong. python: http://pastebin.com/GCcSbp7q ruby: http://pastebin.com/JNWEF47n
<baweaver>
you missed it more than once and continued to be rude towards the language in the process, this is not acceptable behavior and will not be tolerated again
<smathy>
Flashynuff, mostly the message from the bot about not using pastbin.
<dima_>
Sorry.
<baweaver>
Now note I have no problem with the question, I just really don't have an answer to it, I'd have to research it
<Ox0dea>
Flashynuff: You accidentally started `result` at 1 in the Ruby version.
<Flashynuff>
I am an idiot
<shevy>
aha!
<baweaver>
Flashynuff it happens, don't take it too badly
<Flashynuff>
Thank you, fresh set of eyes always helps!
<mustmodify>
General question: If you say something like "I'm not a troll" ... isn't that sort of indicative of needing to re-examine whether you're a troll?
<baweaver>
mustmodify drop it
<Ox0dea>
Let it die of starvation.
<mustmodify>
k
<baweaver>
let channel staff address issues, there's no need to chime in and repeat their assessments
Flashynuff has left #ruby ["Leaving"]
KCmetro__ has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
S_Waqas has joined #ruby
karapetyan has quit [Remote host closed the connection]
Rodya_ has quit [Remote host closed the connection]
Mia has quit [Read error: Connection reset by peer]
<KCmetro__>
I need to write a script to automate resolutions to previously known and recurring issues after alarms go off in zabbix. Can I use Ruby for that purpose or would another language be better?
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<baweaver>
KCmetro__ : any turing complete language should work
<baweaver>
which includes ruby
<baweaver>
probably an older version of ruby then
<baweaver>
smathy you're on 2.3 right?
elifoster has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
bafbomb has quit [Ping timeout: 260 seconds]
yqt has joined #ruby
<KCmetro__>
Thank you!
shadeslayer has quit [Read error: Connection reset by peer]
<KCmetro__>
oh wait... do I need an old ruby version to automate things w/ zabbix or is the most recent version of ruby okay?
Vlat- has quit [Quit: Vlat-]
kareeoleez has quit [Remote host closed the connection]
berserk_ren has joined #ruby
<baweaver>
KCmetro__ sorry, that was about another user
<KCmetro__>
ok cool :)
kareeoleez has joined #ruby
aCHILLes_ has quit [Ping timeout: 250 seconds]
shadeslayer has joined #ruby
phoo1234567 has joined #ruby
Spami has joined #ruby
osvico has quit []
marcdel has joined #ruby
elaptics`away has quit [Ping timeout: 264 seconds]
CausaMortis has quit [Ping timeout: 260 seconds]
marcdel_ has joined #ruby
marcdel_ has quit [Client Quit]
KCmetro__ has quit [Quit: Leaving...]
KCmetro has joined #ruby
devbug has joined #ruby
marcdel has quit [Ping timeout: 260 seconds]
Vlat- has joined #ruby
elaptics`away has joined #ruby
catpoop is now known as Shardik
<dima_>
i fix my problem by libarchive gem. Its works perfectly, but api didnot ruby-like.
<Ox0dea>
This is what you asked for.
<smathy>
baweaver, yes, although sorry - I didn't realize there were two other files.
futilegames has joined #ruby
roshanavand has quit [Quit: This computer has gone to sleep]
CausaMortis has joined #ruby
northrup has joined #ruby
drusepth_ has joined #ruby
futilegames has quit [Client Quit]
drusepth has quit [Ping timeout: 250 seconds]
duderonomy has quit [Ping timeout: 244 seconds]
psmolen has quit [Ping timeout: 276 seconds]
mlakewood has joined #ruby
ismaelga has joined #ruby
<KCmetro>
...not sure if ruby's across the network... might have to use bash with the linux side of things... although there are also windows machines, I guess powershell for that.
<KCmetro>
(re: automating things in response to zabbix alarms)
markfletcher has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
zacstewart has joined #ruby
RegulationD has joined #ruby
isxek has quit [Quit: Leaving]
symm- has joined #ruby
<shevy>
dima_ yeah that can often be the case, depending on how big a project is and how many maintainers there are; sometimes it's just a 1:1 mapping usually. For instance, C GTK "GtkWidget *gtk_toggle_button_new()" would become something like Gtk::ToggleButton.new() which is more or less a 1:1 mapping
RegulationD has quit [Ping timeout: 240 seconds]
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
drusepth_ has quit [Ping timeout: 244 seconds]
symm- has quit [Ping timeout: 250 seconds]
drusepth has joined #ruby
scepticulous has joined #ruby
GodFather has joined #ruby
symm- has joined #ruby
LoneHerm_ has joined #ruby
palms has quit [Ping timeout: 276 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
futilegames has joined #ruby
Denart_ has quit [Remote host closed the connection]
futilegames has quit [Client Quit]
symm- has quit [Read error: Connection reset by peer]
devbug has quit [Quit: ZZZzzz…]
<shevy>
I once wondered whether it would be possible to write an abstract GUI, where one could write for that abstract GUI, and have it translated into gtk or qt or wxwidgets
dn` has quit [Quit: dn`]
berserk_ren has quit [Ping timeout: 240 seconds]
dn` has joined #ruby
<adaedra>
gtk, qt and wxwidgets are already abstractions
idefine has quit [Read error: Connection reset by peer]
idefine has joined #ruby
sp4rrow has joined #ruby
theshrike has joined #ruby
jgrevich has quit [Ping timeout: 276 seconds]
Xentil has joined #ruby
symm- has joined #ruby
Rixius has quit [Ping timeout: 276 seconds]
idefine has quit [Ping timeout: 260 seconds]
Rixius has joined #ruby
scepticulous has quit [Ping timeout: 260 seconds]
markfletcher has quit [Remote host closed the connection]
devbug has joined #ruby
scepticulous has joined #ruby
cpup has quit [Ping timeout: 252 seconds]
sp4rrow has quit [Ping timeout: 260 seconds]
sp4rrow_ has joined #ruby
cpup has joined #ruby
Yeomra has joined #ruby
Shardik is now known as catpoop
scepticulous has quit [Ping timeout: 276 seconds]
gizless has joined #ruby
Jackneill has quit [Ping timeout: 246 seconds]
gizmore|2 has joined #ruby
gizmore has quit [Ping timeout: 250 seconds]
gizless has quit [Ping timeout: 260 seconds]
jolts has joined #ruby
nando293921 has joined #ruby
scepticulous has joined #ruby
idefine has joined #ruby
cpup has quit [Ping timeout: 244 seconds]
cpup has joined #ruby
skweek has quit [Ping timeout: 252 seconds]
AustinMatherne has quit [Remote host closed the connection]
idefine has quit [Ping timeout: 252 seconds]
AustinMatherne has joined #ruby
Asher has quit [Read error: No route to host]
Jackneill has joined #ruby
Asher has joined #ruby
pawnbox has quit [Remote host closed the connection]
zacstewart has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
S_Waqas has quit [Ping timeout: 244 seconds]
JakFrist has joined #ruby
<zacts>
buffer #perl
<zacts>
sorry
<zacts>
typo
<zacts>
weechat
pawnbox has joined #ruby
yfeldblum has joined #ruby
phoo1234567 has quit [Quit: Leaving]
RegulationD has quit [Ping timeout: 260 seconds]
kareeoleez has quit [Remote host closed the connection]
S_Waqas has joined #ruby
sgambino has joined #ruby
Jackneill has quit [Ping timeout: 246 seconds]
jgrevich has joined #ruby
PaulCape_ has joined #ruby
S_Waqas has quit [Ping timeout: 246 seconds]
KCmetro has quit [Read error: Connection reset by peer]
PaulCapestany has quit [Ping timeout: 260 seconds]
Jackneill has joined #ruby
davedev24 has quit []
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
palms has quit [Ping timeout: 260 seconds]
vishwa has quit [Ping timeout: 252 seconds]
<CausaMortis>
hi guys, im completely new to ruby and I am trying to set up a provisioning script for vagrant. what I find confusing is how (most of the posts I find online) never talk about a webserver like nginx or nginx-passenger. is it over kill wanting to install that?
<CausaMortis>
how does vagrant that it has to start the webserver that comes with rails?
zacstewart has joined #ruby
<CausaMortis>
+know
<smathy>
You'd just do it manually probably.
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
nofxxxx has joined #ruby
tubuliferous has joined #ruby
drusepth has quit [Ping timeout: 244 seconds]
duckpuppy has joined #ruby
Cohedrin_ has joined #ruby
n008f4g_ has quit [Ping timeout: 250 seconds]
vishwa has joined #ruby
mjuszczak has joined #ruby
S_Waqas has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
northrup has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tristanp has quit [Remote host closed the connection]
duckpupp1 has quit [Ping timeout: 260 seconds]
Cohedrin has quit [Ping timeout: 252 seconds]
KCmetro has joined #ruby
<CausaMortis>
good call :')
nobitanobi has quit [Remote host closed the connection]
bronson has joined #ruby
n008f4g_ has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xentil_ has joined #ruby
S_Waqas has quit [Ping timeout: 246 seconds]
Yeomra has quit [Ping timeout: 250 seconds]
Spami has quit [Quit: This computer has gone to sleep]
Xentil has quit [Ping timeout: 252 seconds]
<smathy>
CausaMortis, btw, I also don't think there's anything over the top with using nginx/passenger/whatever in dev if you want to.
davedev24 has joined #ruby
AustinMatherne has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
JakFrist has joined #ruby
AustinMatherne has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fedexo has quit [Ping timeout: 276 seconds]
PaulCapestany has joined #ruby
johnmilton has quit [Ping timeout: 244 seconds]
blackmesa has joined #ruby
cpup has quit [Ping timeout: 244 seconds]
cpup has joined #ruby
PaulCape_ has quit [Ping timeout: 240 seconds]
sp4rrow_ has quit [Ping timeout: 250 seconds]
sp4rrow has joined #ruby
tubuliferous has quit [Ping timeout: 250 seconds]
<gizmore|2>
Is anyone using emacs or vi with a visual debugger (rmi?) which editor+plugin to ollydbg like?
Devalo has quit [Remote host closed the connection]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoaguilar has quit [Ping timeout: 276 seconds]
PaulCapestany has quit [Ping timeout: 276 seconds]
tomphp has joined #ruby
davedev24 has quit [Remote host closed the connection]
kareeoleez has joined #ruby
yfeldblum has quit [Ping timeout: 276 seconds]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JakFrist has joined #ruby
symm-_ has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
shevy has quit [Ping timeout: 260 seconds]
idefine has joined #ruby
kareeoleez has quit [Ping timeout: 260 seconds]
symm- has joined #ruby
armyriad has quit [Read error: Connection reset by peer]
iamvery has joined #ruby
zacstewart has quit [Ping timeout: 276 seconds]
symm-_ has quit [Ping timeout: 276 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cheerio]
ruby-lang096 has joined #ruby
dh64 has quit [Quit: Konversation terminated!]
shevy has joined #ruby
tomphp has joined #ruby
castlelore is now known as landgraf
diegoaguilar has joined #ruby
ruby-lang096 has quit [Ping timeout: 250 seconds]
landgraf has quit [Quit: WeeChat 1.4]
GinoMan2440_ has quit [Read error: Connection reset by peer]
der-landgraf has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
Jackneill has quit [Remote host closed the connection]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Vlat- has quit [Quit: Vlat-]
Trynemjoel has joined #ruby
PaulCapestany has joined #ruby
knrz has joined #ruby
idefine has quit [Remote host closed the connection]
PaulCape_ has quit [Ping timeout: 252 seconds]
davee_ has joined #ruby
noService has quit [Ping timeout: 244 seconds]
pawnbox has joined #ruby
symm-_ has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
symm- has quit [Ping timeout: 276 seconds]
yfeldblum has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
mjuszczak has quit []
antgel has quit [Ping timeout: 276 seconds]
mjuszczak has joined #ruby
mjuszczak has quit [Client Quit]
SCHAAP137 has joined #ruby
htmldrum has joined #ruby
Azure has joined #ruby
FooMunki has quit [Quit: FooMunki]
toretore has quit [Ping timeout: 244 seconds]
scepticulous has quit [Ping timeout: 260 seconds]
last_staff has joined #ruby
emilford has joined #ruby
<chrisseaton>
If I have a module that has methods on its singleton class, and I want another module to also have those methods in its singleton class, what is the right way to do that? Just include within the module doesn't seem to do it.
phoo1234567 has joined #ruby
symm-_ has quit [Ping timeout: 276 seconds]
Devalo has joined #ruby
PaulCape_ has joined #ruby
cthulh has joined #ruby
PaulCapestany has quit [Ping timeout: 250 seconds]
tristanp has joined #ruby
Devalo has quit []
RegulationD has joined #ruby
xlegoman has quit [Quit: xlegoman]
xfbs has quit []
SCHAAP137 has quit [Ping timeout: 276 seconds]
RegulationD has quit [Ping timeout: 240 seconds]
stardiviner has quit [Ping timeout: 276 seconds]
davedev24 has joined #ruby
Devalo has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
kareeoleez has joined #ruby
solars has joined #ruby
zacstewart has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
Denart_ has joined #ruby
thesheff17 has quit [Quit: Connection closed for inactivity]
pawnbox has quit [Remote host closed the connection]
kareeoleez has quit [Ping timeout: 260 seconds]
mercerist has quit [Ping timeout: 276 seconds]
zacstewart has quit [Ping timeout: 250 seconds]
chipotle has joined #ruby
SCHAAP137 has joined #ruby
mustmodify has left #ruby [#ruby]
pawnbox has joined #ruby
der-landgraf has quit [Changing host]
der-landgraf has joined #ruby
finisherr has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
blackmesa has joined #ruby
elifoster has quit [Ping timeout: 252 seconds]
tristanp has quit [Remote host closed the connection]
tristanp has joined #ruby
Morfeyka has joined #ruby
solars has quit [Ping timeout: 260 seconds]
PaulCapestany has joined #ruby
<apeiros>
chrisseaton: you can't
<apeiros>
the right way to do it is to define those methods as module_function and then extend the other module. though IMO it's rather pointless to do that.
bobbycvi has quit [Ping timeout: 260 seconds]
CausaMortis has quit [Ping timeout: 252 seconds]
PaulCape_ has quit [Ping timeout: 240 seconds]
rbennacer has quit [Remote host closed the connection]
<chrisseaton>
apeiros: Thanks. I see loads of modules with all the methods as being def self.foo - should they always be module_function instead?
<apeiros>
depends
<apeiros>
any method in a module which makes no use of an ivar or self should be
tristanp has quit [Ping timeout: 244 seconds]
<apeiros>
i.e. pseudo-functions
bronson has joined #ruby
marius has joined #ruby
palms has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 252 seconds]
skweek has joined #ruby
knrz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dramagods has quit [Remote host closed the connection]
zenlot6 has joined #ruby
zenlot has quit [Ping timeout: 252 seconds]
nando293921 has joined #ruby
mlakewood has quit [Quit: mlakewood]
houhoulis has joined #ruby
sgambino has joined #ruby
j0n3 has quit [Remote host closed the connection]
stardiviner has joined #ruby
sp4rrow_ has joined #ruby
dramagods has joined #ruby
aghalarp has joined #ruby
sp4rrow has quit [Ping timeout: 252 seconds]
firstdayonthejob has quit [Ping timeout: 276 seconds]
dramagods has quit [Ping timeout: 276 seconds]
PaulCape_ has joined #ruby
tristanp has joined #ruby
tristanp has quit [Remote host closed the connection]
tristanp has joined #ruby
PaulCapestany has quit [Ping timeout: 276 seconds]
Devalo has quit [Remote host closed the connection]
<awer>
Hi, I'm just starting out with ruby and im trying to create a script that will read from a file filled with useragents. I want to read each line of the useragent and place them into a curl command. i have a webpage as part of a challenge that will only work with one specific useragent and plan is to sole this with curl and ruby. can anyone suggest why my current script is failing? https://paste.ee/p/1Kqua
iaglium has joined #ruby
<awer>
this would be part one. i would then want the output to only out when the repsonse is not = to "wrong user agent" as the output as well as the useragent that were sucessfull
<apeiros>
awer: variables starting with an uppercase letter are constants
<apeiros>
awer: also line 3/4 - you're throwing away all lines except the last
mlakewood has joined #ruby
<awer>
apeiros: so the 'H' should be a 'h' ?
<apeiros>
and given that f1 is your filehandle (and not the line), it makes little sense to interpolate it into the command in line 5
devbug has quit [Quit: ZZZzzz…]
<apeiros>
awer: it should be a name which makes sense. but while h doesn't make sense, it's at least a local variable.
<apeiros>
so: yes (partially)
ruby-lang018 has joined #ruby
<awer>
apeiros: ok thanks. im leanring retty much from scratch
codecop has joined #ruby
<awer>
apeiros: could you give me an example of something that would work so i can play with it a little pleasE?
<apeiros>
you forgot that H -> h thing, and you've got a messy indent. otherwise: yes
codecop has quit [Remote host closed the connection]
PaulCapestany has joined #ruby
kareeoleez has quit [Ping timeout: 252 seconds]
<baweaver>
apeiros apparently forgot is a user
<apeiros>
¿que?
<baweaver>
./whois forgot
last_staff has quit [Quit: last_staff]
duderonomy has joined #ruby
<apeiros>
not my fault if people pick sucky nicknames which get highlighted out of context
blackmesa has quit [Ping timeout: 260 seconds]
<awer>
apeiros: thanks for your help
<apeiros>
would "when" instead of "if" be more appropriate here?
dramagods has quit [Ping timeout: 250 seconds]
PaulCape_ has quit [Ping timeout: 260 seconds]
z3uS has quit [Ping timeout: 264 seconds]
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
x77686d has quit [Quit: x77686d]
htmldrum has joined #ruby
yfeldblum has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
mlakewood has quit [Quit: mlakewood]
z3uS has joined #ruby
ledestin has joined #ruby
ruby-lang018 has quit [Ping timeout: 250 seconds]
josh00200 has joined #ruby
djbkd has joined #ruby
josh00200 has left #ruby [#ruby]
dramagods has joined #ruby
duderonomy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dramagods has quit [Ping timeout: 246 seconds]
<Ox0dea>
apeiros: Not by my lights.
Vlat- has joined #ruby
htmldrum has quit [Ping timeout: 246 seconds]
awer has quit [Ping timeout: 260 seconds]
Xentil_ has quit [Ping timeout: 244 seconds]
tristanp has quit [Remote host closed the connection]
ozzloy has joined #ruby
ozzloy has quit [Changing host]
ozzloy has joined #ruby
tristanp has joined #ruby
tristanp has quit [Ping timeout: 252 seconds]
aghalarp has joined #ruby
spacemud_ is now known as spacemud
PaulCape_ has joined #ruby
blackmesa has quit [Quit: WeeChat 1.4]
yfeldblum has joined #ruby
sp4rrow_ has quit [Quit: The Internet needs a break and I need a cookie]
eljimador has joined #ruby
palms has quit [Quit: Lost terminal]
PaulCapestany has quit [Ping timeout: 276 seconds]
gizmore has joined #ruby
eljimmy has quit [Ping timeout: 252 seconds]
crystal77 has joined #ruby
gizmore|2 has quit [Ping timeout: 276 seconds]
marahin has joined #ruby
<marahin>
Hello. I have a module defined in a file, then I include that file in other file that defines a class. How can I access the module inside that class?
spider-mario has quit [Remote host closed the connection]
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<marahin>
Particulary I have a MultithreadedEach module that allows arrays to be iterated using many threads
duncannz has joined #ruby
<marahin>
and a class that has an attribute which is an array, and I want to .extend(MultithreadedEach) that array.