« Back to channel list

#ruby - 18 May 2018

« Back 1 day Forward 1 day »
[00:00:03] n0m4d1c: has joined #ruby
[00:01:07] fullstack_: has joined #ruby
[00:06:06] nowhere_man: has joined #ruby
[00:07:31] n0m4d1c: has joined #ruby
[00:10:17] amar: has joined #ruby
[00:19:02] tolerablyjake: has joined #ruby
[00:20:51] al2o3-cr: has joined #ruby
[00:23:33] claw: has joined #ruby
[00:32:31] tdy: has joined #ruby
[00:34:02] caleBOT: has joined #ruby
[00:34:05] caleBOT_: has joined #ruby
[00:40:02] cagomez: has joined #ruby
[00:43:05] noobineer: has joined #ruby
[00:44:00] dc1: has joined #ruby
[00:44:15] Jameser: has joined #ruby
[00:46:28] cagomez: has joined #ruby
[00:46:57] claw: has joined #ruby
[00:47:05] ciscam: has joined #ruby
[00:47:38] bga57: has joined #ruby
[00:49:17] shinnya: has joined #ruby
[01:00:10] fyrril: has joined #ruby
[01:01:00] amar: has joined #ruby
[01:01:28] white_lilies: has joined #ruby
[01:04:37] elphe: has joined #ruby
[01:07:08] dc1: has joined #ruby
[01:09:45] hays: https://ruby-doc.org/stdlib-2.5.1/libdoc/securerandom/rdoc/Random/Formatter.html
[01:09:56] hays: random_number doesn't seem to be documented
[01:10:10] noobineer: has joined #ruby
[01:10:12] hays: SecureRandom.random_number(10)
[01:12:40] minimalism: has joined #ruby
[01:12:47] dviola: has joined #ruby
[01:14:50] Radar: patches welcome
[01:16:05] Radar: I guess you'd use that over rand because it's more... secure?
[01:18:17] hays: its really weird. I don't actually see it in the source code
[01:18:34] hays: but there is a test for it
[01:18:40] Radar: Seems like it comes from Random::Formatter
[01:18:54] Radar: >> require 'securerandom'; SecureRandom.method(:random_number).owner
[01:18:55] ruby[bot]: Radar: # => Random::Formatter (https://eval.in/1006208)
[01:20:12] alfiemax: has joined #ruby
[01:23:45] orbyt_: has joined #ruby
[01:24:05] hays: yeah, can't figure out how that works
[01:24:11] hays: there's a random.c
[01:24:37] Radar: I'm pulling down the latest Ruby source but my internet is... well, I'm in AU. Kangaroos are delivering my packets.
[01:26:00] hays: heh, yeah im using git web interface
[01:26:08] hays: might save you some bandwidth
[01:26:17] Radar: line 1392 in random.c is where I think it comes from.
[01:27:17] hays: i see SecureRandom.extend(Random::Formatter)
[01:27:23] Radar: and then at the bottom of lib/SecureRandom.rb ... yeah, that
[01:27:37] Radar: So I guess that's why you don't see it documented inside `SecureRandom`.
[01:28:41] hays: so... it seems like its not using the secure prng
[01:29:59] caleBOT_: has joined #ruby
[01:29:59] caleBOT: has joined #ruby
[01:30:18] dinfuehr: has joined #ruby
[01:31:00] hays: do you know how Random::Formatter ends up tying to that function in random.c?
[01:31:34] Radar: hays: random.c, line 1672-1677
[01:31:39] GodFather: has joined #ruby
[01:34:12] arashb: has joined #ruby
[01:38:55] hays: yeah, i see it. still not sure if I can figure out whether that means the bindings inherit from securerandom
[01:39:55] hays: rand_random_number calls rand_random
[01:41:05] hays: so I think that means it bypasses anything in SecureRandom and goes straight to the underlying implementation of the random.c prng
[01:41:56] hays: reluctant to file a bug about it because i might be full of ___ :)
[01:44:58] hays: eek, I think .alphanumeric may also be insecure if this is the case
[01:45:22] hays: it uses random_number
[01:46:59] dc1: has joined #ruby
[01:47:36] nowhere_man: has joined #ruby
[01:49:08] baweaver: Notes from todays meeting - https://docs.google.com/document/d/e/2PACX-1vR2LdBE87iEcEsVuUUr0G2L6LxSPeGMg_0oeHeh0HYmX36iIa9zkWYlFHilH5D4I_RBJpQnr09yOZaE/pub
[01:49:19] baweaver: Looks like the tetris op got some serious love
[01:49:41] baweaver: JSON.:parse == JSON.method(:parse)
[01:50:13] baweaver: and composition seems to have gotten traction
[01:52:38] _antares_: has joined #ruby
[01:55:28] hays: I might use this instead (SecureRandom.bytes(1).ord/256.0*i).to_i
[01:57:42] jenrzzz: has joined #ruby
[01:57:42] jenrzzz: has joined #ruby
[02:02:12] _antares_: has joined #ruby
[02:09:22] leah2: has joined #ruby
[02:10:20] kmurphy4_: has joined #ruby
[02:12:39] orbyt_: has joined #ruby
[02:13:35] karapetyan: has joined #ruby
[02:13:54] herbmillerjr: has joined #ruby
[02:16:50] caleBOT_: has joined #ruby
[02:16:51] caleBOT__: has joined #ruby
[02:18:37] n0m4d1c_: has joined #ruby
[02:20:49] caleBOT__: has joined #ruby
[02:20:49] caleBOT_: has joined #ruby
[02:28:06] hays: huh. i was thinking ruby-build would download the source tree
[02:29:03] hays: but I don't see the .c files
[02:41:49] hays: heh, this is fun. figuring out how to patch ruby source code :)
[02:42:05] hays: git is so cool
[02:46:49] alfiemax: has joined #ruby
[02:47:18] hays: well damn. just proved that yes SecureRandom.alphanumeric does not use a secure RNG
[02:56:47] duderonomy: has joined #ruby
[02:58:05] govg: has joined #ruby
[03:00:11] cadillac_: has joined #ruby
[03:00:20] hays: bug filed: https://bugs.ruby-lang.org/issues/14773
[03:00:34] hays: hopefully i have deduced correctly
[03:02:13] _antares_: has joined #ruby
[03:04:12] yxhuvud: has joined #ruby
[03:04:57] darkhanb: has joined #ruby
[03:05:05] _antares_: has joined #ruby
[03:05:27] caleBOT: has joined #ruby
[03:05:28] caleBOT_: has joined #ruby
[03:05:56] mtkd: has joined #ruby
[03:06:02] alex``: has joined #ruby
[03:06:34] arashb: has joined #ruby
[03:07:55] n0m4d1c: has joined #ruby
[03:12:28] pabs: has joined #ruby
[03:16:41] karapetyan: has joined #ruby
[03:18:24] caleBOT_: has joined #ruby
[03:18:24] caleBOT: has joined #ruby
[03:18:33] karapetyan: has joined #ruby
[03:18:55] caleBOT__: has joined #ruby
[03:18:56] caleBOT__: has joined #ruby
[03:19:47] bmurt: has joined #ruby
[03:23:52] dc1: has joined #ruby
[03:25:10] claw: has joined #ruby
[03:34:25] karapetyan: has joined #ruby
[03:35:09] karapetyan: has joined #ruby
[03:35:16] arashb: has joined #ruby
[03:44:31] arashb: has joined #ruby
[03:47:21] caleBOT__: has joined #ruby
[03:47:21] caleBOT_: has joined #ruby
[03:52:50] _antares_: has joined #ruby
[03:53:41] AJA4350: has joined #ruby
[03:54:41] alfiemax: has joined #ruby
[03:55:01] gix: has joined #ruby
[04:02:27] dinfuehr: has joined #ruby
[04:17:41] dinfuehr: has joined #ruby
[04:20:56] nicesignal: has joined #ruby
[04:25:22] caleBOT_: has joined #ruby
[04:25:22] caleBOT: has joined #ruby
[04:50:23] memo1: has joined #ruby
[04:52:28] guacamole: has joined #ruby
[04:53:59] sidx64: has joined #ruby
[05:01:17] sidx64: has joined #ruby
[05:01:37] jsrtr: has joined #ruby
[05:02:41] amar: has joined #ruby
[05:06:10] haraoka: has joined #ruby
[05:06:29] eckhardt: has joined #ruby
[05:09:09] venmx: has joined #ruby
[05:11:13] sidx64: has joined #ruby
[05:12:33] caleBOT_: has joined #ruby
[05:12:33] caleBOT: has joined #ruby
[05:12:37] elphe: has joined #ruby
[05:13:58] sidx64: has joined #ruby
[05:16:58] yosafbridge: has joined #ruby
[05:18:32] anisha: has joined #ruby
[05:18:49] duderonomy: has joined #ruby
[05:21:10] howdoi: has joined #ruby
[05:21:44] apeiros: has joined #ruby
[05:24:12] mohsen_1: has joined #ruby
[05:27:15] Dabo: has joined #ruby
[05:27:22] _antares_: has joined #ruby
[05:28:19] venmx: has joined #ruby
[05:28:32] Dabo: Has anyone installed ruby with tcl/tk support on Ubuntu before? "gem install tk" after installing libtcl-dev and libtk-dev system packages still fails - it can't find tcl.h
[05:29:02] Dabo: I'm trying to install it on a rvm-built ruby version
[05:32:15] Dabo: phew, ok, got it working with tons of --with* options to specify where stuff is
[05:32:37] burgestrand: has joined #ruby
[05:33:26] sauvin: has joined #ruby
[05:36:11] mtkd: has joined #ruby
[05:37:57] _antares_: has joined #ruby
[05:42:52] sidx64: has joined #ruby
[05:49:30] dminuoso: baweaver: That's the price for admitting methods that have no arguments.
[05:50:24] dminuoso: But it's cool they discussed Proc#*
[05:50:49] baweaver: let people enjoy things
[05:51:52] dminuoso: Im just saying that .: is annoying noise, which it shouldn't have been if we lacked either methods without arguments or optional parens.
[05:51:57] dminuoso: But it's fine, Ill get by
[05:52:36] dminuoso: Function composition will still be a real PITA to use in Ruby sadly.
[05:53:16] dminuoso: My experience with rambda heavy JS code and Q heavy Ruby code shows it's super frustrating
[05:53:48] sidx64: has joined #ruby
[05:54:21] amelliaa: has joined #ruby
[05:56:27] aufi: has joined #ruby
[05:56:32] reber: has joined #ruby
[06:00:29] laska: has joined #ruby
[06:02:58] apeiros: has joined #ruby
[06:04:03] dc1: has joined #ruby
[06:14:05] biberu: has joined #ruby
[06:15:23] alfiemax_: has joined #ruby
[06:21:01] jeen: has joined #ruby
[06:22:22] andikr: has joined #ruby
[06:24:06] conta: has joined #ruby
[06:25:58] schneider: has joined #ruby
[06:31:50] robertothais: has joined #ruby
[06:33:55] dionysus69: has joined #ruby
[06:35:07] pskosinski: has joined #ruby
[06:35:52] ramfjord: has joined #ruby
[06:36:13] elphe: has joined #ruby
[06:36:28] karapetyan: has joined #ruby
[06:38:22] Ryzokuken: has joined #ruby
[06:39:30] sidx64: has joined #ruby
[06:40:38] tvw: has joined #ruby
[06:41:59] sidx64_: has joined #ruby
[06:43:44] DoubleMalt: has joined #ruby
[06:45:09] Ropeney: has joined #ruby
[06:45:27] duderono_: has joined #ruby
[06:47:11] sidx64: has joined #ruby
[06:47:41] burgestrand: has joined #ruby
[06:55:16] nicesignal: has joined #ruby
[06:59:55] schneider: has joined #ruby
[07:00:31] KeyJoo: has joined #ruby
[07:01:52] ciscam: has joined #ruby
[07:04:00] schleppel: has joined #ruby
[07:05:42] conta: has joined #ruby
[07:10:09] bambanx: has joined #ruby
[07:10:17] n0m4d1c_: has joined #ruby
[07:10:23] sysvalve: has joined #ruby
[07:11:08] sidx64: has joined #ruby
[07:11:27] chocoelho1: has joined #ruby
[07:13:42] elphe: has joined #ruby
[07:16:17] sidx64_: has joined #ruby
[07:17:08] za1b1tsu: has joined #ruby
[07:17:22] venmx: has joined #ruby
[07:18:29] TomyWork: has joined #ruby
[07:25:10] sidx64: has joined #ruby
[07:26:02] elphe: has joined #ruby
[07:26:05] _antares_: has joined #ruby
[07:27:49] elphe: has joined #ruby
[07:28:00] sidx64: has joined #ruby
[07:30:38] alfiemax: has joined #ruby
[07:32:48] elphe: has joined #ruby
[07:33:58] suukim: has joined #ruby
[07:33:59] clemens3: has joined #ruby
[07:38:14] paul0: has joined #ruby
[07:39:03] yohji: has joined #ruby
[07:41:21] elphe: has joined #ruby
[07:41:48] _antares_: has joined #ruby
[07:46:51] caleBOT: has joined #ruby
[07:46:52] caleBOT_: has joined #ruby
[07:47:16] alfiemax_: has joined #ruby
[07:49:25] marr: has joined #ruby
[07:50:25] sidx64: has joined #ruby
[07:50:34] paul0: Good morning everyone :) Rails screnario: I have a User that can be identified by either an ID or a slug (String). I want to create a post by that user and pass the string into the mass assignment (user_id). Does anyone know of some library that already solved this problem of "polymorphic primary keys"?
[07:50:51] elphe: has joined #ruby
[07:52:30] paul0: Of course I could just "case" over the parameter manually but I think there could be a more general solution. Think https://github.com/norman/friendly_id but for creation.
[07:53:46] Xiti`: has joined #ruby
[07:54:33] mikecmpbll: has joined #ruby
[07:56:46] caleBOT: has joined #ruby
[07:56:47] caleBOT_: has joined #ruby
[08:01:36] Exagone313: has joined #ruby
[08:04:13] venmx: has joined #ruby
[08:06:30] mikecmpbll: has joined #ruby
[08:10:03] Nussi: has joined #ruby
[08:11:29] dminuoso: paul_: Put some {id: ..., slug: ...} hidden behind a smart constructor.
[08:11:36] dminuoso: And then set either `id` or `slug`
[08:11:47] dminuoso: In mass assignment set both. The smart constructor will prevent setting both
[08:12:57] guille-moe: has joined #ruby
[08:13:48] amar: has joined #ruby
[08:14:06] dminuoso: paul_: e.g.: ident = Class.new do; attr_reader :unIdent; def initialize(o); unless [:slug, :id].include? o.keys; @unIdent = { slug: o[:slug], id: o[:id] } end; end
[08:14:33] dminuoso: And then create them: [ident.new id: 1, ident.new slug: "foo"]
[08:15:24] Beams: has joined #ruby
[08:18:09] paul0: dminuoso: That sounds like a good idea thank you. The most general way to do this would to make a class like `ident` and turn it into a general CreationOrUpdate command object that just wraps around the active-record
[08:18:48] paul0: Ident.create_or_update(Post, attributes) #=> Post
[08:19:53] paul0: And with some delegation magic one could Post.friendly_create (if thats more readable)
[08:20:45] dminuoso: paul_: Where do you get that user id or slug from?
[08:21:56] vivsoni: has joined #ruby
[08:22:11] vivsoni: ERROR: While executing gem ... (ArgumentError)
[08:22:11] vivsoni: marshal data too short
[08:22:16] vivsoni: while install gem
[08:30:53] _antares_: has joined #ruby
[08:31:07] amar: has joined #ruby
[08:34:52] burgestrand: has joined #ruby
[08:35:57] ramfjord: has joined #ruby
[08:36:32] _antares_: has joined #ruby
[08:37:51] EnderMB: has joined #ruby
[08:38:06] EnderMB: has left #ruby: ()
[08:41:46] sauvin: has joined #ruby
[08:43:30] sauvin: has joined #ruby
[08:44:58] sauvin: has joined #ruby
[08:45:03] nima_m: has joined #ruby
[08:45:52] paul0: dminuoso: We decided to have these global slugs as identifiers for every resource. So we hide the id (dont ask me why i forgot). The frontend then sends us these slugs back
[08:46:30] sauvin: has joined #ruby
[08:46:49] paul0: And im not interested in making an exception for things that could be sent back
[08:51:27] nima_m: has joined #ruby
[08:53:30] sidx64: has joined #ruby
[08:56:12] nima_m: has joined #ruby
[08:57:17] paul0: vivsoni: which gem were you installing? Or rubygems itself?
[08:57:34] vivsoni: paul_: mechanize
[08:57:50] nickjj_: has joined #ruby
[08:58:59] paul0: vivsoni: http://secret-garden.hatenablog.com/entry/2015/10/01/000000 seems to be the same error, but I can't speak japanese. If anyone here could get an answer from that thread it would be very helpful :)
[08:59:24] mlkkk: has joined #ruby
[08:59:32] vivsoni: paul_: cheking..
[09:00:23] alfiemax: has joined #ruby
[09:01:11] vivsoni: paul_: he deleted ~/.gem/
[09:02:07] paul0: vivsoni: And I guess you didn't do something similar, right?
[09:02:35] vivsoni: paul_: just after reading i did :(
[09:02:44] vivsoni: now reinstalling the ruby
[09:03:21] paul0: vivsoni: Oh that was the solution not the problem. My bad xD I thought he got that error because he accidentally deleted ~/.gem
[09:04:03] vivsoni: now i deleted that "~/.gem"
[09:06:41] sidx64: has joined #ruby
[09:07:52] Beams: has joined #ruby
[09:10:03] n0m4d1c: has joined #ruby
[09:14:17] nowhere_man: has joined #ruby
[09:16:15] nima_m: has joined #ruby
[09:21:00] nima_m: has joined #ruby
[09:22:09] mikecmpb_: has joined #ruby
[09:24:41] Mia: has joined #ruby
[09:28:26] Axy: has joined #ruby
[09:30:56] amar: has joined #ruby
[09:31:13] KeyJoo: has joined #ruby
[09:31:16] nima_m: has joined #ruby
[09:36:01] nima_m: has joined #ruby
[09:38:47] sidx64: has joined #ruby
[09:46:27] nima_m: has joined #ruby
[09:48:56] sidx64: has joined #ruby
[09:51:01] nima_m: has joined #ruby
[10:01:37] nima_m_: has joined #ruby
[10:02:19] NL3limin4t0r: has joined #ruby
[10:05:57] karapetyan: has joined #ruby
[10:07:13] sidx64: has joined #ruby
[10:07:49] Beams: has joined #ruby
[10:08:11] conta: has joined #ruby
[10:08:44] alfiemax: has joined #ruby
[10:09:48] robertothais: has joined #ruby
[10:12:57] elphe: has joined #ruby
[10:16:35] _antares_: has joined #ruby
[10:21:24] nima_m_: has joined #ruby
[10:26:14] nima_m_: has joined #ruby
[10:26:33] laska: has joined #ruby
[10:29:04] XB23: has joined #ruby
[10:29:23] ramfjord: has joined #ruby
[10:30:46] mikecmpbll: has joined #ruby
[10:32:33] dc1: has joined #ruby
[10:33:50] marr: has joined #ruby
[10:35:20] AJA4350: has joined #ruby
[10:36:24] nima_m_: has joined #ruby
[10:42:27] caleBOT: has joined #ruby
[10:42:29] caleBOT_: has joined #ruby
[10:42:58] jamesaxl: has joined #ruby
[10:43:34] vivsoni_: has joined #ruby
[10:43:53] karapetyan: has joined #ruby
[10:46:58] conta: has joined #ruby
[10:49:14] sidx64: has joined #ruby
[10:52:30] ciscam: has joined #ruby
[10:54:35] contradictioned: has joined #ruby
[10:56:15] conta: has joined #ruby
[10:57:09] contradictioned: has joined #ruby
[10:59:14] contradictioned: has joined #ruby
[11:00:44] alfiemax_: has joined #ruby
[11:02:08] mikecmpb_: has joined #ruby
[11:03:45] _antares_: has joined #ruby
[11:04:09] bmurt: has joined #ruby
[11:08:34] contradictioned: has joined #ruby
[11:08:37] cadillac_: has joined #ruby
[11:09:04] RougeR: has joined #ruby
[11:09:04] RougeR: has joined #ruby
[11:11:42] plexigras: has joined #ruby
[11:12:48] mtkd: has joined #ruby
[11:15:19] qnaal: has joined #ruby
[11:19:28] caleBOT: has joined #ruby
[11:19:29] caleBOT_: has joined #ruby
[11:20:04] Beams: has joined #ruby
[11:20:53] vondruch: has joined #ruby
[11:20:57] _antares_: has joined #ruby
[11:21:41] houhoulis: has joined #ruby
[11:24:35] QCF: has joined #ruby
[11:27:57] nowhere_man: has joined #ruby
[11:28:48] anisha_: has joined #ruby
[11:33:29] aufi: has joined #ruby
[11:38:47] z64: is there a convention in ruby for distinguishing if i want to provide blocking/nonblocking options for the same behavior? should i accept a boolean arg or maybe provide `foo` and `foo!`?
[11:39:12] soniya29: has joined #ruby
[11:39:15] soniya29_: has joined #ruby
[11:40:12] za1b1tsu: has joined #ruby
[11:40:31] ldnunes: has joined #ruby
[11:42:05] Cavallari: has joined #ruby
[11:44:26] dc1: has joined #ruby
[11:46:16] dminuoso: z64: make them different methods
[11:46:26] dminuoso: z64: the interface and usage is way too different.
[11:50:05] z64: yeah for sure. do you think `foo!` ("bang for blocking") is too implicit? maybe `foo_sync`..
[11:51:18] RougeT430: has joined #ruby
[11:52:04] anisha: has joined #ruby
[11:53:17] rouget430__: has joined #ruby
[11:53:24] burgestrand: has joined #ruby
[11:54:22] synthroid: has joined #ruby
[12:01:32] jcalla: has joined #ruby
[12:01:35] nfsnobody: has joined #ruby
[12:05:46] vondruch: has joined #ruby
[12:10:31] vondruch: has joined #ruby
[12:13:19] chocoelho: has joined #ruby
[12:18:30] Zaab1t: has joined #ruby
[12:18:56] RougeR: has joined #ruby
[12:22:02] Beams: has joined #ruby
[12:26:02] nit3rid3: has joined #ruby
[12:27:45] roamingdog: has joined #ruby
[12:30:08] _antares_: has joined #ruby
[12:30:50] sidx64: has joined #ruby
[12:32:03] amar: has joined #ruby
[12:32:09] vondruch: has joined #ruby
[12:35:23] laska: has joined #ruby
[12:35:31] shinnya: has joined #ruby
[12:36:16] alfiemax: has joined #ruby
[12:38:46] synthroid: has joined #ruby
[12:41:06] _antares_: has joined #ruby
[12:41:37] cagomez: has joined #ruby
[12:43:26] oleo: has joined #ruby
[12:43:43] Cavallari1: has joined #ruby
[12:43:59] contradictioned: has joined #ruby
[12:53:15] amar: has joined #ruby
[12:58:23] Beams: has joined #ruby
[12:58:34] alex``: has joined #ruby
[13:01:30] k0mpa: has joined #ruby
[13:02:54] elphe: has joined #ruby
[13:03:45] alfiemax: has joined #ruby
[13:08:17] _antares_: has joined #ruby
[13:10:17] Beams: has joined #ruby
[13:17:29] reber__: has joined #ruby
[13:17:51] mtkd: has joined #ruby
[13:19:25] GodFather: has joined #ruby
[13:19:27] conta: has joined #ruby
[13:22:09] mtkd: has joined #ruby
[13:23:36] anjen: has joined #ruby
[13:24:15] Silthias: has joined #ruby
[13:25:30] vondruch: has joined #ruby
[13:28:02] Beams: has joined #ruby
[13:29:50] rippa: has joined #ruby
[13:36:19] govg: has joined #ruby
[13:39:10] Mike11: has joined #ruby
[13:50:28] karapetyan: has joined #ruby
[13:56:47] caleBOT__: has joined #ruby
[13:56:48] caleBOT_: has joined #ruby
[13:57:12] dc1: has joined #ruby
[13:59:13] joro_: has joined #ruby
[14:00:55] mtkd: has joined #ruby
[14:03:03] feal: has joined #ruby
[14:03:23] marr: has joined #ruby
[14:04:55] CrazyEddy: has joined #ruby
[14:07:27] Mike11: has joined #ruby
[14:07:55] gnufied: has joined #ruby
[14:09:02] Asher: has joined #ruby
[14:10:49] Rapture: has joined #ruby
[14:12:01] Mike11: has joined #ruby
[14:13:17] dc1: has joined #ruby
[14:13:20] kmurphy4_: has joined #ruby
[14:17:05] Mike11: has joined #ruby
[14:18:59] coderphive: has joined #ruby
[14:22:03] pastorinni: has joined #ruby
[14:23:12] kmurphy4: has joined #ruby
[14:24:45] _antares_: has joined #ruby
[14:32:11] Beams: has joined #ruby
[14:32:21] amar: has joined #ruby
[14:33:25] dc1: has joined #ruby
[14:34:51] memo1: has joined #ruby
[14:37:58] jamiejackson: has joined #ruby
[14:38:02] grilix_: has joined #ruby
[14:38:11] ramfjord: has joined #ruby
[14:39:54] gil_: has joined #ruby
[14:40:06] gil_: has joined #ruby
[14:40:11] ciscam: has joined #ruby
[14:40:47] burgestrand: has joined #ruby
[14:42:39] chouhoulis: has joined #ruby
[14:48:05] chmurifree: has joined #ruby
[14:48:15] Defenestrate: has joined #ruby
[14:48:16] Defenestrate: has joined #ruby
[14:49:50] jrich523: has joined #ruby
[14:49:53] millerti: has joined #ruby
[14:50:28] jrich523: hey guys, are there any good getting started guides for programmers? most of the tutorials and such i have found are painfully slow if you know other langs
[14:51:05] dminuoso: jrich523: What other languages do you know?
[14:51:11] dminuoso: And how would you qualify your experience with them?
[14:52:29] jrich523: hmm well, lets just say i have a solid understanding of OOP, I'm "expert" level with Powershell (not of much use here) and have worked with python (decent) C# (core language wise solid).. javascript/node is great until you get in to trying to sort through what frameworks to use.. basically i've been programming on and off for like 20 years
[14:53:33] dminuoso: jrich523: Eloquent Ruby might be to your liking.
[14:53:42] jrich523: awesome, thank you :)
[14:56:38] AJA4350: has joined #ruby
[14:57:21] guille-moe1: has joined #ruby
[15:01:37] Mia: has joined #ruby
[15:01:37] Mia: has joined #ruby
[15:03:25] mlkkk: has joined #ruby
[15:06:08] cschneid_: has joined #ruby
[15:07:22] troulouliou_div2: has joined #ruby
[15:08:47] argoneus: has joined #ruby
[15:09:10] chouhoulis: has joined #ruby
[15:09:26] nowhere_man: has joined #ruby
[15:11:54] amar: has joined #ruby
[15:12:12] amar: has joined #ruby
[15:12:16] regedit: has joined #ruby
[15:17:47] amar: has joined #ruby
[15:18:36] ramfjord: has joined #ruby
[15:19:07] orbyt_: has joined #ruby
[15:19:35] Ericx2x: has joined #ruby
[15:19:58] Ericx2x: I have a rails project I'm trying to move from one server to another. What's the best/easiest way to copy over the DB?
[15:20:34] Ericx2x: I pulled the project via github. I'm wondering if github had my db data on there and I can recreate my db with some kind of rake command or something?
[15:20:48] Ericx2x: Or do I need to export the DB with pgsql and import it onto the new server?
[15:20:49] cagomez: has joined #ruby
[15:21:26] GodFather: has joined #ruby
[15:24:15] kapil___: has joined #ruby
[15:24:43] kevinburke: has joined #ruby
[15:29:45] synthroid: has joined #ruby
[15:30:58] tolerablyjake: has joined #ruby
[15:31:40] apeiros: has joined #ruby
[15:32:11] modin: has joined #ruby
[15:35:09] kapil___: has joined #ruby
[15:37:01] z64: yes, you need to export/transer/import. you apps (at least non-static) data should not be on github
[15:37:46] z64: *transfer
[15:38:32] cagomez: has joined #ruby
[15:43:27] amar: has joined #ruby
[15:45:35] modin: has joined #ruby
[15:48:39] jcarl43: has joined #ruby
[15:49:31] guacamole: has joined #ruby
[15:51:19] Asher: has joined #ruby
[15:52:12] duderonomy: has joined #ruby
[15:54:04] cyberg: has joined #ruby
[15:54:05] nima_m: has joined #ruby
[15:54:45] cagomez: if I get `comparison of NilClass with String failed` with `foo.sort != bar.sort`, does this mean that `foo` is nil? or is `bar` nil?
[15:55:24] RougeT430: has joined #ruby
[15:55:30] ramfjord: has joined #ruby
[15:56:42] apeiros: no, it means one of the values in either foo or bar is nil
[15:56:59] apeiros: since something responding to .sort obviously is not a string.
[15:57:23] rouget430__: has joined #ruby
[15:57:52] cagomez: ah I see, so would the solution be to `.compact` both arrays before comparing?
[15:58:19] apeiros: the solution would be to figure out why you have nils in your collections to begin with
[15:58:46] apeiros: and since you obviously don't expect them there, figure out how to avoid them making it into your collections.
[15:59:08] apeiros: but of course, you can always hack your way around and slap a .compact on to it
[15:59:20] cagomez: ok nice, thank you
[16:05:38] mtkd: has joined #ruby
[16:07:19] cthulchu: has joined #ruby
[16:08:33] sanscoeur: has joined #ruby
[16:08:37] caleBOT: has joined #ruby
[16:08:38] caleBOT__: has joined #ruby
[16:09:55] dc1: has joined #ruby
[16:13:34] _antares_: has joined #ruby
[16:14:22] darkhanb: has joined #ruby
[16:16:07] amar_: has joined #ruby
[16:18:00] physicist__: has joined #ruby
[16:20:02] idontknowanythin: has joined #ruby
[16:21:17] idontknowanythin: hi there i have an issue
[16:21:19] idontknowanythin: https://pastebin.com/mSWZS6tB
[16:21:20] ruby[bot]: idontknowanythin: 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
[16:22:04] idontknowanythin: whats a pastebin alternative
[16:23:42] caleBOT_: has joined #ruby
[16:23:43] caleBOT__: has joined #ruby
[16:24:07] idontknowanythin: hi this ruby script is giving me this error
[16:24:07] idontknowanythin: https://gist.github.com/mikesavtechnology/5330bb0f0129d5b29a9b482311036b8c
[16:24:33] idontknowanythin: error: https://gist.github.com/mikesavtechnology/1f65376ee2051b5ed33f02291b8d855c
[16:26:18] dionysus69: has joined #ruby
[16:27:13] Raboo: has joined #ruby
[16:27:19] orbyt_: has joined #ruby
[16:28:06] z64: idontknowanythin: https://stackoverflow.com/questions/8390256/a-json-text-must-at-least-contain-two-octets
[16:29:14] idontknowanythin: i know you googled that and gave the first link lol
[16:29:50] z64: and? it explains exactly what the error means
[16:30:31] z64: it means this line: `JSON.parse(`sudo /usr/local/openvpn_as/scripts/sacli VPNSummary`)`, JSON.parse is being passed an empty string
[16:30:44] idontknowanythin: whys it an empty string
[16:31:29] idontknowanythin: i have zero programming knowledge
[16:31:40] idontknowanythin: this is just a plugin im using for solarwinds pingdom server monitor
[16:32:01] z64: i have no idea what it is, so i can't tell you why its returning an empty string
[16:33:05] idontknowanythin: i think its supposed to check a directory for openvpn licenses
[16:42:43] havenwood: idontknowanythin: See what this command does?: sudo /usr/local/openvpn_as/scripts/sacli VPNSummary
[16:43:15] havenwood: idontknowanythin: The Ruby part is working as intended. Is sacli written in Ruby? Look at it.
[16:43:40] havenwood: idontknowanythin: Look at: /usr/local/openvpn_as/scripts/sacli
[16:44:10] havenwood: idontknowanythin: file /usr/local/openvpn_as/scripts/sacli
[16:44:19] havenwood: idontknowanythin: /usr/local/openvpn_as/scripts/sacli --help
[16:46:46] idontknowanythin: ill post the sacli
[16:46:54] havenwood: idontknowanythin: First, check: head -n1 /usr/local/openvpn_as/scripts/sacli | grep -q ruby && echo "Ask in #ruby." || echo "Offtopic for #ruby."
[16:47:38] idontknowanythin: https://gist.github.com/mikesavtechnology/4e406918a8fab6fcaff943eb582425ea
[16:47:54] havenwood: So it's a bash script that runs a python script.
[16:48:51] jrich523: lol @ havenwood
[16:50:25] dc1: has joined #ruby
[16:50:27] havenwood: idontknowanythin: The first line, `#!/usr/bin/env bash`, is informally called a "shebang." You can allow a file to be executed with `chmod +x FILENAME`, then point the shebang at what executable should be used to execute the file.
[16:51:55] havenwood: idontknowanythin: The `/usr/bin/env` command is idiomatic to use in a shebang. It'll find the right executable for you so you don't have to hardcode the path. See: man 2 execve
[16:52:12] idontknowanythin: thanks ill take a look
[16:52:17] conta: has joined #ruby
[16:52:20] havenwood: idontknowanythin: So this line is saying, run this file with bash: https://gist.github.com/mikesavtechnology/4e406918a8fab6fcaff943eb582425ea#file-gistfile1-txt-L1
[16:53:52] havenwood: idontknowanythin: The square braces in bash are an alias to the `test` utility. See: man test
[16:53:55] havenwood: idontknowanythin: https://gist.github.com/mikesavtechnology/4e406918a8fab6fcaff943eb582425ea#file-gistfile1-txt-L2
[16:54:07] havenwood: idontknowanythin: The -z flag checks if the variable string length is zero.
[16:54:09] _antares_: has joined #ruby
[16:54:19] havenwood: idontknowanythin: This is bash. So you can ask about it in #bash.
[16:54:40] havenwood: idontknowanythin: They then export some variables, so those env vars can be seen by the python script.
[16:55:17] idontknowanythin: so whys json no problem
[16:55:22] idontknowanythin: its really strange it works on one server
[16:55:25] havenwood: idontknowanythin: And then the final line, a python script is invoked with the -c flag, so the argument is the script being run.
[16:55:46] havenwood: idontknowanythin: Does one have OPENVPN_AS_NOEXPORT exported and the other doesn't?
[16:55:55] havenwood: idontknowanythin: printenv OPENVPN_AS_NOEXPORT"
[16:57:09] nitric: has joined #ruby
[16:57:29] amar: has joined #ruby
[16:58:31] mohsen_1: has joined #ruby
[17:00:23] cek: has joined #ruby
[17:03:10] alfiemax: has joined #ruby
[17:06:54] ruby[bot]: -b *!*@gateway/web/freenode/ip.88.97.101.79$#ruby-banned
[17:11:14] mtkd: has joined #ruby
[17:18:59] cek: has left #ruby: ()
[17:19:30] apeiros: has joined #ruby
[17:20:31] shinnya: has joined #ruby
[17:30:14] mlkkk: has joined #ruby
[17:31:00] ramfjord: has joined #ruby
[17:31:31] vivsoni__: has joined #ruby
[17:38:55] grilix: has joined #ruby
[17:39:20] AgentVenom: has joined #ruby
[17:41:40] venmx: has joined #ruby
[17:42:06] mtkd: has joined #ruby
[17:46:07] nickjj: has joined #ruby
[17:49:31] bogdan: has joined #ruby
[17:50:02] weird_error: has joined #ruby
[17:51:06] coderphive: has joined #ruby
[17:52:17] nitric_: has joined #ruby
[17:52:51] nebben: has joined #ruby
[17:52:58] chris349: has joined #ruby
[17:58:41] caleBOT_: has joined #ruby
[17:58:41] caleBOT: has joined #ruby
[17:59:09] ramfjord: has joined #ruby
[17:59:48] apeiros: has joined #ruby
[18:00:14] dc1: has joined #ruby
[18:01:03] soniya29_: has joined #ruby
[18:01:06] soniya29: has joined #ruby
[18:01:58] reber__: has joined #ruby
[18:02:26] guacamole: has joined #ruby
[18:02:27] guacamole: has joined #ruby
[18:10:13] roshanavand: has joined #ruby
[18:11:59] nima_m: has joined #ruby
[18:12:45] idontknowanythin: https://gist.github.com/mikesavtechnology/5330bb0f0129d5b29a9b482311036b8c [09:24] error: https://gist.github.com/mikesavtechnology/1f65376ee2051b5ed33f02291b8d855c
[18:12:47] idontknowanythin: still need halp pls
[18:13:38] Eiam: what is this code...
[18:14:00] Eiam: why are you calling json.parse on a backtickd command?
[18:15:10] Eiam: you have no failure cases managed at all
[18:15:59] idontknowanythin: this code is a ruby script used on solarwinds pingdom to monitor openvpn licenses
[18:16:04] Eiam: idontknowanythin: wrap your execs in a simple struct to handle failure and pass success onto future objects
[18:16:12] nima_m: has joined #ruby
[18:16:17] idontknowanythin: sorry i dont know any programming at all
[18:16:32] Eiam: directly accessing the supposed result back in line 4
[18:16:44] Eiam: yeah, yikes
[18:16:58] halt-: has joined #ruby
[18:17:34] Dbugger: has joined #ruby
[18:17:58] Eiam: idontknowanythin: you are getting that error because your line 3 isn't getting what it expects.
[18:18:16] grilix: has joined #ruby
[18:18:16] Eiam: even if it was, line 4, line 8 can also blow up
[18:18:26] Eiam: probably line 9 as well
[18:18:52] Eiam: idontknowanythin: whats sudo /usr/local/openvpn_as/scripts/sacli VPNSummary output
[18:19:57] Eiam: lol, i hope it doesn't output a bash script
[18:20:03] Eiam: when you run it, what is the result
[18:20:41] idontknowanythin: https://gist.github.com/mikesavtechnology/9a6ea831ac9259da0cebd8c0de4a7abe
[18:21:02] Eiam: no no, RUN it
[18:21:11] Eiam: "sudo /usr/local/openvpn_as/scripts/sacli VPNSummary"
[18:21:22] ldepandis: has joined #ruby
[18:21:23] nima_m: has joined #ruby
[18:21:37] idontknowanythin: { "n_clients": 16 }
[18:23:46] z64: thats not printing to STDERR is it? `foo` will only capture things flushed to STDOUT
[18:24:53] idontknowanythin: why is it giving a json error
[18:25:15] c0ncealed1: has joined #ruby
[18:25:39] z64: do this: go to your terminal and run "irb", then run your sudo command
[18:25:51] Eiam: its failing because its not getting the right input =)
[18:26:10] Eiam: user_output = `sudo /usr/local/openvpn_as/scripts/sacli VPNSummary`; puts user_output
[18:26:13] nima_m: has joined #ruby
[18:31:26] nima_m: has joined #ruby
[18:31:53] alfiemax: has joined #ruby
[18:32:01] jrafanie: has joined #ruby
[18:32:56] dc1: has joined #ruby
[18:33:57] Lytol: has joined #ruby
[18:34:16] pilne: has joined #ruby
[18:35:04] z64: idontknowanythin: at your terminal, type irb. you should get a prompt. right?
[18:40:22] nowhere_man: has joined #ruby
[18:46:08] nima_m: has joined #ruby
[18:47:42] Xiti: has joined #ruby
[18:48:18] ramfjord: has joined #ruby
[18:51:41] Quentinius: has joined #ruby
[18:51:41] caleBOT_: has joined #ruby
[18:51:41] caleBOT: has joined #ruby
[18:54:56] ciscam: has joined #ruby
[18:56:22] nima_m: has joined #ruby
[18:57:37] samosaphile: has joined #ruby
[18:58:01] bzb: has joined #ruby
[19:00:52] alfiemax: has joined #ruby
[19:08:30] audy: hams will certainly kill him
[19:10:04] n0m4d1c_: has joined #ruby
[19:10:51] conta: has joined #ruby
[19:15:37] za1b1tsu: has joined #ruby
[19:16:15] nima_m: has joined #ruby
[19:17:20] dc1: has joined #ruby
[19:21:33] nima_m_: has joined #ruby
[19:21:48] conta: has joined #ruby
[19:22:14] venmx: has joined #ruby
[19:25:12] sameerynho: has joined #ruby
[19:26:11] caleBOT: has joined #ruby
[19:26:13] caleBOT_: has joined #ruby
[19:27:04] chouhoul_: has joined #ruby
[19:27:41] armyriad: has joined #ruby
[19:27:56] chat_: has joined #ruby
[19:28:33] karapetyan: has joined #ruby
[19:31:44] alfiemax: has joined #ruby
[19:32:22] mohsen_1: has joined #ruby
[19:37:22] _aeris_: has joined #ruby
[19:38:42] elphe: has joined #ruby
[19:39:18] za1b1tsu: has joined #ruby
[19:43:54] venmx: has joined #ruby
[19:44:14] tolerablyjake: has joined #ruby
[19:44:23] nythocrox: has joined #ruby
[19:45:16] Asher: has joined #ruby
[19:46:01] nythocrox: has joined #ruby
[19:48:48] nythocrox: hey ladies and gents! I have a problem in ruby: i need to be able to input a number and it return that line number from a text file. inside a loop do'd script
[19:49:49] idontknowanythin: yea i do get a prompt
[19:50:25] idontknowanythin: https://gist.github.com/mikesavtechnology/4ff9ae8cf5966b8a20790a244a9d73b5
[19:51:01] duderonomy: has joined #ruby
[19:54:34] dc1: has joined #ruby
[19:54:50] SeepingN: has joined #ruby
[19:54:56] Cyrum: has joined #ruby
[19:55:41] joro_: has joined #ruby
[19:56:20] nythocrox: where do i input the filename?
[19:58:21] elphe: has joined #ruby
[19:59:04] caleBOT__: has joined #ruby
[19:59:05] caleBOT_: has joined #ruby
[20:00:44] z64: idontknowanythin: you enter ruby code at that prompt. enter your sudo command in backticks (`) exactly as you had it in your script
[20:02:00] z64: it will show you that its getting an empty string back
[20:02:09] nythocrox: i want it to run from a script as input gets.chomp
[20:03:58] sanscoeur: has joined #ruby
[20:10:06] Cyrum: has joined #ruby
[20:10:41] sidx64: has joined #ruby
[20:10:54] ruby[bot]: -b *!*@unaffiliated/veonik/bot/squishyj$#ruby-banned
[20:11:54] nythocrox: has joined #ruby
[20:14:15] rikkipitt: has joined #ruby
[20:14:16] schleppel: has joined #ruby
[20:16:55] caleBOT: has joined #ruby
[20:16:56] caleBOT__: has joined #ruby
[20:18:05] elphe: has joined #ruby
[20:18:24] ur5us: has joined #ruby
[20:19:44] duderonomy: has joined #ruby
[20:22:16] Sembei: has joined #ruby
[20:22:59] venmx: has joined #ruby
[20:23:06] duderonomy: has joined #ruby
[20:23:49] Scriptonaut: has joined #ruby
[20:23:51] duderonomy: has joined #ruby
[20:24:41] duderonomy: has joined #ruby
[20:24:44] Scriptonaut: hey, I'm wondering which is more conventional, passing a file object or a filename to a method (initializer)
[20:25:02] Scriptonaut: should I open the file then pass the file object as an argument? Or just pass the absolute path? (that's what I'm doing right now)
[20:25:17] Scriptonaut: it will only be opened once during the whole run of the program
[20:25:21] duderonomy: has joined #ruby
[20:26:01] alfiemax: has joined #ruby
[20:26:18] duderonomy: has joined #ruby
[20:26:58] duderonomy: has joined #ruby
[20:27:51] duderonomy: has joined #ruby
[20:28:32] duderonomy: has joined #ruby
[20:29:35] duderonomy: has joined #ruby
[20:29:49] memo1: has joined #ruby
[20:30:16] duderonomy: has joined #ruby
[20:30:18] synthroid: has joined #ruby
[20:31:17] dc1: has joined #ruby
[20:31:50] pastorinni: has joined #ruby
[20:32:12] venmx: has joined #ruby
[20:37:47] elphe: has joined #ruby
[20:42:49] _zach: has left #ruby: ()
[20:47:07] ramfjord: has joined #ruby
[20:47:18] shinnya: has joined #ruby
[20:47:33] elphe: has joined #ruby
[20:55:11] mtkd: has joined #ruby
[20:57:24] alfiemax: has joined #ruby
[20:57:35] memo1: has joined #ruby
[20:59:47] ramfjord: has joined #ruby
[21:00:21] jenrzzz: has joined #ruby
[21:00:28] yokel: has joined #ruby
[21:01:14] minimalism: has joined #ruby
[21:07:18] elphe: has joined #ruby
[21:07:47] oleo: has joined #ruby
[21:08:31] za1b1tsu: has joined #ruby
[21:18:50] idontknowanythin: so when you told me to do irb
[21:18:55] idontknowanythin: what are you trying to get out of that?
[21:20:19] idontknowanythin: can someone just fix this for me ? https://gist.github.com/mikesavtechnology/5330bb0f0129d5b29a9b482311036b8c [09:24] error: https://gist.github.com/mikesavtechnology/1f65376ee2051b5ed33f02291b8d855c
[21:20:41] lxsameer: has joined #ruby
[21:21:18] idontknowanythin: im not a dev and im not able to learn anything related to languages. even if you try to teach me all these things i dont understand it
[21:21:44] idontknowanythin: i didnt write this script im just troubleshooting this on a linux box
[21:23:04] mlkkk: has joined #ruby
[21:25:18] memo1: has joined #ruby
[21:26:18] za1b1tsu: has joined #ruby
[21:26:51] jrafanie: has joined #ruby
[21:27:02] elphe: has joined #ruby
[21:29:55] Inside: has joined #ruby
[21:30:22] apeiros: has joined #ruby
[21:30:40] Inside: Hi guys. I'm trying to install sciruby, but uhhh it needs libzmq3-dev libczmq-dev
[21:30:46] Inside: wait. this is a centos question
[21:32:15] ramfjord: has joined #ruby
[21:36:54] elphe: has joined #ruby
[21:46:43] kmurphy4_: has joined #ruby
[21:46:43] mikecmpbll: has joined #ruby
[21:46:48] karapetyan: has joined #ruby
[21:47:37] za1b1tsu_: has joined #ruby
[21:50:19] jrich523: i have a question, perhaps a tad strange (new to ruby, forgive me).. Im looking over someones code and in this file (just a class definition) there is a refernce to a variable (i assume?), that looks something like: client.nic.new attr how on earth do i go about figuring out what client is?
[21:55:19] ldepandis: has joined #ruby
[21:56:31] elphe: has joined #ruby
[21:56:43] robertothais: has joined #ruby
[22:00:16] ruby[bot]: has joined #ruby
[22:00:16] ChanServ: +o ruby[bot]
[22:02:43] Zarthus: we're not really a channel to spoonfeed answers right into your mouth.
[22:02:57] chouhoulis: has joined #ruby
[22:03:07] Zarthus: if you don't want to learn and just answers, you should hire a guy to do it for you.
[22:03:12] jrich523: i thought someone walked you through like 90% of it
[22:03:16] n0m4d1c: has joined #ruby
[22:03:19] jrich523: and you needed to check the bash/python script?
[22:03:32] idontknowanythin: the script is fine
[22:04:43] jrich523: JSON::ParserError: A JSON text must at least contain two octets!
[22:04:52] havenwood: jrich523: I'd say check `client.class` and `client.method(:nic).source_location` for starters.
[22:04:52] jrich523: im pretty sure its telling you the same thing from before
[22:04:58] jrich523: you dont have the data you think you have
[22:05:50] jrich523: thanks havenwood
[22:06:25] elphe: has joined #ruby
[22:07:14] havenwood: idontknowanythin: If you had a Ruby question we could answer it for you. As several folk have told you, you're shelling out and the data the bash/python script is returning can't be parsed as JSON because it's an empty string.
[22:07:46] idontknowanythin: sorry i dont know wtf an empty string means
[22:08:10] Paraxial: has joined #ruby
[22:08:17] jrich523: if i asked what your name was
[22:08:22] jrich523: and you just looked at me blankly
[22:08:27] havenwood: idontknowanythin: https://ruby-doc.org/core/String.html
[22:08:43] idontknowanythin: so empty aprostrophes
[22:08:46] havenwood: idontknowanythin: An empty string literal is: ""
[22:08:48] idontknowanythin: well if i remove it
[22:08:55] jrich523: well you're missing the point
[22:09:10] havenwood: idontknowanythin: You should hire someone to help you code if you don't want to learn to code.
[22:09:20] havenwood: idontknowanythin: This channel is for Ruby questions or people learning Ruby.
[22:09:35] eckhardt: has joined #ruby
[22:09:52] ramfjord: has joined #ruby
[22:10:27] havenwood: idontknowanythin: You could try the #python or #bash channels, since the part going wrong is the bash/python script return value.
[22:10:41] tobiasvl: or #learnprogramming even
[22:11:09] idontknowanythin: do u remember which line is the empty string
[22:11:15] idontknowanythin: https://gist.github.com/mikesavtechnology/5330bb0f0129d5b29a9b482311036b8c
[22:11:16] jrich523: hell, run the bash/python script and take the output and paste it here, https://jsonlint.com/
[22:11:39] havenwood: !kick idontknowanythin "Come back if you decide you want to learn Ruby!"
[22:11:39] ruby[bot]: +bb idontknowanythin!*@*$#ruby-banned *!*@gateway/web/freenode/ip.207.6.7.70$#ruby-banned
[22:11:39] ruby[bot]: ruby[bot] kicked idontknowanythin: back if you decide you want to learn Ruby!"
[22:13:10] ruby[bot]: -bb idontknowanythin!*@*$#ruby-banned *!*@gateway/web/freenode/ip.207.6.7.70$#ruby-banned
[22:15:40] jamesaxl: has joined #ruby
[22:16:13] elphe: has joined #ruby
[22:18:08] cthulchu_: has joined #ruby
[22:18:40] SCHAAP137: has joined #ruby
[22:20:17] tAn: has joined #ruby
[22:21:59] apeiros: has joined #ruby
[22:26:06] elphe: has joined #ruby
[22:26:39] white_lilies: has joined #ruby
[22:27:40] Ryzokuken: has joined #ruby
[22:27:47] alfiemax: has joined #ruby
[22:28:48] sytherax: has joined #ruby
[22:29:09] sytherax: i am wondering if rails if still worth learning?
[22:29:28] sytherax: I wonder that my rails knowledge can be forwarded to other server side languages?
[22:29:38] sytherax: in the future if the need arises
[22:29:51] sytherax: I want to develop a product, so need to prototype quickly
[22:29:51] ramfjord: has joined #ruby
[22:30:19] apeiros: sytherax: yes, it is. yes, you can. there, did that help you?
[22:31:07] havenwood: sytherax: Yes, learn Rails. Many languages have Rails-clone frameworks. Much of the Rails learning is generalizable.
[22:31:14] sytherax: do you mean that with facepalm/sarcasm, or honestly :P
[22:31:21] havenwood: sytherax: There's a #rubyonrails channel that's specific for Rails, btw.
[22:31:42] apeiros: I mean that honestly.
[22:31:44] havenwood: sytherax: Ruby is a great language. Rails is a framework that's worth learning.
[22:31:58] sytherax: tried #rails was invalid but ty
[22:32:17] havenwood: sytherax: https://freenode.net/kb/answer/registration
[22:32:22] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[22:32:36] Zarthus: keep in mind that asking a question in a rails/ror related channel about "should i do this thing" will almost always be positive. *shrug*
[22:32:41] havenwood: sytherax: If you register your nick, you can talk in #rubyonrails.
[22:32:52] Zarthus: you should do your own research wether or not you think it's beneficial for you to dedicate your time to it.
[22:32:54] havenwood: sytherax: Alternatively you could learn Hanami or Roda. ;-)
[22:33:12] Zarthus: if you're never gonna do webdev and don't aim to be employed as a webdev, it's maybe not worth your time.
[22:33:27] havenwood: sytherax: http://hanamirb.org/
[22:33:28] havenwood: sytherax: https://github.com/jeremyevans/roda
[22:33:30] sytherax: hmm what are those?
[22:33:36] sytherax: alternative to rails?
[22:34:00] jrich523: why do you want to learn it?
[22:34:02] havenwood: sytherax: Yes. Hanami is closer to Rails but is also very nicely done. Roda is closer to Sinatra, but I love it for APIs.
[22:34:21] sytherax: I work as software engineer, but not much on the web side, as it seemed fugly
[22:34:43] havenwood: sytherax: Here's a writeup on Hanami: https://ryanbigg.com/2018/03/my-thoughts-on-hanami
[22:34:57] jrich523: ive been trying to get up to speed with node stuff for like 2 years now
[22:35:19] sytherax: but slowly, I have come to realize, its the only tried and tested method, for cross platform gui/apps,etc
[22:35:40] sytherax: nobody has come up with a better alternative yet.
[22:35:52] sytherax: or failed to get traction i suppose
[22:36:30] jrich523: cross platform... rails?!
[22:36:53] sytherax: no, i mean web dev in general
[22:37:10] jrich523: oh, yeah thats the goal of Node etc and why everyone loves it
[22:37:19] sytherax: i was referring to client side.
[22:37:29] jrich523: thats a horrible hot mess
[22:37:38] nythocrox: has joined #ruby
[22:37:42] sytherax: I don't really like node
[22:37:46] jrich523: and even speaking of rails in that sense
[22:37:56] jrich523: im forced to do some work with Foreman, which is why im working in ruby at all
[22:38:07] sytherax: I think the client side shouldn't be tied to js. Hopefully wasm will solve that
[22:38:19] jrich523: its rails.. but... the front end is react.. so they've got webpack in there as well
[22:38:22] sytherax: Lol, I feel your pain
[22:38:49] jrich523: lol meh, whats being asked of me right now is sort of a tad crazy.. but i'll put my best foot forward lol
[22:38:50] sytherax: doing stuff for others which appears mumbled jumbled.
[22:39:04] sytherax: *hacked to work
[22:39:26] jrich523: i kinda suspect thats how this problem will get "fixed"
[22:39:35] sytherax: you appear to be the guy who gets to fix bug
[22:40:11] jrich523: yeah, im just "that guy", jsut fill in gaps
[22:40:14] sytherax: I am confused if I should start with Hanami, roda or rails
[22:40:15] cschneid_: has joined #ruby
[22:40:17] Inside: Do I need to uninstall nginx and then reinstall everything from scratch or can I Just install the 5.3.1 gem and point nginx to it?
[22:40:22] jrich523: ive got good broad knowledge and an ability to learn... *shrugs*
[22:40:25] Inside: silly irrsi
[22:40:37] sytherax: I am looking for plenty of community support,
[22:41:02] jrich523: honestly, i wouldnt look at rails
[22:41:03] sytherax: Not really looking to make a well designed app from the start
[22:41:13] nythocrox: has joined #ruby
[22:41:15] jrich523: shhh dont tell anyone but i think ruby is a horrible and cryptic lang that needs to die
[22:41:17] sytherax: i want to prototype quickly
[22:41:22] jrich523: but maybe some time here will change my mind :)
[22:41:49] jrich523: what i do like (after dealing with javascript) is real classes... good lord..
[22:43:13] sytherax: jrich523: wat would you choose?
[22:43:27] sytherax: for quick web prototype
[22:43:46] jrich523: well if you just want quick and dirty, node for sure
[22:44:01] sytherax: rails seems really popular, hence I think i can tackle future issues quickly with community support
[22:44:02] jrich523: pick a whole package.. (MEAN for example)
[22:44:05] Cthulu201: has joined #ruby
[22:44:07] Scriptonaut: I actually hated the "class" thing they added to es6
[22:44:15] jrich523: lol cuz its not classes
[22:44:17] Scriptonaut: it's just hiding how javascript actually works, it's not a classical OOP language
[22:44:20] jrich523: its a keyword to wrap up the BS
[22:44:33] Scriptonaut: I like the prototypal inheritance model
[22:44:36] jrich523: i mean it kinda sorta works... but.. not really
[22:44:43] Scriptonaut: a lot of people just can't seem to wrap their head around it so I get why they did it
[22:45:25] jrich523: it just seems like a lot of extra work to do stuff that pretty much every other lang has
[22:45:46] elphe: has joined #ruby
[22:45:50] Scriptonaut: also I'm surprised you think ruby is cryptic, it reads more like english to me than any other language
[22:46:02] Scriptonaut: and it was designed with that in mind
[22:46:03] jrich523: whole lot of symbols
[22:46:25] Scriptonaut: symbols? Like :some_symbol or you mean like random operators?
[22:46:38] jrich523: i do a lot of powershell, and people get mad if i use % or ? for foreach-object and where-object
[22:46:58] jrich523: no generic symbols... but the Symbol is kinda odd too, but i see its value
[22:47:00] sytherax: I don't really hear of MEAN these days as I use too in like 2013-16
[22:47:13] sytherax: its fad seems to have died down?
[22:47:16] jrich523: yeah was just the first one that came to mind, cuz i forgot the REACT one
[22:47:31] jrich523: but to your point, its only good for prototyping
[22:47:36] jrich523: because, well, Mongo blows
[22:47:48] jrich523: mongo is great for prototyping
[22:47:55] sytherax: i am looking to use Couchbase rather.
[22:48:00] jrich523: so from a real use case, those full frameworks are worthless
[22:48:05] sytherax: I feel I need a query language
[22:48:07] karapetyan: has joined #ruby
[22:48:08] jrich523: agreed, my top choice for nosql
[22:48:15] sytherax: so I can leverage N1QL
[22:48:18] Azure|dc: has joined #ruby
[22:48:19] jrich523: i started to really like Graphql
[22:48:35] jrich523: and there is a new version out too that i havent had a chance to look at but sounds neat
[22:49:17] jrich523: but if you're looking to prototype, those full stacks are pretty decent
[22:50:13] jrich523: you just have to accept whatever tool they want you to use... and if you start to google, you'll probably find something better to replace X with.. and then its a horrible rabbit hole..
[22:50:57] jrich523: i guess the advantage of rails would actually be less choices
[22:51:34] Scriptonaut: when I was first using rails I was annoyed how it so heavily relies on convention, but you start to appreciate it over time
[22:51:43] Scriptonaut: like in rails, there *is* a right way to do things
[22:51:45] Scriptonaut: and wrong ways
[22:51:57] Scriptonaut: whereas with other frameworks/languages it's like "does it work? Cool"
[22:52:42] jrich523: the node world is just overloaded with opinionated stuff... which is fine if you're on top of the tech.. but.. for people who want to get started doing full stack... its about impossible
[22:52:50] sytherax: I might also give a shot at python django or flask
[22:52:59] jrich523: flask is pretty neat
[22:53:07] Scriptonaut: I haven't worked in django since like 2011, is it still widely used?
[22:53:12] jrich523: but i'd say that is only good internally (wouldnt trust it at any scale)
[22:53:27] jrich523: its more widely used than it should be i guess is how i feel lol
[22:53:40] Scriptonaut: kinda like PHP
[22:53:42] jrich523: i mean, to be fair, the market is still like 60% php
[22:54:03] jrich523: lol so there is your answer, go learn PHP :D
[22:54:13] Zarthus: 40% of it is probably worpress
[22:54:16] Scriptonaut: I haven't worked in PHP since like 2009 and I have no desire to
[22:54:17] Zarthus: so learn wordpress instead
[22:54:24] Scriptonaut: I always hated PHP
[22:54:30] Scriptonaut: I'm actually mostly sick with webdev
[22:54:36] Scriptonaut: though there is some really cool stuff nowadays
[22:54:56] sytherax: https://news.ycombinator.com/item?id=16551850
[22:55:14] sytherax: this is making me doubt my rails choice and ruby in general
[22:55:27] jrich523: i host like 4 wordpress sites :-/
[22:55:33] elphe: has joined #ruby
[22:55:45] Scriptonaut: in terms of getting a job, rails is still very common
[22:55:54] havenwood: sytherax: Ignore HN.
[22:56:52] apeiros: HN, the 4chan for developers…
[22:57:25] Zarthus: jrich523: you're part of the problem then :P
[22:57:38] jrich523: lol meh, i didnt want to dev something for them
[22:57:41] Zarthus: although you're probably a more competent host than most of the wordpress hosts.
[22:57:42] apeiros: sorry, I meant *hackers*, of course.
[22:57:44] jrich523: it was the fastest way to get a site up and working
[22:58:01] jrich523: and my wife can easily manage the content
[22:58:03] Zarthus: you're not wrong.
[22:58:04] Scriptonaut: when I need to host shit really damn fast I use a ruby oneliner hehe
[22:58:17] jrich523: themes were the issue
[22:58:21] jrich523: i didnt want to style it
[22:58:33] Scriptonaut: ruby -run -e httpd . -p 9090
[22:58:34] jrich523: wordpress has a LOT of options, and with the new layouts, you can make it look less like wordpress
[22:58:44] Zarthus: I think I could probably get my mother to write Markdown
[22:58:53] Zarthus: and get her to use jekyll/Hugo instead
[22:59:41] jrich523: i was screwing with a thor cli-template the other day and it put the detailed help in md files and i was like aww thats super cool
[22:59:41] Inside: has left #ruby: ()
[22:59:44] jrich523: until you go to view it
[23:00:49] jrich523: yeah, i mean, i guess deep down i knew it wasnt going to be as pretty as i hoped... but still a let down
[23:01:25] Zarthus: having played with ruby, I actually really like clap
[23:01:28] Zarthus: er, with rust.
[23:01:51] jrich523: the only reason i leaned towards thor was the cli-template, it had tab complete (not sure it actually works tho)
[23:02:04] Zarthus: https://i.imgur.com/SQRu4eu.png (not markdown, but it sitll looks good)
[23:02:30] jrich523: well this was more so the details of a command, not the flags
[23:03:21] jrich523: the flag stuff (all high level help) looked basically just like that
[23:03:39] Zarthus: i guess i never needed extensive descriptions beyond manpages
[23:04:23] jrich523: cant really say that i do either... it was just there, and i guess i just had unrealistly high expectations.. and i dont know why lol
[23:04:49] Zarthus: i can see in the thor docs it has a long_desc argument, which is nice.
[23:05:03] Zarthus: but i wouldn't see the point in rendering it in markdwn
[23:05:06] cschneid_: has joined #ruby
[23:05:11] jrich523: which, oddly has nothing to do with the MD files (its all mildly weird to me)
[23:05:24] jrich523: https://github.com/tongueroo/cli-template
[23:05:27] elphe: has joined #ruby
[23:05:58] jrich523: mostly i liked that it gave me a decent project structure to get going with.. and it said it had tab complete (im not sure i believe them yet, havent tested)
[23:06:12] sytherax: I am really looking forward to web dev with rust
[23:06:32] Zarthus: sytherax: you already can do it, but it's missing some features
[23:06:45] sytherax: what features?
[23:07:01] havenwood: https://github.com/tildeio/helix
[23:07:11] havenwood: ^ Rust native extensions in Ruby
[23:07:34] alfiemax: has joined #ruby
[23:11:36] Zarthus: sytherax: the biggest problem is probably that all(?) of them require the nightly version of rust, and none of them are stable (>1.0.0). I don't see something super obvious missing at quick glance though, I just remember people complaining :P
[23:13:41] sytherax: what I like about rust is, it seemed to have gather people from pure computer science theorists, web dev, C++ programmers :P
[23:13:54] sytherax: the community.
[23:15:00] sytherax: i like the Option/Result type as oppose to null reference checks. Just avoids a whole heap of headaches.
[23:15:13] elphe: has joined #ruby
[23:15:53] sytherax: I managed to write a unix shell-sh like without ever have to go through a debugger. :D
[23:15:54] sytherax: https://github.com/Swoorup/mysh-rs
[23:15:58] caleBOT: has joined #ruby
[23:15:59] caleBOT_: has joined #ruby
[23:19:58] ramfjord: has joined #ruby
[23:25:06] elphe: has joined #ruby
[23:26:06] ramfjord: has joined #ruby
[23:27:47] noobineer: has joined #ruby
[23:32:05] ramfjord: has joined #ruby
[23:34:56] noobineer: has joined #ruby
[23:35:51] za1b1tsu_: has joined #ruby
[23:36:44] nythocrox: has joined #ruby
[23:40:03] elphe: has joined #ruby
[23:41:58] duderonomy: has joined #ruby
[23:43:13] alfiemax: has joined #ruby
[23:44:25] Scriptonaut: has left #ruby: ()
[23:44:56] Asher: has joined #ruby
[23:45:59] robertothais: has joined #ruby
[23:47:38] mikecmpbll: has joined #ruby
[23:49:50] karapetyan: has joined #ruby
[23:52:10] n0m4d1c: has joined #ruby