« Back to channel list

#ruby - 18 December 2018

« Back 1 day Forward 1 day »
[00:01:31] hutch: has joined #ruby
[00:04:09] dachi_: havenwood: I got to go, thanks for sharing your thoughts, Eiam SeepingN thank you too
[00:04:40] dachi_: have great days guys, its 4am here, so I'm half asleep
[00:05:05] \void: has joined #ruby
[00:11:38] Cork: has joined #ruby
[00:14:05] SeepingN: has joined #ruby
[00:14:52] ixti: has joined #ruby
[00:16:46] NotSatoshi: has joined #ruby
[00:18:05] Rudolph: has joined #ruby
[00:21:03] SeepingN: has joined #ruby
[00:24:04] NotSatoshi: I have a program that uses Net::IMAP to download emails for me and I want to store the results into an image or pdf file..... Is there a library that will do this for me?
[00:25:52] jthomas: has joined #ruby
[00:26:35] havenwood: NotSatoshi: SVG tend to be nice. Prawn is a good gem for PDF generation.
[00:26:40] tiff: has joined #ruby
[00:29:47] hutch: has joined #ruby
[00:32:52] Eiam: GraphQL?? he should machine learn hisAPI too
[00:45:46] tiff: has joined #ruby
[00:46:54] graphene: has joined #ruby
[00:47:29] SeepingN_: has joined #ruby
[00:51:17] EminenceHC: has joined #ruby
[00:56:48] tiff: has joined #ruby
[00:59:05] RougeR: has joined #ruby
[01:04:06] blackmesa: has joined #ruby
[01:05:39] Rudolph: has joined #ruby
[01:06:34] cthulchu_: has joined #ruby
[01:12:06] tiff: has joined #ruby
[01:12:26] jottr: has joined #ruby
[01:12:34] hutch: has joined #ruby
[01:13:22] cliluw: has joined #ruby
[01:14:19] NotSatoshi: Is there any example code that downloads all emails from a server and saves them to eml files?
[01:16:45] Eiam: there is a project that hosts emails into usenet
[01:16:55] Eiam: which i suspect may involve a part of what you just said
[01:18:02] Eiam: NotSatoshi: https://github.com/mikel/mail ? this seems google-able
[01:22:18] ModusPwnens: has joined #ruby
[01:22:53] ModusPwnens: So i'm trying to create a ViewModel for my ruby application. This ViewModel needs to have a field called "method", but I'm finding now that there is already a method called "method" as part of all ruby objects. Is there a way to replace that so I can use my preferred field name?
[01:24:43] NotSatoshi: Eiam: I have been going through that tutorial already, but it mentions nothing about saving..... I am curious if I can save it raw, or if it needs to be formatted to be an EML
[01:24:44] Eiam: you probably dont' want to replace the ruby 'method' with your 'method'
[01:25:21] NotSatoshi: I don't understand
[01:26:30] ModusPwnens: @Eiam: Yes, i do. This is a ViewModel and I don't actually care if people try to use that "method" method on them. It's more valuable to me to have the "method" method be a getter.
[01:27:03] tiff: has joined #ruby
[01:27:06] NotSatoshi: oh, didn't see Modus's message
[01:27:11] donofrio: has joined #ruby
[01:28:01] Eiam: ModusPwnens: and when you def method, what happens
[01:28:51] ModusPwnens: @Eiam: It just returns the corresponding field in the ViewModel. I literally just have attr_reader :method and i had no idea it was failing until I started to get weird argument errors when I tried to use it.
[01:29:06] tiff: has joined #ruby
[01:29:19] ModusPwnens: @Eiam: seems that attr_reader silently fails if there is some sort of name conflict.
[01:30:58] Eiam: yeah.. this is method https://ruby-doc.org/core-2.2.0/Method.html
[01:31:24] ModusPwnens: Yeah, i just discovered that. The question is, how can I achieve my goal? Is it even possible?
[01:31:33] Eiam: thinking
[01:31:53] Puffball: has joined #ruby
[01:31:56] Eiam: i guess you could try to re-define the ruby version of method slot your code in then pass it onto the original implementation
[01:32:07] Eiam: feel like that would break a lot of stuff tho
[01:32:24] donofrio: has joined #ruby
[01:34:26] mostlybadfly: has joined #ruby
[01:36:52] ixti: has joined #ruby
[01:37:03] fluxAeon: has joined #ruby
[01:39:50] orbyt_: has joined #ruby
[01:42:22] houhoulis: has joined #ruby
[01:45:01] Eiam: there are more creative minds than my own and certainly smarter ones. perhaps they will swing around and contribute at some point.
[01:45:40] Eiam: baweaver: re-implement your own 'method' cause f Ruby and their implementation. Thoughts? =)
[01:45:59] Eiam: "This is why we invented the monkey patch!"
[01:46:44] EXCHGR: has joined #ruby
[01:54:38] eb0t: has joined #ruby
[01:56:28] Rudolph: has joined #ruby
[01:56:58] hays: if i have a collection of loosely related functions, should I just throw them in a class and make them class functions?
[01:58:22] hays: ive been having some problems putting them in modules
[01:59:44] hays: basically ruby seems to be kinda finicky with modules--always complaining about it not being a method or some problem with the self pointer
[02:02:15] hays: also I think I have some confusion about :: vs. .
[02:03:28] cnsvc_: has joined #ruby
[02:04:12] hutch: has joined #ruby
[02:07:41] vikaton: has joined #ruby
[02:08:41] tenchi4615: has joined #ruby
[02:11:53] tiff: has joined #ruby
[02:19:38] jthomas: has joined #ruby
[02:21:23] hays: i read about module_function and extend self... they both seem worth avoiding honestly
[02:25:27] tiff: has joined #ruby
[02:32:50] tiff: has joined #ruby
[02:35:29] hays: cleanest seems to always wrap modules in classes
[02:39:59] Rudolph: has joined #ruby
[02:41:55] MasterAsia: has joined #ruby
[02:42:21] hutch: has joined #ruby
[02:53:30] hutch: has joined #ruby
[02:55:12] tiff: has joined #ruby
[03:05:53] dbz: has joined #ruby
[03:19:41] jottr: has joined #ruby
[03:35:09] zipace: has joined #ruby
[03:36:37] tiff: has joined #ruby
[03:39:10] Rudolph: can somebody tell me what im doing wrong with this Rakefile? https://clbin.com/AsBTv I would have expected this to print release: https://clbin.com/e437e
[03:58:00] AndBobsYourUncle: has joined #ruby
[03:58:17] cnsvc_: has joined #ruby
[04:06:45] CBebop: has joined #ruby
[04:08:50] braincrash: has joined #ruby
[04:16:37] roshanavand1: has joined #ruby
[04:39:05] roshanavand: has joined #ruby
[04:40:29] tiff: has joined #ruby
[04:54:18] darkhanb: has joined #ruby
[04:56:58] dellavg_: has joined #ruby
[04:58:45] meinside: has joined #ruby
[05:00:36] davidw: has joined #ruby
[05:10:02] Exuma: has joined #ruby
[05:19:03] coltkirk: has joined #ruby
[05:23:13] hutch: has joined #ruby
[05:29:06] jottr: has joined #ruby
[05:35:39] bjpenn: has joined #ruby
[05:41:10] donofrio: has joined #ruby
[05:41:26] kapil____: has joined #ruby
[05:46:41] bjpenn: im an rvm user, because i can use different gemsets for the same version of ruby
[05:46:44] bjpenn: kind of like virtualenvs for python
[05:47:44] s3nd1v0g1us: has joined #ruby
[05:50:26] bjpenn: but the problem is vscode doesn't really support gemsets
[05:50:30] bjpenn: im wodnering how you guys debug your code?
[05:50:44] bjpenn: do you guys use IDEs? (for code completion, debugging)
[05:50:54] bjpenn: im new to ruby, and would love to hear what you guys do
[05:57:57] dbz: has joined #ruby
[05:59:00] cats: has joined #ruby
[06:00:23] WA9ACE: most of the people I know just use vim and pry https://github.com/pry/pry
[06:01:08] cgfbee: has joined #ruby
[06:04:33] conta: has joined #ruby
[06:17:50] bjpenn: i wouldnt be opposed to that, but navigating large projects with vim seems kind of difficult
[06:20:13] bougyman: Just gotta choose plugins that fit you.
[06:20:23] bougyman: Personally I like ctrlspace.
[06:30:10] _whitelogger: has joined #ruby
[06:33:36] Exuma: has joined #ruby
[06:35:23] aupadhye: has joined #ruby
[06:40:01] endemic: has joined #ruby
[06:46:17] Rudolph: has joined #ruby
[06:46:38] reber: has joined #ruby
[06:51:22] za1b1tsu: has joined #ruby
[06:59:40] bjpenn: bougyman: have you ever used an IDE though?
[06:59:46] bjpenn: bougyman: or did you just always start out with vim
[06:59:52] bjpenn: so kind of gotten used to it
[07:06:21] jcarl43: has joined #ruby
[07:38:28] jottr: has joined #ruby
[07:39:01] JoshS: has joined #ruby
[07:43:56] neuraload: has joined #ruby
[07:47:17] reber: has joined #ruby
[08:01:22] dbz: has joined #ruby
[08:02:12] dbz_: has joined #ruby
[08:04:34] aufi: has joined #ruby
[08:05:27] dinfuehr_: has joined #ruby
[08:06:02] rippa: has joined #ruby
[08:06:02] stooj: has joined #ruby
[08:07:56] MasterAsia: has joined #ruby
[08:10:40] Rudolph: has joined #ruby
[08:13:43] clemens3_: has joined #ruby
[08:16:03] dinfuehr: has joined #ruby
[08:35:40] dinfuehr: has joined #ruby
[09:08:40] marz_d`ghostman: has joined #ruby
[09:08:51] marz_d`ghostman: Is it possible to bundle a bin in your app not just gem?
[09:08:53] fredmorcos: has joined #ruby
[09:13:50] coderphive: has joined #ruby
[09:13:57] blackmesa: has joined #ruby
[09:14:47] keden: has joined #ruby
[09:18:06] blackmesa1: has joined #ruby
[09:31:33] jottr: has joined #ruby
[09:33:36] cd: has joined #ruby
[09:37:02] jthomas: has joined #ruby
[09:38:07] zipace: has joined #ruby
[09:40:04] deathwishdave: has joined #ruby
[09:43:06] venmx: has joined #ruby
[09:44:03] jmcgnh: has joined #ruby
[09:48:46] lxsameer: has joined #ruby
[09:50:04] yasserhussain111: has joined #ruby
[09:50:15] yasserhussain111: has left #ruby: ()
[09:51:47] Renich: has joined #ruby
[09:54:06] marz_d`ghostman: I've uninstalled a package from my OS and reinstalled it but it appears to have triggered something that causes a lot of warning now like /.bundle/ruby/2.4.0/gems/sqlite3-1.3.13/lib/sqlite3/sqlite3_native.so: warning: already initialized constant SQLite3::Constants::Open::READONLY
[09:54:09] marz_d`ghostman: How do I fix it?
[09:56:27] cnsvc_: has joined #ruby
[10:04:09] CustosLimen: has joined #ruby
[10:07:04] elphe: has joined #ruby
[10:12:26] yasserhussain111: has joined #ruby
[10:13:00] yasserhussain111: has left #ruby: ()
[10:14:49] aupadhye: has joined #ruby
[10:27:57] johnny56: has joined #ruby
[10:35:30] dbz: has joined #ruby
[10:47:07] Rudolph: has joined #ruby
[10:57:11] roshanavand: has joined #ruby
[11:12:30] AJA4350: has joined #ruby
[11:18:11] phaul: has joined #ruby
[11:23:41] Rudolph: has joined #ruby
[11:27:55] neuraload: has joined #ruby
[11:34:35] eb0t: has joined #ruby
[11:40:46] ellcs: has joined #ruby
[11:45:03] gix: has joined #ruby
[11:52:04] Iambchop: Rudolph: what shell are you using? https://robots.thoughtbot.com/how-to-use-arguments-in-a-rake-task
[12:15:44] DTZUZO: has joined #ruby
[12:16:55] keden: has joined #ruby
[12:18:11] kapil____: has joined #ruby
[12:22:09] lucasb: has joined #ruby
[12:34:26] keanny479: has joined #ruby
[12:35:58] EminenceHC: has joined #ruby
[12:36:48] jthomas: has joined #ruby
[12:40:35] keanny479: i have the following exercise to achieve : https://pastebin.com/ALzLGr9v
[12:40:36] ruby[bot]: keanny479: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[12:43:51] keanny479: i have the following exercise to achieve, i provided a solution, but Quote.random is not complete, anyone can help me ?
[12:43:53] keanny479: see https://dpaste.de/urTB
[12:46:04] ellcs: has joined #ruby
[12:48:51] phaul: is pushing data onto class variable in .new explicitly required by the exercise? It really smells to me..
[12:50:45] reber: has joined #ruby
[12:52:01] phaul: otherwise stick a .inspect on it, and it will include instance variables
[12:53:45] keanny479: thank's phaul! all was there :)
[12:57:53] cnsvc_: has joined #ruby
[12:58:21] elphe: has joined #ruby
[13:00:45] Rudolph: has joined #ruby
[13:02:32] mostlybadfly: has joined #ruby
[13:05:03] themsay: has joined #ruby
[13:06:21] themsay: has joined #ruby
[13:07:47] rubydoc: has joined #ruby
[13:11:24] johnny56: has joined #ruby
[13:11:30] TomyWork: has joined #ruby
[13:14:25] elphe: has joined #ruby
[13:16:19] perique: has joined #ruby
[13:17:57] phaul: hi, TomyWork
[13:18:17] GodFather: has joined #ruby
[13:19:42] TomyWork: are you aware of a ruby lib capable of dealing with asn.1 indefinite-length structures?
[13:19:48] TomyWork: reading and writing
[13:20:21] TomyWork: specifically i want to convert all indefinite-length structures to definite-length structures
[13:21:22] lxsameer: has joined #ruby
[13:26:14] blackmesa1: has joined #ruby
[13:32:48] aupadhye: has joined #ruby
[13:36:23] dinfuehr: has joined #ruby
[13:56:36] lxsameer: has joined #ruby
[14:01:10] amelliaa: has joined #ruby
[14:05:24] alan_w: has joined #ruby
[14:14:53] profetes: has joined #ruby
[14:15:08] krawchyk: has joined #ruby
[14:37:47] arcaos: has joined #ruby
[14:44:09] keden: has joined #ruby
[15:04:06] dbugger_: has joined #ruby
[15:08:22] Rapture: has joined #ruby
[15:17:25] agent_white: has joined #ruby
[15:20:40] hurricanehrndz: has joined #ruby
[15:27:42] cnsvc_: has joined #ruby
[15:45:01] Inline: has joined #ruby
[15:54:03] polishdub: has joined #ruby
[15:54:35] jthomas: has joined #ruby
[15:57:02] neuraload: has joined #ruby
[15:59:05] dinfuehr: has joined #ruby
[16:01:00] Megamos: has joined #ruby
[16:02:58] akaiiro: has joined #ruby
[16:05:58] hutch: has joined #ruby
[16:07:52] dinfuehr: has joined #ruby
[16:12:15] davidw: has joined #ruby
[16:14:51] dinfuehr: has joined #ruby
[16:22:24] dinfuehr: has joined #ruby
[16:27:10] dinfuehr_: has joined #ruby
[16:30:17] akem: has joined #ruby
[16:31:20] chouhoulis: has joined #ruby
[16:33:29] dinfuehr: has joined #ruby
[16:34:20] conta: has joined #ruby
[16:35:09] Megamos: has joined #ruby
[16:35:49] chouhoulis: has joined #ruby
[16:36:28] elphe: has joined #ruby
[16:36:59] conta1: has joined #ruby
[16:41:11] cow[moo]: has joined #ruby
[16:41:52] akem: has joined #ruby
[16:48:00] impermanence: has joined #ruby
[16:48:02] ellcs: has joined #ruby
[17:01:19] kapil____: has joined #ruby
[17:07:51] keden: has joined #ruby
[17:10:21] samort7: has joined #ruby
[17:12:53] krawchyk: has joined #ruby
[17:13:11] dinfuehr: has joined #ruby
[17:20:36] maryo: has joined #ruby
[17:27:05] ixti: has joined #ruby
[17:31:31] jcarl43: has joined #ruby
[17:32:57] GodFather: has joined #ruby
[17:33:47] horst: has joined #ruby
[17:35:39] hutch: has joined #ruby
[17:39:48] nowhere_man: has joined #ruby
[17:43:44] reber: has joined #ruby
[17:46:50] darkhanb: has joined #ruby
[17:56:39] orbyt_: has joined #ruby
[17:58:05] cnsvc_: has joined #ruby
[17:59:04] dbz: has joined #ruby
[17:59:13] jthomas1: has joined #ruby
[18:07:03] cthulchu_: has joined #ruby
[18:08:59] \void: has joined #ruby
[18:28:00] irdr: has joined #ruby
[18:30:18] reber: has joined #ruby
[18:36:45] elphe: has joined #ruby
[18:46:20] cthulchu: has joined #ruby
[18:50:51] MasterAsia: has joined #ruby
[18:58:22] cthulchu: has joined #ruby
[19:01:15] Lytol: has joined #ruby
[19:08:39] code_zombie: has joined #ruby
[19:10:56] cd: has joined #ruby
[19:11:24] hutch: has joined #ruby
[19:21:02] Puffball: has joined #ruby
[19:32:00] elphe: has joined #ruby
[19:36:26] cthulchu: has joined #ruby
[19:40:06] conta: has joined #ruby
[19:41:56] profetes_: has joined #ruby
[19:53:56] ua: has joined #ruby
[19:55:26] cthulchu: has joined #ruby
[19:59:34] Fernando-Basso: has joined #ruby
[20:00:37] MasterAsia: has joined #ruby
[20:05:04] cthulchu: has joined #ruby
[20:05:51] fredolinhares: has joined #ruby
[20:24:56] GodFather: has joined #ruby
[20:31:14] elphe: has joined #ruby
[20:54:45] gsingh93: has joined #ruby
[20:54:52] SeepingN: has joined #ruby
[20:55:03] baweaver: New illustrated fun - https://medium.com/square-corner-blog/scaling-christmas-an-illustrated-adventure-a2ea739f5451
[20:57:34] cthulchu: has joined #ruby
[20:58:24] anothertorusr: has joined #ruby
[21:00:24] RougeR: has joined #ruby
[21:00:40] Hoffman: has joined #ruby
[21:00:53] elphe: has joined #ruby
[21:01:55] SeepingN: To make Medium work, we log user data and share it with service providers.
[21:02:21] PasNox: has joined #ruby
[21:02:58] WA9ACE: not to rag on his blog post, but I do dislike medium a fair amount
[21:03:16] Hoffman: heya! I have 4 files at this pastebin, along with a console run: https://pastebin.com/xpEWLat8 . I expected line 57 to read "Fake information returned", as I thought lines 37 to 39 would override getInfo(). Obviously this is not the case, so how might I achieve my goal of stubbing out a function called by initialize?
[21:03:17] ruby[bot]: Hoffman: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[21:04:33] Zarthus: it's been a while since i've seen camelCase ruby
[21:05:05] Hoffman: I'm a ruby nuby, so please forgive me carrying some habits from other langs :)
[21:06:51] kapil____: has joined #ruby
[21:07:20] Zarthus: i'm confused, i don't see anywhere your code is using Creatures::Animal
[21:08:28] Hoffman: Zarthus: line 20
[21:08:57] Hoffman: its not actually using the object for anything, because I tried to simplify the issue down to barebones
[21:09:03] Hoffman: to the core of the question
[21:09:22] Zarthus: i see the problem now, can't say I have too much experience with stubs in ruby though
[21:09:58] Zarthus: I wouldn't necessarily recommend printing things from a constructor, though
[21:12:01] Hoffman: Zarthus: yeah the prints just represent more complex logic
[21:15:06] Zarthus: Hoffman: my first instinct would be to try not printing from the constructor, and checking an assert for equality on animal.getInfo directly
[21:15:27] Zarthus: though i don't know how thi swould play into chef run, at least you can ensure the stub is working correctly
[21:16:00] Hoffman: Zarthus: the print needs to be there because the thing it replaces runs during construction, and I want it to not run
[21:16:28] Hoffman: Zarthus: imagine getInfo calls `search()`, which I do not want run during the test, because it cant
[21:17:01] Zarthus: Hoffman: It's more about working up to the problem, find out which part breaks the stub - not a permanent suggestion
[21:17:21] Zarthus: how you solve the problem, once you've determined what it is, is up to you
[21:18:06] cthulchu: has joined #ruby
[21:20:35] Hoffman: Zarthus: when you do that, does it return different resu;ts?
[21:21:00] Zarthus: I haven't bothered setting up your code stack, but from reading the documentation the stub's code is functional
[21:21:40] Hoffman: yeah, I just dont wanna make the example more complex
[21:22:03] Hoffman: the current status is as simple as it gets -- the original getInfo() function is getting called, and I want to figure out how to make it *not* get called
[21:22:27] Hoffman: if possible
[21:23:23] Zarthus: i don't know if it's about as simple as it can get; i don't access the necessary chef knowledge to know what happens in L43
[21:23:55] Zarthus: but i'm nearly confident that something like Creatures::Animal.new.getInfo would eq 'Fake information returned'
[21:28:54] s3nd1v0g1us: has joined #ruby
[21:29:38] MasterAsia: has joined #ruby
[21:37:11] Hoffman: Zarthus: right, cuz that's calling a static method procedurally vs within an object instance
[21:38:37] ramfjord: has joined #ruby
[21:39:17] ramfjord: has joined #ruby
[21:44:33] cnsvc_: has joined #ruby
[21:45:53] hutch: has joined #ruby
[21:51:20] nowhere_man: has joined #ruby
[21:58:23] gix: has joined #ruby
[22:09:20] SeepingN: has joined #ruby
[22:11:18] kent\n: has joined #ruby
[22:15:23] themsay: has joined #ruby
[22:19:29] kent\n: has joined #ruby
[22:22:59] ellcs: has joined #ruby
[22:27:34] themsay: has joined #ruby
[22:28:41] kent\n: has joined #ruby
[22:30:16] orbyt_: has joined #ruby
[22:31:24] Exuma: has joined #ruby
[22:31:33] lxsameer: has joined #ruby
[22:34:55] cthulchu: has joined #ruby
[22:35:45] elphe: has joined #ruby
[22:39:34] kent\n: has joined #ruby
[22:39:52] orbyt_: has joined #ruby
[22:47:05] Freshnuts: has joined #ruby
[22:48:07] Xenosine: has joined #ruby
[22:48:58] Freshnuts: has joined #ruby
[22:57:45] AJA4350: has joined #ruby
[23:09:09] elphe: has joined #ruby
[23:10:07] ramfjord: has joined #ruby
[23:11:10] SeepingN: has joined #ruby
[23:19:50] tiff: has joined #ruby
[23:21:32] ruby[bot]: -bb $a:nine_milli$#ruby-banned nine_milli!*@*$#ruby-banned
[23:23:23] tiff: has joined #ruby
[23:30:15] s3nd1v0g1us: has joined #ruby
[23:30:57] cow[moo]: has joined #ruby
[23:31:55] cthulchu: has joined #ruby
[23:39:31] cats: has joined #ruby
[23:44:18] cow[moo]: has joined #ruby
[23:47:23] bambanx: has joined #ruby
[23:47:44] RiPuk: has joined #ruby
[23:49:23] RougeR: has joined #ruby
[23:53:12] venmx: has joined #ruby
[23:58:54] cthulchu: has joined #ruby