« Back to channel list

#ruby - 14 December 2018

« Back 1 day Forward 1 day »
[00:17:40] eckhardt: has joined #ruby
[00:19:15] blackmesa: has joined #ruby
[00:20:01] hutch: has joined #ruby
[00:21:30] ur5us: has joined #ruby
[00:30:17] dbz: has joined #ruby
[00:30:19] Renich: has joined #ruby
[00:32:45] crankharder: has joined #ruby
[00:36:04] s3nd1v0g1us: has joined #ruby
[00:38:59] tomasm-: has joined #ruby
[00:39:22] bak1an: has joined #ruby
[00:46:51] SirFunk: has joined #ruby
[00:47:12] hutch: has joined #ruby
[00:53:54] crankharder: has joined #ruby
[01:03:11] Renich: has joined #ruby
[01:23:32] tomasm-: is there a way to start a separate process (a shell command) that does attach to STDOUT? I'm noticing that when I pipe my script to something like 'tee' that STDIN never closes because that spawned process is attached to it. If that makes any sense. lol.
[01:32:58] blackmesa: has joined #ruby
[01:35:13] bambanx: has joined #ruby
[01:35:43] Azure: has joined #ruby
[01:37:48] nexraf1: has joined #ruby
[01:43:33] nexraf1: has joined #ruby
[01:43:47] hutch: has joined #ruby
[01:44:16] tiff_: has joined #ruby
[01:49:17] carbone5: has joined #ruby
[02:11:46] nchambers: has joined #ruby
[02:14:09] Azure: has joined #ruby
[02:16:06] _whitelogger: has joined #ruby
[02:18:59] cpruitt: has joined #ruby
[02:23:51] serard: has joined #ruby
[02:25:07] gigetoo: has joined #ruby
[02:32:23] Azure: has joined #ruby
[02:33:37] crankhar1er: has joined #ruby
[02:38:56] hutch: has joined #ruby
[02:44:28] Azure: has joined #ruby
[02:45:15] kapil____: has joined #ruby
[02:54:51] carbone5: has joined #ruby
[02:59:23] hutch: has joined #ruby
[03:11:12] serard_: has joined #ruby
[03:11:18] tiff_: has joined #ruby
[03:12:43] Azure: has joined #ruby
[03:13:28] sidepocket: has joined #ruby
[03:13:45] graphene: has joined #ruby
[03:14:18] cpruitt: has joined #ruby
[03:16:42] Fusl: has joined #ruby
[03:16:57] arescorpio: has joined #ruby
[03:20:31] Kilo`byte: has joined #ruby
[03:24:01] maryo: has joined #ruby
[03:25:57] xall: has joined #ruby
[03:27:57] carbone5: has joined #ruby
[03:31:46] carbone5: has joined #ruby
[03:43:41] serard_: has joined #ruby
[03:57:37] cd: has joined #ruby
[04:01:00] graphene: has joined #ruby
[04:06:47] lose: has joined #ruby
[04:09:05] braincrash: has joined #ruby
[04:16:33] roshanavand1: has joined #ruby
[04:22:58] graphene: has joined #ruby
[04:30:35] venmx: has joined #ruby
[04:32:45] aef: has joined #ruby
[04:41:00] KeyJoo: has joined #ruby
[04:45:00] graphene: has joined #ruby
[04:49:01] cpruitt: has joined #ruby
[04:52:51] alnewkirk: has joined #ruby
[04:56:45] nertzy: has joined #ruby
[04:58:20] roshanavand: has joined #ruby
[05:00:15] sauvin: has joined #ruby
[05:07:54] sriehl: has joined #ruby
[05:10:20] cpruitt: has joined #ruby
[05:25:07] tmxcax: has joined #ruby
[05:26:10] Fusl: has joined #ruby
[05:29:28] tmxcax: has joined #ruby
[05:31:43] tmxcax: has left #ruby: ()
[05:37:41] nertzy: has joined #ruby
[05:40:21] graphene: has joined #ruby
[05:52:41] cpruitt: has joined #ruby
[05:55:31] CrazyEddy: has joined #ruby
[05:57:02] roshanavand: has joined #ruby
[06:04:33] neuraload: has joined #ruby
[06:11:41] cpruitt: has joined #ruby
[06:13:30] graphene: has joined #ruby
[06:23:36] reber: has joined #ruby
[06:24:03] conta: has joined #ruby
[06:32:00] cpruitt: has joined #ruby
[06:33:33] aupadhye: has joined #ruby
[06:34:54] aufi: has joined #ruby
[06:38:41] zxq2: has joined #ruby
[06:42:21] jokester: has joined #ruby
[07:05:50] cpruitt: has joined #ruby
[07:17:53] neuraload: has joined #ruby
[07:35:22] marz_d`ghostman: has joined #ruby
[07:36:07] cpruitt: has joined #ruby
[07:37:00] marz_d`ghostman: Is using a class variable within a method a good practice? https://gist.github.com/marzdgzmn/da15a290e3ae436e69d18adf5f9bffd6
[07:52:06] yasserhussain111: has joined #ruby
[07:52:47] yasserhussain111: has left #ruby: ()
[07:54:01] havenwood: marz_d`ghostman: It's generally not good practice to use class variables.
[07:54:02] havenwood: marz_d`ghostman: How about a constant?
[07:54:18] havenwood: marz_d`ghostman: DB = Configuration.database
[07:57:29] roshanavand: has joined #ruby
[08:00:36] za1b1tsu: has joined #ruby
[08:07:09] clemens3: has joined #ruby
[08:07:51] marz_d`ghostman: havenwood: a constant inside a module? then I can refer to it in module methods included in an object . . . I'll try that
[08:11:33] cpruitt: has joined #ruby
[08:11:37] marz_d`ghostman: havenwood: thanks
[08:12:03] havenwood: marz_d`ghostman: you're welcome
[08:17:37] Freshnuts: has joined #ruby
[08:17:41] marz_d`ghostman: is there a way I can refer to object on other modules in shorthand like I have two modules Foo::Bar::Configuration and Foo::Bar::Logging, I want to refer to the objects in COnfiguration from Logging.
[08:29:33] clemens3: has joined #ruby
[08:33:57] nowhere_man: has joined #ruby
[08:48:03] prestorium: has joined #ruby
[08:54:15] cpruitt: has joined #ruby
[09:07:07] keden: has joined #ruby
[09:08:01] fredmorcos: has joined #ruby
[09:13:22] ua: has joined #ruby
[09:25:50] tinyhippo: has joined #ruby
[09:34:20] Guest61854: has joined #ruby
[09:45:43] xuyuheng: has joined #ruby
[09:45:45] roshanavand: has joined #ruby
[09:49:26] mikecmpbll: has joined #ruby
[09:54:05] lypsis: has joined #ruby
[09:59:46] roshanavand: has joined #ruby
[10:00:36] za1b1tsu_: has joined #ruby
[10:11:54] neuraload: has left #ruby: ("Leaving")
[10:14:16] za1b1tsu: has joined #ruby
[10:24:14] cpruitt: has joined #ruby
[10:25:49] DTZUZO: has joined #ruby
[10:27:18] marz_d`ghostman: I'm testing a module and created a dummy class to include it. I'm getting an undefined method `update_result` method: https://gist.github.com/marzdgzmn/80c36df582ca10199a2b434cc343b676
[10:27:21] phaul: has joined #ruby
[10:27:29] marz_d`ghostman: Tried printing the public_instance_methods, and it seems to be there though
[10:31:09] phaul: marz_d`ghostman: you want Class.new { ... }.new
[10:31:22] roshanavand: has joined #ruby
[10:31:35] phaul: Class.new just creates the class, doesn'tn instantiate it
[10:32:18] phaul: &>> Class.new {}.class
[10:32:20] rubydoc: # => Class (https://carc.in/#/r/5seo)
[10:33:43] marz_d`ghostman_: has joined #ruby
[10:34:19] marz_d`ghostman_: Why is it giving me an undefined methods though?
[10:36:03] phaul: marz_d`ghostman_: because dummy in your case is not the instance that has the instance method. dummy.new.update_result would also work
[10:36:57] marz_d`ghostman_: phaul: so Class.new doesn't create the instance?
[10:37:21] DTZUZO: has joined #ruby
[10:37:27] phaul: 103135 phaul | Class.new just creates the class, doesn'tn instantiate it
[10:38:00] phaul: 103108 phaul | marz_d`ghostman: you want Class.new { ... }.new
[10:38:04] marz_d`ghostman_: phaul: I see, So I'll need to have it like (Class.new { include Database }).new. Thanks
[10:38:33] marz_d`ghostman_: I thought Class.new will create an instance of the class
[10:39:29] phaul: well, everything is an object and classes themselves are instances of class Class. So in a way Class.new is an instance, but not instance of your class, it *is* your class
[10:40:53] xall_: has joined #ruby
[10:44:57] mello: has joined #ruby
[10:47:36] mello: Hey! Could i please get some help to convert this curl into ruby, im stuck on how to get the file from params. https://pastebin.com/qG6b4xCB
[10:47:37] ruby[bot]: mello: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[10:48:51] xuyuheng: has joined #ruby
[10:50:19] mello: Hey! Could i please get some help to convert this curl into ruby, im stuck on how to get the file from params. https://gist.github.com/MelloHey/e18dfa14021774665922cf7a73169a39
[10:50:55] phaul: mello: you can use ARGV to access cmd line arguments
[10:51:14] phaul: https://www.codecademy.com/articles/ruby-command-line-argv
[10:51:43] phaul: https://code-maven.com/argv-the-command-line-arguments-in-ruby
[10:53:27] mello: phaul: yes, but isnt there away to do that curl in ruby as a proper post?
[10:54:50] phaul: mello: ah you mean http params. I misunderstood what you were asking nm
[10:55:15] mello: phaul: yes
[10:59:43] al2o3-cr: mello: you'll find this useful: https://jhawthorn.github.io/curl-to-ruby/
[11:01:17] mello: al2o3-cr: yes thank you, i tried that and got a start but i dsoent support -F atm and thats where im stuck
[11:09:03] aupadhye: has joined #ruby
[11:11:47] al2o3-cr: mello: you'll need Net::HTTPRequest#set_form
[11:15:50] roshanavand: has joined #ruby
[11:21:14] al2o3-cr: mello: https://gist.github.com/beb927353dddfd5c9e7a41ddee93bba2
[11:26:04] mello: trying that
[11:26:16] mello: the continue was mean for byebug :)
[11:26:25] al2o3-cr: mello: ah, ;)
[11:27:07] neuraload: has joined #ruby
[11:27:35] dellavg_: has joined #ruby
[11:30:05] serard_: has joined #ruby
[11:32:37] marz_d`ghostman_: In sqlite3, do we have to explicitly define the `id INTEGER PRIMARY KEY` row when creating a new table?
[11:39:43] canton7: depends whether you want a column that's called 'id' and is the primary key
[11:50:45] dbz: has joined #ruby
[11:59:45] serard_: has joined #ruby
[12:03:18] cpruitt: has joined #ruby
[12:06:23] rubydoc: has joined #ruby
[12:06:48] phaul: has joined #ruby
[12:07:15] johnny56: has joined #ruby
[12:10:58] ElFerna: has joined #ruby
[12:13:06] GodFather: has joined #ruby
[12:16:54] bak1an: has joined #ruby
[12:24:36] lucasb: has joined #ruby
[12:29:46] TheBloke: has joined #ruby
[12:39:05] cpruitt: has joined #ruby
[12:45:10] conta: has joined #ruby
[12:53:30] neuraload: has joined #ruby
[12:54:24] venmx: has joined #ruby
[13:01:34] mostlybadfly: has joined #ruby
[13:02:12] jcalla: has joined #ruby
[13:18:38] aupadhye: has joined #ruby
[13:19:37] rippa: has joined #ruby
[13:20:21] Dbugger: has joined #ruby
[13:21:41] voiceftp: has joined #ruby
[13:23:21] AJA4350: has joined #ruby
[13:27:55] ciscam: has joined #ruby
[13:29:41] ddffg: has joined #ruby
[13:32:40] _joes_: has joined #ruby
[13:32:59] BH23: has joined #ruby
[13:38:13] cow[moo]: has joined #ruby
[13:55:17] Inline: has joined #ruby
[14:00:08] kapil____: has joined #ruby
[14:00:15] ElFerna: has joined #ruby
[14:02:55] Dbugger: has joined #ruby
[14:04:09] cow[moo]: has joined #ruby
[14:04:56] alan_w: has joined #ruby
[14:06:12] uplime: has joined #ruby
[14:16:30] cow[moo]: has joined #ruby
[14:16:34] rubydoc: has joined #ruby
[14:19:03] cpruitt: has joined #ruby
[14:19:33] cow[moo]: has joined #ruby
[14:26:47] crankhar1er: has joined #ruby
[14:28:44] BH23: has joined #ruby
[14:28:45] _joes_: has joined #ruby
[14:29:18] chouhoulis: has joined #ruby
[14:34:35] GinoMan: has joined #ruby
[14:38:13] coderphive: has joined #ruby
[14:38:50] krawchyk: has joined #ruby
[14:40:26] fredmorcos: has joined #ruby
[14:49:29] Rapture: has joined #ruby
[14:58:33] RougeR: has joined #ruby
[15:02:29] RougeR: hey, can i get some advice on this
[15:02:30] RougeR: https://pastebin.com/qtpfNjbJ
[15:02:31] ruby[bot]: RougeR: as I told you already, please use https://gist.github.com
[15:02:45] RougeR: yeah ruby bot i dont have my pw manager with me
[15:02:50] RougeR: so paste bin will do
[15:03:39] quipa: has joined #ruby
[15:07:55] nexraf1: has joined #ruby
[15:09:56] BH23: has joined #ruby
[15:09:59] _joes_: has joined #ruby
[15:11:05] cow[moo]: has joined #ruby
[15:16:49] hutch: has joined #ruby
[15:17:12] uplime: RougeR: you don't need an account to use gist.github
[15:17:17] uplime: and theres a million alternatives
[15:17:39] agent_white: has joined #ruby
[15:21:12] gnufied: has joined #ruby
[15:21:39] krawchyk: has joined #ruby
[15:21:48] polishdub: has joined #ruby
[15:22:18] nexraf1: has joined #ruby
[15:25:27] al2o3-cr: uplime: i think you do now.
[15:26:27] uplime: ah sorry, that does look to be the case
[15:26:30] uplime: is that recent?
[15:26:54] al2o3-cr: uplime: i think so.
[15:29:37] phaul: This was discussed a while back and that's how the topic ended up with dpaste.de. For rubybot we need apeiros..
[15:29:55] uplime: personally I like to use clbin.com
[15:30:00] uplime: but dpaste is good too
[15:39:01] RougeR: yeah. im happy to use dpaste though
[15:43:09] RougeR: https://dpaste.de/ypNC
[15:43:15] RougeR: new n improved
[15:48:31] GodFather_: has joined #ruby
[15:49:22] Cthulu201: has joined #ruby
[15:51:30] d^sh: has joined #ruby
[15:58:12] _joes_: has joined #ruby
[15:58:16] BH23: has joined #ruby
[15:58:54] bambanx: has joined #ruby
[16:07:42] RedNifre: has joined #ruby
[16:08:46] cschneid: has joined #ruby
[16:09:36] jobewan: has joined #ruby
[16:18:48] ua: has joined #ruby
[16:19:47] dinfuehr: has joined #ruby
[16:32:50] bambanx: has joined #ruby
[16:33:23] davidw: has joined #ruby
[16:34:07] Xiti: has joined #ruby
[16:41:16] _joes_: has joined #ruby
[16:41:17] BH23: has joined #ruby
[16:47:06] GinoMan2440: has joined #ruby
[16:54:20] dinfuehr: has joined #ruby
[17:14:22] darkhanb: has joined #ruby
[17:17:27] ElFerna: has joined #ruby
[17:20:38] phaul: has joined #ruby
[17:21:25] Renich: has joined #ruby
[17:23:52] dinfuehr: has joined #ruby
[17:24:37] nowhere_man: has joined #ruby
[17:27:52] agent_white: has joined #ruby
[17:32:03] dinfuehr: has joined #ruby
[17:39:53] dinfuehr: has joined #ruby
[17:40:31] spacesuitdiver: has joined #ruby
[17:40:55] spacesuitdiver: I'm trying to just use bundler with rvm and get this... `.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/resolver.rb:231:in `search_for': Unable to resolve dependency: user requested 'did_you_mean (= 1.2.0)' (Gem::UnsatisfiableDependencyError)`
[17:49:24] dinfuehr: has joined #ruby
[17:50:08] serard_: has joined #ruby
[17:52:07] cthulchu: should the indentation go one level up after method def?
[17:52:19] venmx: has joined #ruby
[17:53:12] cthulchu: so it's like class is lobby, everything in it is the first floor, including methods' defs but then everything inside the methods is the second floor
[17:53:59] cthulchu: just like with everything else: the bodies' of code beginnings and endings are on one level lower than the bodies.
[17:54:40] mikecmpbll: has joined #ruby
[17:57:57] coltkirk: has joined #ruby
[17:58:12] dbz: has joined #ruby
[17:58:55] conta: has joined #ruby
[17:58:56] graphene: has joined #ruby
[18:04:09] ellcs: has joined #ruby
[18:07:12] conta: has joined #ruby
[18:16:26] dinfuehr: has joined #ruby
[18:24:27] dinfuehr: has joined #ruby
[18:25:54] ElFerna: has joined #ruby
[18:32:03] eckhardt: has joined #ruby
[18:33:58] dinfuehr: has joined #ruby
[18:40:58] graphene: has joined #ruby
[18:43:42] Lytol: has joined #ruby
[18:47:38] phaul: and toplevel is outside .. :)
[18:47:47] mistergibson: has joined #ruby
[18:48:11] serard_: has joined #ruby
[18:59:21] cd: has joined #ruby
[19:11:51] reber: has joined #ruby
[19:23:54] graphene: has joined #ruby
[19:25:05] conta2: has joined #ruby
[19:26:22] nertzy: has joined #ruby
[19:34:11] Axsuul: has joined #ruby
[19:44:24] reber: has joined #ruby
[19:49:40] cliluw: has joined #ruby
[19:52:09] lose: has joined #ruby
[19:54:28] krawchyk: is there an easy way to convert a hash's keys to_i?
[19:55:26] phaul: &ri transform_keys
[19:55:26] rubydoc: https://ruby-doc.org/core-2.5.3/Hash.html#method-i-transform_keys
[19:56:00] krawchyk: hah i wish i were in 2.5.3 thanks phaul i might have to reduce over the hash pairs
[19:57:22] phaul: Hash[ hash.map {|k, v| [ k.to_i, v] } ] ?
[19:57:22] blackswan: has joined #ruby
[19:58:08] krawchyk: haha exactly, saved me some time thanks
[19:59:01] phaul: &>> Hash[ {?1 => :a, ?2 => :b }.map { |k, v| [k.to_i, v] } ]
[19:59:03] rubydoc: # => {1=>:a, 2=>:b} (https://carc.in/#/r/5skx)
[19:59:12] havenwood: krawchyk: #to_h has been around a while
[19:59:53] havenwood: &>> {?1 => :a, ?2 => :b }.map { |k, v| [k.to_i, v] }.to_h
[19:59:54] rubydoc: # => {1=>:a, 2=>:b} (https://carc.in/#/r/5sky)
[20:00:20] krawchyk: yea i used to_h instead, easier to read thanks havenwood
[20:02:23] SeepingN: has joined #ruby
[20:11:36] havenwood: I look forward to the new block form of #to_h in 2.6.
[20:13:57] d^sh: has joined #ruby
[20:18:00] phaul: 25th of Dec, right? only 11 sleeps away :)
[20:18:42] Renich: has joined #ruby
[20:31:37] Tempesta: has joined #ruby
[20:33:53] ua: has joined #ruby
[20:51:58] graphene: has joined #ruby
[20:54:02] Renich: has joined #ruby
[20:55:05] Renich: has joined #ruby
[20:55:24] Fridtjof: has joined #ruby
[20:55:57] eb0t: has joined #ruby
[21:00:06] beef_erikson: has joined #ruby
[21:02:03] RougeR: has joined #ruby
[21:02:16] eckhardt: has joined #ruby
[21:06:42] guardian: has joined #ruby
[21:12:02] eckhardt: has joined #ruby
[21:13:06] nchambers: has joined #ruby
[21:18:55] akem: has joined #ruby
[21:20:43] gix: has joined #ruby
[21:20:58] serard_: has joined #ruby
[21:32:02] aldodelgado: has joined #ruby
[21:33:46] SeepingN_: has joined #ruby
[21:39:16] serard_: has joined #ruby
[21:45:46] smhuber: has joined #ruby
[21:55:03] ur5us: has joined #ruby
[21:57:49] coltkirk: has left #ruby: ("ERC (IRC client for Emacs 26.1)")
[22:09:18] graphene: has joined #ruby
[22:09:23] tag: has joined #ruby
[22:17:36] serard_: has joined #ruby
[22:17:49] fluxAeon: has joined #ruby
[22:19:50] perique: has joined #ruby
[22:32:36] Nahra: has joined #ruby
[22:49:21] bambanx: has joined #ruby
[23:00:41] camilasan: has joined #ruby
[23:08:58] orbyt_: has joined #ruby
[23:09:01] graphene: has joined #ruby
[23:09:54] fowl: has joined #ruby
[23:09:54] ChanServ: ChanServ kicked fowl: Obsessive troll, see http://logs.ryanbigg.com/p/fowl
[23:11:16] ChanServ: +o havenwood
[23:12:07] nakuku: has joined #ruby
[23:14:17] Paraxial: has joined #ruby
[23:16:47] nakuku: Hello. I'm not sure this question belongs here but...In my app in will need credit card and KNET payments. Does anybody have experience with KNET (Kuwait Payment gateway) in rails?
[23:19:13] SeepingN_: I think you may want to ask that in a forum and sign up for reply notifications
[23:19:27] Puffball: has joined #ruby
[23:20:02] lose: has joined #ruby
[23:21:31] ruby[bot]: -b *!*@c-76-28-115-114.hsd1.ct.comcast.net$#ruby-banned
[23:22:34] graphene: has joined #ruby
[23:37:08] akem: has joined #ruby
[23:40:01] graphene: has joined #ruby