« Back to channel list

#ruby - 13 March 2018

« Back 1 day Forward 1 day »
[00:00:04] drewmcmillan: has joined #ruby
[00:02:56] cdg_: has joined #ruby
[00:03:31] ryandv: has joined #ruby
[00:04:05] dmitriy_: has joined #ruby
[00:06:49] milardovich: has joined #ruby
[00:09:07] dmitriy_: has joined #ruby
[00:10:18] raul782: has joined #ruby
[00:10:41] eckhardt_: has joined #ruby
[00:14:05] dmitriy_: has joined #ruby
[00:14:47] hahuang61: has joined #ruby
[00:14:59] Yzguy: has joined #ruby
[00:16:25] gr33n7007h: has joined #ruby
[00:18:03] ryandv: has joined #ruby
[00:19:01] cdg: has joined #ruby
[00:19:04] dmitriy_: has joined #ruby
[00:20:34] riotjones: has joined #ruby
[00:20:48] JoshS: has joined #ruby
[00:21:30] shinnya: has joined #ruby
[00:24:05] dmitriy_: has joined #ruby
[00:25:20] cagomez: has joined #ruby
[00:27:43] orbyt_: has joined #ruby
[00:29:05] dmitriy_: has joined #ruby
[00:29:06] n0m4d1c: has joined #ruby
[00:29:44] mikecmpbll: has joined #ruby
[00:34:02] minimalism: has joined #ruby
[00:34:07] dmitriy_: has joined #ruby
[00:37:25] workmad3: has joined #ruby
[00:37:30] herbmillerjr: has joined #ruby
[00:39:26] dmitriy_: has joined #ruby
[00:40:01] kn-928_: has joined #ruby
[00:40:56] milardovich: has joined #ruby
[00:41:24] ramfjord: has joined #ruby
[00:44:06] dmitriy_: has joined #ruby
[00:46:11] cdg: has joined #ruby
[00:47:09] c0ncealed: has joined #ruby
[00:49:11] dmitriy_: has joined #ruby
[00:54:11] dmitriy_: has joined #ruby
[00:57:36] jenrzzz: has joined #ruby
[00:57:36] jenrzzz: has joined #ruby
[00:59:08] dmitriy_: has joined #ruby
[01:04:12] dmitriy_: has joined #ruby
[01:09:42] hahuang61: has joined #ruby
[01:10:12] ramfjord: has joined #ruby
[01:16:00] kn-928_: has joined #ruby
[01:17:36] netherwolfe: has joined #ruby
[01:18:35] ramfjord: has joined #ruby
[01:22:16] s3nd1v0g1us: has joined #ruby
[01:31:29] orbyt_: has joined #ruby
[01:32:15] cagomez: has joined #ruby
[01:39:10] detectiveaoi: has joined #ruby
[01:43:50] jeffreylevesque: has joined #ruby
[01:44:07] xuyuheng: has joined #ruby
[01:45:27] n0m4d1c: has joined #ruby
[01:52:00] houhoulis: has joined #ruby
[01:52:08] alfiemax: has joined #ruby
[01:53:05] Paraxial: has joined #ruby
[02:06:16] dviola: has joined #ruby
[02:07:14] rexb0t: has joined #ruby
[02:07:55] cdg: has joined #ruby
[02:10:50] kn-928_: has joined #ruby
[02:11:37] X-Jester_: has joined #ruby
[02:12:01] dinfuehr: has joined #ruby
[02:12:34] X-Jester_: has left #ruby: ()
[02:13:34] vutral|kali: has joined #ruby
[02:13:34] vutral|kali: has joined #ruby
[02:13:44] foohey: has joined #ruby
[02:14:24] X-Jester: has joined #ruby
[02:14:45] hahuang61: has joined #ruby
[02:15:45] yxhuvud: has joined #ruby
[02:17:06] cdg: has joined #ruby
[02:17:45] ryandv: has joined #ruby
[02:17:59] darkhanb: has joined #ruby
[02:23:29] sammi`: has joined #ruby
[02:23:33] m27frogy: has joined #ruby
[02:23:59] cagomez: has joined #ruby
[02:28:44] rexb0t: has joined #ruby
[02:32:46] rgb-one: has joined #ruby
[02:33:44] rgb-one: what helper is included with haml that can provide the index route?
[02:37:36] vutral|kali: has joined #ruby
[02:37:36] vutral|kali: has joined #ruby
[02:37:48] workmad3: has joined #ruby
[02:42:33] jenrzzz: has joined #ruby
[02:42:33] jenrzzz: has joined #ruby
[02:47:51] gizmore|2: has joined #ruby
[02:51:46] vutral|kali: has joined #ruby
[02:51:46] vutral|kali: has joined #ruby
[03:04:34] sspreitz: has joined #ruby
[03:06:06] nowhere_man: has joined #ruby
[03:06:34] kies: has joined #ruby
[03:07:51] vutral|kali: has joined #ruby
[03:07:51] vutral|kali: has joined #ruby
[03:08:34] hahuang61: has joined #ruby
[03:10:26] vutral|kali: has joined #ruby
[03:10:26] vutral|kali: has joined #ruby
[03:16:51] raul782: has joined #ruby
[03:21:40] lopezd: has joined #ruby
[03:22:33] lopezd: Hello everyone. I have a question regarding inheritance and attribute accessors anyone able to offer some guidance?
[03:22:42] dminuoso: lopezd: Shoot.
[03:23:36] ramfjord: has joined #ruby
[03:23:41] lopezd: lets say i have an Animal class with an initialize method that sets @type=mamal and has a private attr_reader :type
[03:23:46] govg: has joined #ruby
[03:24:29] lopezd: when i define a subclass Animal > Dog in the Dogs initialize method i print type and i get mammal as expected
[03:25:06] lopezd: first question why i can set the type to a new value inside the Dog class when only an attr_reader and not an attr_accessor is defined?
[03:25:49] lopezd: i can easily do type=reptile in the Dog class and change the value
[03:26:10] dminuoso: lopezd: attr_accessor/attr_reader are just for external access, and they are only shorthands for: `def foo=(a); @foo = a; end` and `def foo; @foo; end`
[03:26:26] dminuoso: lopezd: From within the class you can directly access ivars using @foo
[03:26:44] lopezd: I see, exactly then i was wondering of the meaning of having a private external accessor....
[03:27:05] lopezd: i have seen it many times
[03:28:04] dminuoso: lopezd: attr_accessor is generally a rather bad thing because you no longer can maintain an invariant.
[03:28:21] dminuoso: lopezd: attr_reader is generally fine, but depends on whether you want to leak internals
[03:28:44] lopezd: so if i want my base class to
[03:28:59] lopezd: a. define a variable that should be default for all child classes
[03:29:01] detectiveaoi: has joined #ruby
[03:29:16] lopezd: b. define a variable that needs to be set by all child classes
[03:29:28] lopezd: what is the ruby way of doing it?
[03:30:43] vutral|kali: has joined #ruby
[03:30:43] vutral|kali: has joined #ruby
[03:31:55] dminuoso: lopezd: You could use the inherited hook
[03:32:03] dminuoso: lopezd: But I dont think its generally good style.
[03:32:25] lopezd: i have seen that but yes not a fan
[03:32:26] dminuoso: lopezd: Just initialize it in your initializer, and demand that descendants call `super`
[03:33:10] lopezd: so accessors should only be used when you need access to a variable after a class is instantiated right?
[03:33:57] dminuoso: lopezd: Right, and sparingly at best.
[03:34:18] lopezd: I have seen this example at reek's github https://pastebin.com/a4USBXmD
[03:34:20] ruby[bot]: lopezd: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/1b8bda6da92e85fc57e329ec2c03f046
[03:34:20] ruby[bot]: lopezd: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[03:34:44] lopezd: what is the point of that private attr_reader
[03:34:54] lopezd: apologies for paste bin
[03:36:39] dminuoso: lopezd: Just some style some people like to use
[03:37:17] lopezd: man trying so hard to follow all the guidelines i am shooting myself in the face haha
[03:37:28] dminuoso: lopezd: Instead of @foo they can just do self.foo = .../foo
[03:37:35] dminuoso: lopezd: You can ignore it, carry on and use ivars.
[03:38:32] detectiveaoi: has joined #ruby
[03:38:36] lopezd: i have been avoiding the use of @@ but have been using private attr_readers, writers module_function private_class_method etc
[03:38:54] dminuoso: lopezd: keeo on avoiding @@
[03:39:30] lopezd: i am just perplexed at the use of private accessors they seem to be useless. i can just say private @type right?
[03:39:38] dminuoso: lopezd: Yup.
[03:39:47] dminuoso: lopezd: well @type _is_ private.
[03:39:55] dminuoso: lopezd: But you are absolutely right, its pretty useless
[03:39:59] lopezd: without the private keyword?
[03:40:04] dminuoso: lopezd: You dont have to say anything.
[03:40:08] dminuoso: ivars magically exist.
[03:40:17] dminuoso: No need to declare them, they just default to nil.
[03:40:17] lopezd: private is for methods i guess?
[03:40:20] dminuoso: lopezd: Yup.
[03:40:44] lopezd: so class Animal @type
[03:40:56] lopezd: that will make a private variable type?
[03:41:00] dminuoso: lopezd: So you only set them in #initialize if you need to enforce some invariant about their content
[03:41:13] lopezd: then a subclass can freely access it and modify it right?
[03:41:33] dminuoso: lopezd: You dont declare variables in Ruby.
[03:41:46] dminuoso: lopezd: You just use them. If you need some default value, use #initialize
[03:41:47] lopezd: they should be in initialize if a default value is required
[03:42:23] dminuoso: lopezd: Right. And if you want that to propagate through inheritance, then require descendants to call `super/super()` in their #initialize
[03:42:32] lopezd: so in a subclass once i call super in initialize i get access to those @ define in the parent class?
[03:44:33] lopezd: another thing i noticed, the reek example i shared earlier, if the subclass does not define initialize the parent class @variable omg is accessible without @ that is because of the reader right?
[03:45:19] lopezd: maybe that is a "good use" of a private reader accessing variable through a method albeit a bit confusing when seen from subclass
[03:54:16] dminuoso: lopezd: well not really "without the @"
[03:54:38] dminuoso: lopezd: @foo taps into an ivar named foo
[03:54:44] dminuoso: lopezd: foo taps into a method called foo
[03:54:54] lopezd: is because of the attr_reader haha
[03:55:00] lopezd: kind of confusing
[03:55:04] dminuoso: lopezd: well it just so happens, that attr_reader turns the second into the first.
[03:55:27] dminuoso: lopezd: but just seeing an `invocation` of `foo` of course does not guarantee that.
[03:56:03] dminuoso: class Thing; def foo; "Just kidding you!; end; end
[03:57:36] lopezd: if i define an ivar in the top of class (outside) initialize it is accessible to all the methods but if I do @foo in a method then it is only accessible in that method right?
[03:58:06] abj_linuxgeek: has joined #ruby
[03:59:05] banisterfiend: has joined #ruby
[04:00:32] hahuang61: has joined #ruby
[04:08:31] kapil___: has joined #ruby
[04:10:09] Emmanuel_Chanel: has joined #ruby
[04:11:03] howdoi: has joined #ruby
[04:11:19] nadir: has joined #ruby
[04:17:20] cthulchu|: has joined #ruby
[04:18:33] elcontrastador: has joined #ruby
[04:19:45] lpmusic: has joined #ruby
[04:23:44] jcarl43: has joined #ruby
[04:25:15] trautwein: has joined #ruby
[04:26:56] tolerablyjake: has joined #ruby
[04:29:49] kn-928_: has joined #ruby
[04:30:20] yxhuvud: has joined #ruby
[04:38:17] workmad3: has joined #ruby
[04:42:50] xuyuheng: has joined #ruby
[04:55:50] cloaked1: has joined #ruby
[04:55:50] cloaked1: has joined #ruby
[04:56:41] Emmanuel_Chanel: has joined #ruby
[04:56:59] gix-: has joined #ruby
[04:59:18] Yzguy: has joined #ruby
[04:59:26] arescorpio: has joined #ruby
[05:04:09] banisterfiend: has joined #ruby
[05:06:01] dmitriy_: has joined #ruby
[05:06:33] ChaosBringer: has joined #ruby
[05:07:43] jinie: has joined #ruby
[05:08:04] ruby-meister: has joined #ruby
[05:09:13] ruby-meister: quick question: let's say I have an array like this: arr = [1,2,3,4,5,6]
[05:09:22] ruby-meister: and I wanna print everything in it
[05:09:36] ruby-meister: arr.each do |i|
[05:10:00] ruby-meister: why doesn't this print out 1?
[05:10:09] dminuoso: ruby-meister: .each invokes the block for each element, not each index.
[05:10:22] dminuoso: So in your case `i` itself already is the element you want.
[05:10:42] ruby-meister: oh i get it, thanks!
[05:14:06] aufi: has joined #ruby
[05:18:45] ChaosBringer: has joined #ruby
[05:22:08] banisterfiend: has joined #ruby
[05:23:17] ramfjord: has joined #ruby
[05:24:46] cdg: has joined #ruby
[05:26:19] sidx64: has joined #ruby
[05:27:12] jinie: has joined #ruby
[05:31:18] ChaosBringer: has joined #ruby
[05:32:37] jinie: has joined #ruby
[05:33:56] guacamole: has joined #ruby
[05:33:56] guacamole: has joined #ruby
[05:35:28] xuyuheng: has joined #ruby
[05:43:03] aufi: has joined #ruby
[05:49:42] ChaosBringer: has joined #ruby
[05:56:55] xuyuheng: has joined #ruby
[06:03:05] hahuang65: has joined #ruby
[06:04:45] jamesaxl: has joined #ruby
[06:06:18] xuyuheng: has joined #ruby
[06:14:08] sauvin_: has joined #ruby
[06:14:57] KeyJoo: has joined #ruby
[06:15:51] KeyJoo: has joined #ruby
[06:17:44] alfiemax: has joined #ruby
[06:17:44] TinkerT: has joined #ruby
[06:18:03] morfin60: has joined #ruby
[06:38:36] workmad3: has joined #ruby
[06:40:22] ChaosBringer: has joined #ruby
[06:50:21] tAn: has joined #ruby
[06:58:17] suukim: has joined #ruby
[07:08:15] morfin60: i am not sure how implement next thing: i need to perform some job for different "accounts" with execution limit(let's say 35 time per day) for each account
[07:09:33] \void: has joined #ruby
[07:09:45] morfin60: what you'd use for this: Sidekiq? parallel? Let's assume most of time threads will be idling so i don't need N threads all the time
[07:18:38] mrush: has joined #ruby
[07:22:56] ramfjord: has joined #ruby
[07:23:19] sidx64: has joined #ruby
[07:24:01] conta: has joined #ruby
[07:24:53] alfiemax: has joined #ruby
[07:24:59] conta: has joined #ruby
[07:25:33] \void: has joined #ruby
[07:36:48] andikr: has joined #ruby
[07:39:54] jenrzzz: has joined #ruby
[07:39:54] jenrzzz: has joined #ruby
[07:43:55] mtkd: has joined #ruby
[07:46:18] alex``: has joined #ruby
[07:52:34] _aeris_: has joined #ruby
[07:53:59] sidx64: has joined #ruby
[07:55:44] SebastianThorn: has joined #ruby
[07:56:54] SebastianThorn: has joined #ruby
[07:58:28] karapetyan: has joined #ruby
[07:58:48] suukim: has joined #ruby
[08:00:53] aufi: has joined #ruby
[08:03:39] riotjones: has joined #ruby
[08:04:38] alfiemax: has joined #ruby
[08:04:48] rwb: has joined #ruby
[08:12:57] clemens3: has joined #ruby
[08:17:58] TomyWork: has joined #ruby
[08:18:34] oetjenj: has joined #ruby
[08:18:36] tAn: has joined #ruby
[08:22:00] tAn: has joined #ruby
[08:23:18] SebastianThorn: has joined #ruby
[08:23:28] cdg: has joined #ruby
[08:24:28] alfiemax: has joined #ruby
[08:24:59] schneider: has joined #ruby
[08:34:22] claudiuinberlin: has joined #ruby
[08:39:57] n008f4g_: has joined #ruby
[08:42:51] aupadhye: has joined #ruby
[08:45:32] ianfleeton: has joined #ruby
[08:46:50] hahuang65: has joined #ruby
[08:47:08] ianfleeton: has joined #ruby
[08:48:44] dionysus69: has joined #ruby
[08:51:40] tvw: has joined #ruby
[08:54:14] burgestrand: has joined #ruby
[08:55:36] aufi_: has joined #ruby
[08:56:55] amatas: has joined #ruby
[09:01:22] mikecmpbll: has joined #ruby
[09:01:59] jottr: has joined #ruby
[09:02:59] zenspider: morfin60: do the simplest thing that could possibly work.
[09:03:15] zenspider: don't make it harder than it needs to be (yet--but probably never)
[09:04:44] amatas: has joined #ruby
[09:06:35] Sylario: has joined #ruby
[09:09:07] _sfiguser: has joined #ruby
[09:09:11] _sfiguser: hello all, when designing ruby software, are you using UML or it is something you don't usually do ? 
[09:10:24] dminuoso: I usually do some doodles on scratch paper while Im drunk.
[09:10:41] burgestrand: _sfiguser not usually, but occasionally, definitely more often when discussing database layout
[09:11:02] burgestrand: although the formality of the format is closer to what dminuoso illustrated
[09:11:40] burgestrand: squigglys with crow's feet-relationships
[09:22:34] ramfjord: has joined #ruby
[09:24:43] guille-moe: has joined #ruby
[09:25:46] Mike11: has joined #ruby
[09:26:30] sidx64: has joined #ruby
[09:28:05] cdg: has joined #ruby
[09:29:55] cdg_: has joined #ruby
[09:30:22] phaul: has joined #ruby
[09:30:50] kapil___: has joined #ruby
[09:31:38] cdg__: has joined #ruby
[09:32:19] universa1: has joined #ruby
[09:35:12] marr: has joined #ruby
[09:35:43] za1b1tsu: has joined #ruby
[09:38:17] schneider: has joined #ruby
[09:42:47] morfin60: i am not sure how "persist" object connected to browser
[09:44:09] dminuoso: morfin60: <a href="mailto:persistor@server.com?subject=..."></a>, use JavaScript to serialize your objects, put it into the body, and have the user click on it.
[09:44:15] dminuoso: That's how I persist my web application state.
[09:48:38] sfiguser__: has joined #ruby
[09:49:06] mtkd: has joined #ruby
[09:50:00] riotjones: has joined #ruby
[09:53:26] morfin60: dminuoso, what?
[09:53:49] morfin60: i meant persist N Selenium wrapper objects somewhere
[09:54:21] sidx64: has joined #ruby
[09:54:34] za1b1tsu: Hello anyone using vim with ruby?
[09:54:45] dminuoso: za1b1tsu: Not anymore. I just switched to the dark side.
[09:54:52] dminuoso: za1b1tsu: Whats up?
[09:56:29] rahul_bajaj: has joined #ruby
[09:56:48] dminuoso: tbuehlmann: You should I should write a book about the persistor pattern?
[09:56:57] dminuoso: Java people all around the world would cheer.
[09:57:36] za1b1tsu: dminuoso, regarding tags, I am using ripper-tags, with gutentags(auto generates tags) with deoplete autocomplete. Everything was great, but as usual I wanted more, I wanted tags from the gemfiles, so I got gem-ripper-tags which is basically tpopes' ctags but with ripper-tags, that generates tag files for the gems. To include those tag files, I use vim-bundler, but now deoplete does not use the tags in my main project folder. Did you ever try to setup
[09:57:37] za1b1tsu: tags somewhat like this?
[09:57:38] universa1: has joined #ruby
[09:57:56] dminuoso: Have you tried spacema... uh..
[09:59:44] za1b1tsu: spacema...?
[09:59:47] dminuoso: za1b1tsu: What if you manually `set tags=...` ?
[09:59:59] dminuoso: Oh nothing, I was just making a sarcastic joke by suggesting you try out spacemacs.
[10:00:01] Beams: has joined #ruby
[10:00:31] tbuehlmann: dminuoso: I'd say just go for it
[10:00:53] drewmcmillan: has joined #ruby
[10:11:10] sidx64: has joined #ruby
[10:11:59] zenspider: morfin60: so much for do the simplest thing that could possibly work...
[10:13:03] RougeR: has joined #ruby
[10:13:03] RougeR: has joined #ruby
[10:16:20] anisha__: has joined #ruby
[10:18:40] sidx64: has joined #ruby
[10:22:53] nomenkun: has joined #ruby
[10:23:05] riotjones: has joined #ruby
[10:23:48] rahul_bajaj: has joined #ruby
[10:24:38] sidx64: has joined #ruby
[10:33:23] _sfiguser: has joined #ruby
[10:33:41] _sfiguser: hello all, can somebody suggest me a good starting point for beginners who want to start with RoR ?
[10:33:43] drewmcmillan: has joined #ruby
[10:33:45] _sfiguser: ruy on rails
[10:35:19] dminuoso: ?rails _sfiguser
[10:35:19] ruby[bot]: _sfiguser: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[10:35:40] suukim: has joined #ruby
[10:36:20] karapetyan: has joined #ruby
[10:38:51] karapetyan: has joined #ruby
[10:39:28] workmad3: has joined #ruby
[10:40:34] linduxed: has joined #ruby
[10:40:37] leitz: has joined #ruby
[10:45:27] sidx64: has joined #ruby
[10:47:48] riotjones: has joined #ruby
[10:51:09] Bish: has joined #ruby
[10:51:27] Bish: somebody got a idea how i present a series of images as a video with ruby?
[10:52:49] mnemon: Bish: imagemagick/rmagick can probably do the conversion at least to gif?
[10:53:45] Bish: can't install the gem :(
[10:53:59] Bish: conftest.c:3:29: schwerwiegender Fehler: wand/MagickWand.h: Datei oder Verzeichnis nicht gefunden
[10:54:02] Bish: sorry for the german
[10:54:15] dminuoso: You have revealed yourself.
[10:54:15] mnemon: probably need the imagemagick libs
[10:55:25] Bish: damn now i have to get rid of ze zikret plan to take over ze world with imagemaKICK
[10:55:43] Bish: mnemon: i have them
[10:56:23] dminuoso: I dont get how people use german locale on their machines.
[10:56:27] dminuoso: "schwerwiegender Fehler"
[10:56:29] dminuoso: Looks so silly
[10:56:33] Bish: i am wondering myself why i have that
[10:56:55] Bish: i think because i wanted de_DE.UTF-8 i guess, and it found its way to the locales
[10:57:07] Bish: dminuoso: it also does not help at all if you want to google that
[10:57:16] xuyuheng: has joined #ruby
[10:57:22] Bish: and don't have a gcc⇔english translation in your head
[10:57:28] dminuoso: Bish: especially the mental switchery...
[10:57:34] Bish: i do not even notice
[10:57:41] dminuoso: schwerwiegender Fehler: wand/[...]Wand.h
[10:57:44] Bish: if i watch a movie, i can't tell you if i did it in english or german afterwards
[10:57:53] Bish: ah, that's what you mean, no i also don't notice that
[10:58:49] Bish: also i think usually my error messages are english, just not gcc.. why so ever
[10:59:51] Bish: dminuoso: at home i only install en translations of software, but have de_DE.UTF-8 for locale.. at work i forgot to only activiate the building of english translations
[11:00:31] Beams: has joined #ruby
[11:02:02] leitz: if s is a string, what is the "&" doing in hash.collect(&s.method(:gsub)) ?
[11:02:20] konsolebox: has joined #ruby
[11:02:24] Bish: converting the method gsub to a proc
[11:03:01] Bish: it doesn't matter what "s" is, since you're using & on s.method(...)
[11:03:25] Bish: . binds harder than &, so it's basicially &(s.method(:gsub))
[11:03:30] leitz: Bish, thanks! I was thinking it was doing something just to the string.
[11:03:41] xuyuheng: has joined #ruby
[11:03:50] Bish: leitz: nothing binds harder than . in ruby, NOZENG!
[11:04:12] leitz: Bish, danke. ;)
[11:04:21] Bish: GESUNDHEIT
[11:04:24] Bish: wait, we don't even do that
[11:04:52] Bish: Bitte :3
[11:04:53] dminuoso: ACTION pokes Bish
[11:06:05] dminuoso: Bish: Are you sure that & binds stronger than . ?
[11:06:18] Bish: i am sure you're now telling me it doesn't
[11:06:19] leitz: German is on my list of languages to learn. Sadly, I have more desired languages than brain cells.
[11:06:21] Bish: in every case
[11:06:46] dminuoso: Bish: Haha no. Im just trying to throw you off your game.
[11:07:09] Bish: leitz: if you ask me, german is only good for poetry, it's not really logical, but you can express alot with one word.
[11:07:12] dminuoso: Bish: https://github.com/ruby/ruby/blob/trunk/parse.y#L897-L903
[11:07:19] Bish: dminuoso: i think you taught me that
[11:07:45] dminuoso: Bish: Doubt it, had to check before I tried to pull your leg.
[11:07:48] Bish: i hate MRI code so much
[11:08:01] dminuoso: Bish: You should see GHC code. That stuff is actually hackable
[11:08:03] Bish: it was some big name of this channel atleast
[11:08:09] _sfiguser: has joined #ruby
[11:08:12] Bish: dminuoso: ghc is worse?
[11:08:21] sidx64: has joined #ruby
[11:08:27] Bish: really, i love reading c code of implementations
[11:08:33] dminuoso: Bish: Huh? No. It's one of the cleanest compiler implementations Ive seen. I dived in last week and did some minor modifications with ease.
[11:08:40] Bish: but i don't know what matz smoked, or it was the lack thereof
[11:08:42] dminuoso: Increadibly well documented in code, even better documented out of code.
[11:08:50] Bish: ruby is unenjoyable to read
[11:08:59] Bish: dminuoso: but it's terribly slow, isn't it?
[11:09:06] dminuoso: Bish: what is slow?
[11:09:07] Bish: i heard that is the main drawback of people using it..
[11:09:16] xuyuheng: has joined #ruby
[11:09:23] dminuoso: Bish: Well it has become slower, but you need to have a pretty hefty project to feel the pain though.
[11:09:25] Bish: i read about a survey where people had to say, what they hate most about haskell, that it compiles so slow
[11:09:47] dminuoso: Bish: For a long while the focus has been on writing a clean implementation with a focus on features.
[11:10:00] dminuoso: Bish: But there are regression tests that prevent the compiler from getting slower in place now.
[11:10:05] Bish: what's a .y file, btw?
[11:10:09] dminuoso: Bish: bison
[11:10:11] leitz: Ruby GHC?
[11:10:26] Bish: leitz: nope, we're super offtopic right now
[11:10:49] leitz: Bish, no problem. Trying to expand my horizons. Haskell?
[11:11:03] Bish: leitz: yes, dminuoso and me are huge fans.. while i am only a fan
[11:11:07] Bish: dminuoso can actually do something with it
[11:11:54] Bish: wish it wasn't so freaking ugly, in haskell people are like
[11:12:05] Bish: that's a pretty operator x = y .+ 3
[11:12:10] leitz: In reading Booch's "Object Oriented Design and Analysis", he talks a lot about Smalltalk. After reading it some of the Ruby-ism's seem familiar. In "Mastering Ruby Closures" the author likes Haskell, too.
[11:12:19] Bish: i really feel like one could do better
[11:12:37] dminuoso: Bish: Well lens kind of goes overboard with operators.. but beyond that its kind of okay.
[11:12:37] Bish: leitz: it struck me when i was doing ruby professionelly for 2 years.. when i noticed
[11:13:00] Bish: that ruby is really ONLY ONLY boxes(methods + attributes) sending messages to each other
[11:13:12] dminuoso: Bish: there's only a couple to keep in mind like <>, <$>, <*>, *>, <*, >>=, >>, (.)
[11:13:14] Bish: if you grasp that thought, it becomes alot easier
[11:13:34] Bish: dminuoso: yeah but i am talking about when people write their pseudo-dsls
[11:13:51] Bish: and they're like.. defining "_+" to transfer it in + in SQL or something
[11:14:05] leitz: Bish, I'm slowly catching on. However, my brain translaste "Objects" to "nouns", or "things".
[11:14:16] Bish: that's not fucking pretty.. same thing in ruby is DB[:table] { column+3 }
[11:14:46] dminuoso: Bish: Well thats not a language symptom. What library is _+ from?
[11:15:18] Bish: leitz: object = a circle, which is closed, methods are doorways to that closed circle (the only way to talk to it)
[11:15:25] Bish: inside of that circle, you can save data
[11:15:37] dminuoso: Bish: Btw, I was pretty amazed when I learned about Haxl recently.
[11:15:50] dminuoso: Bish: There was a pretty good video from Simon Marlow himself about it.
[11:15:53] Bish: dminuoso: it was an example, might or not might've seen that
[11:16:04] Bish: dminuoso: i watched it.. super cool that you can split parallelism with it
[11:16:09] dminuoso: Bish: https://www.youtube.com/watch?v=sT6VJkkhy0o this?
[11:16:21] Bish: yes, that
[11:16:24] dminuoso: Bish: well the notion of "why not make concurrency the default..." is extremely cool
[11:16:39] Bish: yeah, remember when you explained applicative to me?
[11:16:45] Bish: that was exactly after i watched that video :D
[11:17:01] Bish: needed to know, why that's possible with applicative
[11:17:09] Bish: that shit is beyond cool, next level programming
[11:17:09] n008f4g_: has joined #ruby
[11:17:32] dminuoso: Bish: The really amazing thing, is that there is not much to Haxl itself.
[11:17:33] Bish: the talk of one(or the?) lead programmers of haxl is also cool
[11:17:37] Bish: some woman
[11:17:56] dminuoso: Bish: Pretty sure Simon is the lead
[11:18:08] cdg: has joined #ruby
[11:18:11] Bish: okay, some important girl then, because she knew alot
[11:18:28] Bish: https://www.youtube.com/watch?v=mlTO510zO78
[11:18:47] Bish: okay, it's not really about haxl, but it's cool because they say like
[11:18:57] Bish: they have people using haskell, which never heard what a monad is
[11:19:08] Bish: because you actually do not need to know, when doing these haxl filter functions
[11:19:12] dminuoso: Bish: Fun fact.. Applicatives too are monoids in (another) the monoidal category of endofunctors..
[11:20:03] dminuoso: Bish: Recently had someone who wanted to know how to chain functions "a -> Maybe b", told him to use >>=, and he responded with "but I dont know what a monad is" - "dont think about it, you're using it already"
[11:22:22] ramfjord: has joined #ruby
[11:23:55] John_Ivan: has joined #ruby
[11:23:55] John_Ivan: has joined #ruby
[11:25:41] yohji: has joined #ruby
[11:27:42] leitz: Bish, thanks. The "boxes" comment is clicking through my brain. I read an beginning Go lang book and the discussion of "interfaces" matches the boxes and may solve a Ruby problem for me.
[11:28:32] dminuoso: Bish: So did you give up by the way?
[11:34:07] Beams: has joined #ruby
[11:35:27] workmad3: has joined #ruby
[11:39:25] RougeR: has joined #ruby
[11:39:25] RougeR: has joined #ruby
[11:41:15] AJA4350: has joined #ruby
[11:41:57] soniya29: has joined #ruby
[11:42:09] soniya29_: has joined #ruby
[11:46:09] ldnunes: has joined #ruby
[11:49:18] sidx64: has joined #ruby
[11:49:50] riotjones: Bish: why do you hate MRI?
[11:50:13] riotjones: Seems that JIT is coming to ruby
[11:52:36] ciscam: has joined #ruby
[11:53:30] sidx64: has joined #ruby
[11:55:22] kapil___: has joined #ruby
[11:55:32] sidx64: has joined #ruby
[11:56:16] Cavallari: has joined #ruby
[11:56:34] Ryzokuken: has joined #ruby
[11:56:48] leitz: StackOverflow just released the developer survey results.
[11:57:19] leitz: https://insights.stackoverflow.com/survey/2018
[12:02:38] psychicist__: has joined #ruby
[12:04:59] chmurifree: has joined #ruby
[12:07:41] synthroid: has joined #ruby
[12:08:18] Bish: dminuoso: no, sorry, people in the office were like
[12:08:21] Bish: HMMM WERE HUNGRY
[12:08:23] Bish: LETS GOGOOGOG
[12:08:30] Bish: and i gave up, what?
[12:08:57] Bish: leitz: interfaces do not really exists, but you can imagine them a bit like templates for these boxes, that make sure certain methods exist
[12:09:09] Bish: (do not really exist, in ruby)
[12:09:29] Bish: and mixins are kinda like that, but not really
[12:11:59] DoubleMalt: has joined #ruby
[12:13:16] leitz: Bish, but the idea is there. As long as classes A, B, and C are coded to take method a with attribute b, then calling Object Z can assume a reasonable interface.
[12:13:35] leitz: Remember, I'm a newbie so the basics are still sinking in.
[12:16:26] leitz: On the SO list, Ruby beat C++ and PHP in "Most Loved".
[12:17:50] Mia: has joined #ruby
[12:17:50] Mia: has joined #ruby
[12:18:28] dminuoso: At least C++ has a working type system that is not hopelessly lost.
[12:20:03] Bish: CPP is out for me because code in headers, really, that's reason enough for me
[12:20:25] Bish: and OOP really makes more pain than gain in the end, that's why i would love pure functional in the end
[12:20:29] Bish: or atleast functional
[12:20:42] dminuoso: Well with OCaml you get an interesting hybrid.
[12:20:54] Bish: i will trust for me next cpp project
[12:21:03] Bish: dminuoso: what did u mean by saying "did u give up?
[12:21:18] dminuoso: Bish: give up with Haskell
[12:21:22] leitz: Uh, Rails isn't anywhere on the survey, far as I can see.
[12:21:28] Bish: not at all.. but i am super busy at the moment with my job
[12:21:34] nowhereman_: has joined #ruby
[12:21:36] Bish: been on a "Messe" last week, dunno the german word
[12:21:40] Bish: is it fare? fair?
[12:21:46] Bish: dunno the english world
[12:21:49] Bish: whatever
[12:22:51] Bish: as soon as i am fired i will write a webframework
[12:22:56] Bish: that will own everything in existence
[12:23:07] dminuoso: ACTION cant tell if tbuehlmann is joking or not
[12:23:12] tbuehlmann: *insert xkcd standards comic here*
[12:23:17] Bish: the way i write my webapps is always unorthodox
[12:23:25] tbuehlmann: that's my superpower, nobody can
[12:23:31] Bish: and i am arrogant enough to think it's the best way
[12:23:41] dminuoso: tbuehlmann: btw, we should get something to drink some day
[12:23:45] dminuoso: Im so frequently in Hannover :-)
[12:24:05] Bish: where are you from dminuoso ?
[12:24:12] leitz: Do the Ruby IRC and e-mail lists seem to be quiet to you all?
[12:24:19] tbuehlmann: you are? I thought you're just in good ol' P
[12:24:24] burgestrand: has joined #ruby
[12:24:29] dminuoso: Well I live there
[12:24:35] Bish: lol.. we're from the same city
[12:24:36] Bish: aren't we
[12:24:38] leitz: Or does everybody but me know everything and we just socialize.
[12:24:53] Bish: are you from PB?
[12:24:57] burgestrand: Bish not sure if you got an answer to your video question, but I'd recommend creating an actual video with ffmpeg
[12:24:57] dminuoso: Bish: No. Its another P.
[12:24:59] Bish: that would be crazy.
[12:25:13] dminuoso: Bish: The kind you find in the vicinity of Braunschweig.
[12:25:27] Bish: can't find it in my head, but pretty close i assume
[12:25:30] tbuehlmann: we don't say that word
[12:25:34] tbuehlmann: it's peine ost
[12:25:39] dminuoso: Bish: But.. as it so happens, Ill be travelling to PB over the easter holidays.
[12:25:42] Bish: sounds like peine in the ass
[12:25:56] ldnunes: has joined #ruby
[12:26:26] dminuoso: tbuehlmann: Anyway, my SO lives in H.
[12:26:51] Bish: hilarious, that you're so close
[12:27:08] dminuoso: ACTION is unsure what is hilarious about that fact
[12:27:16] dminuoso: ACTION is sure it might be curios, or interesting even
[12:27:17] Bish: well we "met" completely unrelated
[12:27:39] Bish: this happens quite often to me, but even more unlikely
[12:27:48] Bish: i met a girl from my street on omegle (yes i was young)
[12:27:55] Bish: i mean the street where my parents live.
[12:28:18] Bish: just recently, i met someone in #monero, who works for a ex-collegue of mine
[12:28:27] Bish: i find it hilarious.
[12:28:33] dminuoso: ACTION goes back emacsing
[12:28:37] havenwood: has joined #ruby
[12:28:37] havenwood: has joined #ruby
[12:28:44] baweaver: has joined #ruby
[12:28:45] Bish: ACTION feels ignored
[12:28:50] tbuehlmann: dminuoso: a drink it is. some time in april will work
[12:29:15] dminuoso: tbuehlmann: Great, Ill let you know
[12:29:54] tbuehlmann: btw, anyone here attending Bath Ruby next week?
[12:31:02] DoubleMalt: has joined #ruby
[12:34:46] milardovich: has joined #ruby
[12:35:01] leitz: ACTION feels Bish can just take a number on feeling ignored. :)
[12:35:41] vutral|kali: has joined #ruby
[12:35:41] vutral|kali: has joined #ruby
[12:36:36] drewmcmillan: has joined #ruby
[12:39:27] Bish: people in ruby are only interested in #ruby or some other computer stuff
[12:39:42] Bish: guess i can't keep up with my stories of meeting people
[12:39:44] dminuoso: That's not true. Im also interested in type theory, logic, mathematics..
[12:39:53] Bish: >other computer stuff
[12:40:41] Bish: leitz: go play with your boxes! and only stop if you wrote something better than rack!
[12:42:26] leitz: I'm working on fiction and a character generator/tracker so I can remind myself what some looks like or what they do.
[12:42:53] Bish: maybe look at code of faker, it does something like that
[12:42:55] Bish: a little bit?
[12:43:07] Bish: im guessing your character has attributes? that's something faker wouldn't do
[12:43:27] Bish: also if you're new to ruby, do you know pry?
[12:44:10] leitz: I tend to stick with the standard lib and simple stuff.
[12:44:25] Bish: yeah write your own, but you can orientate on other code
[12:44:28] Bish: and pry is a tool
[12:44:35] Bish: which is really good for learning
[12:44:51] leitz: True. I need to read more good code.
[12:45:13] Bish: really, check pry out, earlier the better
[12:46:08] maufart__: has joined #ruby
[12:48:59] cdg: has joined #ruby
[12:49:16] bmurt: has joined #ruby
[12:51:27] dr3wo: has joined #ruby
[12:53:00] mtkd: has joined #ruby
[12:55:59] madhatter: has joined #ruby
[12:56:27] cdg: has joined #ruby
[13:03:19] sonOfRa: has joined #ruby
[13:03:26] PaulCapestany: has joined #ruby
[13:06:37] tomphp: has joined #ruby
[13:07:26] woodruffw: has joined #ruby
[13:07:26] woodruffw: has joined #ruby
[13:10:48] schneider: has joined #ruby
[13:13:14] jrabe: has joined #ruby
[13:13:26] dviola: has joined #ruby
[13:13:52] gray_-_wolf: has joined #ruby
[13:14:03] houhoulis: has joined #ruby
[13:14:07] ramfjord: has joined #ruby
[13:14:52] jcalla: has joined #ruby
[13:19:10] za1b1tsu: has joined #ruby
[13:20:46] leitz: Is there a way to get uninitialized attr_accessors in something like mything.instance_variables?
[13:24:43] fvefyh: has joined #ruby
[13:24:52] tbuehlmann: leitz: can't follow, what do you mean?
[13:26:13] leitz: tbuehlmann, if I have an object with attributes listed under attr_accessor, but not yet set, is there a way to query the object to get the full list of attributes?
[13:26:29] DLSteve_: has joined #ruby
[13:27:46] dminuoso: leitz: Considering your current level of expertise, I'm going to say: "Yes but forget about it"
[13:28:25] tbuehlmann: sounds about right. I could only assume what you mean and suggest `YourClass.instance_methods(false)`, but it's probably not the thing you want or the thing that's useful.
[13:29:48] tbuehlmann: oh, I think I understand
[13:31:19] leitz: Ah, got it. puts fred.class.instance_methods(false)
[13:31:28] leitz: I hadn't put "class" in there.
[13:32:45] tomphp: has joined #ruby
[13:34:47] dminuoso: leitz: No need for that indirection
[13:34:53] dminuoso: >> "1".methods(false)
[13:34:54] ruby[bot]: dminuoso: # => [] (https://eval.in/971137)
[13:34:58] dminuoso: >> Class.methods(false)
[13:34:59] ruby[bot]: dminuoso: # => [] (https://eval.in/971138)
[13:35:06] dminuoso: ACTION scratches his head
[13:35:51] andikr: has joined #ruby
[13:36:01] dminuoso: Nevermind. Somehow I expected this to do the right thing (tm)
[13:37:15] jamesaxl: has joined #ruby
[13:37:39] Puffball: has joined #ruby
[13:37:43] memo1: has joined #ruby
[13:37:49] leitz: https://gist.github.com/LeamHall/dd95a8695bfdb411902a7b8bbdf6a6a6
[13:42:17] jeffreylevesque: has joined #ruby
[13:42:28] chouhoulis: has joined #ruby
[13:43:43] leitz: It does the right thing per Matz's definition of "right". :)
[13:44:21] tAn: has joined #ruby
[13:45:00] huyderman: has joined #ruby
[13:47:09] soniya29: has joined #ruby
[13:47:11] soniya29_: has joined #ruby
[13:48:36] dminuoso: leitz: In all fairness, Ruby is no longer under dictatorship.
[13:48:39] Bish: how does one do clean shutdown with ruby
[13:48:59] Bish: trap() or what that was?
[13:49:25] dminuoso: Bish: Process.kill($$, :SIGBUS)
[13:49:25] nachooo: has joined #ruby
[13:49:30] Bish: no i mean
[13:49:37] Bish: how do i handle a clean shutdown
[13:49:47] dminuoso: Oh yeah sorry
[13:49:51] dminuoso: Bish: Process.kill(:SIGBUS, $$)
[13:50:14] dminuoso: Bish: Do you have anything to clean up?
[13:50:21] leitz: dminuoso, didn't know it had changed. It didn't bother me, though.
[13:50:23] dminuoso: Any external resources to free/release?
[13:50:37] Bish: i have a database worker which takes work from aqueue
[13:50:37] dminuoso: Bish: Only ruby internal things?
[13:50:44] roshanavand: has joined #ruby
[13:50:45] Bish: and if it gets interupted, it sets it to "failed"
[13:50:52] Bish: due to rescue;
[13:50:52] nachooo: Hi. Using Ruby's Resolv::DNS, how can I distinguish between the following situations? [No record in DNS for a given name, DNS server timeout, DNS server not reacheable] In all cases Resolv::DNS::getaddress() seems to raise Resolv::ResolvError.
[13:51:21] Bish: nacho__: use pry, catch and inspect them , then you might fight out
[13:51:33] Bish: nacho__: but i am interested in your results
[13:51:49] nachooo: Bish: the .message seems to be the same in all cases "DNS result has no information for foo.example.com" :/
[13:52:17] Bish: if there aren't more attributes / different classes, there is nothing you can do except for grepping from that messae
[13:52:56] nachooo: I'm afraid that there's nothing to grep for, it's always the same message not matter what's the error situation :/
[13:52:56] ramfjord: has joined #ruby
[13:53:03] Bish: oh, i see
[13:53:32] Bish: unfortunately i have a rescue nil behind those :D
[13:53:53] nachooo: I've tried with a machine that's not replying to DNS requests (nothing listening), another one listening but never replying and another one that's listening, ready to reply but the traffic filtered out by the network.
[13:54:09] nachooo: and client-side it's impossible to know what's going on .
[13:54:17] Bish: dminuoso: i wouldn't care about ruby internal things because database transactions
[13:54:39] Bish: but i would like the process to not take new jobs / finish existing ones, and then exit
[13:54:46] Bish: on SIGINT (or whatever docker sends, when docker stop)
[13:56:12] nachooo: this is particularly painful if the client wants to take an action if a given host is not known to DNS as it could make wrong decisions if the DNS server is not available
[13:56:15] nachooo: ACTION cries
[13:56:24] Bish: why is it so important to you WHY it fails?
[13:56:56] workmad3: nacho__: there's no way to tell those particular 3 cases apart anyway... the worrying thing is the error being the same for no result vs network issue
[13:57:08] nachooo: I need to know basically if either there's no record in the DNS server for a given name or it's just a failure resolving.
[13:57:23] nachooo: I would not need a big granulatity for the failure to be honest
[14:01:19] schneider: has joined #ruby
[14:02:07] nachooo: https://gist.github.com/nbarrientos/a3c6b49c0c30c30bdf056ac8dbb811fb
[14:02:51] Psybur: has joined #ruby
[14:07:35] vaillancourtmax: has joined #ruby
[14:08:37] desperek: has joined #ruby
[14:09:21] nowhereman_: has joined #ruby
[14:10:08] ryandv: has joined #ruby
[14:10:23] roshanavand: has joined #ruby
[14:12:34] Rapture: has joined #ruby
[14:15:09] shinnya: has joined #ruby
[14:15:52] tubbo: has joined #ruby
[14:16:54] sidx64: has joined #ruby
[14:16:56] gnufied: has joined #ruby
[14:17:58] ryandv: has joined #ruby
[14:19:53] synthroid: has joined #ruby
[14:21:58] phaul: has joined #ruby
[14:26:09] roshanavand: has joined #ruby
[14:27:28] uybinh: has joined #ruby
[14:35:42] uybinh: has joined #ruby
[14:39:13] uybinh: has left #ruby: ()
[14:39:46] solocshaw: has joined #ruby
[14:42:12] Bish: dminuoso: i was really hoping you will keep on telling me how to make clean shutdown :D
[14:43:22] dminuoso: Bish: The thing is, while emacs is awesome, its not good enough to write code on its own
[14:43:26] ramfjord: has joined #ruby
[14:43:29] dminuoso: Just like vim it needs a user to actually supply it with keystrokes.
[14:44:02] sidx64: has joined #ruby
[14:44:16] nadir: has joined #ruby
[14:45:02] solocshaw1: has joined #ruby
[14:50:28] mtkd: has joined #ruby
[14:54:45] tbuehlmann: dminuoso: when using trailblazer cells, do you have the need for model decorators/presenters at all?
[14:56:52] chouhoulis: has joined #ruby
[15:00:07] rippa: has joined #ruby
[15:00:16] dminuoso: tbuehlmann: No. You can simply do higher-order-cells (as in HOFs) if you want abstraction.
[15:00:28] riotjoe: has joined #ruby
[15:00:55] raynold: has joined #ruby
[15:00:57] cschneid: has joined #ruby
[15:01:00] rwb: has joined #ruby
[15:02:08] SeepingN: has joined #ruby
[15:03:03] Bish: ACTION does not care anymore about editor wambo jambo
[15:03:12] Bish: ACTION uses ed
[15:03:36] Bish: Top-level constant look-up is no longer available
[15:03:51] Bish: what exactly does that mean, i don't understand it, even after reading the issue
[15:03:57] tbuehlmann: how do you handle things like current_user? when using cells inside actionview templates, I'd pass the current_user object to the cell, current_user coming from a helper though, which is contrary to cell's idea. so, what to do? simply rendering cells from the controller without any actionview involved?
[15:05:16] Bish: eww, helpers
[15:06:08] tbuehlmann: they haven't bitten me yet, but I can see how they could. that's why I'm studying cells
[15:06:27] oleo: has joined #ruby
[15:06:28] Bish: i don't know what cells is
[15:06:42] sonne: has left #ruby: ()
[15:07:06] Bish: lol toplevel constant referencing.. i didn't know that was a thing
[15:07:08] Bish: why would anyone
[15:07:47] dminuoso: tbuehlmann: I have a simple pattern - the few helpers I like to use I put into mixins
[15:08:09] dminuoso: tbuehlmann: then for example in one of my layout cells I have: class FooCell < ApplicationCell; include Apax::Devise; end
[15:08:38] dminuoso: tbuehlmann: https://gist.github.com/dminuoso/aa1843aacb97a3f095c9f78c18fb5e69 and that's that helper
[15:09:06] dr3wo: has joined #ruby
[15:09:47] dminuoso: But there's no real reason to do this. It'd be better if I actually pass the user object through.
[15:10:02] tbuehlmann: as a context?
[15:10:04] dminuoso: (The justification for my style is just that its a reminent from switching to cells)
[15:10:18] dminuoso: tbuehlmann: Id like to think of it more as arguments
[15:10:42] netherwolfe: has joined #ruby
[15:10:50] RougeR: has joined #ruby
[15:10:50] RougeR: has joined #ruby
[15:16:04] tbuehlmann: will play with it, thanks
[15:17:17] dminuoso: tbuehlmann: The rationale is passing arguments just admits dependencies. Code that does not depend on global state is less brittle and _FAR_ easier to test.
[15:18:08] dminuoso: tbuehlmann: The second that current_user is an argument that is passed down, it becomes ridiculously simple to test the cell in isolation, because you can pass it whatever `user` object you desire without having to build an entire rack stack just to make devise happy
[15:20:02] pastorinni: has joined #ruby
[15:21:53] tbuehlmann: yupyup, the testing argument is a biggie
[15:24:09] tbuehlmann: on the other side, I'm really tempted to try CurrentAttributes for really simple things like current_user *ducks*
[15:27:58] Psybur: has joined #ruby
[15:27:58] Psybur: has joined #ruby
[15:32:31] tolerablyjake: has joined #ruby
[15:33:04] mikecmpb_: has joined #ruby
[15:38:32] troys: has joined #ruby
[15:39:19] RougeR: has joined #ruby
[15:39:19] RougeR: has joined #ruby
[15:48:00] za1b1tsu: has joined #ruby
[15:48:34] milardovich: has joined #ruby
[15:50:20] tomphp: has joined #ruby
[15:54:00] Zaab1t: has joined #ruby
[15:54:59] synthroid: has joined #ruby
[15:56:21] watilde: has joined #ruby
[15:56:50] cagomez: has joined #ruby
[15:58:17] watilde: has left #ruby: ()
[16:00:44] roca: has joined #ruby
[16:02:39] orbyt_: has joined #ruby
[16:05:16] tomphp: has joined #ruby
[16:06:06] vaillancourtmax: has joined #ruby
[16:15:42] jcarl43: has joined #ruby
[16:16:39] dr3wo: has joined #ruby
[16:16:48] mikecmpbll: has joined #ruby
[16:17:26] darkhanb: has joined #ruby
[16:21:15] raynold: ahh it's a wonderful day
[16:23:53] guacamole: has joined #ruby
[16:23:53] guacamole: has joined #ruby
[16:25:11] rafik: has joined #ruby
[16:26:38] yohji: has joined #ruby
[16:26:41] dionysus69: has joined #ruby
[16:33:41] alfiemax: has joined #ruby
[16:38:07] ianfleeton: has joined #ruby
[16:38:39] rgiscard: has joined #ruby
[16:38:51] vaillancourtmax: has joined #ruby
[16:39:26] orbyt_: has joined #ruby
[16:41:13] synthroid: has joined #ruby
[16:41:57] kliq: has joined #ruby
[16:42:44] kliq: has joined #ruby
[16:42:53] pr0ton: has joined #ruby
[16:43:17] darkhanb: has joined #ruby
[16:43:24] kliq: has joined #ruby
[16:44:22] n008f4g_: has joined #ruby
[16:45:18] claudiuinberlin: has joined #ruby
[16:48:26] mzo: has joined #ruby
[16:48:28] orbyt_: has joined #ruby
[16:49:28] andikr: has joined #ruby
[16:50:22] kspencer: I've got a thor class and a Sinatra::Base subclass in separate files but are in the same gem, I want to be able to pass in the command line options or at least set some settings in the server to be able to pull from at runtime, but I'm not seeing a way to do it without mudding up my code
[16:50:24] suukim: has joined #ruby
[16:51:19] kspencer: tldr how can i pass in some variables into a Sinatra::Base subclass server before its initialized and started, and when its in another file
[16:53:36] lupine: has joined #ruby
[16:54:28] fiachetti: has joined #ruby
[16:55:33] mtkd: has joined #ruby
[16:58:38] kspencer: Code here -> https://github.com/IotaSpencer/site_hook/tree/dev the thor subclass is in bin/site_hook, and the sinatra::base subclass is in lib/site_hook.rb
[17:02:18] kspencer: although i may be able to set some module variables, I'll see if that works
[17:03:13] eckhardt_: has joined #ruby
[17:07:18] Ryzokuken: has joined #ruby
[17:11:11] kapil___: has joined #ruby
[17:12:28] captainproton: has joined #ruby
[17:13:06] pr0ton: has joined #ruby
[17:14:39] oetjenj: has joined #ruby
[17:17:16] bmurt: has joined #ruby
[17:20:20] druonysus: has joined #ruby
[17:20:20] druonysus: has joined #ruby
[17:21:07] guacamole: has joined #ruby
[17:21:07] guacamole: has joined #ruby
[17:21:46] jenrzzz: has joined #ruby
[17:21:46] jenrzzz: has joined #ruby
[17:28:30] dmitriy_: has joined #ruby
[17:29:12] hahuang61: has joined #ruby
[17:29:15] ryandv: has joined #ruby
[17:29:28] zapata: has joined #ruby
[17:29:34] rabajaj: has joined #ruby
[17:33:12] clemens3: has joined #ruby
[17:33:29] dmitriy_: has joined #ruby
[17:36:03] mtkd: has joined #ruby
[17:36:23] n0m4d1c: has joined #ruby
[17:38:56] minimalism: has joined #ruby
[17:41:48] alfiemax_: has joined #ruby
[17:42:53] nowhere_man: has joined #ruby
[17:44:20] rafik: has joined #ruby
[17:44:59] aufi: has joined #ruby
[17:45:25] dmitriy_: has joined #ruby
[17:48:36] mikecmpbll: has joined #ruby
[17:48:51] JoshS: has joined #ruby
[17:50:23] TheBrayn: has joined #ruby
[17:50:26] dmitriy_: has joined #ruby
[17:51:50] nicesignal: has joined #ruby
[17:52:24] dr3wo: has joined #ruby
[17:53:17] guacamole: has joined #ruby
[17:53:17] guacamole: has joined #ruby
[17:54:01] nme13: has joined #ruby
[17:54:33] nme13: anybody here has tried running his own rubygems server with geminabox ?
[17:55:26] dmitriy_: has joined #ruby
[17:55:28] nme13: I don't know how to specify where to download my gem in a gemfile
[17:56:10] workmad3: has joined #ruby
[17:57:16] nme13: how to specify URL like in the gemfile as we do for git gems for example ? my url is a rubygem geminabox server
[17:59:35] imode: has joined #ruby
[18:00:30] dmitriy_: has joined #ruby
[18:05:28] dmitriy_: has joined #ruby
[18:08:59] schneider: has joined #ruby
[18:09:56] Code4Dopamine: has joined #ruby
[18:09:58] riotjones: has joined #ruby
[18:10:10] \void: has joined #ruby
[18:10:29] dmitriy_: has joined #ruby
[18:14:18] tolerablyjake: has joined #ruby
[18:14:36] cdg: has joined #ruby
[18:15:18] claudiuinberlin: has joined #ruby
[18:15:30] dmitriy_: has joined #ruby
[18:15:50] rafik: has joined #ruby
[18:17:56] elcontrastador: has joined #ruby
[18:18:44] tomphp: has joined #ruby
[18:20:30] dmitriy_: has joined #ruby
[18:21:38] nadir: has joined #ruby
[18:25:30] dmitriy_: has joined #ruby
[18:30:30] dmitriy_: has joined #ruby
[18:31:20] nowhere_man: has joined #ruby
[18:35:29] dmitriy_: has joined #ruby
[18:36:33] ianfleeton: has joined #ruby
[18:40:29] dmitriy_: has joined #ruby
[18:41:05] schneider: has joined #ruby
[18:41:11] konos5__: has joined #ruby
[18:41:37] alfiemax: has joined #ruby
[18:44:16] tAn: has joined #ruby
[18:45:05] captainproton: has joined #ruby
[18:45:27] dmitriy_: has joined #ruby
[18:50:28] dmitriy_: has joined #ruby
[18:51:12] riotjoe: has joined #ruby
[18:51:37] mozzarella: has joined #ruby
[18:52:37] jenrzzz: has joined #ruby
[18:52:37] jenrzzz: has joined #ruby
[18:59:00] herbmillerjr: has joined #ruby
[18:59:39] roca: has joined #ruby
[19:00:44] boshhead: has joined #ruby
[19:08:24] bmurt: has joined #ruby
[19:13:25] ryandv: has joined #ruby
[19:15:09] alfiemax: has joined #ruby
[19:15:45] n0m4d1c: has joined #ruby
[19:15:53] dmitriy_: has joined #ruby
[19:18:29] pilne: has joined #ruby
[19:18:51] mtkd: has joined #ruby
[19:20:53] dmitriy_: has joined #ruby
[19:25:49] dmitriy_: has joined #ruby
[19:28:27] Dimik: has joined #ruby
[19:28:53] boshhead: has joined #ruby
[19:30:51] dmitriy_: has joined #ruby
[19:32:22] guille-moe: has joined #ruby
[19:34:42] cagomez: has joined #ruby
[19:35:52] dmitriy_: has joined #ruby
[19:37:28] jrafanie: has joined #ruby
[19:40:54] dmitriy_: has joined #ruby
[19:44:25] troulouliou_dev: has joined #ruby
[19:45:53] dmitriy_: has joined #ruby
[19:46:55] kies: has joined #ruby
[19:49:25] SeepingN: has joined #ruby
[19:50:54] dmitriy_: has joined #ruby
[19:51:50] ryandv: has joined #ruby
[19:52:56] ramfjord: has joined #ruby
[19:54:44] MasterOfDisaster: has joined #ruby
[19:54:48] guille-moe: has joined #ruby
[19:55:01] cagomez: has joined #ruby
[19:55:53] dmitriy_: has joined #ruby
[19:56:18] mtkd: has joined #ruby
[19:56:33] n008f4g_: has joined #ruby
[19:56:47] bmurt: has joined #ruby
[19:59:36] tolerablyjake: has joined #ruby
[20:00:50] dmitriy_: has joined #ruby
[20:01:04] cdg: has joined #ruby
[20:02:35] ianfleeton: has joined #ruby
[20:03:31] mtkd: has joined #ruby
[20:05:30] cdg_: has joined #ruby
[20:05:43] solocshaw: has joined #ruby
[20:05:50] dmitriy_: has joined #ruby
[20:06:38] AgentVenom: has joined #ruby
[20:10:52] dmitriy_: has joined #ruby
[20:12:08] eckhardt_: has joined #ruby
[20:12:55] Asher: has joined #ruby
[20:14:35] jenrzzz: has joined #ruby
[20:14:35] jenrzzz: has joined #ruby
[20:15:55] dmitriy_: has joined #ruby
[20:20:52] dmitriy_: has joined #ruby
[20:25:55] dmitriy_: has joined #ruby
[20:30:55] dmitriy_: has joined #ruby
[20:34:00] schneider: has joined #ruby
[20:35:54] dmitriy_: has joined #ruby
[20:36:23] ryandv: has joined #ruby
[20:38:37] remix2000: Hey, have you experienced problems with SSL/https when using the latest version of Puma? I have the same problem as described here: https://git.io/vxUQL
[20:40:36] alfiemax: has joined #ruby
[20:40:51] dmitriy_: has joined #ruby
[20:41:57] Cavallari: has joined #ruby
[20:45:53] dmitriy_: has joined #ruby
[20:46:08] a92n18a: has joined #ruby
[20:49:45] sammi`: has joined #ruby
[20:49:49] nme13: has joined #ruby
[20:50:02] eckhardt_: has joined #ruby
[20:50:19] nme13: anybody here familiar with building gems ?
[20:50:51] dmitriy_: has joined #ruby
[20:51:19] workmad3: has joined #ruby
[20:51:22] nme13: I'd like to know how to use custom Models and migration inside a gem
[20:52:08] sidx64: has joined #ruby
[20:55:06] pastorinni: has joined #ruby
[20:55:55] dmitriy_: has joined #ruby
[20:56:03] gizmore: nme13: just use their namespace in your own gem
[20:56:07] gizmore: or fork it
[20:56:38] gizmore: for migrations it is more difficult tho, iirc
[20:56:52] gizmore: just run your own migrations maybe
[20:57:52] sameerynho: has joined #ruby
[21:00:36] ledestin: has joined #ruby
[21:00:53] dmitriy_: has joined #ruby
[21:02:32] mtkd: has joined #ruby
[21:05:51] dmitriy_: has joined #ruby
[21:10:51] dmitriy_: has joined #ruby
[21:14:54] tomphp: has joined #ruby
[21:15:53] dmitriy_: has joined #ruby
[21:20:05] FrostCandy: has joined #ruby
[21:20:54] dmitriy_: has joined #ruby
[21:23:37] weathermaker: has joined #ruby
[21:25:53] dmitriy_: has joined #ruby
[21:27:30] rwb: has joined #ruby
[21:27:34] druonysus: has joined #ruby
[21:27:53] facest: has joined #ruby
[21:29:17] alfiemax: has joined #ruby
[21:30:03] Lytol: has joined #ruby
[21:30:53] dmitriy_: has joined #ruby
[21:32:46] tomphp: has joined #ruby
[21:32:55] naquad: has joined #ruby
[21:33:09] nicesignal: has joined #ruby
[21:35:50] tomphp: has joined #ruby
[21:35:53] dmitriy_: has joined #ruby
[21:36:54] WebDawg: has joined #ruby
[21:38:19] mikecmpbll: has joined #ruby
[21:38:40] sameerynho: has joined #ruby
[21:40:56] dmitriy_: has joined #ruby
[21:41:53] octomancer: has joined #ruby
[21:45:53] dmitriy_: has joined #ruby
[21:47:36] n0m4d1c: has joined #ruby
[21:50:57] dmitriy_: has joined #ruby
[21:54:25] zapata: has joined #ruby
[21:55:35] IshMael_: has joined #ruby
[21:55:58] dmitriy_: has joined #ruby
[21:56:27] cdg: has joined #ruby
[21:58:40] IshMael_: Hi all! Got a question related to instance_eval and self.
[21:58:52] IshMael_: source in this gist: https://gist.github.com/anonymous/49b9a0a42068cdee0f806fc239d5e9b4
[21:59:54] IshMael_: can someone explain to me, why i have to place a self in front of the instance variable? The method is placed in the singleton class of that object as far as i understand
[22:00:53] tomphp: has joined #ruby
[22:00:55] dmitriy_: has joined #ruby
[22:03:18] havenwood: IshMael_: You could do `@name = "Fred"` to set the instance variable directly. If you try `name = "Fred"` you're just setting a local variable.
[22:03:42] havenwood: IshMael_: `self.name = "Fred` is using the setter method to set the instance variable.
[22:03:47] ryandv: has joined #ruby
[22:04:00] IshMael_: havenwood: thanks for answer
[22:04:29] havenwood: IshMael_: The shorthand for creating that getter and setter method on user is: class User; attr_accessor :name end
[22:04:39] havenwood: It's nice to set instance variables directly with: @name =
[22:04:49] IshMael_: havenwood: so the method definition that is inside of that block doesnt need the self cause it is set already?
[22:04:51] havenwood: Using #instance_eval isn't so nice.
[22:05:20] IshMael_: havenwood: it is not for a concrete programming problem. it is just learning and understanding
[22:05:37] havenwood: then carry on! :-)
[22:05:59] dmitriy_: has joined #ruby
[22:06:31] IshMael_: havenwood: i was just wondering, why the method definition doesnt need the self in front of and the instance variable needed it ..that confused me a bit
[22:06:32] alfiemax: has joined #ruby
[22:07:41] hahuang65: has joined #ruby
[22:07:54] cdg: has joined #ruby
[22:09:22] apeiros: IshMael_: instance variable don't need a self in front
[22:09:40] apeiros: `self.name =` is not the instance variable. it's a method call (which in turn will set the instance variable)
[22:10:16] IshMael_: apeiros: thanks that cleared it too
[22:10:57] dmitriy_: has joined #ruby
[22:11:26] havenwood: It feels strange to have #filter in Ruby on nightly: [1, 2, 3].filter(&:odd?) #=> [1, 3]
[22:11:37] apeiros: another alias? :(
[22:12:03] havenwood: apeiros: I'm actually happy to have filter/map/reduce just so we can all use the same terms.
[22:12:06] apeiros: that's one of the few things I dislike about ruby - the alias madness.
[22:12:25] apeiros: I'd much rather learn a new name and have a single one.
[22:12:29] havenwood: The Smalltalk aliases are just more seldom used.
[22:12:46] havenwood: select/collect/inject versus filter/map/reduce
[22:13:20] apeiros: I'm a select/map/inject person. but as said, I'd much rather settle for a single name.
[22:13:32] alfiemax: has joined #ruby
[22:13:46] sameerynho: has joined #ruby
[22:14:46] eckhardt_: has joined #ruby
[22:15:19] roca: has joined #ruby
[22:15:44] pastorinni: has joined #ruby
[22:15:59] dmitriy_: has joined #ruby
[22:16:39] pastorinni: has joined #ruby
[22:17:13] roca: has joined #ruby
[22:18:19] wojnar: has joined #ruby
[22:18:54] gr33n7007h: has joined #ruby
[22:19:01] rikkipitt: has joined #ruby
[22:23:49] wojnar: has joined #ruby
[22:25:55] dmitriy_: has joined #ruby
[22:27:07] dr3wo: has joined #ruby
[22:27:15] wojnar_: has joined #ruby
[22:30:56] dmitriy_: has joined #ruby
[22:31:10] FastJack: has joined #ruby
[22:31:49] tolerablyjake: has joined #ruby
[22:34:41] isaacNM: has joined #ruby
[22:35:59] dmitriy_: has joined #ruby
[22:36:32] Mike11: has joined #ruby
[22:36:35] john__: has joined #ruby
[22:40:48] hahuang61: has joined #ruby
[22:40:57] dmitriy_: has joined #ruby
[22:41:00] RyanMcCoskrie: has joined #ruby
[22:41:22] tjbp: has joined #ruby
[22:43:32] rikkipitt: has joined #ruby
[22:45:01] ali_g: has joined #ruby
[22:45:59] dmitriy_: has joined #ruby
[22:50:35] Psybur: has joined #ruby
[22:51:00] dmitriy_: has joined #ruby
[22:51:41] workmad3: has joined #ruby
[22:52:26] IshMael_: has left #ruby: ("WeeChat 2.0.1")
[22:56:00] dmitriy_: has joined #ruby
[23:00:59] dmitriy_: has joined #ruby
[23:01:15] Psybur_: has joined #ruby
[23:06:00] dmitriy_: has joined #ruby
[23:08:56] agarzmmi: has joined #ruby
[23:11:01] dmitriy_: has joined #ruby
[23:13:58] hahuang61: has joined #ruby
[23:14:03] goatish: has joined #ruby
[23:14:16] Paraxial: has joined #ruby
[23:15:59] dmitriy_: has joined #ruby
[23:18:08] halbbalda: has joined #ruby
[23:18:19] awebdev: has joined #ruby
[23:19:12] pastorin_: has joined #ruby
[23:20:59] dmitriy_: has joined #ruby
[23:26:02] dmitriy_: has joined #ruby
[23:30:21] jrm: has joined #ruby
[23:31:01] dmitriy_: has joined #ruby
[23:33:59] zenspider: isn't filter an alias for grep and grep can now take predicate methods? I thought I read something to that effect
[23:35:16] shinnya: has joined #ruby
[23:36:01] dmitriy_: has joined #ruby
[23:36:03] havenwood: zenspider: filter is an alias for select
[23:36:29] havenwood: zenspider: predicate methods can now take threequals matches like grep
[23:37:44] havenwood: %w[above beneath].any? /neat/ #=> true
[23:38:44] howdoi: has joined #ruby
[23:40:32] havenwood: there's an issue open for select/filter/reject taking threequals matches as well, which makes sense to me
[23:41:02] dmitriy_: has joined #ruby
[23:41:02] havenwood: %w[above beneath].filter /neat/ #=> ["beneath"]
[23:41:10] ryandv: has joined #ruby
[23:41:26] havenwood: But yeah, you can just grep for that.
[23:41:35] havenwood: %w[above beneath].grep /neat/
[23:41:53] havenwood: #=> ["beneath"]
[23:43:26] alfiemax: has joined #ruby
[23:46:00] dmitriy_: has joined #ruby
[23:51:01] dmitriy_: has joined #ruby
[23:53:20] ledestin: has joined #ruby
[23:55:56] RougeR: has joined #ruby
[23:55:56] RougeR: has joined #ruby
[23:55:59] dmitriy_: has joined #ruby
[23:56:18] sameerynho: has joined #ruby
[23:56:27] raul782: has joined #ruby
[23:58:47] jottr: has joined #ruby
[23:59:23] ChaosBringer: has joined #ruby