havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.4, 2.5.6, 2.7.0-preview1: 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!
Swyper has quit [Remote host closed the connection]
dionysus69 has quit [Quit: dionysus69]
Swyper has joined #ruby
jrafanie has joined #ruby
tdy has joined #ruby
greypack has quit [Ping timeout: 250 seconds]
jacksoow_ has joined #ruby
Bounga has joined #ruby
tdy has quit [Ping timeout: 265 seconds]
DaRock has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
greypack has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
jacksoow has quit [Ping timeout: 276 seconds]
drincruz has joined #ruby
Bounga has quit [Ping timeout: 276 seconds]
poontangmessiah has joined #ruby
gb_away has quit [Quit: One disk to rule them all, One disk to bind them, One disk to hold the files And in the darkness grind 'em.]
jenrzzz has quit [Ping timeout: 240 seconds]
davidw_ has quit [Ping timeout: 276 seconds]
gix has quit [Ping timeout: 245 seconds]
Frobozz has joined #ruby
hutch1 has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
banisterfiend has quit [Read error: Connection reset by peer]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
howdoi has joined #ruby
planigan has joined #ruby
tdy has joined #ruby
greypack has quit [Quit: All your IRC are belong to ZNC]
jenrzzz has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper_ has joined #ruby
Swyper has quit [Read error: Connection reset by peer]
Swyper_ has quit [Remote host closed the connection]
dasher00 has quit [Ping timeout: 268 seconds]
throstur_ has quit [Ping timeout: 265 seconds]
greypack has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
pawptart has joined #ruby
pawptart_ has joined #ruby
ramfjord has joined #ruby
pawptart has quit [Client Quit]
pawptart_ has quit [Client Quit]
pawptart has joined #ruby
SeepingN has quit [Ping timeout: 268 seconds]
hutch1 has quit [Ping timeout: 245 seconds]
throstur_ has joined #ruby
hutch1 has joined #ruby
throstur__ has joined #ruby
throstur_ has quit [Ping timeout: 268 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
greypack has quit [Quit: All your IRC are belong to ZNC]
planigan has quit [Remote host closed the connection]
greypack has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
planigan has joined #ruby
cnsvc has quit [Ping timeout: 260 seconds]
cnsvc has joined #ruby
poontangmessiah has quit [Remote host closed the connection]
code_zombie has quit [Quit: Leaving]
Technodrome has quit [Quit: Textual IRC Client: www.textualapp.com]
Technodrome has joined #ruby
drincruz has quit [Ping timeout: 265 seconds]
impermanence has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 276 seconds]
AJA4351 is now known as AJA4350
Bounga has joined #ruby
hutch1 has quit [Ping timeout: 246 seconds]
Bounga has quit [Ping timeout: 245 seconds]
hutch1 has joined #ruby
impermanence has quit [Quit: Ping timeout (120 seconds)]
gix has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
impermanence has joined #ruby
Frobozz has quit [Ping timeout: 276 seconds]
tdy has quit [Ping timeout: 268 seconds]
AJA4350 has quit [Quit: AJA4350]
baojg has quit [Ping timeout: 265 seconds]
samort7 has joined #ruby
baojg_ has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
hutch1 has quit [Ping timeout: 276 seconds]
planigan has quit [Remote host closed the connection]
gix- has joined #ruby
gix has quit [Disconnected by services]
brool has quit [Ping timeout: 264 seconds]
SeepingN has joined #ruby
throstur__ has quit [Ping timeout: 258 seconds]
pawptart has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
Mrgoose84 has joined #ruby
alfiemax has joined #ruby
evdubs_ has quit [Remote host closed the connection]
evdubs_ has joined #ruby
tsujp has joined #ruby
Mrgoose84 has quit [Quit: The Lounge - https://thelounge.chat]
Mrgoose84 has joined #ruby
Bounga has joined #ruby
Bounga has quit [Ping timeout: 246 seconds]
samort7 has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
Frobozz has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
murarisumit has joined #ruby
banisterfiend has joined #ruby
banister_ has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
gix- has quit [Ping timeout: 276 seconds]
banister_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ravenous_ has joined #ruby
ravenous_ has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has quit [Ping timeout: 276 seconds]
Emmanuel_Chanel has joined #ruby
banisterfiend has joined #ruby
schne1der has joined #ruby
suukim has joined #ruby
suukim has quit [Remote host closed the connection]
suukim has joined #ruby
dbugger has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 245 seconds]
ur5us has quit [Ping timeout: 276 seconds]
Mrgoose84 has quit [Quit: The Lounge - https://thelounge.chat]
Mrgoose84 has joined #ruby
schne1der has quit [Ping timeout: 258 seconds]
schaerli has joined #ruby
andikr has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
sauvin has joined #ruby
cd has quit [Quit: cd]
absolutejam has joined #ruby
emptyflask has quit [Ping timeout: 276 seconds]
cesario has joined #ruby
cesario has quit [Client Quit]
bhaak has quit [Ping timeout: 245 seconds]
Bounga has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cesario has joined #ruby
Bounga has quit [Ping timeout: 264 seconds]
absolutejam has quit [Ping timeout: 246 seconds]
queip has quit [Ping timeout: 265 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
queip has joined #ruby
ramfjord has joined #ruby
bhaak has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
TomyWork has joined #ruby
fphilipe has joined #ruby
lxsameer has joined #ruby
absolutejam has joined #ruby
Bounga has joined #ruby
schne1der has joined #ruby
BH23 has joined #ruby
phaul has joined #ruby
linuxdaemon has quit [Read error: Connection reset by peer]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
linuxdaemon has joined #ruby
alfiemax has quit [Remote host closed the connection]
Sina has joined #ruby
murarisumit has quit [Ping timeout: 265 seconds]
cesario has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reber has joined #ruby
Bounga has quit [Ping timeout: 264 seconds]
murarisumit has joined #ruby
jmcgnh has quit [Ping timeout: 268 seconds]
jmcgnh has joined #ruby
cesario has joined #ruby
murarisumit has quit [Ping timeout: 258 seconds]
alfiemax has joined #ruby
alfiemax has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
Fernando-Basso has joined #ruby
impermanence has quit [Ping timeout: 240 seconds]
Junaos_ has joined #ruby
Junaos has quit [Ping timeout: 264 seconds]
murarisumit has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
Bounga has joined #ruby
murarisumit has quit [Ping timeout: 276 seconds]
murarisumit has joined #ruby
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
ur5us has joined #ruby
dbugger has quit [Quit: Leaving]
Intelo has joined #ruby
phenom has quit [Ping timeout: 258 seconds]
alfiemax has quit [Remote host closed the connection]
throstur__ has joined #ruby
ravenous_ has joined #ruby
ravenous_ has quit [Ping timeout: 250 seconds]
absolutejam has quit [Ping timeout: 268 seconds]
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
dasher00 has joined #ruby
bitwinery has quit [Quit: Leaving]
Bounga has quit [Ping timeout: 276 seconds]
sshine has left #ruby [#ruby]
cgfbee has quit [Remote host closed the connection]
absolutejam has joined #ruby
Bounga has joined #ruby
alfiemax has joined #ruby
cesario has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bounga has quit [Ping timeout: 276 seconds]
bhaak has quit [Changing host]
bhaak has joined #ruby
ellcs has joined #ruby
ep4sh2k___ has joined #ruby
alfiemax has quit [Ping timeout: 276 seconds]
Furai has quit [Quit: WeeChat 2.6]
jbeaudoin_sher has quit [Quit: Connection closed for inactivity]
Jonopoly has joined #ruby
KeyJoo has joined #ruby
Furai has joined #ruby
Bounga has joined #ruby
ravenous_ has joined #ruby
murarisumit has quit [Ping timeout: 268 seconds]
Fernando-Basso has quit [Remote host closed the connection]
absolutejam has quit [Ping timeout: 246 seconds]
_whitelogger has joined #ruby
throstur__ has quit [Ping timeout: 276 seconds]
Emmanuel_Chanel has joined #ruby
involans has joined #ruby
throstur_t has joined #ruby
cgfbee has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
Bounga has quit [Remote host closed the connection]
Bounga has joined #ruby
absolutejam has joined #ruby
Emmanuel_Chanel has joined #ruby
queip has quit [Ping timeout: 240 seconds]
queip_ has joined #ruby
queip_ is now known as queip
Bounga has quit [Ping timeout: 246 seconds]
alfiemax has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ravenous_ has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 276 seconds]
bhaak has quit [Ping timeout: 240 seconds]
bhaak has joined #ruby
ur5us has quit [Ping timeout: 265 seconds]
KeyJoo has quit [Ping timeout: 265 seconds]
throstur_t has quit [Ping timeout: 276 seconds]
throstur_t has joined #ruby
throstur_th has joined #ruby
Bounga has joined #ruby
ramfjord has joined #ruby
throstur_t has quit [Ping timeout: 258 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
throstur_th has quit [Quit: WeeChat 1.9.1]
GodFather has joined #ruby
dbugger has joined #ruby
dbugger has quit [Quit: Leaving]
tsr has joined #ruby
AJA4350 has joined #ruby
queip has quit [Ping timeout: 276 seconds]
poontangmessiah has joined #ruby
NL3limin4t0r_afk is now known as NL3limin4t0r
murarisumit has joined #ruby
queip has joined #ruby
drincruz has joined #ruby
MrCrackPot has quit [Remote host closed the connection]
alfiemax has quit [Remote host closed the connection]
MrCrackPot has joined #ruby
alfiemax has joined #ruby
MrCrackPot has quit [Client Quit]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
<ytti> i'm lazy, sorry
hutch1 has joined #ruby
<ytti> i have nogogiri document
tsr has quit [Quit: WeeChat 2.4]
<ytti> and i want to iterate through all tables
<ytti> without caring wher they are
<ytti> and check the childrens name
<NL3limin4t0r> ytti: What have you tried? Both `doc.css('table')` and `doc.xpath('//table')` should work.
<ytti> children = [
<ytti> #(Element:0x3fdbf9878588 {
<ytti> name = "table",
<ytti> like here is one example which is of interest to me
<ytti> NL3limin4t0r, i think you are right
<ytti> doc.xpath("//table").first.xpath("//th").first.children.first.text
<ytti> will do the trick (in a loop really)
<ytti> what i'm trying to do, is convert confluence tables to XLS
<ytti> and confluence doesn't give any name to tables
<ytti> so i'll randomly decide to call first TH as discriminator on what tables need to beconverted
involans has quit [Quit: involans]
chalkmonster has joined #ruby
<ytti> darn, i'd need children above what imatch to...
<ytti> NL3limin4t0r, any way to get 1 above match? :>
<ytti> NL3limin4t0r, or before
<ytti> NL3limin4t0r, http://p.ip.fi/_O1f i'd need that 'management' element
absolutejam has quit [Ping timeout: 276 seconds]
<NL3limin4t0r> ytti: Match the element above table instead and work from there.
alfiemax has quit [Remote host closed the connection]
<ytti> NL3limin4t0r, alas that is plentiful and mostly false positive
<ytti> but cpu time is cheap i suppose
<NL3limin4t0r> doc.xpath("//*[table]")
BH23 has quit [Ping timeout: 240 seconds]
<NL3limin4t0r> The `//` means, anywhere in the document. `*` means, any element. `[table]` means, that it must have a `table` node as direct child.
<ytti> thank you
absolutejam has joined #ruby
<NL3limin4t0r> So any element in the document having a table child.
murarisumit has quit [Ping timeout: 265 seconds]
alfiemax has joined #ruby
<NL3limin4t0r> You could also work with the current doc.xpath('//table') solution, and request the parent of the table.
<NL3limin4t0r> `doc.xpath('//table').each { |table| table.parent }` and use that to access the wanted node/attribute.
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drincruz has quit [Ping timeout: 265 seconds]
alfiemax has quit [Ping timeout: 258 seconds]
<NL3limin4t0r> Checkout the xpath references if your interested in xpath. https://github.com/sparklemotion/nokogiri/wiki/Cheat-sheet
murarisumit has joined #ruby
involans has joined #ruby
jrafanie has joined #ruby
murarisumit has quit [Ping timeout: 245 seconds]
BH23 has joined #ruby
lucasb has joined #ruby
murarisumit has joined #ruby
murarisumit has quit [Ping timeout: 240 seconds]
xco has joined #ruby
hutch1 has quit [Ping timeout: 246 seconds]
grilix has joined #ruby
suukim has quit [Quit: Konversation terminated!]
alfiemax has joined #ruby
brool has joined #ruby
hutch1 has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
chalkmonster has joined #ruby
brool has quit [Client Quit]
brool has joined #ruby
murarisumit has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
hutch1 has quit [Ping timeout: 250 seconds]
tsr has joined #ruby
Bounga has quit [Remote host closed the connection]
GodFather has quit [Ping timeout: 276 seconds]
ramfjord has joined #ruby
tsujp has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
hutch1 has joined #ruby
drincruz has joined #ruby
queip has quit [Ping timeout: 265 seconds]
queip has joined #ruby
murarisumit has quit [Ping timeout: 245 seconds]
vondruch_ has joined #ruby
vondruch has quit [Ping timeout: 268 seconds]
vondruch_ is now known as vondruch
fphilipe has quit [Ping timeout: 268 seconds]
alfiemax has quit [Remote host closed the connection]
skryking has joined #ruby
alfiemax has joined #ruby
Esa_ has joined #ruby
murarisumit has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
jtdowney has quit [Quit: Bye]
jtdowney has joined #ruby
skryking has quit [Remote host closed the connection]
schne1der has quit [Ping timeout: 268 seconds]
skryking has joined #ruby
hutch1 has quit [Ping timeout: 276 seconds]
alfiemax has joined #ruby
<banisterfiend> hi guys
AndroUser has joined #ruby
<banisterfiend> hi
<banisterfiend> fren equus
queip has quit [Ping timeout: 245 seconds]
queip has joined #ruby
Intelo has quit [Remote host closed the connection]
xco has left #ruby [#ruby]
ep4sh2k___ has quit [Quit: Connection closed for inactivity]
<bougyman> hrm.
<bougyman> is there a way to use define_singleton_method do |anonymous_keywords| ?
<bougyman> where any keyword arg can be given/accepted?
<bougyman> or do they have to be explicitly given?
emptyflask has joined #ruby
plujon has quit [Read error: Connection reset by peer]
fphilipe has joined #ruby
<adam12> bougyman: Could you **kwargs it?
alfiemax has quit [Remote host closed the connection]
absolutejam has quit [Ping timeout: 265 seconds]
alfiemax has joined #ruby
hutch1 has joined #ruby
m27frogy has quit [Read error: Connection reset by peer]
<banisterfiend> hi
<banisterfiend> bye
ellcs has quit [Ping timeout: 276 seconds]
schaerli has quit [Ping timeout: 276 seconds]
m27frogy has joined #ruby
queip has quit [Ping timeout: 245 seconds]
queip has joined #ruby
<banisterfiend> treat
TomyWork has quit [Ping timeout: 246 seconds]
davidw_ has joined #ruby
andikr has quit [Ping timeout: 268 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
sputnik13 has joined #ruby
alfiemax has quit [Remote host closed the connection]
fphilipe has quit [Ping timeout: 265 seconds]
absolutejam has joined #ruby
Azure has quit [Ping timeout: 265 seconds]
absolutejam has quit [Ping timeout: 245 seconds]
thebananaking has quit [Quit: Connection closed for inactivity]
DaRock has quit [Ping timeout: 268 seconds]
Azure has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.5]
psprint has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<psprint> Hello. I'm looking for an official docs entry on GEM_HOME, is there any?
<tsr> psprint: Running `gem help environment` in your shell will give you the most "official" documentation that I'm aware of.
mre- has joined #ruby
znz_jp has quit [Remote host closed the connection]
<tsr> psprint: Additionally, the bundler documentation for the config/install commands reference that environment variable. https://bundler.io/v1.16/bundle_config.html https://bundler.io/v1.16/bundle_install.html
<tsr> psprint: Also, check here: https://guides.rubygems.org/command-reference/
znz_jp has joined #ruby
<psprint> tsr: that's great, but I need something that I can directly link to
<tsr> psprint: not sure that exists then, other than the links above.
banisterfiend has joined #ruby
<NL3limin4t0r> bougyman: Your question is a bit unclear, but you can just `define_singleton_method do |keyword1:, keyword2: nil, **rest|`
rippa has joined #ruby
badf has joined #ruby
<badf> hi
<phaul> hi badf
<tsr> psprint: The closest authoritative link might be the `#description-6` id tag on this page: https://guides.rubygems.org/command-reference/#description-6
<badf> hii
<badf> your a fren
jtdowney has quit [Max SendQ exceeded]
<badf> a good and glorious fren
jtdowney has joined #ruby
<psprint> tsr: ok, I'm linking to the `gem environment' anchor
poontangmessiah has quit [Ping timeout: 245 seconds]
BH23 has quit [Ping timeout: 245 seconds]
emptyflask has quit [Quit: WeeChat 2.4]
hutch1 has quit [Ping timeout: 246 seconds]
mre- has quit [Ping timeout: 240 seconds]
mre- has joined #ruby
hiroaki has joined #ruby
badf has quit [Remote host closed the connection]
mre- has quit [Ping timeout: 258 seconds]
dbugger has joined #ruby
sputnik13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AndroUser has quit [Ping timeout: 240 seconds]
sputnik13 has joined #ruby
reyfi9e has quit [Remote host closed the connection]
queip has quit [Ping timeout: 245 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mre- has joined #ruby
banisterfiend has joined #ruby
queip has joined #ruby
mre- has quit [Ping timeout: 265 seconds]
etagwerker has joined #ruby
KeyJoo has joined #ruby
mre- has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
KeyJoo has quit [Client Quit]
donofrio has joined #ruby
chalkmonster has joined #ruby
sputnik13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sputnik13 has joined #ruby
reyfi9e has joined #ruby
mre- has quit [Ping timeout: 265 seconds]
suukim has joined #ruby
ramfjord has joined #ruby
mre- has joined #ruby
KeyJoo has joined #ruby
<Technodrome> Good day
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 258 seconds]
AJA4351 is now known as AJA4350
ravenous_ has joined #ruby
sputnik13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sputnik13 has joined #ruby
sputnik13 has quit [Client Quit]
sputnik13 has joined #ruby
KeyJoo has quit [Remote host closed the connection]
KeyJoo has joined #ruby
hutch1 has joined #ruby
alfiemax has joined #ruby
KeyJoo has quit [Ping timeout: 268 seconds]
ramfjord has quit [Ping timeout: 265 seconds]
ramfjord has joined #ruby
mre- has quit [Ping timeout: 265 seconds]
mre- has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
KeyJoo has joined #ruby
banisterfiend has quit [Client Quit]
mre- has quit [Ping timeout: 245 seconds]
cthulchu_ has quit []
Nicmavr has quit [Read error: Connection reset by peer]
AndroUser2 has joined #ruby
Nicmavr has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
involans has quit [Quit: involans]
alfiemax has quit [Remote host closed the connection]
mre- has joined #ruby
banisterfiend has joined #ruby
suukim has quit [Remote host closed the connection]
sauvin has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 240 seconds]
hutch1 has quit [Ping timeout: 245 seconds]
gix has joined #ruby
Guest37 has joined #ruby
<Guest37> god i hate the ruby language
<al2o3-cr> why? it's fun ;)
<Guest37> cos
<havenwood> Guest37: I disagree.
<havenwood> Guest37: I think you like the Ruby language more than you realize. The things you initially disliked are starting to seem reasonable now that you're becoming accustomed to a new way.
<Guest37> it just feels messy, the way global namespace is managed, the non existence of real modular imports
<Guest37> hi
<havenwood> Guest37: welcome
mre- has quit [Ping timeout: 240 seconds]
<havenwood> it's an interesting idea to improve Ruby namespaces with proper module imports but i haven't seen a viable proposal
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> it's a tradeoff with Ruby's object model namespacing
<havenwood> i've not had the lack of it be a practical barrier but i agree it's nice to have
tsr has quit [Quit: WeeChat 2.5]
<havenwood> i really like both Clojure and Elixir style imports
dinfuehr has quit [Ping timeout: 258 seconds]
Guest37 has quit [Ping timeout: 246 seconds]
dinfuehr has joined #ruby
GodFather has joined #ruby
nisstyre has joined #ruby
<nisstyre> Someone please explain why Ruby gives this error message instead of a syntax error: https://repl.it/repls/SuperbSeagreenChapter
<nisstyre> I just spent like 30 minutes trying to debug something like this
dumptruckman has quit [Quit: ZNC - http://znc.in]
<nisstyre> and it was all because of a stray comma, but I thought I was somehow using Forwardable wrong
<nisstyre> it blows my mind that it will accept that
banisterfiend has joined #ruby
banisterfiend has quit [Client Quit]
jenrzzz has joined #ruby
etagwerker has quit []
ropeney has joined #ruby
involans has joined #ruby
galaxie has quit [Remote host closed the connection]
ropeney_ has quit [Ping timeout: 268 seconds]
absolutejam has joined #ruby
mre- has joined #ruby
nisstyre has left #ruby ["WeeChat 2.5"]
yoshie902a has joined #ruby
<yoshie902a> This was cross posted in the RubyonRails room too.
<yoshie902a> Thank you everyone that has helped me in the past, I have learned a ton from everyone here on this IRC
<leftylink> too late for nisstyre? too bad, I was going to respond
<leftylink> is there no way to &. on unary negate??
mre- has quit [Ping timeout: 240 seconds]
<leftylink> &>> 5&.-@
<rubydoc> # => -5 (https://carc.in/#/r/7ld2)
<leftylink> oh
<leftylink> okay then
<al2o3-cr> yep, that works ;)
<leftylink> IRB just doesn't understand. thinks I haven't ended my expression
MrBismuth has quit [Read error: Connection reset by peer]
MrBismuth has joined #ruby
<leftylink> maybe I must report a bug if there isn't one already...
<leftylink> if you've made it clear that your expression has ended, then it's fine. like if you say `[5&.-@]`
<leftylink> or if I hit ctrl-D a few times, but that will also quit irb lol
phaul has quit [Quit: :wq]
phaul has joined #ruby
mre- has joined #ruby
phaul has quit [Client Quit]
phaul has joined #ruby
<al2o3-cr> leftylink: just wrap it in parens
ramfjord has joined #ruby
<al2o3-cr> oh, i see now what you're saying
phaul has quit [Client Quit]
tdy has joined #ruby
phaul has joined #ruby
phaul has quit [Client Quit]
phaul has joined #ruby
chalkmonster has joined #ruby
<havenwood> leftylink: this is actually fixed on master
<al2o3-cr> leftylink: but this works: 5&.!@
<havenwood> leftylink: it'll work come Christmas with Ruby 2.7
<havenwood> leftylink: even in irb ;)
<leftylink> I.... assume this means someone else ran into it and reported it
<al2o3-cr> ah, nice
<leftylink> should I be scared to know what that person was doing
<leftylink> such that they found it
<havenwood> in the meantime it works on nightly ruby! https://gist.github.com/havenwood/823382815cbdcfddadd798d4042023a8
<leftylink> like, who would use such a thing
schne1der has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
<al2o3-cr> i know, right ;)
<al2o3-cr> leftylink: you think it has something to with -/+ being both unary and binary operators?
<leftylink> probably. like, maybe it's expecting me to do something &.+@instance_var
<al2o3-cr> that's what i was thinking too
yoshie902a has joined #ruby
<yoshie902a> oops, baby issues, if someone posted and I did not see, I am sorry
<havenwood> leftylink: al2o3-cr: that reminds me, i should put on my resume that @chrisseaton titled me, "The human fuzzer." https://gitter.im/graalvm/truffleruby?at=5b980b19f3c26b08f6615a20
<havenwood> hehe
<havenwood> I should probably write more useful code and do less fiddling but I love fiddling.
fphilipe has joined #ruby
<al2o3-cr> hehe :P you new nick is havenfuzz ;)
rkofman has joined #ruby
<phaul> yoshie902a: nobody said anything related but you can always check the channel logs, see topic for where they are
<al2o3-cr> i don't really delve into truffleruby tbh
<yoshie902a> phaul: never knew there were logs,
<al2o3-cr> yoshie902a: check /title
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<yoshie902a> phaul: Thank you! I’ve always wanted to see logs, now I know where!
fphilipe has quit [Ping timeout: 246 seconds]
<al2o3-cr> not title, what is it?
<phaul> topic?
<al2o3-cr> phaul: ah, that's the one ;)
<phaul> :)
* havenwood tries to resist /offtopic ing the "topic" :P
<havenwood> I guess it's more on "topic."
dumptruckman has joined #ruby
alan_w has joined #ruby
<al2o3-cr> https://rubyprize.jp/ja/nominees_19.html nice little prize for the winner
<al2o3-cr> 1 million yen or ~£7.5k
KeyJoo has quit [Quit: KeyJoo]
<phaul> it's ok. very luxorious holiday, or a 4 year old second hand car..
rkofman has quit [Read error: Connection reset by peer]
<al2o3-cr> still a bonus ;)
rprimus has quit [Ping timeout: 246 seconds]
yoshie902a has quit [Quit: yoshie902a]
<al2o3-cr> someone thought a bomb had gone off when i dropped why wallet :P
<havenwood> al2o3-cr: some incredible work on that list!!
ravenous_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chalkmonster has quit [Quit: WeeChat 2.6]
<al2o3-cr> indeed!
yoshie902a has joined #ruby
rprimus has joined #ruby
Intelo has joined #ruby
<al2o3-cr> and thoroughly deserved
<phaul> no doubt.
<al2o3-cr> absolutlely
<phaul> what is "why wallet" though ? :)
alan_w has quit [Read error: Connection reset by peer]
<al2o3-cr> *my lol ;)
<phaul> hehe. I honestly tried to google what it might be for minutes ;)
ellcs has joined #ruby
<al2o3-cr> haha :P
<al2o3-cr> no, just me and my grammer/eyes ;)
<leftylink> eh
<leftylink> did it make a weird noise
<leftylink> I guess I wasn't sure whether it was a joke or if there was context i was missing
skryking has quit [Quit: Konversation terminated!]
<al2o3-cr> yeah, it was too heavy :)
<al2o3-cr> it's was a joke, it's generally empty
x77686d has joined #ruby
<yoshie902a> trying to stub methods for delegation testing
howdoi has quit [Quit: Connection closed for inactivity]
chalkmonster has joined #ruby
<al2o3-cr> &>> require 'fiddle/import'; K = Class.new; B = Fiddle::Importer.struct(['uintptr_t flags']); B.new(Fiddle::Pointer[Fiddle.dlwrap K]).flags |= 4096; K.singleton_class?
<rubydoc> # => true (https://carc.in/#/r/7ldg)
alan_w has joined #ruby
<phaul> yoshie902a: the problem is that you post some failure from some large project, where the problem could be in many places, you post the test code, but not the code being tested, it's hard for us to say anything useful. To help ppl trying to help you, you usually want to produce a minimal verifyable example.
<yoshie902a> phaul: I thought I did post minmal verifyable example
queip has quit [Ping timeout: 250 seconds]
<yoshie902a> I had the module method, and the the example class is in the test
<yoshie902a> what am I missing
<yoshie902a> I thought the issue is the way I wrote my stub
<yoshie902a> spy
<phaul> it is possible I read it wrong. apologies then
<yoshie902a> I could be missing something, if so, please let me know
involans has quit [Quit: involans]
alan_w has quit [Quit: WeeChat 2.4]
queip has joined #ruby
rcvu has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
<yoshie902a> Is there a way to create an rspec fiddle?
<yoshie902a> I could maybe post a working example?
<phaul> there is require 'rspec/autorun' where you can place the spec and the code in a single file..
chalkmonster has joined #ruby
<yoshie902a> Really just tring to figure out why my stubs are not being called
xco has joined #ruby
<xco> which version of Ruby introduced this?
<xco> s = "F48883"
<xco> s[1..] => "48883"
<xco> ?
<xco> I can’t do it in Ruby 2.5.3 and i’d like to upgrade to that version of Ruby that can do that
<xco> i forgot :p
<al2o3-cr> xco: since the day of dawn.
<havenwood> xco: Rubby 2.6.
<xco> awesome!
<al2o3-cr> xco: in 2.7 you can do s[..8]
BH23 has joined #ruby
<havenwood> xco: that's an article i wrote about it back in the day
<xco> al2o3-cr: 😱
<xco> havenwood: thanks!!
lxsameer has quit [Ping timeout: 240 seconds]
<xco> havenwood: what’s the sexiest way to achieve that in Ruby 2.5.3?
<havenwood> xco: s[1..-1]
<xco> shit… ugly :D
<xco> thanks
<al2o3-cr> xco: what is that unicode? i need a better font :P
<xco> al2o3-cr: are you referring to the emoji i posted?
<al2o3-cr> yup
jenrzzz has quit [Ping timeout: 265 seconds]
<al2o3-cr> ah, face screaming in fear lol
grilix has quit [Ping timeout: 240 seconds]
<xco> yup
AndroUser2 has quit [Ping timeout: 245 seconds]
<al2o3-cr> recommendations for a decent font
<al2o3-cr> i use terminus at the mo
jenrzzz has joined #ruby
jacksoow_ has quit [Ping timeout: 240 seconds]
<yoshie902a> phaul: updated, take a look,
<xco> al2o3-cr: i use Consoalas in my terminal and Fira Code in Sublime Text
<xco> Consolas*
<al2o3-cr> xco: osx?
<xco> yeap
jacksoow has joined #ruby
<al2o3-cr> ah, it's in the aur ;)
Ven`` has joined #ruby
banisterfiend has joined #ruby
<al2o3-cr> xco: try again
<xco> al2o3-cr: im’ lost :)
<xco> try what again?
<al2o3-cr> unicode
<xco> 😅
<xco> 😱
sputnik13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> nope, oh well, it was worth a try. i'll keep searching.
alan_w has joined #ruby
<al2o3-cr> nice font though
<xco> those font i gave are not the ones i’m using in IRC :D
<xco> ah shoot!
<xco> for IRC I’m using FIra Code
ur5us has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> it's not as though that glyph is uncommon
GodFather has quit [Ping timeout: 264 seconds]
<phaul> yoshie902a: why do you allow the :user and :listing messages on the TestClass to be received as opposed to the instance of the test class?
dbugger has quit [Quit: Leaving]
<phaul> (pointed by test)
<yoshie902a> oh, that’s probably it
<yoshie902a> how do you do that?
<phaul> allow(test).to receive ...
<al2o3-cr> xco: i'm using fira now, last time ;)
<xco> 🤞🏾
<yoshie902a> trying this .. allow_any_instance_of
<yoshie902a> phaul: you solved it I think! thank you
<al2o3-cr> hang on, hang on i think i need rxvt-unicode
sputnik13 has joined #ruby
<xco> al2o3-cr: you’re on archlinux?
<phaul> yoshie902a: yw
<al2o3-cr> xco: yup
<yoshie902a> phaul: I wold prefer to create a spy(:example), which is a class model that does not exist
<yoshie902a> is there a way to do that?
<yoshie902a> when I try I get undefined local variable
banisterfiend has joined #ruby
<yoshie902a> oops, nevermind, typo, thank you!
sameerynho has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
<al2o3-cr> xco: thanks anyway
<xco> al2o3-cr: yw :)
spacesuitdiver has joined #ruby
BH23 has quit [Ping timeout: 265 seconds]
NL3limin4t0r is now known as NL3limin4t0r_afk
queip has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
queip has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
ellcs has quit [Ping timeout: 245 seconds]
sputnik13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs has joined #ruby
donofrio has quit [Ping timeout: 240 seconds]
sputnik13 has joined #ruby
Intelo has quit [Ping timeout: 276 seconds]
ec is now known as ELLIOTTCABLE
sputnik13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 265 seconds]
fphilipe has joined #ruby
alan_w has quit [Ping timeout: 265 seconds]
absolutejam has quit [Ping timeout: 268 seconds]
fphilipe has quit [Ping timeout: 246 seconds]
davidw_ has quit [Ping timeout: 276 seconds]
cthulchu_ has joined #ruby
x77686d has quit [Quit: x77686d]
dellavg has quit [Ping timeout: 276 seconds]
alan_w has joined #ruby
Fernando-Basso has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davidw_ has joined #ruby
psprint has left #ruby ["WeeChat 2.4"]
<xco> what’d be the easiest way to check if an array of strings has uniq element?
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiroaki has quit [Remote host closed the connection]
hiroaki has joined #ruby
AndroUser2 has joined #ruby
ellcs has quit [Ping timeout: 264 seconds]
<al2o3-cr> xco: uniq?
spacesuitdiver has quit [Ping timeout: 276 seconds]
<xco> al2o3-cr: yup. went for that
pawptart has joined #ruby
<phaul> i dont think the particularity of being strings helps. I would a.any? { |e| a.count(e) == 1 } first try
Ven`` has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
pawptart has quit [Client Quit]
mre- has quit [Ping timeout: 268 seconds]
alan_w has quit [Read error: Connection reset by peer]
eclm has joined #ruby
<al2o3-cr> &>> %w(foo bar baz foo).uniq { |blah| !blah }
<rubydoc> # => ["foo"] (https://carc.in/#/r/7le2)
<al2o3-cr> but, i'm not sure i properly understand what you need
x77686d has joined #ruby
queip has quit [Ping timeout: 265 seconds]
queip has joined #ruby
banisterfiend has joined #ruby
<al2o3-cr> xco: more context
gigetoo has quit [Ping timeout: 244 seconds]
<al2o3-cr> what strings do you have?
<al2o3-cr> what result do you want
gigetoo has joined #ruby
<xco> well i’m writing a validation in Rails and i want a validation to fail if any of 3 string attributes are the same
<xco> so say the model has a, b, c attributes
<yoshie902a> How do you stub an instance variable in rspec?
<xco> if ANY of a,b,c is the same, i want the validation to be called and an error raised
<al2o3-cr> xco: then use Array#any?
<xco> al2o3-cr: [“l”, “m”, “m”] how would that work on this?
vondruch has quit [Ping timeout: 265 seconds]
sputnik13 has joined #ruby
<xco> i thought of [“l”, “m”, “m”].uniq.size != [“l”, “m”, “m”].size
bitwinery has joined #ruby
eclm has quit [Ping timeout: 276 seconds]
reber has quit [Remote host closed the connection]
hutch1 has joined #ruby
<leftylink> `uniq.size != size` is the usual approach I would take. it is true that an approach using any? wold work, that roughly being `any? { |x| x_isnt_unique }`, with the implementation of `x_isnt_unique` left as an exercise to the reader. but actually it was sort of mentioned at 22:17 so shrug
<xco> leftylink: i may have missed that…. thankss
<leftylink> I think it would take O(n^2) time but if that is OK, then more power
<leftylink> s/it/the any? way/
AJA4351 has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
spacesuitdiver has joined #ruby
<al2o3-cr> xco: hasn't rails got a method for that?
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
Intelo has joined #ruby
hutch1 has quit [Ping timeout: 276 seconds]
xco has quit [Quit: xco]
<havenwood> lazy.each_cons(2).all? { |a, b| a == b }
<al2o3-cr> ActiveRecord::Base.validates_inclusion_of
<banisterfiend> hello friends of my heart
<havenwood> banisterfiend: hallooo
<banisterfiend> sup
<banisterfiend> disney+ has arrived!
<al2o3-cr> waaaassssssupppp!
<al2o3-cr> disney&.+@
<leftylink> from context, I think I should say - this `all?` lets us know if an array contains a single element repeated, but doesn't let us distinguish between %w(a b c) vs %w(a b a)
<havenwood> leftylink: I think i may have not ready the question. :O
<havenwood> leftylink: i thought any different but xco actually wrote any the same
r3m has quit [Quit: WeeChat 2.7-dev]
r3m has joined #ruby
* leftylink sweats about how to come up with an appropriate response
<al2o3-cr> shit happens when you're on bud light
<leftylink> uh.... "DeMorgan's laws strike again!!!" ?
sputnik13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sputnik13 has joined #ruby
gix has quit [Ping timeout: 265 seconds]
drincruz has quit [Ping timeout: 245 seconds]
Technodrome has quit [Ping timeout: 276 seconds]
schne1der has quit [Ping timeout: 265 seconds]
sameerynho has quit [Ping timeout: 265 seconds]
skyikot has joined #ruby
<havenwood> Would anyone here object to removal of cmath, mutex_m, scanf, shell, sync, thwait or tracer from the stdlib?
thebananaking has joined #ruby
<havenwood> Just getting rid of those 7 would get us to 46% of the stdlib (and make it easier to calculate since there would be 100 stdlib libraries left).
<al2o3-cr> i wouldn't object
<havenwood> I do like that: CMath.sqrt(-1) #=> (0+1.0i)
hutch1 has joined #ruby
<havenwood> i can't imagine really using Shell in prod. i just use it for fun.
<ccooke> Of those, the only one I've ever used is tracer, and that could happily be non stdlib.
<al2o3-cr> they're hardly ever used.
<ccooke> Indeed. Niche.
xco has joined #ruby
hutch1 has quit [Ping timeout: 246 seconds]
skyikot has quit [Ping timeout: 260 seconds]
poontangmessiah has joined #ruby
<al2o3-cr> havenwood: that nor gate though
<xco> al2o3-cr: mmm not sure about that, if there is i haven’t seen it before
<al2o3-cr> i don't do rails, but looking at the documentation it's sounds plausible
<xco> where are you looking? :)
<al2o3-cr> one sec
<al2o3-cr> havenwood: me and transistors
jenrzzz has quit [Ping timeout: 240 seconds]
<xco> ah i don’t. think that would work with what i’m looking for
jenrzzz has joined #ruby
<al2o3-cr> xco: have you asked in #rubyonrails
<xco> al2o3-cr: nope
<xco> but i will
<al2o3-cr> they might lead to the light :)
sputnik13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<xco> yeah i’ll try tomorrow after i wake up, too tired now
<al2o3-cr> np, get some beauty sleep :P
fphilipe has joined #ruby
<xco> 🤣
<al2o3-cr> still can't see it
<xco> too bad :(
<xco> i wonder if other can see it
<xco> or if it’s only you
<al2o3-cr> havenwood: how about un
<xco> otherwise it makes no sense me posting these emojis
<al2o3-cr> xco: it's just my setup.
<xco> ah ok
<al2o3-cr> relatively new
lucasb has quit [Quit: Connection closed for inactivity]
<al2o3-cr> i get thinkpads like napkins
AJA4351 has joined #ruby
fphilipe has quit [Ping timeout: 276 seconds]
<al2o3-cr> it takes some time to get arch up and running
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
murarisumit has quit [Ping timeout: 276 seconds]
Technodrome has joined #ruby