« Back to channel list

#ruby - 25 March 2019

« Back 1 day Forward 1 day »
[00:03:13] cnsvc: has joined #ruby
[00:06:07] marz_d`ghostman: has joined #ruby
[00:06:27] marz_d`ghostman: Anyone using the redis-rb gem? How do you display the actual command after getting an error?
[00:07:44] al2o3-cr: xco: does ctrl + l clear for you?
[00:08:04] jrafanie: has joined #ruby
[00:08:27] xco: ctrl + l does clear for me
[00:08:43] xco: al2o3-cr: i don’t want just clear, it keeps history in buffer
[00:08:50] xco: CMD + K doesn't
[00:08:53] xco: which is what i want
[00:09:25] al2o3-cr: xco: i know, but does ctrl + l clear the screen for you?
[00:10:19] al2o3-cr: then, you could use ioctl with TIOCSTI
[00:10:31] al2o3-cr: to send key strokes to terminal
[00:14:14] orbyt_: has joined #ruby
[00:17:05] al2o3-cr: xco: does this work for you: $>.ioctl(0x5412, "\C-l") # 0x5412 = TIOCSTI i'm pretty sure it's the same on osx
[00:18:30] xco: you mean this
[00:18:35] xco: `>.ioctl(0x5412, "\C-l") # 0x5412 = `
[00:18:48] al2o3-cr: no just $>.ioctl(0x5412, "\C-l")
[00:19:36] al2o3-cr: actually, that was just me testing, probably better to use STDOUT.ioctl(0x5412, "\C-l")
[00:20:22] xco: nope it doesn't
[00:20:42] al2o3-cr: what about print "\ec"
[00:21:48] al2o3-cr: did it error?
[00:23:47] xco: not both are not working
[00:23:48] tdy: has joined #ruby
[00:24:03] xco: print "\ec" does nothing
[00:24:20] xco: but lets leave it :)
[00:26:15] al2o3-cr: xco: are you on osx?
[00:26:30] xco: on Mojave
[00:26:42] al2o3-cr: can you do me a favour?
[00:27:00] al2o3-cr: what the output of this command "grep TIOCSTI /usr/include/asm-generic/ioctls.h"
[00:27:19] xco: first let me check what “TIOCSTI” is :D
[00:28:16] xpika: has joined #ruby
[00:28:17] xco: “grep: /usr/include/asm-generic/ioctls.h: No such file or directory”
[00:28:42] al2o3-cr: ok, np. thanks.
[00:32:46] xco: al2o3-cr: want to review my what i was wriing? please? if you have time and willingness?
[00:34:25] LtHummus: has joined #ruby
[00:34:45] al2o3-cr: paste a link
[00:35:52] FatElephant: has joined #ruby
[00:35:57] xco: ok one minute
[00:39:37] Goudarz: has joined #ruby
[00:42:10] Dbugger: has joined #ruby
[00:42:30] Goudarz: hello everybody...
[00:42:33] ricer2: has joined #ruby
[00:50:15] Goudarz_: has joined #ruby
[00:50:46] Goudarz_: Hello, I am working on translation the website to Persian.
[00:52:05] xco: al2o3-cr: https://gist.github.com/xcobar/92deb10cdbbb2f9e2664e5ab27ff602a
[00:52:24] xco: i know it’s naive a bit but maybe comments will be appreciated :D
[00:52:46] xco: purpose of it is to parse an xml file and display the results
[00:56:01] xco: al2o3-cr: there’s a whole folder, runnable version here: https://www.dropbox.com/s/r63x6x2nm1xjh3u/cli.zip?dl=0
[00:58:14] al2o3-cr: on a whole that's pretty good code xco
[01:00:26] Devalo: has joined #ruby
[01:00:41] al2o3-cr: to be truthful, i was expecting a lot worse :P
[01:00:49] xco: didn’t expect that hahaha
[01:01:29] xco: this makes me happy because this is the part where i write quickly to get tests to pass
[01:01:45] bmurt: has joined #ruby
[01:01:58] xco: after getting some sleeping i’ll looking into making it better/refactoring that’s why a clear pair of eyes and advise will be nice
[01:05:19] xco: signs of no sleep. sorry for the typos
[01:06:54] al2o3-cr: i'm sure others will will give you pointers too.
[01:07:41] xco: phaul: maybe you can take a look too? :)
[01:08:27] phaul: still wrestling with this experimental project of mine.. but give me a day or too
[01:08:49] xco: phaul: sure no problem! maybe i can help somehow? :P
[01:09:15] xco: at least i’ll find a type to fix in your README for sure :D
[01:10:23] phaul: it's in a pretty ad hoc phase, jumping from rails to sinatra to roda, rom-rb, to sequel to pg, react to elm. Basically trying many things and experiment
[01:11:49] xco: ok i’m sure you’ll figure a way through it
[01:12:53] Axy: has joined #ruby
[01:12:54] Axy: has joined #ruby
[01:16:37] phaul: ah yes, haha :) my typing is great, isn't it
[01:26:47] esrse: has joined #ruby
[01:29:01] mangold: has joined #ruby
[01:40:20] Tau: has joined #ruby
[01:43:15] jrafanie: has joined #ruby
[01:51:36] Nicmavr: has joined #ruby
[02:15:01] Emmanuel_Chanel: has joined #ruby
[02:16:17] Radar: has joined #ruby
[02:16:30] dar123: has joined #ruby
[02:39:31] Swyper: has joined #ruby
[02:40:56] dviola: has joined #ruby
[02:52:44] Swyper: has joined #ruby
[02:53:10] uplime: has joined #ruby
[02:56:24] CrazyEddy: has joined #ruby
[03:06:54] Swyper: has joined #ruby
[03:13:03] Swyper: has joined #ruby
[03:14:27] johnny56: has joined #ruby
[03:15:15] Devalo: has joined #ruby
[03:19:29] Swyper: has joined #ruby
[03:19:58] mangold: has joined #ruby
[03:23:32] t0xik: has joined #ruby
[03:23:40] orbyt_: has joined #ruby
[03:52:10] conta: has joined #ruby
[03:57:59] Swyper: has joined #ruby
[03:59:39] Swyper: has joined #ruby
[04:10:21] braincrash: has joined #ruby
[04:12:24] marz_d`ghostman: I have a hash whose key value pairs corresponds to an instance variables. How do I instantiate an object by iterating through a hash? e.g. https://gist.github.com/marzdgzmn/085808bc45267a9beafc9b11b4e92f14
[04:12:55] iMadper: has joined #ruby
[04:14:59] baweaver: keyword parameters for one
[04:15:09] baweaver: Though ** would work
[04:15:34] baweaver: Na, just use keyword params
[04:19:23] i1nfusion: has joined #ruby
[04:34:55] diego1: has joined #ruby
[04:35:27] diego1: has left #ruby: ()
[04:44:06] dviola: has joined #ruby
[04:58:15] ur5us: has joined #ruby
[04:58:35] i1nfusion: has joined #ruby
[05:14:48] duderonomy: has joined #ruby
[05:39:36] ur5us: has joined #ruby
[05:41:06] ferr: has joined #ruby
[06:15:17] conta: has joined #ruby
[06:15:51] Devalo: has joined #ruby
[06:17:52] duckpuppy: has joined #ruby
[06:37:06] reber: has joined #ruby
[06:55:03] dionysus69: has joined #ruby
[07:01:12] aufi: has joined #ruby
[07:11:50] clemens3_: has joined #ruby
[07:13:06] hiroaki: has joined #ruby
[07:21:53] dinfuehr: has joined #ruby
[07:27:47] tdy: has joined #ruby
[07:33:28] andikr: has joined #ruby
[07:39:30] dinfuehr: has joined #ruby
[07:41:19] jinie: has joined #ruby
[07:47:32] dinfuehr: has joined #ruby
[07:49:45] ljarvis_: has joined #ruby
[08:02:46] Swyper: has joined #ruby
[08:05:43] _joes_: has joined #ruby
[08:06:12] alem0lars: has joined #ruby
[08:10:56] pietia: has joined #ruby
[08:12:49] suukim: has joined #ruby
[08:13:39] mikecmpbll: has joined #ruby
[08:14:40] TomyWork: has joined #ruby
[08:15:50] pietia: has joined #ruby
[08:16:12] lxsameer: has joined #ruby
[08:18:08] pietia: has joined #ruby
[08:25:24] vondruch: has joined #ruby
[08:30:49] laaron: has joined #ruby
[08:31:29] Phage: has joined #ruby
[08:31:29] Phage: has joined #ruby
[08:32:33] _joes_: has joined #ruby
[08:39:26] Devalo: has joined #ruby
[08:42:58] za1b1tsu: has joined #ruby
[08:45:03] hightower2: has joined #ruby
[08:45:25] hightower2: has joined #ruby
[08:59:39] kyrylo: has joined #ruby
[09:00:56] marmotini_: has joined #ruby
[09:05:06] andikr: has joined #ruby
[09:09:37] themsay: has joined #ruby
[09:11:13] tdy: has joined #ruby
[09:25:10] xco: has joined #ruby
[09:28:22] mangold: has joined #ruby
[09:31:49] schleppel: has joined #ruby
[09:35:55] GodFather: has joined #ruby
[09:39:02] andikr: has joined #ruby
[09:48:20] _joes_: has joined #ruby
[10:00:35] yokel: has joined #ruby
[10:08:38] kapil____: has joined #ruby
[10:36:21] cisco: has joined #ruby
[10:56:52] ellcs: has joined #ruby
[11:01:41] tdy: has joined #ruby
[11:09:17] mikecmpbll: has joined #ruby
[11:11:42] AJA4350: has joined #ruby
[11:11:47] conta: has joined #ruby
[11:12:52] aufi: has joined #ruby
[11:13:16] dogweather: has joined #ruby
[11:16:58] marmotini: has joined #ruby
[11:19:12] phaul: xco: hi, are you around?
[11:21:19] xco: phaul: i am
[11:21:50] phaul: there is one thing I spotted.
[11:22:39] Swyper: has joined #ruby
[11:22:43] phaul: you call Loco.new everywhere and then just garbage collect the result. And Loco doesn't have any instance state
[11:23:11] phaul: In this case you are better of creating a module instead of a class, and call you methods on that module
[11:23:23] marmotini_: has joined #ruby
[11:23:38] phaul: like Loco.start_finish_station
[11:26:10] xco: phaul: that’s a very nice point! I like it.
[11:26:40] xco: so Loco would better be a module than a class right? is this for best practice or it has something to do with performance, which side that this lean towards more?
[11:27:02] phaul: it's better if you dont have instance state. otherwise class
[11:27:23] phaul: instance state is something tht you want to preserve in an instance between method calls.
[11:27:58] xco: by “instance state” you mean the calls to Loco.new….?
[11:28:11] phaul: class A; def foo; @a = 1; end; def bar; @a; end; end
[11:29:04] phaul: here @a is the instance state, meaning after x = A.new ; x.foo the 1 is stored in that instance. and later x.bar retreives it
[11:29:25] phaul: so it's a state persistent across method calls
[11:29:36] xco: aaah right
[11:29:52] xco: and i don’t have those in my class
[11:30:14] xco: so why use a class then? … makes sense
[11:31:09] xco: thanks :)
[11:35:38] ldnunes: has joined #ruby
[11:37:27] marmotini: has joined #ruby
[11:54:37] marmotini_: has joined #ruby
[11:59:17] SCHAPiE: has joined #ruby
[12:07:35] octomancer: has joined #ruby
[12:14:50] octomancer: has joined #ruby
[12:31:46] Nicmavr: has joined #ruby
[12:40:39] bmurt: has joined #ruby
[12:40:58] Devalo: has joined #ruby
[12:53:59] jcalla: has joined #ruby
[13:00:18] naught-fowl: has joined #ruby
[13:05:14] Swyper: has joined #ruby
[13:06:53] andikr: has joined #ruby
[13:09:14] naught-fowl: has joined #ruby
[13:11:20] _joes_1: has joined #ruby
[13:21:33] darix: has joined #ruby
[13:38:47] _joes_: has joined #ruby
[13:41:20] jhass: has joined #ruby
[13:46:30] griffindy: has joined #ruby
[13:46:33] Swyper: has joined #ruby
[13:50:19] Swyper: has joined #ruby
[13:51:38] jrafanie: has joined #ruby
[13:55:08] andikr: has joined #ruby
[13:55:56] tdy: has joined #ruby
[13:58:03] jottr: has joined #ruby
[14:09:52] Rapture: has joined #ruby
[14:11:57] gnufied: has joined #ruby
[14:16:47] dionysus69: has joined #ruby
[14:25:01] _joes_: has joined #ruby
[14:27:01] alfiemax: has joined #ruby
[14:30:14] naught-fowl: has joined #ruby
[14:45:07] stryek: has joined #ruby
[14:46:25] cisco: has joined #ruby
[14:47:08] spacesuitdiver: has joined #ruby
[14:47:29] szulak_: has joined #ruby
[14:51:36] laaron: has joined #ruby
[14:52:37] Puffball: has joined #ruby
[14:54:41] Dbugger: has joined #ruby
[14:54:43] rippa: has joined #ruby
[15:02:25] tdy: has joined #ruby
[15:06:45] jrafanie_: has joined #ruby
[15:18:10] naught-fowl: has joined #ruby
[15:18:58] grilix: has joined #ruby
[15:21:29] Swyper: has joined #ruby
[15:29:37] alem0lars: has joined #ruby
[15:35:24] polishdub: has joined #ruby
[15:36:21] jottr: has joined #ruby
[15:45:17] dviola: has joined #ruby
[15:45:51] ellcs1: has joined #ruby
[15:46:33] grilix_: has joined #ruby
[15:46:57] naught-fowl: has joined #ruby
[15:56:30] tdy: has joined #ruby
[15:56:57] conta: has joined #ruby
[16:04:21] Devalo: has joined #ruby
[16:05:21] Swyper: has joined #ruby
[16:10:39] dtzuzu: has joined #ruby
[16:11:55] wallace_mu: has joined #ruby
[16:16:29] Devalo: has joined #ruby
[16:18:34] terabytes: has joined #ruby
[16:19:03] Renich: has joined #ruby
[16:21:27] Renich: has joined #ruby
[16:21:51] mangold: has joined #ruby
[16:23:33] Renich: has joined #ruby
[16:23:42] Swyper: has joined #ruby
[16:25:27] naught-fowl: has joined #ruby
[16:32:12] also_uplime: has joined #ruby
[16:36:23] cthulchu_: has joined #ruby
[16:36:24] dinfuehr: has joined #ruby
[16:37:07] jcarl43: has joined #ruby
[16:38:36] also_uplime: I've got a weird issue... I'm trying to use httparty to download a peer certificate, which theoretically should be possible according to https://github.com/jnunemaker/httparty/blob/master/examples/peer_cert.rb However, when I try to run it, I get the following error https://clbin.com/5shYf using ruby 2.6. Any ideas how to fix it? I'm on a Mac if it
[16:38:37] also_uplime: matters. Thanks!
[16:40:18] Copperpwn: has joined #ruby
[16:40:25] also_uplime: this happens on 2.4 as well fwiw
[16:43:54] dinfuehr: has joined #ruby
[16:46:30] Eiam: has joined #ruby
[16:48:47] sleetdrop: has joined #ruby
[16:51:06] orbyt_: has joined #ruby
[16:52:06] duderonomy: has joined #ruby
[16:52:43] gheegh: has joined #ruby
[16:53:04] jokke: has joined #ruby
[16:53:09] jokke: hey there o/
[16:53:38] jokke: i'm trying to set the temp dir to be used for Tempfiles under ruby 2.4.2
[16:53:47] jokke: it seems that Dir.tmpfile doesn't yet exist
[16:54:02] jokke: and setting the TMPDIR env var doesn't have any effect
[16:55:58] jokke: ah never mind
[16:56:03] jokke: i had to require 'tempfile'
[16:56:25] dinfuehr: has joined #ruby
[16:56:40] Inline: has joined #ruby
[16:57:33] nowhere_man: has joined #ruby
[17:07:56] hiroaki: has joined #ruby
[17:13:07] poguez_: has joined #ruby
[17:15:40] xco: has joined #ruby
[17:23:32] SeepingN: has joined #ruby
[17:25:32] i1nfusion: has joined #ruby
[17:27:17] beefjoe: has joined #ruby
[17:33:19] gix: has joined #ruby
[17:33:50] Swyper: has joined #ruby
[17:46:59] Swyper: has joined #ruby
[17:47:30] r3m: has joined #ruby
[17:49:10] nowhere_man: has joined #ruby
[17:49:21] Swyper: has joined #ruby
[17:51:20] orbyt_: has joined #ruby
[17:54:00] r3m: has joined #ruby
[17:55:49] tin: has joined #ruby
[18:02:04] cliluw: has joined #ruby
[18:04:38] gheegh: has joined #ruby
[18:05:02] Tau: has joined #ruby
[18:08:46] TomyLobo: has joined #ruby
[18:09:57] spiette: has joined #ruby
[18:17:54] r3m: has joined #ruby
[18:19:37] naught-fowl: has joined #ruby
[18:26:28] mangold: has joined #ruby
[18:36:45] themsay: has joined #ruby
[18:40:00] hahuang65: has joined #ruby
[18:40:28] r3m: has joined #ruby
[18:40:56] i1nfusion: has joined #ruby
[18:41:16] orbyt_: has joined #ruby
[18:45:48] mikecmpbll: has joined #ruby
[18:48:16] cliluw: has joined #ruby
[18:50:06] themsay: has joined #ruby
[18:50:20] cliluw: has joined #ruby
[19:04:38] lucasb: has joined #ruby
[19:07:52] pwnd_nsfw: has joined #ruby
[19:19:57] jottr: has joined #ruby
[19:25:53] zachk: has joined #ruby
[19:33:41] Swyper: has joined #ruby
[19:35:05] hiroaki: has joined #ruby
[19:37:45] kyrylo: has joined #ruby
[19:38:56] xco: has joined #ruby
[19:40:36] themsay: has joined #ruby
[19:45:57] claw: has joined #ruby
[19:47:16] cliluw: has joined #ruby
[19:53:27] jottr: has joined #ruby
[19:53:38] i1nfusion: has joined #ruby
[19:54:07] dviola: has joined #ruby
[19:59:23] orbyt_: has joined #ruby
[20:03:45] zachk: has joined #ruby
[20:05:11] naught-fowl: has joined #ruby
[20:08:03] CJKinni: has joined #ruby
[20:08:43] Swyper: has joined #ruby
[20:21:34] cnsvc: has joined #ruby
[20:22:16] Liothen: has joined #ruby
[20:25:04] Liothen: has joined #ruby
[20:33:01] clemens3_: has joined #ruby
[20:34:22] akosednar: has joined #ruby
[20:34:22] akosednar: has joined #ruby
[20:35:33] orbyt_: has joined #ruby
[20:37:45] iMadper`: has joined #ruby
[20:39:01] ur5us: has joined #ruby
[20:42:29] Devalo: has joined #ruby
[20:42:42] _joes_: has joined #ruby
[21:07:45] _joes_: has joined #ruby
[21:09:30] orbyt_: has joined #ruby
[21:21:55] cd: has joined #ruby
[21:28:55] cdempsey: has joined #ruby
[21:31:59] cdempsey: has left #ruby: ()
[21:39:35] Devalo: has joined #ruby
[21:40:36] t0xik: has joined #ruby
[21:43:23] burattino: has joined #ruby
[22:01:59] dviola: has joined #ruby
[22:27:14] LightStalker: has joined #ruby
[22:30:04] clemens3: has joined #ruby
[22:30:39] alem0lars: has joined #ruby
[23:02:36] jrafanie: has joined #ruby
[23:10:21] spacesuitdiver: has joined #ruby
[23:12:01] Nicmavr: has joined #ruby
[23:13:54] bambanx: has joined #ruby
[23:26:42] violentE: has joined #ruby
[23:31:29] longshi: has joined #ruby
[23:37:17] spacesuitdiver: has joined #ruby
[23:39:34] mikecmpbll: has joined #ruby
[23:48:52] bmurt: has joined #ruby
[23:51:27] ammar: has joined #ruby
[23:53:07] darmou: has joined #ruby
[23:59:06] AJA4350: has joined #ruby