« Back to channel list

#ruby - 19 March 2019

« Back 1 day Forward 1 day »
[00:02:50] themsay: has joined #ruby
[00:13:35] i1nfusion: has joined #ruby
[00:14:08] orbyt_: has joined #ruby
[00:14:24] Scient: has joined #ruby
[00:15:14] jrafanie: has joined #ruby
[00:15:20] meinside: has joined #ruby
[00:18:46] robotcars: has joined #ruby
[00:19:51] NeilCarvalho: has joined #ruby
[00:21:15] s2013: has joined #ruby
[00:32:55] Scient: has joined #ruby
[00:33:16] irdr: has joined #ruby
[00:37:49] bastilian: has joined #ruby
[00:41:24] i1nfusion: has joined #ruby
[00:44:32] robotcars: has joined #ruby
[00:46:12] laaron: has joined #ruby
[00:46:56] robotcars: has joined #ruby
[00:48:47] arekushi: has joined #ruby
[00:54:49] griffindy: has joined #ruby
[00:59:37] orbyt_: has joined #ruby
[01:01:59] mangold: has joined #ruby
[01:04:11] sepp2k: has joined #ruby
[01:04:11] turt2live: has joined #ruby
[01:04:11] supergeek[m]: has joined #ruby
[01:04:11] Turnikov[m]: has joined #ruby
[01:04:11] jonjitsu: has joined #ruby
[01:09:56] segy: has joined #ruby
[01:17:04] cd: has joined #ruby
[01:30:27] robotcars1: has joined #ruby
[01:31:23] _habnabit: has left #ruby: ()
[01:32:25] jrafanie: has joined #ruby
[01:55:21] dar123: has joined #ruby
[02:03:29] bambanx: has joined #ruby
[02:12:42] evdubs: has joined #ruby
[02:13:22] NightMonkey: has joined #ruby
[02:19:01] Devalo: has joined #ruby
[02:32:04] Tau: has joined #ruby
[02:32:30] ftj: has joined #ruby
[02:42:30] Autolycus: has joined #ruby
[02:43:47] laaron-: has joined #ruby
[02:50:57] dar123: has joined #ruby
[03:07:45] cthu|: has joined #ruby
[03:08:59] nwradio8: has joined #ruby
[03:15:14] hays: has joined #ruby
[03:18:25] orbyt_: has joined #ruby
[03:21:21] laaron: has joined #ruby
[03:27:34] Tau: has joined #ruby
[03:30:30] jaddison: has left #ruby: ()
[03:57:47] segy: has joined #ruby
[04:13:27] bjpenn: has joined #ruby
[04:53:16] cschneid: has joined #ruby
[05:06:37] braincrash: has joined #ruby
[05:08:15] johnny56: has joined #ruby
[05:16:27] Swyper: has joined #ruby
[05:22:40] bjpenn: has joined #ruby
[05:31:05] cschneid: has joined #ruby
[05:36:11] braincrash: has joined #ruby
[05:47:12] qual: has joined #ruby
[05:48:43] braincrash: has joined #ruby
[05:49:14] sauvin: has joined #ruby
[05:58:03] djdduty: has joined #ruby
[06:03:09] mangold: has joined #ruby
[06:03:13] braincrash: has joined #ruby
[06:10:48] reber: has joined #ruby
[06:12:56] djdduty: has joined #ruby
[06:18:04] conta: has joined #ruby
[06:23:22] zenspider: totally disagree that yard is the standard...
[06:24:22] Devalo: has joined #ruby
[06:33:30] segy: has joined #ruby
[06:38:14] cschneid: has joined #ruby
[06:43:31] Dbugger: has joined #ruby
[06:43:31] ur5us: has joined #ruby
[06:44:27] s2013: has joined #ruby
[06:56:52] Xeago_: has joined #ruby
[07:02:31] Swyper: has joined #ruby
[07:03:23] KrzaQ: has joined #ruby
[07:25:31] SeepingN: has joined #ruby
[07:39:54] kapil____: has joined #ruby
[07:45:04] alem0lars: has joined #ruby
[07:47:37] cschneid: has joined #ruby
[07:48:45] za1b1tsu: has joined #ruby
[07:49:24] andikr: has joined #ruby
[07:50:35] sezuan: has joined #ruby
[07:53:48] aupadhye: has joined #ruby
[08:00:18] schleppel: has joined #ruby
[08:06:39] clemens3: has joined #ruby
[08:10:06] alem0lars: has joined #ruby
[08:11:23] SeepingN: has joined #ruby
[08:14:39] TomyWork: has joined #ruby
[08:15:41] aufi: has joined #ruby
[08:44:12] Devalo: has joined #ruby
[08:48:23] laaron: has joined #ruby
[08:48:52] Swyper: has joined #ruby
[08:53:55] cschneid: has joined #ruby
[08:55:12] Swyper: has joined #ruby
[09:00:26] sinanislekdemir: has joined #ruby
[09:00:59] claudiuinberlin: has joined #ruby
[09:03:44] mikecmpbll: has joined #ruby
[09:28:01] lxsameer: has joined #ruby
[09:30:56] wildermind: has joined #ruby
[09:41:24] TiLTNc: has joined #ruby
[09:42:32] aupadhye: has joined #ruby
[09:47:37] aupadhye: has joined #ruby
[09:50:55] insu: has joined #ruby
[09:52:20] TomyWork: has joined #ruby
[09:52:27] ServerGod: has joined #ruby
[09:53:46] alem0lars: has joined #ruby
[09:56:11] cschneid: has joined #ruby
[10:01:48] akem: has joined #ruby
[10:05:16] _joes_: has joined #ruby
[10:07:38] _joes_: has joined #ruby
[10:23:29] gigetoo: has joined #ruby
[10:24:36] hightower3: has joined #ruby
[10:25:21] Swyper: has joined #ruby
[10:27:26] _joes_: has joined #ruby
[10:29:56] sinanislekdemir: has left #ruby: ("Killed buffer")
[10:31:41] Swyper: has joined #ruby
[10:36:11] tdy1: has joined #ruby
[10:49:24] sleetdrop: has joined #ruby
[11:01:07] cschneid: has joined #ruby
[11:03:14] lxsameer: has left #ruby: ("in")
[11:06:25] jottr_: has joined #ruby
[11:16:31] Swyper: has joined #ruby
[11:17:48] esrse: has joined #ruby
[11:19:13] conta: has joined #ruby
[11:27:54] ServerGod: has joined #ruby
[11:31:19] laaron-: has joined #ruby
[11:34:46] jrafanie: has joined #ruby
[11:35:00] ldnunes: has joined #ruby
[11:41:50] bmurt: has joined #ruby
[11:46:13] AJA4350: has joined #ruby
[11:49:02] Menteb: has joined #ruby
[11:51:31] Kirjava: has joined #ruby
[11:51:36] suukim: has joined #ruby
[11:51:37] Kirjava: has left #ruby: ("WeeChat 2.2")
[11:56:42] duderonomy: has joined #ruby
[11:56:42] stryek: has joined #ruby
[11:58:25] grr12314: has joined #ruby
[12:03:24] za1b1tsu: has joined #ruby
[12:09:58] cschneid: has joined #ruby
[12:21:02] Swyper: has joined #ruby
[12:22:20] nowhereman: has joined #ruby
[12:23:51] _joes_: has joined #ruby
[12:30:02] _joes_: has joined #ruby
[12:36:47] nakuku: has joined #ruby
[12:38:12] _joes_1: has joined #ruby
[12:38:24] nakuku: Hello. Is there any way to efficiently handle uploads - im talking about own implementation. Use case is the following: Rails app handling interactions, Upload server, Python server with quick access to file storage that performs processing on these files (image border detection etc.). Currenty we use AWS but im wondering if there is some way to avoid moving the file over the network multiple times.
[12:39:18] nakuku: The flow looks like this: User uploads a file, processed image is shown and user has to confirm it's okay, next stage of processing begins, back to user
[12:41:03] _joes_: has joined #ruby
[12:47:01] saysjonathan: has joined #ruby
[12:47:50] t0xik: has joined #ruby
[12:55:46] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[13:00:39] yokel: has joined #ruby
[13:04:15] jrafanie: has joined #ruby
[13:05:06] griffindy: has joined #ruby
[13:08:30] s2013: has joined #ruby
[13:08:34] vondruch_: has joined #ruby
[13:09:20] nakuku: has joined #ruby
[13:11:35] i1nfusion: has joined #ruby
[13:14:36] cschneid: has joined #ruby
[13:17:16] yqt: has joined #ruby
[13:17:23] lucasb: has joined #ruby
[13:18:01] _joes_: has joined #ruby
[13:22:34] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[13:32:00] TheBrayn: has joined #ruby
[13:32:50] cow[moo]: has joined #ruby
[13:41:00] hightower3: has joined #ruby
[13:41:25] vondruch: has joined #ruby
[13:45:20] Rapture: has joined #ruby
[13:49:56] cschneid: has joined #ruby
[13:50:17] Swyper: has joined #ruby
[13:53:52] Onwarion: has joined #ruby
[13:56:36] Swyper: has joined #ruby
[14:00:51] SeepingN: has joined #ruby
[14:02:16] mangold: has joined #ruby
[14:03:02] cyberarm: has joined #ruby
[14:24:24] dsuper7: has joined #ruby
[14:24:34] _joes_: has joined #ruby
[14:32:45] robotcars: has joined #ruby
[14:33:45] Inline: has joined #ruby
[14:35:48] grilix: has joined #ruby
[14:40:44] cschneid: has joined #ruby
[14:52:23] rippa: has joined #ruby
[14:54:16] Swyper: has joined #ruby
[14:57:06] chainz: has joined #ruby
[14:57:13] agent_white: has joined #ruby
[14:57:47] chainz: i'm getting an error when trying a bundle install:
[14:57:47] chainz: sudo gem install i18n-1.1.1 --source http://rubygems.org
[14:57:47] chainz: ERROR: Could not find a valid gem 'i18n-1.1.1' (>= 0) in any repository
[14:57:57] chainz: anyone know how to resolve this?
[14:58:48] tsm: has joined #ruby
[14:59:08] cschneid: has joined #ruby
[15:01:09] phaul: chainz: gem install i18n -v 1.1.1 --source http://rubygems.org
[15:01:33] al2o3-cr: sudo gem install i18n:1.1.1 --source http://rubygems.org
[15:01:37] claudiuinberlin: has joined #ruby
[15:01:50] al2o3-cr: oops, beat me to it :)
[15:02:33] s2013: has joined #ruby
[15:08:49] SeepingN: has joined #ruby
[15:13:58] pwelch: has joined #ruby
[15:15:32] Emmanuel_Chanel: has joined #ruby
[15:15:38] chainz: thanks phaul, that worke
[15:17:11] AJA4351: has joined #ruby
[15:22:25] Cthulu201: has joined #ruby
[15:24:15] orbyt_: has joined #ruby
[15:40:19] cow[moo]: has joined #ruby
[15:41:37] mikecmpbll: probably a stupid question to ask in here, but as a python ecosystem newbie, i think rubyists would be better at explaining :D
[15:41:52] mikecmpbll: does python have a bundler/gemfile equivalent?
[15:42:16] mikecmpbll: i've written a python script which depends on another python library and i'm not sure what the best way of deploying that script to other servers is
[15:42:32] nowhere_man: has joined #ruby
[15:42:38] mikecmpbll: and ensuring necessary libraries are available
[15:43:12] t0xik: i dont know python but isnt there the package manager pip
[15:43:23] mikecmpbll: yeah, i know a little about pip
[15:45:57] mikecmpbll: i guess if i install via pip then it's available to other scripts
[15:46:15] mikecmpbll: maybe that's just the norm with python
[15:46:57] kaleido: you know there's also a #python where this question would probably be met with a better audience
[15:50:11] polishdub: has joined #ruby
[15:51:55] Dbugger: has joined #ruby
[15:52:25] za1b1tsu: has joined #ruby
[15:59:45] s2013: has joined #ruby
[16:02:27] AJA4351: has joined #ruby
[16:02:37] conta: has joined #ruby
[16:05:31] Swyper: has joined #ruby
[16:05:46] Swyper: has joined #ruby
[16:07:20] TvL2386_: has joined #ruby
[16:07:31] i1nfusion: has joined #ruby
[16:17:10] SeepingN_: has joined #ruby
[16:17:43] Swyper: has joined #ruby
[16:18:50] orbyt_: has joined #ruby
[16:28:26] orbyt_: has joined #ruby
[16:34:38] i1nfusion: has joined #ruby
[16:36:55] al2o3-cr: has joined #ruby
[16:39:12] chainz: has left #ruby: ()
[16:43:34] Devalo: has joined #ruby
[16:45:03] [Butch]: has joined #ruby
[16:49:03] xco: has joined #ruby
[16:49:24] Mutter: has joined #ruby
[16:49:58] Devalo: has joined #ruby
[16:50:54] eddof13: has joined #ruby
[16:50:58] xco: i’m trying to validate parameters in my method, will this be the best way to do it? https://gist.github.com/xcobar/347d14e113cec605e1ca30a6f2b49e81
[16:51:17] Mutter: Hi guys, been quite a while since I've used irc
[16:52:01] Noxilex: has joined #ruby
[16:52:07] Noxilex: Better now
[16:53:00] graft: has joined #ruby
[16:53:21] dar123: has joined #ruby
[16:54:36] phaul: xco some consider type checks a code smell.
[16:54:40] tsm: Any reason you don't want to just try and add them and rescue any errors that come up?
[16:55:15] xco: phaul: oh really? so in this case if i wanted to check my parameters how would i do it? i don’t think there’s nothing wrong with it personally? right?
[16:57:44] phaul: xco. pass objects that behave. validate at the user input / network input etc interfaces, maybe have a dedicated input validator whose sole job is to validated what comes in. Rest of the system should not ever receive bad data
[16:57:56] graft: anyone have any experience with rack.hijack?
[16:58:31] graft: i have a very, very strange issue that looks like it might have to do with thread re-use or something that i just can't understand
[16:58:34] xco: phaul: objects that behave? is there a way you can point me to an example online. those details are messing with my head
[17:00:07] graft: like rack is ending up in a method it just should not arrive at; as far as I can tell from logging it does what it ought to do, then suddenly arrives at this method (complete with caller_locations history) with no idea how it got there
[17:00:39] graft: i feel like i'm taking crazy pills
[17:02:09] phaul: xco sorry Im not aware of any good online resources int this topic.
[17:03:27] xco: phaul: ok no problem. when you say “validate at the user input / network input etc interfaces” what do you mean? do you mean i should validate the inputs right before i enter the params in the method?
[17:03:33] Lytol: has joined #ruby
[17:04:34] phaul: I mean look at your system from a higher perspective. It will have a hopefully small part that receives data from the outside world. Validate that and there. The rest of the system should only ever receive data that it can work with
[17:05:16] phaul: probably a method like add_numbers is not outside facing in you system
[17:05:59] phaul: receive_number_from_network or read_number_from_console might be
[17:08:30] xco: phaul: aaaaaaa right. now i get it. if that’s not the case and i’m doing something really very simple then it’ll be cool right? because here i’m not dealing with any external or bigger system
[17:11:18] hightower2: has joined #ruby
[17:11:35] hightower2: has joined #ruby
[17:11:43] phaul: xco: sure. it's cool
[17:12:18] phaul: I would just let it fail as tsm suggested in that case
[17:12:49] phaul: but what you are doing is also fine
[17:15:06] AJA4350: has joined #ruby
[17:15:07] alem0lars: has joined #ruby
[17:16:29] deathwishdave: has joined #ruby
[17:22:45] phaul: xco: for practising design try https://github.com/troessner/reek
[17:23:15] phaul: its quite a challange sometimes to write reek free code
[17:25:06] Devalo: has joined #ruby
[17:26:16] xco: phaul: yeah i agree. thanks a lot :)
[17:27:08] tdy1: has joined #ruby
[17:30:02] qual: has joined #ruby
[17:33:00] gix: has joined #ruby
[17:34:42] conta: has joined #ruby
[17:38:24] qual: has joined #ruby
[17:40:35] i1nfusion: has joined #ruby
[17:43:28] alem0lars: has joined #ruby
[17:44:56] Nicmavr: has joined #ruby
[17:45:25] void09: has joined #ruby
[17:45:53] void09: hello. anyone here uses archlinux and knows a bit of ruby ? i can't get a script from github to work (Works ok on ubuntu)
[17:46:11] void09: script is this: https://github.com/pviotti/issuu-pdf-dl
[17:46:57] phaul: what's the error void09 ?
[17:47:16] void09: hold on, i'll paste it
[17:49:14] Swyper: has joined #ruby
[17:52:23] void09: https://pastebin.com/bvVSAF5B
[17:52:23] ruby[bot]: void09: 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
[17:53:19] phaul: void09: Ignore the bot for now. I'm looking
[17:53:37] void09: I have libmagick6, rmagick and imagemagick6 installed. also pdftk
[17:53:43] claudiuinberlin: has joined #ruby
[17:53:47] void09: 7 is the newest on arch, same thing with taht
[17:54:50] void09: tried on fresh kubuntu following the instructions on git and it works. it's not an error in the script. the problem lies with it trying to access libmagick I think. i don't know if it's a path problem of just version incompatibilit or whatever
[17:55:12] phaul: it's rmagic that doesn't work
[17:56:22] phaul: can you modify the script and rerun? https://github.com/pviotti/issuu-pdf-dl/blob/master/issuu-pdf-dl.rb#L33 changed to raise $!
[17:57:08] phaul: actually puts $! ; raise $!
[17:59:02] void09: ok, wait a bit
[17:59:20] Devalo: has joined #ruby
[18:01:44] void09: so line 33 becomes puts $! ; raise $!
[18:02:00] grvgr: has joined #ruby
[18:02:02] phaul: yeah. that should altter the error output
[18:02:28] phaul: giving us more useful info then Error converting...
[18:05:06] void09: https://gist.github.com/sgmihai/1fdbad4d0f165c1a5fae4d4c23dd2ce0
[18:06:20] deathwishdave: has joined #ruby
[18:06:21] void09: https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion
[18:07:10] phaul: you can try what's suggested there.. Otherwise I have no idea what this error is
[18:07:46] orbyt_: has joined #ruby
[18:07:53] qual: has joined #ruby
[18:11:28] al2o3-cr: void09: comment out `<policy domain="coder" rights="none" pattern="{PS,PS2,PS3,EPS,PDF,XPS}" />` in /etc/ImageMagick-{6,7}/policy.xml
[18:12:08] phaul: image MAGICK - name checks out :)
[18:13:52] void09: well, that fixed it
[18:14:17] void09: though i now have another unrelated problem, have to run the script as root for rmagick to be accessible
[18:17:27] zachk: has joined #ruby
[18:19:27] zachk: has joined #ruby
[18:34:19] claudiuinberlin: has joined #ruby
[18:36:58] Swyper: has joined #ruby
[18:40:13] kapil____: has joined #ruby
[18:44:40] Swyper: has joined #ruby
[18:51:01] Swyper: has joined #ruby
[18:59:29] Fire-Dragon-DoL: has joined #ruby
[18:59:57] hiroaki: has joined #ruby
[19:04:09] Devalo: has joined #ruby
[19:04:13] mikecmpbll: has joined #ruby
[19:06:27] hiroaki: has joined #ruby
[19:07:20] silviu: has joined #ruby
[19:10:25] zenspider: that code just looks terrible... I'd be suspect
[19:10:32] zenspider: aaand I'd be doubly worried about running it as root. Please address that first
[19:12:20] void09: zenspider: but it works :)
[19:12:26] void09: and nobody else did a better job
[19:12:46] void09: i don't know ruby at all, but it seemed super efficient code to me. so much done in so few lines
[19:15:54] nowhere_man: has joined #ruby
[19:16:08] yxhuvud: has joined #ruby
[19:21:24] s2013: has joined #ruby
[19:28:54] Devalo: has joined #ruby
[19:30:58] bjpenn: has joined #ruby
[19:41:21] Devalo: has joined #ruby
[19:47:17] Renich_: has joined #ruby
[19:47:43] hiroaki: has joined #ruby
[19:48:44] dar123: has joined #ruby
[19:48:47] griffindy: has joined #ruby
[19:55:06] dviola: has joined #ruby
[19:58:19] gnufied: has joined #ruby
[19:58:53] ur5us: has joined #ruby
[20:00:24] Devalo: has joined #ruby
[20:04:29] LtHummus: has joined #ruby
[20:06:48] SeepingN: has joined #ruby
[20:09:44] brool: has joined #ruby
[20:23:59] Devalo: has joined #ruby
[20:24:48] Devalo: has joined #ruby
[20:24:56] adam12: has joined #ruby
[20:26:59] Swyper: has joined #ruby
[20:31:56] elcuervo: has joined #ruby
[20:32:59] Devalo: has joined #ruby
[20:35:28] ellcs: has joined #ruby
[20:38:08] code_zombie: has joined #ruby
[20:44:22] Devalo: has joined #ruby
[20:45:07] claudiuinberlin: has joined #ruby
[20:48:53] rprimus: has joined #ruby
[20:49:07] Swyper: has joined #ruby
[20:49:50] Devalo: has joined #ruby
[20:52:45] Swyper: has joined #ruby
[20:56:45] TomyLobo: has joined #ruby
[20:59:31] cyberarm: has joined #ruby
[21:05:26] rafadc: has joined #ruby
[21:11:27] Swyper: has joined #ruby
[21:14:33] Renich: has joined #ruby
[21:17:27] Swyper: has joined #ruby
[21:37:05] Eiam: has joined #ruby
[21:59:56] NeilCarvalho: has joined #ruby
[22:05:34] hightower2: has joined #ruby
[22:07:11] hightower2: has joined #ruby
[22:19:44] Brainium: has joined #ruby
[22:20:06] mangold: has joined #ruby
[22:22:22] ellcs: has joined #ruby
[22:23:54] brool: if i have a method that takes 3 ints, is there some syntactic trick i can do to expand an array to fill the args? like call it via "object.method ...array" or something
[22:24:14] brool: i thought i remembered something about splatting or expanding arrays or something
[22:24:17] phaul: method(*array)
[22:24:25] brool: ACTION tries
[22:24:30] phaul: it's called a splat
[22:33:02] gigetoo: has joined #ruby
[22:34:27] Swyper: has joined #ruby
[22:35:09] conta: has joined #ruby
[22:45:55] mangold: has joined #ruby
[22:51:06] Tau: has joined #ruby
[22:51:37] nowhere_man: has joined #ruby
[22:58:09] Swyper: has joined #ruby
[22:59:57] s2013: has joined #ruby
[23:00:39] Swyper: has joined #ruby
[23:10:46] cyberarm: has joined #ruby
[23:12:57] stooj: has joined #ruby
[23:15:49] i1nfusion: has joined #ruby
[23:32:57] Noxilex: has joined #ruby
[23:37:50] Noxilex: has joined #ruby
[23:38:53] al2o3-cr: &>> class Hash def coerce(x) [self.values.sum, x] end end; def add(*args) args.sum end; add **{a: 12, b: 12, c: 18}
[23:38:55] rubydoc: # => 42 (https://carc.in/#/r/6j2d)
[23:40:18] al2o3-cr: &>> class Hash def coerce(x) [self.values.sum, x] end end; def add(*args) args.sum end; 1 + {}
[23:40:19] rubydoc: # => 1 (https://carc.in/#/r/6j2f)
[23:43:30] ebbflowgo: has joined #ruby
[23:44:29] Swyper: has joined #ruby
[23:45:02] ebbflowgo: has left #ruby: ()
[23:46:48] ebbflowgo: has joined #ruby
[23:49:44] s2013: has joined #ruby
[23:50:58] yokel: has joined #ruby
[23:59:31] i1nfusion: has joined #ruby