« Back to channel list

#ruby - 31 May 2018

« Back 1 day Forward 1 day »
[00:00:32] ramfjord: hehe yeah, that and the entire library. Also I do think that if you don't have named arguments, then if you pass arguments in named syntax they will resolve to a hash in modern ruby versions. So perhaps without dynamically defining the named arguments, you can just have a single parameter in the constructor, and validate the required/optional arguments in the hash you get. ie.
[00:00:53] ramfjord: >> def hello(h); puts h.inspect ; end ; hello(named_arg: 123, other: 213)
[00:00:54] ruby[bot]: ramfjord: # => {:named_arg=>123, :other=>213} ...check link for more (https://eval.in/1012881)
[00:01:40] ramfjord: well, the `inspect` isn't super clear, but `h` is a Hash if I print that out as well
[00:02:55] cajone: has joined #ruby
[00:03:31] ramfjord: also re. your README - I do think most people would classify ruby as a language with multiple inheritance - through mixins
[00:04:01] rfoust: has joined #ruby
[00:06:59] Trevoke: So I definitely had the **kwags before (or rather still have it right now), and I had a custom error and it worked out alright, but a benefit of actual named arguments _might_ be rubymine or other editor support (I wonder how deep their dynamic programming support is, I should try this out...)
[00:07:21] ramfjord: also I kind of agree with @baweaver - if you want to do the command pattern, you can just closure in the arguments to a proc by wrapping the function invocation in ->() { my_func(arg1, arg2, ...) }, and then call that whenever
[00:07:30] Trevoke: I'd love to hear "most people"'s reasoned arguments about why composition is the same thing as multiple inheritance :D
[00:09:50] Trevoke: And yes, you are absolutely right, I'm aware I can do that. The reasons this exists are complex and varied and much more social than technical.
[00:10:21] ramfjord: composition is having objects in your objects, mixins can define instance variables on your objects, which IMO is more like multipe inhertiance. Consider the Enumerable module. When I mix it in to my Class that has an #each method, it's much like inheriting from a class that's already included Enumerable... I suppose in my mind composition would be if Enumerable were a class, and I had in my object a
[00:10:22] Trevoke: So if you want to jump on the "technology doesn't solve social problems" bandwagon, let's please not start, I know, I can't even play devil's advocate.
[00:10:27] ramfjord: reference to an instance of Enumerable.
[00:11:17] Trevoke: I believe what you are referring to is dependency injection?
[00:12:14] lxsameer: has joined #ruby
[00:12:54] baweaver: Enumerable, Sortable, etc etc. There are a few of them
[00:12:57] ramfjord: well, I would say that dependency injections supplies the types for an object that uses composition
[00:13:04] baweaver: Honestly they're more of interfaces than anything
[00:13:05] ramfjord: or the objects itself
[00:13:37] ramfjord: dependency injection is delegating the attachment of composed objects to an external class
[00:14:05] ramfjord: they are like recent java versions' default interface implementation, which IMO is basically multiple inheritance as well
[00:14:20] baweaver: implements Enumerable
[00:15:31] grilix_: has joined #ruby
[00:16:05] Trevoke: ramfjord: if Ruby has multiple inheritance through mixins, then what's the difference between "X < Y" and "includes Y" ?
[00:16:39] cagomez: has joined #ruby
[00:16:41] baweaver: social convention, mostly.
[00:17:14] baweaver: Some things are distinctly base objects that are inheritable
[00:17:29] baweaver: Others are a group of behaviors that make sense with an '-able' name
[00:17:55] baweaver: Filterable, Sortable, Enumerable, Reducible, Transducible, Mappable, etc
[00:18:19] jeen: has joined #ruby
[00:18:29] baweaver: Transducers are fun, but that's one heck of a rabbit hole.
[00:19:09] Azure: has joined #ruby
[00:20:55] Trevoke: baweaver: no fair your answering the question I'm asking him
[00:21:00] Trevoke: How will I know what he's thinking now?
[00:22:14] Trevoke: spoiler alert, I agree with your perspective -- _especially_ in Ruby, and I believe that's one of the special things that make Ruby amazing.
[00:22:25] ramfjord: trevoke: that's a good question - and I'd say there isn't much difference in terms of the effect they have. By convention you would make something a module if you don't want to instantiate it, and it will be used in multiple places. Make something a class and use inheritance if you want to instantiate the superclass.
[00:22:46] Trevoke: Its almost complete lack of language-enforced conventions allows us to focus almost entirely on *purpose*, and that's really nice.
[00:22:51] ramfjord: >> module Mod; attr_accessor :a ; def initialize() ; @a = 123 ; end ; end ; class B ; include Mod ; end ; B.new.a
[00:22:52] ruby[bot]: ramfjord: # => 123 (https://eval.in/1012882)
[00:22:58] ramfjord: you can even override initialize in a module
[00:23:42] ramfjord: (not recommended)
[00:23:55] Trevoke: I've found a large amount of value in remembering that OOP's original focus was on message passing.
[00:24:20] ramfjord: Yeah, ruby might be the most authentic successor to smalltalk in that regard
[00:26:17] baweaver: trevoke: You might enjoy this one: https://medium.com/@baweaver/functional-programming-in-ruby-state-5e55d40b4e67
[00:26:20] baweaver: Small series that goes over how FP can be practically applied to Ruby
[00:26:20] Trevoke: I think it's Smalltalk > Erlang > Ruby
[00:26:31] Trevoke: Oh, YOU are that guy
[00:26:34] Trevoke: I knew your nickname was familiar
[00:26:48] Trevoke: I've started sharing this at work as a way to tell people to not be scared of "functional" programming
[00:26:50] agent_white: trevoke: Sandy Metz I think engrained message passing in me :) That and proper abstractions.
[00:27:10] Trevoke: I liked when Sandi appeared on the scene, I think it helped a bunch.
[00:27:23] havenwood: baweaver: *high five*
[00:27:44] baweaver: baweaver == B.A. Weaver == Brandon Weaver == lemur == keystonelemur
[00:28:10] Trevoke: Okay well I'm just Trevoke
[00:28:22] baweaver: Hello Just Trevoke
[00:28:32] baweaver: At least you're not None Trevoke
[00:28:33] Trevoke: You may know me as the author of SGFParser (or, like, not)
[00:28:46] agent_white: She's amazing. First I've seen/read that speaks entirely my language; I hope I getta see a presentation of hers in person someday.
[00:28:57] Trevoke: ACTION slaps baweaver around with a large trout
[00:29:10] baweaver: Fishy fishy
[00:29:31] Trevoke: agent_white: if you haven't read POODR yet, do it. It's basically the book I would have written if I had had the time and the experience.
[00:29:36] baweaver: I routinely do bad things to Ruby
[00:29:44] Trevoke: It really simplified my approach to teaching people how to write Ruby code
[00:29:53] Trevoke: Yeah, I saw the .. Qa gem? Qo? Qox? Something?
[00:29:57] agent_white: trevoke: It's sitting on my shelf :) Definitely a must have I think.
[00:30:16] baweaver: Just wait until the Lemur Book exists
[00:30:17] baweaver: Qo, Mf, Sf, Xf, among others
[00:30:33] baweaver: The Lemurs are more than just a motif, we'll put it that way :)
[00:30:37] Trevoke: The thing about POODR though is that it's good for message-passing design but it's not actually about Ruby at all
[00:30:48] baweaver: This was the old version of it - https://www.gitbook.com/book/baweaver/an-illustrated-guide-to-ruby
[00:31:00] havenwood: Chunky bacon! \o/
[00:31:07] baweaver: but it also explains why I mysteriously stopped writing articles a few weeks back
[00:31:27] Trevoke: Good to know that _why's spirit is alive and well.
[00:31:46] agent_white: trevoke: I think that's why I love it. It changed the way I think about OOP design as a whole.
[00:31:51] baweaver: The two books that started me on Ruby were Why's guide and Eloquent Ruby
[00:32:35] Trevoke: Eloquent Ruby is good. My recommendations to get people started are POODR and Avdi Grimm's Confident Ruby
[00:32:46] Trevoke: Confident Ruby is a treasure trove of idiomatic Ruby
[00:32:58] baweaver: avdi occasionally hangs around the channel too
[00:33:04] baweaver: though he's more often on Twitter nowadays.
[00:33:48] Trevoke: I ran across him a few times a few years ago. I was still relatively starstruck and didn't know how to approach him. Now I think I could totally have a real human conversation with him.
[00:34:15] orbyt_: has joined #ruby
[00:35:04] Trevoke: Anyway. Point being, when you can focus on message passing then everything becomes about, as Sandi would put it, "which object, existing or not, should receive this message?" and it's a very helpful little refactoring mantra.
[00:35:39] eelster: has joined #ruby
[00:35:52] Trevoke: And even back to my horrible horrible code, I got it to work by doing a class eval of a string version of the self.new method and it's pretty much the absolute worst Ruby code I've written in my entire life.
[00:37:27] Trevoke: The only reason I wrote this in the first place is because someone wrote an abstract class to do the command pattern in this codebase I'm working with and it's just ... painfully boilerplatey
[00:37:55] Trevoke: And I told someone that if I had to use any kind of defined contract, I was going to do it via a DSL because that was how I could eat the most boilerplate.
[00:38:08] Trevoke: ... Then I got drunk.
[00:45:15] gix: has joined #ruby
[00:51:55] dviola: has joined #ruby
[00:52:03] lxsameer: has joined #ruby
[01:00:54] karapetyan: has joined #ruby
[01:01:16] herbmillerjr: has joined #ruby
[01:02:00] lxsameer: has joined #ruby
[01:08:24] emilford: has joined #ruby
[01:11:24] cagomez: has joined #ruby
[01:12:01] lxsameer: has joined #ruby
[01:12:22] ogres: has joined #ruby
[01:13:10] gizmore|2: has joined #ruby
[01:18:16] venmx: has joined #ruby
[01:22:12] lxsameer: has joined #ruby
[01:22:58] arquebus: has joined #ruby
[01:24:14] emilford: has joined #ruby
[01:25:37] maxirater: has joined #ruby
[01:27:07] maxirater: has joined #ruby
[01:30:31] alfiemax: has joined #ruby
[01:33:32] venmx: has joined #ruby
[01:36:42] Jameser: has joined #ruby
[01:36:57] emilford: has joined #ruby
[01:37:55] eblip: has joined #ruby
[01:39:44] noobineer: has joined #ruby
[01:43:58] emilford: has joined #ruby
[01:44:42] hirocaster: has joined #ruby
[01:48:06] Dimik: has joined #ruby
[01:55:14] cadillac_: has joined #ruby
[01:56:20] veloutin: has joined #ruby
[02:02:41] karapetyan: has joined #ruby
[02:03:21] emilford: has joined #ruby
[02:08:46] shinnya: has joined #ruby
[02:13:46] alfiemax: has joined #ruby
[02:15:15] emilford: has joined #ruby
[02:32:06] kmurphy4: has joined #ruby
[02:35:32] weaksauce: has joined #ruby
[02:36:49] lxsameer: has joined #ruby
[02:38:17] jrafanie: has joined #ruby
[02:38:45] emilford: has joined #ruby
[02:39:57] alfiemax: has joined #ruby
[02:47:10] lxsameer: has joined #ruby
[02:53:04] sanscoeur: has joined #ruby
[02:59:56] emilford: has joined #ruby
[03:00:21] alfiemax: has joined #ruby
[03:00:45] alfiemax: has joined #ruby
[03:03:13] cadillac_: has joined #ruby
[03:05:35] emilford: has joined #ruby
[03:09:42] venmx: has joined #ruby
[03:15:12] emilford: has joined #ruby
[03:18:38] braincrash: has joined #ruby
[03:26:09] emilford: has joined #ruby
[03:29:40] cagomez: has joined #ruby
[03:31:24] Sammichmaker: has joined #ruby
[03:31:24] Sammichmaker: has joined #ruby
[03:36:04] emilford: has joined #ruby
[03:43:36] emilford: has joined #ruby
[03:45:49] gix-: has joined #ruby
[03:49:57] \void: has joined #ruby
[03:50:11] govg: has joined #ruby
[03:50:22] emilford: has joined #ruby
[03:51:59] memo1: has joined #ruby
[03:58:09] lxsameer: has joined #ruby
[04:02:40] tdy: has joined #ruby
[04:03:14] rkazak: has joined #ruby
[04:03:28] kapil___: has joined #ruby
[04:05:15] emilford: has joined #ruby
[04:05:33] alfiemax_: has joined #ruby
[04:06:59] lxsameer: has joined #ruby
[04:10:13] sytherax: has joined #ruby
[04:14:55] ogres: has joined #ruby
[04:22:00] dviola: has joined #ruby
[04:22:18] dviola: has joined #ruby
[04:23:53] emilford: has joined #ruby
[04:26:59] Ryzokuken: has joined #ruby
[04:27:14] thapakazi: has joined #ruby
[04:32:17] emilford: has joined #ruby
[04:35:22] catbusters: has joined #ruby
[04:36:14] NightMonkey: has joined #ruby
[04:41:17] emilford: has joined #ruby
[04:44:56] TinkerT: has joined #ruby
[04:51:51] lxsameer: has joined #ruby
[04:52:27] reber: has joined #ruby
[04:54:27] conta: has joined #ruby
[05:00:22] emilford: has joined #ruby
[05:03:06] baweaver: Radar: What are you trying to make a server for?
[05:03:39] baweaver: The best I can think of is if someone shimmed Ruby bindings onto OpenSSH or something
[05:04:41] dminuoso: agent_white: functional programming also changed the way I think about design as a whole.
[05:04:52] dminuoso: And it certainly changed the way I think about OOP design.
[05:08:32] emilford: has joined #ruby
[05:08:32] conta: has joined #ruby
[05:08:36] tAn: has joined #ruby
[05:09:34] alfiemax: has joined #ruby
[05:13:58] bga57: has joined #ruby
[05:15:43] Radar: baweaver: to receive file uploads from some of our clients
[05:15:53] Radar: baweaver: these people do not speak HTTP
[05:16:31] baweaver: Can you not use OpenSSH?
[05:16:32] eckhardt: has joined #ruby
[05:17:12] havenwood: baweaver: I rested my eyes, wrote tests, started over, and finished. Phew!
[05:17:28] emilford: has joined #ruby
[05:17:32] baweaver: You closed your eyes?
[05:17:33] havenwood: Pure Ruby SipHash 1-3 and 2-4 gem released! https://github.com/havenwood/digest-sip_hash
[05:17:59] baweaver: Only for a moment and the moment's gone.
[05:18:43] havenwood: baweaver: https://www.youtube.com/watch?v=LoEWmc60wJY
[05:19:13] baweaver: https://www.youtube.com/watch?v=tH2w6Oxx0kQ
[05:19:18] tAn: has joined #ruby
[05:19:46] baweaver: So it was just the endian bracket then?
[05:19:55] conta: has joined #ruby
[05:20:06] baweaver: Y'know, that's the problem when you get a good cache of Ruby knowledge
[05:20:31] baweaver: ya skip the tests, then spend 20x longer manually debugging it
[05:20:33] baweaver: ACTION is supremely guilty of this
[05:20:53] havenwood: baweaver: Yeah, that got empty strings working. Then when I added more tests I realized I'd broken compaction at some point and had to redo a bunch, hah.
[05:21:03] sauvin: has joined #ruby
[05:21:31] havenwood: I can certainly refactor it further: https://github.com/havenwood/digest-sip_hash/blob/master/lib/digest/sip_hash.rb
[05:21:38] havenwood: It weighs in at 125 lines.
[05:22:01] havenwood: One thing I really don't like is that I pass @buffer between classes.
[05:24:13] emilford: has joined #ruby
[05:25:59] baweaver: Could probably compact the compress method a bit.
[05:26:38] havenwood: baweaver: yeah, that's just mimicking the reference C implementation
[05:26:39] havenwood: line for line
[05:26:40] baweaver: 74, 78, 81, and 84 look like they could just be moved up a line as just an (v) ^ other
[05:27:37] baweaver: you have tests?
[05:28:00] baweaver: ACTION forky forks
[05:28:42] havenwood: baweaver: just 13 assertions at this point - I'll fill more in
[05:28:52] havenwood: run em with: rake
[05:29:24] havenwood: I need to fill in a readme too. It's 1-3 by default, but supports arbitrary rounds.
[05:30:38] havenwood: I made it depend on Ruby 2.5... muahahahaha
[05:31:18] autojack: has joined #ruby
[05:31:47] baweaver: cannot load such file -- digest/sip_hash/version (LoadError)
[05:31:55] baweaver: Well it doesn't like 2.5.1
[05:31:55] lxsameer: has joined #ruby
[05:32:03] havenwood: err, should like 2.5.1
[05:32:14] havenwood: what'd i mess up?
[05:32:40] baweaver: looks fine to me
[05:33:17] havenwood: works on my machine ¯\_(ツ)_/¯
[05:33:46] baweaver: ruby 2.5.1p57 (2018-03-29 revision 63029)
[05:34:00] havenwood: same to the revision
[05:34:02] autojack: I'm trying to create a scenario where I open a lot of files without closing the file handles, and thus trigger a "Too many open files" exception. but I'm surprised to find that Ruby seems to silently close the fd's on me to keep itself under the system limit. so Dir["./*"].each { |f| File.new(f) } doesn't error no matter how many files are in my directory. anyone know why?
[05:34:22] havenwood: baweaver: I uninstalled it and reinstalled it, no error. How odd.
[05:34:28] UncleCid__: has joined #ruby
[05:34:30] autojack: (I'm trying to do this as part of a troubleshooting simulation, if you're curious)
[05:34:44] baweaver: fresh install and clone. Interesting
[05:35:00] havenwood: baweaver: what causes the error? tests?
[05:35:08] autojack: I've set the limit for my user to 1000 and confirmed it with 'ulimit -n'
[05:35:32] havenwood: baweaver: oops, test fail if gem is uninstalled because of a load path issue...
[05:36:10] havenwood: baweaver: yeah, i can reproduce without gem installed
[05:36:42] emilford: has joined #ruby
[05:37:43] baweaver: autojack - reading around but not finding much that looks interesting - https://ruby-doc.org/core-2.5.0/File.html#method-c-new
[05:38:06] karapetyan: has joined #ruby
[05:38:32] baweaver: Might see if there's a way to log open file descriptor counts
[05:38:43] autojack: yeah, well I can check how many are open with lsof
[05:38:46] baweaver: https://stackoverflow.com/questions/10922045/where-does-ruby-keep-track-of-its-open-file-descriptors
[05:38:52] baweaver: That may be interesting
[05:39:11] autojack: so for example with the limit set at 1000, if I lsof I see about 700 open. if I bump the limit to 10,000, lsof will show about 8000 open.
[05:39:19] autojack: in a directory that has 100k files.
[05:39:38] havenwood: baweaver: fix pushed
[05:39:44] havenwood: baweaver: thanks for the heads up!
[05:40:12] duderonomy: has joined #ruby
[05:41:48] autojack: baweaver: I found https://stackoverflow.com/questions/40597488/ruby-too-many-open-files-rb-sysopen which suggests that Ruby *would* throw an exception.
[05:42:01] autojack: I am guessing something changed in a newer version of Ruby.
[05:42:45] anisha: has joined #ruby
[05:44:31] baweaver: havenwood: offset = @size / 8 * 8
[05:44:32] baweaver: ACTION scratches head
[05:45:15] havenwood: >> 33 / 8 * 8
[05:45:16] ruby[bot]: havenwood: # => 32 (https://eval.in/1012959)
[05:45:32] baweaver: right, int division
[05:45:41] havenwood: baweaver: yeah, that's really weird looking
[05:45:52] Azure|dc: has joined #ruby
[05:46:04] havenwood: baweaver: maybe subtract the modulo remainder? seems that'd work
[05:46:07] baweaver: flooring it to nearest 8 divisible
[05:46:32] havenwood: offset = @size - @size % 8
[05:47:34] havenwood: baweaver: yeah, anything reads better, haha
[05:48:17] schleppel: has joined #ruby
[05:48:21] havenwood: baweaver: oh, right! perfect
[05:49:51] havenwood: ooh, 0.step(by: 8, to: 48)
[05:50:13] havenwood: for some reason i thought those steps weren't uniform >.>
[05:52:38] aupadhye: has joined #ruby
[05:53:00] baweaver: 6.times { |i| last |= @buffer[offset + i].ord << 8 * (6 - i) if r > i }
[05:53:04] baweaver: Or something close to it
[05:53:30] havenwood: baweaver: nice, i like that
[05:53:50] baweaver: 7 though on the times
[05:55:30] havenwood: baweaver: way better, thanks!
[05:55:38] baweaver: crashes though
[05:55:40] autojack: has left #ruby: ()
[05:55:55] havenwood: i got a variant working
[05:56:28] cadillac_: has joined #ruby
[05:56:31] baweaver: Aha, found it
[05:56:33] baweaver: index reverses too
[05:57:30] baweaver: havenwood: what did you use?
[05:57:48] havenwood: baweaver: here, i'll push it unless you want to commit yours!
[05:57:54] baweaver: Na, go for it
[05:58:24] havenwood: https://github.com/havenwood/digest-sip_hash/commit/9dbd3b5457a08449913d60a7365f7c045ed2b0fc
[05:58:58] havenwood: baweaver: much better, tyty
[05:59:03] baweaver: If it's 8 though I keep wanting to think there's a way to do it with slices or bytes
[05:59:26] baweaver: though it's jagged
[06:00:22] phaul: has joined #ruby
[06:04:31] baweaver: Scroll of summons! eam!
[06:04:35] baweaver: havenwood is making a sip hash
[06:04:53] baweaver: we need your wizardry with bit magics to make it better
[06:06:33] baweaver: ...I should really be writing more right now
[06:06:53] baweaver: goal is to finish 3-5 chapters in the time I said it'd take me to do 1
[06:08:36] biberu: has joined #ruby
[06:11:59] lxsameer: has joined #ruby
[06:16:08] amar: has joined #ruby
[06:23:14] Radar: typical author
[06:23:30] Radar: ONE OF US
[06:32:36] Axy: has joined #ruby
[06:33:44] phaul: has joined #ruby
[06:37:22] anisha_: has joined #ruby
[06:41:43] tAn: has joined #ruby
[06:56:51] lxsameer: has joined #ruby
[06:57:11] Mia: has joined #ruby
[06:57:11] Mia: has joined #ruby
[06:59:15] csk157: has joined #ruby
[06:59:16] Axy: has joined #ruby
[07:00:20] Asher: has joined #ruby
[07:03:28] TomyWork: has joined #ruby
[07:03:51] OS-35301: has joined #ruby
[07:06:09] claudiuinberlin: has joined #ruby
[07:06:23] sysvalve: has joined #ruby
[07:08:22] conta: has joined #ruby
[07:11:12] vinothvkr: has left #ruby: ("Leaving")
[07:16:03] p0p0pr37_: has joined #ruby
[07:20:33] aufi: has joined #ruby
[07:21:47] canton7: has joined #ruby
[07:23:19] aupadhye: has joined #ruby
[07:25:10] tAn: has joined #ruby
[07:28:26] tAn: has joined #ruby
[07:30:37] venmx: has joined #ruby
[07:35:22] ramfjord: has joined #ruby
[07:35:32] lystra_: has joined #ruby
[07:36:52] lxsameer: has joined #ruby
[07:37:32] aupadhye: has joined #ruby
[07:39:57] dminuoso: has joined #ruby
[07:42:05] sytherax: has joined #ruby
[07:45:56] ellcs: has joined #ruby
[07:47:19] wget: has joined #ruby
[07:47:19] wget: has joined #ruby
[07:59:44] suukim: has joined #ruby
[08:07:19] phaul: has joined #ruby
[08:12:59] lxsameer: has joined #ruby
[08:14:58] agent_white: has joined #ruby
[08:15:11] mikecmpbll: has joined #ruby
[08:18:37] guille-moe: has joined #ruby
[08:21:26] sphenxes: has joined #ruby
[08:21:41] arkinor: has joined #ruby
[08:24:13] ur5us: has joined #ruby
[08:26:20] amar: has joined #ruby
[08:26:50] amar: has joined #ruby
[08:32:18] agent_white: has joined #ruby
[08:34:19] yohji: has joined #ruby
[08:35:10] mrBen2k2k2k_: has joined #ruby
[08:38:50] amar: has joined #ruby
[08:39:52] alex``: has joined #ruby
[08:45:03] NL3limin4t0r: has joined #ruby
[08:51:39] dionysus69: has joined #ruby
[08:53:43] plexigras: has joined #ruby
[08:57:47] pskosinski: has joined #ruby
[08:59:55] ellcs: has joined #ruby
[09:05:07] jottr: has joined #ruby
[09:05:41] OS-35301: has joined #ruby
[09:07:05] lxsameer: has joined #ruby
[09:07:08] agent_white: has joined #ruby
[09:07:52] madsen: has joined #ruby
[09:07:59] conta1: has joined #ruby
[09:08:15] mikecmpb_: has joined #ruby
[09:08:39] madsen: has left #ruby: ()
[09:11:14] docyam2: has joined #ruby
[09:12:44] marens: has joined #ruby
[09:12:44] marens: has joined #ruby
[09:14:21] karapetyan: has joined #ruby
[09:16:11] p0p0pr37_: has joined #ruby
[09:23:20] Nussi: has joined #ruby
[09:30:50] venmx: has joined #ruby
[09:33:34] conta1: has joined #ruby
[09:34:08] saTchymoto: has joined #ruby
[09:35:08] conta: has joined #ruby
[09:35:11] aakp: has joined #ruby
[09:38:17] conta1: has joined #ruby
[09:41:15] aufi: has joined #ruby
[09:41:16] howdoi: has joined #ruby
[09:49:59] banisterfiend: has joined #ruby
[09:51:02] sytherax: has joined #ruby
[09:53:29] karapetyan: has joined #ruby
[09:55:43] n3b: has joined #ruby
[09:55:57] roshanavand: has joined #ruby
[09:59:36] mikecmpbll: has joined #ruby
[10:03:37] reber: has joined #ruby
[10:06:32] gregf_: has joined #ruby
[10:07:27] OS-35301: has joined #ruby
[10:07:41] Deknos: has joined #ruby
[10:11:44] conta: has joined #ruby
[10:11:59] tomeaton17: has joined #ruby
[10:12:54] tvw: has joined #ruby
[10:19:10] bga57: has joined #ruby
[10:25:05] conta: has joined #ruby
[10:25:20] nfk: has joined #ruby
[10:28:15] Asher: has joined #ruby
[10:29:28] Mike11: has joined #ruby
[10:30:36] GodFather: has joined #ruby
[10:30:44] OS-35301: has joined #ruby
[10:31:17] micutzu: has joined #ruby
[10:31:55] Londino: has joined #ruby
[10:32:43] anisha_: has joined #ruby
[10:34:25] phaul: has joined #ruby
[10:37:12] apparition: has joined #ruby
[10:48:14] conta1: has joined #ruby
[10:51:11] ciscam: has joined #ruby
[11:05:11] KeyJoo: has joined #ruby
[11:07:35] cschneid: has joined #ruby
[11:08:21] micutzu: has joined #ruby
[11:09:11] emilford: has joined #ruby
[11:17:37] p0p0pr37_: has joined #ruby
[11:19:00] karapetyan: has joined #ruby
[11:22:58] wolfshappen: has joined #ruby
[11:34:01] karapety_: has joined #ruby
[11:34:55] ramfjord: has joined #ruby
[11:37:21] guille-moe: has joined #ruby
[11:37:23] alfiemax: has joined #ruby
[11:40:15] AJA4350: has joined #ruby
[11:45:02] Azure: has joined #ruby
[11:45:09] donofrio: has joined #ruby
[11:49:27] mikecmpbll: has joined #ruby
[11:50:09] jamesaxl: has joined #ruby
[11:50:26] zapata: has joined #ruby
[11:58:03] synthroid: has joined #ruby
[12:00:34] clemens3: has joined #ruby
[12:02:41] beefjoe70: has joined #ruby
[12:03:19] sj0rz: has joined #ruby
[12:03:21] cyberg: has joined #ruby
[12:04:16] karapetyan: has joined #ruby
[12:04:48] Londino: has joined #ruby
[12:05:28] conta: has joined #ruby
[12:06:55] ellcs: has joined #ruby
[12:09:22] mostlybadfly: has joined #ruby
[12:10:15] Londino: Hello guys and good morning to those of you on the other side of the pond. Although i can iterate through a table in WATIR, i can't, for the life of me, form the logic that would enable me to tick checkboxes based on whether a particular string value exists or not on the same row as each checkbox.
[12:11:15] Londino: Can anyone offer me some assistance/guidance? I can supply sample HTML code if needed, although i'm pretty sure that what i'm asking is fairly common. It's just that my incompetence doesn't allow me to progress further.
[12:11:16] Deknos: has left #ruby: ()
[12:12:16] phaul: has joined #ruby
[12:13:21] Puffball: has joined #ruby
[12:15:50] dendazen: has joined #ruby
[12:15:57] RougeR: has joined #ruby
[12:19:25] Miko2: has joined #ruby
[12:23:50] dendazen: guys i have a ruby application which i start with unicorn, in my environment i use rbenv and bundler. my 'bundle show' output is this https://gist.github.com/dumbda/897aec5f2d818487fe69eab84568d875. my .bundle/config output is https://gist.github.com/dumbda/7e4aa07c7224b5b4b1b43a8826a803f3 When i start my application with 'bundle exec unicorn -c unicorn-configuration.rb -d' i get this error
[12:23:51] dendazen: https://gist.github.com/dumbda/eba92b86706f2c0ef676f651d112e9f3
[12:24:16] dendazen: why bundler/runtime.rb can't load my gems?
[12:29:56] jatto: has joined #ruby
[12:33:29] bmurt: has joined #ruby
[12:38:14] alfiemax: has joined #ruby
[12:41:27] f3ttX]: has joined #ruby
[12:42:55] jottr: has joined #ruby
[12:49:11] karapetyan: has joined #ruby
[12:49:26] karapetyan: has joined #ruby
[12:54:42] k0mpa: has joined #ruby
[12:55:48] eduwendy: has joined #ruby
[12:56:09] eduwendy: Am I doing this wrong? {a:[1,2]}.dig(:a, 0) => nil
[12:58:51] z64: i get `1` on 2.5.0
[12:59:58] tomeaton17: has joined #ruby
[13:00:08] eduwendy: I swear this was working yesterday :/
[13:01:21] karapetyan: has joined #ruby
[13:01:44] z64: i also get `1` on 2.3.1
[13:02:52] eduwendy: It's a git bisect job. It would appear that something has crept into our codebase that changes the behaviour :O
[13:02:53] z64: gonna say that i dont think you're operating on the data you think you are
[13:03:23] zautomata: has joined #ruby
[13:03:31] eduwendy: z64: Thanks for checking. Was that last comment for me?
[13:03:41] TomyWork: has joined #ruby
[13:04:43] bipul: has joined #ruby
[13:04:43] z64: bout all i can say without more information. seems to be working fine
[13:04:43] zautomata: has joined #ruby
[13:06:35] micutzu: has joined #ruby
[13:07:57] jottr: has joined #ruby
[13:08:23] orbyt_: has joined #ruby
[13:10:09] karapetyan: has joined #ruby
[13:10:39] mzo: has joined #ruby
[13:13:40] rfoust: has joined #ruby
[13:15:10] ams__: has joined #ruby
[13:15:35] claw: has joined #ruby
[13:16:06] p0p0pr37_: has joined #ruby
[13:16:06] p0p0pr37_: has joined #ruby
[13:19:11] phaul: has joined #ruby
[13:20:17] shenghi: has joined #ruby
[13:26:25] stopboylovers: has joined #ruby
[13:26:39] stopboylovers: Ex wasington times reporter Robert Stacy exposes ruby's pedophile love code of conduct enforced by daniels and drafted by a pedophile: http://theothermccain.com/2018/05/30/coraline-ada-ehmke-transgender-feminist-satanic-sjw/ https://8ch.net/pol/res/11616373.html
[13:27:07] stopboylovers: This is your ruby conference keynote speaker pedophile exposed ^^^^
[13:27:21] ruby[bot]: dminuoso: ops currently in #ruby: havenwood, Mon_Ouie, Radar, apeiros, baweaver, drbrain, jhass, miah and ruby[bot]
[13:27:41] stopboylovers: oh vey shut it down!
[13:28:02] dminuoso: Radar: your helpa is lying!
[13:28:05] apeiros: !ban stopboylovers bye
[13:28:05] ruby[bot]: +bb stopboylovers!*@*$#ruby-banned *!*@gateway/web/freenode/ip.118.71.90.100$#ruby-banned
[13:28:05] ruby[bot]: ruby[bot] kicked stopboylovers:
[13:28:47] apeiros: ACTION should provide better ban reasons for fellow other ops :-|
[13:29:25] apeiros: thx dminuoso
[13:30:23] Rapture: has joined #ruby
[13:31:29] alex``: has joined #ruby
[13:32:19] apeiros: now I wonder whether I should fully read those links or whether that'll actually make me dumber…
[13:32:42] roshanavand: has joined #ruby
[13:33:25] banisterfiend: has joined #ruby
[13:37:56] phaul: has joined #ruby
[13:38:33] karapetyan: has joined #ruby
[13:38:41] arquebus: has joined #ruby
[13:39:56] maxirater: has joined #ruby
[13:42:22] dminuoso: apeiros: You have a paper talking about functional references, and you have a link from a troll mentioning "transgender", "feminist" and "satantic"
[13:42:31] dminuoso: One makes you smarter, the other likely does not.
[13:43:04] apeiros: I guess I'll continue watching this anime then. doesn't make me smarter, but it's entertaining.
[13:43:19] banisterfiend: has joined #ruby
[13:48:43] alex``: has joined #ruby
[13:53:13] codymj: has joined #ruby
[13:53:40] amar: has joined #ruby
[14:02:29] banisterfiend: has joined #ruby
[14:03:49] ciscam: has joined #ruby
[14:07:25] guille-moe: has joined #ruby
[14:11:07] dinfuehr: has joined #ruby
[14:16:29] jrafanie: has joined #ruby
[14:17:44] banisterfiend: has joined #ruby
[14:22:44] yohji: has joined #ruby
[14:26:21] cadillac_: has joined #ruby
[14:35:56] ramfjord: has joined #ruby
[14:41:35] thapakazi: has joined #ruby
[14:48:01] Mike11: has joined #ruby
[14:48:13] cschneid_: has joined #ruby
[14:49:43] psychicist__: has joined #ruby
[14:50:06] Tempesta: has joined #ruby
[14:50:58] SeepingN: has joined #ruby
[14:51:31] rippa: has joined #ruby
[14:53:29] synthroid: has joined #ruby
[14:55:04] sytherax: has joined #ruby
[14:57:03] naquad: has joined #ruby
[14:57:26] jjwhoops: has joined #ruby
[14:57:39] naquad: has left #ruby: ()
[14:58:04] chouhoulis: has joined #ruby
[14:58:44] chouhoulis: has joined #ruby
[15:06:37] grilix_: has joined #ruby
[15:07:08] p0p0pr37_: has joined #ruby
[15:07:08] p0p0pr37_: has joined #ruby
[15:09:24] hojuruku: has joined #ruby
[15:11:10] DTZUZO: has joined #ruby
[15:11:43] hojuruku: http://theothermccain.com/2018/05/30/coraline-ada-ehmke-transgender-feminist-satanic-sjw/ rubycon keynote speaker exposed as a SJW OTO.org (toddler orgy ritual cult) who made the creator "covenant" pedophilia normalization manifesto: https://8ch.net/pol/res/11616373.html Corey's rival anti-sjw devs are tweeting it out: https://twitter.com/pmjones/status/1002186358813798401
[15:11:44] jottr: has joined #ruby
[15:17:39] sj0rz: has left #ruby: ("l8r")
[15:20:11] cagomez: has joined #ruby
[15:20:16] GodFather: has joined #ruby
[15:20:38] cagomez: has joined #ruby
[15:23:13] n3b: has joined #ruby
[15:25:41] havenwood: !troll hojuruku
[15:25:41] ruby[bot]: +bbb $a:hojuruku$#ruby-banned hojuruku!*@*$#ruby-banned *!*@unaffiliated/hojuruku$#ruby-banned
[15:25:41] ruby[bot]: ruby[bot] kicked hojuruku: is a bannable offense, see http://ruby-community.com/pages/user_rules
[15:29:42] amar: has joined #ruby
[15:31:52] dbugger_: has joined #ruby
[15:33:00] conta1: has joined #ruby
[15:34:51] bhaak: has joined #ruby
[15:39:47] phaul: has joined #ruby
[15:45:01] OS-35301: has joined #ruby
[15:50:01] jcarl43: has joined #ruby
[15:55:35] synthroid: has joined #ruby
[15:59:12] amar: has joined #ruby
[16:00:07] grilix: has joined #ruby
[16:11:43] russt: has joined #ruby
[16:13:32] dbugger_: has joined #ruby
[16:17:43] eckhardt: has joined #ruby
[16:17:44] dbugger__: has joined #ruby
[16:20:24] psychicist__: has joined #ruby
[16:21:03] dbugger_: has joined #ruby
[16:21:38] thapakazi: has joined #ruby
[16:23:02] cajone: has joined #ruby
[16:28:12] eelster: has joined #ruby
[16:31:26] fullstack_: has joined #ruby
[16:33:18] minimalism: has joined #ruby
[16:34:08] VladGh: has joined #ruby
[16:37:12] jinie: has joined #ruby
[16:39:56] sytherax: has joined #ruby
[16:41:08] gizmore: has joined #ruby
[16:44:05] sytherax: has joined #ruby
[16:45:07] derp10327: has joined #ruby
[16:46:29] sytherax: has joined #ruby
[16:48:09] derp10327: Is it possible to use string interpolation in such a way that I could perform something like https://gist.github.com/blarosen95/8d0fae2066524458e21056d5b11a31a9
[16:50:21] sytherax: has joined #ruby
[16:50:30] eckhardt: has joined #ruby
[16:51:28] sanscoeur: has joined #ruby
[16:53:46] thapakazi: has joined #ruby
[16:53:47] amar: has joined #ruby
[16:54:35] fullstack_: has joined #ruby
[16:54:43] fmcgeough: has joined #ruby
[16:55:02] eam: derp10327: if you want to take the string "seconds" and refer to the variable named seconds you would use eval or binding.local_variable_get
[16:55:33] derp10327: Fairly new to ruby and focusing on some niche solutions with it lol
[16:55:47] havenwood: derp10327: units.map { |unit| binding.local_variable_get unit }
[16:55:56] havenwood: what eam said
[16:56:18] derp10327: awesome thanks!
[16:56:34] cyberg: has joined #ruby
[16:56:46] RougeR: has joined #ruby
[16:56:55] havenwood: derp10327: Or: units.map { |unit| [unit, binding.local_variable_get(unit)] }.to_h #=> {"seconds"=>2, "minutes"=>2}
[16:57:33] baweaver: Question is though, why do you need it?
[16:57:39] baweaver: You could just use a hash instead
[16:57:56] p0p0pr37_: has joined #ruby
[16:57:56] p0p0pr37_: has joined #ruby
[16:58:02] baweaver: >> {seconds: 2, minutes: 2}[:seconds]
[16:58:04] ruby[bot]: baweaver: # => 2 (https://eval.in/1013391)
[16:58:27] havenwood: derp10327: It is suspicious. Usually there's a better way than getting and setting local variables with metaprogramming.
[16:58:39] baweaver: faster, more idiomatic, and doesn't need binding or eval
[17:00:44] derp10327: Honestly? While trying to teach myself Ruby, I'm solving fairly trivial problems. This one has gotten convoluted as I need to not only keep track of whether the method's parameter (seconds) calculated a figure for years/days/hours/minutes/seconds but also if it is a plural unit to be outputted
[17:01:07] derp10327: I'm sure I could use Ruby's time library but I want to teach myself how to go about using the fundamental features
[17:01:08] havenwood: derp10327: Show us more code if you're interested in alternative solutions.
[17:05:04] derp10327: https://gist.github.com/blarosen95/613c3e7e7dc0ede351f2716dbe384299
[17:05:22] ChanServ: +o havenwood
[17:05:24] derp10327: It's a mess, I know. I promise I wrote out (and discarded) many algorithms
[17:06:45] derp10327: So, in short, my goal is to output the string so that it contains no "0 unit(s)" and for values of 1, uses the singular form of the unit
[17:07:01] eckhardt: has joined #ruby
[17:08:10] ChanServ: -o havenwood
[17:11:15] derp10327: I'll probably refactor the case statements into one-line ternaries
[17:13:53] sagax: has joined #ruby
[17:15:45] derp10327: Okay, I caught the issue with putting the 2nd case statement's end too soon, but I'm still going to just use 5 ternary lines instead of all of those case statement lines
[17:16:32] Lytol: has joined #ruby
[17:16:43] nowhere_man: has joined #ruby
[17:16:56] amelliaa: has joined #ruby
[17:17:00] dviola: has joined #ruby
[17:17:11] cyberg: has joined #ruby
[17:17:35] baweaver: >> seconds = 1_000_000; [60, 60, 24, 365].reduce([seconds]) { |units, size| units[-1] = units[-1].divmod(size).reverse; units.flatten }.reverse.zip([:seconds, :minutes, :hours, :days, :years]).to_h
[17:17:36] ruby[bot]: baweaver: # => {0=>:seconds, 11=>:minutes, 13=>:hours, 46=>:days, 40=>:years} (https://eval.in/1013399)
[17:17:57] baweaver: hrm, whoops, reversed the wrong way
[17:18:29] baweaver: >> seconds = 1_000_000; total_units = [60, 60, 24, 365].reduce([seconds]) { |units, size| units[-1] = units[-1].divmod(size).reverse; units.flatten }; [:seconds, :minutes, :hours, :days, :years].zip(total_units).to_h
[17:18:30] ruby[bot]: baweaver: # => {:seconds=>40, :minutes=>46, :hours=>13, :days=>11, :years=>0} (https://eval.in/1013400)
[17:18:37] baweaver: There we go.
[17:18:59] baweaver: havenwood: folding divmod \o/
[17:19:18] derp10327: Now that's why I want to learn Ruby lol
[17:19:44] phaul: has joined #ruby
[17:19:54] derp10327: Coming from Java and similar languages, I'm amazed at what you can do with a line of ruby lol
[17:19:55] baweaver: I'd have to write it a bit clearer later.
[17:20:29] baweaver: The idea is we're basically divmod'ing everything by the next increment
[17:21:00] baweaver: If you add a `p units` before it, you'll see exactly what it's doing
[17:21:04] gizmore: i started to recode my php framework in ruby.... please roast my tests: https://github.com/gizmore/gdo/blob/master/spec/gdo_spec.rb
[17:21:20] derp10327: Right, I mean I've got all the math working, I just need to parse it and get the output all pretty tbh
[17:21:21] baweaver: divmod returns an array so you get to flatten it back down afterwards, leaving the remainder of the previous unit and the unaltered current unit
[17:21:39] baweaver: If you use something like that it cuts out a huge amount of code
[17:22:06] baweaver: then it's just a matter of doing something along the lines of doing pluralization for each unit
[17:22:39] baweaver: you could also: seconds, minutes, hours, days, years = total_units
[17:22:41] baweaver: which would give you vars with every single value
[17:23:54] baweaver: This should give you some fun to start with - https://medium.com/rubyinside/triple-equals-black-magic-d934936a6379
[17:24:06] baweaver: Read through some of those articles and it should give you ideas
[17:24:18] baweaver: Though Eloquent Ruby is the fastest way to learn to Ruby like a Rubyist
[17:24:25] kapil___: has joined #ruby
[17:25:08] baweaver: it won't let you do something like that, per-se, that's more of flipping the thinking paradigm towards FP.
[17:25:13] BTRE: has joined #ruby
[17:25:35] baweaver: Granted, not well, but it works for a one-liner.
[17:26:30] baweaver: havenwood / eam: Knock knock
[17:26:45] havenwood: baweaver: Who's there!??
[17:27:10] orbyt_: has joined #ruby
[17:27:34] baweaver: GOTO Statements considered harmful - https://twitter.com/philcrissman/status/982359274754985984
[17:27:54] gizmore: User input considered harmful: BOO
[17:27:59] karapetyan: has joined #ruby
[17:29:10] Eiam: those damn side effects and their... effects
[17:29:50] derp10327: thanks, I'll give it a read. I just threw together a regex pattern for gsub'ing the output of the local_variable_get. It was outputting like "[x]" where I only wanted the number x to output. I'm amazed at how powerful gsub can be compared to the regex methods for other languages I've learned
[17:31:05] baweaver: >> "[xyz]"[1..-2]
[17:31:06] baweaver: regex not required ;)
[17:31:06] ruby[bot]: baweaver: # => "xyz" (https://eval.in/1013401)
[17:32:40] za1b1tsu: has joined #ruby
[17:33:19] amar_: has joined #ruby
[17:34:42] raynold: has joined #ruby
[17:35:41] ramfjord: has joined #ruby
[17:35:57] joast: has joined #ruby
[17:36:31] derp10327: lol, that might be the least pointless bit of code I've done for this... I'm on the second (of three) planned conditional output snippets and I'm realizing I should've just used an each_with_index
[17:37:07] amar: has joined #ruby
[17:37:37] ldepandis: has joined #ruby
[17:41:20] clemens3: has joined #ruby
[17:42:51] thapakazi: has joined #ruby
[17:43:44] thapakazi: has joined #ruby
[17:47:57] cyberg: has joined #ruby
[17:49:00] clemens3_: has joined #ruby
[17:51:12] beefjoe70: has joined #ruby
[17:53:22] TomyLobo: has joined #ruby
[17:54:12] karapetyan: has joined #ruby
[17:55:25] cagomez: has joined #ruby
[17:56:52] alfiemax: has joined #ruby
[17:57:10] derp10327: Bam https://gist.github.com/blarosen95/d03c294ab1ca621ec1f3d8be54794a31
[17:57:19] mtkd: has joined #ruby
[17:57:39] derp10327: Thanks :) I'm gonna go ahead and practice folding divmod and implement it so I can remove the need for the local_variable_get
[18:00:53] orbyt_: has joined #ruby
[18:01:38] regedit: has joined #ruby
[18:06:12] aspleenic: has joined #ruby
[18:12:31] scrptktty: has joined #ruby
[18:15:32] sytherax: has joined #ruby
[18:17:00] cagomez: has joined #ruby
[18:17:07] cyberg: has joined #ruby
[18:19:32] phaul: has joined #ruby
[18:21:04] NingaLeaf: has joined #ruby
[18:21:23] Axsuul: has joined #ruby
[18:24:42] quobo: has joined #ruby
[18:29:49] rkazak: has joined #ruby
[18:29:57] jatto: has joined #ruby
[18:30:23] baweaver: derp10327: https://twitter.com/keystonelemur/status/1002252898800029696
[18:30:28] baweaver: Cleaned up pretty version
[18:31:04] baweaver: Also left the code as a comment - https://gist.github.com/blarosen95/613c3e7e7dc0ede351f2716dbe384299#gistcomment-2606438
[18:32:11] derp10327: ooh sweet, and thanks :D. Yeah when I submitted the code to the challenge website's test units and it passed them, I was able to see other user's Ruby solutions. Let me go find the one I found the most clever lol
[18:32:43] cagomez: has joined #ruby
[18:33:55] derp10327: https://gist.github.com/blarosen95/39248a925b724a059aab23504692fe4e
[18:34:00] synthroid: has joined #ruby
[18:34:30] derp10327: getting the output of my program to meet the test case's expectations was what did me in. They did that in one line though lol
[18:34:48] sytherax: has joined #ruby
[18:36:01] derp10327: oh no.. I liked your tweet while logged into my oauth account for my startup company lol
[18:39:37] cyberg: has joined #ruby
[18:45:50] kmurphy4: has joined #ruby
[18:48:54] coderphive: has joined #ruby
[18:54:50] havenwood: Here's a silly one:
[18:54:51] havenwood: >> Time.at(1_000_000).utc.strftime('%S %M %D %H %Y').split.map(&:to_i).yield_self { |*units, year| [*units, year - 1970] }
[18:54:52] ruby[bot]: havenwood: # => undefined method `yield_self' for [40, 46, 1, 13, 1970]:Array (NoMethodError) ...check link for more (https://eval.in/1013409)
[18:54:57] havenwood: Ruby too old!
[18:55:01] havenwood: #=> [40, 46, 1, 13, 0]
[18:55:22] thapakazi: has joined #ruby
[18:56:59] derp10327: The first college I went to used fortran for their intro to programming course. I'm glad I wasn't going for a compsci major there...
[18:57:08] derp10327: wait, they used ADA
[18:57:23] havenwood: derp10327: Ruby was going to be called ADA 2.0.
[18:57:31] havenwood: ACTION lies...
[18:57:35] ashlee: has joined #ruby
[18:57:45] derp10327: This was only a few years ago mind you lol
[18:58:17] dminuoso: havenwood: Haha. I started reading ruby from the bottom right to top left.
[18:58:23] dminuoso: Ive been doing too much Haskell.
[18:58:27] derp10327: We already had the ability to program iOS in VS and they wanted to teach you ada
[18:59:35] derp10327: I wonder how long it would've taken me to learn what I've learned about Ruby if I didn't have RubyMine at my disposal
[18:59:40] derp10327: ACTION thinks hard
[19:06:34] cagomez: has joined #ruby
[19:08:39] devyn: has joined #ruby
[19:12:45] gizmore: https://github.com/gizmore/gdo/blob/master/spec/gdo_spec.rb#L60 # the test passes.... tell me why
[19:13:20] gizmore: also be astounded by what a single identity cache does
[19:20:07] ldepandis: has joined #ruby
[19:27:29] grilix_: has joined #ruby
[19:28:18] dreamthese: has joined #ruby
[19:31:45] tectonic: has joined #ruby
[19:32:37] alex``: has joined #ruby
[19:33:03] jenrzzz: has joined #ruby
[19:33:03] jenrzzz: has joined #ruby
[19:35:08] mtkd: has joined #ruby
[19:35:37] cyberg: has joined #ruby
[19:36:54] karapetyan: has left #ruby: ()
[19:40:42] fullstack_: has joined #ruby
[19:40:51] sytherax: has joined #ruby
[19:41:03] fmcgeough_: has joined #ruby
[19:49:50] mostlybadfly: has joined #ruby
[19:53:35] VladGh: has joined #ruby
[20:02:34] phaul: has joined #ruby
[20:04:33] jenrzzz: has joined #ruby
[20:05:41] orbyt_: has joined #ruby
[20:06:43] cagomez: has joined #ruby
[20:11:50] synthroid: has joined #ruby
[20:13:22] za1b1tsu: has joined #ruby
[20:15:05] anisha__: has joined #ruby
[20:15:36] rkazak: has joined #ruby
[20:15:48] gizmore: it is scary that here are almost no questions..... ruby is scarily solid? ;)
[20:15:58] gizmore: is there a #ruby-chat?
[20:16:10] eckhardt: has joined #ruby
[20:17:46] t0xik: has joined #ruby
[20:18:00] gizmore: havenwood: hi .... i would like to explain my framework to you. it will show rails and laravel to their place when it comes to handle data and requests in even more protocols
[20:18:18] gizmore: first check out https://github.com/gizmore/gdo/blob/master/spec/gdo_spec.rb#L60 # the test passes.... tell me why
[20:20:43] Dark_Arc: has joined #ruby
[20:21:08] eelster: has joined #ruby
[20:23:07] vikaton: has joined #ruby
[20:23:28] Eiam: gizmore: this place seems to double as -chat sometimes, seems to be OK? conversations ebbs and flows...
[20:23:37] SeepingN: has joined #ruby
[20:23:44] c0ncealed1: has joined #ruby
[20:24:29] gizmore: Eiam: imho, as long as nobody gets bad feeling everything should be allowed
[20:24:40] gizmore: in terms of irc chat here and elsewhere
[20:24:50] Eiam: gizmore: again, I've not seen any major issues with this channel in terms of chat discussions and thats been 5+ years so.. ?
[20:24:59] gizmore: yeah, just wondered
[20:25:17] Eiam: haskell has a -chat, and the mac/ios channels also prefer a -chat.
[20:25:25] gizmore: yeah and it makes sense
[20:25:44] gizmore: it puts people like me into a more aprropiate channel when i feel chatty
[20:26:11] gizmore: and still the topic includes the main topic i am chatty about then, (ruby f.e)
[20:26:29] gizmore: but it is nice to see ruby does not need this
[20:27:27] plexigras: has joined #ruby
[20:30:26] NingaLeaf: has joined #ruby
[20:35:51] tdy: has joined #ruby
[20:39:34] fullstack_: has joined #ruby
[20:39:44] snickers: has joined #ruby
[20:41:26] itismeamario1: has joined #ruby
[20:43:29] itismeamario1: hello! is there a 1-liner to turn foo = [{ title: '51 Shades', orders: 1 }, { title: 'Hobbit', orders: 1 }, { title: '51 Shades', orders: 5 }] into [{ title: '51 Shades', orders: 6 }, { title: 'Hobbit', orders: 1 } ] ?
[20:44:09] Dark_Arc: has joined #ruby
[20:44:34] itismeamario1: I have a solution but it's pretty long, and I am certain there's a way more elegant way in Ruby to achieve adding things in ruby
[20:45:47] Eiam: also im laughing at yesterdays discussion about Rubyists obsession with 1 liners =)
[20:46:43] gizmore: Eiam: i do many def as oneliner
[20:47:50] gizmore: Eiam: https://github.com/gizmore/gdo (the readme is not there yet)
[20:47:58] gizmore: checkout lib/GDO
[20:49:42] gizmore: Eiam: also checkout my spec file :P ... https://github.com/gizmore/gdo/blob/master/spec/gdo_spec.rb .... yet another test driven ruby gem =)
[20:50:49] Dark_Arc: has joined #ruby
[20:51:32] gizmore: Eiam: i am recoding my gdo stuff in ruby.... i did the last version in php, and it was awe
[20:51:47] gizmore: the bad thing about gdo6 is that it is written in php
[20:52:15] gizmore: also in php i dont know how to rspec
[20:52:16] n3b: has joined #ruby
[20:59:51] dinfuehr: has joined #ruby
[21:04:14] loincloth: has joined #ruby
[21:04:15] jenrzzz_: has joined #ruby
[21:06:55] mikecmpbll: has joined #ruby
[21:09:19] ramfjord: has joined #ruby
[21:14:41] baweaver: >> [{title: '51 Shades', orders: 1},{title: 'Hobbit', orders: 1},{title: '51 Shades', orders: 5}].group_by { |h| h[:title] }.map{ |k, vs| {title: k, orders: vs.map{ |v| v[:orders] }.reduce(0,:+)} }
[21:14:42] ruby[bot]: baweaver: # => [{:title=>"51 Shades", :orders=>6}, {:title=>"Hobbit", :orders=>1}] (https://eval.in/1013469)
[21:14:52] baweaver: If itismeamario1 shows back up, show them that.
[21:17:52] Eiam: baweaver: meh, was tinkering with a merge solution still
[21:18:28] Eiam: figured a .reduce({}) and .merge would be sufficient but trying to sort out what I'm missing
[21:19:23] Eiam: baweaver: foo.reduce({}) { |sum,val| sum.merge(val) {|a,b,c| b + c }; sum } basically
[21:22:22] tomphp: has joined #ruby
[21:22:32] rfoust: has joined #ruby
[21:22:37] SolarAquarion: has joined #ruby
[21:22:46] peterR``: has joined #ruby
[21:22:57] peterR``: can someone help me with the guard gem?
[21:23:36] phaul: has joined #ruby
[21:23:47] SolarAquarion: https://gist.github.com/SolarAquarion/841cf545b14092591e92dca37737924a
[21:23:55] SolarAquarion: i keep on getting this error
[21:27:25] derp10327: If full stack development had a different name, I bet it would pay less lol
[21:28:32] orbyt_: has joined #ruby
[21:29:32] alex``: has joined #ruby
[21:31:50] beefjoe70: has joined #ruby
[21:32:11] Eiam: now thats weird, huh...
[21:32:53] Eiam: >> [{ title: '51 Shades', orders: 1 }, { title: 'Hobbit', orders: 1 }, { title: '51 Shades', orders: 5 }].reduce{ |sum,val| sum.merge(val) {|a,b,c| a == :orders ? b + c : b }; sum }
[21:32:54] ruby[bot]: Eiam: # => {:title=>"51 Shades", :orders=>1} (https://eval.in/1013471)
[21:33:51] Eiam: >> { title: '51 Shades', orders: 1 }.merge({ title: '51 Shades', orders: 5 }) {|a,b,c| a == :orders ? b + c : b }
[21:33:52] ruby[bot]: Eiam: # => {:title=>"51 Shades", :orders=>6} (https://eval.in/1013472)
[21:34:48] Eiam: what am I missing here? Isn't the 3rd iteration on the reduce the same as the last example?
[21:35:54] alfiemax: has joined #ruby
[21:35:59] Eiam: oh no, its an array
[21:37:28] ur5us: has joined #ruby
[21:38:58] alfiemax_: has joined #ruby
[21:39:51] brendan-: has joined #ruby
[21:40:54] millerti: has joined #ruby
[21:44:09] chouhoul_: has joined #ruby
[21:46:41] arkinor: has joined #ruby
[21:50:06] peterR``: what's this error? C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/guard-livereload-2.5.2/lib/guard/livereload/reactor.rb:48:in `_start_reactor': undefined method `epoll?' for EventMachine:Module
[21:50:58] fmcgeough: has joined #ruby
[21:52:15] wolfshappen: has joined #ruby
[21:53:28] blackmesa: has joined #ruby
[21:54:43] dminuoso: peterR``: epoll is not available on windows.
[21:56:07] peterR``: so what to use instead?
[21:57:11] cyberg: has joined #ruby
[21:57:44] bmurt: has joined #ruby
[21:58:30] ramfjord: has joined #ruby
[21:59:04] apeiros: gizmore: there is #ruby-offtopic
[21:59:19] apeiros: it's less frequented than #ruby, though
[21:59:26] gizmore: of course :)
[21:59:37] gizmore: did you look at my spec?
[22:00:05] Dark_Arc: has joined #ruby
[22:03:25] derp10327: Apparently I switched up my scroll lock and prt screen buttons while cleaning the keyboard last night
[22:05:54] eckhardt_: has joined #ruby
[22:06:03] ramfjord: has joined #ruby
[22:07:39] nowhere_man: has joined #ruby
[22:07:48] apeiros: gizmore: no, watching expanse atm, way more interesting ;-) (no offense)
[22:10:10] jenrzzz: has joined #ruby
[22:10:10] jenrzzz: has joined #ruby
[22:13:08] noobineer: has joined #ruby
[22:20:11] cyberg: has joined #ruby
[22:20:41] arkinor: has joined #ruby
[22:21:01] jenrzzz: has joined #ruby
[22:21:01] jenrzzz: has joined #ruby
[22:21:53] zululee: has joined #ruby
[22:25:20] arkinor: has joined #ruby
[22:28:35] wolfshappen: has joined #ruby
[22:28:49] cschneid: has joined #ruby
[22:33:31] baweaver: Eiam: problem with merge is they're distinct units, and merging them into a hash doesn't take care of that.
[22:37:31] jenrzzz: has joined #ruby
[22:37:31] jenrzzz: has joined #ruby
[22:38:49] ramfjord: has joined #ruby
[22:43:45] DLSteve_: has joined #ruby
[22:47:58] derp10327: ACTION ponders whether it should be "Ruby On Rails" or "Web Development On Ruby Rails"
[22:52:11] karapetyan: has joined #ruby
[22:52:14] jalcine: has joined #ruby
[22:54:13] amar: has joined #ruby
[22:58:27] venmx: has joined #ruby
[23:00:54] brucebag: has left #ruby: ()
[23:01:23] tomphp: has joined #ruby
[23:02:02] jenrzzz: has joined #ruby
[23:02:02] jenrzzz: has joined #ruby
[23:03:20] mikecmpbll: has joined #ruby
[23:03:33] tomphp: has joined #ruby
[23:03:34] cyberg: has joined #ruby
[23:04:21] tomphp: has joined #ruby
[23:06:36] tomphp: has joined #ruby
[23:08:10] gr33n7007h: has joined #ruby
[23:08:54] tomphp: has joined #ruby
[23:10:33] tomphp: has joined #ruby
[23:14:55] amar: has joined #ruby
[23:16:13] jenrzzz: has joined #ruby
[23:16:14] jenrzzz: has joined #ruby
[23:16:58] roshanavand: has joined #ruby
[23:22:32] Radar: derp10327: wat
[23:23:33] derp10327: Well, using ruby on rails for web dev makes the whole process fast, or "on rails". but saying that Ruby is the thing "on rails" implies it makes writing ruby faster...
[23:23:50] derp10327: it's philosophical I know
[23:25:11] derp10327: unless you believe this dick https://stackoverflow.com/a/193525
[23:27:30] zenspider: has joined #ruby
[23:34:30] eam: I always assumed it meant lines of cocaine
[23:35:16] shinnya: has joined #ruby
[23:35:46] eam: crystal being the natural evolution
[23:36:14] arkinor: has joined #ruby
[23:37:18] derp10327: That does make sense tbh
[23:37:40] derp10327: also, why did the devs of clojure miss out on the chance to call it clothure
[23:38:01] eam: couture?
[23:38:23] derp10327: clothure, you know, like closure but with a Lisp
[23:38:31] eam: oh haha
[23:38:47] jenrzzz: has joined #ruby
[23:39:07] derp10327: But in all seriousness, I watched one of the clojure dev's talks online and it was inspiring and motivating
[23:39:54] derp10327: https://www.infoq.com/presentations/Simple-Made-Easy I fell asleep when he started talking about Clojure though (like actually fell asleep).
[23:40:40] peterR``: has joined #ruby
[23:41:04] derp10327: the embed is messing up on my end, https://videoh.infoq.com/presentations/11-sep-simplemadeeasy.mp4 if you want to watch it
[23:42:09] baweaver: Rich Hickey, and most of his talks are great
[23:48:30] derp10327: However, I think his name sounds like a country rap group
[23:48:48] arkinor: has joined #ruby
[23:49:06] havenwood: +1 Rich Hickey talks
[23:52:02] sytherax: has joined #ruby
[23:52:59] Utility: has joined #ruby