« Back to channel list

#ruby - 14 August 2019

« Back 1 day Forward 1 day »
[00:01:12] reaVer: has joined #ruby
[00:03:59] jenrzzz: has joined #ruby
[00:06:15] elphe: has joined #ruby
[00:11:29] skryking: has joined #ruby
[00:27:57] Swyper: has joined #ruby
[00:30:04] regedit: why is this error: NoMethodError - undefined method `sanitize_sql_like'
[00:30:14] regedit: within an an ActiveRecord model
[00:30:23] regedit: oh maybe i should ask in #ror...
[00:38:04] AJA4351: has joined #ruby
[00:48:16] RiPuk: has joined #ruby
[00:52:31] sapphyrus: has joined #ruby
[00:58:07] sapphyrus: has joined #ruby
[01:01:13] elphe: has joined #ruby
[01:03:23] sapphyrus: has joined #ruby
[01:05:26] bmurt: has joined #ruby
[01:15:55] baojg: has joined #ruby
[01:17:08] drnerdius: has joined #ruby
[01:17:13] sapphyrus: has joined #ruby
[01:33:11] _whitelogger: has joined #ruby
[01:41:02] ElFerna: has joined #ruby
[01:57:46] bitwinery: has joined #ruby
[02:00:31] bruce_lee: has joined #ruby
[02:00:31] bruce_lee: has joined #ruby
[02:07:07] sapphyrus: has joined #ruby
[02:11:00] elphe: has joined #ruby
[02:12:21] Swyper: has joined #ruby
[02:17:29] duderonomy: has joined #ruby
[02:21:44] duderonomy: has joined #ruby
[02:37:00] kyrylo: has joined #ruby
[02:40:58] jenrzzz: has joined #ruby
[02:47:44] kyrylo: has joined #ruby
[02:52:36] Azure: has joined #ruby
[02:53:38] Swyper: has joined #ruby
[02:55:51] DTZUZO: has joined #ruby
[02:59:48] polishdub: has joined #ruby
[03:07:21] matled-: has joined #ruby
[03:07:55] elphe: has joined #ruby
[03:09:11] _whitelogger_: has joined #ruby
[03:09:53] iNs: has joined #ruby
[03:11:44] PaulePanter: has joined #ruby
[03:14:43] ixti: Re my error on Array#each (if anybody curious) - it was my mistake. Didn't saw that error was coming from the different place (just happened that var name was the same)
[03:18:50] sapphyrus: has joined #ruby
[03:23:07] grilix: has joined #ruby
[03:23:55] gix: has joined #ruby
[03:27:42] Swyper: has joined #ruby
[03:29:55] duderonomy: has joined #ruby
[03:33:57] kyrylo: has joined #ruby
[03:36:46] kyrylo: has joined #ruby
[03:44:49] Nicmavr: has joined #ruby
[03:45:08] jenrzzz: has joined #ruby
[03:48:48] duderonomy: has joined #ruby
[04:06:08] kyrylo: has joined #ruby
[04:12:01] kyrylo: has joined #ruby
[04:15:03] cthulchu: has joined #ruby
[04:18:11] jenrzzz: has joined #ruby
[04:19:48] kyrylo: has joined #ruby
[04:24:12] _whitelogger: has joined #ruby
[04:42:16] Swyper: has joined #ruby
[04:43:25] greengriminal: has joined #ruby
[04:43:58] lalitmee: has joined #ruby
[04:57:02] Dbugger: has joined #ruby
[05:02:49] glosoli: has joined #ruby
[05:08:48] tsujp: has joined #ruby
[05:15:29] tsujp: has joined #ruby
[05:22:09] ur5us: has joined #ruby
[05:25:04] sauvin: has joined #ruby
[05:32:32] ramfjord: has joined #ruby
[05:32:39] duderonomy: has joined #ruby
[05:42:01] ruby[bot]: -b yummycouple!*@*$#ruby-banned
[05:48:44] dhollinger: has joined #ruby
[05:49:23] Furai: has joined #ruby
[05:54:17] Swyper: has joined #ruby
[06:04:21] zapata: has joined #ruby
[06:06:06] twoone: has joined #ruby
[06:09:44] jenrzzz: has joined #ruby
[06:12:01] deepredsky: has joined #ruby
[06:13:06] reber: has joined #ruby
[06:40:20] noodle: has joined #ruby
[06:40:24] deepredsky: has joined #ruby
[06:40:42] rainmanjam: has joined #ruby
[06:40:46] fphilipe_: has joined #ruby
[06:46:54] troulouliou_dev: has joined #ruby
[06:48:51] lxsameer: has joined #ruby
[06:49:14] ljarvis: has joined #ruby
[06:55:45] tbisker8: has joined #ruby
[06:58:21] deepredsky: has joined #ruby
[06:58:51] englishm: has joined #ruby
[06:59:59] titanbiscuit: has joined #ruby
[07:11:24] suukim: has joined #ruby
[07:13:08] planigan: has joined #ruby
[07:13:26] alem0lars: has joined #ruby
[07:15:32] TomyWork: has joined #ruby
[07:22:40] elphe: has joined #ruby
[07:25:55] aupadhye: has joined #ruby
[07:27:00] tuor: has joined #ruby
[07:27:00] tuor: has joined #ruby
[07:31:29] suukim: has joined #ruby
[07:35:36] quazimodo: has joined #ruby
[07:42:38] elphe: has joined #ruby
[07:52:57] drnerdius: has joined #ruby
[08:00:34] jmcgnh: has joined #ruby
[08:03:20] lalitmee: has joined #ruby
[08:03:56] deepredsky: has joined #ruby
[08:13:59] Swyper: has joined #ruby
[08:37:35] corellian: has joined #ruby
[08:43:03] kyrylo: has joined #ruby
[08:59:10] Stan: has joined #ruby
[09:00:15] deepredsky: has joined #ruby
[09:01:08] mniip: has joined #ruby
[09:04:13] tsujp: has joined #ruby
[09:04:19] DTZUZO: has joined #ruby
[09:10:11] Stan: has joined #ruby
[09:10:15] tsujp: has joined #ruby
[09:15:13] tsujp: has joined #ruby
[09:16:11] tuor: has joined #ruby
[09:16:11] tuor: has joined #ruby
[09:20:20] Swyper: has joined #ruby
[09:23:34] xco: has joined #ruby
[09:23:57] xco: hello beutiful people!! :P
[09:24:36] xco: i have a string that’s always in this format “some@email.com#s30823ufadafxx”
[09:24:54] xco: i want to extract just the email out so i’d get “some@email.com”
[09:25:00] xco: i know i can do
[09:25:09] xco: “some@email.com#s30823ufadafxx”.split....
[09:25:14] xco: or “some@email.com#s30823ufadafxx”.partition.....
[09:25:42] xco: but i want to ask if perhaps someone has a better (maybe efficient) way to extract emails out of such strings?
[09:26:05] xco: i’m always on the look out for a better* way and i know there is (might be)
[09:29:18] phaul: .sub(/#.*/, '') can give you a more direct result, but whether it's better or more efficient is up to debate
[09:29:30] NL3limin4t0r: xco: You could use a regex.
[09:29:55] NL3limin4t0r: &>> 'some@email.com#s30823ufadafxx'[/[^#]+/]
[09:30:00] rubydoc: stderr: /home/carcin/carcin/sandboxes/ruby/sandboxed_ruby2.6.0: error while loading shared libraries:... check link for more (https://carc.in/#/r/7ed5)
[09:30:26] phaul: NL3limin4t0r: yeah. carc.in got broken. &24>> works still
[09:30:37] NL3limin4t0r: &24>> 'some@email.com#s30823ufadafxx'[/[^#]+/]
[09:30:38] rubydoc: # => "some@email.com" (https://carc.in/#/r/7ed6)
[09:30:43] xco: phaul: thank you
[09:30:47] NL3limin4t0r: phaul: Ah, been away for a while
[09:30:59] xco: phaul: that’s sexy actually
[09:31:15] xco: NL3limin4t0r: thanks for that too… that looks very simple
[09:31:19] xco: less noise
[09:31:22] xco: "noise"
[09:31:48] suukim: has joined #ruby
[09:32:03] NL3limin4t0r: Keep in mind the regex provided matches from the start of the string until the first '#' character (assuming a string never starts with '#')
[09:32:59] ramfjord: has joined #ruby
[09:33:19] xco: yeah that i’m aware of
[09:33:24] NL3limin4t0r: If the string can contain newline characters you might want to add the "m" flag to the regex of phaul.
[09:34:05] MrCrackPot: has joined #ruby
[09:34:42] xco: NL3limin4t0r: how can i use this 'some@email.com#s30823ufadafxx'[/[^#]+/] with URI::MailTo::EMAIL_REGEXP?
[09:36:28] NL3limin4t0r: &24>> require 'uri'; 'some@email.com#s30823ufadafxx'[URI::MailTo::EMAIL_REGEXP]
[09:36:29] rubydoc: # => nil (https://carc.in/#/r/7ed7)
[09:37:57] NL3limin4t0r: What do you mean by "use" with URI::MailTo::EMAIL_REGEXP ? Do you want to test if the email is valid?
[09:38:29] xco: the EMAIL_REXEXP is /\A[a-zA-Z0-9.!\#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z/
[09:38:58] xco: so i’m assuming you could just put that in 'some@email.com#s30823ufadafxx’[regex_here] to grab the email
[09:39:13] xco: in this case any email that matches the EMAIL_REGEXP
[09:39:48] NL3limin4t0r: Yeah. Meaning you can't extract an email from existing string. Since /\A...\z/ always checks if the whole string matches (\A matches the start of string and \z matches the end of string).
[09:40:18] xco: riiiiiight!
[09:40:22] NL3limin4t0r: You could remove those and create your own version.
[09:40:31] xco: i tend to miss those little details
[09:41:32] NL3limin4t0r: &24>> 'some@email.com#s30823ufadafxx'[/[a-zA-Z0-9.!\#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*/]
[09:41:33] rubydoc: # => "some@email.com" (https://carc.in/#/r/7eda)
[09:44:16] elphe: has joined #ruby
[09:44:16] NL3limin4t0r: &24>> require 'uri'; 'some@email.com#s30823ufadafxx'[RegExp.new URI::MailTo::EMAIL_REGEXP.to_s.gsub(/\\A|\\z/, '')]
[09:44:18] rubydoc: stderr: -e:2:in `<main>': uninitialized constant RegExp (NameError) (https://carc.in/#/r/7edb)
[09:44:43] NL3limin4t0r: &24>> require 'uri'; 'some@email.com#s30823ufadafxx'[Regexp.new URI::MailTo::EMAIL_REGEXP.to_s.gsub(/\\A|\\z/, '')]
[09:44:44] rubydoc: # => "some@email.com" (https://carc.in/#/r/7edc)
[09:45:04] xco: this looks good but it’s getting out of hands now hahhahha
[09:45:07] NL3limin4t0r: ^ removing \A and \z from the regex works like you see
[09:45:20] xco: NL3limin4t0r: but thanks for teaching how to do it :D
[09:46:39] NL3limin4t0r: Have a look at String#[] for more info. https://ruby-doc.org/core-2.6.3/String.html#method-i-5B-5D
[09:49:01] al2o3-cr: &24>> require 'uri'; URI('some@email.com#s30823ufadafxx').path
[09:49:02] rubydoc: # => "some@email.com" (https://carc.in/#/r/7edd)
[09:51:09] NL3limin4t0r: didn't know that one, nice
[09:51:41] poontangmessiah: has joined #ruby
[09:52:11] mlt-: has joined #ruby
[09:55:46] xco: al2o3-cr: whaaat?!?!?
[10:17:05] baojg: has joined #ruby
[10:20:37] ur5us: has joined #ruby
[10:34:57] DaRock: has joined #ruby
[10:37:59] Swyper: has joined #ruby
[10:39:25] gregf_: has joined #ruby
[10:48:52] drnerdius: has joined #ruby
[10:52:27] poontangmessiah: has joined #ruby
[10:58:38] ur5us: has joined #ruby
[11:12:00] ElFerna: has joined #ruby
[11:23:34] mniip_: has joined #ruby
[11:26:01] noobster42: has joined #ruby
[11:26:29] tpanarch1st: has joined #ruby
[11:27:05] noobster42: I'm probably approaching the situation incorrectly, but I'm looking for a regular for (initializer; condition; statement) loop in Ruby.
[11:27:30] noobster42: I have a while loop which executes a statement at the beginning of each iteration, but it should not be executed on the first iteration
[11:28:46] noobster42: is there a clean way to solve this? Currently I'm just artificially setting the value of the variable this statement changes to -= 1 before the loop, so that the first iteration (which ++'s it) effectively nullifies that again
[11:31:09] cgfbee: has joined #ruby
[11:33:11] ramfjord: has joined #ruby
[11:33:50] also_uplime: has left #ruby: ("/me scurries away")
[11:40:11] chalkmonster: has joined #ruby
[11:44:46] elphe: has joined #ruby
[11:45:42] AJA4350: has joined #ruby
[11:45:46] Swyper: has joined #ruby
[11:47:10] tsujp: has joined #ruby
[11:50:04] DTZUZO: has joined #ruby
[11:55:45] queip: has joined #ruby
[12:03:41] lucasb: has joined #ruby
[12:05:22] eber: has joined #ruby
[12:05:58] kyrylo: has joined #ruby
[12:11:15] tsujp: has joined #ruby
[12:16:58] kyrylo: has joined #ruby
[12:17:10] tsujp_: has joined #ruby
[12:23:32] kyrylo: has joined #ruby
[12:31:01] deepredsky: has joined #ruby
[12:53:28] tsujp: has joined #ruby
[12:54:28] impermanence: has joined #ruby
[12:56:06] elphe: has joined #ruby
[12:56:10] grilix: has joined #ruby
[13:01:21] involans: has joined #ruby
[13:11:35] bmurt: has joined #ruby
[13:16:54] sh7d: has joined #ruby
[13:19:42] mat_bug: has joined #ruby
[13:21:48] hutch: has joined #ruby
[13:22:42] skarlso: has joined #ruby
[13:29:41] k0mpa: has joined #ruby
[13:34:17] desperek: has joined #ruby
[13:34:30] desperek: has joined #ruby
[13:35:10] desperek: hi, what's better, (2**3)<<4 or 2**8-2**4, (how does that work btw haha) i assume the first one?
[13:37:04] desperek: ok now why is (~2).to_s(2) -11
[13:37:31] desperek: oh nvm i know the latter question answer
[13:38:10] elphe: has joined #ruby
[13:39:44] hrhsh: has joined #ruby
[13:45:50] millerti: has joined #ruby
[13:47:20] greengriminal: has joined #ruby
[13:47:26] brool: has joined #ruby
[13:49:43] deepredsky: has joined #ruby
[13:54:27] Swyper: has joined #ruby
[13:54:59] desperek: [1,7,8,...,x].map {|e| ("A".."Z").to_a[e % 26]}, does ruby recreate the range in the block or is it smart?
[13:55:03] iNs: has joined #ruby
[13:55:38] hrhsh: has joined #ruby
[13:55:57] ElFerna: has joined #ruby
[13:58:46] vondruch_: has joined #ruby
[13:59:22] tsujp: has joined #ruby
[13:59:33] chunkypuffs: has joined #ruby
[14:14:16] Rapture: has joined #ruby
[14:17:44] NL3limin4t0r: desperek: 2**3 << 4 and 2**8 - 2**4 produce different results.
[14:19:38] desperek: NL3limin4t0r, :thinking: ok, then 2**3-1 << 4
[14:21:01] desperek: well actually nvm i think ive found a simpler solution to my problem, tho the question's still there hm
[14:21:33] NL3limin4t0r: `2**something` is the same as `1 << something`
[14:21:51] NL3limin4t0r: &24>> 2**3 << 4
[14:21:52] rubydoc: # => 128 (https://carc.in/#/r/7eej)
[14:21:59] rubydoc: # => 128 (https://carc.in/#/r/7eek)
[14:22:57] desperek: well i dont meean that
[14:23:03] desperek: im about like 111000 thing
[14:23:37] NL3limin4t0r: Than you should add a -1 to the whole thing.
[14:24:09] desperek: im more about math tho
[14:24:24] NL3limin4t0r: &24>> ((1 << 9) - 1).to_s(2)
[14:24:25] rubydoc: # => "111111111" (https://carc.in/#/r/7eel)
[14:30:41] sgen: has joined #ruby
[14:35:57] ElFerna: has joined #ruby
[14:37:01] ElFerna: has joined #ruby
[14:39:02] desperek: NL3limin4t0r, but generally bitwise shift is more performant than multiplication, right?
[14:50:11] lalitmee: has joined #ruby
[14:52:28] AJA4351: has joined #ruby
[14:52:33] code_zombie: has joined #ruby
[15:00:27] Technodrome: has joined #ruby
[15:02:20] rippa: has joined #ruby
[15:07:13] Swyper: has joined #ruby
[15:11:03] wildtrees: has joined #ruby
[15:12:04] involans: has joined #ruby
[15:13:05] ellcs: has joined #ruby
[15:15:36] greengriminal: has joined #ruby
[15:33:37] deepredsky: has joined #ruby
[15:38:48] deepreds1: has joined #ruby
[15:40:10] vondruch: has joined #ruby
[15:43:16] tdy: has joined #ruby
[15:45:08] Nicmavr: has joined #ruby
[15:45:53] kyrylo: has joined #ruby
[15:46:22] vondruch: has joined #ruby
[15:47:33] sh7d: has joined #ruby
[15:49:36] vondruch: has joined #ruby
[15:51:55] kyrylo: has joined #ruby
[15:59:40] kyrylo: has joined #ruby
[16:15:26] Swyper: has joined #ruby
[16:16:02] cthulchu_: has joined #ruby
[16:17:11] deepreds1: has joined #ruby
[16:24:42] s3nd1v0g1us: has joined #ruby
[16:26:29] rubydoc: stderr: /home/carcin/carcin/sandboxes/ruby/sandboxed_ruby2.6.0: error while loading shared libraries:... check link for more (https://carc.in/#/r/7ef5)
[16:26:32] leitz: has joined #ruby
[16:31:04] kyrylo: has joined #ruby
[16:33:04] chalkmonster: has joined #ruby
[16:35:05] pepone: has joined #ruby
[16:37:15] englishm: has joined #ruby
[16:37:41] pepone: Hi, trying to debug a problem with a ruby extension where a object created with Data_Wrap_Struct is gc befor it should, is there a way to get enable GC trace to see why this happens
[16:38:31] pepone: so far this only occurs with OPTIMIZED builds of the extension and python 2.6.3p62
[16:40:08] SeepingN: has joined #ruby
[16:40:56] ElFerna: has joined #ruby
[16:46:27] duderonomy: has joined #ruby
[16:54:14] deepredsky: has joined #ruby
[16:56:01] dhollinger: has joined #ruby
[16:56:21] pepone: I see the free method register with Data_Wrap_Struct is called but the mark method that was supposed to keep the object alive is not
[16:56:49] ravenous_: has joined #ruby
[16:56:51] pepone: If I manually call GC.start I see the expected calls to mark free methods and there is no crash
[17:08:13] spiette: has joined #ruby
[17:09:05] gix: has joined #ruby
[17:21:44] yxhuvud: has joined #ruby
[17:24:33] Swyper: has joined #ruby
[17:37:23] sameerynho: has joined #ruby
[17:45:01] nius: has joined #ruby
[17:45:36] nius: How can Object be an instance of Class, a sub-class of Object?
[17:45:59] nius: (same goes for Module, BasicObject, etc)
[17:49:55] phaul: each object knows who its class is. For Object it's Class. Apart from that classes also know who their super class is. For Object it's BasicObject, for Class it's Module, for Module it's Object. Imagine .class and .superclass being a pointer between objects of object space and these guys are pointing at each other.
[17:50:47] phaul: also the .class and .superclass are very different because .class is in every object, .superclass is only in classes
[17:52:14] havenwood: &>> Module.class
[17:52:15] rubydoc: stderr: /home/carcin/carcin/sandboxes/ruby/sandboxed_ruby2.6.0: error while loading shared libraries:... check link for more (https://carc.in/#/r/7efm)
[17:54:14] phaul: &24>> Module.class # havenwood
[17:54:18] rubydoc: # => Class (https://carc.in/#/r/7efn)
[17:55:17] havenwood: &24>> Class.superclass
[17:55:18] rubydoc: # => Module (https://carc.in/#/r/7efo)
[17:55:25] havenwood: &24>> Module.superclass
[17:55:31] rubydoc: # => Object (https://carc.in/#/r/7efp)
[17:55:36] havenwood: &24>> Object.superclass
[17:55:36] rubydoc: # => BasicObject (https://carc.in/#/r/7efq)
[17:55:49] havenwood: &24>> BasicObject.superclass
[17:55:50] rubydoc: # => nil (https://carc.in/#/r/7efr)
[17:56:14] havenwood: nius: It's ^ a chain.
[17:56:34] havenwood: &24>> Class.ancestors
[17:56:35] rubydoc: # => [Class, Module, Object, Kernel, BasicObject] (https://carc.in/#/r/7efs)
[17:57:33] havenwood: &24>> Object.include? Kernel
[17:57:34] rubydoc: # => true (https://carc.in/#/r/7eft)
[17:58:24] ramfjord: has joined #ruby
[18:00:04] phaul: we had a diagramm of this among the factoids.. iirc. I am trying to find it..
[18:02:23] SeepingN: has joined #ruby
[18:02:43] havenwood: https://go.gliffy.com/go/publish/5152080
[18:02:53] havenwood: phaul: That one ^ or another?
[18:03:14] NL3limin4t0r: &24>> Class.ancestors
[18:03:14] rubydoc: # => [Class, Module, Object, Kernel, BasicObject] (https://carc.in/#/r/7efu)
[18:03:28] phaul: I couldn't find it, maybe I confused it with the method_lookup diagramm...
[18:05:33] codefriar: has joined #ruby
[18:07:28] NL3limin4t0r: nius: I get the confusion. In plain Ruby you wouldn't be able to recreate the same structure. But Ruby core is written in C which can bend the rules.
[18:08:53] NL3limin4t0r: Object is an instance of Class which inherits from Object (resulting in a circular dependencies)
[18:10:02] phaul: but the ancestry chain is flat, no circles. As I tried to emhasise the difference between .class vs .superclass.
[18:10:46] dinfuehr: has joined #ruby
[18:10:57] teardown: termbin.com/6og0
[18:12:04] teardown: my require is false. how do i use this gem
[18:14:00] teardown: then the require succeeds i get the same error 'uninitialized costant NetAddr::CIDR'
[18:15:12] leftylink: &24>> end; p :okay; begin
[18:15:13] rubydoc: # => nil (https://carc.in/#/r/7efv)
[18:16:03] teardown: if i require 'netaddr' in an irb session, is there a way to reflectively get a list of methods from the library
[18:16:23] leftylink: if I wanted to get rid of the nil... maybe I'll use ||
[18:16:31] leftylink: &24>> end || :okay; begin
[18:16:32] rubydoc: # => :okay (https://carc.in/#/r/7efw)
[18:17:17] rubydoc: stderr: /home/carcin/carcin/sandboxes/ruby/sandboxed_ruby2.5.3: error while loading shared libraries:... check link for more (https://carc.in/#/r/7efx)
[18:18:24] SeepingN: not really a direct answer to your question teardown but: https://buildmedia.readthedocs.org/media/pdf/netaddr/latest/netaddr.pdf
[18:20:24] NL3limin4t0r: teardown: require resulting in a `false` value means that it's already required earlier.
[18:20:36] NL3limin4t0r: &24>> require 'set'
[18:20:37] rubydoc: # => true (https://carc.in/#/r/7efy)
[18:20:43] NL3limin4t0r: &24>> require 'set'; require 'set'
[18:20:44] rubydoc: # => false (https://carc.in/#/r/7efz)
[18:22:14] NL3limin4t0r: You can still use it. The return value only indicates if anything had to be loaded. Having something incorrectly installed would yield an exception.
[18:22:37] NL3limin4t0r: &24>> require 'some_gem_that_is_not_installed'
[18:22:38] rubydoc: stderr: /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file --... check link for more (https://carc.in/#/r/7eg0)
[18:25:48] greengriminal: has joined #ruby
[18:27:05] teardown: NL3limin4t0r: cool, thanks. how do i access netaddr's CIDR.create method
[18:27:32] chalkmonster: has joined #ruby
[18:29:10] teardown: i have never understood this, why cant i use the full namespace to call a method? NetAddr::CIDR.create('10.0.0.0/24') should work, as long as the library is required, correct?
[18:30:13] teardown: throughout documentation the full namespace is used like that but i have not been able call methods using that full namespace
[18:31:24] al2o3-cr: teardown: you're looking at documentation for netaddr 1.5.0, latest is 2.0.3 which doesn't have CIDR namespace.
[18:32:13] teardown: al2o3-cr: well that explains it. fucking googl
[18:32:17] NL3limin4t0r: ^ https://www.rubydoc.info/gems/netaddr/2.0.3
[18:32:32] teardown: thanks al2o3-cr and NL3limin4t0r
[18:32:41] al2o3-cr: teardown: np
[18:33:50] NL3limin4t0r: teardown: I mostly navigate to documentation from the gem page. https://rubygems.org/ search your gem and click on homepage or documentation.
[18:34:30] teardown: NL3limin4t0r: noted. i'll do the same from here on out.
[18:34:43] Swyper: has joined #ruby
[18:34:51] teardown: also, https://www.rubydoc.info/gems returns a 503
[18:35:07] teardown: i assume the community is aware
[18:35:11] cliluw: has joined #ruby
[18:36:30] NL3limin4t0r: I've had problems with rubydoc.info quite often where the documentation for certain gems fails to generate or the complete website lies flat for a few minutes. :-( Hopefully they fix their issues some day.
[18:37:51] teardown: NL3limin4t0r: yeah. at least it hasn't entirely disappeared, eh? (looking at you, ruby forge)
[18:38:34] bitwinery: has joined #ruby
[18:38:39] cd: has joined #ruby
[18:39:30] teardown: cool. thanks for the help
[18:42:50] cliluw: has joined #ruby
[18:45:25] fphilipe_: has joined #ruby
[18:56:21] smithascari: has joined #ruby
[19:01:09] ElFerna: has joined #ruby
[19:06:40] greengriminal: has joined #ruby
[19:07:35] Technodrome: has joined #ruby
[19:15:55] tdy: has joined #ruby
[19:23:40] regedit: has joined #ruby
[19:24:06] iNs: has joined #ruby
[19:31:49] ElFerna: has joined #ruby
[19:37:50] cow[moo]: has joined #ruby
[19:42:19] Swyper: has joined #ruby
[19:44:07] hutch: has joined #ruby
[19:49:40] chalkmonster: has joined #ruby
[19:50:23] jenrzzz: has joined #ruby
[19:54:18] hutch: has joined #ruby
[20:03:52] deepreds1: has joined #ruby
[20:08:51] LtHummus: has joined #ruby
[20:30:11] Swyper: has joined #ruby
[20:34:04] jenrzzz_: has joined #ruby
[20:46:32] ramfjord: has joined #ruby
[20:47:34] za1b1tsu: has joined #ruby
[20:48:04] nowhere_man: has joined #ruby
[20:59:34] fphilipe_: has joined #ruby
[21:00:35] Swyper: has joined #ruby
[21:01:12] Emmanuel_Chanel: has joined #ruby
[21:04:01] ur5us: has joined #ruby
[21:11:49] involans: has joined #ruby
[21:12:28] Eiam: has joined #ruby
[21:14:12] ur5us_: has joined #ruby
[21:16:25] fphilipe_: has joined #ruby
[21:31:47] s3nd1v0g1us: has joined #ruby
[21:34:49] ramfjord: has joined #ruby
[21:38:43] poontangmessiah: has joined #ruby
[21:46:19] ramfjord: has joined #ruby
[21:53:30] za1b1tsu: has joined #ruby
[21:56:17] ramfjord: has joined #ruby
[21:57:37] ellcs1: has joined #ruby
[22:00:52] chalkmonster: has joined #ruby
[22:09:12] mochiyoda: has joined #ruby
[22:12:02] brool: it looks like a regular javascript fetch() is not XHR according to Rack::Request#xhr? -- i guess i could remediate this by fetching a POST request with a key, but is there some other way i could make sure that requests from fetch API are detected as ajax requests?
[22:14:29] greengriminal: has joined #ruby
[22:14:49] yann-kaelig: has joined #ruby
[22:34:03] ramfjord: has joined #ruby
[22:39:22] jokke: has left #ruby: ("WeeChat 2.5")
[22:39:47] drale2k_: has joined #ruby
[23:01:38] jenrzzz: has joined #ruby
[23:06:01] Akuhcap: has joined #ruby
[23:06:42] Akuhcap: Hey id like to learn how to script in Ruby. Anyone know any goo resources that are somewhat up to date with newer versions?
[23:07:01] bougyman: have you ever "scripted" in any other language?
[23:07:10] Akuhcap: Very lightly in Python
[23:07:26] bougyman: I'd probably start with https://pine.fm/LearnToProgram/ then
[23:07:35] bougyman: it's a basic progamming lesson, but using ruby.
[23:10:35] Akuhcap: I'll use it, thank you
[23:15:06] ElFerna: has joined #ruby
[23:15:19] englishm: has joined #ruby
[23:17:12] x86sk: has joined #ruby
[23:17:25] fphilipe_: has joined #ruby
[23:17:52] elphe: has joined #ruby
[23:21:23] aphprentice__: has joined #ruby
[23:27:34] psmolen: has joined #ruby
[23:28:38] elphe: has joined #ruby
[23:30:07] englishm: has joined #ruby
[23:44:46] nowhere_man: has joined #ruby
[23:50:09] ramfjord: has joined #ruby