havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://gist.github.com | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby
lxsameer has quit [Ping timeout: 264 seconds]
smithja has quit [Ping timeout: 240 seconds]
schneider has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
brad1 has joined #ruby
schneider has quit [Ping timeout: 240 seconds]
SeepingN has quit [Ping timeout: 245 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
schneider has joined #ruby
SeepingN has joined #ruby
workmad3 has joined #ruby
schneider has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
schneider has joined #ruby
BlopMonster has joined #ruby
nicht has joined #ruby
weird_error has quit [Quit: weird_error]
weird_error has joined #ruby
BlopMonster has quit [Ping timeout: 256 seconds]
schneider has quit [Ping timeout: 256 seconds]
jblack has joined #ruby
zachk has quit [Quit: Leaving]
<jblack> Hello! I have a hash that contains strings that are misencoded as ASCII-8BIT, that have an embedded utf8 character in it. I don't control the source of the hash, and it's bombing out on me when I attempt to convert the hash to json, due to an embedded utf8 characters.
brad1 has quit [Ping timeout: 248 seconds]
<apeiros> jblack: the strings are valid utf-8?
<jblack> The source object, probably esoteric to many here, is a Chef::Node object. I'm attempting to serialize the node object as json and save it on disk, but some of the node data, particularly the dumped process tree, has that utf8 in it.
schneider has joined #ruby
<jblack> I believe so, as its coming from the processes data for the node object
<apeiros> .force_encoding('utf-8') will change the encoding-flag
<jblack> I can do that on a hash?
<apeiros> no
lxsameer has joined #ruby
<apeiros> you'll have to do that on the individual strings
<apeiros> and if it's the keys, you'll actually even have to create a new hash, since Hash copies string keys.
<jblack> Meh, so basically, to_hash the obj, and walk the entire hash to force_utf8 every element?
ams__ has quit [Quit: Connection closed for inactivity]
<apeiros> yupp
<jblack> Ohhh, yeah, I don't even know if it's key or value.
* jblack mumbles and random wish for _to_h.close_enough.to_json =)
<apeiros> those things tend to be great recipes for disasters ;-)
<jblack> Well, you don't get to "hey, let's save the chef node to the local disk" in a place that has fear of disaster. :P
<jblack> I think what i might do is just to_hash the thing, and just strip out chunks of the hash that tend to be problematic
schneider has quit [Ping timeout: 256 seconds]
<apeiros> well, recursively mapping data isn't too difficult either
<jblack> I wonder if I can get out of it with just a node.attributes.to_s
<jblack> s/to_s/to_json
schneider has joined #ruby
vovs03 has joined #ruby
schneider has quit [Ping timeout: 256 seconds]
KeyJoo has quit [Read error: Connection reset by peer]
lxsameer has quit [Ping timeout: 264 seconds]
smithja has joined #ruby
<apeiros> jblack: just remember that you can't properly do {foo: val.to_json}.to_json
<apeiros> the json of val will be escaped and hence deserialize as a string
shinnya has joined #ruby
schneider has joined #ruby
vovs03 has quit [Remote host closed the connection]
wontruefree has joined #ruby
cagomez has joined #ruby
schneider has quit [Ping timeout: 268 seconds]
cthulchu has quit [Ping timeout: 240 seconds]
ogres has joined #ruby
cagomez has quit [Ping timeout: 264 seconds]
arooni has quit [Ping timeout: 265 seconds]
schneider has joined #ruby
phenom has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
wontruefree has quit [Quit: bye]
<baweaver> silly apeiros, then you just need a recursively repeated JSON.parse
* baweaver is joking, please don't actually do that
schneider has quit [Ping timeout: 264 seconds]
amatas has joined #ruby
<apeiros> you're not allowed to do that anyway. I've patented recursion.
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schneider has joined #ruby
karapetyan has joined #ruby
arooni has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
schneider has quit [Ping timeout: 265 seconds]
<baweaver> It's a recurring issue
dviola has quit [Quit: WeeChat 2.1]
lxsameer has joined #ruby
schneider has joined #ruby
Vivekananda has quit [Quit: Leaving]
schneider has quit [Ping timeout: 264 seconds]
lytol has quit [Remote host closed the connection]
schneider has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
<eam> how can you patent something like recursion? It's easy, first you patent recursion
schneider has quit [Ping timeout: 256 seconds]
amatas has quit [Quit: amatas]
schneider has joined #ruby
<apeiros> :D
safetypin has joined #ruby
safetypin has quit [Client Quit]
schneider has quit [Ping timeout: 248 seconds]
user03 has joined #ruby
schneider has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
schneider has quit [Ping timeout: 264 seconds]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
chat has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
chat_ has quit [Ping timeout: 248 seconds]
schneider has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
gizmore|2 has joined #ruby
lxsameer has joined #ruby
gizmore has quit [Ping timeout: 240 seconds]
roamingdog has quit [Ping timeout: 245 seconds]
schneider has quit [Ping timeout: 265 seconds]
schneider has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
lxsameer has joined #ruby
konsolebox has quit [Ping timeout: 255 seconds]
tvw has joined #ruby
schneider has quit [Ping timeout: 240 seconds]
subroot has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
schneider has joined #ruby
cadillac_ has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
schneider has quit [Ping timeout: 248 seconds]
cadillac_ has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
<ELLIOTTCABLE> man
<ELLIOTTCABLE> just remembered #RubyForce
<ELLIOTTCABLE> manveru: oiya! <3
schneider has joined #ruby
jenrzzz has joined #ruby
nicht has quit [Ping timeout: 256 seconds]
schneider has quit [Ping timeout: 264 seconds]
gizmore|2 has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 256 seconds]
schneider has joined #ruby
beefjoe has quit [Remote host closed the connection]
schneider has quit [Ping timeout: 276 seconds]
chat_ has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
chat has quit [Ping timeout: 240 seconds]
schneider has joined #ruby
chat has joined #ruby
chat_ has quit [Ping timeout: 256 seconds]
schneider has quit [Ping timeout: 264 seconds]
dogweather has quit [Remote host closed the connection]
schneider has joined #ruby
dogweather has joined #ruby
chat_ has joined #ruby
znz_jp has quit [Remote host closed the connection]
schneider has quit [Ping timeout: 245 seconds]
BloopMonster has joined #ruby
nicht has joined #ruby
rodd has quit [Quit: WeeChat 1.4]
chat has quit [Ping timeout: 268 seconds]
znz_jp has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
schneider has joined #ruby
Map has quit [Ping timeout: 255 seconds]
rodd has joined #ruby
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
BlopMonster has joined #ruby
lxsameer has joined #ruby
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #ruby
dogweather has joined #ruby
schneider has quit [Ping timeout: 245 seconds]
braincrash has quit [Quit: bye bye]
BlopMonster has quit [Ping timeout: 264 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix- has joined #ruby
gix has quit [Disconnected by services]
schneider has joined #ruby
noobineer has joined #ruby
braincrash has joined #ruby
akaiiro has quit [Ping timeout: 240 seconds]
lxsameer has quit [Ping timeout: 245 seconds]
akaiiro has joined #ruby
tdy has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
schneider has quit [Ping timeout: 240 seconds]
Map has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
dogweather has quit [Ping timeout: 245 seconds]
lxsameer has joined #ruby
schneider has joined #ruby
BloopMonster has quit [Ping timeout: 245 seconds]
tdy has joined #ruby
dogweather has joined #ruby
AJA4350 has quit [Quit: AJA4350]
lbracher has quit [Ping timeout: 240 seconds]
schneider has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 256 seconds]
lbracher has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
schneider has joined #ruby
schneider has quit [Ping timeout: 240 seconds]
schneider has joined #ruby
dogweather has quit [Ping timeout: 248 seconds]
sanscoeur has joined #ruby
amelliaa has joined #ruby
dendazen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
schneider has quit [Ping timeout: 264 seconds]
dogweather has joined #ruby
schneider has joined #ruby
noobineer has quit [Ping timeout: 245 seconds]
kapil___ has joined #ruby
millerti has quit [Ping timeout: 248 seconds]
dogweather has quit [Remote host closed the connection]
dogweather has joined #ruby
schneider has quit [Ping timeout: 264 seconds]
woodruffw has joined #ruby
woodruffw has joined #ruby
cthulchu has joined #ruby
schneider has joined #ruby
lxsameer has joined #ruby
cthulchu has quit [Ping timeout: 264 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schneider has quit [Ping timeout: 240 seconds]
schneider has joined #ruby
jamesaxl has quit [Ping timeout: 256 seconds]
jamesaxl has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
nicht has quit [Ping timeout: 245 seconds]
schneider has quit [Ping timeout: 248 seconds]
Asher has quit [Ping timeout: 256 seconds]
GodFather has quit [Ping timeout: 255 seconds]
schneider has joined #ruby
workmad3 has joined #ruby
donofrio has quit [Remote host closed the connection]
schneider has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
Asher has joined #ruby
SeepingN has joined #ruby
schneider has joined #ruby
schneider has quit [Ping timeout: 248 seconds]
jamesaxl has quit [Quit: WeeChat 2.1]
lightstalker has quit [Ping timeout: 260 seconds]
schneider has joined #ruby
lxsameer has joined #ruby
schneider has quit [Ping timeout: 245 seconds]
schneider has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
schneider has quit [Ping timeout: 260 seconds]
shah^ has quit [Ping timeout: 276 seconds]
shah^ has joined #ruby
shah^ has quit [Max SendQ exceeded]
shah^ has joined #ruby
shah^ has quit [Max SendQ exceeded]
schneider has joined #ruby
shah^ has joined #ruby
shah^ has quit [Max SendQ exceeded]
shah^ has joined #ruby
shah^ has quit [Max SendQ exceeded]
shah^ has joined #ruby
shah^ has quit [Max SendQ exceeded]
marianedinis has joined #ruby
lxsameer has joined #ruby
marianedinis is now known as Elwing
schneider has quit [Ping timeout: 256 seconds]
schneider has joined #ruby
<Elwing> Hi all, I'm new to Ruby/Rails and that is probably a simple mistake that I'm doing but I cannot figure out what I'm doing wrong. I need to iterate certain information from an object, but the view is giving an error that method id (and probably the others) are not defined for the array x, but in the class that defines the object I've made the accessors and the initialize/instantiation.
<Radar> Elwing: ?rubyonrails
<Elwing> yep
<Radar> ?rails
<ruby[bot]> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<Radar> Elwing: we have a different channel for Rails questions. Could you please move over to that one? I can help you there.
<Elwing> thanks Radar
BlopMonster has joined #ruby
schneider has quit [Ping timeout: 265 seconds]
lxsameer has quit [Ping timeout: 276 seconds]
BlopMonster has quit [Ping timeout: 248 seconds]
schneider has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bga57 has quit [Quit: Leaving.]
schneider has quit [Ping timeout: 256 seconds]
SeepingN has joined #ruby
<zenspider> I need to riff off someone who knows rspec... I'm trying to emulate shared_examples and... fuck there is too much magic to wrap my head around.
<zenspider> As I understand it... `it_behaves_like` can pass in extra args that go into the block for `shared_examlpes`.
<zenspider> (examples)
sauvin has joined #ruby
<zenspider> but... I was planning on making shared_examples store off a block that gets passed to Module.new or Class.new (haven't decided) so I have NO CLUE how those args can play into this
schneider has joined #ruby
DarkUnicorn has joined #ruby
Elwing has quit [Ping timeout: 265 seconds]
za1b1tsu has joined #ruby
amelliaa has quit [Quit: -]
schneider has quit [Ping timeout: 256 seconds]
<zenspider> something like:
<zenspider> shared = proc { |arg| let(:src) { arg }; it "blah" do expect(src).to eq 42 end }
<zenspider> but then I was hoping for something like: Class.new(superklass, &shared)
schneider has joined #ruby
<zenspider> but with shared being passed some arg. I don't think this is feasible
dionysus69 has joined #ruby
schneider has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
schneider has joined #ruby
<t0xik> >> 2.times do |f| print "#{f} " end
<ruby[bot]> t0xik: # => 0 1 2 (https://eval.in/1021741)
<zenspider> it's not doing what you think it is doing...
<zenspider> >> 2.times.map { |f| "#{f} " }
<ruby[bot]> zenspider: # => ["0 ", "1 "] (https://eval.in/1021742)
Inline has quit [Quit: Leaving]
<zenspider> fuck... how to create a class or module from a block but while binding that block's arg with a value?
lxsameer has quit [Ping timeout: 240 seconds]
<zenspider> I think I'm going about this the wrong way... but I REALLY want to avoid some of the nonsense that rspec does
lxsameer has joined #ruby
robin has joined #ruby
schneider has quit [Ping timeout: 240 seconds]
aupadhye has joined #ruby
<robin> I installed bundler and capistrano and they are available with "gem list" however as soon as I move into a capistrano project I have the gems dissapear.
<Radar> robin: do you have different Ruby versions installed?
<zenspider> Run `gem -v` both where you installed and inside of the cap project
<Radar> zenspider: that'll just show the gem version? It's probably an env issue, so wouldn't `gem env` be better?
<robin> Radar zenspider yea, different versions.
schneider has joined #ruby
<zenspider> it'll be different. ;)
<robin> zenspider Radar thanks guys :)
<zenspider> so, the easy fix, is to just reinstall while inside the cap project
<robin> zenspider: reinstall?
bga57 has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
<dminuoso> So zenspider, how has your FP experience been going? =)
<zenspider> install bundler and cap under the cap project. or just bundler and let it do its thing
schneider has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
<robin> zenspider: I see, thanks again.
blackmesa has joined #ruby
<zenspider> man do I utterly dislike rspec. way way way too much magic
<Radar> patches wel...
* Radar ducks the table
<zenspider> hopefully this bypasses that notion entirely
schneider has joined #ruby
<dminuoso> zenspider: Haha I know what you mean :)
blackmesa has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
TinkerT has quit [Read error: Connection reset by peer]
lxsameer has quit [Ping timeout: 265 seconds]
<zenspider> I just got shared_examples and it_behaves_like working... need inclrude_context and a couple other smaller things and I think this is wrapped up? ish
schneider has quit [Ping timeout: 276 seconds]
cyberg has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
<zenspider> instance_exec was the magic trick I needed. I get to specify the reciever, pass a block, AND pass an arg
TinkerT has joined #ruby
anisha has joined #ruby
cyberg has joined #ruby
schneider has joined #ruby
reber has joined #ruby
schneider has quit [Ping timeout: 276 seconds]
lxsameer has quit [Ping timeout: 264 seconds]
schneider has joined #ruby
roamingdog has joined #ruby
schneider has quit [Ping timeout: 276 seconds]
biberu has joined #ruby
schneider has joined #ruby
schneider has quit [Ping timeout: 276 seconds]
schneider has joined #ruby
dionysus69 has joined #ruby
schneider has quit [Ping timeout: 260 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
<robin> How can I change the gem version for capistrano?
<dminuoso> robin: Are you in a bundler project?
<robin> dminuoso: I'm using ansible and trying to install a gem and everytime there are different versions being assigned to capistrano and outsite of capistrano project
<dminuoso> robin: Are you on a server?
<dminuoso> Or your own local machine?
<robin> dminuoso: server
<robin> test server
<dminuoso> Why are you executing capistrano on the remote server?
<dminuoso> Or using capistrano at all when you have ansible already?
lxsameer has joined #ruby
<robin> dminuoso: becuase the guy before me setup capistrano and he liked the versioning for laravel.
schneider has joined #ruby
<robin> dminuoso: now I'm trying to create an aws image with packer and installing capistrano has been a nightmare
<dminuoso> Wait a second.
sameerynho has joined #ruby
<robin> dminuoso: yes
<dminuoso> So your friend was using capistrano locally to do something with laravel?
ogres has quit [Quit: Connection closed for inactivity]
<dminuoso> Oh you have a laravel project?
<robin> dminuoso: we use capistrano to deploy laravel.
<dminuoso> Ah I see
<robin> dminuoso: when I do whereis gem there are three versions on gem showing.
<dminuoso> robin: How do you invoke capistrano?
<dminuoso> robin: One thing Im wondering about, what do you want to use ruby-packer for?
lxsameer has quit [Ping timeout: 240 seconds]
<robin> dminuoso: I can't invoke it because everytime I install gems with ansible it changes version.
lxsameer has joined #ruby
<dminuoso> robin: The simplest "drop-in" solution I can think of is to just use bundler.
sysvalve has joined #ruby
<dminuoso> robin: Or use a local gemset
<dminuoso> Or stop using capistrano.
schneider has quit [Ping timeout: 264 seconds]
<dminuoso> Looking at the tasks it *does* have, Im not convinced its worth the hassle
<robin> dminuoso: I'm working on creating autoscaling with aws. So an image will be created where capistrano and bundler is installed from the beginning so the instance can just fetch from github repo and deploy
<dminuoso> robin: Is docker an option?
<dminuoso> robin: Doing this with a ruby-packer wrapped capistrano solution seems mindboggingly crazy
schneider has joined #ruby
<robin> dminuoso: what is ruby-packer? I'm using packer to pack an aws image
<robin> dminuoso: https://www.packer.io/
<dminuoso> Ah I misunderstood what you meant by packer then :)
woodruffw has quit [Ping timeout: 255 seconds]
<robin> dminuoso: I see :)
woodruffw has joined #ruby
woodruffw has joined #ruby
<robin> dminuoso: what is setting the gem version in capistrano?
sameerynho has quit [Ping timeout: 255 seconds]
<robin> dminuoso: the version inside the capistrano project is always different that the version outside
<dminuoso> robin: Like I said, if you use bundler or gemsets you can fix the immediate issue.
simmaniac has joined #ruby
<robin> dminuoso: I can't install bundler because it's always installing it with the wrong version of gem.
<robin> dminuoso: what is gemsets?
lxsameer has quit [Ping timeout: 260 seconds]
_aeris_ has quit [Read error: Connection reset by peer]
schneider has quit [Ping timeout: 255 seconds]
yohji has joined #ruby
<dminuoso> 08:55 robin | dminuoso: I can't install bundler because it's always installing it with the wrong version of gem.
<dminuoso> What do you mean by that?
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
sysvalve has quit [Ping timeout: 255 seconds]
dogweather has quit [Remote host closed the connection]
_aeris_ has joined #ruby
<robin> dminuoso: it's such a weird problem. So ansible is configuring an instance. Setting up rvm installing ruby 2.3.1 (which capistrano wants) and then installing gems capistrano and bundler.
<robin> dminuoso: if I check the version for gem inside of capistrano it is different from when I am in f.e home
<dminuoso> robin: what do you need ansible for?
<dminuoso> Just to run capistrano?
schneider has joined #ruby
<robin> dminuoso: I just want to setup everything before so I can just cap later
<robin> dminuoso: so I need capistrano to be ready to go.
dogweather has joined #ruby
<dminuoso> robin: Thats all you use ansible for?
<dminuoso> robin: Can you share your deploy.rb?
<robin> dminuoso: ansible is used to configure the image
<robin> dminuoso: then if autoscaling is needed the image is ready for deployment
schneider has quit [Ping timeout: 240 seconds]
Dabo has quit [Ping timeout: 240 seconds]
schneider has joined #ruby
VladGh_ has quit [Ping timeout: 256 seconds]
Dabo has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
Nussi has quit [Quit: WeeChat 2.1]
schneider has quit [Ping timeout: 256 seconds]
anisha has quit [Ping timeout: 256 seconds]
Eiam has quit [Ping timeout: 255 seconds]
dogweather has joined #ruby
schneider has joined #ruby
andikr has joined #ruby
mn3m has joined #ruby
schneider has quit [Ping timeout: 256 seconds]
anisha has joined #ruby
conta has joined #ruby
lxsameer has joined #ruby
dogweather has quit [Remote host closed the connection]
dogweather has joined #ruby
schneider has joined #ruby
zmo has quit [Ping timeout: 264 seconds]
<DarkUnicorn> robin: is the ruby installed by rvm the only ruby on the system? maybe the ruby from rvm and the ruby from the os are interfering
schneider has quit [Ping timeout: 264 seconds]
clemens31 has joined #ruby
<robin> DarkUnicorn: interesting, that might be right. I solved it by not using the gem module in ansible and just do it with command instead.
jnollette has quit [Remote host closed the connection]
cyberg has quit [Remote host closed the connection]
<robin> DarkUnicorn: ruby is already installed on the system and then I'm adding rvm and ruby 2.3.1.
jnollette has joined #ruby
<robin> DarkUnicorn: thanks.
schneider has joined #ruby
schneider has quit [Ping timeout: 256 seconds]
vondruch has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
schneider has joined #ruby
schneider has quit [Client Quit]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
Dabo has quit [Remote host closed the connection]
<manveru> ELLIOTTCABLE: *wave*
Burgestrand has joined #ruby
venmx has joined #ruby
mikecmpbll has joined #ruby
lxsameer has joined #ruby
krandi has joined #ruby
workmad3 has joined #ruby
yohji has quit [Ping timeout: 268 seconds]
andikr has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
deathwishdave has joined #ruby
zyh1a19 has joined #ruby
zyh1a19 has quit [Max SendQ exceeded]
zyh1a19 has joined #ruby
simmaniac is now known as sysvalve
yohji has joined #ruby
Zaab1t has joined #ruby
sanscoeu_ has joined #ruby
dogweather has quit [Remote host closed the connection]
sanscoeur has quit [Ping timeout: 265 seconds]
dogweather has joined #ruby
saTchymoto has joined #ruby
Dabo has joined #ruby
Dabo has joined #ruby
Dabo has quit [Changing host]
jamesaxl has joined #ruby
ShekharReddy has joined #ruby
schleppel has joined #ruby
VladGh has joined #ruby
mn3m has quit [Ping timeout: 256 seconds]
NL3limin4t0r has joined #ruby
mn3m has joined #ruby
alex`` has joined #ruby
chris349 has quit [Ping timeout: 256 seconds]
Beams has joined #ruby
workmad3 has joined #ruby
BlopMonster has joined #ruby
BlopMonster has quit [Ping timeout: 240 seconds]
Beams_ has joined #ruby
sysvalve has quit [Ping timeout: 255 seconds]
Beams has quit [Ping timeout: 256 seconds]
karapetyan has joined #ruby
sysvalve has joined #ruby
jamesaxl has quit [Ping timeout: 245 seconds]
jamesaxl has joined #ruby
karapetyan has quit [Ping timeout: 256 seconds]
lucifer-the-sata has joined #ruby
lucifer-the-sata has quit [Client Quit]
beilabs has joined #ruby
zyh1a19 has quit [Ping timeout: 260 seconds]
conta has quit [Quit: conta]
FernandoBasso has joined #ruby
<_aeris_> hello here !
<_aeris_> I try to implement certificate pinning with net/http, but have a problem with verify_callback
<_aeris_> i use a self-signed certificate, so i want to only use pining, and not CA validation, so I verify_mode = VERIFY_NON
<_aeris_> but in this case, seems the verify_callback is called, but result is discarded, if the key doesn't match and verify_callback = false, connection occurs…
zyh1a19 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
kapil___ has joined #ruby
vennr has joined #ruby
FernandoBasso has quit [Quit: Leaving]
yohji has quit [Ping timeout: 276 seconds]
Es0teric has joined #ruby
venmx has quit [Quit: leaving]
anisha has quit [Ping timeout: 260 seconds]
yohji has joined #ruby
venmx has joined #ruby
anisha has joined #ruby
KeyJoo has joined #ruby
KeyJoo has quit [Max SendQ exceeded]
KeyJoo has joined #ruby
\void has quit [Quit: So long, and thanks for all the fish.]
Romasyk has joined #ruby
Romasyk has quit [Client Quit]
deathwishdave has quit [Quit: Textual IRC Client: www.textualapp.com]
nOgAnOo_ has quit [Quit: Connection closed for inactivity]
howdoi has joined #ruby
tty has quit [Quit: tty]
alex`` has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
dogweather has quit [Remote host closed the connection]
blackmesa has joined #ruby
dogweather has joined #ruby
ShekharReddy has quit [Quit: Connection closed for inactivity]
user03 has quit [Ping timeout: 240 seconds]
Beams_ has quit [Quit: .]
jrafanie has joined #ruby
apparition has joined #ruby
cyberg has joined #ruby
ldnunes has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
ryzokuken has quit [Quit: The Lounge - https://thelounge.github.io]
dogweather has joined #ruby
dendazen has joined #ruby
Beams has joined #ruby
mtkd has quit []
alex`` has joined #ruby
yokel has quit [Ping timeout: 256 seconds]
mikecmpbll has quit [Ping timeout: 264 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mtkd has joined #ruby
fmcgeough has joined #ruby
yokel has joined #ruby
beilabs has quit [Remote host closed the connection]
AJA4350 has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
cagomez has joined #ruby
jrabe has quit [Quit: Disconnected]
jrabe has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
beilabs has joined #ruby
cagomez has quit [Ping timeout: 265 seconds]
anisha has joined #ruby
KeyJoo has quit [Remote host closed the connection]
dogweather has quit [Ping timeout: 248 seconds]
Burgestrand has quit [Quit: Closing time!]
jcalla has joined #ruby
synthroid has joined #ruby
dogweather has joined #ruby
KeyJoo has joined #ruby
alex`` has quit [Quit: WeeChat 2.1]
Burgestrand has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
Burgestrand has quit [Quit: Closing time!]
dogweather has joined #ruby
Burgestrand has joined #ruby
c0ncealed2 has quit [Remote host closed the connection]
c0ncealed2 has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
dogweather has quit [Ping timeout: 256 seconds]
jrafanie has joined #ruby
conta has joined #ruby
dogweather has joined #ruby
donofrio has joined #ruby
FernandoBasso has joined #ruby
Burgestrand has quit [Quit: Closing time!]
Demos[m] has joined #ruby
Puffball_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
conta has quit [Quit: conta]
ciscam has quit [Ping timeout: 256 seconds]
ciscam has joined #ruby
Puffball has quit [Ping timeout: 245 seconds]
Burgestrand has joined #ruby
bmurt has joined #ruby
t0xik has quit [Quit: Connection closed for inactivity]
beilabs has quit [Remote host closed the connection]
dogweather has quit [Ping timeout: 264 seconds]
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
Burgestrand has quit [Quit: Closing time!]
dogweather has joined #ruby
BlopMonster has joined #ruby
Burgestrand has joined #ruby
kapil___ has joined #ruby
BlopMonster has quit [Ping timeout: 245 seconds]
Asher has quit [Ping timeout: 245 seconds]
beilabs has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
beilabs_ has joined #ruby
Inline has joined #ruby
cyberg has quit [Ping timeout: 240 seconds]
dogweather has joined #ruby
beilabs has quit [Ping timeout: 248 seconds]
cyberg has joined #ruby
drale2k_ has joined #ruby
rippa has joined #ruby
zhujian0805 has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
shinnya has joined #ruby
BloopMonster has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
Burgestrand has quit [Quit: Closing time!]
GodFather has joined #ruby
KeyJoo has quit [Remote host closed the connection]
dogweather has joined #ruby
mjolnird has joined #ruby
Burgestrand has joined #ruby
zyh1a19 has quit [Quit: Leaving]
FernandoBasso has quit [Quit: Leaving]
Es0teric has quit [Quit: Computer has gone to sleep.]
RougeR has quit [Ping timeout: 260 seconds]
mtkd has quit []
dogweather has quit [Ping timeout: 240 seconds]
FernandoBasso has joined #ruby
mtkd has joined #ruby
dogweather has joined #ruby
mn3m has quit [Ping timeout: 260 seconds]
k0mpa has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mn3m has joined #ruby
beilabs_ has quit [Remote host closed the connection]
theRoUS has quit [Changing host]
theRoUS has joined #ruby
karapetyan has joined #ruby
Burgestrand has quit [Quit: Closing time!]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
saTchymoto has quit []
beilabs has joined #ruby
synthroid has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
beilabs has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
Asher has joined #ruby
synthroid has joined #ruby
dogweather has quit [Read error: Connection timed out]
mn3m has quit [Ping timeout: 260 seconds]
roamingdog has quit [Remote host closed the connection]
gizmore has joined #ruby
roamingdog has joined #ruby
Asher has quit [Ping timeout: 245 seconds]
dreamthese has quit [Read error: Connection reset by peer]
drale2k_ has joined #ruby
roamingdog has quit [Client Quit]
dreamthese has joined #ruby
FernandoBasso has quit [Quit: Leaving]
weird_error has quit [Quit: weird_error]
spiette has quit [Quit: ZNC 1.7.0 - https://znc.in]
Rapture has joined #ruby
spiette has joined #ruby
dogweather has joined #ruby
motstgo has joined #ruby
cadillac_ has quit [Ping timeout: 248 seconds]
beilabs has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
Mike11 has joined #ruby
mjolnird has quit [Quit: Leaving]
subroot has joined #ruby
cadillac_ has joined #ruby
aupadhye has quit [Ping timeout: 240 seconds]
dogweather has quit [Ping timeout: 256 seconds]
dogweather has joined #ruby
<darix> _aeris_: setting up your own little CA isnt so much work
biberu has quit []
chouhoulis has joined #ruby
^mtkd has joined #ruby
anisha has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
TomyWork has quit [Remote host closed the connection]
anisha has quit [Quit: This computer has gone to sleep]
dogweather has quit [Ping timeout: 240 seconds]
dogweather has joined #ruby
guille-moe has joined #ruby
conta has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
sanscoeu_ has quit [Remote host closed the connection]
^mtkd has quit []
dogweather has quit [Ping timeout: 256 seconds]
dogweather has joined #ruby
karapetyan has joined #ruby
mtkd has joined #ruby
karapetyan has quit [Ping timeout: 260 seconds]
amar_ has joined #ruby
dogweather has quit [Ping timeout: 268 seconds]
amar_ has quit [Read error: Connection reset by peer]
amar_ has joined #ruby
dogweather has joined #ruby
<havenwood> it's kinda a shame that a Fiber can't be resumed once it's transferred and been transferred back to
mtkd has quit []
amar_ has quit [Ping timeout: 240 seconds]
guille-moe has quit [Remote host closed the connection]
<konsolebox> time for Fiber2
guille-moe has joined #ruby
synthroid has quit [Remote host closed the connection]
biberu has joined #ruby
cagomez has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
BloopMonster has quit [Quit: WeeChat 1.9.1]
mtkd has joined #ruby
howdoi has joined #ruby
dogweather has quit [Ping timeout: 265 seconds]
dogweather has joined #ruby
biberu has quit [Ping timeout: 240 seconds]
Cthulu201 has quit [Quit: Nowhere special. I always wanted to go there.]
fmcgeough has quit [Ping timeout: 240 seconds]
BlopMonster has joined #ruby
fmcgeough has joined #ruby
mtkd has quit []
synthroid has joined #ruby
dogweather has quit [Ping timeout: 255 seconds]
Cthulu201 has joined #ruby
BlopMonster has quit [Ping timeout: 260 seconds]
conta has quit [Quit: conta]
dogweather has joined #ruby
mtkd has joined #ruby
sysvalve has quit [Quit: Leaving]
guille-moe has quit [Quit: guille-moe]
guille-moe has joined #ruby
r29v has joined #ruby
amar_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
amar_ has quit [Ping timeout: 245 seconds]
tdy has quit [Ping timeout: 268 seconds]
jcarl43 has joined #ruby
beilabs has quit [Remote host closed the connection]
vennr has quit [Ping timeout: 256 seconds]
karapetyan has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
dogweather has quit [Ping timeout: 256 seconds]
cthulchu has joined #ruby
beilabs has joined #ruby
Asher has joined #ruby
dogweather has joined #ruby
tvw has quit [Remote host closed the connection]
Dbugger has joined #ruby
sanscoeur has joined #ruby
shinnya has quit [Ping timeout: 245 seconds]
dionysus69 has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
dogweather has joined #ruby
wontruefree has joined #ruby
sanscoeur has quit [Remote host closed the connection]
BlopMonster has joined #ruby
Immune has joined #ruby
Immune has left #ruby [#ruby]
sanscoeur has joined #ruby
yohji has quit [Remote host closed the connection]
blackmesa has joined #ruby
wontruefree has quit [Quit: bye]
dogweather has quit [Ping timeout: 248 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
giuseppe_ has joined #ruby
<giuseppe_> hello everybody
^mtkd has joined #ruby
dionysus69 has joined #ruby
wontruefree has joined #ruby
dogweather has joined #ruby
brad1 has joined #ruby
mtkd has quit [Ping timeout: 245 seconds]
<cthulchu> hello ruuuuby!
blackmesa has quit [Ping timeout: 240 seconds]
<havenwood> >> alias g p; g'mornin'
<ruby[bot]> havenwood: # => "mornin" ...check link for more (https://eval.in/1022055)
<Zarthus> TIL you can have no spaces between that
[Butch] has joined #ruby
<Zarthus> honestly if there's any ruby developer who writes puts"thing" on a professional level i'd be slightly worried.
<havenwood> Zarthus: It's good to make sure your greetings double as valid Ruby!
guille-moe has quit [Ping timeout: 245 seconds]
<havenwood> Zarthus: puts"can'tbebotheredwithspaces"
<Zarthus> >> puts:sym
<ruby[bot]> Zarthus: # => sym ...check link for more (https://eval.in/1022056)
yokel has quit [Quit: leaving]
<Zarthus> Oh my.
blackmesa has joined #ruby
<Zarthus> we can start writing lua in here (I think that's lua syntax anyway)
<desnudopenguino> i'm hitting a pretty annoying brick wall currently, maybe you guys can help, still trying to get rbenv/ruby-build to install ruby on OpenBSD. https://gist.github.com/desnudopenguino/c050bec601d95ee7075e140ec973d278
<elomatreb> Evil thought: Minified Ruby
GodFather has quit [Ping timeout: 245 seconds]
giuseppe_ has quit [Quit: leaving]
<havenwood> If they add the .: syntax for send that matz is a fan of: p:p.:[],0 #=> "p"
BlopMonster has quit [Ping timeout: 265 seconds]
yokel has joined #ruby
<havenwood> >> p:p.send:[],0 # <- short for
<ruby[bot]> havenwood: # => "p" ...check link for more (https://eval.in/1022057)
<desnudopenguino> i'm running into issues with openssl, installed 1.0.2 from packages, and i'm trying to point it to the proper directory for the openssl includes, but for some reason it is defaulting to /usr/include/openssl, which contains LibreSSL files.
<havenwood> desnudopenguino: When you rebuild Ruby?
<konsolebox> desnudopenguino: maybe you can't do that. perhaps openssl is explicitly required
<konsolebox> you do seem to have openssl installed, but maybe it requires a newer version
Guest89529 has quit [Read error: Connection reset by peer]
synthroid has quit []
<desnudopenguino> konsolebox: i have a newer version of OpenSSL installed locally (1.0.2n) than i do on my FreeBSD box which has no issues (1.0.2k). the issue is that using the notes from https://github.com/rbenv/ruby-build/wiki#missing-openssl
yokel has quit [Ping timeout: 245 seconds]
<desnudopenguino> it isn't accepting the directory i'm giving it
krandi has quit [Remote host closed the connection]
Nicmavr has joined #ruby
<desnudopenguino> so it tries to build the same if i have `RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/include/eopenssl/openssl` included in the command or not
Nicmavr is now known as Guest28077
alex`` has joined #ruby
Beams has quit [Quit: .]
yokel has joined #ruby
jottr has joined #ruby
<konsolebox> desnudopenguino: shouldn't it be /usr/local ?
<konsolebox> also, why eopenssl?
<desnudopenguino> konsolebox: just '/usr/local'? eopenssl is what the official OpenSSL pkg is installed as on OpenBSD, (strange licensing things). LibreSSL comes with base in /usr/bin
chouhoulis has joined #ruby
mahlon has quit [Read error: Connection reset by peer]
ged has quit [Read error: Connection reset by peer]
chouhoul_ has joined #ruby
ged has joined #ruby
mahlon has joined #ruby
<konsolebox> yes just /usr/local as compared to /opt/local in the example, but since you're using eopenssl, i'm not sure if the effect would be the same. maybe you need to hack it with a symlink. not sure.
<desnudopenguino> ok, so i was misunderstanding the --with-openssl-dir option a bit then
chouhoulis has quit [Ping timeout: 240 seconds]
<desnudopenguino> i guess i'd want all the eopenssl things in there to link to /usr/local/{include,lib,bin}/openssl then?
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
chat__ has joined #ruby
apparition has quit [Quit: Bye]
dogweather has quit [Ping timeout: 264 seconds]
<konsolebox> desnudopenguino: i'd say it's worth a try if it's harmless
psychicist__ has joined #ruby
<desnudopenguino> yeah, should be pretty harmless.
chat_ has quit [Ping timeout: 264 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
dogweather has joined #ruby
<desnudopenguino> OpenBSD has some unusual things with their base setup if you want to use gnu tools as well. many needed tools have been rewritten because they have a more premissive license on OpenBSD vs gpl that comes with most *nix software
cagomez has quit [Remote host closed the connection]
<desnudopenguino> makes my life a living hell on these occasions.
cagomez has joined #ruby
workmad3 has joined #ruby
<desnudopenguino> konsolebox: building now, will know in the next 10 or so mins if it worked or not
<konsolebox> ok
workmad3 has quit [Ping timeout: 255 seconds]
cagomez has quit [Ping timeout: 265 seconds]
^mtkd has quit []
BlopMonster has joined #ruby
<desnudopenguino> well that cut down the errors a little from what i can tell, there are still some there though...
<konsolebox> desnudopenguino: you can share the output
NL3limin4t0r has quit [Quit: WeeChat 1.9.1]
tdy has joined #ruby
amar_ has joined #ruby
dogweather has quit [Ping timeout: 256 seconds]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drale2k_ has joined #ruby
user03 has joined #ruby
dogweather has joined #ruby
dviola has joined #ruby
guacamole has quit [Ping timeout: 268 seconds]
drale2k_ has quit [Ping timeout: 256 seconds]
FernandoBasso has joined #ruby
<konsolebox> it's unusual that a pointer argument is expected, but int is passed.
aupadhye has joined #ruby
mtkd has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
<desnudopenguino> i have no idea lol.
<desnudopenguino> the only *error* i'm seeing is `ossl_x509cert.c:372:57: error: invalid type argument of '->' (have 'int')`
<desnudopenguino> if i'm reading that log correctly (though i'm probably not, which is why i'm asking for help)
dogweather has quit [Ping timeout: 264 seconds]
<eam> desnudopenguino: the errors I see are: "openssl_missing.h:196:22: error: static declaration of 'EVP_PKEY_get0_RSA' follows non-static declaration"
<eam> and "openssl_missing.h:221:20: error: conflicting types for 'RSA_get0_key'"
<eam> lots of type errors
<eam> that one you linked is just the very last in a whole series, you have like dozens
<eam> I suspect something is wrong with your openssl development install
<desnudopenguino> eam: which file are you looking at in my gist?
<eam> the huge 1400 line chunk
<desnudopenguino> i have 2 posted, one is older and has tons of errors, the other is newer and has one that i can see
<eam> the last one you pasted
<eam> search for " error: "
dogweather has joined #ruby
cadillac_ has joined #ruby
<desnudopenguino> eam: there are 2 files in that gist. so if you search on the page, you'll see a lot more than what's in the error3 file
<desnudopenguino> there's a 2300 line file, and a 1400 line file in there
<eam> oh! I see what you mean now
<desnudopenguino> sorry was lazy and only have one gist for the files, thought it would be better to keep it rolling in one location
<desnudopenguino> lol
<eam> in any event it looks like you've maybe mixed up two different openssl dev environments
orbyt_ has joined #ruby
<desnudopenguino> i have 2 openssl environments, Libre- and Open-, one is under /usr (Libre-) and the other under /usr/local (Open-)
<konsolebox> desnudopenguino: can you share your x509.h file in the headers?
<konsolebox> the file path is probably /usr/local/include/openssl/x509.h
brad1 has quit [Ping timeout: 240 seconds]
<desnudopenguino> sure thing. one moment
<desnudopenguino> that'll get a new gist, because it's hyoooojah
sphenxes has joined #ruby
Eiam has joined #ruby
<desnudopenguino> or not as huge as i though, but it'll be easier with another gist i think
dogweather has quit [Ping timeout: 260 seconds]
<konsolebox> it's actually the right thing. everything's in pointers, not integers
sameerynho has joined #ruby
aupadhye has quit [Ping timeout: 264 seconds]
shinnya has joined #ruby
dogweather has joined #ruby
brad1 has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
cagomez has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
tdy has quit [Ping timeout: 255 seconds]
<desnudopenguino> yeah, i'm confused lol
<cthulchu> folks, I need some real help now
<desnudopenguino> cthulchu: what's up?
<cthulchu> I have many tests that call my function when they need to test my stuff
<cthulchu> In my function I have a very global variable in which I push the results
<cthulchu> but I need to know who called me
<cthulchu> is it possible to... get the filename of the file who called my function?
<cthulchu> cuz we have tests in separate files
<cthulchu> probably not
<cthulchu> I will have to pass the name in my function
<cthulchu> oh but I can pass it like something like __FILE__
<cthulchu> right?
tdy has joined #ruby
<baweaver> cthulchu: why though?
<cthulchu> to know where the test failed
<cthulchu> to know in which test it failed
<cthulchu> I'm using Ruby to work with Selenium
<cthulchu> not exactly that...
<cthulchu> I'm using QA's framework to test my Analytics stuff
venmx has quit [Ping timeout: 240 seconds]
dogweather has quit [Ping timeout: 256 seconds]
chris349 has joined #ruby
<cthulchu> nah
<cthulchu> not gonna help
<cthulchu> they use universal methods
<cthulchu> I'll just pass the filename cuz there's no OOP structure in these tests
<cthulchu> I can show you
<cthulchu> this is how a test looks: https://i.imgur.com/IbTThPg.png
<cthulchu> we have a lot of them
<cthulchu> I'll just pass __FILE__ or something similar to my function there
aupadhye has joined #ruby
dogweather has joined #ruby
sauvin has quit [Remote host closed the connection]
dogweather has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 245 seconds]
<cthulchu> another question.
lytol has joined #ruby
<cthulchu> we have instance variables that are specific to an object/instance
<cthulchu> and we have local variables that don't have the @ modifier
karapetyan has quit [Remote host closed the connection]
<cthulchu> a local variable in a class scope can be changed by different instances but will be always available and will never be reset implicitly?
dogweather has joined #ruby
<apeiros> "a local variable in a class scope can be changed by different instances" no
r29v has quit [Quit: r29v]
<apeiros> it can't even be accessed
<apeiros> (unless you use define_method with a block, but I doubt you talk about that)
r29v has joined #ruby
aupadhye has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 276 seconds]
fmcgeough has quit [Quit: fmcgeough]
lunarkitty7 has quit [Ping timeout: 256 seconds]
tdy has quit [Ping timeout: 276 seconds]
<soahccc> Anyone familiar with curses? I'm not sure where the problem is but for some reason certain characters are broken on ubuntu (via ssh) vs. macOS locally. When I google I find things related to the terminal locale but it's the same for both, in fact if I force it to a non-utf8 it breaks completely. I suspect it to be curses but what should I do here? https://i.imgur.com/tO5AXDw.jpg
dendazen has quit [Ping timeout: 268 seconds]
Zaab1t has quit [Ping timeout: 276 seconds]
<eam> what absolute jackass made a cop to complain about disabling rubocop?
brad1 has quit [Ping timeout: 256 seconds]
<jrich523> .... i had to switch back to python today... missing () all over the place now lol
<cthulchu> okay...
<cthulchu> let's say I have a class Humans
<apeiros> eam: lol
<cthulchu> It has ivars like height, age and stuff
<cthulchu> but it also has a var like the_coolest_peeps
<cthulchu> that var is an array of people
<cthulchu> when an instance becomes cool, I want to push it into that arrray
cadillac_ has quit [Read error: Connection reset by peer]
<cthulchu> how do I do that?
codymj has joined #ruby
<soahccc> Oh nvm me, I had to install the cursesw (wide space something) and it works :)
zachk has joined #ruby
zachk has joined #ruby
<cthulchu> in Java world it would be a public static var
<cthulchu> I think
<cthulchu> it's been a while
<apeiros> cthulchu: you make a class method and you let @the_coolest_peeps be a class ivar.
<cthulchu> class ivar?
<cthulchu> weird
<cthulchu> ivar is instance var
<cthulchu> class ivar sounds wrong
<cthulchu> what is a class method?
lunarkitty7 has joined #ruby
<apeiros> class Person; @coolest_people = []; class << self; attr_reader :coolest_people; end
<apeiros> cthulchu: yeah, it's not a good idea to reject new ideas on sight
<apeiros> even less so when you're still learning
<apeiros> I remember you wanting the technical & precise explanation - well, here it is:
<jrich523> lol fair statement
<apeiros> a class method is an instance method on the singleton_class of a class, or any ancestor of said singleton_class.
<cthulchu> what did I reject?
<gizmore> apeiros: three years ago i wrote a ruby tut: http://gizmore.org/tutorial/ruby_tut1.php .... should i delete it?
<apeiros> (since technically, there's no such thing as a class method in ruby - that's just a convenience term for a subset of instance methods)
<apeiros> gizmore: no, why?
<cthulchu> uh
<cthulchu> I almost feel like I shouldn't regard Ruby's OOP
<cthulchu> and do functional
<cthulchu> since it's a bit fictional
<gizmore> apeiros: because it might be bad or wrong (found mistakes already)
<apeiros> gizmore: then fix the mistakes.
<jrich523> lol
<jrich523> just delete it, you know you want to
<apeiros> add an info on how to contact you to inform you about mistakes.
chouhoulis has joined #ruby
<apeiros> gizmore: I've yet to find a flawless source of information.
<gizmore> i will just purchase ruby-is-so-elegant.com and print "YES"
* apeiros still owns learning-ruby.com
<apeiros> I should do something with it :-/
<gizmore> apeiros: you could host my bad tutorial
<cthulchu> redirect it to the documentation :)
<apeiros> that'd be more than what's on it now :D
r29v has quit [Quit: r29v]
r29v has joined #ruby
<gizmore> apeiros: i would love to (re)write a "from php to ruby"
<gizmore> or "from xxx to ruby"... like i did.... just more and more correct
quobo has joined #ruby
<cthulchu> I think I found it
cadillac_ has joined #ruby
<cthulchu> def self.static_method(args)
chouhoul_ has quit [Ping timeout: 264 seconds]
<cthulchu> It's not obvious how self works but worth trying
arooni has quit [Quit: ZNC - http://znc.in]
Zaab1t has joined #ruby
<apeiros> nothing without prior knowledge is obvious.
<cthulchu> well common oop knowledge doesn't help with this
<cthulchu> maybe I don't know enough of common oop
<apeiros> "common"?
<cthulchu> yes. something common for all langs
<apeiros> yes, JS' prototypical OOP works differently from this :)
<apeiros> so does whatever you could call PHP's
<apeiros> there's no such thing as "something common for all langs"
<apeiros> well, ok, there is: you have to learn them to understand them.
<gizmore> the basic difference between ruby and other interpreters....... the interpreter does not know a preprocessor.... it just interprets your definitions as code....... "module" changes namespace. "class" adds a constant and so on?
<apeiros> and: they're all different. that's why they exist :D
<cthulchu> actually I despise JS's and PHP's OOP
<apeiros> gizmore: yes, ruby itself doesn't do any preprocessing. you could still write a preprocessor.
<cthulchu> I think more of Java's
<gizmore> yeah... ruby is so elegant
<apeiros> cthulchu: so, what was the "common" again? :)
<cthulchu> ^)
<gizmore> apeiros: fun php fact: #to_string may not throw exceptions *^-^ (poor php bastards)
<apeiros> gizmore: may not = must not?
<gizmore> must not :)
<gizmore> wtf
<apeiros> am I terrible for thinking that that makes sense? at least an argument-less to_string
<gizmore> wjy
<cthulchu> okay, could you please explain what self is in the class scope?
<cthulchu> it's not this?
<apeiros> IMO an #inspect in ruby shouldn't ever raise either
<apeiros> cthulchu: the class
<gizmore> apeiros: why would you do those no exception on to_string restrictions...... that's redicule
<apeiros> >> class Foo; p self; end
<ruby[bot]> apeiros: # => Foo ...check link for more (https://eval.in/1022100)
<cthulchu> aha
<cthulchu> cool
<lupine> don't forget NoMemoryError
<apeiros> and `def self.foo` is a specific case of `def obj.foo`
<cthulchu> aha!!!!
<apeiros> lupine: I'd call that an externality
<cthulchu> now I see!
<cthulchu> so classes are objects
<cthulchu> very cool
<cthulchu> seweet oop
<apeiros> cthulchu: yes. that's why you can call methods on them
<apeiros> like .new
arooni has joined #ruby
<cthulchu> aha, right right
<cthulchu> it's so cool to see it from below
<apeiros> ruby is complex
<apeiros> until you understand how it works
<apeiros> and then it's suddenly very simple
<apeiros> until you figure all the cheats needed for that
<apeiros> and then it's complex again
<cthulchu> it'll take time, but I'm glad to take the path
<apeiros> have fun on the journey :D
<cthulchu> oh I will
<lupine> sure, I'm just being awkward squad
<cthulchu> and so static variables are @@ and they are accessible only via the .self methods. Right?
<cthulchu> but then .self methods will still be available just like instance methods via object.self_method
<apeiros> wrong
<cthulchu> hm
<apeiros> @@variables are their very own thing
<apeiros> and their behavior is rather difficult to describe.
<apeiros> but in short: @@class_variables are accessible from class methods, instance methods, and all descendants' class methods and instance methods
<cthulchu> yes, I don't care about the scope tbh
<cthulchu> I'm trying to keep it flat
<apeiros> the most upvoted answer is sadly terrible.
<cthulchu> well it's terrible only cuz it doesn't consider scopes, right?
<cthulchu> the next answer clarifies it
<apeiros> "I don't care about the scope" is a sugar coated "I don't care about correctness". it'll bite you.
<cthulchu> it'll bite me when I'll have more than one scope
<cthulchu> which is, hopefully, never
<apeiros> that's now.
workmad3 has joined #ruby
<cthulchu> hm
<cthulchu> I don't have children
<cthulchu> my class is the leaf
<apeiros> the moment you write a class, a method, or really anything beyond flat code means you have more than 1 scope :)
<apeiros> even blocks introduce a scope
<cthulchu> well yes, I meant 1 scope in inheritance.
<cthulchu> so nothing extends me
<apeiros> `class Foo` - you think that does not inherit anything?
<cthulchu> no
<cthulchu> I think nothing inherits class foo
<cthulchu> again, I'm a leaf
<apeiros> ok
jottr has joined #ruby
<cthulchu> ok, I'll take a look at proper implementation in only this class
<apeiros> < is used to test inheritance: example:
<apeiros> >> class Foo; end; class Bar < Foo; end; p bar_inherits_from_foo: (Bar < Foo)
<ruby[bot]> apeiros: # => {:bar_inherits_from_foo=>true} ...check link for more (https://eval.in/1022102)
<apeiros> lets check whether a class is a leaf…
<apeiros> >> class Foo; end; some_foo = Foo.new; p whatwhatwhat: (some_foo.singleton_class < Foo)
<ruby[bot]> apeiros: # => {:whatwhatwhat=>true} ...check link for more (https://eval.in/1022103)
<apeiros> you may be mistaken about having leafs ;-)
<cthulchu> < extends class, right?
<apeiros> (and my apology, that's a knowledge bomb - IME, only very few ruby programmers actually understand the above)
<cthulchu> class Sub < Super
<apeiros> in the `class Bar < Foo` code, yes
<cthulchu> ok
workmad3 has quit [Ping timeout: 245 seconds]
<apeiros> in just `Bar < Foo` its the method "<" invoked on Bar, with the argument Foo. and that method returns true if Bar is a subclass of Foo.
<cthulchu> ah interesting
<cthulchu> but obviously that is true
<cthulchu> cuz that was what you did
<cthulchu> you created a subclass and then asked if it was a subclass
<apeiros> yes. that was to demonstrate <'s functionality
<cthulchu> ok
jottr has quit [Ping timeout: 248 seconds]
<apeiros> if the second one is obvious too, then kudos to you ;-)
<cthulchu> it's not
<cthulchu> I'm trying to parse it
<apeiros> it tells you that Foo.new.singleton_class is a subclass of Foo :)
cagomez has quit [Remote host closed the connection]
\void has joined #ruby
<apeiros> meaning the moment you have instances of Foo, Foo is no longer a leaf.
<cthulchu> what was p whatwhatwhat
<apeiros> p(hash_key: value)
<cthulchu> right
<cthulchu> I forgot
cagomez has joined #ruby
<cthulchu> no
<cthulchu> doesn't make sense, let me try it
<cthulchu> >> class Foo; end; some_foo = Foo.new; puts some_foo.class
<ruby[bot]> cthulchu: # => Foo ...check link for more (https://eval.in/1022104)
<cthulchu> see?
<cthulchu> .class shows the leaf class
<cthulchu> well I believe so
<cthulchu> I suspect < does something else
<apeiros> yes, Foo.new is an instance of Foo
<apeiros> but Foo.new.singleton_class still is a subclass of Foo :)
<cthulchu> no, it's not just an instance of foo
<apeiros> not just? what else is it then?
dionysus69 has joined #ruby
<cthulchu> one thing is very-very rarely an instance of one class
<cthulchu> pretty much never
<cthulchu> so when you do .class, it shows you the final class
<apeiros> in ruby, actually, always
<cthulchu> really?
kevinburke has joined #ruby
<apeiros> yes. every object is exactly an instance of one specific class.
<cthulchu> an instance of a class is not an instance of its class superclass or what?
<cthulchu> so some_foo is not an object?
<cthulchu> or whatever it's called in Ruby
<apeiros> it is an object
<apeiros> it's not an instance of object
<apeiros> "instance of" does not consider ancestry.
<cthulchu> hm
<cthulchu> I see
<cthulchu> okay
<cthulchu> now I'm not sure if it's the ruby-only case or if it's me not inderstanding OOP properly
<apeiros> though I'd like to have a better term for the thing which does consider ancestry. "is a" is… not very distinguished.
cagomez has quit [Ping timeout: 264 seconds]
<apeiros> well, to my knowledge, no other language defines "instance" differently
<cthulchu> yeah
<apeiros> but there are languages which allow objects to be instances of multiple classes at the same time. those usually also have multiple inheritance.
<apeiros> though afaik the set of languages which have multiple inheritance is bigger than the set of languages which have "instance of multiple classes"
<apeiros> and I've actually difficulties to remember the name of the one language I've met which does the latter.
<cthulchu> I don't see the difference
<cthulchu> multiple inheritance is the same as multiple classes to me
<apeiros> in other words: "x is an instance of Y" means in about every language "x was created from Y (regardless of Y's ancestry)"
<apeiros> instantiation != inheritance.
<cthulchu> having an object of C<B<A, I can access A's public/protected methods
<cthulchu> well yes
<cthulchu> but that doesn't say anything
<apeiros> that's wrong, but ok :)
<cthulchu> well I don't see another way to create a Y instance
<Demos[m]> C++ is fun because you can be have two parent instances of the same type
<cthulchu> without mentioning Y
<apeiros> MI is `A < X + Y`
<elomatreb> Opinion: Composition > Inheritance
<Demos[m]> and afaik they are distinct!
<apeiros> multiple instantiation would be `foo = (X + Y).new`
<cthulchu> weird
<cthulchu> I don't want to know that. yet.
<cthulchu> hell now I can't unknow that
<apeiros> elomatreb: yeah, I'm on the same page there.
<Demos[m]> Inheritance == Composition :D
<cthulchu> why did you have to show that to me
<cthulchu> now I will wonder about how it works
<cthulchu> my life was beautiful before
<elomatreb> Demos[m]: Well, in a way. I meant composition as in non-hierarchical, e.g. trait-based
<apeiros> cthulchu: it's only because you haven't yet figured how it works, i.e. you haven't made the step to "oh, it's actually simple" yet ;-)
<cthulchu> Yeah, that's fine. I'll do it when I actually need it
<cthulchu> I doubt I will ever need it though
<cthulchu> I write simple things
<cthulchu> that barely need oop
karapetyan has joined #ruby
<apeiros> not quite sure which "doing" you're referring there. but ok :)
<cthulchu> learning :)
<elomatreb> You're right though in that if you have complicated inheritance you probably have other, underlying problems
<apeiros> yeah. true understanding of ruby's object model is rarely needed. but if you know the full object model, it actually becomes easier.
<elomatreb> Method lookup path is fun
<cthulchu> it's like that everywhere. knowing lower level makes higher level things seem a lot easier
r29v has quit [Quit: r29v]
jblack has quit [Ping timeout: 256 seconds]
<konsolebox> tell that to people who are scared of learning C
karapetyan has quit [Ping timeout: 255 seconds]
<elomatreb> tbf it's legitimate to be scared of C
<baweaver> More accurately knowing a higher level language unlocks the ability to think in even higher levels of abstraction
<baweaver> Most people really don't remotely care about the low level implementation, they're not looking there.
jblack has joined #ruby
<elomatreb> Plus the version of "low level" that C suggests was accurate in the 1970s, today not so much
<nickjj> when running bundle commands is there a global flag or ENV var you can set to use a custom Gemfile.lock location?
<nickjj> for clarity, not the Gemfile (or both), but just the Gemfile.lock
sameerynho has quit [Ping timeout: 245 seconds]
dogweather has quit [Ping timeout: 264 seconds]
brad1 has joined #ruby
dogweather has joined #ruby
wontruefree has quit [Quit: bye]
ccooke has quit [Ping timeout: 260 seconds]
cagomez has joined #ruby
dogweath_ has joined #ruby
ccooke has joined #ruby
mtkd has quit []
dogweather has quit [Ping timeout: 248 seconds]
fmcgeough has joined #ruby
r29v has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
mtkd has joined #ruby
<konsolebox> knowing abstraction is not enough. how about abstraction with balanced optimization.
<konsolebox> *not impressive
r29v has quit [Client Quit]
claudiuinberlin has joined #ruby
wontruefree has joined #ruby
weaksauce has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
dogweath_ has quit [Remote host closed the connection]
wontruefree has quit [Quit: bye]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
FernandoBasso has quit [Quit: Leaving]
dogweather has joined #ruby
wontruefree has joined #ruby
eckhardt has joined #ruby
Dbugger has quit [Ping timeout: 265 seconds]
clemens31 has quit [Remote host closed the connection]
sphenxes has quit [Quit: Leaving]
psychicist__ has quit [Quit: Lost terminal]
wald0 has quit [Ping timeout: 260 seconds]
postmodern has joined #ruby
dionysus69 has joined #ruby
tty has joined #ruby
karapetyan has joined #ruby
icarus has quit [Ping timeout: 245 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
r29v has joined #ruby
Zaab1t has quit [Quit: Zaab1t]
za1b1tsu has quit [Quit: WeeChat 2.1]
cadillac_ has quit [Ping timeout: 260 seconds]
za1b1tsu has joined #ruby
Mike11 has quit [Quit: Leaving.]
dogweather has quit [Remote host closed the connection]
dogweather has joined #ruby
cadillac_ has joined #ruby
Asher has quit [Read error: Connection reset by peer]
Asher has joined #ruby
woodruffw has quit [Quit: And then he took off.]
dionysus69 has quit [Ping timeout: 248 seconds]
blackmesa has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cthulchu> can we create keys implicitly?
beilabs has quit [Remote host closed the connection]
<cthulchu> >> asd={}; asd["testField"]="qwe"; puts asd["testField"];
<ruby[bot]> cthulchu: # => qwe ...check link for more (https://eval.in/1022118)
<cthulchu> cool
<cthulchu> >> asd={}; asd["testField"].push("qwe"); puts asd["testField"][0];
<ruby[bot]> cthulchu: # => undefined method `push' for nil:NilClass ...check link for more (https://eval.in/1022119)
<cthulchu> crap
claudiuinberlin has joined #ruby
<cthulchu> >> asd={}; asd["testField"]=[]; asd["testField"].push("qwe"); puts asd["testField"][0];
<ruby[bot]> cthulchu: # => qwe ...check link for more (https://eval.in/1022120)
<cthulchu> this is bad...
<cthulchu> is there a way to... push if exists, otherwise create and push?
<cthulchu> in a quick way
Azure|dc has quit [Ping timeout: 276 seconds]
brad1 has quit [Ping timeout: 240 seconds]
quobo has quit [Quit: Connection closed for inactivity]
jenrzzz_ has joined #ruby
blackmesa has quit [Quit: WeeChat 2.1]
<cthulchu> I just did this in the class: @@TestResults = {};
<cthulchu> @@TestResults["Details"] = [];
ldnunes has quit [Quit: Leaving]
workmad3 has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
za1b1tsu has quit [Quit: WeeChat 2.1]
<apeiros> cthulchu: Hash.new accepts a block, which is invoked upon lookup of a non-existent key
t0xik has joined #ruby
<apeiros> you can use it to create entries on demand, so you can always push
Azure has joined #ruby
<cthulchu> that's not quite what I need
<cthulchu> cuz it's an array
<apeiros> how is it not?
<cthulchu> with hashes it's easier
<apeiros> {} is not an array.
sanscoeur has quit [Remote host closed the connection]
<cthulchu> what I have there is
<cthulchu> I mean...
<cthulchu> ok
sanscoeur has joined #ruby
<cthulchu> I have an array as an element of a hash
<apeiros> still pictures instead of text?
<cthulchu> It's difficuly
<cthulchu> it's in vnc
<apeiros> ok, so "Details" is the relevant key.
cyberg has quit [Ping timeout: 248 seconds]
<cthulchu> yes
<cthulchu> I expected hash to create an array when something is pushed in a non-existent key
workmad3 has quit [Ping timeout: 245 seconds]
<apeiros> cthulchu: Hash.new accepts a block, which is invoked upon lookup of a non-existent key
<apeiros> ^
<cthulchu> it looks overcomplicated
<apeiros> some_hash["Details"].push(stuff) <-- first step of this is some_hash["Details"], which is a lookup.
<apeiros> k, if you find a better solution, tell me.
<cthulchu> I did
<cthulchu> I created the array
<cthulchu> lol
<cthulchu> >> asd={}; asd["testField"]=[]; asd["testField"].push("qwe"); puts asd["testField"][0];
<ruby[bot]> cthulchu: # => qwe ...check link for more (https://eval.in/1022122)
<apeiros> well, yes, if initializing is an option, that's almost always the best variant.
<cthulchu> if it's not smart enough to create it on push, I'll create it manually
<apeiros> "not smart enough"
<cthulchu> yeah
<apeiros> you're making a boatload of wrong assumptions there.
<cthulchu> cuz JS lets me push in non-existent keys
<apeiros> uh, no?
<cthulchu> maybe there's a reason why they don't do it
<cthulchu> errr... lemmecheck
<apeiros> JS will tell you the same that you can't call push on undefined.
<apeiros> and it wouldn't make sense either.
<cthulchu> you're right
<apeiros> remember how push is just a method? *anything* can implement push. how should the hash know that it's supposed to be Array#push?
<apeiros> and that even assumes that the hash is still somehow involved at the point where you call push. it's not.
<cthulchu> I thought it was a method of thing
<cthulchu> or of object
<cthulchu> but it
<apeiros> *that* would make no sense :)
<cthulchu> why?
<apeiros> what should Object#push do?
noobineer has joined #ruby
<cthulchu> check if it's undefined
<cthulchu> and create an array!
<apeiros> what "it"?
<cthulchu> hehe :)
<cthulchu> this
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
<cthulchu> if this is undefined
cyberg has joined #ruby
<apeiros> create an array where?
sanscoeu_ has joined #ruby
<cthulchu> this = new []
sanscoeu_ has quit [Remote host closed the connection]
Mia has quit [Read error: Connection reset by peer]
sanscoeur has quit [Read error: Connection reset by peer]
<cthulchu> Array.new
<apeiros> ruby is strongly typed
<apeiros> you can't change the type of an object
<cthulchu> oh
<cthulchu> oooooh
<cthulchu> that's different
<cthulchu> from JS
<cthulchu> and I've noticed it before
<apeiros> to a degree, yes
<cthulchu> didn't expect it from such a flexible lang
sanscoeur has joined #ruby
<cthulchu> but I don't mind types. I enjoy them
megamos has joined #ruby
<cthulchu> ok, I see the point now, thanks.
<apeiros> weeeell… I'd say most people would claim ruby has no types
<konsolebox> is strongly typed really the right word here?
<apeiros> or rather, only a single type: everything is an object
<apeiros> konsolebox: yes
<apeiros> strongly vs. weakly, and dynamically vs. statically
<cthulchu> ok, I'm not close to there enough to understand that
<cthulchu> yet
<cthulchu> I'm gonna go code
<apeiros> ruby is strongly & dynamically typed
Mia has joined #ruby
Mia has joined #ruby
<apeiros> people tend to mix those axis up
<cthulchu> ha!!!!
<cthulchu> I think I got it
codymj has quit [Quit: Leaving]
<cthulchu> it's strongly typed because everything has a type or rather specific class and can't change it implicitly.
<konsolebox> apeiros: care to give an example of a weakly typed language? i can only think of a language with limited types
<apeiros> konsolebox: JS
<cthulchu> and it's dynamically typed because you don't need to specify the type explicitly when you initiate them
<apeiros> konsolebox: anyway, wikipedia explains that stuff better than I
<cthulchu> JS is dynamically typed, but it allows a lot of implicit type mutation
<konsolebox> apeiros: and by the way, i indeed thought about statically typed, i just question the use of strong typed
<apeiros> konsolebox: feel free to question consensus ;-)
<havenwood> konsolebox: PHP is another I think of for weak typing
<havenwood> konsolebox: echo 1 + "1"; #=> 2
<apeiros> an important point there is that php/js do not invoke a method there
<havenwood> funny that JS does: 1 + "1" #=> '11'
<apeiros> ruby has points where it will convert arguments too. but it does so by calling explicit methods. like to_int, to_ary etc.
sanscoeu_ has joined #ruby
<havenwood> PHP and JS just can't agree on how to do it badly! ¯\_(ツ)_/¯
<apeiros> and in numeric parts of ruby, by calling coerce.
sanscoeu_ has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> havenwood: I still love the hex number equality - what a beautiful security issue
<cthulchu> lol, look what I found: https://paste.ofcode.org/zhFkjWZZzPyKK7dW7HyEn6
sanscoeur has quit [Ping timeout: 264 seconds]
<cthulchu> I can't quite follow the code
<apeiros> zenspider as he lives and breathes :D
<cthulchu> it's confusing
<cthulchu> but it's funny nevertheless
amar_ has quit [Remote host closed the connection]
<apeiros> it removes a method and defines a new one in its place
<apeiros> I'm surprised zenspider called the method "alpha" and not something more self explaining
<apeiros> oh, silly me
<apeiros> test_order *returns* :alpha
<cthulchu> :)
<apeiros> somehow I missed the : (probably because of bad highlight)
<cthulchu> zenspider?
<cthulchu> what's that?
<apeiros> s/what/who/
amar has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
sameerynho has joined #ruby
mtkd has quit []
<cthulchu> who then
<apeiros> the author of that code
<cthulchu> how do you know who the author is?
<apeiros> I'm apeiros.
<cthulchu> >>object = {}; object["counter"]++; puts object["counter"]
<ruby[bot]> cthulchu: # => /tmp/execpad-debc92c80735/source-debc92c80735:2: syntax error, unexpected ';' ...check link for more (https://eval.in/1022132)
<cthulchu> errr
<cthulchu> we don't have the ++?
<apeiros> no
<konsolebox> apeiros, havenwood: ok point taken. i still a few doubts, but i think the terminology is fine the way it is
<cthulchu> >>object = {}; object["counter"]+=1; puts object["counter"]
<ruby[bot]> cthulchu: # => undefined method `+' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/1022135)
<konsolebox> still have
<cthulchu> >>object = {}; object["counter"]=+1; puts object["counter"]
<apeiros> cthulchu: you want Hash.new
<ruby[bot]> cthulchu: # => 1 ...check link for more (https://eval.in/1022137)
<cthulchu> ha!
<cthulchu> I knoew it!
<cthulchu> see?
<cthulchu> what I
<apeiros> yeah, you successfully assigned 1 to it
<apeiros> because 1 == +1
<cthulchu> I created it, man!
<apeiros> unlike -1
<cthulchu> it's alive!
<apeiros> however, it does not increase the value ever
<cthulchu> really?
<apeiros> a = +1
<apeiros> a = -1
<apeiros> notice something?
<cthulchu> oh
<cthulchu> omg
<cthulchu> there's no =+?
<cthulchu> okay...
<apeiros> no. += is it.
<apeiros> > cthulchu: you want Hash.new
<cthulchu> >>object = {}; object["counter"]+=1; puts object["counter"]
<ruby[bot]> cthulchu: # => undefined method `+' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/1022138)
<cthulchu> okay
<cthulchu> I'll create this one too
<apeiros> and study its docs
<cthulchu> JS folks taught me never to use constructors when I don't need them
<cthulchu> to be fair, they are all about functional programming
<konsolebox> functional style i see
<cthulchu> which I embraced.
<apeiros> where the hell did github's code search go?
<cthulchu> it's in normal search now
<cthulchu> I think
<konsolebox> was there a change? i don't remember how it used to be like as i don't use it often
<konsolebox> however i notice the site's design is starting to look like Discord
<apeiros> cthulchu, konsolebox: there used to be "search this project"
<apeiros> and I can't find that anymore.
<cthulchu> ha!
<cthulchu> we should invite him here
<cthulchu> he would have fun seeing how people explore the framework :)
<apeiros> 🙈
<cthulchu> or maybe not
<apeiros> you should probably check the userlist
<apeiros> and then check the access list of this channel
<cthulchu> oh, I see
<cthulchu> haha
<cthulchu> such a great community
<cthulchu> I should invite our real Ruby coders in her
kapil___ has quit [Quit: Connection closed for inactivity]
<cthulchu> they could find it useful
<apeiros> sure
<apeiros> more ruby coders in here - great
noobineer has quit [Ping timeout: 268 seconds]
chouhoulis has quit [Ping timeout: 256 seconds]
paraxial has quit [Quit: The Lounge - https://thelounge.github.io]
paraxial has joined #ruby
<jerryskye> hello everyone
<jerryskye> how are you today guys?
<jerryskye> i wanted to ask if there's a framework faster than roda
<jerryskye> if anyone has found one please ping me :)
amar has quit [Remote host closed the connection]
user03 has left #ruby ["Leaving"]
wontruefree has quit [Quit: bye]
<havenwood> jerryskye: ngx_mruby
zautomata has joined #ruby
zautomata has quit [Changing host]
zautomata has joined #ruby
<gizmore> jerryskye: working on rubygdo :P
<jerryskye> thanks havenwood, is this a framework or just some ruby extension for nginx?
<zenspider> meh
<cthulchu> this is so weird...
<havenwood> jerryskye: Or h20_mruby or mod_mruby. You write handlers in Ruby via mruby. Is a tuned Roda not fast enough? What's the speed problem you're running into?
<cthulchu> I have an error that closes my console...
samosaphile has joined #ruby
<cthulchu> I'll try my native console
<cthulchu> wow, it actually closes the console!
<cthulchu> how do I test it?
<havenwood> jerryskye: 274,472 JSON requests per second - pretty fast.
<jerryskye> havenwood: I was just wondering if there was anything faster. I don't have any issues, I usually do small projects with Roda. Thanks for your help, have a good one ;)
<havenwood> jerryskye: But... Roda with the same setup is 173,905 JSON requests per second.
<havenwood> jerryskye: Roda is fast. I'd not worry.
shinnya has joined #ruby
<akaiiro> jerryskye Amber https://www.techempower.com/benchmarks/#section=data-r16&hw=ph&test=json&f=zik073-zik0zj-zik0zj-zik0zj-zhxjwf-zik0zj-yelnge-4zsot
sameerynho has quit [Ping timeout: 256 seconds]
<cthulchu> okay, I don't understand it
<cthulchu> my code fails, but I'm not getting the error message
<cthulchu> instead it does an epic thing
<cthulchu> I've never seen anything like it
<cthulchu> it closes the console
<cthulchu> what is it?
<akaiiro> cthulchu welcome to the world of segmentation faults (maybe)
<cthulchu> wow
<cthulchu> but how do I deal with it?
<cthulchu> I have no idea how to debug it
<cthulchu> also my puts don't work at all
jottr has joined #ruby
<cthulchu> even before it closes
<cthulchu> weeeird. I may have done something very-very wrong
<akaiiro> cthulchu neither do I. requires deeper knowledge. but it may be related to the tool you're using to run your program. have you tried to run it online?
<cthulchu> it's too complex to run it online
<cthulchu> so yeah, it's probably my context
<cthulchu> I'll ask my debs who work with the framework
<cthulchu> *devs
<cthulchu> on Monday
<cthulchu> hell this is scary
<cthulchu> never have I encountered anything close to it. Maybe something below me does it when triggered and I trigger it
<akaiiro> well, it makes you think. some people say that all our software tools are just glued together with duck tape
jottr has quit [Ping timeout: 248 seconds]
<zenspider> duct
<cthulchu> hehe
<cthulchu> it certainly feels that way
<cthulchu> guys you should know
<cthulchu> I'm the new one with Selenium and Ruby
<cthulchu> you've been around for ages
<cthulchu> okay, I'll upload the code
<cthulchu> for general lookup
<zenspider> printing isn't debugging. either use a real debugger, something like pry, or write tests to prevent regressions from reoccuring
<havenwood> ^
<cthulchu> it's not even that
<zenspider> (I prefer the latter--but I'm biased)
tdy has joined #ruby
<cthulchu> it's that I don't get an error on fail
<cthulchu> how the hell would I know where to trigger pry
<cthulchu> also pry has real issues with next
<cthulchu> or continue
<havenwood> cthulchu: Lines 4-7 should be constants.
<cthulchu> there's another debugger that can do that
<havenwood> cthulchu: byebug
<havenwood> cthulchu: Class variables >.>
<cthulchu> they're not constants
<zenspider> semicolons. bad indents. zero blank lines separating anything. ... nope
<cthulchu> those values are placeholders
<zenspider> havenwood: if there's no subclass, then cvars are totally fine
<zenspider> still doesn't make sense... but whatever
<cthulchu> that's my thought!
<cthulchu> akaiiro, see?
<cthulchu> ^^^
<cthulchu> why bad indents though? where?
<havenwood> zenspider: usually when I see them used the use doesn't make sense
<cthulchu> in my case it makes sense
<cthulchu> oh, well
<cthulchu> actually I just need static
<cthulchu> I know there's another way of doing them
<cthulchu> but it seemed overcomplicated
<havenwood> cthulchu: Use consistent spacing, like on like 22 - spaces after =
<havenwood> cthulchu: spaces before and after == on line 26
<cthulchu> right
<cthulchu> ok ok
<cthulchu> I'll try to keep an eye on it
<havenwood> cthulchu: no parens with puts, line 27
<havenwood> cthulchu: no parens with get_driver, line 29
<cthulchu> so it seems to fail only when the debug.length != 1
<akaiiro> cthulchu yep, hard to tell at first sight. you can narrow the offending instruction going step by step with the help of byebug, like zenspider commented
<havenwood> cthulchu: that's not a matter of Seattle style, it's community consensus to omit parens in those cases
<cthulchu> I like my parents
<havenwood> noooo
<zenspider> it's ALSO seattle style. :P
<havenwood> cthulchu: stop that
<cthulchu> why?
<cthulchu> they make it easier to read
<cthulchu> it's like using commas in English
<cthulchu> seattle
<havenwood> cthulchu: no, it's more like saying "like" over and over, unnecessarily
<cthulchu> it makes it easier for me to read it.
<zenspider> this person has been in here for days, asking why ruby isn't more like python left and right (instead of using python), and clearly shows no desire to learn _proper_ ruby. I don't see much reason to invest more time or effort in this. It'll just be push back after pushback and excuse after excuse.
<havenwood> cthulchu: like, stop - it's like not, like necessary
<zenspider> haha
<cthulchu> yeah I got the idea
<havenwood> cthulchu: no semicolons on line endings, line 55
<cthulchu> but hey, baby steps
<cthulchu> I can't become an ideal ruby coder right away
<zenspider> ESPECIALLY if you don't want to be.
<cthulchu> I do, but not now
<havenwood> cthulchu: use interpolation, line 42
<zenspider> it's not like OUR time is valuable or anything.
<cthulchu> okay
<cthulchu> can we stop discussing design that doesn't affect the output?
<cthulchu> I will get better at it eventually
<havenwood> cthulchu: headlessCamelCase is *never* a thing in Ruby, line 42
<havenwood> 41*
<zenspider> I've been moving more towards String#% over interpolation. Not sure why, but I've been liking the shorter string literals
<cthulchu> I know!
<cthulchu> hell
<havenwood> cthulchu: Fix those things, and we'll be happy to discuss things that affect the output.
<akaiiro> zenspider pass the salt, need some for my salad
<cthulchu> omg...
<cthulchu> it doesn't makes much sense to me
<cthulchu> but okay
amar has joined #ruby
<cthulchu> I'll waste my time prettyfying it
<cthulchu> just cuz I don't have a choice
alex`` has quit [Quit: WeeChat 2.1]
<havenwood> Making code readable is of paramount importance.
<cthulchu> it is readable
<cthulchu> you're just being super picky
<zenspider> once again... asks for feedback. rejects the feedback.
<cthulchu> I was asking about functional feedback
<zenspider> I'm done. Welcome to my /fools list
<havenwood> cthulchu: Don't mutate objects.
<havenwood> cthulchu: That's my functional feedback.
<cthulchu> thanks, likewise
<cthulchu> havenwood, that's not what's causing issues at hand
<havenwood> cthulchu: ;-)
<cthulchu> I'll get to it in time
<cthulchu> hell you're demanding
* havenwood demands a chariot pulled by cats ...
<cthulchu> exactly :)
<cthulchu> I mean, it's totally not much from your perspective
<cthulchu> but it totally is from mine
<havenwood> cthulchu: do you mean to have a bang on line 44?
<akaiiro> I would like one of those chariots too
<havenwood> oh, not equal
<havenwood> cthulchu: debug.any?
reber has quit [Remote host closed the connection]
<zenspider> nah
<cthulchu> havenwood, what about 44?
<zenspider> unless debug.empty?
<havenwood> cthulchu: Use `debug.empty?` and `debug.any?`.
<havenwood> cthulchu: or what zenspider said
<cthulchu> why?
<zenspider> they're not testing for truthiness of content
<cthulchu> what's wrong with length == 0?
<havenwood> cthulchu: several reasons, 1) length! could be a method #length!
<havenwood> cthulchu: 2) a method without an argument is better than a method with an argument
<cthulchu> I'm not addig methods
<cthulchu> to foreign classes
<cthulchu> or objects
<havenwood> cthulchu: huh?
amar has quit [Ping timeout: 256 seconds]
<cthulchu> okay, anyway, these are cosmetics
<cthulchu> and I'm very sure they won't change the output in my context
<havenwood> cthulchu: it made your code difficult to read. i think you're undervaluing readability
<cthulchu> okay, I'll work on it
<cthulchu> right now
<cthulchu> It's like everything crushes, I need to fix it and you're commenting on the cosmetics
<havenwood> cthulchu: It may seem silly, but when conventions are followed we can grok code way faster.
<cthulchu> I can't even start doing cosmetics cuz I can't run the code to test if my cosmetic changes affected the output
<havenwood> cthulchu: Yeah, that's where tests come in *very* handy.
<cthulchu> what tests?
<havenwood> cthulchu: They quickly save you time.
<zenspider> exactly
<zenspider> haha
<havenwood> cthulchu: Minitest ships with Ruby! :-)
jamesaxl has quit [Quit: WeeChat 2.1]
<zenspider> and yet...
<cthulchu> I actually work in minitest children
<cthulchu> but I'm trying not to interfere with it too much
<cthulchu> in fact, as little as I can
<havenwood> zenspider: I do think it'd be awesome to make a helper to expose assertions at top level for folk who are learning or trying to remember assertions.
<cthulchu> cuz I don't quite unserstand it and what I do has little relation to it
<cthulchu> I don't think your test remarks apply here
<zenspider> havenwood: for like, poking in irb?
<zenspider> you'd almost want a separate set entirely that don't raise at all
<zenspider> (failures raise)
beilabs has joined #ruby
<cthulchu> oh great
schleppel has quit [Quit: Konversation terminated!]
<havenwood> zenspider: Yup, just for poking around. The assertions incrementer is the only barrier, it seems. It'd be awesome to be able to `require 'minitest/repl'` or something to expose top level use.
<cthulchu> so I use iterm2 and it shows a message when the console gets closed
<havenwood> I'd love to use that teaching folk.
<havenwood> cthulchu: Have you ever done any Minitest tests?
<havenwood> cthulchu: You might find that it frees you to have confidence in your code, and refactor liberally.
<zenspider> havenwood: I guess you'd only have to replace assert to not raise
<cthulchu> I haven't done any
<havenwood> zenspider: I don't even mind the raising.
<cthulchu> I'm trying to inject my tests into existing tests
<havenwood> cthulchu: You can write new tests, and just run them.
<havenwood> cthulchu: It's up to you!
<zenspider> havenwood: yeah. just gets a little messy in something like irb
<cthulchu> why would I
<cthulchu> It's a lot of extra work
<zenspider> good god. havenwood... please stop being a martyr.
<havenwood> zenspider: It barfs a bit, but I think it's really enlightening for new folk. And trying it at top level gets rid of the boilerplate.
<cthulchu> I'm an analyst and I want _existing_ QA tests to do analytics testing too
<cthulchu> and it's easy to do
* havenwood tries to think of a good martyr thing to say ...
<cthulchu> Ruby is quite straightforward
<zenspider> havenwood: haha
<gizmore> the biggest problem for me in ruby is large codebase with bad code completion support
beilabs has quit [Ping timeout: 248 seconds]
<zenspider> gizmore: what's your editor of choice?
<cthulchu> in Ruby itself?
<gizmore> zenspider: AptanaStudio/Eclipse atm
tjbp has quit [Quit: No Ping reply in 180 seconds.]
<havenwood> cthulchu: Testing save so much time...
<havenwood> cthulchu: Here's an example of just doing inline tests. Maybe start with that: https://gist.github.com/havenwood/501b7a7e57f512ec95cfcb7f9a44f0d0
<gizmore> i love rspec and test driven dev in ruby =)
<cthulchu> havenwood, okay. I don't know what testing is. Do you have a link that explains it?
tjbp has joined #ruby
<zenspider> gizmore: can't help you then. There's probably some sort of tagging / jump system, but I wouldn't know it.
<havenwood> zenspider: I betcha folk would use it despite the exception noise. I use that little shim from time to time just to quickly remember assertion behavior in the repl.
<zenspider> sorry
skryking has quit [Quit: Leaving]
workmad3 has joined #ruby
<zenspider> havenwood: I'm poking at it now
<havenwood> :-D
<zenspider> I just threw in require "pry"; binding.pry
<zenspider> you still have to do something like `ruby -rminitest/pry -e 0`... without the bogus -e it hangs
<zenspider> odd. I guess that means that it doesn't do the -r args UNTIL it has something to eval
<zenspider> my whole place smells of bacon. it's glorious
r29v has quit [Quit: r29v]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
<zenspider> havenwood: hah! I moved it into the Assertions module and did `extend self` then opened up pry inside them module. works great.
<cthulchu> I think I nailed it
<zenspider> I've never done `extend self` before. feels perverse
<havenwood> haha
<cthulchu> it taught me a lesson
<cthulchu> I'm gonna do it a proper way now
RougeR has quit [Quit: Leaving]
<cthulchu> I'll sacrifice a bunch of time to make sure I code in proper Ruby
<cthulchu> will embrace it
<havenwood> zenspider: I vote module_function - hrm, no harm from having the included version be private, right?
workmad3 has quit [Ping timeout: 260 seconds]
* havenwood totally agrees on the perversity of extending self
<havenwood> cthulchu: it may seem slower, but having tested, readable code saves ages
<havenwood> cthulchu: it's very worth the ramp up
<cthulchu> so I'm looking at this test. It has view. The view has methods. Each method does something on the page and returns... errr... self. So the chaining works properly
<zenspider> I keep forgetting that I have M-x ruby-find-file
wald0 has joined #ruby
<cthulchu> I inject my analytics funtion inbetween some chain segments where I expect my things to be in the dataLayer
<cthulchu> and I check them
<cthulchu> and it works fine
<cthulchu> until I decided to comment my code with a #
<Yxhuvud> zenspider: emacs is a dangerous drug
jenrzzz_ has quit [Ping timeout: 260 seconds]
<zenspider> indeed. but such a good one
<Yxhuvud> oh yeah.
<cthulchu> why can't I do something like this? https://i.imgur.com/Fetboet.png
<cthulchu> when I do it, the console closes
<cthulchu> doesn't let me read the error
<zenspider> use a real OS
<cthulchu> I can't
<cthulchu> I'm not the owner of the framework
<cthulchu> I'm a guest
<cthulchu> and I'm trying to be polite
<cthulchu> try it
<cthulchu> it's cool
* havenwood growls
<cthulchu> I actually don't like mac
<zenspider> when you drop entitled and disingenuous, THEN you'll be trying polite
<cthulchu> my own servers are on Debian
<cthulchu> am I entitled to something?
<havenwood> cthulchu: You can't put comments in the middle of method chains. Not on one line, not across lines.
<cthulchu> errr
<cthulchu> oh
<cthulchu> that's interesting
<cthulchu> that I didn't expect
<zenspider> havenwood: hrm... binding.pry drops you in whereever you want. but IRB.start is always toplevel... I wonder if there's a way to get into where I want?
<cthulchu> havenwood, thanks. Is there a reason why?
<havenwood> zenspider: These days: binding.irb
<zenspider> havenwood: I suspect trailing periods would work
<Yxhuvud> I like how I'm like the only one at my work place (~150 people) that is the only one that doesn't use mac. Apparently, they were tupid enough to ask me...
<zenspider> yeah. :/
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zenspider> shouldn't have asked if they didn't want to know the answer
<Yxhuvud> exactly :)
<havenwood> cthulchu: yeah, there are reasons - I can explain but it'll take a while
<cthulchu> I actually don't use mac either
<cthulchu> havenwood, you can just link. I'm happy to read
<cthulchu> just don't know what to google for
<Yxhuvud> I work on mac every other workplace I work at. I wouldn't mind that bind like a decade in teh future
<havenwood> cthulchu: I mean it's how the Ruby parser works. I don't know that someone has prepared an article for the specific case you're asking about. If they have, I don't know about it. But I don't think you're ready to get into parser details. I'd suggest just accepting it.
<zenspider> so much bacon. I might have JUST bacon for dinner. glorious. Just not sure how to eat the liquid w/o burning my lips
jenrzzz has joined #ruby
<Yxhuvud> :D
<cthulchu> okay
<cthulchu> never seen it in other languages
<cthulchu> very surprised
<cthulchu> and I can't to the partial comments?
<cthulchu> like /* */
jottr has joined #ruby
<havenwood> cthulchu: You haven't seen comments interrupt method chaining? Anyhoo.
<cthulchu> no
<cthulchu> gonna go test it in js
<havenwood> cthulchu: You can see what exact grammar rules Ruby is using from parse.y with the --yydebug flag: ruby --yydebug -e "self.; #nope; .to_s"
<zenspider> havenwood: yeah. trailing periods
<havenwood> zenspider: tricky!
<zenspider> leaves it in a hanging state... makes some sense
<havenwood> cthulchu: I mean: ruby --yydebug -e "self; #nope; .to_s"
<havenwood> I was reading zenspider's comment while typing. My fingers had a mutiny.
<cthulchu> okay
<cthulchu> thanks a lot
<cthulchu> I'll remember this one
<cthulchu> and be ready for more surprise
<cthulchu> I still can break the chaining to comment, but it looks ugly
<cthulchu> so I won't comment
<havenwood> cthulchu: You can see often dig in with Ripper or RubyVM::InstructionSequence. But typically folk don't start doing that until they know Ruby.
<cthulchu> yeah, I'll try it in future
<havenwood> cthulchu: It's fun.
<cthulchu> indeed! :)
anime4christ has joined #ruby
k0mpa has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
r29v has joined #ruby
anime4christ has quit [Quit: (null)]
jcarl43 has quit [Quit: WeeChat 2.1]
r29v has quit [Quit: r29v]
r29v has joined #ruby