« Back to channel list

#ruby - 14 February 2019

« Back 1 day Forward 1 day »
[00:00:31] Inline: has joined #ruby
[00:04:37] Inline: has joined #ruby
[00:07:32] elcontrastador: has joined #ruby
[00:08:10] Inline: has joined #ruby
[00:10:19] spacesuitdiver: has joined #ruby
[00:11:06] Inline: has joined #ruby
[00:16:43] stooj: has joined #ruby
[00:18:40] ansraliant: has joined #ruby
[00:18:40] cthulchu: has joined #ruby
[00:19:04] hahuang6-: has joined #ruby
[00:19:43] r29v: has joined #ruby
[00:46:12] skyikot: has joined #ruby
[00:46:36] valadares: has joined #ruby
[00:51:06] x0F: has joined #ruby
[00:57:12] Cthulu201: has joined #ruby
[01:01:21] ashirase_: has joined #ruby
[01:05:32] txdv: has joined #ruby
[01:10:08] phaul: &fake FamilyGuy.quote
[01:10:09] rubydoc: I am so not competitive. In fact, I am the least non-competitive. So I win.
[01:10:53] sgen_: has joined #ruby
[01:13:45] markoong: has joined #ruby
[01:20:49] v01d4lph4: has joined #ruby
[01:23:21] spacesuitdiver: has joined #ruby
[01:24:27] Swyper: has joined #ruby
[01:26:11] planigan: has joined #ruby
[01:35:44] skryking: has joined #ruby
[01:50:06] planigan: has joined #ruby
[01:54:44] bmurt: has joined #ruby
[02:00:31] noark9: has joined #ruby
[02:14:51] duderonomy: has joined #ruby
[02:15:10] AJA4350: has joined #ruby
[02:15:39] valadares: has joined #ruby
[02:21:35] conta: has joined #ruby
[02:38:43] conta: has joined #ruby
[02:55:32] v01d4lph4: has joined #ruby
[03:12:28] r29v: has joined #ruby
[03:16:49] mitescugd: has joined #ruby
[03:17:08] maryo: has joined #ruby
[03:31:19] v01d4lph4: has joined #ruby
[03:32:13] maryo: has joined #ruby
[03:34:04] elphe: has joined #ruby
[03:35:21] houhoulis: has joined #ruby
[03:35:28] Renich: has joined #ruby
[03:37:47] s2013: has joined #ruby
[03:45:47] code_zombie: has joined #ruby
[03:48:36] tdy1: has joined #ruby
[03:58:09] blackswan: has joined #ruby
[03:58:54] ByronJohnson: has joined #ruby
[04:08:58] Renich: has joined #ruby
[04:09:08] braincrash: has joined #ruby
[04:24:58] arescorpio: has joined #ruby
[04:36:38] sleetdrop: has joined #ruby
[04:37:02] Fusl: has joined #ruby
[04:56:18] v01d4lph4: has joined #ruby
[05:15:12] skyikot: has joined #ruby
[05:44:38] paranoicsan: has joined #ruby
[06:02:40] Renich_: has joined #ruby
[06:15:25] conta: has joined #ruby
[06:17:53] ur5us: has joined #ruby
[06:23:40] sauvin: has joined #ruby
[06:26:01] Fusl: has joined #ruby
[06:28:43] KeyJoo: has joined #ruby
[06:52:33] reber: has joined #ruby
[07:00:15] aupadhye: has joined #ruby
[07:00:20] dionysus69: has joined #ruby
[07:06:28] cnsvc: has joined #ruby
[07:18:04] Spaceman77: has joined #ruby
[07:20:01] bga57: has joined #ruby
[07:42:36] clemens3_: has joined #ruby
[08:06:21] aufi: has joined #ruby
[08:09:36] amerlin: has joined #ruby
[08:13:38] KeyJoo: has joined #ruby
[08:13:49] clemens3_: has joined #ruby
[08:18:29] status402: has joined #ruby
[08:22:06] prestorium: has joined #ruby
[09:00:16] lxsameer: has joined #ruby
[09:04:08] mikecmpbll: has joined #ruby
[09:21:20] wildermind: has joined #ruby
[09:26:49] clemens3: has joined #ruby
[09:30:50] nowhere_man: has joined #ruby
[09:59:12] apparition: has joined #ruby
[10:02:00] ellcs: has joined #ruby
[10:03:43] paranoicsan: has joined #ruby
[10:09:56] ashirase: has joined #ruby
[10:14:06] blackmesa1: has joined #ruby
[10:42:17] kapil____: has joined #ruby
[10:48:17] tdy: has joined #ruby
[10:53:34] conta: has joined #ruby
[10:54:04] hightower2: has joined #ruby
[10:54:18] mikecmpb_: has joined #ruby
[10:56:56] al2o3-cr: has joined #ruby
[11:00:25] v01d4lph4: has joined #ruby
[11:02:12] reber: has joined #ruby
[11:16:53] AJA4350: has joined #ruby
[11:17:48] sezuan: has joined #ruby
[11:28:40] vondruch: has joined #ruby
[11:30:24] vondruch: has joined #ruby
[11:37:05] KeyJoo: has joined #ruby
[11:40:58] sezuan: has joined #ruby
[12:01:06] andywww: has joined #ruby
[12:01:54] andywww: cross posting from rails channel, i wondered if someone could help me out with virtus:
[12:01:55] andywww: https://hastebin.com/gonoyocani.rb
[12:02:35] andywww: i can’t seem to access the attributes that i passed in with DocumentSelectForm
[12:13:35] clemens3: has joined #ruby
[12:17:31] mitescugd: has joined #ruby
[12:18:09] KeyJoo: has joined #ruby
[12:19:51] KevinSjoberg: andywww: Don't you need to pass the opts to super? I.e., super(opts).
[12:20:11] AJA4351: has joined #ruby
[12:20:36] KevinSjoberg: Oh, sorry. Looking at the wrong class.
[12:21:31] andywww: its like the proc seems to be able to access the attributes of the class but calling them directly can’t
[12:33:44] FastJack: has joined #ruby
[12:42:26] markoong: has joined #ruby
[13:14:11] johnny56_: has joined #ruby
[13:17:46] snowy: has joined #ruby
[13:30:17] bmurt: has joined #ruby
[13:32:29] indistylo: has joined #ruby
[13:35:27] AJA4350: has joined #ruby
[13:39:57] duckpuppy: has joined #ruby
[13:51:01] cow[moo]: has joined #ruby
[13:53:24] lucasb: has joined #ruby
[13:56:22] jcalla: has joined #ruby
[13:56:36] cow[moo]: has joined #ruby
[13:58:41] snk: has left #ruby: ("WeeChat 2.2")
[13:59:17] duckpuppy: has joined #ruby
[14:02:49] GinoMan: has joined #ruby
[14:05:57] paranoicsan: has joined #ruby
[14:13:44] bmurt: has joined #ruby
[14:14:18] fluxAeon: has joined #ruby
[14:17:10] GinoMan2440: has joined #ruby
[14:21:48] noark9: has joined #ruby
[14:43:35] AJA4351: has joined #ruby
[14:46:36] conta: has joined #ruby
[14:49:33] prestori_: has joined #ruby
[14:51:34] dviola: has joined #ruby
[15:02:05] prestorium: has joined #ruby
[15:03:08] polishdub: has joined #ruby
[15:06:04] prestorium: has joined #ruby
[15:15:42] Rapture: has joined #ruby
[15:17:44] catdude: has joined #ruby
[15:17:47] rippa: has joined #ruby
[15:19:55] catdude: Question: In the line test "${fqdn#*domain1.net}" != "$fqdn" && federal_build="TRUE" what is the "#*" doing? I'm an absolute beginner at Ruby but fairly skilled at Python.
[15:29:06] mozzarella: catdude: it's not doing anything
[15:30:52] catdude: Hmmm. It's not obvious to me what that whole line is doing then.
[15:32:42] mozzarella: what is it part of? looks like some kind of templating language
[15:33:16] mozzarella: ruby interpolation is #{}, not ${}
[15:33:44] phaul: also "TRUE" is not how we represent true
[15:34:18] phaul: makes you wonder if this is ruby at all
[15:34:28] awkwords: has joined #ruby
[15:35:26] catdude: Ah crap - my bad. It's in shell script. Sorry about that. I've been looking at Ruby scripts all morning and didn't check the file name.
[15:35:30] jane_booty_doe: looks like bash
[15:37:18] maryo: has joined #ruby
[15:44:00] Puppet`: has joined #ruby
[15:44:57] skryking: has joined #ruby
[15:52:40] conta: has joined #ruby
[15:53:51] maryo: has joined #ruby
[15:57:58] xrexeon: has joined #ruby
[16:02:49] Emmanuel_Chanel: has joined #ruby
[16:05:25] conta: has joined #ruby
[16:07:40] tdy: has joined #ruby
[16:19:41] conta: has joined #ruby
[16:29:50] agent_white: has joined #ruby
[16:40:50] rikkipitt: has joined #ruby
[16:44:20] Renich_: has joined #ruby
[16:49:45] blackmesa1: has joined #ruby
[16:52:20] \void: has joined #ruby
[16:58:16] valadares: has joined #ruby
[16:59:03] hiroaki: has joined #ruby
[16:59:33] cthulchu: has joined #ruby
[17:02:27] valadares: has joined #ruby
[17:11:22] nowhere_man: has joined #ruby
[17:13:03] noark9: has joined #ruby
[17:17:33] conta2: has joined #ruby
[17:20:41] Dbugger: has joined #ruby
[17:24:35] donofrio: has joined #ruby
[17:37:45] ngw: has joined #ruby
[17:38:32] ngw: I wanted to see an example of a library that wraps some kind of client to see how the client is actually used
[17:40:13] ngw: for example: client to elasticsearch, with a set of specific objects "under" it that know a lot about the structure of the indexes and such, so basically I have an object Index that needs a client to be executed, but whose logic is all inside the Index object
[17:41:04] ngw: basically when I call Index.create or something like that it turns into a call to a client that parforms a parametrized call somewhere
[17:41:49] ngw: I don't know if I've been clear, I don't think so :)
[17:43:48] maryo: has joined #ruby
[17:44:57] havenwood: ngw: Index.create reminds me of Rails. Is this in Rails and you're talking a pseudo model or that just happened to be your example?
[17:45:02] krawchyk: has joined #ruby
[17:45:09] deathwishdave: has joined #ruby
[17:45:44] havenwood: ngw: There are a ton of examples, but it's often very domain specific.
[17:46:05] havenwood: ngw: Do you have a specific thing you're wrapping, or just generally exploring patterns?
[17:47:25] ngw: only example, it's something that is gonna run on AWS lambda
[17:47:39] ngw: I'm wrapping Elasticsearch
[17:47:53] ngw: the client will basically be the elasticsearch client
[17:48:10] ngw: from gem elasticsearch-api
[17:48:33] havenwood: ngw: Here's a little example of wrapping vie inheritance: https://github.com/nahi/httpclient/blob/master/lib/jsonclient.rb
[17:49:12] ngw: yes that is something I was thinking a lot about, inheritance vs composition
[17:49:16] havenwood: ngw: Or one that doesn't: https://github.com/havenwood/persist/blob/master/lib/persist.rb
[17:49:27] ngw: IMVHO inheritance is perfectly viable here
[17:51:04] ngw: second example makes perfect sense too, considering everything is on lambda I couldn't care less of initializing a client every time I call an object
[17:51:09] havenwood: ngw: I'm sure the channel would be happy to help hone it once you have some code.
[17:51:10] ngw: bookmarked
[17:51:44] havenwood: There should be lots of good examples of various JSONClients.
[17:54:25] nowhere_man: has joined #ruby
[17:55:49] havenwood: ngw: Here's another example: https://gist.github.com/havenwood/88405ae46a14faab9bdffb3fdb50465c
[17:56:14] havenwood: It'll really probably be very domain specific.
[17:56:49] orbyt_: has joined #ruby
[18:04:58] v01d4lph4: has joined #ruby
[18:09:15] cagomez: has joined #ruby
[18:27:09] jcalla: has joined #ruby
[18:27:31] blackmesa1: has joined #ruby
[18:28:59] wilbert: has joined #ruby
[18:30:19] AJA4350: has joined #ruby
[18:34:41] deathwishdave: has joined #ruby
[18:40:12] fredolinhares: has joined #ruby
[18:47:09] krawchyk: has joined #ruby
[18:47:36] valadares: has joined #ruby
[18:49:25] valadares: has joined #ruby
[18:58:41] conta: has joined #ruby
[19:04:55] valadares: has joined #ruby
[19:10:42] Inline: has joined #ruby
[19:15:25] orbyt_: has joined #ruby
[19:22:44] duckpuppy: has joined #ruby
[19:25:23] orbyt_: has joined #ruby
[19:26:53] ravenousmoose: has joined #ruby
[19:27:13] duckpuppy: has joined #ruby
[19:35:47] blackswan: has left #ruby: ()
[19:36:57] ngw: has joined #ruby
[19:41:12] Keanny: has joined #ruby
[19:41:33] conta: has joined #ruby
[19:41:41] Keanny: what is the best way to run unix and embedded OS command line ?
[19:41:47] Keanny: what do you use ?
[19:41:55] Keanny: any interesting gems ?
[19:42:21] Keanny: or even for scripting in ruby ...?
[19:49:50] cagomez: has joined #ruby
[19:54:54] orbyt_: has joined #ruby
[20:00:31] miah: i use mixlib-cli
[20:00:41] miah: https://github.com/chef/mixlib-cli
[20:00:52] mikecmpbll: has joined #ruby
[20:01:12] miah: and uh. there is mixlib-command or something let me see. (we have a bunch of these)
[20:02:54] miah: mixlib-shellout thats it =) https://github.com/chef/mixlib-shellout
[20:03:17] miah: lots of useful helpers around command execution
[20:10:52] nowhere_man: has joined #ruby
[20:14:23] duckpuppy: has joined #ruby
[20:14:26] ngw: has joined #ruby
[20:16:10] al2o3-cr: has joined #ruby
[20:18:20] sgen: has joined #ruby
[20:25:13] Nicmavr: has joined #ruby
[20:25:40] deathwishdave: has joined #ruby
[20:38:51] spiette: has joined #ruby
[20:40:43] postmodern: has joined #ruby
[20:42:22] ngw: has joined #ruby
[20:45:05] blackmesa1: has joined #ruby
[20:50:56] fredolinhares: has joined #ruby
[20:51:47] hiroaki: has joined #ruby
[20:54:25] ur5us: has joined #ruby
[21:00:15] conta: has joined #ruby
[21:02:21] ngw: has joined #ruby
[21:22:21] ngw: has joined #ruby
[21:32:02] orbyt_: has joined #ruby
[21:32:59] blackmesa1: has joined #ruby
[21:41:07] shenghi: has joined #ruby
[21:41:53] orbyt_: has joined #ruby
[21:42:19] ngw: has joined #ruby
[21:46:20] cranq: has joined #ruby
[22:02:19] ngw: has joined #ruby
[22:03:17] SeepingN: has joined #ruby
[22:10:12] Renich: has joined #ruby
[22:10:22] Xiti: has joined #ruby
[22:10:34] gravitation: has joined #ruby
[22:10:35] octos: has joined #ruby
[22:17:45] sgen: has joined #ruby
[22:20:04] conta: has joined #ruby
[22:24:58] ngw: has joined #ruby
[22:27:43] Puppet`: Why do I over think everything when it comes to what i'm trying to do. It drives me insane.
[22:29:01] BrianJ: has joined #ruby
[22:29:21] BrianJ: Um JSON.parse doesnt supported nested objects?
[22:36:12] cd: has joined #ruby
[22:44:48] ngw: has joined #ruby
[22:45:08] xrexeon: has joined #ruby
[22:45:58] xrexeon: has joined #ruby
[22:51:34] phaul: &>> JSON.parse('{"a":{"b":1}}')
[22:51:40] rubydoc: # => (https://carc.in/#/r/690z)
[22:52:17] al2o3-cr: &>> JSON["{\"a\":{\"b\":{\"c\":{\"d\":{\"e\":42}}}}}"]
[22:52:18] rubydoc: # => uninitialized constant JSON (NameError) (https://carc.in/#/r/6911)
[22:52:28] al2o3-cr: &>> require 'json'; JSON["{\"a\":{\"b\":{\"c\":{\"d\":{\"e\":42}}}}}"]
[22:52:29] rubydoc: # => {"a"=>{"b"=>{"c"=>{"d"=>{"e"=>42}}}}} (https://carc.in/#/r/6912)
[22:52:36] pedahzur: has joined #ruby
[22:53:29] phaul: hi al2o3-cr
[22:53:42] al2o3-cr: o/ phaul ;)
[22:56:11] conta: has joined #ruby
[22:56:22] pedahzur: I'm using the answer here: https://stackoverflow.com/questions/39109656/get-ip-address-for-a-specific-network-interface-on-ruby to get the IP address of my eth0 interface. However, there are two objects with 'name' of eth0, and they have different IP addresses. The `ifconfig` command shows only one IP address. Any idea where Socket could be getting the second IP address for eth0?
[22:58:34] phaul: ?code pedahzur
[22:59:12] phaul: pedahzur: please share your code with us, so we can take a look
[22:59:35] phaul: ACTION also pokes ruby[bot]
[23:00:44] pedahzur: phaul: https://gist.github.com/jkugler/4bfdce59b20c20403e0e782df377bb04
[23:03:15] ramfjord: has joined #ruby
[23:04:08] pedahzur: Seems `ip addr` reports two IP addresses. This should not be happening. Very strange.
[23:04:36] al2o3-cr: pedahzur: is one your vagrant ip address and the other local ip address?
[23:04:40] ngw: has joined #ruby
[23:04:57] al2o3-cr: are you logged into some virtual vm?
[23:05:09] Junaos: has joined #ruby
[23:07:50] fredolinhares: has joined #ruby
[23:08:21] pedahzur: al2o3-cr: Not sure what you mean by "vagrant IP address vs. local IP address." When the box comes up, it gets an address from the DHCP server. And the two addresses it gets vary every time, so it's not something left over from making the box.
[23:10:51] al2o3-cr: so it's dynamically assigning two ip addresses for on NIC?
[23:11:14] al2o3-cr: hmm, not sure what's going on there then.
[23:13:38] pedahzur: Yeah, I really don't know what's going on either. When I restart networking, it clears out the "extra" address.
[23:14:24] pedahzur: And only reports the one given by "ifconfig."
[23:15:03] johnny56_: has joined #ruby
[23:15:31] phaul: what causes the extra address to appear?
[23:15:44] pedahzur: phaul: That's what I'm trying to figure out. :)
[23:16:59] phaul: I assumed you could reproduce this. So now that you cleared it it's all good and the 2nd address is not coming back
[23:17:50] phaul: or it comes back after a while?
[23:18:16] al2o3-cr: well, `ip addr` will report what `Socket.getifaddrs` reports, as they both use rtnetlink. ifconfig uses ioctl.
[23:18:49] pedahzur: I don't know if comes back after a while. But it seems something odd in the network stack, so not a Ruby Socket problem after all. I guess I'll just restart networking before I pull the information if I have to. That is rather odd.
[23:19:03] al2o3-cr: which is ancient now in our day and age.
[23:20:11] evdubs: has joined #ruby
[23:24:23] ngw: has joined #ruby
[23:37:41] r29v: has joined #ruby
[23:44:25] ngw: has joined #ruby
[23:52:42] ramfjord: has joined #ruby
[23:53:36] Renich_: has joined #ruby