« Back to channel list

#ruby - 22 December 2017

« Back 1 day Forward 1 day »
[00:01:33] alfiemax: has joined #ruby
[00:04:51] hahuang65: has joined #ruby
[00:04:57] Majora320: has joined #ruby
[00:05:53] Majora320: In general, should you use a gem for a small purely executable project?
[00:06:50] elphe: has joined #ruby
[00:07:17] Vircung: has joined #ruby
[00:11:51] al2o3-cr: sure, why not.
[00:14:48] chocoelho: has joined #ruby
[00:16:00] milardov_: has joined #ruby
[00:16:37] vichib: has joined #ruby
[00:19:25] hays: has joined #ruby
[00:20:50] Musashi007: has joined #ruby
[00:26:54] ironcamel: has joined #ruby
[00:29:08] k0mpa: has joined #ruby
[00:30:36] cagomez: has joined #ruby
[00:31:40] hays: can anyone help me understand why deriving from builtins like Array is a bad idea
[00:32:21] RickHull: hays: you mean inheritance vs composition?
[00:32:29] RickHull: inheritance is a fine tool -- it's not a bad idea
[00:32:34] RickHull: but it can be misapplied
[00:32:51] RickHull: composition tends to be more flexible
[00:33:43] hays: yeah i can see thta
[00:34:02] RickHull: where there is pushback against inheritance -- it's typically because inheritance can be overused -- it seems like the object oriented way to do things.
[00:34:23] RickHull: some problems are that: not every relationship that we are modeling matches inheritance
[00:34:54] RickHull: problems around multiple inheritance. is my table a child of furniture? or carpentry?
[00:35:11] hays: in one case i wanted something that behaved exactly like an array, except had some wrappers around some methods
[00:35:12] RickHull: also, the law of demeter is very hard to satisfy
[00:35:58] RickHull: er, hm, maybe i'm not thinking of law of demeter
[00:37:14] RickHull: hays: that sounds fine -- i'd think it would be like 10 minutes of coding
[00:37:14] alfiemax: has joined #ruby
[00:37:17] RickHull: got an example?
[00:38:00] hays: not on this machine
[00:38:15] hays: but one sec
[00:38:44] milardovich: has joined #ruby
[00:39:34] milardovich: has joined #ruby
[00:40:14] hays: https://bpaste.net/show/0e2bf2506c03 . in here those lines like srv.holding_registers. they are defined as Arrays and I am making them something inherited from array so I can capture calls to [] and []=
[00:41:19] hays: basically a thread/fiber gets spawned and then it just passes through to Array
[00:41:22] RickHull: yeah, so your other paste showed you doing some output and then calling super
[00:41:38] Jameser: has joined #ruby
[00:41:46] RickHull: as long as you are faithful to the original method signature, that should be fine
[00:42:02] RickHull: it doesn't make it a good idea, but it's reasonable
[00:42:12] Asher: has joined #ruby
[00:42:28] hays: is there a good place to look that up? the docs provide the information a bit differently
[00:42:54] RickHull: generally: `def [](*args); do_stuff_with(args); super(*args); end
[00:43:27] hays: yeah and []= is (*args,val) i think
[00:43:38] hays: but im guessing
[00:43:41] RickHull: no, *args means all the args
[00:44:18] hays: hmm so i guess if it doesnt take a block that would always work?
[00:44:42] shinnya: has joined #ruby
[00:44:53] RickHull: i'm a bit fuzzy, but maybe `def [](*args, &blk)`
[00:45:08] RickHull: and you can call super(*args, &blk)
[00:46:20] ResidentBiscuit: has joined #ruby
[00:47:36] hays: if its not a good idea, im curious what is a better idea, or why its a bad idea
[00:48:05] RickHull: if what is a good idea?
[00:48:28] workmad3: has joined #ruby
[00:48:46] RickHull: as I said before, a wrapper class that inherits from the thing is totally reasonable
[00:49:12] RickHull: it doesn't make it a good idea, nor a bad idea
[00:49:30] RickHull: it depends on what you want to do with it, and if you can make the wrapper class be faithful to the original
[00:51:52] MrSparkle: has joined #ruby
[00:52:03] RickHull: aha, now I remember what I was thinking of. Liskov substitution principle
[00:53:44] RickHull: so, if your array subclass adheres to https://en.wikipedia.org/wiki/Liskov_substitution_principle then you should definitely be AOK
[00:54:27] RickHull: I think it's a useful principle but it's reasonable to break it sometimes
[00:56:18] hays: ok yeah i think i meet that
[01:01:20] RickHull: and reading above, I think it's fine to do e.g. `$stderr.puts "item is a #{item.class}"`
[01:01:47] RickHull: what is generally to be avoided is using .class directly in your logic
[01:02:11] orbyt_: has joined #ruby
[01:02:20] RickHull: that is too brittle as it doesn't consider subclasses. instead use case or is_a?/kind_of?
[01:03:18] RickHull: or test responds_to?
[01:03:40] RickHull: or just go full duck typing and just call methods, and let NoMethodError indicate where the duck doesn't quack
[01:03:57] RickHull: but it's not always the case that 2 methods with the same name have the same semantics
[01:05:45] Vircung: has joined #ruby
[01:06:44] hays: someone suggested using a case stsatement
[01:07:19] hays: id want to copy how Array does it but the code is in C
[01:09:14] hays: if FIXNUM_P
[01:09:26] hays: not sure what that exaxtly means
[01:10:25] ged: has joined #ruby
[01:11:30] hays: the C code is actually really weird
[01:15:52] hays: but it seems like it has a check for if its a range
[01:16:41] hays: seriously weird https://bpaste.net/show/5b8f8f1dd610
[01:20:16] Majora320: What's standard practice for the file structure of an executable gem?
[01:20:22] Majora320: should you have as much as possible in lib/?
[01:20:28] Majora320: or in bin/?
[01:20:51] hays: oh i had a link on that i think
[01:25:05] hays: damn nevermind it was python
[01:27:47] pilne: has joined #ruby
[01:30:14] GodFather_: has joined #ruby
[01:31:05] meesles: has joined #ruby
[01:35:30] bkxd: has joined #ruby
[01:47:26] GodFather__: has joined #ruby
[01:48:42] RickHull: hays: just do your thing and then super(*args)
[01:48:48] RickHull: don't literally reimplement array
[01:48:56] mtkd: has joined #ruby
[01:49:20] pastorinni: has joined #ruby
[01:51:03] cdg: has joined #ruby
[01:51:37] guardianx: has joined #ruby
[01:52:16] hays: yeah im convinces a simple type check on range is sufficient
[01:52:39] hays: count args and type check for range. othewise treat like integer and let chips fall
[02:04:09] rfoust: has joined #ruby
[02:06:10] zautomata1: has joined #ruby
[02:13:25] lytol_: has joined #ruby
[02:17:21] tAn: has joined #ruby
[02:18:08] tAn: has joined #ruby
[02:18:15] milardovich: has joined #ruby
[02:19:20] tAn: has joined #ruby
[02:19:26] chouhoulis: has joined #ruby
[02:20:02] bkxd: has joined #ruby
[02:20:07] tAn: has joined #ruby
[02:20:40] bkxd: has joined #ruby
[02:21:01] tAn: has joined #ruby
[02:22:40] GodFather: has joined #ruby
[02:26:52] milardovich: has joined #ruby
[02:29:43] Ropeney: has joined #ruby
[02:30:30] Musashi007: has joined #ruby
[02:31:27] milardovich: has joined #ruby
[02:31:45] Musashi007: has joined #ruby
[02:34:23] meesles: has joined #ruby
[02:35:03] GodFather: has joined #ruby
[02:35:49] jaequery: has joined #ruby
[02:36:33] gizmore|2: has joined #ruby
[02:44:57] nadir: has joined #ruby
[02:46:19] GodFather: has joined #ruby
[02:48:19] workmad3: has joined #ruby
[02:49:38] milardovich: has joined #ruby
[02:50:01] chocoelho: has joined #ruby
[02:50:20] GodFather: has joined #ruby
[02:50:37] neo95: @godfather I pay my respects
[02:52:44] darkhanb: has joined #ruby
[02:55:30] GodFather: has joined #ruby
[02:55:33] milardovich: has joined #ruby
[02:56:43] monodoh: has joined #ruby
[02:57:03] tAn: has joined #ruby
[03:00:17] cadillac_: has joined #ruby
[03:00:51] milardovich: has joined #ruby
[03:04:48] milardovich: has joined #ruby
[03:04:53] sspreitz: has joined #ruby
[03:07:22] jeffreylevesque: has joined #ruby
[03:08:07] Musashi007: has joined #ruby
[03:12:31] vichib: has joined #ruby
[03:12:42] GodFather: has joined #ruby
[03:13:24] jaequery: has joined #ruby
[03:16:52] hlmjr: has joined #ruby
[03:19:29] milardovich: has joined #ruby
[03:20:22] zautomata2: has joined #ruby
[03:20:43] GodFather: has joined #ruby
[03:20:54] milardovich: has joined #ruby
[03:24:40] GodFather: has joined #ruby
[03:25:02] xco: has joined #ruby
[03:26:46] cdg: has joined #ruby
[03:29:01] GodFather: has joined #ruby
[03:32:55] sammi`: has joined #ruby
[03:36:21] j416: has joined #ruby
[03:37:39] Radar: TIL about <<~ vs <<- for heredoc strings :mindblown:
[03:37:48] Radar: https://stackoverflow.com/a/34888238/15245
[03:38:38] zautomata3: has joined #ruby
[03:40:40] tAn: has joined #ruby
[03:44:05] mk[]: has joined #ruby
[03:44:41] DmitryBochkarev: has joined #ruby
[03:51:12] zautomata4: has joined #ruby
[03:51:27] jaequery: has joined #ruby
[03:57:22] xco: has joined #ruby
[04:16:21] gix-: has joined #ruby
[04:16:25] safetypin: has joined #ruby
[04:21:05] kies: has joined #ruby
[04:21:46] dtzuzu: has joined #ruby
[04:23:38] tAn: has joined #ruby
[04:33:46] zautomata: has joined #ruby
[04:37:30] zautomata1: has joined #ruby
[04:47:09] enterprisey: has joined #ruby
[04:48:11] workmad3: has joined #ruby
[04:59:45] cagomez: has joined #ruby
[05:03:10] zautomata3: has joined #ruby
[05:07:24] cagomez: has joined #ruby
[05:08:28] alfiemax: has joined #ruby
[05:13:45] Puffball_: has joined #ruby
[05:19:22] zautomata: has joined #ruby
[05:21:44] kies: has joined #ruby
[05:22:53] zautomata1: has joined #ruby
[05:25:19] zautomata2: has joined #ruby
[05:34:59] tAn: has joined #ruby
[05:35:15] suresh: has joined #ruby
[05:40:39] aupadhye: has joined #ruby
[05:43:58] cagomez: has joined #ruby
[05:45:39] anisha: has joined #ruby
[05:46:12] apeiros: Radar: yeah, <<~ is quite new. and I guess in rails there was (is) .strip_heredoc
[05:46:30] suresh: has left #ruby: ()
[05:47:29] apeiros: though iirc .strip_heredoc orients itself on the first indent, while <<~ cares about the least/smallest indent
[05:47:32] meesles: has joined #ruby
[05:48:01] apeiros: ah no, short test shows .strip_heredoc also uses least indent
[05:49:26] gauravgoyal: has joined #ruby
[05:51:16] zautomata3: has joined #ruby
[05:51:46] iamarun: has joined #ruby
[06:00:16] apeiros: has joined #ruby
[06:05:55] anisha: has joined #ruby
[06:06:52] KeyJoo: has joined #ruby
[06:07:36] cdg: has joined #ruby
[06:10:29] reber: has joined #ruby
[06:13:42] DmitryBochkarev: has joined #ruby
[06:18:34] tvw: has joined #ruby
[06:19:56] tAn: has joined #ruby
[06:26:46] Ishido: has joined #ruby
[06:26:51] naprimer: has joined #ruby
[06:29:22] zautomata4: has joined #ruby
[06:32:20] sammi`: has joined #ruby
[06:33:24] alfiemax: has joined #ruby
[06:33:24] rippa: has joined #ruby
[06:37:41] tvw: has joined #ruby
[06:44:45] nofxx: has joined #ruby
[06:48:04] workmad3: has joined #ruby
[06:48:52] Swat2: has joined #ruby
[06:50:14] \0: has joined #ruby
[06:50:49] apeiros: has joined #ruby
[06:54:51] tvw: has joined #ruby
[06:56:41] tvw: has joined #ruby
[07:00:50] \0: has left #ruby: ()
[07:03:05] tAn: has joined #ruby
[07:04:16] darkhanb: has joined #ruby
[07:14:41] jaequery: has joined #ruby
[07:15:33] conta: has joined #ruby
[07:17:38] ShekharReddy: has joined #ruby
[07:18:38] bkxd: has joined #ruby
[07:19:29] jaequery: has joined #ruby
[07:20:19] tAn: has joined #ruby
[07:28:36] dtzuzu: has joined #ruby
[07:28:45] zautomata: has joined #ruby
[07:28:55] alfiemax: has joined #ruby
[07:30:01] Musashi007: has joined #ruby
[07:32:49] andikr: has joined #ruby
[07:34:06] jaequery: has joined #ruby
[07:35:05] stealth[]: has joined #ruby
[07:36:47] bkxd: has joined #ruby
[07:37:32] tvw: has joined #ruby
[07:38:41] tvw: has joined #ruby
[07:46:35] zautomata: has joined #ruby
[07:48:24] gizmore: has joined #ruby
[08:01:43] mikhael_k33hl: has joined #ruby
[08:01:44] coderxin: has joined #ruby
[08:02:05] mikhael_k33hl: If you require a gem on one of your files that is required by another file, will the gem be propagated on that file?
[08:02:33] mikhael_k33hl: So I can just have one file that requires all gem, and have the all other files require that one file?
[08:02:56] TomyWork: has joined #ruby
[08:03:31] mozzarella: why would you do that
[08:04:32] mikhael_k33hl: mozzarella: uhhhm, cause I'm planning to use celluloid and I have a worker and workergoup classes, so I was wondering if I alreayd require celluloid on WorkerGroup and that workerGroup requires the worker class, will the gems be propagated?
[08:04:41] mikhael_k33hl: Or will I need to require 'celluloid' on both of them?
[08:06:39] mk[]: it probably wouldn't hurt to require in every file it's used
[08:07:38] mk[]: require is idempotent
[08:07:56] mikhael_k33hl: mk[]: Oh I see . . . might as well do that then
[08:08:54] Puffball: has joined #ruby
[08:08:58] apeiros: mikhael_k33hl: yes, if you require a file which requires a file which requires a file, all 3 files will be loaded
[08:09:14] apeiros: and it's sensible to require everything you depend on in a file
[08:09:50] apeiros: if that feels repetitive, have a "hub" require. e.g. foo.rb requires 20 things, foo/xy.rb foo/xz.rb etc. then just require 'foo' (and hence delegate all requries)
[08:10:34] mikhael_k33hl: apeiros: the latter seems to be more organized IMHO
[08:10:52] mk[]: that's what bundler does, right?
[08:10:55] apeiros: the former is more declarative
[08:11:02] apeiros: mk[]: that's entirely unrelated to bundler
[08:11:28] apeiros: bundler cares about the presence of gems and isolating them from system env. it doesn't care about individual file requires.
[08:11:45] mk[]: you can make a gem with bundler
[08:11:52] apeiros: you don't say :)
[08:11:58] apeiros: it's still unrelated
[08:12:06] mk[]: semantics
[08:12:14] apeiros: if you say so
[08:12:46] adac: has joined #ruby
[08:13:02] mk[]: I meant bundler has a scheme for handling file requires for a new gem
[08:13:49] Musashi007: has joined #ruby
[08:13:51] anas: has joined #ruby
[08:14:04] mk[]: saying "it's unrelated" is just pedantic and boring
[08:14:35] mk[]: there are always connections in a bigger context
[08:14:42] apeiros: no, bundler does not have a scheme for handling file requires for a new gem.
[08:14:44] apeiros: that's simply wrong.
[08:15:22] apeiros: yes, it allows you to generate a gem skeleton for new gems. no, it does not contain any require scheme.
[08:15:57] mk[]: I guess it's not unique to bundler
[08:16:20] mk[]: but still related to it
[08:16:46] d2dchat: has joined #ruby
[08:16:58] d2dchat: I'm having the hardest time adding a file to a rubygem
[08:17:11] d2dchat: it's called thread.rb, which I don't think should be a problem
[08:17:13] apeiros: mk[]: I don't care enough to continue this conversation
[08:17:29] apeiros: d2dchat: it's a problem because ruby has that already.
[08:17:43] d2dchat: apeiros, I know that but, I'm not entirely sure that is the issue
[08:17:44] apeiros: d2dchat: pro tip: namespace your gems. don't have stuff in the toplevel.
[08:17:56] apeiros: e.g. d2dchat/thread.rb
[08:18:28] d2dchat: apeiros, https://gist.github.com/lancecarlson/286bc361bb07e9f21d6ceeb6839c2e27
[08:19:05] d2dchat: OK, I updated it, refresh
[08:19:08] mk[]: can ruby modules be reloaded?
[08:19:16] d2dchat: apeiros, so when I load up irb
[08:19:35] apeiros: d2dchat: ok, looks sane. is your problem related to line 6 in thread.rb?
[08:19:35] d2dchat: I do a require './lib/streak'
[08:19:45] jamesaxl: has joined #ruby
[08:19:51] JaccoP: has joined #ruby
[08:20:04] d2dchat: apeiros, updating with error, hold on
[08:20:15] apeiros: you don't have to include 'lib' in the require. lib should be in $LOAD_PATHS, so require 'streak/thread' (or require 'streak') should do it
[08:20:21] d2dchat: apeiros, error added
[08:20:43] claudiuinberlin: has joined #ruby
[08:20:54] apeiros: d2dchat: is this when you're working on the gem? as in, the gem is not yet installed?
[08:21:14] apeiros: irb -Ilib -rstreak
[08:21:23] apeiros: -I is uppercase i, not lowercase L
[08:21:29] apeiros: it adds lib to $LOAD_PATH
[08:21:45] d2dchat: apeiros, OI that did it
[08:21:53] d2dchat: apeiros, gracias haha
[08:22:18] apeiros: when the gem is installed, rubygems will handle the adding of lib to $LOAD_PATH
[08:22:58] apeiros: i.e. if you do `require 'streak'`, rubygems will search for gems with a matching file in their lib dir, activate the gem, and as part of that activation, add its lib dir to $LOAD_PATH
[08:23:37] d2dchat: apeiros, right. I was trying to contribute back to this gem and wanted to do a little bit of probing
[08:23:50] d2dchat: the specs on this gem are mocking out the request, so I didn't trust it
[08:24:07] d2dchat: and it's a good thing I didn't just commit this, because I'm getting an error
[08:24:13] d2dchat: need better specs!!
[08:24:18] mk[]: I really like how modules work in Erlang in terms of reloading, Ruby seems to only have it on the framework level
[08:24:27] zautomata: has joined #ruby
[08:24:44] d2dchat: mk[], erlang is also ugly :)
[08:24:56] apeiros: d2dchat: :) have fun!
[08:24:57] mk[]: d2dchat: the syntax?
[08:25:23] d2dchat: apeiros, thx! :)
[08:25:45] dionysus69: has joined #ruby
[08:25:46] d2dchat: it's been a minute since I've contribute to Ruby so
[08:25:52] d2dchat: I have to get my bearings ;)
[08:26:21] mk[]: also, no "green" threads for Ruby, right?
[08:26:49] ur5us: has joined #ruby
[08:27:07] d2dchat: mk[], huh? Green threads have been around forever
[08:27:48] havenwood: mk[]: Ruby 1.8 had green threads. Ruby 1.9 got system threads and fibers, which you have to schedule yourself.
[08:27:52] mk[]: oh nice, I haven't looked at that for a while
[08:28:22] havenwood: mk[]: There's a nice proposal in Ruby 3 for Thribers, which are lightweight green threads that can be system scheduled across multiple cores.
[08:29:11] havenwood: https://bugs.ruby-lang.org/issues/13618
[08:33:35] vondruch: has joined #ruby
[08:35:50] apeiros: ACTION still has to read up on guilds
[08:39:25] mk[]: I wonder how long it would take for the IT industry to adopt the actor model and/or software transactional memory
[08:39:36] mk[]: 10-15 years?
[08:48:00] workmad3: has joined #ruby
[08:48:05] coderxin: has joined #ruby
[08:51:01] zautomata1: has joined #ruby
[08:52:57] ur5us: has joined #ruby
[08:54:01] Guest87121: has joined #ruby
[08:54:22] rabajaj: has joined #ruby
[08:56:40] xavrix: has joined #ruby
[08:59:26] zautomata1: has joined #ruby
[09:00:50] konsolebox: has joined #ruby
[09:04:00] mikecmpbll: has joined #ruby
[09:08:37] alfiemax: has joined #ruby
[09:09:40] Kero: has joined #ruby
[09:12:15] Riddell: has joined #ruby
[09:12:51] gizmore|2: has joined #ruby
[09:13:16] amatas: has joined #ruby
[09:14:08] zwliew: has joined #ruby
[09:15:00] Musashi007: has joined #ruby
[09:17:45] zautomata2: has joined #ruby
[09:23:13] Musashi007: has joined #ruby
[09:29:13] adac: Hi! can i start firefox in background with selenium somehow?
[09:30:17] Musashi007: has joined #ruby
[09:31:05] mk[]: has joined #ruby
[09:33:00] krandi: has joined #ruby
[09:33:44] Ishido: has joined #ruby
[09:35:08] gizmore: has joined #ruby
[09:35:42] marr: has joined #ruby
[09:39:30] c0ncealed: has joined #ruby
[09:40:42] zautomata2: has joined #ruby
[09:44:59] cadillac_: has joined #ruby
[09:47:30] gizmore|2: has joined #ruby
[09:47:33] biberu: has joined #ruby
[09:49:49] milardovich: has joined #ruby
[09:50:42] TheBrayn: how is this a ruby question?
[09:50:55] vtx: has joined #ruby
[09:53:13] yxhuvud: adac: you don't. You tell capybara to use a different driver.
[09:53:15] milardovich: has joined #ruby
[09:53:31] yxhuvud: "headless", is the term you are looking for.
[09:53:44] adac: Yxhuvud, thanks for the hints!
[09:54:46] milardovich: has joined #ruby
[10:01:04] nertzy: has joined #ruby
[10:02:17] mikhael_k33hl: Anyone using Celluloid? Trying to use the SupervisionGroup but the yard docs seem to be unavailable
[10:03:15] mk[]: has left #ruby: ("WeeChat 1.9.1")
[10:06:57] gizmore: has joined #ruby
[10:07:46] Cavallari: has joined #ruby
[10:08:15] gizmore|3: has joined #ruby
[10:09:35] gizmore|4: has joined #ruby
[10:11:04] rahul_bajaj: has joined #ruby
[10:12:58] bkxd: has joined #ruby
[10:14:14] Serpent7776: has joined #ruby
[10:22:29] Mia: has joined #ruby
[10:22:29] Mia: has joined #ruby
[10:23:12] cdg: has joined #ruby
[10:28:21] jaruga: has joined #ruby
[10:32:56] workmad3: has joined #ruby
[10:34:11] milardovich: has joined #ruby
[10:37:00] rippa: has joined #ruby
[10:42:05] rabajaj: has joined #ruby
[10:46:10] ltem: has joined #ruby
[10:46:51] enterprisey: has joined #ruby
[10:50:34] milardovich: has joined #ruby
[10:53:15] elphe: has joined #ruby
[10:58:25] alfiemax: has joined #ruby
[10:58:46] apeiros_: has joined #ruby
[11:04:45] ferr: has joined #ruby
[11:15:54] ljarvis: i dun golfed some ruby https://twitter.com/lee_jarvis/status/944157086904127488 can anyone find any other wins?
[11:18:13] canton7: you'll probably need to post the un-golfed version to let people stand a chance :P
[11:18:37] ljarvis: yeah i scrubbed my history so will need to rebuild it oops
[11:23:45] tomphp: has joined #ruby
[11:24:44] ljarvis: here's an annotated version though :D https://gist.github.com/leejarvis/0d3f029754f0cf7cb9b54fb8942a62d5
[11:33:19] tomphp: has joined #ruby
[11:34:57] benlovell: has joined #ruby
[11:37:40] ferr: has left #ruby: ("WeeChat 2.0")
[11:41:10] mikeiniowa: has joined #ruby
[11:44:02] CrazyEddy: has joined #ruby
[11:45:18] heliumk: has joined #ruby
[11:47:25] jnollette: has joined #ruby
[11:56:50] konsolebox: has joined #ruby
[12:01:10] bweston92: has joined #ruby
[12:06:33] Takumo: has joined #ruby
[12:10:23] InfinityFye: has joined #ruby
[12:14:40] InfinityFye: has left #ruby: ()
[12:20:06] tsglove: has joined #ruby
[12:21:55] GodFather: has joined #ruby
[12:22:58] |ifei5g00d: has joined #ruby
[12:23:20] k0mpa: has joined #ruby
[12:24:02] chocoelho: has joined #ruby
[12:26:05] mostly-harmless: has joined #ruby
[12:31:33] vyorkin: has joined #ruby
[12:33:53] AJA4350: has joined #ruby
[12:37:27] hotsex: has joined #ruby
[12:37:31] hotsex: has left #ruby: ()
[12:40:15] milardovich: has joined #ruby
[12:40:34] bmurt: has joined #ruby
[12:42:24] miskatonic: has joined #ruby
[12:44:27] Psybur: has joined #ruby
[12:45:02] dminuoso: havenwood: Thriber?
[12:46:40] dminuoso: Why do all the asian folks get to pick names.
[12:46:56] Barrt: has joined #ruby
[12:47:25] chmurifree: has joined #ruby
[12:50:21] alfiemax: has joined #ruby
[12:51:56] elphe: has joined #ruby
[12:56:07] Cavallari1: has joined #ruby
[12:59:42] vondruch: has joined #ruby
[13:02:31] mikhael_k33hl: has joined #ruby
[13:02:42] mikhael_k33hl: Anyone using Celluloid? DO you have a good docuemntation for supervisors?
[13:06:46] hays_: has joined #ruby
[13:06:47] hays_: has joined #ruby
[13:07:07] nofxx1: has joined #ruby
[13:08:03] synthroid: has joined #ruby
[13:08:34] zautomata: has joined #ruby
[13:16:33] JaccoP: has joined #ruby
[13:20:36] mostlybadfly: has joined #ruby
[13:23:03] minimalism: has joined #ruby
[13:32:13] jeffreylevesque: has joined #ruby
[13:34:21] elphe_: has joined #ruby
[13:37:22] KeyJoo: has joined #ruby
[13:39:15] contradictioned: has joined #ruby
[13:40:36] contradictioned: has joined #ruby
[13:45:14] |ifei5g00d: has joined #ruby
[13:46:02] |ifei5g00d: has joined #ruby
[13:47:43] oleo2: has joined #ruby
[13:48:35] jeffreylevesque_: has joined #ruby
[13:50:56] kapil___: has joined #ruby
[14:00:08] zapata: has joined #ruby
[14:00:33] Silthias: has joined #ruby
[14:00:39] Silthias: has left #ruby: ()
[14:07:16] Veejay: has joined #ruby
[14:07:46] Veejay: Hello everyone, I was wondering, is there a way to force the falsiness/truthiness of a given object?
[14:08:40] Veejay: By having it implement some to_bool method or something
[14:08:48] alfiemax: has joined #ruby
[14:09:30] Veejay: Not anything I actually want to do, just curious
[14:10:05] hays_: Veejay: i was wonderin that yesterday
[14:15:30] hays: Veejay: only nil and false are falsey
[14:15:31] mtkd: has joined #ruby
[14:15:50] hays: odds of controlling this in a object.class seem small
[14:17:25] jobewan: has joined #ruby
[14:20:41] skweek: has joined #ruby
[14:21:58] ruby[bot]: dminuoso: # => false (https://eval.in/924418)
[14:21:59] ruby[bot]: dminuoso: # => true (https://eval.in/924419)
[14:22:01] ruby[bot]: dminuoso: # => true (https://eval.in/924420)
[14:22:41] rabajaj: has joined #ruby
[14:24:20] Musashi007: has joined #ruby
[14:25:34] workmad3_: has joined #ruby
[14:28:51] Ropeney: has joined #ruby
[14:28:58] supergeek: has joined #ruby
[14:31:48] Musashi007: has joined #ruby
[14:33:36] TheBrayn: We don't need no education
[14:33:48] |ifei5good: has joined #ruby
[14:35:27] shinnya: has joined #ruby
[14:37:45] Sightes: has joined #ruby
[14:40:46] synthroid: has joined #ruby
[14:43:02] alfiemax: has joined #ruby
[14:49:49] anisha: has joined #ruby
[14:51:31] hays: dminuoso: i assumed he meant to change/control under what conditions an object evaluates to true/false
[14:56:34] anisha: has joined #ruby
[15:07:35] polishdub: has joined #ruby
[15:11:17] gizmore: has joined #ruby
[15:12:03] nofxx: has joined #ruby
[15:14:04] infernix: has joined #ruby
[15:15:16] Mudstart: has joined #ruby
[15:16:50] anisha: has joined #ruby
[15:24:02] anisha: has joined #ruby
[15:33:59] cschneid_: has joined #ruby
[15:39:51] TomyLobo: has joined #ruby
[15:44:27] anisha: has joined #ruby
[15:48:24] infernix: has joined #ruby
[15:51:10] vtx: has joined #ruby
[15:58:18] anisha: has joined #ruby
[16:00:08] ^mtkd: has joined #ruby
[16:04:22] dn`: has joined #ruby
[16:06:05] anisha: has joined #ruby
[16:10:12] oleo: has joined #ruby
[16:11:28] CrazyEddy: has joined #ruby
[16:12:51] dinfuehr: has joined #ruby
[16:13:15] dionysus69: has joined #ruby
[16:17:37] dopie: has joined #ruby
[16:18:33] dopie: hey guyys im using the google drive ruby gem and trying to upload an image to to a folder... I keep on getting a TypeError and im not sure why as I followed the api docs
[16:18:36] dopie: https://gist.github.com/staycreativedesign/520ab9b6dad84a943acd3178f0aa25bc
[16:19:57] synthroid: has joined #ruby
[16:20:14] jaequery: has joined #ruby
[16:23:15] nofxx1: has joined #ruby
[16:26:14] anisha: has joined #ruby
[16:26:32] dopie: got it working woohoo
[16:32:26] alfiemax: has joined #ruby
[16:34:36] mtkd: has joined #ruby
[16:35:35] vichib: has joined #ruby
[16:36:57] bmurt: has joined #ruby
[16:37:55] anisha: has joined #ruby
[16:40:12] JaccoP: has joined #ruby
[16:43:37] Dreamer3: has joined #ruby
[16:45:27] anisha: has joined #ruby
[16:46:42] cagomez: has joined #ruby
[16:47:48] selim: has joined #ruby
[16:47:55] graft_: has joined #ruby
[16:51:30] chocoelho: has joined #ruby
[16:53:17] Cavallari: has joined #ruby
[17:04:44] anisha: has joined #ruby
[17:05:16] sanscoeur: has joined #ruby
[17:05:28] balo: has joined #ruby
[17:06:42] Musashi007: has joined #ruby
[17:07:21] raynold: has joined #ruby
[17:08:55] conta2: has joined #ruby
[17:10:58] claudiuinberlin: has joined #ruby
[17:13:56] alfiemax: has joined #ruby
[17:19:52] pastorinni: has joined #ruby
[17:24:09] KeyJoo: has joined #ruby
[17:27:32] Axy: has joined #ruby
[17:30:23] darkhanb: has joined #ruby
[17:31:03] Ishido: has joined #ruby
[17:31:52] Mia: has joined #ruby
[17:31:52] Mia: has joined #ruby
[17:33:32] vtx: has joined #ruby
[17:45:19] hfp_work: has joined #ruby
[17:45:39] mistergibson_: has joined #ruby
[17:46:24] jamesaxl: has joined #ruby
[17:50:33] mistergibson__: has joined #ruby
[17:54:34] mistergibson__: has joined #ruby
[17:57:51] synthroid: has joined #ruby
[17:58:54] vtx: has joined #ruby
[18:01:24] heliumk: has joined #ruby
[18:04:16] alfiemax: has joined #ruby
[18:11:30] Sylario: I have a ruby syntax question :
[18:11:31] Sylario: super do |user|
[18:11:34] heliumk: has joined #ruby
[18:11:45] Sylario: I have this in a method of a class with inheritance
[18:11:55] Sylario: where does the value passed to the block come from?
[18:18:44] TinkerTyper: has joined #ruby
[18:20:49] nogic: has joined #ruby
[18:28:35] heliumk: has joined #ruby
[18:37:15] gizmore: hi sylario
[18:38:07] gizmore: the method probably takes a block as parameter
[18:38:58] gizmore: super does not allow different args
[18:39:20] mtkd: has joined #ruby
[18:39:54] gizmore: i am not into ruby lately
[18:40:02] Sylario: It's devise stuff. I am not on this part of the auth, but I'll look into the context, even if it's pretty tricky
[18:40:34] gizmore: i know rails and devise a bit
[18:41:19] gizmore: your question is more ruvy related tho
[18:41:46] Sylario: I need to understand devise exactly because I am adding auth token for an ember front app on the second user model and also, the app still serve good old HTML
[18:42:10] gizmore: devise is a huge incompetent stash of bad code
[18:42:16] Sylario: so every tutorial for token auth is relevant, but i need to make adjutments for my specifric case
[18:42:18] gizmore: devise is a huge incompetent stash of bad code
[18:42:42] gizmore: why would you store activations in the user table
[18:42:53] gizmore: user table is the final real users
[18:42:57] gizmore: not the activations
[18:43:11] gizmore: devise => sucks
[18:43:31] Sylario: José valim is a noob?
[18:43:48] gizmore: in terms of working path / user process
[18:44:00] apeiros_: has joined #ruby
[18:44:12] milardovich: has joined #ruby
[18:44:41] gizmore: sylario: you enter your nick and its ultimatively taken
[18:44:51] gizmore: that was devise of the art back in 201?
[18:45:07] Sylario: What do you mean?
[18:45:18] gizmore: you choose a mail / nick
[18:45:23] gizmore: and then its taken
[18:45:34] gizmore: you can resend token yeah
[18:45:48] gizmore: but if someone else comes up with the same nick.... bad luck
[18:46:00] gizmore: it's kinda DoS
[18:46:17] gizmore: also bad process / register signup process
[18:46:21] gizmore: bad bad flow
[18:46:27] gizmore: devise sucks
[18:47:33] jaequery: has joined #ruby
[18:49:56] aScottishBoat: has joined #ruby
[18:55:58] nofxx: has joined #ruby
[18:57:44] cagomez: has joined #ruby
[18:58:42] cagomez: has joined #ruby
[18:59:28] conta1: has joined #ruby
[19:01:08] c0ncealed: has joined #ruby
[19:07:54] SeepingN: has joined #ruby
[19:16:42] nickjj: has joined #ruby
[19:19:24] TomyLobo: oh, that's a commonly used library that does that? explains a ton of pages where that happened
[19:26:31] ahrs: has joined #ruby
[19:39:46] monodoh: has joined #ruby
[19:40:43] monodoh: has left #ruby: ()
[19:41:26] mensvaga: has left #ruby: ()
[19:42:29] ammar: has joined #ruby
[19:47:31] Riddell: has joined #ruby
[19:53:01] apeiros_: has joined #ruby
[19:53:38] KeyJoo: has joined #ruby
[19:58:57] zautomata: has joined #ruby
[20:02:34] Klumben: has joined #ruby
[20:06:33] dtzuzu: has joined #ruby
[20:21:19] vtx: has joined #ruby
[20:22:04] dviola: has joined #ruby
[20:23:12] cschneid_: has joined #ruby
[20:26:18] neo95: has joined #ruby
[20:31:02] Cavallari: has joined #ruby
[20:37:21] garyserj: has joined #ruby
[20:39:24] banisterfiend: has joined #ruby
[20:44:01] mtkd: has joined #ruby
[20:45:18] chocoelho1: has joined #ruby
[20:45:21] garyserj: How can I install a gem so that only my application can use it so it's not globally installed?
[20:47:42] alfiemax: has joined #ruby
[20:49:29] amatas: has joined #ruby
[20:51:38] apeiros_: garyserj: that's what you'd use bundler for
[20:57:32] bkxd: has joined #ruby
[20:57:51] amatas: has joined #ruby
[20:58:32] al2o3-cr: apeiros_: can you also use gemsets?
[20:59:37] apeiros: sure. though bundler is being merged into rubygems, so I'd rather go with bundler
[20:59:45] elijah: has joined #ruby
[21:00:05] al2o3-cr: i wasn't sure, so i thought i'd ask :)
[21:00:49] safetypin: has joined #ruby
[21:01:01] al2o3-cr: that's in 2.5 release then i imagine.
[21:01:15] apeiros: not sure how far they are
[21:01:28] apeiros: 2.3 and 2.4's rubygems can already process the gemfile iirc
[21:01:45] Guest19031: has left #ruby: ()
[21:03:04] zautomata1: has joined #ruby
[21:03:15] nofxx1: has joined #ruby
[21:05:22] AgentVenom: has joined #ruby
[21:06:01] garyserj: but if in my gem file I do e.g. source 'https://rubygems.org'\n gem 'banner' then I do bundle install. Then I do cd .. then I do gem list, then I see the banner gem installed. So it's not just local to my application.
[21:06:27] zautomata2: has joined #ruby
[21:09:30] apeiros: garyserj: `bundle install -h`, look for --path
[21:10:36] apeiros: and yes, standard modus operandi is to install to system location. usually that makes the most sense.
[21:11:09] nadir: has joined #ruby
[21:12:05] mikecmpbll: has joined #ruby
[21:12:18] skweek: has joined #ruby
[21:13:33] zautomata3: has joined #ruby
[21:18:49] apeiros_: has joined #ruby
[21:22:45] jeffreylevesque: has joined #ruby
[21:26:42] koalabear: has joined #ruby
[21:32:26] duderonomy: has joined #ruby
[21:33:45] yqt: has joined #ruby
[21:40:01] zautomata4: has joined #ruby
[21:43:50] nofxx: has joined #ruby
[21:45:00] dachinat: has joined #ruby
[21:45:26] cadillac_: has joined #ruby
[21:47:19] dachinat: Hello. Is there any variable with which I get get result of condition? I.e.: 5 - 1 > 0 ? $_value_of_5-1 : false
[21:47:24] cagomez: has joined #ruby
[21:47:31] N64N64: has left #ruby: ("WeeChat 1.4")
[21:47:50] dminuoso: Maybe in #perl
[21:51:04] pelegreno: has joined #ruby
[21:52:20] al2o3-cr: see how does pry does it
[21:52:37] al2o3-cr: 5 - 1 > 0 ? _ : false
[21:54:06] nofxx: has joined #ruby
[21:58:36] raldu: has joined #ruby
[21:59:36] cagomez: has joined #ruby
[22:01:14] halt-: has joined #ruby
[22:05:39] jeffreylevesque: has joined #ruby
[22:12:12] apeiros: dachinat: how about assigning it to a variable?
[22:12:21] nofxx: has joined #ruby
[22:12:24] Ishido: has joined #ruby
[22:13:36] Dimik: has joined #ruby
[22:13:38] dachinat: thanks assigning to variable is ok
[22:18:54] yokel: has joined #ruby
[22:35:02] garyserj: in rails, I have , in application_controller.rb, def hello\n render html: "hello"\n end. What kind of statement is that? I notice I can't do puts render html: "abc". I'm wondering what syntactically that render line is and its colon?
[22:36:40] dminuoso: garyserj: its a method that does imperative magical stuff.
[22:37:17] dminuoso: garyserj: its basically short for: render({ :html => "hello" })
[22:37:23] garyserj: ah ok, thanks
[22:37:53] apeiros: garyserj: `foo bar: "baz"` is short for `foo(bar: "baz")` is short for `foo({bar: "baz"})` is short for `foo({:bar => "baz"})`
[22:38:14] garyserj: yeah, thanks
[22:38:21] garyserj: and what class is render from?
[22:38:28] apeiros: also as of ruby 2.dunnoanymore, foo(bar: "baz") can also be syntax for passing a keyword arg
[22:38:58] apeiros: well, an ancestor of the class you're in
[22:39:25] apeiros: you can do `binding.pry` at that place and use code to figure it out. e.g. via `method(:render).owner`
[22:39:52] apeiros: >> {}.method(:find).owner
[22:39:53] ruby[bot]: apeiros: # => Enumerable (https://eval.in/924526)
[22:43:17] Neptu: hej I have a problem i do not undestand why i need to convert this projectName = config['projectName'] and use projectName instead of using something like #{config...}
[22:43:30] Neptu: is very strange
[22:43:47] Neptu: but im new on ruby so maybe is something i do not understand
[22:44:31] Neptu: the complete example looks like this: https://pastebin.com/8cNzPC3G
[22:44:32] ruby[bot]: Neptu: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/dc3762054905f266b2810a66ab8f6047
[22:44:32] ruby[bot]: Neptu: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[22:44:58] apeiros: YAML::load(File.open -> YAML.load_file
[22:45:47] Neptu: apeiros: i test that out
[22:46:11] apeiros: (that's a suggestion for improvement - I don't yet really understand what your actual question is)
[22:46:50] apeiros: also for the sake of whatever deity you prey to, do not use :: to invoke methods. that looks like code for ruby 1.6 or older :)
[22:46:56] Neptu: apeiros: the question is i cannot use the config[...][..][...] I need first to create variables and then use the variables
[22:47:38] apeiros: Neptu: uh, no? you can use config[…][…][…] just fine
[22:47:42] apeiros: and apparently you even do
[22:47:58] apeiros: https://gist.github.com/anonymous/dc3762054905f266b2810a66ab8f6047#file-ruby-rb-L20-L26
[22:48:18] Neptu: apeiros vagrant kind of breaks if I use directly those variables
[22:48:41] apeiros: yeah, I don't have any idea what "kind of breaks" means
[22:49:03] mtkd: has joined #ruby
[22:49:19] Neptu: one sec i generate the error again
[22:49:32] apeiros: include the code which causes the error too
[22:49:50] apeiros: note that you can put more than one file into a single gist. use one for the error and one for the code.
[22:50:19] Neptu: apeiros: can't convert Vagrant::Config::V2::DummyConfig to String (Vagrant::Config::V2::DummyConfig#to_str gives Vagrant::Config::V2::DummyConfig) (TypeError)
[22:52:59] troys: has joined #ruby
[22:53:26] Neptu: https://gist.github.com/josrom/58de8107ae527809a32204984611f86f
[22:53:52] Neptu: https://gist.github.com/josrom/58de8107ae527809a32204984611f86f#file-gistfile1-txt-L36
[22:53:55] apeiros: almost there
[22:54:03] Neptu: now i only changed the box
[22:54:04] apeiros: full exception please (includes a backtrace)
[22:54:21] apeiros: also pro tip: use .rb in the filename and we get to enjoy syntax highlighting in gist
[22:54:32] apeiros: you can just update the gist, no need to create a new one
[22:54:53] Neptu: i added a comment
[22:54:55] apeiros: https://gist.github.com/josrom/58de8107ae527809a32204984611f86f#file-gistfile1-txt-L30
[22:55:10] apeiros: at this line, config is a new variable with a new value
[22:55:18] apeiros: maybe don't call different variables by the same name?
[22:56:00] Neptu: mmmmmmmmmmmmm
[22:56:31] BTRE: has joined #ruby
[22:57:35] Neptu: ok thanks! seems i need some sleep
[22:58:25] jnyw: has joined #ruby
[23:06:49] Neptu: apeiros: yes i was too focused on the forest i did not saw the tree
[23:06:58] Neptu: going to bed thanks!
[23:11:42] johno84: has joined #ruby
[23:20:47] sanscoeur: has joined #ruby
[23:29:06] cagomez: has joined #ruby
[23:30:15] vtx: has joined #ruby
[23:31:59] neo95: has joined #ruby
[23:46:39] bougyman: has joined #ruby
[23:59:34] cschneid_: has joined #ruby