jackjackdripper has quit [Ping timeout: 260 seconds]
nick__ has quit [Quit: Leaving]
jackjackdripper has joined #ruby
<funkytwig>
He. is there something wrong with the list server for ruby-talk mailing list. I signed up hours ago and have not had an email (I checked spam)
<konsolebox>
funkytwig: it takes too long sometimes
rahult_ has quit [Ping timeout: 260 seconds]
raul782 has joined #ruby
NightMonkey has quit [Ping timeout: 255 seconds]
Mia has quit [Ping timeout: 246 seconds]
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
milardovich has quit [Remote host closed the connection]
NightMonkey has joined #ruby
jphase_ has joined #ruby
raul782 has quit [Ping timeout: 260 seconds]
weems|laptop has quit [Ping timeout: 260 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jphase has quit [Ping timeout: 246 seconds]
__Yiota has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz_ has quit [Ping timeout: 240 seconds]
jackjackdripper1 has joined #ruby
<funkytwig>
I just signed up under a different email and it was immediate, was using a gmail account.
jackjackdripper has quit [Ping timeout: 260 seconds]
rahult has joined #ruby
thinkpad has joined #ruby
WeiJunLi has joined #ruby
funkytwig has quit [Read error: Connection reset by peer]
raul782 has joined #ruby
runescape07rsps has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
NightMonkey has quit [Ping timeout: 255 seconds]
NightMonkey has joined #ruby
weems|laptop has joined #ruby
<weems|laptop>
konsolebox, gem install box worked as sudo
<weems|laptop>
install pry**
boombox_ has joined #ruby
raul782 has quit [Remote host closed the connection]
VladGh has quit [Ping timeout: 255 seconds]
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eightlimbed has joined #ruby
MarkBilk_ has joined #ruby
Rodya_ has joined #ruby
jackjackdripper has joined #ruby
boombox_ has quit [Remote host closed the connection]
MarkBilk has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
dcunit3d has joined #ruby
jackjackdripper1 has quit [Ping timeout: 248 seconds]
phinxy has joined #ruby
ocpysh has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
mim1k has quit [Ping timeout: 240 seconds]
kn-928 has joined #ruby
kn-928 is now known as Guest14419
<weems|laptop>
Having a error using irb: bash: /usr/local/bin/irb: /usr/local/bin/ruby: bad interpreter: No such file or directory
Guest14419 has quit [Client Quit]
jackjackdripper has quit [Read error: Connection reset by peer]
milardovich has quit [Remote host closed the connection]
ramfjord has joined #ruby
charliesome has joined #ruby
Inside has quit [Read error: Connection reset by peer]
kahra has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
moei has quit [Quit: Leaving...]
Silthias has joined #ruby
xuanrui has joined #ruby
Silthias1 has quit [Ping timeout: 246 seconds]
kahra has joined #ruby
QuerkyBren has quit [Remote host closed the connection]
mercerist has left #ruby ["Leaving..."]
marr has joined #ruby
apparition47 has joined #ruby
raul782 has joined #ruby
nofxx has joined #ruby
shwouchk has joined #ruby
raul782 has quit [Ping timeout: 240 seconds]
cadillac__ has joined #ruby
cadillac_ has quit [Ping timeout: 248 seconds]
cadillac__ is now known as cadillac_
mim1k has joined #ruby
mim1k has quit [Ping timeout: 246 seconds]
Mia has quit [Ping timeout: 246 seconds]
InfinityFye has joined #ruby
alfiemax has quit [Remote host closed the connection]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
alfiemax has joined #ruby
tirej has quit [Changing host]
tirej has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dmtd has quit [Quit: Connection closed for inactivity]
MrLunaticFox has joined #ruby
auxbuss has joined #ruby
auxbuss has quit [Client Quit]
moei has joined #ruby
dymaxion has joined #ruby
dymaxion is now known as Guest29118
marr has quit [Ping timeout: 240 seconds]
Guest29118 has quit [Client Quit]
korvak has left #ruby ["Bye!"]
vuoto has joined #ruby
pandaant has joined #ruby
NeverTired has joined #ruby
dymaxion_ has joined #ruby
dymaxion_ has quit [Client Quit]
alex``` has quit [Quit: WeeChat 1.9]
alex`` has quit [Quit: WeeChat 1.9]
howdoi has quit [Quit: Connection closed for inactivity]
Dimik has quit [Ping timeout: 248 seconds]
alex` has joined #ruby
alex` is now known as Guest27960
funkytwig has joined #ruby
pandaant has quit [Quit: Lost terminal]
alfiemax has quit [Remote host closed the connection]
<funkytwig>
Hi, where is the best place to get help from ruby community. I noticed the ruby-yalk list is very quiet with just a few messages a day.
apparition47 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
vuoto has quit [Remote host closed the connection]
Guest56fsfdsdsaf has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
hanmac has quit [Quit: Leaving.]
Guest56fsfdsdsaf has quit [Client Quit]
charliesome has joined #ruby
A124 has quit [Remote host closed the connection]
marr has joined #ruby
A124 has joined #ruby
brent__ has joined #ruby
smulverine1 has quit [Remote host closed the connection]
sourcx has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
apparition47 has joined #ruby
vuoto has joined #ruby
mim1k has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mim1k has quit [Ping timeout: 255 seconds]
gr33n7007h has joined #ruby
ocpysh has joined #ruby
conta has quit [Quit: conta]
jphase has joined #ruby
sourcx has quit [Ping timeout: 246 seconds]
gr33n7007h has quit [Quit: WeeChat 1.9]
jphase has quit [Ping timeout: 240 seconds]
phatypus has joined #ruby
gr33n7007h has joined #ruby
milardovich has joined #ruby
sylario has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
opencw has quit [Ping timeout: 255 seconds]
ocpysh has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
dymaxion has joined #ruby
dymaxion is now known as Guest35073
apparition47 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nowhere_man has joined #ruby
<konsolebox>
funkytwig: here
TvL2386 has joined #ruby
TvL2386_ has quit [Ping timeout: 258 seconds]
apparition47 has joined #ruby
opencw has joined #ruby
jamesaxl has joined #ruby
phatypus has quit [Ping timeout: 276 seconds]
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
work has joined #ruby
work has left #ruby [#ruby]
vuoto has quit [Client Quit]
vuoto has joined #ruby
conta has joined #ruby
phatypus has joined #ruby
conta has quit [Client Quit]
Guest35073 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhere_man has quit [Ping timeout: 240 seconds]
<funkytwig>
konsolebox, OK, ime having a problem creating a class to access mysql. I wrone a simple text script and posted the code and error at https://pastebin.com/vVryQvi4
<ruby[bot]>
funkytwig: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<konsolebox>
i mean i do have my own, but i find myself to have the authority to suggest anything yet.
dymaxion has joined #ruby
<funkytwig>
konsolebox, I must of posted the version without the setter. anyway thanks again.
dymaxion is now known as Guest26409
<konsolebox>
funkytwig: you might find the double-splat operator useful.
Guest26409 has quit [Client Quit]
<matthewd>
If you're uncomfortable with the size of your initialize, I'd suggest that may be a clue you have too many instance variables
<konsolebox>
funkytwig: just google the term or use duckduckgo
<konsolebox>
funkytwig: i also forgot to tell you that there are shortcuts to creating getters and setters. those are attr_reader; attr_writer and attr_accessor
frozengeek_ has joined #ruby
MagePsycho_ has joined #ruby
<MagePsycho_>
best way to install #ruby?
<funkytwig>
MagePsycho_, which platform
<MagePsycho_>
linux
<konsolebox>
MagePsycho_: every distro has different ways in installing Ruby
<funkytwig>
MagePsycho_, ditribution?
<MagePsycho_>
I meanusing rbenv or rvm or standalone
<voker57>
probably rvm
<MagePsycho_>
rbenv vs rvm vs chruby vs
<konsolebox>
I don't use rbenv or rvm unfortunately, as I don't need it in Gentoo.
<voker57>
you can install arbitrary number of rubies simultaneously in gentoo?
<konsolebox>
yes
<matthewd>
"Best" is in rather the eye of the beholder; different options have different advantages and disadvantages
<konsolebox>
and it's beautiful how it's handled :)
mim1k has joined #ruby
<funkytwig>
MagePsycho_, how nutch linux experience have you got?
<MagePsycho_>
ubuntu 16.04
dymaxion_ has joined #ruby
mim1k has quit [Ping timeout: 246 seconds]
<konsolebox>
(got dc'd)
c__ has quit [Remote host closed the connection]
<MagePsycho_>
so installing ruby as root or non-root user is recommended?
<funkytwig>
konsolebox, OK, did a little digging. So I use attr_accessor to effectively create a simple getter and setter, attr_reader for just a setter and attr_ancester to create both?
sepp2k has joined #ruby
<konsolebox>
attr_writer for just a setter, attr_reader for just a getter
<funkytwig>
konsolebox, but if I want to put code in the setter (whitch I sometimes to, to for example format data, I would do it the long way
dymaxion_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ledestin has quit [Ping timeout: 260 seconds]
<funkytwig>
konsolebox, so the attr_reader/writer are from the classes perspective, not the outside world, that makes sence
<konsolebox>
MagePsycho_: how i see it: if you want to install a single version of Ruby, installing it using the distro's package installer might suffice. but if you need to install multiple versions or if you need to use a newer version that's not provided by the system installer, using another tool like rvm, rbenv, etc. would be needed. and if these tools install Ruby as non-root, Ruby would likely be installed in the home directory, and the PATH to the ruby
<konsolebox>
binary would need to be included through .profile, or whatever startup script of the shell is appropriate.
<MagePsycho_>
konsolebox: better to have multiple version i think
<MagePsycho_>
I am going with rvm for now
milardovich has joined #ruby
Bhootrk_ has joined #ruby
Guest27960 is now known as alex``
<funkytwig>
konsolebox, @attr_accessor :bar, :baz' so you use : not @?
<funkytwig>
konsolebox, 'attr_accessor :bar, :baz' so you use : not @?
milardovich has quit [Ping timeout: 248 seconds]
<MagePsycho_>
gem is already available when you install ruby?
<konsolebox>
funkytwig: you pass symbols
<konsolebox>
funkytwig: attr_reader, attr_writer, and attr_accessor are methods, not keywords
<konsolebox>
>> class X; puts method(:attr_accessor).owner; end
<konsolebox>
MagePsycho_: `gem` is part of RubyGems
<konsolebox>
but your installer might install it along with Ruby
<funkytwig>
konsolebox, sorry, don't quite follow
<funkytwig>
konsolebox, can I replace my @code setter with attr_writer :code
<konsolebox>
funkytwig: they are methods therefore you call them as methods
<konsolebox>
funkytwig: defining a class with `class X; def code=(value); @code = value; end; end` is the same as `class X; attr_writer :code; end
<funkytwig>
KnownSyntax, so if I have a :code vriter I do obj.code( var ), not obj.code=var
<konsolebox>
funkytwig: after defining a writer for @code, you can just call `obj.code = var`
<funkytwig>
konsolebox, I think I am getting lost in the finer points, I think I get it.
<funkytwig>
if I want to have a array as a instance var how best to do that. currently I am doing '@title_array=[]' in the initilize method
<konsolebox>
class X; attr_reader :title_array; def initialize; @title_array = []; end; end
<konsolebox>
with `attr_reader :title_array` only neceessary if you want to access the value of @title_array outside. and it can be attr_writer or attr_accessor instead.
<konsolebox>
funkytwig: attr_reader, attr_writer and attr_accessor are only used to create the reader/writer (getter/setter) methods. they are not used to define initial values of instance variables. they are also run inside the context of the class (because they create instance methods), and not in the context of an instance, that's why you don't call them inside the initialize method. The initialize method is an instance method, and it runs in the context of an
<konsolebox>
instance, not a class.
chouhoulis has joined #ruby
patrontechnosoft has quit [Remote host closed the connection]
<funkytwig>
konsolebox, but you don't have to instansiate variables in ruby so they act (at least in a documentation context) to list variables.
<funkytwig>
konsolebox, Personally, even though it is possible (I believe) to just start using a @var in any method and it effecticly get created I would rather have a way of listing instance varables at to begining
<konsolebox>
funkytwig: an uninstantiated instance variable in ruby defaults to nil.
davic has quit [Quit: Connection closed for inactivity]
<konsolebox>
funkytwig: it's possible to create a getter method that returns a default value like `def array; @array ||= []; end
bane_ has joined #ruby
<konsolebox>
funkytwig: i hope you consider that concept to help your understanding
<funkytwig>
konsolebox, that was how I was setting the arrays, in the initialize, so I guess I was doing it a proper way
goyox86_ has joined #ruby
<kitallis>
if I have 2 subclasses, which need to call the same method, and so the method exists in the parent class, but the values required to compute it are only computed in the child class
goyox86_ has quit [Client Quit]
<konsolebox>
funkytwig: getter/setter methods can be created regardless of whether an instance variable is instantiated or not. same goes to other methods. you can program to work with instance variables even though variables weren't initialized by initialize().
<kitallis>
how do I cleanly handle that inheritance
goyox86_ has joined #ruby
<funkytwig>
konsolebox, ime still doing @var = '' in the initialize as I like to show what varables are used in the medods, rather than just use them willy nilly.
<funkytwig>
konsolebox, thinks it makes more maintainable code
<konsolebox>
kitallis: so it's class group of A < B < C? or just A < B?
<kitallis>
it's Sub < Parent | Sub2 < Parent
jphase has joined #ruby
nostalgiccloud has quit [Ping timeout: 240 seconds]
<kitallis>
konsolebox, ^
<konsolebox>
kitallis: if the parent or base class is meant to be an abstract class, you can simply create the methods in the derived classes and not call super. in the abstract method of the parent class, you can also make it throw an unimplemented exception if it's called.
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<konsolebox>
*raise
<kitallis>
konsolebox, which means, I can't share functionality between the two subclasses
<kitallis>
they'll be the same methods
<kitallis>
hrm
<konsolebox>
kitallis: and you don't want to implement this functionality in the base class? you can create a module and have them (the two subclasses) include that module if you want.
bruno- has joined #ruby
<kitallis>
ah
<kitallis>
that's better
<konsolebox>
so class Sub < Parent; include Common; end
<kitallis>
right
<kitallis>
thanks konsolebox
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
cout has joined #ruby
jamesaxl has joined #ruby
oleo has quit [Remote host closed the connection]
jphase has quit [Ping timeout: 258 seconds]
kkiero has quit [Quit: leaving]
m27frogy has quit [Ping timeout: 240 seconds]
BSaboia has quit [Quit: Leaving]
oleo has joined #ruby
m27frogy has joined #ruby
rahult has joined #ruby
ocpysh has joined #ruby
MagePsycho_ has quit [Quit: MagePsycho_]
conta has quit [Quit: conta]
conta has joined #ruby
oleo has quit [Quit: irc client terminated!]
troulouliou_div2 has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
goyox86_ has quit [Quit: goyox86_]
goyox86_ has joined #ruby
tomphp has joined #ruby
beilabs has joined #ruby
dymaxion has joined #ruby
dymaxion is now known as Guest12432
beilabs has quit [Remote host closed the connection]
tomphp has quit [Remote host closed the connection]
MagePsycho_ has joined #ruby
beilabs has joined #ruby
brent__ has joined #ruby
MagePsycho_ has quit [Client Quit]
bruno- has quit [Ping timeout: 246 seconds]
brent__ has quit [Ping timeout: 240 seconds]
__Yiota has joined #ruby
roboncloud has joined #ruby
<roboncloud>
is there a global that provides the path to the current ruby binary?
bensarz has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
<Papierkorb>
roboncloud: do you mean the ruby binary, or the script being run?
<roboncloud>
ruby binary
<Papierkorb>
What do you intend to do?
<roboncloud>
use it with Kernel.spawn().
beilabs has quit [Remote host closed the connection]
davic has joined #ruby
<Papierkorb>
From the Kernel.spawn docs: `pid = spawn(RbConfig.ruby, "-eputs'Hello, world!'")`
<roboncloud>
but yeah, it may work, RbConfig is usually for compile time options though.
<Papierkorb>
my `pry` installation knows of RbConfig
<roboncloud>
yea. sure. that's still no excuse for 0 docs tho.
phinxy has joined #ruby
oleo has joined #ruby
<roboncloud>
it looks like a join of a path known at compile time with filenames known at compile time. i guess moving the ruby binary somewhere else after compile isn't a thing. so this will probably do, cheers!
ocpysh has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<Papierkorb>
roboncloud: There's always `/proc/self/exe` .. on Linux, no idea about UNIXes
mim1k has quit [Ping timeout: 240 seconds]
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<roboncloud>
for now i think RbConfig should be okay but yeah, to be more robust i should probably use that and whatever the equivalents are on OSX/Win.
tomphp has joined #ruby
tomphp has quit [Remote host closed the connection]
milardovich has joined #ruby
eightlimbed has joined #ruby
milardovich has quit [Ping timeout: 258 seconds]
beilabs has joined #ruby
Guest12432 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<konsolebox>
roboncloud: even a basic C-based process can't reliably tell what binary it has been called with, i believe.
dymaxion_ has joined #ruby
<roboncloud>
`/proc/self/exe`is reliable afaik..
rahult has joined #ruby
<konsolebox>
for Linux, yes
<konsolebox>
or maybe, i haven't really tested that
funburn has joined #ruby
harfangk has quit [Ping timeout: 246 seconds]
<roboncloud>
it's managed by the kernel, so i would think so.
gr33n7007h has quit [Ping timeout: 246 seconds]
dymaxion_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<konsolebox>
roboncloud: what if the binary is hard-linked?
<roboncloud>
what do you mean by 'hard-linked' ?
cam27 has joined #ruby
<konsolebox>
ln binary binary.other_self
<konsolebox>
nah i'm just being extreme
<roboncloud>
i don't know. but honestly, it wouldn't matter for my use case.
<konsolebox>
yes
<konsolebox>
my point is, the Ruby devs wouldn't really formulate a general solution for identifying the "current ruby binary", because of such reasons
apparition47 has quit [Quit: Bye]
redondos has joined #ruby
<roboncloud>
i don't think what you said hard or symlinks would matter. the only challenge would be being cross-platform, but there's already APIs only available on some platforms.
ltem has joined #ruby
jinie_ has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
jinie_ has joined #ruby
<roboncloud>
i think another reason it hasn't been implemented is that it's not commonly requested. and `RbConfig.ruby` is probably enough for most people.
<konsolebox>
probably
eightlimbed has joined #ruby
skweek has joined #ruby
bruno- has joined #ruby
goyox86_ has joined #ruby
HarimaKenji has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
<roboncloud>
very quiet here these days?
<roboncloud>
i hope Ruby isn't gaining Perl status
bruno- has joined #ruby
<roboncloud>
799 users is pretty high tho i guess.
bruno- has quit [Read error: Connection reset by peer]
<konsolebox>
a lot of those passionate people probably are using other languages. python has also gained more audience in the commercial areas.
<roboncloud>
yeah. i've moved into the JS space a lot myself, but still use Ruby everyday too.
HarimaKenji has left #ruby [#ruby]
<konsolebox>
there's also Rust, but i didn't like Rust since i can't stand how it interpreted a "Range". maybe i'll just endure it someday and use it once i see true benefit using it.
cdg has joined #ruby
<roboncloud>
yea... not really into Rust.
<roboncloud>
i still like C
bruno- has joined #ruby
Bhootrk_ has quit [Ping timeout: 240 seconds]
bruno- has quit [Read error: Connection reset by peer]
<baweaver>
roboncloud: It's a Saturday morning
<baweaver>
most people are likely either asleep or just getting up in the states
<roboncloud>
4pm where i am
jphase has joined #ruby
<baweaver>
Somewhere around Germany?
<roboncloud>
yea
<baweaver>
jhass and apeiros are over there. I think dminuoso was too.
<baweaver>
though they're not always active on weekends
<roboncloud>
cool
mim1k has joined #ruby
bruno- has joined #ruby
<baweaver>
and then you have people like me that tend to duck out on mention of C :D
<baweaver>
I use Ruby, JS, and Go at work in that order
mim1k has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
thoraxe has quit [Ping timeout: 255 seconds]
<thinkpad>
is ruby better than perl? i dont want people at work to think i'm a wanker because i use something inferior to perl
milardovich has quit [Remote host closed the connection]
<Nilium>
How are you going to measure better?
digitalnomad has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
aglorei1 has quit [Remote host closed the connection]
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
chouhoulis has quit [Remote host closed the connection]
aglorei1 has joined #ruby
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<konsolebox>
i used perl before, and I honestly think ruby is much easier to use. can't say about perl6.
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
<Nilium>
If you're doing sysadmin stuff, perl's usually present on more systems by default. Python as well. Assuming you don't have too much red tape about what's available on systems, though, that's not too hard to remedy.
aglorei1 has quit [Remote host closed the connection]
aglorei1 has joined #ruby
scottschecter has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
Mia has quit [Ping timeout: 240 seconds]
scottschecter has joined #ruby
bruno- has joined #ruby
<tomdickharry>
i've limited knowledge of programming but am starting to learn with metasploit for penetration testing....can somebody please describe what this code is doing? https://pastebin.com/8h9Kgcbx
<tomdickharry>
is there a header i can view that tells me where all these functions it appears to be using are coming from?
<roboncloud>
@tomdickharry hard to know because there's a lot of method calls there that aren't familiar unless you know metasploit(i guess? but "sock", "dist_cmd", "connect", "disconnect", "handler" and "read_output" aren't part of standard Ruby. at a guess it's spawning a shell over a socket, and reading the response.
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
<roboncloud>
did you try the #metasploit channel?
bruno- has quit [Read error: Connection reset by peer]
<roboncloud>
you may have better luck there.
bruno- has joined #ruby
<konsolebox>
tomdickharry: download the metasploit source code and grep stuff out. study Msf::Exploit::Remote and Msf::Exploit::Remote::Tcp.
<tomdickharry>
konsolebox is git clone the best way to do that?
<konsolebox>
you can.. or you can simply download a snapshot.. or you can download a release
<tomdickharry>
is there a way to search git archives with an index or do i have to get a link with the browser?
<konsolebox>
git clone might take long, and the .git dir /could/ get in the way when grepping recursively
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<roboncloud>
i recommend trying: `gem install pry pry-doc --no-ri --no-rdoc`, `pry -rmetasploit`, and then stuff like: 'show-source Msf::Exploit::Remote::Tcp`. it's a bit nicer than just ack/grep on src files sometimes.
jphase has quit [Ping timeout: 246 seconds]
<konsolebox>
tomdickharry: never tried that, or not sure what you mean to do
govg has quit [Ping timeout: 240 seconds]
<roboncloud>
if you're already using metasploit the code will be on your computer. try load it into Pry, then you can explore it from there, and find it on disk as well.
<konsolebox>
tomdickharry: in github you can download snapshots. so if metasploit's source code is in github...
alfiemax has joined #ruby
govg has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
mim1k has quit [Ping timeout: 276 seconds]
<roboncloud>
is there a method for expanding shell variables? besides `system("$PWD/foo")` ?
govg has quit [Ping timeout: 240 seconds]
<roboncloud>
ah nvm
<matthewd>
roboncloud: Do you want environment variables, or to expand a shell expression?
<roboncloud>
ill make it an erb template
mim1k has joined #ruby
bruno- has joined #ruby
digitalnomad has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
<roboncloud>
i have a `.env` file with the contents: `FOO=$PWD/bar`. then i assign ENV[key] = value where key is 'FOO' and value is '$PWD/bar'. i want to expand $PWD on assignment to ENV.
conta has quit [Ping timeout: 240 seconds]
<roboncloud>
but, if it isn't easy, i can just have <%= Dir.getwd %>/bar instead.
<roboncloud>
or env, <%= ENV['PWD'] %>/bar
<roboncloud>
or even,*
KeyJoo has quit [Read error: Connection reset by peer]
<matthewd>
Yeah, you'd have to write your own parser. A simple version is trivial, but then there are the edge cases.
<roboncloud>
ah okay, no problem, erb will probably work out better
KeyJoo has joined #ruby
milardovich has joined #ruby
bruno- has joined #ruby
goyox86_ has quit [Quit: goyox86_]
goyox86_ has joined #ruby
milardovich has quit [Ping timeout: 255 seconds]
m27frogy has quit [Ping timeout: 240 seconds]
bruno- has quit [Read error: Connection reset by peer]
goyox86_ has quit [Client Quit]
bruno- has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
<MagePsycho_>
If i close the terminal/shell and re-open it, ruby command doesn’t work any more
<konsolebox>
MagePsycho_: Try source-ing ~/.rvm/scripts/rvm again
funburn has joined #ruby
funburn has quit [Read error: Connection reset by peer]
<konsolebox>
if it works, you should make it permanent that it is 'source'd everytime you launch a shell. you can add it in .profile as a start. tell me if it doesn't work.
joenas[m] has joined #ruby
aviraldg has joined #ruby
aidalgol has joined #ruby
M107262[m] has joined #ruby
jonjits[m] has joined #ruby
dman[m] has joined #ruby
KevinMGranger has joined #ruby
gokul_mr[m] has joined #ruby
heftig has joined #ruby
yana[m] has joined #ruby
lasenna[m] has joined #ruby
Giphy[m] has joined #ruby
torarne has joined #ruby
turt2live has joined #ruby
Matt[m]1 has joined #ruby
velu_aon[m] has joined #ruby
aagdbl[m] has joined #ruby
ryzokuken has quit [Remote host closed the connection]
ryzokuken has joined #ruby
funburn has joined #ruby
funburn has quit [Read error: Connection reset by peer]
<MagePsycho_>
konsolebox: so in .profile if i add source ~/.rvm/scripts/rvm
<MagePsycho_>
it should everytime when i reload the shell
InfinityFye has quit [Quit: Leaving]
<konsolebox>
MagePsycho_: it should work everytime you do a login
<konsolebox>
or a shell is executed with -l
funburn has joined #ruby
ryzokuken has quit [Read error: Connection reset by peer]
funburn has quit [Read error: Connection reset by peer]
ryzokuken__ has joined #ruby
funburn has joined #ruby
funburn has quit [Read error: Connection reset by peer]
t-recx has quit [Read error: Connection reset by peer]
t-recx has joined #ruby
funburn has joined #ruby
funburn has quit [Read error: Connection reset by peer]
nostalgiccloud has quit [Ping timeout: 276 seconds]
<Mon_Ouie>
Hey matti :) It's been a while hasn't it?
<Papierkorb>
roboncloud: It should have, as enumerable type, a forEach right away.
<Papierkorb>
roboncloud: including all the other known operations
<apeiros>
ES6/7 made a couple of things better. no true integers is still pretty crap, though.
<apeiros>
and the Date API is an outright nightmare in JS
<apeiros>
I mean ffs it doesn't even have something like strftime or strptime.
<Papierkorb>
apeiros: Everything called `Java*` has awful out-of-the-box date/time functionality
<apeiros>
Papierkorb: in java it's not that bad. loading libraries comes at little cost.
nadir has joined #ruby
opekktar_ has quit []
<apeiros>
thanks to broadband this problem is less bad now. but it's still annoying having to load a couple dozen KB libs for basic stuf.
<apeiros>
*stuff
sp4rrow has joined #ruby
DEEP-BOOK-1WM_SU has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<roboncloud>
yeah, sure, in the browser context that's true, but that's not the only context where JS lives. i don't know for sure but i'd be shocked if Node didn't have a decent implementation of Date&Time functions. JS also lives in web extensions API(Chrome, Firefox) and many other contexts(node-webkit, that thing atom uses i cant remember name of....). I haven't seen anything glaringly bad in JS that i haven't seen equally
<roboncloud>
as bad in another way in Ruby. so *shrug*.
DEEP-BOOK-1WM_SU has quit [Excess Flood]
opekktar has quit [Quit: Leaving]
DEEP-BOOK has joined #ruby
<roboncloud>
@Mon_Ouie, thanks. that's much prettier.