havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.1, 2.5.3, 2.4.5: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
spacesuitdiver has quit [Quit: Textual IRC Client: www.textualapp.com]
Rudd0 has quit [Ping timeout: 245 seconds]
Rudd0 has joined #ruby
matti has joined #ruby
jane_booty_doe has quit [Quit: Ping timeout (120 seconds)]
jane_booty_doe has joined #ruby
orbyt_ has quit [Ping timeout: 244 seconds]
Caerus has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
orbyt_ has quit [Ping timeout: 255 seconds]
bruce_lee has quit [Remote host closed the connection]
Caerus has joined #ruby
fluxAeon has quit [Ping timeout: 245 seconds]
orbyt_ has joined #ruby
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
mangold has joined #ruby
AJA4350 has quit [Remote host closed the connection]
jcarl43 has quit [Quit: WeeChat 2.4]
conta has joined #ruby
xco has joined #ruby
<xco> i’m creating an array of a particular random string
<xco> is there a better way to do this?
<xco> sample_space = ('A'..'Z').to_a + ('a'..'z').to_a + (0..9).to_a
<xco> in short i just want alphnumeric characters
<havenwood> xco: That's pretty much right. I'd just suggest reducing the number of method calls:
<havenwood> [*'a'..'z', *'A'..'Z', *'0'..'9']
<xco> ah cool! :)
<xco> havenwood: thanks
<havenwood> xco: np!
conta has quit [Ping timeout: 245 seconds]
<xco> btw
<xco> * is the splat operator right
<havenwood> yes, splat like a bug
<havenwood> *
<xco> havenwood: so in doing this *’a’..’z’ you’re changing a range to an array?
<xco> i think i messed up
<havenwood> I like that the lonely person operator is someone sitting crosslegged staring at a dot: &.
<havenwood> &>> [*'a'..'z', *'A'..'Z', *'0'..'9']
<rubydoc> stderr: playpen: timeout triggered! (https://carc.in/#/r/6dh3)
<havenwood> xco: It expands the Range into Array elements.
<xco> :)
houhoulis has joined #ruby
<havenwood> [*0..3] #=> [0, 1, 2, 3]
<xco> havenwood: yeap got it thanks :)
<phaul> hm
<phaul> never seen carc.in timing out like that before
ramfjord has joined #ruby
<phaul> &>> :test.to_s
<rubydoc> # => "test" (https://carc.in/#/r/6dh4)
\void has quit [Quit: So long, and thanks for all the fish.]
crankharder has quit [Ping timeout: 264 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
xrexeon has quit [Remote host closed the connection]
fluxAeon has joined #ruby
eb0t has joined #ruby
def_jam has quit [Ping timeout: 244 seconds]
crankharder has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has joined #ruby
cow[moo] has quit [Client Quit]
xco has quit [Quit: xco]
sleetdrop has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phaul has quit [Ping timeout: 245 seconds]
rubydoc has quit [Ping timeout: 250 seconds]
rubydoc has joined #ruby
phaul has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
t0xik has joined #ruby
sagax has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fluxAeon has quit [Read error: Connection reset by peer]
CrazyEddy has joined #ruby
fluxAeon has joined #ruby
Xeago_ has joined #ruby
Puppet_ has quit [Remote host closed the connection]
wolfshappen_ has quit [Ping timeout: 255 seconds]
wolfshappen has joined #ruby
Xeago_ has quit [Client Quit]
braincrash has quit [Quit: bye bye]
powerbit has joined #ruby
braincrash has joined #ruby
Xeago has quit [Quit: Xeago]
Xeago has joined #ruby
houhoulis has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
T3RM1N41 has joined #ruby
T3RM1N41 has quit [Read error: Connection reset by peer]
tdy1 has joined #ruby
tdy has quit [Ping timeout: 250 seconds]
cagomez has joined #ruby
Azure|dc is now known as Azure
TechIsCool has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 1.9.0.17/2009122204]]
ansraliant has joined #ruby
ansraliant has quit [Client Quit]
ansraliant has joined #ruby
\void has joined #ruby
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
T3RM1N41 has joined #ruby
T3RM1N41 has quit [Max SendQ exceeded]
cagomez has quit [Remote host closed the connection]
reber has joined #ruby
reber__ has joined #ruby
reber__ has quit [Remote host closed the connection]
_whitelogger has joined #ruby
akem__ has quit [Remote host closed the connection]
akem__ has joined #ruby
jordanm has quit [Ping timeout: 272 seconds]
sleetdrop has quit [Quit: Textual IRC Client: www.textualapp.com]
akem__ has quit [Remote host closed the connection]
akem__ has joined #ruby
conta has joined #ruby
agent_white has quit [Quit: bbl]
rippa has joined #ruby
TvL2386 has joined #ruby
\void has quit [Quit: So long, and thanks for all the fish.]
Swyper has joined #ruby
sauvin has joined #ruby
aupadhye has joined #ruby
Swyper has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
am0123_ has joined #ruby
prestorium has joined #ruby
ramfjord has joined #ruby
Swyper has quit [Ping timeout: 255 seconds]
ramfjord has quit [Ping timeout: 250 seconds]
cd has quit [Ping timeout: 256 seconds]
maufart__ has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
jordanm has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
nowhere_man has quit [Ping timeout: 258 seconds]
blackmesa has joined #ruby
fluxAeon has quit [Ping timeout: 246 seconds]
nwradio has quit [Read error: Connection reset by peer]
nwradio has joined #ruby
tdy1 has quit [Ping timeout: 255 seconds]
laaron has quit [Remote host closed the connection]
laaron- has joined #ruby
rafadc_ has joined #ruby
clemens3_ has joined #ruby
laaron- has quit [Client Quit]
blackmesa has quit [Ping timeout: 257 seconds]
blackmesa has joined #ruby
laaron has joined #ruby
alem0lars has joined #ruby
alem0lars has quit [Remote host closed the connection]
jmcgnh has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
ansraliant has quit [Quit: My planet needs me]
jmcgnh has joined #ruby
dante has quit [Quit: bye]
dante has joined #ruby
jinie has joined #ruby
mangold has joined #ruby
dante has quit [Remote host closed the connection]
dante has joined #ruby
AJA4350 has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
fox_mulder_cp has joined #ruby
<fox_mulder_cp> hi, folks. i try to create a DNS control gem, which operated of three of four items - Server, DnsZone, RRSet, Record. how i can write proper code, where initialized server passed to zone, and some from zone passed to rrset for operations?
<fox_mulder_cp> for some like zonelist = Server.new(ip,login,pass).zones; rrset = RRSet.new(name, content); zone = Server.new(ip,login,pass).zone.create(name, nsservers, rrset);
stooj_ has quit [Quit: ZNC 1.7.2 - https://znc.in]
stooj has joined #ruby
<fox_mulder_cp> i need a help with basic classes skeletone
blackmesa has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
conta has quit [Ping timeout: 258 seconds]
cnsvc_ has quit [Ping timeout: 256 seconds]
jyaworski has quit [Ping timeout: 240 seconds]
conta has joined #ruby
wolfshappen has quit [Ping timeout: 244 seconds]
wolfshappen_ has joined #ruby
kapil____ has joined #ruby
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
lxsameer has joined #ruby
Swyper has joined #ruby
Swyper has quit [Ping timeout: 259 seconds]
Swyper has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
Swyper has quit [Ping timeout: 244 seconds]
mangold has quit [Quit: This computer has gone to sleep]
maufart__ has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
mangold has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
mangold has quit [Client Quit]
alem0lars has quit [Ping timeout: 250 seconds]
laaron has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
mangold has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
alem0lars has joined #ruby
cthulchu has quit [Read error: Connection reset by peer]
mikecmpb_ has quit [Quit: inabit. zz.]
conta has quit [Ping timeout: 244 seconds]
akem__ has quit [Remote host closed the connection]
akem__ has joined #ruby
mikecmpbll has joined #ruby
conta has joined #ruby
lucasb has joined #ruby
am0123_ has quit [Ping timeout: 268 seconds]
Pisuke has quit [Ping timeout: 250 seconds]
Sembei has joined #ruby
beefjoe has joined #ruby
blaguvest has quit [Ping timeout: 245 seconds]
t0xik has quit [Quit: Connection closed for inactivity]
v01d4lph4 has joined #ruby
v01d4lph4 has quit [Read error: Connection reset by peer]
jyaworski has joined #ruby
jyaworski has quit [Ping timeout: 240 seconds]
maufart__ has joined #ruby
sagax has quit [Quit: Konversation terminated!]
jyaworski has joined #ruby
sagax has joined #ruby
dinfuehr has quit [Ping timeout: 268 seconds]
dinfuehr has joined #ruby
mangold has joined #ruby
conta has quit [Ping timeout: 257 seconds]
v01d4lph4 has joined #ruby
jyaworski has quit [Ping timeout: 255 seconds]
xrexeon has joined #ruby
ua has quit [Ping timeout: 255 seconds]
v01d4lph4 has quit [Remote host closed the connection]
am0123_ has joined #ruby
houhoulis has joined #ruby
ua has joined #ruby
v01d4lph4 has joined #ruby
ua has quit [Remote host closed the connection]
ua has joined #ruby
conta1 has joined #ruby
beefjoe has quit [Remote host closed the connection]
beefjoe has joined #ruby
alem0lars has quit [Ping timeout: 255 seconds]
akem__ has quit [Remote host closed the connection]
bmurt has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
kspencer has quit []
kspencer has joined #ruby
towo has joined #ruby
akem has joined #ruby
Rapture has joined #ruby
jinie has joined #ruby
gnufied has quit [Remote host closed the connection]
alem0lars has joined #ruby
thinkpad has quit [Ping timeout: 245 seconds]
jyaworski has joined #ruby
aupadhye has quit [Ping timeout: 255 seconds]
v01d4lph4 has quit [Remote host closed the connection]
beefjoe has quit [Quit: <3]
houhoulis has quit [Remote host closed the connection]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
Fischmop has quit [Quit: WeeChat 2.3]
conta1 has quit [Ping timeout: 255 seconds]
nowhere_man has joined #ruby
Onwarion has quit [Remote host closed the connection]
Onwarion has joined #ruby
blackmesa has joined #ruby
beefjoe has joined #ruby
noboruma has joined #ruby
noboruma has quit [Client Quit]
noboruma has joined #ruby
jyaworski has quit [Ping timeout: 246 seconds]
noboruma has quit [Client Quit]
noboruma has joined #ruby
rubydoc has quit [Ping timeout: 255 seconds]
polishdub has joined #ruby
clickbai1 has joined #ruby
rubydoc has joined #ruby
phaul has quit [Ping timeout: 244 seconds]
clickbai1 has quit [Client Quit]
clickbai1 has joined #ruby
phaul has joined #ruby
clickbai1 is now known as snapcase
V1s1ble has quit [Ping timeout: 250 seconds]
Fusl has quit [Quit: oh god please send help]
Fusl has joined #ruby
SeepingN has joined #ruby
xrexeon has quit [Remote host closed the connection]
gnufied has joined #ruby
akem has quit [Remote host closed the connection]
xrexeon has joined #ruby
akem has joined #ruby
xrexeon has quit [Read error: Connection reset by peer]
xrexeon has joined #ruby
blackmesa1 has joined #ruby
orbyt_ has joined #ruby
jcarl43 has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
mangold has joined #ruby
blackmesa1 has quit [Ping timeout: 250 seconds]
wolfshappen_ has quit [Ping timeout: 240 seconds]
ellcs has quit [Ping timeout: 268 seconds]
wolfshappen has joined #ruby
blackmesa1 has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
mikecmpbll has joined #ruby
am0123_ has quit [Ping timeout: 246 seconds]
xrexeon has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 244 seconds]
tacoboy has joined #ruby
mikecmpbll has joined #ruby
tdy1 has joined #ruby
am0123_ has joined #ruby
agent_white has joined #ruby
KeyJoo has joined #ruby
am0123_ has quit [Ping timeout: 250 seconds]
clemens3_ has quit [Ping timeout: 255 seconds]
gnufied has quit [Remote host closed the connection]
ivanskie has joined #ruby
\void has joined #ruby
blackmesa1 has quit [Ping timeout: 268 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
t0xik has joined #ruby
blackmesa1 has joined #ruby
AJA4350 has quit [Ping timeout: 244 seconds]
Dbugger has joined #ruby
mikecmpbll has quit [Ping timeout: 258 seconds]
\void has quit [Quit: So long, and thanks for all the fish.]
blackmesa1 has quit [Ping timeout: 258 seconds]
lxsameer has quit [Ping timeout: 246 seconds]
maufart__ has quit [Ping timeout: 268 seconds]
cthulchu has joined #ruby
prestorium has quit [Ping timeout: 255 seconds]
orbyt_ has joined #ruby
orbyt_ has quit [Ping timeout: 258 seconds]
gnufied has joined #ruby
\void has joined #ruby
blackmesa has joined #ruby
orbyt_ has joined #ruby
[Butch] has joined #ruby
fribmendes has quit [Quit: The Lounge - https://thelounge.github.io]
fribmendes has joined #ruby
AJA4350 has joined #ruby
beefjoe has quit [Quit: <3]
mangold has quit [Quit: This computer has gone to sleep]
jyaworski has joined #ruby
fribmendes has quit [Ping timeout: 268 seconds]
jyaworski has quit [Ping timeout: 258 seconds]
orbyt_ has quit [Ping timeout: 255 seconds]
sameerynho has joined #ruby
akem has quit [Remote host closed the connection]
akem has joined #ruby
xrexeon has joined #ruby
gix has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
Fusl has quit [Remote host closed the connection]
Fusl has joined #ruby
renich has joined #ruby
segy has quit [Ping timeout: 244 seconds]
segy has joined #ruby
am0123_ has joined #ruby
renich_ has joined #ruby
renich has quit [Ping timeout: 245 seconds]
moei has joined #ruby
renich_ is now known as renich
am0123_ has quit [Ping timeout: 268 seconds]
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
ramfjord has joined #ruby
cnsvc_ has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.4]
am0123_ has joined #ruby
mikecmpbll has joined #ruby
renich_ has joined #ruby
renich has quit [Ping timeout: 246 seconds]
sauvin has quit [Remote host closed the connection]
cd has joined #ruby
cagomez has joined #ruby
cagomez has quit [Read error: Connection reset by peer]
KeyJoo has quit [Ping timeout: 245 seconds]
orbyt_ has joined #ruby
jyaworski has joined #ruby
ur5us has joined #ruby
oncall-pokemon has joined #ruby
am0123_ has quit [Ping timeout: 245 seconds]
am0123_ has joined #ruby
barg has joined #ruby
<barg> does anybody use byebug over pre-byebug, if so, why?
<barg> pre=pry
tdy2 has joined #ruby
tdy1 has quit [Ping timeout: 255 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
xrexeon has quit [Remote host closed the connection]
alem0lars has quit [Ping timeout: 255 seconds]
jyaworski has quit [Ping timeout: 250 seconds]
DTZUZO has quit [Ping timeout: 264 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
t0xik has quit [Quit: Connection closed for inactivity]
orbyt_ has quit [Ping timeout: 250 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
evdubs has quit [Remote host closed the connection]
orbyt_ has joined #ruby
evdubs has joined #ruby
thinkpad has joined #ruby
tdy2 has quit [Ping timeout: 255 seconds]
renich_ has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
prestorium has joined #ruby
Boubert has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
tdy2 has joined #ruby
orbyt_ has quit [Ping timeout: 250 seconds]
thinkpad has quit [Quit: lawl]
Fernando-Basso has joined #ruby
<Eiam> pry byebug
<ramfjord> Alright I got a good one for you guys. Trying to dynamically create a class with a proc/lambda which uses functions from an included module inlcuded in the newly generated class. Think it will be easier to just show: https://gist.github.com/ramfjord/0142e2b27e0e065f9d14815c9591fbd2
<ramfjord> anyone know a reasonable way to do this?
nwradio has quit [Quit: Ping timeout (120 seconds)]
nwradio has joined #ruby
dinfuehr has quit [Ping timeout: 250 seconds]
dinfuehr has joined #ruby
tacoboy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
wolfshappen has quit [Ping timeout: 250 seconds]
orbyt_ has joined #ruby
wolfshappen_ has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Ping timeout: 250 seconds]
orbyt_ has joined #ruby
nadir has joined #ruby
hahuang65 has quit [Quit: ZNC - https://znc.in]
t0xik has joined #ruby
<Radar> ramfjord: to do what?
<Radar> Oh I missed a line
<havenwood> ramfjord: I commented on your gist with an example showing prepending a module.
hahuang65 has joined #ruby
prestorium has quit [Quit: prestorium]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Net> I'm golfing, can I avoid the assignment in `foo = bar.baz; foo.nil? ? false : foo`?
renich has joined #ruby
my1es has joined #ruby
<havenwood> Net: You might need to show us that one in context. It seems from what you've shown that you just have: bar.baz
<havenwood> Net: Do you really need an explicit `false`? If `bar.baz #=> nil`, it's already falsey.
Dbugger has quit [Ping timeout: 250 seconds]
polishdub has quit [Remote host closed the connection]
Onwarion has quit [Ping timeout: 258 seconds]
Boubert has quit [Quit: Ik ga weg]
reber has quit [Remote host closed the connection]
<leftylink> while it would be possible to do `x|!0` to change nil to false, I would find it more likely that it's not necessary to change nil to false
hahuang65 has quit [Quit: ZNC - https://znc.in]
hahuang65 has joined #ruby
<Net> havenwood: right, realized I can just do !!bar.baz
<havenwood> Net: or just: bar.baz
<havenwood> Net: `nil` and `false` are the only two falsey things
<Net> havenwood: I'd rather have a boolean than rely on falseyness
<havenwood> Net: then a double bang indeed suffices
<Net> leftylink's looks fancy, but not sure what it's doing
ramfjord has quit [Ping timeout: 250 seconds]
<leftylink> !0 is false, that's all there is to it
<leftylink> golfing, so it's better to write `false` in as few chars as possible... but then I realised that !!x is one char less than x|!0
<leftylink> too bad.
blackmesa has joined #ruby
<leftylink> in the same vein, one wants to write `p` instead of `nil` and `!p` instead of `true`
Azure|dc has joined #ruby
<Net> I see, bitwise or with special handling for nil
Azure has quit [Ping timeout: 268 seconds]
<leftylink> ... whoops, which also made me realise it doesn't work if x is possibly a number, since then it will do something for `|` (bitwise or) that I didn't want it to do
jyaworski has joined #ruby
<leftylink> ... so yeah another reason why !! is the better
lucasb has quit [Quit: Connection closed for inactivity]
AJA4350 has quit [Ping timeout: 255 seconds]
tdy2 is now known as tdy
ellcs has joined #ruby
jyaworski has quit [Ping timeout: 250 seconds]
am0123_ has quit [Ping timeout: 250 seconds]
oncall-pokemon has quit [Quit: Connection closed for inactivity]
AJA4350 has joined #ruby
ellcs has quit [Ping timeout: 268 seconds]
tylerc has joined #ruby
Fernando-Basso has quit [Remote host closed the connection]
ua has quit [Ping timeout: 244 seconds]