<weaksauce>
adam12 do you know of anything faster?
<weaksauce>
i guess for just formatting
<weaksauce>
s/formatting/autoformatting
<adam12>
weaksauce: I don't use any formatters for ruby. Just IDE hints running via standardrb. The _only_ auto formatter I've never hated is gofmt. So I've never really bothered to look at anything else.
<weaksauce>
I've always liked having a thing to at least fixup indentation levels
g0zart has quit [Quit: Leaving]
<adam12>
Maybe try syntax_tree? I don't know how it will conflict with standardrb tho.
<weaksauce>
yeah i'll give that a go
<weaksauce>
though it's still pretty early in the dev for that
<adam12>
Yeah.
<adam12>
I actually just tried it on a small file, and it was fine _but_ it split an assignment and re-indented the entire block. I guess it would be OK if I was always running it, but it seems like a strange adjustment.
<adam12>
Original line length was only 21 characters, so no need to split it really.
gallup has joined #ruby
gallup has quit [Client Quit]
ouestbillie has quit [Quit: leaving]
ouestbillie has joined #ruby
hololeap_ has joined #ruby
hololeap has quit [Ping timeout: 276 seconds]
lim has quit [Remote host closed the connection]
TCZ has quit [Quit: Leaving]
Rounin has quit [Ping timeout: 240 seconds]
work has quit [Quit: Connection closed for inactivity]
lunarkitty has quit [Quit: Connection closed for inactivity]
constxd has quit [Ping timeout: 240 seconds]
perrierjouet has quit [Quit: WeeChat 3.4]
hololeap_ is now known as hololeap
sagax has joined #ruby
bluedust has joined #ruby
mixfix41 has quit [Ping timeout: 240 seconds]
mixfix41 has joined #ruby
bluedust has quit [Remote host closed the connection]
oxfuxxx has joined #ruby
bluedust has joined #ruby
Rounin has joined #ruby
_whitelogger has joined #ruby
infinityfye has joined #ruby
infinityfye has quit [Quit: Leaving]
infinityfye has joined #ruby
oxfuxxx has quit [Ping timeout: 240 seconds]
hanzo has quit [Quit: Connection closed for inactivity]
oxfuxxx has joined #ruby
A_Dragon is now known as RemoteHost
oxfuxxx has quit [Quit: Raccoon's not another IRC transgenre wannabe who can't fap at the dead american dream, fhackerz]
oxfuxxx has joined #ruby
infinityfye has quit [*.net *.split]
bluedust has quit [*.net *.split]
libsys has quit [*.net *.split]
jimeh has quit [*.net *.split]
Cork has quit [*.net *.split]
justIrresolute has quit [*.net *.split]
joast has quit [*.net *.split]
ikonia has quit [*.net *.split]
factor has quit [*.net *.split]
havenwood has quit [*.net *.split]
mooff has quit [*.net *.split]
Nowaker has quit [*.net *.split]
eldritch_ has quit [*.net *.split]
victori has quit [*.net *.split]
Furai has quit [*.net *.split]
Byteflux has quit [*.net *.split]
markmarkmark has quit [*.net *.split]
leah2 has quit [*.net *.split]
FetidToot has quit [*.net *.split]
unyu has quit [*.net *.split]
hololeap has quit [*.net *.split]
duds- has quit [*.net *.split]
aeris has quit [*.net *.split]
cornduck has quit [*.net *.split]
sixecho has quit [*.net *.split]
Goodbye_Vincent has quit [*.net *.split]
cout_ has quit [*.net *.split]
mahlon has quit [*.net *.split]
graemefawcett has quit [*.net *.split]
hwrd has quit [*.net *.split]
llua has quit [*.net *.split]
foxxx0 has quit [*.net *.split]
leftylink has quit [*.net *.split]
Fridtjof has quit [*.net *.split]
lipoqil has quit [*.net *.split]
phenom has quit [*.net *.split]
belak has quit [*.net *.split]
axisys_ has quit [*.net *.split]
NightMonkey has quit [*.net *.split]
conjunctive has quit [*.net *.split]
josephl has quit [*.net *.split]
vito has quit [*.net *.split]
Hobbyboy has quit [*.net *.split]
jhass[m] has quit [*.net *.split]
hsiktas[m] has quit [*.net *.split]
artemon has quit [*.net *.split]
bougyman has quit [*.net *.split]
Artea has quit [*.net *.split]
mjanssen has quit [*.net *.split]
nebiros has quit [*.net *.split]
eof has quit [*.net *.split]
TheBrayn has quit [*.net *.split]
jidar has quit [*.net *.split]
peder has quit [*.net *.split]
Rounin has quit [*.net *.split]
mixfix41 has quit [*.net *.split]
dangerousdave has quit [*.net *.split]
John_Ivan has quit [*.net *.split]
BSaboia has quit [*.net *.split]
sagax has quit [*.net *.split]
kinduff has quit [*.net *.split]
m_antis has quit [*.net *.split]
smp has quit [*.net *.split]
dka has quit [*.net *.split]
ralu has quit [*.net *.split]
Neopolitan has quit [*.net *.split]
dannyAAM has quit [*.net *.split]
ox1eef has quit [*.net *.split]
aindilis has quit [*.net *.split]
jtdowney has quit [*.net *.split]
dstein64 has quit [*.net *.split]
valeness_ has quit [*.net *.split]
eam_ has quit [*.net *.split]
adam12 has quit [*.net *.split]
cornett has quit [*.net *.split]
niv has quit [*.net *.split]
alex[m] has quit [*.net *.split]
manveru[m]1 has quit [*.net *.split]
nyuszika7h has quit [*.net *.split]
gigamo has quit [*.net *.split]
mrus has quit [*.net *.split]
AEtherC0r3 has quit [*.net *.split]
leachim6 has quit [*.net *.split]
glider has quit [*.net *.split]
Exa has quit [*.net *.split]
rapha has quit [*.net *.split]
benjaminwil has quit [*.net *.split]
slact[m] has quit [*.net *.split]
jposer has quit [*.net *.split]
srushe has quit [*.net *.split]
jhawthorn has quit [*.net *.split]
pusewic|away_ has quit [*.net *.split]
coffeejunk has quit [*.net *.split]
tweaks has quit [*.net *.split]
peer has quit [*.net *.split]
Fusl has quit [*.net *.split]
forvelin has quit [*.net *.split]
RemoteHost has quit [*.net *.split]
LACampbe1 has quit [*.net *.split]
legahc has quit [*.net *.split]
aximik[m] has quit [*.net *.split]
zacts has quit [*.net *.split]
andrea[m] has quit [*.net *.split]
devz3ro has quit [*.net *.split]
Vaevictus has quit [*.net *.split]
drincruz has quit [*.net *.split]
gfawcett has quit [*.net *.split]
moo has quit [*.net *.split]
pjlsergeant has quit [*.net *.split]
e2 has quit [*.net *.split]
seisatsu has quit [*.net *.split]
miah has quit [*.net *.split]
joenoon has quit [*.net *.split]
ccooke has quit [*.net *.split]
finsternis has quit [*.net *.split]
phryk has quit [*.net *.split]
nemesit|znc has quit [*.net *.split]
slothby has quit [*.net *.split]
ua_ has quit [*.net *.split]
clemens3 has quit [*.net *.split]
Liothen has quit [*.net *.split]
CalimeroTeknik has quit [*.net *.split]
depesz has quit [*.net *.split]
ringo__ has quit [*.net *.split]
asio has quit [*.net *.split]
saltrocklamp[m] has quit [*.net *.split]
keyvan has quit [*.net *.split]
cyj123 has quit [*.net *.split]
ollysmith_ has quit [*.net *.split]
pandabot has quit [*.net *.split]
balo has quit [*.net *.split]
micah has quit [*.net *.split]
cAMP has quit [*.net *.split]
legit has quit [*.net *.split]
cuppajoeman has quit [*.net *.split]
newton has quit [*.net *.split]
con3 has quit [*.net *.split]
EdwardIII has quit [*.net *.split]
hesco3 has quit [*.net *.split]
BSaboia has joined #ruby
justIrresolute has joined #ruby
eof has joined #ruby
nebiros has joined #ruby
TheBrayn has joined #ruby
infinityfye has joined #ruby
bluedust has joined #ruby
mixfix41 has joined #ruby
Rounin has joined #ruby
sagax has joined #ruby
dangerousdave has joined #ruby
John_Ivan has joined #ruby
hololeap has joined #ruby
jimeh has joined #ruby
Cork has joined #ruby
libsys has joined #ruby
mooff has joined #ruby
m_antis has joined #ruby
ikonia has joined #ruby
factor has joined #ruby
havenwood has joined #ruby
Nowaker has joined #ruby
duds- has joined #ruby
dka has joined #ruby
aeris has joined #ruby
ralu has joined #ruby
aximik[m] has joined #ruby
saltrocklamp[m] has joined #ruby
jhass[m] has joined #ruby
hsiktas[m] has joined #ruby
artemon has joined #ruby
sixecho has joined #ruby
slact[m] has joined #ruby
alex[m] has joined #ruby
andrea[m] has joined #ruby
manveru[m]1 has joined #ruby
eldritch_ has joined #ruby
cornett has joined #ruby
adam12 has joined #ruby
victori has joined #ruby
eam_ has joined #ruby
valeness_ has joined #ruby
dstein64 has joined #ruby
aindilis has joined #ruby
jtdowney has joined #ruby
ox1eef has joined #ruby
Neopolitan has joined #ruby
dannyAAM has joined #ruby
Hobbyboy has joined #ruby
vito has joined #ruby
josephl has joined #ruby
conjunctive has joined #ruby
NightMonkey has joined #ruby
axisys_ has joined #ruby
belak has joined #ruby
phenom has joined #ruby
foxxx0 has joined #ruby
leftylink has joined #ruby
lipoqil has joined #ruby
Fridtjof has joined #ruby
llua has joined #ruby
mahlon has joined #ruby
graemefawcett has joined #ruby
hwrd has joined #ruby
cout_ has joined #ruby
Goodbye_Vincent has joined #ruby
jidar has joined #ruby
peder has joined #ruby
niv has joined #ruby
kinduff has joined #ruby
micah has joined #ruby
joast has joined #ruby
Artea has joined #ruby
mjanssen has joined #ruby
bougyman has joined #ruby
cornduck has joined #ruby
rapha has joined #ruby
benjaminwil has joined #ruby
Exa has joined #ruby
srushe has joined #ruby
jhawthorn has joined #ruby
zacts has joined #ruby
LACampbe1 has joined #ruby
asio has joined #ruby
jposer has joined #ruby
depesz has joined #ruby
ringo__ has joined #ruby
CalimeroTeknik has joined #ruby
nemesit|znc has joined #ruby
Liothen has joined #ruby
ua_ has joined #ruby
phryk has joined #ruby
slothby has joined #ruby
ccooke has joined #ruby
finsternis has joined #ruby
joenoon has joined #ruby
pjlsergeant has joined #ruby
moo has joined #ruby
gfawcett has joined #ruby
drincruz has joined #ruby
devz3ro has joined #ruby
Vaevictus has joined #ruby
miah has joined #ruby
seisatsu has joined #ruby
EdwardIII has joined #ruby
e2 has joined #ruby
con3 has joined #ruby
cuppajoeman has joined #ruby
newton has joined #ruby
legit has joined #ruby
hesco3 has joined #ruby
cAMP has joined #ruby
balo has joined #ruby
pandabot has joined #ruby
ollysmith_ has joined #ruby
cyj123 has joined #ruby
keyvan has joined #ruby
unyu has joined #ruby
leah2 has joined #ruby
FetidToot has joined #ruby
markmarkmark has joined #ruby
Byteflux has joined #ruby
Furai has joined #ruby
glider has joined #ruby
gigamo has joined #ruby
mrus has joined #ruby
AEtherC0r3 has joined #ruby
nyuszika7h has joined #ruby
forvelin has joined #ruby
Fusl has joined #ruby
RemoteHost has joined #ruby
legahc has joined #ruby
peer has joined #ruby
tweaks has joined #ruby
coffeejunk has joined #ruby
pusewic|away_ has joined #ruby
leachim6 has joined #ruby
clemens3 has joined #ruby
smp has joined #ruby
shokohsc has quit [Max SendQ exceeded]
Starfoxxes has quit [Max SendQ exceeded]
jmcgnh has quit [Max SendQ exceeded]
Starfoxxes has joined #ruby
r0bby has quit [Ping timeout: 240 seconds]
itok has quit [Ping timeout: 240 seconds]
r0bby has joined #ruby
itok has joined #ruby
jmcgnh has joined #ruby
shokohsc has joined #ruby
___nick___ has joined #ruby
royo25 has joined #ruby
gproto23 has joined #ruby
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 240 seconds]
bluedust_ has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
shiru has quit [Quit: Lost terminal]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dangerousdave has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
bluedust has joined #ruby
gr33n7007h has quit [Quit: WeeChat 3.4]
oxfuxxx has quit [Ping timeout: 256 seconds]
robotmay has quit [Quit: No Ping reply in 180 seconds.]
robotmay has joined #ruby
teclator has joined #ruby
bluedust has quit [Ping timeout: 240 seconds]
teclator has quit [Ping timeout: 256 seconds]
bluedust has joined #ruby
teclator has joined #ruby
oxfuxxx has joined #ruby
bluedust has quit [Remote host closed the connection]
bluedust has joined #ruby
teclator has quit [Remote host closed the connection]
teclator has joined #ruby
<rapha>
morning all
<adam12>
rapha: morning!
royo25 has quit [Quit: Bye]
<rapha>
had a good weekend adam?
royo25 has joined #ruby
<adam12>
rapha: Not too bad. HBU?
<rapha>
hmm, quite nice actually. saturday was quiet and i was able to finally finish playing through Subnautica (which is an amazing game) and sunday was spent mostly at my bff's house with him and his wife and their three kids, which was a welcome distraction from my own life.
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12>
rapha: nice :)
dangerousdave has joined #ruby
dangerousdave has quit [Client Quit]
gproto23 has quit [Ping timeout: 256 seconds]
perrierjouet has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #ruby
dangerousdave has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.4]
gr33n7007h has joined #ruby
whysthatso125 has quit [Remote host closed the connection]
whysthatso125 has joined #ruby
samgranieri has joined #ruby
John_Ivan has quit [Quit: Leaving]
gproto23 has joined #ruby
pusewicz has joined #ruby
pusewicz has quit [Client Quit]
kaleido has joined #ruby
constxd_ has joined #ruby
bluedust has quit [Ping timeout: 256 seconds]
bluedust has joined #ruby
samgranieri has quit [Quit: samgranieri]
constxd_ has quit [Ping timeout: 256 seconds]
bluedust_ has joined #ruby
bluedust_ has quit [Read error: Connection reset by peer]
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 256 seconds]
samgranieri has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
samgranieri has quit [Ping timeout: 256 seconds]
gr33n7007h has quit [Quit: WeeChat 3.4]
samgranieri_ has joined #ruby
cahoots has joined #ruby
<cahoots>
hi, i want to write code like, "my_var = other_var || { stmt1 ; stmt2 ; return_value }", so that if other_var is nil, my_var is set to return_value. this is nice since you can split the block up on multiple lines, and is something they do in rust. can it be done in ruby?
<leftylink>
that can be done if the braces are instead either 1. parenthese or 2. a `begin` `end` pair
<leftylink>
s/parenthese/parentheses/
<cahoots>
leftylink, ty
<adam12>
I'd probably begin/end.
Sheilong has joined #ruby
royo25 has quit [Quit: Bye]
bluedust_ has quit [Remote host closed the connection]
<prinnydood>
hi folks. is anyone here familiar with the logger gem? i'm wondering if it's possible to exclude certain logs from being shipped to kibana on our aws account, so that we don't hit a limitation on the number of fields.
<adam12>
prinnydood: No specific experience, but maybe you could make your own formatter?
<adam12>
Rather, I use logger everywhere, but no experience with your specific request.
<adam12>
class KibanaFormatter < Formatter; def call(severity, time, progname, msg); super unless msg.match?(/do-not-log/); end; end;
<prinnydood>
is that a filter for the logger gem?
<adam12>
prinnydood: The logger gem accepts a custom Formatter. In this case, you inherit from Logger::Formatter, overwrite the callback to only execute the original block if the message doesn't match that regex.
smp has joined #ruby
<adam12>
Then pass it when you create the logger. Logger.new($stdout, formatter: KibanaFormatter.new)
oxfuxxx has joined #ruby
<prinnydood>
ty adam12, i think this might be it. will try it out and report back
<adam12>
prinnydood: Cool :)
<adam12>
prinnydood: If it works, I'd extract the regexp to a constant, and save some CPU/memory churn.
<adam12>
msg.match?(IGNORE_REGEXP)
smp_ has joined #ruby
smp has quit [Ping timeout: 240 seconds]
smp_ is now known as smp
smp_ has joined #ruby
smp has quit [Ping timeout: 256 seconds]
smp_ is now known as smp
duderonomy has joined #ruby
John_Ivan has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
smp has quit [Ping timeout: 252 seconds]
samgranieri_ has quit [Read error: Connection reset by peer]
smp has joined #ruby
pgib has quit [Ping timeout: 240 seconds]
pgib has joined #ruby
<mooff>
does it support jndi?
<adam12>
lol
<mooff>
i wish there was more interest in a Module#uninclude .. i've been working on a bot library where features are implemented in modules, and including them activates the feature. trouble is, there's no way to remove them at runtime :/
<mooff>
rather than "CoolBot.include FeatureOne, FeatureTwo", i could offer e.g. "CoolBot.activate FeatureOne, FeatureTwo", which would put them into an array on the class instance
<mooff>
then when running hooks, have a bot instance dup itself, and extend the duplicate with all the modules from the list, run hooks, discard
<mooff>
but it feels like a hack when the built-in module functionality aaaalmost gets us there
<adam12>
Redefine CoolBot.include for fun and good times..
smp has quit [Ping timeout: 240 seconds]
smp has joined #ruby
cahoots has quit [Ping timeout: 256 seconds]
prinnydood has quit [Quit: Leaving]
cahoots has joined #ruby
zZen33 has joined #ruby
zZen33 has quit [Quit: Client closed]
DenKn has joined #ruby
kaivai has joined #ruby
<DenKn>
I get an serror: .../2.7.0/resolv.rb:803:in `send': Required key not available - sendto(2) for "ff02::fb" port 5353 (Errno::ENOKEY) This happened, if I run middleman server. I've an wireguard-interface, which disallow ff02::fb.
<adam12>
DenKn: Strange. Is that address listed in /etc/resolv.conf?
<DenKn>
in resolv.conf? You mean /etc/hosts?
<adam12>
DenKn: What OS?
<DenKn>
nixos
<DenKn>
I do not know, if it also happened with ubuntu/debian.
<DenKn>
Btw, if the wireguard-interface is not available, it will not happen.
<adam12>
Well, I'm not sure where that address/port combo came frome. It's kind of strange.
<adam12>
I wonder if wireguard can push dns servers? Maybe it's pushing dns records for that address.
<DenKn>
In my case one DNS-Server provided by an IP behind the wg-interface is used for some domains, but [ff02::fb]:5353 is not DNS, it is mDNS
cahoots has quit [Ping timeout: 240 seconds]
<DenKn>
I had to allow ff02::fb on the other side to prevent this error by network. But, I would say, this would be a ruby-error. ENOKEY should be rescued and no answer returned.
<adam12>
I didn't realize mDNS had an unprivileged port. Interesting.
<adam12>
DenKn: Might be worth a bug report. bugs.ruby-lang.org. I'm not sure what else to suggest.
<DenKn>
Why ruby tries it instead of using nss?
<DenKn>
Wow, this would be my first bugreport after 20 years.
axisys_ has quit [Remote host closed the connection]
___nick___ has quit [Ping timeout: 240 seconds]
_ht has quit [Remote host closed the connection]
infinityfye has quit [Quit: Leaving]
samgranieri has quit [Ping timeout: 240 seconds]
test23342345234 has joined #ruby
test23342345234 has quit [Remote host closed the connection]
bluedust has joined #ruby
bluedust has quit [Ping timeout: 240 seconds]
random-jellyfish has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
oxfuxxx has joined #ruby
lunarkitty has joined #ruby
Aylat has joined #ruby
oxfuxxx has quit [Quit: Raccoon's not another IRC transgenre wannabe who can't fap at the dead american dream, fhackerz]
oxfuxxx has joined #ruby
<Aylat>
Hello folks, i'm switching to Ruby and wanna know if there's some cheatsheet or great webpage to learn the best practices of this language
<Aylat>
i've seen a quite few on top of google results, but they were... too little info, only talking about using "until" instead of while
<weaksauce>
Aylat book route i'd go with eloquent ruby
<weaksauce>
online route the odin project looks useful
<Aylat>
I'll check that book so, thanks!
<LACampbe1>
I quite liked 'Practical Object Oriented Design'. though arguably it's not a ruby book, it's an OOD book that happens to use ruby
<Aylat>
I'm just switching from python, and all my code seems pythonic
LACampbe1 is now known as LACampbell
<Aylat>
i just wanna learn some tips and best practices
<LACampbell>
example of pythonic ruby code?
<legit>
+1 for Eloquent Ruby
<legit>
It's a bit dated, but it's still awesome!
<Aylat>
i've seen before things like adding "!" to methods like uppercase
<Aylat>
and i loved it
<weaksauce>
? is for boolean questions
<weaksauce>
! is for "dangerous" things
<weaksauce>
stuff that might throw an error or change an object in place
<Aylat>
well, LACampbell, i dont know, just writed my first real good script on ruby and seems pretty similar to python
<Aylat>
oh, nice weaksauce, see, things like that (or tips) is what i'm searching for
<weaksauce>
eloquent ruby is your best friend then... it teaches idiomatic ruby
oxfuxxx has quit [Remote host closed the connection]
<weaksauce>
and it's slightly out of date but nothing fundamentally has really changed in there
<Aylat>
i'm tired of looking for ruby tips and finding thing like "ruby is awesome because you can ommit the parentheiss", yeah, that's great but not a game breaker
oxfuxxx has joined #ruby
<Aylat>
eloquent ruby seems a perfect match for my questioj
<Aylat>
Good night folks, and thanks for all the tips
<weaksauce>
that polished ruby looks really good
random-jellyfish has quit [Quit: Client closed]
infernix has joined #ruby
lim has joined #ruby
Aylat has quit [Quit: Leaving]
lim has quit [Remote host closed the connection]
BSaboia has quit [Read error: Connection reset by peer]
axisys has joined #ruby
gr33n7007h has joined #ruby
<adam12>
weaksauce: It's good, but I wish Jeremy ended up with someone else than Pakt. I think they have the weakest editors of all the tech publishers.
<weaksauce>
is it just ebook?
<adam12>
I have the ebook because I was given an early review copy, but there are physical copies out there.