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!
s3nd1v0g1us has joined #ruby
mangold has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.4]
mangold has quit [Ping timeout: 240 seconds]
luminousnine- has joined #ruby
Guest142 has joined #ruby
blackjid has joined #ruby
Guest77895 has joined #ruby
gix has quit [Ping timeout: 246 seconds]
Ekho has quit [Quit: An alternate universe was just created where I didn't leave. But here, I left you. I'm sorry.]
spacesuitdiver has joined #ruby
s3nd1v0g1us has quit [Ping timeout: 252 seconds]
mangold has joined #ruby
s3nd1v0g1us has joined #ruby
spacesuitdiver has quit [Ping timeout: 255 seconds]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
t0xik has joined #ruby
Ekho has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
skryking has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
v01d4lph4 has joined #ruby
ellcs has quit [Ping timeout: 245 seconds]
v01d4lph4 has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
blackmesa has quit [Quit: WeeChat 2.4]
Swyper has quit [Remote host closed the connection]
v01d4lph4_ has joined #ruby
Swyper has joined #ruby
mangold has joined #ruby
Azure|dc has quit [Read error: Connection reset by peer]
Swyper_ has joined #ruby
Azure has joined #ruby
MeiQianChiFan has quit [Remote host closed the connection]
MeiQianChiFan has joined #ruby
v01d4lph4_ has quit [Ping timeout: 246 seconds]
Swyper has quit [Ping timeout: 255 seconds]
AJA4350 has quit [Remote host closed the connection]
Puffball has joined #ruby
GodFather has quit [Remote host closed the connection]
GodFather has joined #ruby
spacesuitdiver has joined #ruby
spacesuitdiver has quit [Client Quit]
luminousnine- has quit [Quit: Goodbye ~ Powered by LunarBNC]
spacesuitdiver has joined #ruby
ChrisBr has quit [Ping timeout: 246 seconds]
ChrisBr has joined #ruby
_habnabit has quit [Ping timeout: 246 seconds]
Jello_Raptor has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
_habnabit has joined #ruby
Jello_Raptor has joined #ruby
Emmanuel_Chanel has joined #ruby
luminousnine has joined #ruby
<SeepingN> ugh damnit. I'm trying to find all Devices of a certain type. That type is referred to as Device.product, which is a lookup from another table. We want to match all part_numbers with a certain string in them. Device.where(:product =~ /IQ6/).last.product ...does not give me "IQ6". It seems the where filters out nothing and I can put almost any garbage in there and get back the full Device list
bmurt has joined #ruby
<havenwood> SeepingN: ActiveRecord?
<havenwood> SeepingN: Postgres?
<SeepingN> mysql
<SeepingN> er
<SeepingN> activerecord. mysql backend.
<SeepingN> .. the events table is in a separate database that I can't access, otherwise I'd be done with an SQL query :\
<SeepingN> Devices.product is defined simply as: PartNumber.product_for_part_num(part_num)
<havenwood> SeepingN: How about?: Device.where('product LIKE %IQ6%').last
<SeepingN> Unknown column 'product' in 'where clause': SELECT `devices`.* FROM `devices` WHERE (product LIKE '%IQ6%') ORDER BY `devices`.`id` DESC LIMIT 1
<SeepingN> from /enphase/enlighten/shared/bundle/ruby/2.2.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `_query'
<havenwood> SeepingN: Device.where("product LIKE '%?%'", product_id).last
Swyper_ has quit [Remote host closed the connection]
<SeepingN> it's unfortunately not a column of Device
<havenwood> SeepingN: What is it?
Swyper has joined #ruby
kevinburke has quit [Quit: Connection closed for inactivity]
<havenwood> SeepingN: How do you get a product, I don't follow. Have a code example showing how you call a product?
<SeepingN> it's defined in PartNumber as PartNumber.product_for_part_num(part_num)
<havenwood> SeepingN: Okay, so you have a `part_num`. What on Device corresponds to that?
<SeepingN> part_numbers is a table with id, part_num, product (the english desc of the product), and 2 unrelated columns
<havenwood> Let me back up. It seems you're trying to find a particular Device record given a part_num?
<havenwood> Showing a bit more code might give enough context.
<SeepingN> Device.part_num... but that part_num is a longer form. THe ones in the lookup table "part_numbers" are truncated to the first 9 characters... no subversions
<SeepingN> I want all devices marked as "IQ7" qhich may include "IQ7+" and "IQ7 vartiation 9482". ie: regex. or I could just list them all in the query aqnd do an "IN" equiv
<SeepingN> I have no code. I'm trying to start a query to build a data report
<SeepingN> I usually do this in SQL. Maybe I should try to get that to work and just pass a full query to the connection
<havenwood> SeepingN: My best guess, from what you've said, without seeing code is:
<havenwood> Device.find_each.find { |device| part_numbers.any? { |part_number| part_number.include? device.part_num } }
<SeepingN> hmmmm ok thanks
<havenwood> SeepingN: That would check Devices in batches of 1000, looking for a `device.part_num` that is a subset of one of the part_numbers Strings.
<SeepingN> well they'll all match. need to filter to a specifci substring
<SeepingN> every Device will have a matchin in that lookup table
<havenwood> SeepingN: Device.find_each.find { |device| device.part_num.include? specific_substring }
<SeepingN> but the substring is not from part_num, it's from the table "part_numbers", column "product".
<SeepingN> that's the part that's tripping me up
<SeepingN> but I think I can modify that last line to work
<SeepingN> I gotta head home, will be looking at this more later. thanks havenwood
eb0t_ has quit [Read error: Connection reset by peer]
eb0t_ has joined #ruby
SeepingN has quit [Ping timeout: 245 seconds]
millerti has quit [Ping timeout: 255 seconds]
Onwarion_re has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
Onwarion has quit [Ping timeout: 240 seconds]
ivanskie has joined #ruby
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fluxAeon has joined #ruby
ivanskie has joined #ruby
nahra has joined #ruby
sidepocket has joined #ruby
MeiQianChiFan has quit [Changing host]
MeiQianChiFan has joined #ruby
mangold has joined #ruby
mangold has quit [Client Quit]
mangold has joined #ruby
s3nd1v0g1us has quit [Ping timeout: 252 seconds]
awkwords has joined #ruby
bambanx has joined #ruby
bambanx has quit [Max SendQ exceeded]
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Puffball_ has joined #ruby
Puffball_ has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
Averna has quit [Remote host closed the connection]
ivanskie has quit [Quit: Textual IRC Client: www.textualapp.com]
Swyper has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bambanx has joined #ruby
braincrash has quit [Quit: bye bye]
govg has joined #ruby
TvL2386 has quit [Ping timeout: 250 seconds]
x77686d has joined #ruby
braincrash has joined #ruby
TvL2386 has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us_ has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us_ has quit [Ping timeout: 245 seconds]
x77686d has quit [Quit: x77686d]
dante has quit [*.net *.split]
DTZUZU has quit [*.net *.split]
DarthGandalf has quit [*.net *.split]
ujjain has quit [*.net *.split]
badeball has quit [*.net *.split]
MuffinPimp has quit [*.net *.split]
ghormoon has quit [*.net *.split]
Zarthus has quit [*.net *.split]
tekk has quit [*.net *.split]
\13k has quit [*.net *.split]
havenwood has quit [*.net *.split]
trif has quit [*.net *.split]
JanMrlth has quit [*.net *.split]
Flonk has quit [*.net *.split]
tris has quit [*.net *.split]
comstar has quit [*.net *.split]
balo has quit [*.net *.split]
baweaver has quit [*.net *.split]
lambarena has quit [*.net *.split]
kenichi has quit [*.net *.split]
Soulcutter has quit [*.net *.split]
zeamp has quit [*.net *.split]
notZarthus has quit [*.net *.split]
shadeslayer has quit [*.net *.split]
universa1 has quit [*.net *.split]
TheBrayn has quit [*.net *.split]
daemonwrangler has quit [*.net *.split]
bhaak has quit [*.net *.split]
justinmcp has quit [*.net *.split]
Fire-Dragon-DoL has quit [*.net *.split]
Liothen has quit [*.net *.split]
Nirvash has quit [*.net *.split]
mangold has quit [Quit: This computer has gone to sleep]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
cyberarm has quit [Ping timeout: 255 seconds]
v01d4lph4 has joined #ruby
axsuul has quit [Ping timeout: 255 seconds]
cyberarm has joined #ruby
axsuul has joined #ruby
v01d4lph4_ has joined #ruby
v01d4lph4 has quit [Ping timeout: 240 seconds]
v01d4lph4 has joined #ruby
v01d4lph4_ has quit [Ping timeout: 255 seconds]
MeiQianChiFan is now known as glibc
v01d4lph4_ has joined #ruby
v01d4lph4 has quit [Ping timeout: 252 seconds]
DTZUZO has joined #ruby
dellavg__ has joined #ruby
v01d4lph4 has joined #ruby
dante has joined #ruby
ujjain has joined #ruby
DTZUZU has joined #ruby
DarthGandalf has joined #ruby
badeball has joined #ruby
trif has joined #ruby
MuffinPimp has joined #ruby
universa1 has joined #ruby
JanMrlth has joined #ruby
havenwood has joined #ruby
Zarthus has joined #ruby
ghormoon has joined #ruby
TheBrayn has joined #ruby
comstar has joined #ruby
Flonk has joined #ruby
\13k has joined #ruby
tekk has joined #ruby
tris has joined #ruby
zeamp has joined #ruby
balo has joined #ruby
kenichi has joined #ruby
baweaver has joined #ruby
lambarena has joined #ruby
Soulcutter has joined #ruby
notZarthus has joined #ruby
Nirvash has joined #ruby
bhaak has joined #ruby
justinmcp has joined #ruby
Fire-Dragon-DoL has joined #ruby
daemonwrangler has joined #ruby
shadeslayer has joined #ruby
Liothen has joined #ruby
silent_freak has joined #ruby
silent_freak has quit [Remote host closed the connection]
v01d4lph4_ has quit [Ping timeout: 252 seconds]
jacksoow has quit [Ping timeout: 244 seconds]
v01d4lph4 has quit [Ping timeout: 252 seconds]
jacksoow has joined #ruby
spacesuitdiver has joined #ruby
spacesuitdiver has quit [Client Quit]
jane_booty_doe has joined #ruby
spacesuitdiver has joined #ruby
spacesuitdiver has quit [Client Quit]
sgen has quit [Ping timeout: 252 seconds]
mangold has joined #ruby
Swyper has quit [Remote host closed the connection]
jane_booty_doe has quit [Quit: The Lounge - https://thelounge.chat]
jane_booty_doe has joined #ruby
Inline has quit [Quit: Leaving]
v01d4lph4 has joined #ruby
sgen has joined #ruby
SeepingN has joined #ruby
Swyper has joined #ruby
Swyper has quit [Ping timeout: 240 seconds]
sgen has quit [Ping timeout: 252 seconds]
chens has joined #ruby
DTZUZO has quit [Ping timeout: 250 seconds]
sgen has joined #ruby
chens has quit [Remote host closed the connection]
DTZUZO has joined #ruby
Swyper has joined #ruby
spacesuitdiver has joined #ruby
reber has joined #ruby
v01d4lph4 has quit [Quit: My mac has gone to sleep z_z]
Swyper has quit [Remote host closed the connection]
awkwords has quit [Ping timeout: 240 seconds]
Swyper has joined #ruby
conta has joined #ruby
spacesuitdiver has quit [Ping timeout: 246 seconds]
mangold has quit [Quit: This computer has gone to sleep]
v01d4lph4 has joined #ruby
clemens3 has quit [Ping timeout: 244 seconds]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
mangold has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
renich has joined #ruby
bambanx has quit [Quit: Leaving]
bambanx has joined #ruby
bambanx has quit [Client Quit]
aupadhye has joined #ruby
t0xik has quit [Quit: Connection closed for inactivity]
TheBloke has quit [Ping timeout: 252 seconds]
TheBloke has joined #ruby
clemens3 has joined #ruby
glibc has quit [Remote host closed the connection]
imadper has joined #ruby
imadper is now known as Qiong
ur5us has joined #ruby
aufi has joined #ruby
renich has quit [Quit: renich]
hcshcshcshcshcs has joined #ruby
spacesuitdiver has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
clemens3 has quit [Ping timeout: 244 seconds]
spacesuitdiver has quit [Ping timeout: 240 seconds]
SeepingN has quit [Ping timeout: 245 seconds]
t0xik has joined #ruby
mtkd has joined #ruby
clemens3 has joined #ruby
teclator has joined #ruby
laaron- has quit [Remote host closed the connection]
fluxAeon has quit [Ping timeout: 250 seconds]
jane_booty_doe has quit [Quit: The Lounge - https://thelounge.chat]
fluxAeon has joined #ruby
jane_booty_doe has joined #ruby
jane_booty_doe has quit [Client Quit]
jane_booty_doe has joined #ruby
eightfold has joined #ruby
mangold has joined #ruby
jane_booty_doe has quit [Client Quit]
jane_booty_doe has joined #ruby
lxsameer has joined #ruby
postmodern has quit [Quit: Leaving]
Tuor has joined #ruby
<Tuor> hi, when should I use double quotes and when should I use single quotes for strings?
planigan has quit [Ping timeout: 245 seconds]
mtkd has quit []
alem0lars has joined #ruby
renich has joined #ruby
laaron has joined #ruby
<al2o3-cr> Tuor: use double quotes for interpolation and single quotes for everything else.
<al2o3-cr> thats my motto anyway.
<Tuor> ok thx.
<al2o3-cr> np
<ljarvis> use double quotes everywhere
<al2o3-cr> nah
<ljarvis> ya
mtkd has joined #ruby
<tbuehlmann> nah
xrexeon has joined #ruby
<Tuor> It seems no general rule all agree on. But is my assumption right, single quotes are performing better?
<tbuehlmann> it's a micro optimization not worth talking about. so, "no", they do not perform better
<al2o3-cr> slightly, if any.
<Tuor> hmm ok. thx!
mtkd has quit []
cnsvc_ has quit [Ping timeout: 256 seconds]
Sembei has quit [Ping timeout: 255 seconds]
MyMind has joined #ruby
mtkd has joined #ruby
laaron has quit [Remote host closed the connection]
hightower3 has quit [Ping timeout: 255 seconds]
<ljarvis> :)
ur5us has quit [Remote host closed the connection]
<ljarvis> use double quotes everywhere and don't worry about it
ur5us has joined #ruby
laaron has joined #ruby
hightower3 has joined #ruby
ur5us has quit [Ping timeout: 252 seconds]
marcoecc has joined #ruby
gloscombe has joined #ruby
alem0lars has quit [Remote host closed the connection]
<tbuehlmann> I can see that tweet, mister
<ljarvis> :D
gloscombe has quit [Remote host closed the connection]
alem0lars has joined #ruby
gloscombe has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
hightower3 has quit [Changing host]
hightower3 has joined #ruby
gloscombe has quit [Remote host closed the connection]
gloscombe has joined #ruby
marcoecc has quit [Ping timeout: 240 seconds]
alem0lars has quit [Ping timeout: 255 seconds]
mangold has joined #ruby
tdy has quit [Ping timeout: 245 seconds]
keden has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
alem0lars has joined #ruby
xrexeon has quit [Remote host closed the connection]
CrazyEddy has quit [Remote host closed the connection]
eb0t has joined #ruby
mangold has joined #ruby
_whitelogger has joined #ruby
angryrobot has quit [Read error: Connection reset by peer]
marcoecc has joined #ruby
ellcs has joined #ruby
marcoecc has quit [Remote host closed the connection]
marcoecc has joined #ruby
mtkd has quit []
beaky has quit [Read error: Connection reset by peer]
ferr has joined #ruby
mtkd has joined #ruby
beaky_ has joined #ruby
sgen has quit [Ping timeout: 252 seconds]
beaky_ is now known as beaky
sgen has joined #ruby
mtkd has quit []
j-amoah has joined #ruby
schleppel has joined #ruby
agent_white has quit [Quit: night]
ruby-lang254 has joined #ruby
<ruby-lang254> Hello
aqd has quit [Quit: Leaving]
<j-amoah> Hello
<j-amoah> Anyone online
<ljarvis> nope
<j-amoah> lol okay <ljarvis>
mtkd has joined #ruby
<j-amoah> So anyone working on any projects so far?
aqd has joined #ruby
Ai9zO5AP has joined #ruby
conta has quit [Ping timeout: 255 seconds]
mangold has quit [Quit: This computer has gone to sleep]
ruby-lang254 has quit [Ping timeout: 256 seconds]
marcoecc has quit [Ping timeout: 245 seconds]
marcoecc has joined #ruby
conta has joined #ruby
ldnunes has joined #ruby
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
sgen has quit [Ping timeout: 252 seconds]
ams__ has joined #ruby
face has joined #ruby
MyMind has quit [Ping timeout: 250 seconds]
AJA4350 has joined #ruby
TomyLobo has joined #ruby
bmurt has joined #ruby
bmurt has quit [Client Quit]
Qiong is now known as Qiong|AFK
mangold has joined #ruby
adac has joined #ruby
<adac> I somtimes get some DNS resove errors like this one: "Resolv::ResolvError no address for example.com"
tdy has joined #ruby
<adac> any ideas what might cause that?
<ljarvis> https://ruby-doc.org/stdlib-2.3.3/libdoc/resolv/rdoc/Resolv/ResolvError.html "Indicates a failure to resolve a name or address."
mtkd has quit []
themsay has joined #ruby
ubuntuisloved has joined #ruby
keden has quit [Ping timeout: 250 seconds]
tdy has quit [Ping timeout: 252 seconds]
<adac> ljarvis, I see yes. But is this always a underlying problem? INfrastructure/Network/DNS?
<ljarvis> adac: who knows? there's a *lot* of reasons an address might not resolve
keden has joined #ruby
<ljarvis> most of which are indistinguishable
<adac> ljarvis, yep I understand. Just trying to figure out on how I can debug this
<ljarvis> does the URL resolve in your browser?
<ljarvis> (assuming it's something you can view in a browser)
x77686d has joined #ruby
jane_booty_doe has quit [Remote host closed the connection]
jane_booty_doe has joined #ruby
mtkd has joined #ruby
jcalla has quit [Ping timeout: 252 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 252 seconds]
AJA4351 is now known as AJA4350
x77686d has quit [Quit: x77686d]
dubuc has joined #ruby
j-amoah_ has joined #ruby
j-amoah has quit [Ping timeout: 245 seconds]
Arkantos has joined #ruby
emilford has joined #ruby
lucasb has joined #ruby
keden has quit [Ping timeout: 255 seconds]
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
themsay has quit [Ping timeout: 246 seconds]
emilford has quit [Quit: Lost terminal]
za1b1tsu has joined #ruby
qual has joined #ruby
emilford has joined #ruby
keden has joined #ruby
t0xik has quit [Quit: Connection closed for inactivity]
keden has quit [Ping timeout: 240 seconds]
v01d4lph4 has quit [Remote host closed the connection]
keden has joined #ruby
kapil____ has joined #ruby
akem has quit [Quit: Leaving]
mtkd has quit []
ferr has quit [Quit: WeeChat 2.4]
kent\n has quit [Ping timeout: 250 seconds]
kent\n has joined #ruby
mtkd has joined #ruby
jcalla has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
clemens3 has quit [Read error: Connection reset by peer]
aqd has quit [Quit: Leaving]
aqd has joined #ruby
clemens3 has joined #ruby
alem0lars_ has joined #ruby
alem0lars has quit [Ping timeout: 268 seconds]
rippa has joined #ruby
Azure has quit [Remote host closed the connection]
Azure has joined #ruby
SeepingN has joined #ruby
<Tuor> Hi, is there ruby a option which passes a string as STDIN to a script? like ruby myscript --stdin '{"secret":"asdf"}'
Arkantos has joined #ruby
conta has quit [Ping timeout: 255 seconds]
awkwords has joined #ruby
awkwords has quit [Client Quit]
<TheBrayn> you don't have to do anything for that
<TheBrayn> just read ARGV
<TheBrayn> or use an option parser
gloscombe has quit [Ping timeout: 252 seconds]
<ellcs> echo "hi" | ruby puts_stdin.rb
<ellcs> content of puts_stdin.rb: puts $stdin.readline
qual has quit [Quit: Sleeping..]
gloscombe has joined #ruby
Rapture has joined #ruby
<TheBrayn> or “ruby puts_stdin.rb <<< 'hi'” if you are using recent versions of bash
conta has joined #ruby
<al2o3-cr> true, use herestrings.
makr8100 has quit [Quit: Konversation terminated!]
conta has quit [Client Quit]
<Tuor> I can't call the ruby binary with bash. It's called by my IDE RubyMine and RubyMine doesn't support redirection of STDIN... So I am looking for some other way. Right Now I use STDIN.reopen('/tmp/path.json') in the beginning of my ruby script, but I have to comment it out befor each git commit. That's not very nice.
jane_booty_doe has quit [Remote host closed the connection]
jane_booty_doe has joined #ruby
<ellcs> TheBrayn: why the hell does this work
<ellcs> ruby<<<"puts 'hi'"
<ellcs> i see that
<ellcs> i checked out your stuff, but wtf
<TheBrayn> why not?
<TheBrayn> ruby accepts code on stdin
qual has joined #ruby
<Riviera_> bash creates a temporary file with puts 'hi' as content, and then it opens ruby with that file as stdin; which ruby reads and executes.
qual has quit [Client Quit]
mtkd has quit []
gloscombe_ has joined #ruby
qual has joined #ruby
Inline has joined #ruby
gnufied has joined #ruby
qual has quit [Client Quit]
gloscombe has quit [Ping timeout: 255 seconds]
gloscombe_ is now known as gloscombe
polishdub has joined #ruby
eb0t_ has quit [Quit: WeeChat 2.3]
Swyper has joined #ruby
crankharder has joined #ruby
gloscombe has quit [Quit: gloscombe]
gloscombe has joined #ruby
AJA4350 has quit [Ping timeout: 255 seconds]
zapata_ has joined #ruby
zapata has quit [Ping timeout: 258 seconds]
zapata_ is now known as zapata
spacesuitdiver has joined #ruby
akem has joined #ruby
aufi has quit [Ping timeout: 246 seconds]
aupadhye has quit [Ping timeout: 252 seconds]
gregf_ has joined #ruby
<Tuor> How can I test if a passed object to a method is of a specific class?
Swyper has quit [Remote host closed the connection]
<al2o3-cr> Tuor: obj.is_a?
<ellcs> 1.is_a?(Integer)
<Tuor> let me try.
<Tuor> is working thx!
gloscombe_ has joined #ruby
gloscombe has quit [Ping timeout: 240 seconds]
gloscombe_ is now known as gloscombe
renich_ has joined #ruby
renich has quit [Ping timeout: 252 seconds]
renich_ is now known as renich
tdy has joined #ruby
j-amoah_ has quit [Quit: Konversation terminated!]
AJA4350 has joined #ruby
<ytti> Integer === 1 also
<ytti> but i guess less idiomatic?
* Tuor can't remember having see === befor.
<Tuor> s/see/seen/
<SeepingN> ==> flase
<al2o3-cr> &ri Object.=== Tuor
<rubydoc> Tuor: Found no entry that matches class Object class method ===
<al2o3-cr> &ri Module.=== Tuor
<rubydoc> Tuor: Found no entry that matches class Module class method ===
<al2o3-cr> &ri Module#=== Tuor
<SeepingN> sure it's equal. but is it realy REALLY equal?
<ytti> #is_a? is alias to #kind_of? which means that they'll also match to subclass
<ytti> if you want to be strict you want #instance_of?
<ytti> or Class#====
<ytti> i'm pinocchio
<SeepingN> heh
qual has joined #ruby
<SeepingN> entire_ruby_app ===== other_ruby_app ?
<Tuor> ^^
<Tuor> #is_a? and === seem both to be fine to me. :)
<ytti> [1] pry(main)> 1.is_a? Numeric
<ytti> => true
<ytti> [3] pry(main)> 1.instance_of? Numeric
<ytti> => false
<ytti> i thought === was intance_of?, but it looks like === is same as #is_a and #kind_of
<ytti> so matches to all subclasses too
qual has quit [Ping timeout: 245 seconds]
<Tuor> I like the #is_a? variation, in my opinion it's more readable.
Swyper has joined #ruby
<al2o3-cr> &>> [Integer < Numeric, Numeric > Integer]
<rubydoc> # => [true, true] (https://carc.in/#/r/6g1b)
bga57 has quit [Quit: Leaving.]
renich_ has joined #ruby
renich has quit [Ping timeout: 244 seconds]
Tuor has left #ruby ["Thx for all your help today! cu"]
eblip has joined #ruby
adac has quit [Ping timeout: 240 seconds]
agent_white has joined #ruby
Swyper has quit [Remote host closed the connection]
bga57 has joined #ruby
Swyper has joined #ruby
Swyper_ has joined #ruby
Swyper has quit [Read error: Connection reset by peer]
mangold has quit [Quit: This computer has gone to sleep]
jcarl43 has joined #ruby
Swyper_ has quit [Remote host closed the connection]
cisco has joined #ruby
Swyper has joined #ruby
RedSnarf has joined #ruby
darix has quit [Quit: may the packets be with you...]
darix has joined #ruby
marcoecc has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Quit: Leaving]
Swyper has quit [Remote host closed the connection]
keden has quit [Ping timeout: 252 seconds]
szulak_ has joined #ruby
Emmanuel_Chanel has joined #ruby
szulak_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
[Butch] has joined #ruby
dviola has joined #ruby
lxsameer has quit [Quit: out]
eb0t is now known as sherlock-holmes
sherlock-holmes is now known as eb0t
bga57 has quit [Remote host closed the connection]
cnsvc_ has joined #ruby
ubuntuisloved has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
saysjonathan has quit [Quit: Lost terminal]
sgen has joined #ruby
saysjonathan has joined #ruby
bga57 has joined #ruby
planigan has joined #ruby
Swyper has joined #ruby
cisco has quit [Quit: leaving]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
sagax has quit [Quit: Konversation terminated!]
sagax has joined #ruby
sagax has quit [Client Quit]
sagax has joined #ruby
szulak_ has joined #ruby
alem0lars_ has quit [Ping timeout: 255 seconds]
hightower3 has quit [Ping timeout: 252 seconds]
szulak_ has quit [Quit: Textual IRC Client: www.textualapp.com]
hightower3 has joined #ruby
hightower3 has quit [Ping timeout: 252 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4351 is now known as AJA4350
Arkantos has quit [Quit: Textual IRC Client: www.textualapp.com]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
tdy has quit [Ping timeout: 252 seconds]
gloscombe has quit [Quit: gloscombe]
qual has joined #ruby
<baweaver> === is fun
qual has quit [Ping timeout: 244 seconds]
Swyper has quit [Remote host closed the connection]
gray_-_wolf has joined #ruby
sgen has quit [Ping timeout: 252 seconds]
RedSnarf has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
DTZUZO has quit [Ping timeout: 268 seconds]
za1b1tsu has quit [Ping timeout: 255 seconds]
gray_-_wolf has quit [Quit: WeeChat 2.3]
<al2o3-cr> nuf si ===
SeepingN has quit [Quit: The system is going down for reboot NOW!]
sameerynho has joined #ruby
hiroaki_ has joined #ruby
Swyper has joined #ruby
za1b1tsu has joined #ruby
sauvin has quit [Ping timeout: 240 seconds]
ubuntuisloved has joined #ruby
gix has joined #ruby
adac has joined #ruby
keden has joined #ruby
clemens3 has quit [Ping timeout: 252 seconds]
ravenousmoose has joined #ruby
conta has joined #ruby
zachk has joined #ruby
conta has quit [Ping timeout: 240 seconds]
<al2o3-cr> &>> "p""i""z""z""a"
<rubydoc> # => "pizza" (https://carc.in/#/r/6g1x)
<phaul> ?pizza
<ruby[bot]> here's your pizza: 🍕
<al2o3-cr> thanks :)
tdy has joined #ruby
<phaul> yw :)
eightfold has quit [Quit: eightfold]
ubuntuisloved has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ubuntuisloved has joined #ruby
rafadc has joined #ruby
<al2o3-cr> oops, ljarvis is spewing now ;)
code_zombie has joined #ruby
<al2o3-cr> &>> [%("p""i""z""z""a"), %('p''i''z''z''a')]
<rubydoc> # => ["\"p\"\"i\"\"z\"\"z\"\"a\"", "'p''i''z''z''a'"] (https://carc.in/#/r/6g20)
tdy has quit [Ping timeout: 240 seconds]
qual has joined #ruby
<havenwood> &>> require 'matrix'; puts 29.upto(32).map { |n| (Matrix[[0, 1], [1, 1]] ** n.pred)[1, 1] % n.pred + 140 }.tap { |a| a[-1] += 99 }.reverse.pack('C*').force_encoding('utf-8')
<rubydoc> # => 🍕 (https://carc.in/#/r/6g22)
<al2o3-cr> havenwood: beatiful, you work for dominos?
kapil____ has quit [Quit: Connection closed for inactivity]
<notZarthus> if you do pls give me discounts
qual has quit [Ping timeout: 245 seconds]
jane_booty_doe has quit [Quit: The Lounge - https://thelounge.chat]
jane_booty_doe has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<al2o3-cr> notZarthus: pi r squared
<al2o3-cr> havenwood: you is a magician :P
<havenwood> al2o3-cr: A domino isn't very far from a pizza!
<havenwood> &>> require 'matrix'; puts 29.upto(32).map { |n| (Matrix[[0, 1], [1, 1]] ** n.pred)[1, 1] % n.pred + 140 }.tap { |a| a[-1] += 99; a[1] -= 12 }.reverse.pack('C*').force_encoding('utf-8')
<rubydoc> # => 🁕 (https://carc.in/#/r/6g2f)
<al2o3-cr> havenwood: haha, awesome!
keden has quit [Ping timeout: 268 seconds]
<al2o3-cr> thats made my day!
tdy has joined #ruby
r29v has joined #ruby
ur5us has joined #ruby
SeepingN has joined #ruby
alem0lars has joined #ruby
alem0lars has quit [Max SendQ exceeded]
RyanMcCoskrie has joined #ruby
alem0lars has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4351 is now known as AJA4350
reber has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 250 seconds]
ravenousmoose has quit [Ping timeout: 252 seconds]
hahuang65 has quit [Quit: ZNC - https://znc.in]
r3dc0d3r has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby
<al2o3-cr> &>> "ß".downcase(:fold) # if this works i'll plait saw dust
<rubydoc> stderr: -e:2: invalid multibyte char (US-ASCII) (https://carc.in/#/r/6g2q)
hahuang65_ has joined #ruby
fnord__ has joined #ruby
dinfuehr_ has joined #ruby
dinfuehr has quit [Ping timeout: 250 seconds]
sleepingforest has joined #ruby
hahuang65 has quit [Ping timeout: 244 seconds]
adac has quit [Ping timeout: 268 seconds]
Rapture has joined #ruby
ldnunes has quit [Quit: Leaving]
ravenousmoose has joined #ruby
tdy has joined #ruby
hahuang65 has joined #ruby
ubuntuisloved has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> &>> "ß".force_encoding('utf-16').downcase(:fold)
<rubydoc> stderr: -e:2: invalid multibyte char (US-ASCII) (https://carc.in/#/r/6g34)
keden has joined #ruby
tdy1 has joined #ruby
hahuang65_ has quit [Ping timeout: 250 seconds]
Fernando-Basso has joined #ruby
sagax has quit [Read error: Connection reset by peer]
tdy has quit [Ping timeout: 245 seconds]
Swyper has quit [Remote host closed the connection]
<ljarvis> al2o3-cr: wat
<ljarvis> oh, the pizza thing?
<ljarvis> havenwood being all fancy
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
sgen has joined #ruby
<al2o3-cr> ljarvis: self using "" ~&&= begin FANCY ;)
* ljarvis vomits
<al2o3-cr> shit pizza?
<ljarvis> that's an oxymoron
RyanMcCoskrie has quit [Remote host closed the connection]
<al2o3-cr> i like that shit
zachk has quit [Changing host]
zachk has joined #ruby
r29v has quit [Quit: r29v]
<al2o3-cr> &>> !('' > "")
<rubydoc> # => true (https://carc.in/#/r/6g37)
<al2o3-cr> it must be true
alem0lars has quit [Ping timeout: 240 seconds]
BoomerBile has joined #ruby
tekniq_ has joined #ruby
<BoomerBile> https://pastebin.com/vgSQrpnQ <-- how can i find the cause of this segfault?
<ruby[bot]> BoomerBile: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<al2o3-cr> dig deep!
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 252 seconds]
AJA4351 is now known as AJA4350
sagax has joined #ruby
<BoomerBile> The same plugin runs outside the Xen environment just fine
<BoomerBile> even recompiled it fails in the Xen environment
gigetoo has quit [Ping timeout: 240 seconds]
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sleepingforest has left #ruby ["Leaving"]
<BoomerBile> al2o3-cr, if I knew how to dig at all i wouldn't be here asking....
gigetoo has joined #ruby
<BoomerBile> going to re-compile my updates, then ruby, then the plugin system, then the plugin, then if it doesn't work ruby is no longer for me... 5 years of nothing but headache's every update
<BoomerBile> time to switch to lua
Swyper has joined #ruby
<al2o3-cr> BoomerBile: so everytime it's been a foot print?
<BoomerBile> unsure what you're asking
polishdub has quit [Remote host closed the connection]
<al2o3-cr> BoomerBile: a head ACHE
<BoomerBile> some kind of joke/pun i'm assuming
jcalla has quit [Remote host closed the connection]
<al2o3-cr> well, 5 yrs must be ...
<BoomerBile> probably longer actually
<BoomerBile> the project is near 17 years old
<al2o3-cr> BoomerBile: whats the project?
<Xeago> anyone seen apeiros recently?
<BoomerBile> unimportant
<al2o3-cr> why so?
<BoomerBile> the problem is that ruby says i've encountered a ruby bug
<BoomerBile> i don't want to file a bug because i've had this issue before with ruby
<BoomerBile> and it wasn't a ruby bug
<BoomerBile> I want to find out who's code is at fault cause irb loads my code fine
<BoomerBile> and executes it
<BoomerBile> so, is it a ruby bug this time? or third party?
<BoomerBile> or environment
<al2o3-cr> BoomerBile: who knows?
<BoomerBile> you're not being productive
<BoomerBile> if you don't know, stop scrolling the question
<al2o3-cr> BoomerBile: neither are you!
hightower2 has joined #ruby
<al2o3-cr> BoomerBile: you've come in here blasting
hightower2 has quit [Changing host]
hightower2 has joined #ruby
<BoomerBile> no I didn't
<BoomerBile> I came in here with a question
BoomerBile has left #ruby ["Shoves everyone out of the way."]
<al2o3-cr> baweaver: did
za1b1tsu has quit [Remote host closed the connection]
r29v has joined #ruby
xrexeon has joined #ruby
dviola has quit [Quit: WeeChat 2.4]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 250 seconds]
AJA4351 is now known as AJA4350
<baweaver> hm?
r29v has quit [Quit: r29v]
zapata has quit [Ping timeout: 258 seconds]
* baweaver reads back
<baweaver> What's `nwserver` doing BoomerBile?
<baweaver> Left I guess.
<baweaver> al2o3-cr: Doesn't really read like bashing, just annoyance at something breaking.
orbyt_ has joined #ruby
<al2o3-cr> baweaver: my fault, yet again
r29v has joined #ruby
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
conta has joined #ruby
schleppel has quit [Quit: Konversation terminated!]
tdy1 has quit [Remote host closed the connection]
ravenousmoose has joined #ruby
conta has quit [Ping timeout: 252 seconds]
anjen has joined #ruby
tag has joined #ruby
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anjen has quit [Client Quit]
cyberarm has quit [Ping timeout: 252 seconds]
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
cyberarm has joined #ruby
Ai9zO5AP has quit [Quit: WeeChat 2.4]
sameerynho has quit [Ping timeout: 245 seconds]
Fernando-Basso has quit [Remote host closed the connection]
hightower2 has quit [Ping timeout: 252 seconds]
AJA4350 has quit [Ping timeout: 255 seconds]
spacesuitdiver has quit [Ping timeout: 255 seconds]
r29v has quit [Quit: r29v]
cnsvc_ has quit [Remote host closed the connection]
keden has quit [Ping timeout: 245 seconds]
AJA4350 has joined #ruby
tekniq_ has quit [Ping timeout: 245 seconds]
llua has joined #ruby
themsay has joined #ruby
zapata has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
r29v has joined #ruby
bjpenn has joined #ruby
cjkinni has joined #ruby
<bjpenn> hey guys, i want to use a ruby heredoc for a string that contains a literal "\". Lets say "myvar" is set to "foobar". I want my heredoc to be "foobar \". If i want to create a heredoc that contains "#{myvar} \", but have it process the value of "myvar" how do i do it?
<bjpenn> not sure if thats understandable :D
<leftylink> huh. I guess that is one thing that is not currently possible to do w/ &>>, demonstrate code containing a heredoc... guess it has to be &url then...
<mozzarella> bjpenn: you do it exactly like that
DeadPixelz01 has joined #ruby
DaRock has joined #ruby
<bjpenn> mozzarella: using the &>> like how leftylink pointed out?
<mozzarella> bjpenn: I think he was trying to use the bot
hightower2 has joined #ruby
<bjpenn> ohh
<mozzarella> heredocs in ruby use <<
<bjpenn> mozzarella: i mean how do i make it interpolate a string like #{myvar} but not interpolate the backslash
<bjpenn> i want the backslash to show up as a literal backslash
<bjpenn> whereas now , if i have <<~HEREDOC ..... HEREDOC , it will just disappear
<bjpenn> i guess one option is using double backslash
<bjpenn> but is there another way?
<mozzarella> I don't think so
<bjpenn> is there a way where i can make it do something like this?
<bjpenn> <<~HEREDOC.replace("\","\\") .... HEREDOC
<bjpenn> something like that?
<bjpenn> haah
<bjpenn> :D
<bjpenn> thats probably not legitimate syntax, but you get what im trying to do right?
<mozzarella> it actually is legitime syntax
spacesuitdiver has joined #ruby
<bjpenn> oh really?
<bjpenn> hah
<mozzarella> yeah but that won't do what you want
<bjpenn> ohh