milardovich has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
Dimik has quit [Ping timeout: 248 seconds]
nadir has joined #ruby
milardovich has quit [Ping timeout: 256 seconds]
klixto has quit [Quit: Konversation terminated!]
bigblind has joined #ruby
clemens3 has quit [Ping timeout: 264 seconds]
bigblind has quit [Ping timeout: 248 seconds]
eblip has joined #ruby
def_jam has joined #ruby
eb0t has quit [Ping timeout: 276 seconds]
eb0t- has quit [Ping timeout: 256 seconds]
RougeR has quit [Ping timeout: 265 seconds]
John_Ivan has quit [Read error: Connection reset by peer]
venmx has quit [Quit: leaving]
ur5us has joined #ruby
bigblind has joined #ruby
ur5us has quit [Remote host closed the connection]
n0m4d1c has joined #ruby
bigblind has quit [Ping timeout: 256 seconds]
venmx has joined #ruby
cadillac_ has quit [Ping timeout: 248 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
cadillac_ has joined #ruby
bigblind has joined #ruby
Bounga has joined #ruby
bigblind has quit [Ping timeout: 260 seconds]
Bounga has quit [Ping timeout: 256 seconds]
mtkd has quit [Ping timeout: 248 seconds]
dogweather has joined #ruby
ledestin has joined #ruby
mtkd has joined #ruby
cpruitt has quit [Remote host closed the connection]
def_jam is now known as eb0t-
cpruitt has joined #ruby
<soahccc>
I just finished the most ludicrous and unnecessarily complicated CLI tool ever for a simple task that could be easily replaced by a 10-line shell script but I feel good :) After living in hell for 2 weeks
bigblind has joined #ruby
<soahccc>
also can any postgres literate tell me if you can disable foreign key constraint checks over a series of processes and time and reactivate it after a few parallel imports are complete?
pastorinni has quit [Remote host closed the connection]
bigblind has quit [Ping timeout: 268 seconds]
arescorpio has joined #ruby
marr has quit [Ping timeout: 248 seconds]
arescorpio has quit [Max SendQ exceeded]
randomstrangerb has quit [Ping timeout: 240 seconds]
<atchoum>
soahccc: what you want to do seems so weird
<jidar>
soahccc: I'm not pg expert, but that sounds very wrong for DB's
<jidar>
like very very wrong
<atchoum>
yeah :)
<atchoum>
lol
<jidar>
the whole point of FK is for data integrity
<atchoum>
and what do you maen by « parallel imports »
cschneid has joined #ruby
<soahccc>
I understand that. I'm a dirty mysql person you know :D and if I want to add something to our website I pull live data to my dev machine but the whole DB is huge and takes ages. So I just pull the tables I need
<craysiii>
I'm a little confused. I monkey-patched #second onto Numeric, but when I try to test with RSpec e.g. expect(1).to respond_to :second, it fails, even though if I call 1.methods I can see it included in the list. Am I misunderstanding how respond_to works?
<soahccc>
but there will be integrity violations but I'm cool with it
<atchoum>
soahccc: what you are trying to do seems so dirty and disgusting that I don't wish to discuss it anymore.
<soahccc>
atchoum: what would you do, if pulling the whole database, takes 4 hours?
<atchoum>
I think in mysql, the in memory engine doesn't check constraint.
<atchoum>
soahccc: I wouldnot depend on production data to write a patch. I would try to create locally on my machine a copy of the database structure then selectively import few data samples.
<jidar>
sounds like you should pull it down into an ETL and never put it back
<atchoum>
Well methodologically speaking. It seems weird to check out production data the way you do. I wish you good luck thouhg.
skweek has quit [Ping timeout: 248 seconds]
<atchoum>
alternatively you could create the table without the foreign key constraints, dump the tables you are interested in and insert the data afterward (assuming this would work with PG).
<soahccc>
I guess it depends on the use case. Surely one could solve it "better" but our way works good, I was just asking for psql. Some employees enter the boring data in our production backend and sometimes we have to add new features for specials, etc. and we just need a few tables which might reference data that we dont need.
<soahccc>
I was just curious because I never worked with psql and I rewrote my "db sucker" tool to play with a few things and am trying to figure out if anyone is interested (also I was trying to find out if I ever can add psql support)
<soahccc>
In the worst case I end up with a tool that only our company uses and I learned a bunch of things while creating it :)
arescorpio has joined #ruby
tjbp has quit [Ping timeout: 252 seconds]
bigblind has joined #ruby
eblip is now known as eb0t
tjbp has joined #ruby
bigblind has quit [Ping timeout: 264 seconds]
milardovich has joined #ruby
AJA4350 has quit [Quit: AJA4350]
bigblind has joined #ruby
selim has quit [Ping timeout: 268 seconds]
bigblind has quit [Ping timeout: 256 seconds]
konos5_ has quit [Quit: Connection closed for inactivity]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
bigblind has joined #ruby
guardianx has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
bigblind has quit [Ping timeout: 248 seconds]
regedit has quit [Quit: Connection closed for inactivity]
immune has joined #ruby
clemens3 has joined #ruby
geoffr has joined #ruby
<geoffr>
Hi all, I was wondering if there's simple way to run methods (such as FileUtils.mkdir_p ) but with sudo? For example I'm writing a service to run as an unprivileged user but that service needs to create directory for another user and I would like to avoid having to write my own system call
ur5us has joined #ruby
amatas has joined #ruby
mark_66 has joined #ruby
guardianx has quit [Ping timeout: 268 seconds]
vondruch has joined #ruby
jnollette has quit [Ping timeout: 255 seconds]
roshanavand has joined #ruby
u0157542 has joined #ruby
jnollette has joined #ruby
bigblind has joined #ruby
claudiuinberlin has joined #ruby
roshanavand has quit [Client Quit]
vondruch has quit [Client Quit]
roshanavand has joined #ruby
vondruch has joined #ruby
milardovich has joined #ruby
u0157542 has quit [Quit: WeeChat 1.9.1]
milardovich has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
claudiuinberlin has quit [Ping timeout: 252 seconds]
jaruga has joined #ruby
cpruitt has quit [Read error: Connection timed out]
morfin60 has joined #ruby
<morfin60>
hello
<morfin60>
what's simpliest way to remove first element in path
<morfin60>
as example i have /A/B/C/D/E i need to remove A whatevet it is
ur5us has quit [Remote host closed the connection]
immune has quit [Ping timeout: 256 seconds]
cpruitt has quit [Ping timeout: 256 seconds]
<morfin60>
just gsub?
<dminuoso>
konos5_: Ruby has a relatively simple method lookup.
anisha has joined #ruby
<morfin60>
not sure it's valid
<konos5_>
right then up, correct?
<dminuoso>
konos5_: It basically works like this: Take the receiver (whatever is on the left side of the dot in the method call), determine its class, and then check its ancestory for the method.
<dminuoso>
konos5_: To allow for certain patterns to emerge, the algorithm has one little quirk - the ancestory implicitly begins with the receivers singleton class.
<konos5_>
right.
<konos5_>
I get it
<dminuoso>
konos5_: Next up, class << self is not a special thing, its a general syntax.
<havenwood>
morfin60: Just #sub when you only want to do it once. Maybe something like: sub(/\A\/?[^\/]*/, '')
<dminuoso>
You can do "class << foo" for anything to "open its singleton class"
<dminuoso>
konos5_: So "class << self" is kind of similar to self.singleton_class.instance_eval
cpruitt has joined #ruby
<dminuoso>
similary def foo.bar defines a method in foo's singleton class
<konos5_>
Yeap
<konos5_>
let me stop you right there
<konos5_>
I aware of this
<konos5_>
I even get the post's answer
<konos5_>
However the answer can't be explained using this diagram:
<dminuoso>
konos5_: It's ignoring modules for various reasons, but you could think of them as beind added to the left (prepending) and right (including) of classes.
n0m4d1c has quit [Remote host closed the connection]
<morfin60>
and why the heck you call it simple?
<dminuoso>
morfin60: Well things like private/public and method_missing aside, it's fairly simple: Get ancestory, check each class in ancestory, pick first matching method.
<dminuoso>
Then it just becomes an issue of "what is the ancestory exactly"
<morfin60>
hah
alex`` has joined #ruby
leitz has joined #ruby
<dminuoso>
(The reason that I ignore private/public is this super frustrating bit, that if you mark a method as _private_, depending on _how_ you send the corresponding symbol it might either error out about calling a method, or pick method_missing instead.
<dminuoso>
)
<morfin60>
as example we have something like Object->Module->Class->Foo->Instance of Foo, there can be ancestors for every level
<morfin60>
*on every level
<dminuoso>
morfin60: And it even makes things like super easy to understand. It's just "resume lookup and call the next matching"
dextrey has joined #ruby
<morfin60>
does Ruby avoid looking up same thing somehow?
<dminuoso>
morfin60: For `super`? Yes.
<dminuoso>
It's basically "follow the super chain of the current rclass for the next matching"
<morfin60>
as example Foo include Bar, Bar is basically Class
<dminuoso>
morfin60: nope..
<morfin60>
will Class and Object and Module looked up once
<morfin60>
oh
<dminuoso>
Bar is then tucked to the right side of Foo, so that the diagram would look [Foo][Bar]--super-->[Object]--super-->[BasicObject]--super-->nil
<dminuoso>
Prepend does the same thing, except it packs it on the left side
<dminuoso>
(Note that this is only a mental model, because internally its a bit different)
workmad3 has joined #ruby
cpruitt has quit [Ping timeout: 256 seconds]
devil_tux has quit [Quit: leaving]
<dminuoso>
It's also the reason why I chose to do this vertically, so that "prepend" and "append" (i.e. include) works visually well.
<dminuoso>
And when I say vertically I mean horizontally.
qba73 has joined #ruby
ramfjord has joined #ruby
marataziat has joined #ruby
<marataziat>
hi
milardovich has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
tomphp_ has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
atchoum has quit [Ping timeout: 240 seconds]
phs^ has joined #ruby
phs^ has quit [Max SendQ exceeded]
tomphp_ has quit [Client Quit]
ramfjord has quit [Ping timeout: 240 seconds]
bigblind has quit [Ping timeout: 276 seconds]
TomyWork has joined #ruby
phs^ has joined #ruby
phs^ has quit [Max SendQ exceeded]
phs^ has joined #ruby
phs^ has quit [Max SendQ exceeded]
mongag has quit [Ping timeout: 248 seconds]
<marataziat>
how to say Hello World in ruby?
phs^ has joined #ruby
phs^ has quit [Max SendQ exceeded]
phs^ has joined #ruby
phs^ has quit [Max SendQ exceeded]
phs^ has joined #ruby
phs^ has quit [Max SendQ exceeded]
<KevinSjoberg>
marataziat: puts "hello, world!"
gregf_ has quit [Ping timeout: 260 seconds]
dextrey has quit [Ping timeout: 248 seconds]
tcopeland has quit [Quit: tcopeland]
ramfjord has joined #ruby
Beams has joined #ruby
<marataziat>
Thanks :3
leitz has quit [Quit: Nappy time]
Beams has quit [Quit: .]
devil_tux has joined #ruby
mtkd has quit [Ping timeout: 256 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
nadir has quit [Quit: Connection closed for inactivity]
mtkd has joined #ruby
alex`` has quit [Quit: WeeChat 2.0.1]
nadir has joined #ruby
bigblind has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drcode has quit [Ping timeout: 256 seconds]
immune has quit [Ping timeout: 256 seconds]
John_Ivan has joined #ruby
marataziat has quit [Ping timeout: 256 seconds]
Ishido has joined #ruby
goatish has joined #ruby
milardovich has quit [Read error: Connection reset by peer]
immune has joined #ruby
locsmif has joined #ruby
milardovich has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
marataziat has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
klixto has quit [Quit: Konversation terminated!]
konos5_ has quit [Quit: Connection closed for inactivity]
klixto has joined #ruby
TomyWork has joined #ruby
SynSynack has joined #ruby
bigblind has quit [Read error: Connection reset by peer]
bigblind has joined #ruby
linduxed has quit [Quit: WeeChat 2.0.1]
workmad3 has quit [Ping timeout: 256 seconds]
Xiti has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
nahra has quit [Remote host closed the connection]
Lyubo1 has quit [Ping timeout: 248 seconds]
ur5us has joined #ruby
drewmcmillan has joined #ruby
amatas_ has joined #ruby
marataziat has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 260 seconds]
immune has quit [Ping timeout: 240 seconds]
Lyubo1 has joined #ruby
jeffreylevesque has quit [Ping timeout: 276 seconds]
qba73 has quit [Remote host closed the connection]
John_Ivan has quit [Read error: Connection reset by peer]
qba73 has joined #ruby
immune has joined #ruby
ramfjord has joined #ruby
milardovich has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
za1b1tsu has quit [Read error: Connection reset by peer]
geoffr has quit [Quit: Leaving]
ramfjord has quit [Ping timeout: 276 seconds]
tcopeland has joined #ruby
VladGh has quit [Quit: Lost terminal]
VladGh has joined #ruby
milardovich has quit [Remote host closed the connection]
zigzig has quit [Ping timeout: 255 seconds]
skweek has joined #ruby
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
zigzig has joined #ruby
apparition has joined #ruby
AJA4350 has joined #ruby
cadillac_ has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 248 seconds]
qba73 has quit [Ping timeout: 252 seconds]
skweek has quit [Ping timeout: 256 seconds]
cadillac_ has joined #ruby
hanmac has quit [Ping timeout: 265 seconds]
randomstrangerb has joined #ruby
jeffreylevesque has joined #ruby
immune has quit [Ping timeout: 265 seconds]
milardovich has quit [Remote host closed the connection]
John_Ivan has joined #ruby
shinnya has joined #ruby
drcode has joined #ruby
immune has joined #ruby
venmx has quit [Quit: leaving]
jeffreylevesque_ has joined #ruby
jeffreylevesque has quit [Ping timeout: 260 seconds]
hanmac has joined #ruby
devil_tux has quit [Ping timeout: 248 seconds]
govg has joined #ruby
ShekharReddy has joined #ruby
devil_tux has joined #ruby
venmx has joined #ruby
marataziat has joined #ruby
cpruitt has joined #ruby
quobo has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
cdg has joined #ruby
jottr has joined #ruby
hhffppff has quit [Quit: Leaving]
cpruitt has quit [Remote host closed the connection]
immune has quit [Ping timeout: 240 seconds]
lupine_ is now known as lupine
dionysus69 has quit [Ping timeout: 256 seconds]
cpruitt has joined #ruby
immune has joined #ruby
zautomata has joined #ruby
zautomata has joined #ruby
zautomata has quit [Changing host]
qba73 has joined #ruby
minimalism has quit [Quit: minimalism]
shinnya has quit [Ping timeout: 248 seconds]
cpruitt has quit [Remote host closed the connection]
<jhass>
skinux: how did you install ruby and what's your OS? Also could you amend the gist with the output of gem env?
<skinux>
Ubuntu Xenial, using repo
workmad3 has joined #ruby
<skinux>
Gist appended
zautomata has quit [Ping timeout: 240 seconds]
DLSteve has joined #ruby
<jhass>
which repo?
<jhass>
ah nvm the official one
<jhass>
do you have a /usr/bin/rake as well?
<skinux>
Yes
<jhass>
could you try just deleting /usr/local/bin/rake?
<skinux>
Deleted it
schneide_ has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
<jhass>
now the error should be gone or at least the output should be different
Beams has joined #ruby
immune has quit [Ping timeout: 268 seconds]
workmad3 has joined #ruby
ur5us has joined #ruby
immune has joined #ruby
oleo has joined #ruby
<skinux>
It can't find rake, looking at /usr/local/bin/
catphish has joined #ruby
<skinux>
Should I symlink it to usr/bin?
<jhass>
no
<jhass>
what exactly is the error message?
<skinux>
"bash: /usr/local/bin/rake: No such file or directory"
<morfin60>
how do i parse timestamp as value with specific timezone?
ur5us has quit [Ping timeout: 240 seconds]
<morfin60>
as example i have
<jhass>
skinux: so something is referring explicitly to that? could you maybe provide some more context into what you're doing/running?
<skinux>
Just trying to run rake on a rakefile
<morfin60>
as example i have 1516208400 i want to parse it with Asia/Moskow timezone so reported date will be something like 2018-01-17 17:00:00 +03:00
<jhass>
what if you run /usr/bin/rake explicitly?
qba73 has quit [Remote host closed the connection]
<jhass>
morfin60: so you're saying your DB is incorrectly assuming the date you give it (in whatever way) is UTC?
<jhass>
while it's localtime, which in your case is +0300?
<mattwc>
prutheus: hmmm, you can't really define the same key multiple times, I think you'd be better off just making your own raw requests and constructing the URL yourself
coreycosman has joined #ruby
<prutheus>
hm,,,,so i cant define multiple categories?
<mattwc>
I don't see an easy way too, hashes can only have a key defined one and the eBay API ways the same key multiple times
<jhass>
prutheus: no idea about the particular lib you're using, but in general the first thing I would try is giving an array as the value
<mattwc>
Yeah reading the code last night that wouldn't work from my memory
banisterfiend has joined #ruby
drewmcmillan has joined #ruby
devil_tux has quit [Ping timeout: 256 seconds]
<mattwc>
It just does a very basic string interpolation of "?#{key}=#{value}"
za1b1tsu has joined #ruby
<jhass>
ah, meh
<prutheus>
hm okay yeah you are right, then i just dont support multiple categories, what else should i do :/
<jhass>
write a better client lib :P
<morfin60>
Opentsdb seems to be weird
<mattwc>
At this point, I'd just build the request yourself using like restclient or something
<prutheus>
oh no
<prutheus>
i can do a category(0)
cschneid has quit [Remote host closed the connection]
stormpack has quit [Remote host closed the connection]
conta has quit [Ping timeout: 248 seconds]
schneide_ has quit [Remote host closed the connection]
Ishido has joined #ruby
immune has joined #ruby
ramfjord has joined #ruby
nowhereman_ has quit [Ping timeout: 256 seconds]
schneide_ has joined #ruby
antoniobeyah_ has joined #ruby
clemens3 has quit [Ping timeout: 276 seconds]
antoniobeyah_ is now known as antoniobeyah
antoniobeyah has quit [Changing host]
antoniobeyah has joined #ruby
antoniobeyah has joined #ruby
cdg_ has joined #ruby
schneide_ has quit [Ping timeout: 248 seconds]
morfin has joined #ruby
<morfin>
so
TomyWork has quit [Ping timeout: 240 seconds]
<morfin>
my timezones screwed up
randomstrangerb has quit [Ping timeout: 248 seconds]
cdg has quit [Ping timeout: 240 seconds]
randomstrangerb has joined #ruby
troys has joined #ruby
Trel has quit [Remote host closed the connection]
kiltzman has quit [Ping timeout: 256 seconds]
ur5us has joined #ruby
skweek has joined #ruby
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
ferox has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
hahuang65 has joined #ruby
banisterfiend has joined #ruby
Beams has quit [Quit: .]
TomyLobo has joined #ruby
Ishido has quit [Ping timeout: 264 seconds]
Ishido has joined #ruby
schneide_ has joined #ruby
white_lilies has quit [Ping timeout: 268 seconds]
immune has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
n0m4d1c has joined #ruby
schneide_ has quit [Ping timeout: 248 seconds]
za1b1tsu has quit [Quit: Leaving]
[Butch] has joined #ruby
guille-moe has joined #ruby
kies has quit [Ping timeout: 256 seconds]
SebastianThorn has quit [Read error: Connection reset by peer]
immune has joined #ruby
marxarelli has joined #ruby
conta has joined #ruby
stormpack has joined #ruby
x77686d has quit [Quit: x77686d]
ledestin has joined #ruby
alfiemax has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
rippa has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
x77686d has joined #ruby
white_lilies has joined #ruby
white_lilies has quit [Ping timeout: 260 seconds]
Ltem has joined #ruby
hoylemd has left #ruby [#ruby]
Mike11 has joined #ruby
ramfjord has joined #ruby
<apeiros>
banisterfiend: oooooh, nice! me like!
<apeiros>
re c-show
Emmanuel_Chanel has quit [Ping timeout: 264 seconds]
c0ncealed has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 248 seconds]
Serpent7776 has quit [Quit: Leaving]
andikr has quit [Remote host closed the connection]
immune has quit [Ping timeout: 256 seconds]
c0ncealed has joined #ruby
qba73 has quit [Ping timeout: 256 seconds]
aupadhye has quit [Quit: Leaving]
mikecmpbll has quit [Quit: inabit. zz.]
white_lilies has joined #ruby
catphish has quit [Quit: Leaving]
roshanavand has quit [Ping timeout: 256 seconds]
cabotto has quit []
jottr has joined #ruby
armyriad has quit [Quit: Leaving]
armyriad has joined #ruby
ShekharReddy has quit [Quit: Connection closed for inactivity]
alfiemax has quit [Remote host closed the connection]
white_lilies has quit [Ping timeout: 240 seconds]
x77686d has quit [Quit: x77686d]
jnollette has quit [Ping timeout: 255 seconds]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
immune has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
jnollette has joined #ruby
atchoum has joined #ruby
randomstrangerb has quit [Ping timeout: 256 seconds]
qba73 has joined #ruby
randomstrangerb has joined #ruby
arkinor has joined #ruby
alfiemax has joined #ruby
weaksauce has quit [Ping timeout: 255 seconds]
arkinor has quit [Client Quit]
bigblind has joined #ruby
suhdood has joined #ruby
sanscoeur has joined #ruby
sanscoeur has quit [Remote host closed the connection]
sanscoeur has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
RougeR has quit [Ping timeout: 256 seconds]
tvw has quit [Remote host closed the connection]
yn^ has joined #ruby
yn^ has quit [Max SendQ exceeded]
yn^ has joined #ruby
yn^ has joined #ruby
yn^ has quit [Max SendQ exceeded]
yn^ has joined #ruby
yn^ has quit [Max SendQ exceeded]
yn^ has joined #ruby
yn^ has quit [Max SendQ exceeded]
orbyt_ has joined #ruby
yn^ has joined #ruby
alfiemax has joined #ruby
dogweather has quit [Ping timeout: 252 seconds]
Mike11 has quit [Quit: Leaving.]
kies has joined #ruby
Beams has joined #ruby
clemens3 has joined #ruby
nowhere_man has quit [Ping timeout: 260 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
mtkd has quit [Ping timeout: 240 seconds]
raynold has joined #ruby
mtkd has joined #ruby
Ltem has quit [Quit: bbl]
chouhoulis has joined #ruby
randomstrangerb has quit [Ping timeout: 256 seconds]
roshanavand has joined #ruby
qba73 has quit [Ping timeout: 240 seconds]
randomstrangerb has joined #ruby
nowhere_man has joined #ruby
x77686d has joined #ruby
schneide_ has joined #ruby
hoylemd has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
lytol has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
Emmanuel_Chanel has joined #ruby
thither has joined #ruby
<thither>
Can I do something so that a script gets the same namespace as a module?
<thither>
For the purpose of a DSL
lytol has quit [Remote host closed the connection]
nit3rid3 has joined #ruby
<havenwood>
thither: Say more?
<thither>
I have a file with a module called DSL. In the module I have defined refinements, classes, and methods
schneide_ has quit [Remote host closed the connection]
<thither>
In a seperate file I require_relative and then say using DSL
<thither>
I can use the refinements, but can't call the classes or functions of the method
dviola has joined #ruby
<thither>
s/refinements, classes, and methods/refinements, classes, and functions/
<havenwood>
thither: Are you using `include` as well as `using`? I do refinements in separate modules, but I haven't thought about why.
pastorinni has quit [Read error: Connection reset by peer]
<thither>
Nah, just require and using.
bigblind has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
<thither>
Okay, my bad.
kapil___ has quit [Quit: Connection closed for inactivity]
<thither>
Thanks - I've only ever done Rails so doing actual Ruby stuff makes me look like an idiot :P
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schneide_ has joined #ruby
<havenwood>
thither: I'm not sure what to recommend without seeing the code, but I suspect you might want to consider using module_function with an include, and also look at Module#included.
<havenwood>
thither: No worries at all! If you can show some code folk here might be able to give more concrete suggestions.
orbyt_ has joined #ruby
ramfjord has joined #ruby
ur5us has joined #ruby
x77686d has quit [Quit: x77686d]
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
ur5us has quit [Ping timeout: 252 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 256 seconds]
PaulCapestany has quit [Quit: .]
schneide_ has quit [Remote host closed the connection]
PaulCapestany has joined #ruby
schneide_ has joined #ruby
Burgestrand has joined #ruby
rabajaj has quit [Quit: Leaving]
John_Ivan has quit [Ping timeout: 248 seconds]
OyoKooN has joined #ruby
OyoKooN has quit [Client Quit]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thither has quit [Ping timeout: 240 seconds]
venmx has quit [Ping timeout: 260 seconds]
cdg_ has quit [Remote host closed the connection]
orbyt_ has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
thither has joined #ruby
Ltem has joined #ruby
hanmac has quit [Ping timeout: 276 seconds]
Bounga has joined #ruby
Burgestrand has quit [Quit: Closing time!]
schneide_ has quit [Remote host closed the connection]
arkinor has joined #ruby
schneide_ has joined #ruby
shinnya has joined #ruby
victorjtfranco has quit [Ping timeout: 256 seconds]
sameerynho has joined #ruby
John_Ivan has joined #ruby
lytol has joined #ruby
suhdood has quit [Remote host closed the connection]
suhdood has joined #ruby
Beams_ has joined #ruby
hanmac has joined #ruby
Beams has quit [Ping timeout: 265 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
jaruga has quit [Quit: jaruga]
jrvlima has joined #ruby
Guest81766 is now known as Nek
ta_ has quit [Remote host closed the connection]
suhdood has quit [Remote host closed the connection]
Beams_ has quit [Remote host closed the connection]
ta_ has joined #ruby
krawchyk has joined #ruby
nowhere_man has quit [Ping timeout: 260 seconds]
victorjtfranco has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Beams has joined #ruby
immune has quit [Ping timeout: 256 seconds]
_aeris_ has quit [Ping timeout: 255 seconds]
roshanavand has quit [Ping timeout: 252 seconds]
victorjtfranco has quit [Ping timeout: 256 seconds]
stormpack has quit [Quit: Leaving]
cdg has joined #ruby
drewmcmillan has joined #ruby
mistym- is now known as mistym
mistym has quit [Changing host]
mistym has joined #ruby
alfiemax has joined #ruby
ramfjord has joined #ruby
immune has joined #ruby
x77686d has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
conta has quit [Remote host closed the connection]
ldepandis has joined #ruby
alex`` has quit [Ping timeout: 276 seconds]
wilbert has joined #ruby
naftilos76 has joined #ruby
_aeris_ has joined #ruby
white_lilies has joined #ruby
weaksauce has joined #ruby
guille-moe has quit [Ping timeout: 248 seconds]
guille-moe has joined #ruby
Bounga has quit [Ping timeout: 256 seconds]
victorjtfranco has joined #ruby
guille-moe has quit [Ping timeout: 248 seconds]
goatish has quit [Quit: Hibernating]
za1b1tsu has joined #ruby
_joes_ has quit [Quit: Connection closed for inactivity]
guille-moe has joined #ruby
schneide_ has quit [Remote host closed the connection]
x77686d has quit [Quit: x77686d]
thither has quit [Ping timeout: 276 seconds]
dionysus69 has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
white_lilies has quit [Ping timeout: 240 seconds]
thither has joined #ruby
venmx has joined #ruby
jrvlima has quit [Remote host closed the connection]
jrvlima has joined #ruby
jnollette has quit [Remote host closed the connection]
x77686d has joined #ruby
cdg has quit [Remote host closed the connection]
Dimik has joined #ruby
John_Ivan has quit [Ping timeout: 256 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
jnollette has joined #ruby
elcontrastador has joined #ruby
Guest14 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has quit [Remote host closed the connection]
John_Ivan has joined #ruby
schneide_ has joined #ruby
Bounga has joined #ruby
Tempesta has quit [Quit: See ya!]
raul782 has joined #ruby
thither has quit [Quit: Leaving]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tempesta has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nathani has quit [Read error: Connection reset by peer]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
victorjtfranco has quit [Quit: Leaving]
nathani has joined #ruby
mtkd has quit [Ping timeout: 256 seconds]
ta_ has quit [Remote host closed the connection]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
naftilos76 has quit [Quit: Αποχώρησε]
banisterfiend has joined #ruby
mtkd has joined #ruby
minimalism has joined #ruby
ldnunes has quit [Quit: Leaving]
drocsid has joined #ruby
amatas_ has quit [Quit: amatas_]
rrichardsr3 has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
n0m4d1c has quit [Remote host closed the connection]
roshanavand has joined #ruby
jrvlima has quit [Quit: jrvlima]
alfiemax has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
pastorinni has joined #ruby
RougeR has quit [Ping timeout: 240 seconds]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 260 seconds]
Bounga` has joined #ruby
ghoti_ is now known as ghoti
claudiuinberlin has joined #ruby
Bounga has quit [Ping timeout: 256 seconds]
Beams has quit [Quit: .]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
Beams has joined #ruby
tomphp has joined #ruby
schneide_ has quit [Remote host closed the connection]
guacamole has quit [Client Quit]
quobo has joined #ruby
klixto has joined #ruby
Ishido has quit [Ping timeout: 268 seconds]
schneide_ has joined #ruby
n0m4d1c has joined #ruby
selim_ has quit [Ping timeout: 240 seconds]
Bounga` has quit [Remote host closed the connection]
Bounga` has joined #ruby
Bounga` has quit [Remote host closed the connection]
<havenwood>
drocsid: Are there any other bundlers installed?: which -a bundle
<drocsid>
Not sure what happened but I think installing `ruby-dev` allowed the bundler to install it now...
<havenwood>
drocsid: You either don't have bundler installed on your RVM Ruby (as suspected), or system Ruby bundler is ahead in the path.
<drocsid>
which -a returns the same path above...
<havenwood>
drocsid: So you don't have Bundler installed at all on your RVM Ruby.
<havenwood>
drocsid: You do on your system Ruby.
<drocsid>
Ok able to install after the ruby-dev package installation...
<drocsid>
havenwood: just followed the docs regarding installing rvm.
<havenwood>
drocsid: Then you bundled with your system Ruby.
<drocsid>
ok
<havenwood>
It seems once you switched to your RVM Ruby you never installed Bundler.
bmurt has joined #ruby
<havenwood>
gem install bundler
<havenwood>
^ with your RVM Ruby
marxarelli has joined #ruby
<drocsid>
Allright well using system ruby now. Not sure how to swap. But it was able to install the module
<drocsid>
gems
<havenwood>
drocsid: You're likely using RVM `gem` and `ruby` but system `bundle`.
<havenwood>
drocsid: gem install bundler
<havenwood>
drocsid: then check again: which -a bundle
<havenwood>
(You should see the RVM one now on top.)
Beams has quit [Quit: .]
<drocsid>
havenwood: need to be root to `gem install bundler`
<drocsid>
`sudo gem install bundler`
<drocsid>
`Successfully installed bundler-1.16.1`
<drocsid>
`which -a bundle`
<havenwood>
drocsid: which gem
<drocsid>
`/usr/local/bin/bundle`
<havenwood>
If the RVM `gem` isn't in front in your PATH, something is amiss.
<havenwood>
drocsid: which -a gem
<havenwood>
drocsid: Confirm: rvm current
<drocsid>
`rvm current ruby-2.4.1`
<drocsid>
`which -a gem /usr/bin/gem`
<drocsid>
anyhow I was able to install the gems using bundle after installing `ruby-dev`. Not terribly happy about it, but seems that I have issues regarding the rvm installed ruby. I followed the instructions regarding ruby installation at the rvm site...
milardovich has joined #ruby
Beams has joined #ruby
<drocsid>
So I am able to move forward. Think installing the `ruby-dev` package helped. Maybe all this is 2nd class in debian.. I don't know.
<havenwood>
drocsid: I'm suspicious you somehow ended up doing a multi-user RVM installation (added sudo?) instead of the recommended single-user install.
n0m4d1c has quit [Read error: Connection reset by peer]
<havenwood>
drocsid: I'd suggest doing an `rvm implode --force` and then completely restarting your terminal to clear lingering env vars.
n0m4d1c has joined #ruby
x77686d has joined #ruby
<havenwood>
drocsid: Then install Ruby 2.4.3 or 2.5.0, unless you really need 2.4.1.
<ruby[bot]>
drocsid: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
<havenwood>
drocsid: in IRB you can use: ri
<drocsid>
Hmm no web based source?
<havenwood>
drocsid: Or just use `ri` from your command line.
<havenwood>
drocsid: Pry is nice.
ur5us has joined #ruby
<havenwood>
drocsid: Sure, you can use the docs online. Or generate them yourself for local web browser use.
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has quit [Quit: WeeChat 2.0.1]
hahuang65 has joined #ruby
<drocsid>
Anybody with a good guess. My string could be something like ip-88.22.355.23-us-east-1.computer.internal and my pattern is '/ip-([^.]*).*internal/'
Tempesta has quit [Ping timeout: 256 seconds]
<elomatreb>
You want to extract the IP adress from it?
<havenwood>
drocsid: [^.]
<drocsid>
Yeah I want to match and then extract the IP. The match group contains the ip delimited by - . Then I do gsub. My issue is the pattern seems to match in rubular but not via a modified ruby dns example likehttps://github.com/socketry/rubydns/blob/master/examples/flakey-dns.rb
<havenwood>
drocsid: Do you mean "any character except a newline" by that ^, because the dot isn't escaped so that's what it means.
sameerynho has quit [Ping timeout: 240 seconds]
<elomatreb>
Dot does not get the special meaning in a character class
<drocsid>
I put ip-([^.]*).*internal in the pattern
atchoum has quit [Ping timeout: 240 seconds]
<havenwood>
elomatreb: Ah, you're right of course.
pastorin_ has joined #ruby
<elomatreb>
drocsid: So, what do you know about the string? Is the part after the IP (-us-east-1.computer.internal) constant?
guille-moe has quit [Ping timeout: 248 seconds]
pastorinni has quit [Ping timeout: 248 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mtkd has quit [Ping timeout: 260 seconds]
mtkd has joined #ruby
regedit has joined #ruby
tcopeland has joined #ruby
atchoum has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
white_lilies has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hoylemd has joined #ruby
eckhardt has joined #ruby
eckhardt has quit [Client Quit]
TomyLobo has quit [Ping timeout: 252 seconds]
venmx has quit [Quit: leaving]
alfiemax has joined #ruby
<drocsid>
elomatreb: I mistyped the match string. ip-88-22-355-23.us-east-1.computer.internal is what I'm trying to match and again my pattern is the same ip-([^.]*).*internal
<drocsid>
I get a match in rubular
<drocsid>
The match group I plan on' replace with gsub("-",".")
banisterfiend has joined #ruby
<drocsid>
The problem is I don't seem to match via RubyDNS' match, but do in Rubular...
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<drocsid>
Trying to match for all strings like ip-XX-XXX-X-XX.us-east-1.compute.internal
alfiemax has quit [Ping timeout: 240 seconds]
bigblind has quit [Ping timeout: 256 seconds]
drewmcmillan has joined #ruby
<Zarthus>
the regex itself looks fine
<drocsid>
I'll share my ruby script. Hold on.
<Zarthus>
well, "fine" is an overstatement, but it will do what you want
<elomatreb>
Overly broad, but yes. It would also match `ip-garbage.internal`