« Back to channel list

#ruby - 28 March 2019

« Back 1 day Forward 1 day »
[00:05:50] agent_white: has joined #ruby
[00:10:20] cagomez: has joined #ruby
[00:10:31] ae84: has joined #ruby
[00:27:04] gell5: has joined #ruby
[00:34:23] ae84: Hi! I'm trying to `gem install sassc -v '2.0.1'` but am getting some compilation errors here on OpenBSD regarding `src/cencode.c`: https://gist.github.com/ae84/1d3dcb0384d6aff7d8210c30f2823e9c
[00:34:27] ae84: So now that I've fixed this file, how do I rerun gem install without it overwriting it?
[00:36:07] Renich: has joined #ruby
[00:37:04] Renich: has joined #ruby
[00:38:08] Azure: has joined #ruby
[00:46:30] Swyper: has joined #ruby
[00:55:03] ae84: ACTION now playing: RubyConf 2018 - Running a Government Department on Ruby for over 13 Years by Jeremy Evans -- https://www.youtube.com/watch?v=k7j4p4I1icY
[01:00:41] gell5: has joined #ruby
[01:05:15] bambanx: has joined #ruby
[01:10:31] tdy1: has joined #ruby
[01:26:21] arescorpio: has joined #ruby
[01:31:47] ss9421: has joined #ruby
[01:33:56] ss9421: hello, how do I create regex that would find out if my string beggins with 'cf-' then there is a number and then ends with '-asc' or 'desc'?
[01:33:56] ss9421: For exemple 'cf-420-desc' or 'cf-112-asc'
[01:34:25] ss9421: I want it to return true or false
[01:40:49] gell5: has joined #ruby
[01:47:54] bougyman: string =~ /^cf-[0-9]{3}-(?:a|de)sc$/
[01:50:04] bougyman: [3] pry(main)> %w[cf-123-asc cf-132-desc cf-aaa-asc cf-9-desc].map { |string| !!(string =~ /^cf-[0-9]{3}-(?:a|de)sc$/) }
[01:50:07] bougyman: => [true, true, false, false]
[01:50:38] jidar: what's !! doing here?
[01:50:45] bougyman: turning it into a boolean.
[01:50:47] mangold: has joined #ruby
[01:50:49] bougyman: instead of 0 or nil
[01:50:53] bougyman: just outputs cleaner
[01:51:12] bougyman: he said he wanted true or false
[01:51:18] uplime: whats the differnece between that and .match?
[01:51:38] uplime: just preference?
[01:51:49] bougyman: nothing, with the !!
[01:51:51] bougyman: [4] pry(main)> %w[cf-123-asc cf-132-desc cf-aaa-asc cf-9-desc].map { |string| string.match /^cf-[0-9]{3}-(?:a|de)sc$/ }
[01:51:54] bougyman: => [#<MatchData "cf-123-asc">, #<MatchData "cf-132-desc">, nil, nil]
[01:52:12] bougyman: [5] pry(main)> %w[cf-123-asc cf-132-desc cf-aaa-asc cf-9-desc].map { |string| !!(string.match(/^cf-[0-9]{3}-(?:a|de)sc$/)) }
[01:52:15] bougyman: => [true, true, false, false]
[01:52:17] bougyman: no, =~ will be more efficient.
[01:52:25] bougyman: it doesn't have to create MatchData objects.
[01:52:25] uplime: sorry, i meant String#match?
[02:02:44] hahuang6-: has joined #ruby
[02:08:08] d10n-work: has joined #ruby
[02:13:44] gell5: has joined #ruby
[02:16:51] esrse: has joined #ruby
[02:17:12] hahuang6-: has joined #ruby
[02:19:56] hahuang6-: has joined #ruby
[02:22:04] grilix: has joined #ruby
[02:26:01] hahuang6-: has joined #ruby
[02:27:25] ariedler: has joined #ruby
[02:29:44] laaron: has joined #ruby
[02:34:33] hahuang6|: has joined #ruby
[02:35:19] orbyt_: has joined #ruby
[02:42:02] Renich_: has joined #ruby
[02:44:54] gell5: has joined #ruby
[02:51:11] marmotini_: has joined #ruby
[02:54:08] nfstern_: has joined #ruby
[02:58:26] zenspider: uplime: same
[03:24:05] Alison`: has joined #ruby
[03:37:11] Renich: has joined #ruby
[03:43:16] yield: has joined #ruby
[03:57:23] crankharder: has joined #ruby
[04:09:51] braincrash: has joined #ruby
[04:24:07] gell5: has joined #ruby
[04:28:19] gix-: has joined #ruby
[04:34:40] DmitryBochkarev: has joined #ruby
[04:39:47] ur5us: has joined #ruby
[05:04:08] gell5: has joined #ruby
[05:32:18] sauvin: has joined #ruby
[05:45:08] gell5: has joined #ruby
[05:48:16] DmitryBochkarev: has joined #ruby
[05:57:07] v01d4lph4: has joined #ruby
[05:58:50] ferr: has joined #ruby
[06:15:11] conta: has joined #ruby
[06:18:36] Hobbyboy: has joined #ruby
[06:21:29] aupadhye: has joined #ruby
[06:22:24] sidx64: has joined #ruby
[06:23:08] gell5: has joined #ruby
[06:23:48] reber: has joined #ruby
[06:31:08] Devalo: has joined #ruby
[06:34:14] Fusl: has joined #ruby
[06:39:09] sidx64_: has joined #ruby
[06:39:49] yield: has joined #ruby
[06:42:40] sidx64: has joined #ruby
[06:47:04] stanc: has joined #ruby
[06:47:36] Dbugger: has joined #ruby
[06:49:53] lido: has joined #ruby
[06:49:53] lido: has joined #ruby
[06:52:54] marmotini: has joined #ruby
[06:55:20] gell5: has joined #ruby
[07:05:00] jinie: has joined #ruby
[07:06:33] sidx64: has joined #ruby
[07:19:09] vondruch: has joined #ruby
[07:27:18] axsuul-: has joined #ruby
[07:28:07] conta: has joined #ruby
[07:28:16] mozzarel1: has joined #ruby
[07:28:53] c-c: has joined #ruby
[07:29:34] Rudd0: has joined #ruby
[07:34:15] segy: has joined #ruby
[07:35:52] AzizLight: has joined #ruby
[07:36:08] Dbugger: has joined #ruby
[07:36:14] gell5: has joined #ruby
[07:38:52] mangold: has joined #ruby
[07:42:01] sidx64: has joined #ruby
[07:44:09] schleppel: has joined #ruby
[07:44:12] claudiuinberlin: has joined #ruby
[07:55:39] _joes_: has joined #ruby
[07:58:16] marmotini_: has joined #ruby
[08:03:47] aufi: has joined #ruby
[08:07:26] gell5: has joined #ruby
[08:08:07] _joes_: has joined #ruby
[08:11:35] suukim: has joined #ruby
[08:12:38] tdy1: has joined #ruby
[08:12:58] sinanislekdemir: has joined #ruby
[08:15:31] clemens3: has joined #ruby
[08:16:21] DmitryBochkarev: has joined #ruby
[08:23:59] DmitryBochkarev: has joined #ruby
[08:27:36] marmotini: has joined #ruby
[08:31:09] marmotini_: has joined #ruby
[08:33:14] marmotini: has joined #ruby
[08:35:33] lxsameer: has joined #ruby
[08:38:04] TomyWork: has joined #ruby
[08:41:26] gell5: has joined #ruby
[08:42:16] sidx64: has joined #ruby
[08:42:35] yield: has joined #ruby
[08:46:40] nowhere_man: has joined #ruby
[08:47:40] yqt: has joined #ruby
[08:48:22] Sylario: has joined #ruby
[08:49:32] marmotini_: has joined #ruby
[08:49:42] mikecmpbll: has joined #ruby
[08:58:07] marmotini: has joined #ruby
[09:01:12] dhollin3: has joined #ruby
[09:02:00] marmotini_: has joined #ruby
[09:06:52] andikr: has joined #ruby
[09:08:57] danguita: has joined #ruby
[09:14:11] marmotini_: has joined #ruby
[09:21:24] gell5: has joined #ruby
[09:29:20] marmotini: has joined #ruby
[09:33:17] kyrylo: has joined #ruby
[09:33:39] sidx64: has joined #ruby
[09:36:41] sidx64: has joined #ruby
[09:43:30] sidx64: has joined #ruby
[09:43:32] jottr_: has joined #ruby
[09:48:14] yield: has joined #ruby
[09:48:45] marmotini: has joined #ruby
[09:54:22] marmotini_: has joined #ruby
[10:01:14] gell5: has joined #ruby
[10:02:48] jottr: has joined #ruby
[10:03:46] mangold: has joined #ruby
[10:07:01] tdy1: has joined #ruby
[10:08:21] pwnd_nsfw`: has joined #ruby
[10:09:08] BH23: has joined #ruby
[10:15:57] mroshanavand: has joined #ruby
[10:19:55] yield: has joined #ruby
[10:19:59] roshanavand: has joined #ruby
[10:21:43] marmotini: has joined #ruby
[10:22:26] pwnd_nsfw: has joined #ruby
[10:23:53] livcd: has joined #ruby
[10:31:38] Fire-Dragon-DoL: has joined #ruby
[10:32:34] gell5: has joined #ruby
[10:34:55] xtsee: has joined #ruby
[10:36:29] ellcs: has joined #ruby
[10:41:49] sidx64: has joined #ruby
[10:45:09] ellcs: hey guys, why do i have to wrap a string into an array in order to use pack?
[10:47:45] ytti: i don't think you're gonna like thte answer, but because #pack is Array method
[10:48:00] ellcs: i like you
[10:48:06] ellcs: because you understand me
[10:48:32] ytti: string.each_char.to_a.pack
[10:49:06] ellcs: i might also use String#unpack aight?
[10:49:20] ytti: pack and unpack do the opposite things
[10:51:23] ellcs: a = ["01111010", "01101100", "01101001"]
[10:51:31] ellcs: how would you pack this into chars?
[10:51:41] ellcs: i did use ary.pack("B*B*B*")
[10:52:19] ytti: that seems reasonable
[10:52:40] ellcs: and if a might have any length?
[10:52:51] ytti: another option is a.map{|c|c.to_i(2).chr}.join
[10:53:15] marmotini_: has joined #ruby
[10:55:07] ellcs: seems reasonable
[10:55:11] ellcs: what do you think of `ary.pack("B*" * ary.size)
[10:55:14] sidx64: has joined #ruby
[10:55:39] ytti: usually pack and unpack are used to deal like wire coding
[10:55:52] ytti: so usually you know exactly how many you want to pack and unpack
[10:55:55] ellcs: what do you mean with wire coding?
[10:55:59] ytti: you don't know, and i wonder, why not
[10:57:25] ellcs: i just want to play with pack
[10:57:30] ellcs: because i saw it quite often
[10:57:58] ellcs: however, thank you!
[10:59:50] mangold: has joined #ruby
[11:00:06] ytti: you could do something like a.map{|c|[c].pack("B*")}.join also
[11:00:17] ytti: i'm not sure i like the "" * ary.size
[11:00:53] ytti: usually your array would contain like fields, say ip source address, ip destination address, l4 port, ip protocl etc
[11:01:05] ytti: fixed set of values, that you know specificallyt how each needs to be coded
[11:01:16] ytti: then you'd pack it into a blob and send to the wire
[11:01:31] ytti: and conversely, once you read it from the wire, you'd use unpack to restore them
[11:01:57] ytti: but it is entirely possible i'm missing practical use case of not knowing how many items you need to pack
[11:07:56] tdy1: has joined #ruby
[11:09:25] gell5: has joined #ruby
[11:15:24] sidx64: has joined #ruby
[11:22:43] dante: has joined #ruby
[11:25:56] AJA4350: has joined #ruby
[11:27:36] ldnunes: has joined #ruby
[11:31:42] zenom: has joined #ruby
[11:31:54] zenom: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[11:33:18] marmotini: has joined #ruby
[11:37:30] marmotini_: has joined #ruby
[11:40:17] marmotini: has joined #ruby
[11:42:48] sidx64: has joined #ruby
[11:46:35] marmotini_: has joined #ruby
[11:47:41] gell5: has joined #ruby
[11:48:13] gray_-_wolf: has joined #ruby
[11:48:34] mangold: has joined #ruby
[11:48:51] cranq: has joined #ruby
[11:54:45] cranq: has joined #ruby
[12:00:26] conta1: has joined #ruby
[12:03:21] marmotini_: has joined #ruby
[12:05:09] bmurt: has joined #ruby
[12:05:13] DmitryBochkarev: has joined #ruby
[12:09:25] sidx64: has joined #ruby
[12:10:38] barg: has joined #ruby
[12:13:08] yield: has joined #ruby
[12:18:20] _joes_: has joined #ruby
[12:19:03] BH23: has joined #ruby
[12:27:23] gell5: has joined #ruby
[12:30:14] def_jam: has joined #ruby
[12:30:39] eb0t_: has joined #ruby
[12:37:59] yield: has joined #ruby
[12:38:21] sidx64: has joined #ruby
[12:40:24] marmotini: has joined #ruby
[12:43:37] cow[moo]: has joined #ruby
[12:44:52] _joes_: has joined #ruby
[12:45:41] marmotini_: has joined #ruby
[12:45:42] sidx64: has joined #ruby
[12:46:56] marmotini: has joined #ruby
[12:48:30] phaul: has joined #ruby
[12:52:08] sidx64: has joined #ruby
[12:53:13] marmotini_: has joined #ruby
[12:56:55] danguita: has joined #ruby
[12:57:25] phaul: has joined #ruby
[12:59:18] marmotini: has joined #ruby
[12:59:49] gell5: has joined #ruby
[13:04:11] rprimus: has joined #ruby
[13:09:17] marmotini_: has joined #ruby
[13:10:07] marmotini: has joined #ruby
[13:16:39] d10n-work: has joined #ruby
[13:17:25] marmotini_: has joined #ruby
[13:18:30] hightower2: has joined #ruby
[13:24:27] _joes_: has joined #ruby
[13:26:11] Guest15322: has left #ruby: ()
[13:30:07] jrafanie: has joined #ruby
[13:32:06] marmotini_: has joined #ruby
[13:35:05] marmotini: has joined #ruby
[13:38:12] ikbenhet: has joined #ruby
[13:40:39] gell5: has joined #ruby
[13:40:50] Paraxial: has joined #ruby
[13:47:02] ae84: Hi! I got some build errors for this gem and had to fix things manually. That worked out nicely, but how come I can't write the gemspec? https://gist.github.com/ae84/278c808f2a0fc5f92aba16f8990ac6c0
[13:50:25] ae84: oh wait, nevermind
[13:51:57] marmotini_: has joined #ruby
[13:53:38] nowhere_man: has joined #ruby
[13:55:04] cek: has joined #ruby
[13:56:37] cek: has left #ruby: ()
[14:08:14] DmitryBochkarev: has joined #ruby
[14:12:10] Rapture: has joined #ruby
[14:13:28] gell5: has joined #ruby
[14:16:24] laaron-: has joined #ruby
[14:18:08] InfinityFye: has joined #ruby
[14:19:56] InfinityFye: has left #ruby: ()
[14:20:36] Ai9zO5AP: has joined #ruby
[14:27:04] venmx: has joined #ruby
[14:28:27] venmx: hi, sorry for the noob question... how can i fix this ERROR: While executing gem ... (Gem::Exception)", " Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
[14:29:33] venmx: i tried installing libssl-dev on ubuntu and also using insecure repo, neither worked
[14:33:13] noboruma: has joined #ruby
[14:35:25] Dbugger: has joined #ruby
[14:43:46] Inline: has joined #ruby
[14:47:07] marz_d`ghostman: has joined #ruby
[14:47:32] rippa: has joined #ruby
[14:49:36] havenwood: venmx: have you tried rebuilding Ruby after installing libssl-dev?
[14:50:19] havenwood: venmx: apt deps should be: build-essential bison zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev
[14:52:36] Deesl: has joined #ruby
[14:52:47] Renich: has joined #ruby
[14:53:44] gell5: has joined #ruby
[15:00:44] alpha_sh: has joined #ruby
[15:00:47] alpha_sh: Bored? Call the official freenode IRC partyline at +4521137886
[15:02:25] Qantourisc20: has joined #ruby
[15:02:25] Qantourisc20: Bored? Call the official freenode IRC partyline at +4521137886
[15:03:13] lucasb: has joined #ruby
[15:03:57] SeepingN: has joined #ruby
[15:04:30] debdog12: has joined #ruby
[15:04:30] debdog12: Bored? Call the official freenode IRC partyline at +4521137886
[15:04:36] Sausage22: has joined #ruby
[15:04:37] Sausage22: Bored? Call the official freenode IRC partyline at +4521137886
[15:07:09] SeepingN: no one's answering
[15:07:14] SeepingN: just like real IRC wow!
[15:07:57] nowhere_man: has joined #ruby
[15:08:35] sphenxes: has joined #ruby
[15:09:42] lilmonkey``: has joined #ruby
[15:11:43] jabberwock11: has joined #ruby
[15:12:27] rukenden: has joined #ruby
[15:12:49] Tau: has joined #ruby
[15:13:30] divx1187: has joined #ruby
[15:13:35] mattwc1: has joined #ruby
[15:18:59] Te[u]K3: has joined #ruby
[15:19:00] Guest31414: has joined #ruby
[15:20:27] Wessie19: has joined #ruby
[15:22:10] al2o3-cr: has joined #ruby
[15:22:16] _joes_: has joined #ruby
[15:22:30] BH23: has joined #ruby
[15:22:52] ChanServ: +o havenwood
[15:24:27] grilix: has joined #ruby
[15:28:54] gell5: has joined #ruby
[15:29:27] marmotini: has joined #ruby
[15:30:02] nowhere_man: has joined #ruby
[15:43:46] marmotini_: has joined #ruby
[15:48:24] grilix: has joined #ruby
[15:53:06] agent_white: has joined #ruby
[15:53:50] zleap: has joined #ruby
[15:53:50] zleap: has joined #ruby
[15:56:33] orbyt_: has joined #ruby
[15:58:20] cagomez: has joined #ruby
[15:58:44] marmotini: has joined #ruby
[15:58:50] tdy1: has joined #ruby
[15:58:55] cagomez: has joined #ruby
[15:59:53] cthulchu_: has joined #ruby
[16:00:20] cagomez: has joined #ruby
[16:02:03] marmotini_: has joined #ruby
[16:03:03] gell5: has joined #ruby
[16:11:43] polishdub: has joined #ruby
[16:14:09] WhereIsMySpoon: has joined #ruby
[16:14:31] WhereIsMySpoon: Is there a binary version of bson I can depend on instead of bundle install trying to build bson with make each time? The docker image im trying to deploy onto doesnt have make
[16:15:04] orbyt_: has joined #ruby
[16:17:08] WhereIsMySpoon: or can I make mongo gem not depend on bson_ext?
[16:25:49] Devalo: has joined #ruby
[16:27:29] marmotini: has joined #ruby
[16:29:43] jcarl43: has joined #ruby
[16:32:15] suukim: has joined #ruby
[16:36:58] Devalo: has joined #ruby
[16:39:40] gell5: has joined #ruby
[16:39:55] havenwood: WhereIsMySpoon: the BSON gem has JRuby extensions, but unfortunately not a slow, pure Ruby version
[16:39:57] Roserin: has joined #ruby
[16:40:11] havenwood: WhereIsMySpoon: is JRuby an option? it ships a jar.
[16:41:20] WhereIsMySpoon: i dont really want to write jruby
[16:48:20] hightower2: has joined #ruby
[16:51:29] havenwood: it's just Ruby!
[16:51:35] ChanServ: -o havenwood
[16:51:43] havenwood: (with a J in front)
[16:54:12] jinie: has joined #ruby
[16:55:05] sidx64: has joined #ruby
[16:56:56] Paraxial: has joined #ruby
[17:00:20] Renich: has joined #ruby
[17:02:15] AdmiralAsshat: has joined #ruby
[17:08:03] emberquill: has joined #ruby
[17:08:04] wsmoak: has joined #ruby
[17:08:27] orbyt_: has joined #ruby
[17:09:24] gix: has joined #ruby
[17:10:37] sidx64_: has joined #ruby
[17:14:03] drewc17: has joined #ruby
[17:14:15] kurosu: has joined #ruby
[17:17:33] _joes_: has joined #ruby
[17:17:37] venmx: has joined #ruby
[17:17:38] BH23: has joined #ruby
[17:17:42] bambanx: has joined #ruby
[17:18:01] alem0lars: has joined #ruby
[17:36:52] Lytol: has joined #ruby
[17:44:20] fredolinhares: has joined #ruby
[17:45:12] gell5: has joined #ruby
[18:11:43] orbyt_: has joined #ruby
[18:13:37] Devalo: has joined #ruby
[18:15:06] hiroaki: has joined #ruby
[18:16:16] reber: has joined #ruby
[18:18:32] gell5: has joined #ruby
[18:20:42] bezt20: has joined #ruby
[18:25:02] feepk27: has joined #ruby
[18:34:18] aufi: has joined #ruby
[18:35:53] thurstylark: has joined #ruby
[18:36:34] Tau: has joined #ruby
[18:40:51] ldnunes: has joined #ruby
[18:46:52] irdr: has joined #ruby
[18:48:37] kapil____: has joined #ruby
[18:52:02] gell5: has joined #ruby
[18:52:22] emberquill: has joined #ruby
[18:52:40] Guest90089: has joined #ruby
[18:53:59] hahuang6-: has joined #ruby
[18:57:39] hahuang6-: has joined #ruby
[18:58:09] klaxa3: has joined #ruby
[18:58:36] hahuang6-: has joined #ruby
[19:03:39] hahuang6-: has joined #ruby
[19:03:43] archpc1: has joined #ruby
[19:09:12] bmurt: has joined #ruby
[19:16:18] WhereIsMySpoon: has joined #ruby
[19:16:18] WhereIsMySpoon: has joined #ruby
[19:18:29] diegok: has joined #ruby
[19:18:43] schleppel: has joined #ruby
[19:23:12] phadej18: has joined #ruby
[19:25:12] DmitryBochkarev: has joined #ruby
[19:32:55] gell5: has joined #ruby
[19:35:16] AJA4351: has joined #ruby
[19:36:24] zeroquake: has joined #ruby
[19:37:27] dviola: has joined #ruby
[19:39:16] bambanx: has joined #ruby
[19:42:48] tdy1: has joined #ruby
[19:45:10] ua: has joined #ruby
[19:45:48] yoshie902a: has joined #ruby
[19:46:19] yoshie902a: Need some help solving why a self.search method in module is getting an error. https://stackoverflow.com/questions/55405385/nomethoderror-undefined-method-search-for-hobbiesquerymodule
[19:46:31] yoshie902a: is anything wrong with my syntax?
[19:47:57] zeroquake: has joined #ruby
[19:50:12] bambanx: has joined #ruby
[19:56:47] nwradio8: has joined #ruby
[19:58:27] orbyt_: has joined #ruby
[20:02:18] Devalo: has joined #ruby
[20:03:11] dinfuehr_: has joined #ruby
[20:03:24] terabytes: has joined #ruby
[20:07:19] gell5: has joined #ruby
[20:12:01] zleap: has joined #ruby
[20:12:01] zleap: has joined #ruby
[20:14:15] ur5us: has joined #ruby
[20:16:01] SCHAPiE: has joined #ruby
[20:19:50] Devalo: has joined #ruby
[20:19:50] yoshie902a: has left #ruby: ()
[20:22:32] dostoyevsky: has joined #ruby
[20:25:47] gkos: has joined #ruby
[20:26:55] zachk: has joined #ruby
[20:28:18] zachk: has joined #ruby
[20:28:22] danielbeck: has joined #ruby
[20:29:49] venmx: has joined #ruby
[20:30:15] gkos: has joined #ruby
[20:32:17] zeroquake: has joined #ruby
[20:32:57] asdawer__: has joined #ruby
[20:42:46] AJA4351: has joined #ruby
[20:44:03] gell5: has joined #ruby
[20:47:29] tdy1: has joined #ruby
[20:52:53] orbyt_: has joined #ruby
[20:54:36] kyrylo: has joined #ruby
[20:58:55] Xiti: has joined #ruby
[20:59:39] Devalo: has joined #ruby
[21:06:14] pwnd_nsfw`: has joined #ruby
[21:06:20] sgen: has joined #ruby
[21:09:28] rprimus: has joined #ruby
[21:16:18] Fernando-Basso: has joined #ruby
[21:16:37] mikecmpbll: has joined #ruby
[21:17:29] gell5: has joined #ruby
[21:22:49] {41444d494e}10: has joined #ruby
[21:28:21] jottr: has joined #ruby
[21:33:02] zdzichu11: has joined #ruby
[21:34:07] t0xik: has joined #ruby
[21:34:47] code_zombie: has joined #ruby
[21:46:13] crankharder: has joined #ruby
[21:50:08] brool: has joined #ruby
[21:50:40] AJA4350: has joined #ruby
[21:50:47] codefriar17: has joined #ruby
[21:55:25] haylon_: jRuby is handy when you can't get Ruby on a system, but you have Java available. Then I'm not technically installing Ruby, just using what's there.
[21:59:07] gell5: has joined #ruby
[22:02:27] daaniel_5: has joined #ruby
[22:15:39] orbyt_: has joined #ruby
[22:18:19] geordi18: has joined #ruby
[22:21:50] Devalo: has joined #ruby
[22:28:23] davel_: has joined #ruby
[22:29:57] gell5: has joined #ruby
[22:31:13] Renich_: has joined #ruby
[22:31:34] venmx: has joined #ruby
[22:32:23] cd: has joined #ruby
[22:32:49] ryouba: how would you do "cat *-dns.txt | grep 'IN A' | grep 249 | cut -d ' ' -f 1 | grep -v '@' | sed s/\*/www/" in ruby? File.read each of them and run a RegEx?
[22:37:13] thnee10: has joined #ruby
[22:40:41] phaul: how is it possible that the faker gem doesn't have anything from the big bang theory?
[22:41:08] gell5: has joined #ruby
[22:41:46] gell5: has joined #ruby
[22:43:17] gell5_: has joined #ruby
[22:45:45] luyikei20: has joined #ruby
[22:46:06] adam12: ryouba: cat *-dns.txt | ruby -pe 'sub("*", "www") if $_.include?("249") && $_.include?("IN A") && !$_.include?("@")' ?
[22:46:28] ryouba: wow, it's actually longer
[22:46:36] adam12: ryouba: I didn't bother to test it since you didn't provide any test data. If you weren't looking for a one-liner then rephrase maybe?
[22:46:56] ryouba: adam12: nono, that's perfect. i was looking for a one-liner!
[22:47:23] ryouba: i was just wondering if it would be worth to try and re-learn to do these things in ruby
[22:47:25] adam12: ryouba: Could likely optimize it a bunch.
[22:47:41] ryouba: but it seems the bash way is still really useful for quickly throwing something like this together
[22:47:53] adam12: ryouba: I use Ruby oneliners all the time! You could of used awk to some degree too.
[22:48:27] adam12: ryouba: If you had a regex that could fit in the conditional, you could simplify it a bunch.
[22:48:32] ryouba: hmm i never liked awk ... when you already know some bash and are using/learning ruby anyways, then what's the point
[22:49:07] ryouba: i'm becoming better at regexs but still not so natural that i wouldn't have to play around with regex101.com each time i need one
[22:49:08] adam12: like `sub() if /!@\s+IN A\s+249.*/` or something
[22:49:29] adam12: !@ is likely wrong for negation but I can't remember negate off the top of my head. ^ maybe.
[22:49:44] bougyman: ryouba: because awk is lightning fast at things.
[22:50:05] adam12: I find awk more convenient on machines without ruby, but where I'd use grep/cut
[22:50:09] ryouba: bougyman: i rarely need lightning fast... most of the time i'm thinking for longer than the script runs
[22:50:12] adam12: since cut acts super funny on some strings.
[22:50:13] bougyman: ryouba: for instance, in parsing a 140G LDIF, awk takes 7 minutes. Perl: 58 minutes. Ruby: 1 hour 18 minutes.
[22:50:24] ryouba: seconded on the cut tho
[22:50:42] adam12: awk '/match/ { print $2 }' beats grep/cut a million times in annoynances.
[22:50:45] bougyman: 140G isn't even large, these days.
[22:50:54] ryouba: okay i'm operating on ~30 files here, each around 10kB
[22:51:00] sanscoeur: has joined #ruby
[22:51:21] adam12: ryouba: did you only care about the name portion of the zone file?
[22:51:48] adam12: ryouba: my oneliner preserved the entire file as-is. Likely not what you wanted.
[22:52:10] ryouba: adam12: i'm trying to look for everything that's http and going to the ip ending in 249 (relatively easy as everything containing 'IN A' happens to go to http)
[22:53:13] wookienz: has joined #ruby
[22:53:16] ryouba: and then '*' is not needed as that's unknowable anyways and '@' needs to become 'www'
[22:53:35] ryouba: took me a couple of seconds with that piped chain of commands
[22:53:52] ryouba: and then i stuck it inside of a ruby script, but somehow that felt wrong
[22:54:05] ryouba: but gosh, that's narcissism
[22:54:37] ryouba: i guess that happens when you're doing a boring task and it's be more fun learning more ruby
[22:56:00] adam12: the ruby binary has some niceties that it borrowed from Perl. -n, -e, -p, -r, $_, etc. Definitely worth checking out.
[22:56:47] ryouba: i was wondering why you used -p instead of -e
[22:56:55] AJA4351: has joined #ruby
[22:57:12] adam12: -p instead of -n? saved me a few characters since $_ is automatically printed for -p and not for -n.
[22:57:32] ryouba: okay, it's a bit of a different way of thinking
[22:58:02] baweaver: If you're using TruffleRuby that speed hit is a lot smaller.
[22:59:13] baweaver: https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/yarv-truffle.html
[23:00:05] ryouba: wow a company like oracle is throwing resources at ruby in 2019? that's nice!
[23:00:22] baweaver: https://pragtob.wordpress.com/2017/01/24/benchmarking-a-go-ai-in-ruby-cruby-vs-rubinius-vs-jruby-vs-truffle-a-year-later/
[23:00:33] baweaver: havenwood: It's showtime
[23:01:00] baweaver: your favorite topic
[23:01:59] Gaffel10: has joined #ruby
[23:02:34] eckhardt: has joined #ruby
[23:03:13] Kethsar3: has joined #ruby
[23:04:16] adam12: I was wondering why truffleruby can't be installed by ruby-install but apparently I'm _many_ versions behind. I wonder how that happened.
[23:06:49] adam12: Oh well. Worth a try. "!!! unknown platform FreeBSD"
[23:34:28] duderonomy: has joined #ruby
[23:39:30] Yayou: has joined #ruby
[23:39:49] corecode29: has joined #ruby
[23:40:46] Synthead: has joined #ruby
[23:41:05] Synthead: I want to use a different gcc when compiling a gem via Bundler. How can I do this?
[23:41:22] Synthead: it's in my path as gcc-7
[23:44:48] havenwood: adam12: TruffleRuby currently only has binaries for Linux and macOS :(
[23:45:06] havenwood: You should be able to build it from source on FreeBSD
[23:45:07] honestly18: has joined #ruby
[23:48:52] Devalo: has joined #ruby
[23:50:09] seirl24: has joined #ruby