chouhoulis has quit [Remote host closed the connection]
factormystic0 has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
cthu| has quit [Ping timeout: 256 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
rafadc has joined #ruby
rafadc_ has quit [Ping timeout: 272 seconds]
lxsameer has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
drincruz has quit [Ping timeout: 272 seconds]
kinduff4 has joined #ruby
kinduff has quit [Ping timeout: 258 seconds]
kinduff4 is now known as kinduff
alfiemax has joined #ruby
ChmEarl has quit [Quit: Leaving]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Ping timeout: 260 seconds]
s3nd1v0g1us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
evdubs has quit [Quit: Leaving]
evdubs has joined #ruby
teardown has quit [Ping timeout: 260 seconds]
s3nd1v0g1us has quit [Quit: WeeChat 2.8]
bambanx has joined #ruby
s2013 has joined #ruby
bambanx has quit [Quit: Leaving]
elxbarbosa has quit [Ping timeout: 272 seconds]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tuttzza has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
zxq2 has quit [Remote host closed the connection]
meinside has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
kaleido has quit [Remote host closed the connection]
kaleido has joined #ruby
kaleido has joined #ruby
kaleido has quit [Changing host]
Emmanuel_ChanelW has joined #ruby
wallace_mu has joined #ruby
bocaneri has joined #ruby
rafadc has quit [Read error: Connection reset by peer]
rafadc has joined #ruby
wallace_mu has quit [Ping timeout: 258 seconds]
cnsvc has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BSaboia has joined #ruby
SeepingN has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GankMove has joined #ruby
supercoven has joined #ruby
<nakilon>
my program is an interpreter of source code in some another language that optionally consumes stdin, so I address them as File.read(ARGV.first) and STDIN, and run it like: stdin_source | ruby my.rb code_source.txt
siasmj has quit [Ping timeout: 240 seconds]
<nakilon>
now I want to pass code_source from pipe and no stdin -- seems like it can't handle it, it wants ARGV[0]
jerme_ has quit [Ping timeout: 240 seconds]
maxmanders has quit [Ping timeout: 244 seconds]
Net has quit [Ping timeout: 244 seconds]
jrhorn424 has quit [Ping timeout: 240 seconds]
KnownSyntax has quit [Ping timeout: 240 seconds]
darthThorik has quit [Ping timeout: 240 seconds]
ReinH__ has quit [Ping timeout: 244 seconds]
Liothen has quit [Ping timeout: 260 seconds]
markin has quit [Ping timeout: 260 seconds]
Fenhl has quit [Ping timeout: 260 seconds]
en10n has quit [Ping timeout: 260 seconds]
dputtick has quit [Ping timeout: 260 seconds]
r3my has quit [Ping timeout: 260 seconds]
englishm has quit [Ping timeout: 260 seconds]
ec has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Ping timeout: 260 seconds]
integral has quit [Ping timeout: 260 seconds]
podman has quit [Ping timeout: 240 seconds]
Chew has quit [Ping timeout: 240 seconds]
Guest41501 has quit [Ping timeout: 240 seconds]
itok has quit [Ping timeout: 244 seconds]
rann has quit [Ping timeout: 244 seconds]
entel has quit [Ping timeout: 244 seconds]
Lewix has quit [Ping timeout: 260 seconds]
clinth has quit [Ping timeout: 260 seconds]
gorsuch has quit [Ping timeout: 260 seconds]
kevinsjoberg has quit [Ping timeout: 260 seconds]
kermit has quit [Ping timeout: 260 seconds]
siasmj has joined #ruby
<nakilon>
I know that some programs accept "-" as a filename to read from STDIN -- I hoped it's made by bash but it does not look so: echo "123" | ruby my.rb - # => No such file or directory @ rb_sysopen - - (Errno::ENOENT)
jerme_ has joined #ruby
darthThorik has joined #ruby
hahuang65 has joined #ruby
integral has joined #ruby
podman has joined #ruby
Lewix has joined #ruby
maxmanders has joined #ruby
Fenhl has joined #ruby
kermit has joined #ruby
KnownSyntax has joined #ruby
ec has joined #ruby
jrhorn424 has joined #ruby
adu has quit [Quit: adu]
ReinH__ has joined #ruby
r3my has joined #ruby
gorsuch has joined #ruby
en10n has joined #ruby
Liothen has joined #ruby
Chew has joined #ruby
rann has joined #ruby
Net has joined #ruby
itok has joined #ruby
entel has joined #ruby
kevinsjoberg has joined #ruby
markin has joined #ruby
dputtick has joined #ruby
clinth has joined #ruby
englishm has joined #ruby
<nakilon>
oh nvm, made it work with ARGF instead
Guest41501 has joined #ruby
BSaboia has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
wallace_mu has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
vondruch has joined #ruby
wallace_mu has quit [Ping timeout: 260 seconds]
BSaboia has joined #ruby
ua has quit [Ping timeout: 240 seconds]
pyrmont has left #ruby [#ruby]
cd has quit [Quit: cd]
kintarowonders has quit [Remote host closed the connection]
ua has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
BSaboia has joined #ruby
akem has joined #ruby
imode has quit [Ping timeout: 265 seconds]
sameerynho has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Mia has quit [Ping timeout: 272 seconds]
ellcs has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
hsiktas[m] has quit [Quit: killed]
arca0 has quit [Quit: killed]
nod0n[m] has quit [Quit: killed]
execat[m] has quit [Quit: killed]
linuus[m] has quit [Quit: killed]
stan has quit [Quit: killed]
finn[m]1 has quit [Quit: killed]
batisi[m] has quit [Quit: killed]
sepp2k has quit [Quit: killed]
turt2live has quit [Quit: killed]
justache has quit [Max SendQ exceeded]
justache has joined #ruby
Lyubo1 has quit [Ping timeout: 247 seconds]
Lyubo1 has joined #ruby
Emmanuel_ChanelW has quit [Quit: Leaving]
dka has quit [Killed (Sigyn (Spam is off topic on freenode.))]
hsiktas[m] has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
hsiktas[m] has quit [Remote host closed the connection]
execat[m] has joined #ruby
thisirs has joined #ruby
dka has joined #ruby
dka has quit [Killed (Sigyn (Spam is off topic on freenode.))]
TCZ has joined #ruby
akem has quit [Ping timeout: 264 seconds]
dka has joined #ruby
dionysus69 has joined #ruby
linuus[m] has joined #ruby
sepp2k has joined #ruby
nod0n[m] has joined #ruby
batisi[m] has joined #ruby
Arkaniad has joined #ruby
finn[m] has joined #ruby
hsiktas[m] has joined #ruby
turt2live has joined #ruby
stan has joined #ruby
arca0 has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
shansen_ has quit [Quit: ZNC 1.7.4+deb0+bionic0 - https://znc.in]
BSaboia has quit [Quit: This computer has gone to sleep]
BSaboia has joined #ruby
<Tuor>
Hi, why doesn't this work? https://dpaste.org/jzWZ I tried to create a class, which holds some patterns for pattern matching (so I don't have to copy and paste the pattern it 10x). I get a undefined method `uuid' for Patterns:Class
<Tuor>
What I want: I need to match file names which do contain uuids and some other name. Example: vm_bcb1f32a-a614-4bd2-883a-d509cfec85b7
<Tuor>
My idea: Regex.new('vm_' + Pattern.uuid)...
<jhass>
Tuor: def self.uuid
<jhass>
like you did it's an instance method, you could call it like Patterns.new.uuid
BSaboia has quit [Quit: This computer has gone to sleep]
<Tuor>
Makes sense. Will try, thank you!
<jhass>
but that's pretty pointless, so better to move it the class level. And then given instances of that class don't make a whole lot of sense, make it a module instead
ramfjord has quit [Ping timeout: 272 seconds]
<jhass>
could also consider to just use constants
<jhass>
UUID = /.../ -> Patterns::UUID
<jhass>
you can interpolate regular expressions btw
meinside has quit [Quit: Connection closed for inactivity]
thisirs has joined #ruby
cognemo has quit [Ping timeout: 244 seconds]
cognemo has joined #ruby
olspookishmagus has quit [Quit: All for nothing]
ChmEarl has joined #ruby
stonerl has joined #ruby
alfiemax has quit [Remote host closed the connection]
kristian_on_linu has joined #ruby
stryek has joined #ruby
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 272 seconds]
BSaboia has joined #ruby
Rudd0 has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
<Tuor>
jhass: I don't know what a Module is. Will have to read docs first.
<Tuor>
ah the interpolation will help. thx.
wallace_mu has joined #ruby
olspookishmagus has joined #ruby
olspookishmagus has quit [Client Quit]
olspookishmagus has joined #ruby
cow[moo] has joined #ruby
GankMove has quit [Ping timeout: 240 seconds]
alexherbo2 has quit [Ping timeout: 264 seconds]
SeepingN has joined #ruby
<Tuor>
OK, maybe I should create a module, create a constant for my regex and put my classes into the module. :)
<Tuor>
Can I join regular expressions somehow? I can join strings: a='qwer'; 'asdf' + a
<Tuor>
ah like you showed: exp=/my regular expression/; my_string.match /something${exp}else/
MrCrackPot has quit [Ping timeout: 244 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
weaksauce has quit [Ping timeout: 246 seconds]
brontosaurusrex has quit [Quit: WeeChat 2.3]
MrCrackPot has joined #ruby
hiroaki has quit [Ping timeout: 260 seconds]
TCZ has quit [Quit: Leaving]
teardown has joined #ruby
<adam12>
Tuor: There's also Regexp.union
<Tuor>
adam12: doesn't help me in this case if I understand it correctly, but good to know! :)
s2013 has joined #ruby
kjw86 has joined #ruby
s2013 has quit [Ping timeout: 272 seconds]
TCZ has joined #ruby
braincrash has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
kjw86 has quit [Remote host closed the connection]
jeromelanteri has joined #ruby
yokel has quit [Ping timeout: 272 seconds]
yokel has joined #ruby
ellcs has quit [Ping timeout: 244 seconds]
justache is now known as fotato
fotato is now known as justache
<Tuor>
jhass: Ah finally, I think I got it: a module with a constant in it, like Patterns::UUID right?
zacts has joined #ruby
TCZ has quit [Quit: Leaving]
alexherbo2 has joined #ruby
ellcs has joined #ruby
jeromelanteri has quit [Quit: Leaving]
ellcs has quit [Ping timeout: 244 seconds]
Mrgoose has quit [Ping timeout: 272 seconds]
<Tuor>
It isn't doing anything but collecting all the informations, but at least it's somewhat structured now... It only has to do what It should now^^: https://gitlab.com/nod0n/backup-the-backup
braincrash has quit [Ping timeout: 240 seconds]
akem has quit [Ping timeout: 264 seconds]
cthu| has joined #ruby
akem has joined #ruby
howdoi has joined #ruby
Rudd0 has joined #ruby
thisirs has quit [Ping timeout: 272 seconds]
zacts has quit [Ping timeout: 256 seconds]
thisirs has joined #ruby
chouhoulis has joined #ruby
braincrash has joined #ruby
zacts has joined #ruby
zacts has quit [Quit: leaving]
BSaboia has joined #ruby
Mrgoose has joined #ruby
thisirs has quit [Ping timeout: 272 seconds]
ramfjord has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
AndreYuhai has joined #ruby
<AndreYuhai>
What's wrong with my gemspec? I am trying to require my files but when I install the gem and try to require it I get an error saying "LoadError: cannot load such file -- maine_campaign_finance/candidate_detail"
<AndreYuhai>
However I can require 'maine_campaign_finance/version' which is in the same directory as other required files
alfiemax has quit [Remote host closed the connection]
<adam12>
AndreYuhai: It looks fine. Maybe try unpacking the gem to see what's actually in it in regards to files.
<AndreYuhai>
adam12, Alright I will check that right now.
<adam12>
AndreYuhai: A gem file is a tarball of tarballs; so in theory you could `tar xvf something.gem; tar tvf data.tar.gz` and see file contents. There's `gem unpack` too.
<AndreYuhai>
adam12, Oh yes, the files are not included in the directory.
<adam12>
AndreYuhai: Side-effect of using `git ls-files` :\
<adam12>
AndreYuhai: I know a lot of people use it to success but I've always found it error-prone.
<AndreYuhai>
adam12, Because those files are not tracked? I got it now