« Back to channel list

#ruby - 18 March 2019

« Back 1 day Forward 1 day »
[00:06:23] jottr: has joined #ruby
[00:10:13] P-NuT: has joined #ruby
[00:17:38] dar123: has joined #ruby
[00:27:21] jottr: has joined #ruby
[00:27:57] bjpenn: has joined #ruby
[00:40:21] NeilCarvalho: has joined #ruby
[00:41:37] urbanmonk: has joined #ruby
[00:42:07] urbanmonk: has joined #ruby
[00:47:49] elcontrastador: has joined #ruby
[00:48:14] jottr: has joined #ruby
[01:09:08] jottr: has joined #ruby
[01:10:17] laaron: has joined #ruby
[01:10:42] Krebsgewehr: has joined #ruby
[01:14:19] mochiyoda: has left #ruby: ("Konversation terminated!")
[01:24:07] Autolycus: has joined #ruby
[01:30:04] jottr: has joined #ruby
[01:32:07] jrafanie: has joined #ruby
[01:36:00] rafadc: has joined #ruby
[01:47:20] Devalo: has joined #ruby
[01:48:35] dar123: has joined #ruby
[01:50:59] jottr: has joined #ruby
[01:56:09] t0xik: has joined #ruby
[02:02:01] s3nd1v0g1us: has joined #ruby
[02:07:35] dar123: has joined #ruby
[02:11:54] jottr: has joined #ruby
[02:22:36] Swyper: has joined #ruby
[02:26:29] mangold: has joined #ruby
[02:32:49] jottr: has joined #ruby
[02:50:50] c0dec: has joined #ruby
[02:52:28] saysjonathan: has joined #ruby
[02:53:42] jottr: has joined #ruby
[02:58:33] duderonomy: has joined #ruby
[03:01:35] duderonomy: has joined #ruby
[03:02:41] duderonomy: has joined #ruby
[03:03:22] duderonomy: has joined #ruby
[03:04:14] duderonomy: has joined #ruby
[03:04:53] duderonomy: has joined #ruby
[03:05:39] duderonomy: has joined #ruby
[03:07:23] Swyper: has joined #ruby
[03:08:05] duderonomy: has joined #ruby
[03:10:23] duderonomy: has joined #ruby
[03:14:40] jottr: has joined #ruby
[03:15:21] duderonomy: has joined #ruby
[03:19:09] haivron: has joined #ruby
[03:19:37] laaron: has joined #ruby
[03:20:28] xlued: has joined #ruby
[03:22:46] iMadper: has joined #ruby
[03:30:53] SuperLag: has joined #ruby
[03:52:36] ur5us: has joined #ruby
[03:55:03] jottr: has joined #ruby
[04:09:24] braincrash: has joined #ruby
[04:15:57] jottr: has joined #ruby
[04:21:08] yaewa: has joined #ruby
[04:31:33] dellavg__: has joined #ruby
[04:36:52] jottr: has joined #ruby
[04:42:25] laaron: has joined #ruby
[04:42:54] marz_d`ghostman: has joined #ruby
[04:43:16] marz_d`ghostman: When your app uses secret keys and stuff for api calls, where's the best place to put it? as environment variable on the system?
[04:45:19] havenwood: marz_d`ghostman: Rails uses encrypted credentials these days. Lots of folk still use environment variables.
[04:45:45] Devalo: has joined #ruby
[04:46:29] marz_d`ghostman: havenwood: I'll take a look at encrypted credentials, thanks, I'm currently using environment variable by the way, was just wondering if there is a more secure way to do it :)
[04:47:17] havenwood: marz_d`ghostman: Here's simple encryption with the JOSE gem, fwiw: https://gist.github.com/havenwood/e18de5fa23ec1c49e3feab493d579909
[04:53:37] sagax: has joined #ruby
[04:57:49] jottr: has joined #ruby
[04:59:14] mangold: has joined #ruby
[05:02:59] Swyper: has joined #ruby
[05:14:27] baweaver: https://medium.com/@baweaver/ruby-2-7-numbered-parameters-3f5c06a55fe4
[05:18:44] jottr: has joined #ruby
[05:26:12] laaron: has joined #ruby
[05:33:12] Emmanuel_Chanel: has joined #ruby
[05:36:16] dar123: has joined #ruby
[05:47:56] Devalo: has joined #ruby
[05:52:55] laaron: has joined #ruby
[05:54:31] jottr: has joined #ruby
[05:55:18] laaron: has joined #ruby
[05:55:52] Devalo: has joined #ruby
[06:15:53] leftylink: ah interesting
[06:20:49] conta: has joined #ruby
[06:26:51] segy: has joined #ruby
[06:28:00] dar123: has joined #ruby
[06:31:44] jottr: has joined #ruby
[06:45:39] jottr: has joined #ruby
[06:46:00] JasonO: has joined #ruby
[06:51:25] t0xik: i'm loving ruby :D
[06:54:06] segy: has joined #ruby
[07:02:26] segy: has joined #ruby
[07:18:26] cfjk: has joined #ruby
[07:24:09] clemens3: has joined #ruby
[07:24:50] qual: has joined #ruby
[07:27:04] johnny56: has joined #ruby
[07:29:36] DaniG2k: has joined #ruby
[07:44:49] jottr: has joined #ruby
[07:46:53] _joes_: has joined #ruby
[07:47:28] tdy1: has joined #ruby
[07:52:28] _joes_: has joined #ruby
[07:53:29] tdy1: has joined #ruby
[07:54:04] za1b1tsu: has joined #ruby
[07:58:09] cgfbee: has joined #ruby
[07:59:30] Devalo: has joined #ruby
[08:05:47] ur5us: has joined #ruby
[08:07:58] TomyWork: has joined #ruby
[08:10:05] clemens3: has joined #ruby
[08:18:31] dionysus69: has joined #ruby
[08:21:11] reber: has joined #ruby
[08:28:48] vondruch: has joined #ruby
[08:29:09] Xeago_: has joined #ruby
[08:35:44] _joes_: has joined #ruby
[08:40:41] iMadper: has joined #ruby
[08:43:47] schleppel: has joined #ruby
[08:48:25] jottr: has joined #ruby
[08:59:12] tdy1: has joined #ruby
[09:02:08] sagax: has joined #ruby
[09:05:59] suukim: has joined #ruby
[09:08:41] Flyingdog: has joined #ruby
[09:09:19] jottr: has joined #ruby
[09:10:34] aufi: has joined #ruby
[09:13:44] marcoecc: has joined #ruby
[09:16:06] suukim: has joined #ruby
[09:18:15] ur5us: has joined #ruby
[09:19:07] alem0lars: has joined #ruby
[09:20:07] Emmanuel_Chanel: has joined #ruby
[09:23:18] bjpenn: has joined #ruby
[09:27:58] grr12314: has joined #ruby
[09:30:13] jottr: has joined #ruby
[09:32:00] TomyWork: has joined #ruby
[09:33:14] AJA4350: has joined #ruby
[09:36:35] dtzuzu: has joined #ruby
[09:37:30] DTZUZO: has joined #ruby
[09:40:42] jottr: has joined #ruby
[09:44:12] ellcs: has joined #ruby
[09:44:37] Nicmavr: has joined #ruby
[09:46:12] laaron: has joined #ruby
[09:51:04] alem0lars: has joined #ruby
[09:56:13] _joes_: has joined #ruby
[09:58:40] jottr: has joined #ruby
[10:06:00] apparition: has joined #ruby
[10:08:03] tdy1: has joined #ruby
[10:17:20] mikecmpbll: has joined #ruby
[10:18:23] nchambers: has joined #ruby
[10:20:08] mangold: has joined #ruby
[10:49:10] themsay: has joined #ruby
[11:02:13] haivron: has joined #ruby
[11:08:04] tdy1: has joined #ruby
[11:15:16] laaron: has joined #ruby
[11:17:35] sina: has joined #ruby
[11:20:49] TheBrayn: has joined #ruby
[11:45:08] jottr_: has joined #ruby
[12:12:10] Emmanuel_Chanel: has joined #ruby
[12:13:30] laaron: has joined #ruby
[12:14:04] tdy1: has joined #ruby
[12:17:37] conta1: has joined #ruby
[12:32:54] jrafanie: has joined #ruby
[12:34:06] t0xik: has joined #ruby
[12:36:25] bmurt: has joined #ruby
[12:38:06] ubuntuisloved: has joined #ruby
[12:48:30] tdy1: has joined #ruby
[12:50:09] leah2: has joined #ruby
[12:52:26] saysjonathan: has joined #ruby
[13:01:59] laaron: has joined #ruby
[13:05:07] ubuntuisloved: has joined #ruby
[13:10:40] _joes_: has joined #ruby
[13:13:51] s2013: has joined #ruby
[13:18:26] jcalla: has joined #ruby
[13:24:48] InfinityFye: has joined #ruby
[13:24:58] jaytull: has joined #ruby
[13:25:42] InfinityFye: has left #ruby: ()
[13:36:51] NeilCarvalho: has joined #ruby
[13:37:15] jrafanie: has joined #ruby
[13:38:33] guardian: has joined #ruby
[13:39:48] dionysus70: has joined #ruby
[13:41:05] tdy1: has joined #ruby
[13:46:23] darix: baweaver: I am not really sure why we needed this
[13:51:44] griffindy: has joined #ruby
[13:51:48] jaytull: What, IRC? ;-)
[13:52:25] darix: jaytull: the positional parameter thingie
[13:52:27] TheBrayn: IRC was a mistake
[13:52:47] TheBrayn: I think it's not too bad, better than nondescript variable names
[13:55:30] joast: has joined #ruby
[14:00:08] cow[moo]: has joined #ruby
[14:00:30] Stan: has joined #ruby
[14:10:49] xco: has joined #ruby
[14:13:13] xco: Hi. What will be the best way to determing if a string has repeating strings? for example this should return true “abcabcabcabc”
[14:13:25] xco: sorry this should return false “abcabcabcabc”
[14:13:38] xco: this should return true “utdutdtdutd"
[14:13:47] xco: not sure how to find repeating strings in a string
[14:14:09] grr12314: explain the logic in english
[14:14:24] tbuehlmann: what's your definition of "repeating"?
[14:14:27] grr12314: your false example looks like repeating to me
[14:16:00] xco: yeah i made a mistake
[14:17:07] xco: maybe i’ll a simpler example
[14:17:26] xco: something like "xyxy" should return false
[14:17:29] xco: likewise
[14:17:35] xco: “aa”
[14:17:41] xco: because there’s a repeating string
[14:18:19] xco: this "utdutdtdutd" has no repeating string and i’ll like a way to track that
[14:18:39] Tau: has joined #ruby
[14:18:40] xco: so i want to get true for “"utdutdtdutd”
[14:19:07] ytti: abcabcabcabck would be true also?
[14:19:44] xco: ytti: “abcabcabcabck” the “k” is not repeating so it should return true
[14:20:10] laaron: has joined #ruby
[14:21:01] ytti: abaaba is this false?
[14:21:06] Swyper: has joined #ruby
[14:21:08] xco: so basically the challenge i picked says this “We'll define a string as prime if it cannot be constructed by concatenating some (more than one) equal strings together.”
[14:21:40] xco: “For example, "abac" is prime, but "xyxy" is not("xyxy" = "xy" + "xy”).”
[14:21:57] grr12314: (s.size-1).times.any?{|x|s[0..x]*(s.size/(x+1))==s}
[14:22:03] ytti: challenge you picked? :>
[14:22:10] xco: yeah from codwars
[14:22:19] xco: practice site :)
[14:22:52] phaul: you can limit the loop to prime factors of size if you want to
[14:23:42] grr12314: yea if i know how :p
[14:23:48] grr12314: actually may not be prime
[14:25:20] xco: ytti: “abaaba” is repeating, should be false
[14:25:41] phaul: &>> require 'prime'; 12.prime_division.map(&:first)
[14:25:45] rubydoc: # => [2, 3] (https://carc.in/#/r/6iu9)
[14:27:04] grr12314: ok i see. the substring size isnt necesserily prime but its repeat count is
[14:27:12] Onwarion: has joined #ruby
[14:28:30] xco: that’s works on integers
[14:28:38] xco: unless it’s not meant for me
[14:29:20] phaul: if it repeats a*b times then (thing * b) it also repeats a times
[14:30:35] grr12314: still no need to involve prime lib, seems overkill
[14:31:04] grr12314: (s.size-1).times.any?{|x|s.size%x==0&&s[0..x]*(s.size/(x+1))==s}
[14:31:16] grilix: has joined #ruby
[14:31:23] grr12314: if you want to avoid some pointless ops
[14:31:25] cranq: has joined #ruby
[14:32:10] grr12314: for small strings probably no need to bother avoiding them even
[14:32:25] Fusl: has joined #ruby
[14:32:47] phaul: yeah. It was just an idea. I am not saying that's the way you should do it
[14:33:35] Swyper: has joined #ruby
[14:33:37] xco: right :)
[14:35:17] Fusl: has joined #ruby
[14:36:51] Fusl: has joined #ruby
[14:38:38] hightower3: has joined #ruby
[14:39:33] hightower3: has joined #ruby
[14:40:08] Azure: has joined #ruby
[14:42:40] stryek: has joined #ruby
[14:43:24] Inline: has joined #ruby
[14:48:07] AJA4351: has joined #ruby
[14:48:10] ytti: quite, rather many optimzation there could be
[14:48:31] ytti: like for example, you only need to figure out the lengths which are divisible by the total length of the string
[14:48:48] ytti: but premature optimsation is source of great many evil
[14:54:08] grilix: has joined #ruby
[14:58:48] ghoti: has joined #ruby
[15:02:05] ghoti: has left #ruby: ()
[15:02:12] jaytull: has joined #ruby
[15:16:17] Dbugger: has joined #ruby
[15:20:16] phaul: &>> require 'prime'; 'abcabc'.yield_self { |s| s.length.prime_division.any? { |p, _| p < s.length && s[0,p] * (s.length / p) == s } }
[15:20:18] rubydoc: # => true (https://carc.in/#/r/6iuh)
[15:20:35] polishdub: has joined #ruby
[15:21:26] grr12314: s[a,b] same as s[a..b] ?
[15:21:35] grr12314: &>> require 'prime'; 'zzzzz'.yield_self { |s| s.length.prime_division.any? { |p, _| p < s.length && s[0,p] * (s.length / p) == s } }
[15:21:36] rubydoc: # => false (https://carc.in/#/r/6iui)
[15:21:53] grr12314: oops, sorry for breaking it phaul :p
[15:22:00] phaul: no. p number of elemems startting from 0
[15:22:24] phaul: 0...p would be the same
[15:23:04] jrafanie: has joined #ruby
[15:23:30] phaul: oh. wait a minute...
[15:23:41] phaul: &>> require 'prime'; 'abcdabcd'.yield_self { |s| s.length.prime_division.any? { |p, _| p < s.length && s[0,p] * (s.length / p) == s } }
[15:23:43] rubydoc: # => false (https://carc.in/#/r/6iuj)
[15:24:17] phaul: exactly the thing you mentioned above on substring not being prime length
[15:24:23] Swyper: has joined #ruby
[15:24:35] grr12314: just swap p and length/p
[15:24:44] _joes_: has joined #ruby
[15:27:37] reber: has joined #ruby
[15:28:25] grr12314: the block could also be s.chars.each_slice(X).to_a.uniq.size==1 or something :p
[15:34:25] jaytull: has joined #ruby
[15:35:12] phaul: it would also be broken for prime length single char strings like 'aaa' assuming that's supposed to be repeating
[15:35:42] phaul: "ytti | but premature optimsation is source of great many evil" :D
[15:40:44] duderonomy: has joined #ruby
[15:42:08] rippa: has joined #ruby
[15:43:13] SeepingN: has joined #ruby
[15:46:39] s2013: has joined #ruby
[15:48:25] SuperL4g: has joined #ruby
[15:50:30] xco: has joined #ruby
[15:51:06] xdecimal: has joined #ruby
[15:51:06] saysjonathan: has joined #ruby
[15:52:19] al2o3-cr: has joined #ruby
[15:52:52] jottr: has joined #ruby
[15:55:45] zachk: has joined #ruby
[15:55:49] Fr4n: has joined #ruby
[15:57:05] grr12314: prime_division doesnt give the trivial divisions?
[15:58:09] grr12314: without testing i'd guess it does, and wont be broken
[15:58:31] laaron: has joined #ruby
[15:58:54] grr12314: as long as you changed the p<len to p>1, related to swap mentioned above
[16:00:48] zachk: has joined #ruby
[16:01:19] dar123: has joined #ruby
[16:03:17] hightower2: has joined #ruby
[16:04:05] xco: has left #ruby: ()
[16:05:23] grr12314: ah i had misunderstood what prime_division does, theres no need for a check at all
[16:05:30] Rapture: has joined #ruby
[16:09:37] phaul: grr12314: correct. before p and length / p were the wrong way around it was there to make 'abc' false.
[16:10:10] phaul: I mean before; when ..
[16:11:52] phaul: philosophical question. does 'a' repeat :) ?
[16:13:31] phaul: I guess not. but 'aa' does
[16:17:13] laaron: has joined #ruby
[16:25:29] [Butch]: has joined #ruby
[16:26:12] laaron: has joined #ruby
[16:27:42] i1nfusion: has joined #ruby
[16:30:06] _joes_: has joined #ruby
[16:36:49] s2013: has joined #ruby
[16:41:07] laaron: has joined #ruby
[16:42:23] mangold: has joined #ruby
[16:42:37] Azure: has joined #ruby
[16:44:58] i1nfusion: has joined #ruby
[16:57:18] dawidof_: has joined #ruby
[17:00:10] orbyt_: has joined #ruby
[17:01:45] agent_white: has joined #ruby
[17:04:20] i1nfusion: has joined #ruby
[17:09:49] AJA4350: has joined #ruby
[17:12:15] NeilCarvalho: has joined #ruby
[17:16:15] segy: has joined #ruby
[17:18:19] dawidof_: has joined #ruby
[17:24:06] hahuang65: has joined #ruby
[17:25:53] dawidof_: Hi folks. I want to split a big app and to have some parts in the separate gems. I need to have api documentation as it is an api app)) It would be nice to have slate on rspec_api_documentation, as it is free and good looking. So, the question is, is it possible to generate documentation from gems and app itself?
[17:27:24] moei: has joined #ruby
[17:28:16] hahuang65_: has joined #ruby
[17:28:55] segy: has joined #ruby
[17:30:19] Myrha: has joined #ruby
[17:31:03] dawidof: has joined #ruby
[17:34:30] hahuang65: has joined #ruby
[17:35:02] hightower2: has joined #ruby
[17:36:29] hightower2: has joined #ruby
[17:37:34] hahuang65_: has joined #ruby
[17:43:51] hahuang65: has joined #ruby
[17:43:51] bjpenn: has joined #ruby
[17:44:45] alem0lars: has joined #ruby
[17:45:32] SuperL4g: has joined #ruby
[17:46:37] hahuang65: has joined #ruby
[17:51:49] _joes_: has joined #ruby
[17:58:17] Renich: has joined #ruby
[18:06:32] orbyt_: has joined #ruby
[18:12:06] laaron: has joined #ruby
[18:18:26] Swyper: has joined #ruby
[18:18:42] _joes_: has joined #ruby
[18:19:53] baweaver: dawidof: YARDoc tends to be fairly standard for docs.
[18:20:04] baweaver: It also allows you to get a server up for documentation
[18:20:23] baweaver: and gemstash may well have a YARD flag later for hosting docs for any installed gem on the server
[18:22:40] Devalo: has joined #ruby
[18:24:38] Swyper: has joined #ruby
[18:38:25] Ai9zO5AP: has joined #ruby
[18:58:42] RedSnarf: has joined #ruby
[19:03:27] segy: has joined #ruby
[19:17:11] dawidof: has joined #ruby
[19:17:35] hightower2: has joined #ruby
[19:18:37] hightower2: has joined #ruby
[19:19:31] sagax: can i ask about rvm?
[19:21:36] ruby[bot]: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[19:27:35] i1nfusion: has joined #ruby
[19:32:35] i1nfusion: has joined #ruby
[19:33:13] dawidof: Uploaded file: https://uploads.kiwiirc.com/files/ac4c48de522119a50724465c73446dcc/pasted.txt
[19:33:37] dawidof: @baweaver thank you. But I think I'm looking for sth different. First of all it will be API docs with some examples for the frontend devs and it will be ugly written tons of code with examples in yard.
[19:33:41] dawidof: Secondly, I think it'll be much better to use sth like rspec_api_documentation, as you are writting tests and documentation at the same time, no need to write them twice. Thirdly, slate looks more friendly. But anyway thank you. I'll try to find some solution with rspec_api_documentation
[19:36:29] s3nd1v0g1us: has joined #ruby
[19:37:30] puchu: has joined #ruby
[19:38:03] puchu: i'm trying to build this book with asciidoctor-pdf - https://github.com/bitcoinbook/bitcoinbook.git
[19:38:31] Devalo: has joined #ruby
[19:39:49] themsay: has joined #ruby
[19:40:49] sagax: https://termbin.com/jc1x why i can't update `rvm` ?
[19:43:02] code_zombie: has joined #ruby
[19:45:13] alem0lars: has joined #ruby
[19:52:49] nowhereman: has joined #ruby
[19:52:51] laaron: has joined #ruby
[19:54:36] sagax: thanks to all
[19:58:11] [Butch]: has joined #ruby
[20:00:51] themsay: has joined #ruby
[20:07:42] themsay: has joined #ruby
[20:10:44] zleap: has joined #ruby
[20:10:45] zleap: has joined #ruby
[20:14:10] t0xik: has joined #ruby
[20:19:24] Kilo`byte: has joined #ruby
[20:21:07] AJA4350: has joined #ruby
[20:24:51] Nicmavr: has joined #ruby
[20:31:05] ur5us: has joined #ruby
[20:34:25] Lytol: has joined #ruby
[20:35:22] i1nfusion: has joined #ruby
[20:48:53] nowhereman: has joined #ruby
[21:00:01] orbyt_: has joined #ruby
[21:10:54] zapata_: has joined #ruby
[21:17:47] Azure: has joined #ruby
[21:19:55] r3m: has joined #ruby
[21:20:32] reber: has joined #ruby
[21:20:36] lucasb: has joined #ruby
[21:21:41] gix: has joined #ruby
[21:33:06] iNs: has joined #ruby
[21:33:23] eckhardt: has joined #ruby
[21:55:06] hightower2: has joined #ruby
[21:55:20] hightower2: has joined #ruby
[22:03:43] s2013: has joined #ruby
[22:08:00] mkaito: has joined #ruby
[22:08:00] mkaito: has joined #ruby
[22:19:41] FatElephant: has joined #ruby
[22:24:19] orbyt_: has joined #ruby
[22:25:48] Dbugger: has joined #ruby
[22:25:53] cschneid: has joined #ruby
[22:28:57] FatElephant: has joined #ruby
[22:34:09] Scient: has joined #ruby
[22:36:16] postmodern: has joined #ruby
[22:36:37] dante: has joined #ruby
[22:36:50] hightower3: has joined #ruby
[22:38:14] jrafanie: has joined #ruby
[22:43:34] Swyper: has joined #ruby
[22:46:12] dante: has joined #ruby
[22:55:50] hightower3: has joined #ruby
[22:56:16] hightower3: has joined #ruby
[22:59:11] dante: has joined #ruby
[23:00:49] orbyt_: has joined #ruby
[23:00:59] ruby[bot]: has joined #ruby
[23:01:05] ChanServ: +o ruby[bot]
[23:04:29] Renich: has joined #ruby
[23:12:23] laaron: has joined #ruby
[23:24:15] orbyt_: has joined #ruby
[23:33:39] laaron: has joined #ruby
[23:51:35] i1nfusion: has joined #ruby
[23:54:12] dar123: has joined #ruby
[23:55:37] s3nd1v0g1us: has joined #ruby