« Back to channel list

#ruby - 12 January 2019

« Back 1 day Forward 1 day »
[00:06:25] hutch: has joined #ruby
[00:07:34] Rich_Morin_: I had to resort to unpack('C*').select {|b| b < 128 }.pack('C*'), which seems a bit indirect...
[00:09:43] DarthGandalf: has joined #ruby
[00:10:39] al2o3-cr: Rich_Morin_: Have you tried using String#scrub ?
[00:12:32] al2o3-cr: &>> "foo\xffbar\xfebaz\xfd".scrub('')
[00:12:35] rubydoc: # => "foo\xFFbar\xFEbaz\xFD" (https://carc.in/#/r/5z6d)
[00:13:02] al2o3-cr: wtf, that works.
[00:13:35] Rich_Morin_: thanks, that looks promising. More generally, however, I wonder whether/why the regex engine doesn't have a way to deal with non-Unicode strings.
[00:14:10] al2o3-cr: &>> "foo\xffbar\xfebaz\xfd".force_encoding('utf-8').scrub('')
[00:14:11] rubydoc: # => "foobarbaz" (https://carc.in/#/r/5z6f)
[00:14:15] also_uplime: has joined #ruby
[00:14:52] duderonomy: has joined #ruby
[00:15:45] al2o3-cr: &>> "foo\xff".b.gsub /\xff/n, ''
[00:15:46] rubydoc: # => "foo" (https://carc.in/#/r/5z6n)
[00:15:58] sanscoeur: has joined #ruby
[00:16:25] saysjonathan: has joined #ruby
[00:17:24] al2o3-cr: encode to binary then use n modifier.
[00:20:49] al2o3-cr: why they don't mention that in the Regex docs i'm uncertain.
[00:21:12] al2o3-cr: nvm. they do ;)
[00:22:07] Rich_Morin_: Well, I'm glad to know about it. Meanwhile, scrub() seems to do everything I need.
[00:28:38] al2o3-cr: &>> "".encoding
[00:28:40] rubydoc: # => #<Encoding:US-ASCII> (https://carc.in/#/r/5z6s)
[00:29:00] Tempesta: has joined #ruby
[00:33:57] venmx: has joined #ruby
[00:39:01] jenrzzz: has joined #ruby
[00:39:27] rkazak: has joined #ruby
[01:04:05] jenrzzz: has joined #ruby
[01:06:17] Rich_Morin_: has joined #ruby
[01:06:55] Swyper: has joined #ruby
[01:06:56] Rich_Morin_: has joined #ruby
[01:07:41] orbyt_: has joined #ruby
[01:07:44] Rich_Morin_: has joined #ruby
[01:08:32] Rich_Morin_: has joined #ruby
[01:08:55] P1C0: has left #ruby: ()
[01:08:56] saysjonathan: has joined #ruby
[01:09:17] Rich_Morin_: has joined #ruby
[01:09:43] nowhere_man: has joined #ruby
[01:10:07] Rich_Morin_: has joined #ruby
[01:10:52] Rich_Morin_: has joined #ruby
[01:11:37] Rich_Morin_: has joined #ruby
[01:12:27] Rich_Morin_: has joined #ruby
[01:13:12] Rich_Morin_: has joined #ruby
[01:26:24] tdy: has joined #ruby
[01:45:37] Nicmavr: has joined #ruby
[02:03:02] drale2k_: has joined #ruby
[02:04:40] drale2k_: has joined #ruby
[02:06:26] saysjonathan: has joined #ruby
[02:08:29] r29v: has joined #ruby
[02:11:00] apparition: has joined #ruby
[02:15:34] SqREL: has joined #ruby
[02:31:58] Rich_Morin_: has joined #ruby
[02:38:09] evdubs: has joined #ruby
[02:44:05] hutch: has joined #ruby
[02:48:42] nowhere_man: has joined #ruby
[02:49:28] tdy: has joined #ruby
[02:57:01] orbyt_: has joined #ruby
[03:01:08] SqREL: has joined #ruby
[03:09:55] hutch: has joined #ruby
[03:18:24] saysjonathan: has joined #ruby
[03:36:00] tfitts: has joined #ruby
[03:36:19] wmoxam: has joined #ruby
[03:46:30] hutch: has joined #ruby
[03:47:00] \void: has joined #ruby
[03:52:15] kent\n: has joined #ruby
[03:54:24] Xiti: has joined #ruby
[03:55:04] orbyt_: has joined #ruby
[03:56:59] saysjonathan: has joined #ruby
[04:03:24] Azure: has joined #ruby
[04:09:05] braincrash: has joined #ruby
[04:15:22] hutch: has joined #ruby
[04:26:11] orbyt_: has joined #ruby
[04:31:51] tdy: has joined #ruby
[04:43:16] hutch: has joined #ruby
[04:44:40] tdy: has joined #ruby
[04:47:34] Puffball: has joined #ruby
[05:03:15] Rich_Morin_: has joined #ruby
[05:03:47] saysjonathan: has joined #ruby
[05:08:18] ziyadb: has joined #ruby
[05:18:11] _whitelogger: has joined #ruby
[05:19:47] rkazak: has joined #ruby
[05:34:50] vonfry: has joined #ruby
[05:42:01] tdy: has joined #ruby
[06:22:08] envex: has joined #ruby
[06:25:31] Rich_Morin__: has joined #ruby
[06:31:46] saysjonathan: has joined #ruby
[06:55:20] AJA4350: has joined #ruby
[06:59:55] duderonomy: has joined #ruby
[07:07:28] hutch: has joined #ruby
[07:09:46] dellavg_: has joined #ruby
[07:30:13] fcambus: has left #ruby: ()
[07:39:21] saysjonathan: has joined #ruby
[07:42:34] jinie_: has joined #ruby
[07:49:21] dinfuehr: has joined #ruby
[07:49:38] SqREL: has joined #ruby
[07:53:16] rippa: has joined #ruby
[07:55:52] dinfuehr: has joined #ruby
[08:01:12] dinfuehr: has joined #ruby
[08:07:37] SqREL: has joined #ruby
[08:19:25] sauvin: has joined #ruby
[08:21:04] Rich_Morin_: has joined #ruby
[08:21:56] Rich_Morin_: has joined #ruby
[08:22:39] Rich_Morin_: has joined #ruby
[08:23:26] Rich_Morin_: has joined #ruby
[08:24:16] Rich_Morin_: has joined #ruby
[08:25:04] Rich_Morin_: has joined #ruby
[08:25:49] Rich_Morin_: has joined #ruby
[08:43:06] saysjonathan: has joined #ruby
[08:48:20] maryo: has joined #ruby
[09:24:29] irdr: has joined #ruby
[09:31:20] conta: has joined #ruby
[09:31:56] Emmanuel_Chanel: has joined #ruby
[09:36:17] za1b1tsu: has joined #ruby
[09:48:24] saysjonathan: has joined #ruby
[10:04:56] reber: has joined #ruby
[10:06:33] baweaver: https://twitter.com/keystonelemur/status/1084027985672298501
[10:12:46] tbuehlmann: take my like
[10:13:20] baweaver: Could I make it more efficient with tokenization? Probably. Do I care? Not really at the moment.
[10:14:36] baweaver: Am I outing myself as an ex sys-admin yet? :P
[10:15:20] ur5us: has joined #ruby
[10:56:51] Dbugger: has joined #ruby
[10:56:57] saysjonathan: has joined #ruby
[11:14:23] gix: has joined #ruby
[11:15:06] duderonomy: has joined #ruby
[11:21:36] maryo: has joined #ruby
[11:22:43] Paraxial: has joined #ruby
[11:30:23] Paraxial: has joined #ruby
[11:37:51] catbusters: has joined #ruby
[11:43:19] uanl: has joined #ruby
[11:44:03] adzad_dadad4_: has joined #ruby
[11:49:10] gmcabrita: has joined #ruby
[11:49:37] drale2k_: has joined #ruby
[11:51:25] sputnik13: has joined #ruby
[11:54:13] mikecmpbll: has joined #ruby
[11:56:11] dinfuehr: has joined #ruby
[12:01:14] gmcabrita: has joined #ruby
[12:02:24] Some-body_: has joined #ruby
[12:04:37] saysjonathan: has joined #ruby
[12:06:51] Hess: has joined #ruby
[12:09:20] ellcs: has joined #ruby
[12:11:17] za1b1tsu: has joined #ruby
[12:25:57] Nicmavr: has joined #ruby
[12:46:14] lxsameer: has joined #ruby
[12:48:29] lucasb: has joined #ruby
[13:07:23] maryo: has joined #ruby
[13:11:49] saysjonathan: has joined #ruby
[13:20:08] olspookishmagus: has joined #ruby
[13:26:25] Swyper: has joined #ruby
[13:39:12] memofun: has joined #ruby
[13:39:37] drale2k_: has joined #ruby
[13:52:06] Swyper: has joined #ruby
[13:56:52] drale2k_: has joined #ruby
[14:18:18] houhoulis: has joined #ruby
[14:33:16] saysjonathan: has joined #ruby
[14:54:27] saysjonathan: has joined #ruby
[14:59:08] Swyper: has joined #ruby
[15:24:55] AJA4350: has joined #ruby
[15:32:19] conta1: has joined #ruby
[15:35:47] yebyen: thanks phaul for that explanation, I just re-read it all and that really demystified it for me
[15:35:58] RougeR: has joined #ruby
[15:36:05] yebyen: any_instance_of(Object) really is way more nebulous than it needed to be
[15:36:44] yebyen: expect(subject).to receive would work just as well
[15:37:20] yebyen: i'm just not accustomed to method names starting with capital letters
[15:38:00] yebyen: that's a go convention i could've recognized though, i'm pretty sure... i don't use go much, but every function exposed by a module has to be capitalized afaik
[15:38:07] yebyen: that's probably accidental
[15:38:22] yebyen: but I get it now, it's not ClassName()
[15:38:23] phaul: yebyen: np. I was thinking about this too, it was an interesting problem to crack
[15:38:38] yebyen: it's (implied self) .Method()
[15:38:53] phaul: also RSpec is really to blame for not handling the error correctly.
[15:39:19] yebyen: there is probably a bug in there resulting in that stack too deep infinite recursion
[15:39:35] yebyen: but could also be, if i went down the rabbit hole i'd find an implementation detail of rspec that explains why it has to be like this
[15:40:13] yebyen: i bet i find an issue if i search for it that says "don't intercept methods on instance of Kernel, ya big dummy"
[15:40:54] yebyen: or maybe i'm the first person to think of doing that... yeah no
[15:44:52] ianfleeton: has joined #ruby
[16:10:48] arup_r: has joined #ruby
[16:14:00] dinfuehr: has joined #ruby
[16:14:41] ellcs: has joined #ruby
[16:22:30] dinfuehr: has joined #ruby
[16:26:17] hiroaki: has joined #ruby
[16:30:35] dinfuehr: has joined #ruby
[16:34:39] KeyJoo: has joined #ruby
[16:53:06] segy: has joined #ruby
[16:58:09] hiroaki: has joined #ruby
[16:58:35] drale2k_: has joined #ruby
[16:58:53] conta: has joined #ruby
[17:23:54] Dbugger: has joined #ruby
[17:30:23] SuperLag: has joined #ruby
[17:33:31] SuperLag: has joined #ruby
[17:37:24] FrostCandy: has joined #ruby
[17:39:25] FrostCandy: im using a gem called like this gem::method.where(state: 'ny') and if I type it like that it works, but I have a hash called parameters and add state like this parameters[:state] = 'ga' then I pass the hash but it doesnt work. How can I pass a hash properly to the gem method?
[17:40:07] FrostCandy: I tried turning the hash into a string, so the variable holds a string like state: 'ny', but that doesnt work because I assume state: isn't sent as a symbol?
[17:40:36] FrostCandy: I guess what I need to do is turn my has into a set of symbols and strings
[17:44:36] Aqo: has joined #ruby
[17:46:12] ianfleeton: FrostCandy, does parameters = {}; parameters[:state] = 'ga'; gem::method.where(parameters); work?
[17:46:24] Aqo: has joined #ruby
[17:53:11] dviola: has joined #ruby
[17:53:35] FrostCandy: ianfleeton: nope, thta's essentiall what I was doing. so far i tied sending parameters, pareameters.to_json, parmeters.to_s and even running it through a loop to create state: 'ga'
[17:53:48] FrostCandy: only thing that works is by manually typeing the symbol and value so far :(
[17:54:17] FrostCandy: maybe pareameters is a reserved variable heh i'll try to change that variable name.
[17:56:04] Iambchop: FrostCandy: "it doesnt work" means what? it would be helpful if you could provide the code, expected output, actual output, and any error messages: https://dpaste.de
[17:56:42] FrostCandy: Iambchop: omg it was the word parameters lol, i changed it to pvar = {} and so on, works fine
[17:56:54] FrostCandy: maybe it's a ruby on rails issue not ruby
[18:00:59] phaul: where is gem::method coming from? who defined it? don't override :method
[18:01:05] phaul: &ri method
[18:01:05] rubydoc: https://ruby-doc.org/core-2.6/Object.html#method-i-method
[18:02:03] phaul: and don't use :: for sending messages
[18:03:17] FrostCandy: phaul dont use double colons here? or you mean for calling the gem and method?
[18:04:50] phaul: I am confused by your code tbh. What is gem, what is its class, is method a method of gem? Is it redefinition of Object#method ?
[18:06:18] Iambchop: FrostCandy: https://github.com/rubocop-hq/ruby-style-guide/blob/master/README.md#syntax " Use :: only to reference constants...Do not use :: for regular method invocation"
[18:10:43] dviola: has joined #ruby
[18:11:09] FastJack: has joined #ruby
[18:12:26] FrostCandy: Iambchop: ok thanks, we're using an old version of ruby so I don't know if things were diff back when they designed it, but good to know.
[18:14:03] Iambchop: What gem and what version of ruby/rails?
[18:14:56] Rich_Morin_: has joined #ruby
[18:16:02] FrostCandy: OpenStates is the gem and ruby 2.1
[18:16:11] maryo: has joined #ruby
[18:18:54] conta: has joined #ruby
[18:19:23] cd: has joined #ruby
[18:20:12] hiroaki: has joined #ruby
[18:22:57] Iambchop: Okay, some confusion on terminology: "OpenStates::Bill.where(state: 'tx', q: 'taxi')" OpenStates is a module, OpenStates::Bill is a class
[18:24:29] Iambchop: depending where in the rails stack you are calling this from "parameters" is a defined method, that could be where you got tripped up there
[18:25:44] fuzzface: has joined #ruby
[18:26:36] Iambchop: https://github.com/WideEyeLabs/ruby-openstates/blob/master/lib/openstates/models/bill.rb
[18:27:23] Iambchop: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/http/parameters.rb#L50
[18:28:34] phaul: that explains what happens with the parameters name, but does not explain what the heck gem::method is
[18:29:10] phaul: which is why I asked what gem was, how it was defined... ^^
[18:31:32] phaul: one way i can imagine it being defined is module X; def self.method; OpenStates::Bill.new; end; end; gem = X; X::method.where ...
[18:33:14] phaul: or gem::method.where as gem is X
[18:33:15] Rich_Morin_: has joined #ruby
[18:33:54] Rich_Morin_: has joined #ruby
[18:34:42] Rich_Morin_: has joined #ruby
[18:35:29] Rich_Morin_: has joined #ruby
[18:36:17] Rich_Morin_: has joined #ruby
[18:37:01] Rich_Morin_: has joined #ruby
[18:37:49] Rich_Morin_: has joined #ruby
[18:45:19] tdy: has joined #ruby
[18:56:51] phaul: we will never know..
[18:57:59] hiroaki: has joined #ruby
[19:00:43] hutch: has joined #ruby
[19:05:45] tiff: has joined #ruby
[19:08:54] Swyper: has joined #ruby
[19:25:30] FrostCandy: phaul: it was response = OpenStates::Legislator.where(state: 'ga') So I guess that is the Openstates Modual, the Legilator class and the where method? Yup terminology problem on my end.
[19:27:42] orbyt_: has joined #ruby
[19:35:38] duderonomy: has joined #ruby
[19:36:33] AJA4351: has joined #ruby
[19:39:26] phaul: ah, makes sense. so the code we saw wasn't the actual code. ok nm
[19:44:32] FrostCandy: phaul: ya, my bad
[19:49:12] TheBloke: has joined #ruby
[19:53:31] profetes_: has joined #ruby
[19:53:42] rindolf: has joined #ruby
[19:59:37] rindolf: al2o3-cr: hi, sup?
[20:00:09] hutch: has joined #ruby
[20:02:59] rindolf: al2o3-cr: ah
[20:03:11] rindolf: al2o3-cr: where are you from?
[20:09:24] AJA4351: has joined #ruby
[20:10:28] rindolf: al2o3-cr: heh
[20:10:28] phaul: https://lunarpedia.org/index.php?title=Lunar_Aluminium_Production
[20:11:16] planigan: has joined #ruby
[20:18:11] hutch: has joined #ruby
[20:26:07] dviola: has joined #ruby
[20:44:04] Rich_Morin_: has joined #ruby
[20:57:12] _whitelogger: has joined #ruby
[20:59:32] Azure: has joined #ruby
[21:11:06] AJA4351: has joined #ruby
[21:21:51] dviola: has joined #ruby
[21:35:55] cow[moo]: has joined #ruby
[21:49:37] catbusters: has joined #ruby
[21:52:56] drale2k_: has joined #ruby
[22:04:56] JasonO: has joined #ruby
[22:06:35] orbyt_: has joined #ruby
[22:19:51] AJA4351: has joined #ruby
[22:30:01] RiPuk: has joined #ruby
[22:32:07] hutch: has joined #ruby
[22:34:43] baweaver: I made a new thing: https://github.com/baweaver/globs
[22:35:00] baweaver: It does this: Globs.expand("test.{a, b}.{1, 2}.com") # => ["test.a.1.com", "test.a.2.com", "test.b.1.com", "test.b.2.com"]
[22:39:00] VladGh: has joined #ruby
[22:43:00] canton7: baweaver, looking at the code (haven't tried to run it), looks like it will give the wrong answers if you have ',' or '..' outside of the { }? Also no support for having a literal { or }?
[22:43:27] baweaver: Nope. It's for a very simple usecase so I haven't bothered with that.
[22:43:58] baweaver: Mostly domain name expansions
[22:44:27] canton7: might want to put some limitations in the readme then? (the string being expanded can't contain the sequences '{', '}', ',', '..'
[22:46:09] canton7: (also we seem to be going the way of node.js, with 5-line methods being turned into their own packages, complete with code of conduct)
[22:46:20] baweaver: Playing with StringScanner at the moment so it'll likely be irrelevant
[22:46:52] baweaver: I don't see anything particularly wrong with having a well defined usecase being bundled into a library.
[22:47:04] baweaver: Nor do I see issues with codes of conduct.
[22:48:11] canton7: well, except that you end up here: https://www.theregister.co.uk/2018/11/26/npm_repo_bitcoin_stealer/
[22:49:21] conta: has joined #ruby
[22:49:25] baweaver: That's already an inherit risk with any package distribution system, whether or not there are hundreds of short libraries.
[22:49:58] baweaver: As to how to fix that, that's quite a hard problem.
[22:50:11] canton7: yes, but the probability increases with the number of packages in your dependency tree
[22:50:53] canton7: the solution is "don't use a package to provide something you could implement by adding a file or two to your project"
[22:52:04] baweaver: It's "a" solution, but taken to what rigor?
[22:52:29] baweaver: Should you reimplement everything and burn through a ton of engineer time?
[22:52:44] baweaver: or only packages deemed to be too small to care?
[22:52:44] canton7: of course there's a tradeoff
[22:53:01] canton7: but writing 5 lines of code yourself isn't "burning through a ton of engineer time"
[22:53:20] tdy: has joined #ruby
[22:53:24] baweaver: You make a lot of assumptions with that statement
[22:53:27] canton7: and really you need to be checking your dependencies, which burns its own engineer time
[22:53:40] hutch: has joined #ruby
[22:53:58] baweaver: Primarily that lines of code is a metric directly correlated to time it would have taken to write.
[22:54:01] canton7: (license, known issues, whether it's maintained, etc)
[22:54:16] baweaver: Not necessarily. Some incredibly succinct code takes substantially longer to write.
[22:54:29] canton7: of course, I was taking an extreme example
[22:54:46] baweaver: Most everything in engineering is a case of nuance
[22:55:03] al2o3-cr: bash: printf "%0s\n" "test."{a..f}.{1..6}".com"
[22:55:04] baweaver: which is, admittedly, a headache all its own.
[22:58:25] al2o3-cr: yeah, `printf "%s\n" test.{a..f}.{1..6}.com`
[22:59:09] al2o3-cr: now, how to implement brace expansion.
[23:02:02] baweaver: Ruby has built in printf support doesn't it?
[23:03:35] al2o3-cr: baweaver: sure.
[23:03:58] baweaver: May be able to leverage that I'd think
[23:04:02] baweaver: Though I may be having a good deal of fun with StringScanner at the moment.
[23:05:32] Nicmavr: has joined #ruby
[23:07:15] kenichi: has joined #ruby
[23:10:49] AJA4351: has joined #ruby
[23:11:21] SCHAPiE: has joined #ruby
[23:14:43] baweaver: hrm, not getting Ruby's printf to do it, probably because the shell expanded the globs
[23:15:58] al2o3-cr: baweaver: you won't, ruby doesn't have brace expansion :P
[23:17:07] baweaver: It does now :D
[23:17:13] baweaver: Cleaning it up with StringScanner
[23:17:49] al2o3-cr: baweaver: cool, i'd like to see this ;)
[23:25:45] al2o3-cr: &>> (?a..?f).zip(1..6).map { |x| "test.#{x.join('.')}.com" }
[23:25:49] rubydoc: # => ["test.a.1.com", "test.b.2.com", "test.c.3.com", "test.d.4.com", "test.e.5.com", "test.f.6.com"] (https://carc.in/#/r/5zj7)
[23:27:03] phaul: how about enumerable / enumerator #* for cartesian product?
[23:27:03] al2o3-cr: &>> [*?a..?f].product([*1..6]).map { |x| "test.#{x.join('.')}.com" }
[23:27:04] rubydoc: # => ["test.a.1.com", "test.a.2.com", "test.a.3.com", "test.a.4.com", "test.a.5.com", "test.a.6.com", "te ...check link for more (https://carc.in/#/r/5zj8)
[23:27:40] phaul: ah cool :) it exists
[23:28:20] phaul: &list product
[23:28:20] rubydoc: Array#product
[23:29:20] phaul: do you think it would be a good companion to the new Enumerator#+ Enumerable#chain?
[23:30:18] P1C0: has joined #ruby
[23:32:21] al2o3-cr: it could work i suppose. could cause confusion.
[23:34:04] clemens3: has joined #ruby
[23:34:31] Rich_Morin_: has joined #ruby
[23:35:44] al2o3-cr: &>> (?a..?f).flat_map { |x| (1..6).map { |y| "test.#{x}.#{y}.com" } }
[23:35:48] rubydoc: # => ["test.a.1.com", "test.a.2.com", "test.a.3.com", "test.a.4.com", "test.a.5.com", "test.a.6.com", "te ...check link for more (https://carc.in/#/r/5zjd)
[23:37:00] baweaver: Most of the issue is entirely in doing n-level globs
[23:37:10] baweaver: could be one, two, five, ten
[23:37:27] al2o3-cr: then n level loops haha :)
[23:38:42] al2o3-cr: baweaver: i see what your trying to implement :)
[23:39:10] baweaver: reduce is real danged useful for that type of thing
[23:39:38] canton7: baweaver, Array#product
[23:39:44] al2o3-cr: of course. (but inject) hehe
[23:40:17] al2o3-cr: but yeay what canton7 said.
[23:40:20] johnny56: has joined #ruby
[23:40:51] baweaver: It can take n-products, sure. The fun part then is extracting the glob areas.
[23:42:06] canton7: you can regex that! /((?:|[^\\])(?:\\\\)*){(.+[^\\](?:\\\\)*)}/
[23:42:26] lupine: just because you can, doesn't mean you should
[23:42:33] canton7: but, I tend to just go back to a token-based parser with a bit of state to say "in escape" at that point...
[23:42:51] baweaver: StringScanner looks to get close to that
[23:42:59] chouhoulis: has joined #ruby
[23:42:59] baweaver: still figuring out how to make that work, but about got it
[23:43:03] canton7: yeah, you could quite happily use StringScanner for that
[23:43:05] baweaver: Need to go back to writing though
[23:43:37] canton7: though I tend to just loop through character by character
[23:44:08] baweaver: Could. StringScanner just makes it a bit nicer with scan_until and friends
[23:44:10] canton7: oops, /((?:^|]^\\].....
[23:44:40] canton7: but, you'll want to be processing your input to remove escapes, which means you want to be copying non-escaped input chars to your output anyway
[23:44:55] canton7: but yeah, not too much difference
[23:45:16] baweaver: Notedly I'm not really experienced in token parsing
[23:45:29] baweaver: Haven't really tried it before, so a bit of fun
[23:47:27] baweaver: Though I'll probably not go too far down this rabbit hole, more interested in making a nicer API around TracePoint
[23:48:30] al2o3-cr: TracePoints API is pretty sound tbh.
[23:48:31] AJA4351: has joined #ruby
[23:48:49] baweaver: It's super powerful, but there's a lot to it.
[23:49:01] baweaver: So the idea there was a pared down API to it for more beginners
[23:49:58] al2o3-cr: it pretty simple enough compared to set_trace
[23:50:36] baweaver: TracePoint.watch_method(:name) for instance
[23:50:53] baweaver: things like that to not require a lot of conditional branches when creating one
[23:51:25] sagax: has joined #ruby
[23:51:39] al2o3-cr: baweaver: C method Ruby method how to differenciate?
[23:51:59] baweaver: very carefully
[23:52:02] baweaver: but yeah, that was one of the concerns
[23:52:19] orbyt_: has joined #ruby
[23:52:35] baweaver: Most of it requires me to spend a lot of time thinking about it and writing down ideas
[23:52:44] al2o3-cr: A lot of consideration as been put into TracePoint.
[23:52:52] baweaver: currently still in the thinking stage, so most ideas aren't well formed quite yet.
[23:53:07] baweaver: It's insanely powerful, no doubt
[23:53:21] baweaver: but too much power can lead to indecision or difficulty in learning or use
[23:53:38] al2o3-cr: baweaver: i see your intention though.
[23:54:01] baweaver: but yeah, still definitely in the "I wonder if..." stage
[23:54:17] baweaver: Not everything I dream up is necessarily a good idea :P
[23:54:32] baweaver: hence mentioning it on occasion to see _how bad_ it might be
[23:54:56] al2o3-cr: haha, most of your stuff is good though!
[23:55:05] baweaver: Gotta balance the scales :D
[23:55:52] al2o3-cr: bacon butty or an orange, i'd take the bacon butty :P
[23:56:08] baweaver: But yeah, like with product and everything else there's a non-trivial chance there's a better way to do something I hadn't considered yet
[23:56:21] baweaver: I just have fun playing with it in the mean time
[23:56:28] baweaver: gotta pre-warm that cache
[23:57:37] al2o3-cr: &18>> "foo"
[23:57:38] rubydoc: I'm terribly sorry, I could not evaluate your code because of an error: StandardError:Couldn't match lang/mode
[23:57:55] al2o3-cr: &1.8>> "foo"
[23:58:09] phaul: 2.0 is the first one it understands
[23:58:21] phaul: carc.in is the limiting factor
[23:58:47] al2o3-cr: hint hint to jhass to upgrade to 2.6 ;)
[23:59:49] ruby[bot]: al2o3-cr: # => "foo" (https://eval.in/1077092)