Activity Graph

Page 1 of 259 | Next »


[04:40:53] baweaver: Been on vacation for a bit eam?



[00:51:11] baweaver: havenwood: want a challenge?
[00:51:43] baweaver: Make an indiscriminate vivified hash
[00:51:54] baweaver: i.e. if it gets an Integer it uses an Array instead
[00:57:54] baweaver: havenwood: Now that's a fun question
[01:19:42] baweaver: havenwood: a thought: Array-like methods applied to a wrapper class that intercepts and changes its render on iteration
[02:14:51] baweaver: teardown: Sets exist in Ruby
[02:15:05] baweaver: that, and hashes at least have some set operations
[02:32:55] baweaver: havenwood: Is something like this in the bug tracker yet?:
[02:32:57] baweaver: can't find it.
[03:34:24] baweaver: weilawei: *gasps*
[03:34:29] baweaver: You didn't use prepend
[03:34:55] baweaver: that would make it more fun!
[03:34:59] baweaver: ACTION is a known bad influence
[03:35:02] baweaver: just ask havenwood
[03:35:50] baweaver: weilawei: This might help if you want examples:
[03:38:15] baweaver: There was a gem somewhere which allows for temporary inclusion / prepending
[03:38:20] baweaver: need to find where that was
[06:14:55] baweaver: Welcome back havenwood \
[06:14:58] baweaver: Any luck with the nightmare challenge?
[06:16:11] baweaver: Still trying to figure something out myself
[06:18:34] baweaver: The only thing I can figure is wrapping it
[06:38:11] baweaver: I saw Zverok


[07:22:17] baweaver: leftylink: That's why past me started writing documentation for everything
[07:22:24] baweaver: Then also took up writing notes and design documents
[07:22:44] baweaver: Context is king, and most of the time I know what the code does but not why I made a certain assumption
[07:23:17] baweaver: It might be some giant pitfall or bug I don't remember, and changing it to what makes more sense could be real dangerous


[02:31:19] baweaver: The lemurs are headed back to RubyConf this year:
[05:32:42] baweaver: is really handy for that
[05:33:37] baweaver: What have you tried?
[05:35:37] baweaver: How much regex do you know?
[05:37:37] baweaver: and how much of it do you currently know?
[05:37:37] baweaver: What resources have you used to help you learn regex?
[05:38:37] baweaver: We're here to teach
[05:39:04] baweaver: and learning some of the fundamentals or expanding on them will help you more in the long run
[05:39:11] baweaver: hence asking how much you already know
[06:04:47] baweaver: File.stat(file_name).mode
[06:04:52] baweaver: or something like that
[06:05:37] baweaver: thadtheman ^
[06:05:37] baweaver:
[06:07:41] baweaver: Took me a second to find it, thought it'd be File.something or Dir.something
[06:10:18] baweaver: So I did what I should have done and just googled the danged thing
[06:10:22] baweaver: instincts kill sometimes XD


[02:40:24] baweaver: Exuma: protected, like mentioned there, is the best option.
[02:41:07] baweaver: Yeah, same when I saw it.
[02:41:37] baweaver: If included it'd be at an instance level
[02:41:45] baweaver: If extended, a class level.
[02:42:42] baweaver: Threadsafe would depend on other variables
[02:43:07] baweaver: If you make a race condition, nothing will stop that from being thread unsafe.
[02:45:07] baweaver: Just be careful not to get too happy with GoF patterns in Ruby
[02:45:38] baweaver: Gang of Four
[02:45:49] baweaver: People who've done too much Java love patterns
[02:46:12] baweaver: Service, Proxy, Factory, Abstract, Singleton, Command, etc.
[02:46:33] baweaver: Makes code stupidly hard to follow
[08:24:25] baweaver: Intelo - What have you tried?
[08:24:50] baweaver: what's your knowledge level of APIs, REST, and JSON?
[08:25:17] baweaver: It's all just HTTP requests
[08:26:04] baweaver: which means any HTTP method for Ruby works in Rails.
[08:26:04] baweaver: Remember, RoR is just Ruby
[08:26:07] baweaver: That said, I would consider something like Typhoeus.
[08:26:13] baweaver: The API is nicer to use.
[08:26:20] baweaver: havenwood: oi
[08:26:26] baweaver: Why are we still up?
[08:27:07] baweaver: API could refer to an HTTP API, or it could refer to the code's API
[08:27:24] baweaver: Yeah, which I never really liked
[08:28:04] baweaver: or do you think that's a lost cause havenwood?
[08:28:04] baweaver: I kinda wonder if we should try and coax core into adopting another HTTP standard in 3.x
[08:29:25] baweaver: require 'json'
[08:29:36] baweaver: JSON.parse(whatever_the_response_was)
[08:36:34] baweaver: Green looks like pure Ruby
[08:36:48] baweaver: Yellow is using extensions with libcurl, so faster
[08:37:17] baweaver: Last one was either adapters (supports multiple formats) or excon? Not sure.


[06:43:32] baweaver: !connection oetjenj



[18:22:56] baweaver: ohai banisterfiend
[18:25:14] baweaver: I run Ruby things at $WORK now
[18:25:24] baweaver: Also lemur talks, lots of lemur talks
[18:26:14] baweaver: Need to get better at those two later.
[18:26:31] baweaver: Mostly for writing extensions and trying to contribute to core
[18:26:43] baweaver: Aren't we all talking via kernel extension though?


[00:56:13] baweaver: *.net *.split
[01:14:34] baweaver: has joined #RubyonRails-offtopic
[01:14:36] baweaver: has joined #RubyOnRails
[01:14:37] baweaver: has joined #ruby-offtopic
[01:14:40] baweaver: has joined #logga
[01:14:42] baweaver: has joined #ruby
[01:14:43] baweaver: has joined #elixir-lang


[22:59:39] baweaver: I should really really really know better by now.
[22:59:39] baweaver:


[06:13:16] baweaver: This one covers using prepend for decoration.
[06:13:16] baweaver: Part Three on Decorating Ruby is out:


[04:35:47] baweaver: Put up a JS article for fun:
[07:39:05] baweaver: Nesting modules
[07:40:31] baweaver: Do you mean for importing specific _parts_ of a module like Javascript?
[07:40:55] baweaver: import { x, y } from z?
[07:41:18] baweaver: There's no way around that in Ruby.
[07:42:18] baweaver: or, more accurately, the trouble one would have to go through to make it as such would be far beyond overkill and would be very slow to work with.
[07:42:30] baweaver: Rails does something similar for constant loading
[07:42:50] baweaver: Imposing your will upon a language is a poor way to get started in it
[07:43:23] baweaver: What you think to be common sense and necessity may very well make no sense to people who work in the language frequently
[07:43:36] baweaver: Does that make them wrong? Does that make you wrong?
[07:43:48] baweaver: Not necessarily in either case.
[07:45:06] baweaver: Zeitwork was the recent solution
[07:45:40] baweaver:
[07:47:04] baweaver: Late here, headed to bed.


[05:58:17] baweaver: New article out on method decoration in Ruby:


[18:21:40] baweaver: Rails 6.0.0 has now been released:
[20:22:15] baweaver: Rails 6 was just released:
[21:01:57] baweaver: What a what now?


[19:34:46] baweaver: ixti: Doesn't really give us much to go on
[19:35:24] baweaver: The first step to debugging is reproduction
[19:40:35] baweaver: is preferred, less ads and shenanigans


[21:25:37] baweaver: !spam EDMhotdog


[19:47:30] baweaver: `compact` probably then,
[19:48:26] baweaver: Was trying to remember if that was 2.7
[19:48:49] baweaver: There's a lot in that one
[19:49:05] baweaver: To be fair, 2.7 isn't out yet


[22:23:54] baweaver: bougyman: be nice.
[22:24:09] baweaver: Instead, ask mynameisdebian for more details that help clarify the question
[22:24:47] baweaver: Such as what the script is, what code it has, if they've tested where the bottleneck is..


[19:04:41] baweaver: I'm still doing it.
[22:10:45] baweaver: Going to be giving a keynote at Bay Bridge Ruby Conf in September:


[05:28:01] baweaver: If anyone wants to see how an illustrated talk of mine is made:


[21:23:24] baweaver:
[21:23:24] baweaver: "Tales of the Ruby Grimoire - The Storybook Edition" is now complete! Enjoy this text version of my latest conference talk.


[14:04:51] baweaver: rapha There are new Ruby books coming out.
[14:05:04] baweaver: Including a very interesting one in 2020 :)
[14:54:46] baweaver: They need to appreciate the majestic oration that is a lemur talk to its fullest
[15:00:46] baweaver: Revel in my majesty adam12.
[15:06:04] baweaver: havenwood: ^


[18:36:31] baweaver: mwlang: preparing another lemur talk
[18:36:35] baweaver: so rather busy with that.
[20:08:39] baweaver: &>> require 'set'; class String; TRUTHY ='true', 't') def to_bool; TRUTHY.include?(self) end; end; 'true'.to_bool
[20:08:50] baweaver: &>> require 'set'; class String; TRUTHY ='true', 't'); def to_bool; TRUTHY.include?(self) end; end; 'true'.to_bool
[20:09:07] baweaver: &>> require 'set'; class String; TRUTHY =['true', 't']); def to_bool; TRUTHY.include?(self) end; end; 'true'.to_bool
[20:09:10] baweaver: There we go
[20:09:29] baweaver: Really tempted to try and get that into stdlib
[20:09:42] baweaver: Though it'd start a crap storm around 0.to_bool
[20:09:48] baweaver: especially implicits


[07:45:09] baweaver: So begins "The Tales of the Ruby Grimoire" -
[08:46:24] baweaver:
[08:46:24] baweaver: leftylink: Xf was a play at it
[08:54:27] baweaver: It's also stupidly simple amusingly in implementation
[08:55:15] baweaver: I may have to add a new type that remembers paths it found things at.
[08:56:57] baweaver: Ah right, it's 2am, sleepy time


[20:04:44] baweaver: havenwood: what is that monstrosity of a regex?
[20:05:12] baweaver: Oh hey, rubybot is alive
[20:05:25] baweaver: Well, "alive"



[21:24:16] baweaver: What does puts return
[21:24:25] baweaver: &>> puts "something"
[21:24:37] baweaver: Give you a hint, it's actually nil
[21:24:53] baweaver: &>> (puts "something").nil?
[21:25:03] baweaver: of course, output is cropped...
[21:26:45] baweaver: answering by asking
[21:26:56] baweaver: `Kernel#puts` returns nil.[
[21:27:12] baweaver: Blocks like count will end up counting nil
[21:28:26] baweaver: 1. puts returns nil
[21:28:40] baweaver: 2. That means the output of the equation is now nil
[21:28:53] baweaver: puts(x % 2 == 0) # => nil
[21:29:38] baweaver: It does do it, but the return value of that block is nil
[21:29:40] baweaver: puts only outputs it to the screen and returns back nil to the program
[21:30:18] baweaver: Remove the puts to see for yourself
[21:53:10] baweaver:


[22:21:32] baweaver: You want to use a block for those
[22:21:56] baweaver: Otherwise every default value is that hash
[22:21:57] baweaver: the same hash in fact
[22:21:58] baweaver: { |i| {} }
[22:23:59] baweaver: In your example it's using literally the same hash
[22:24:10] baweaver: The reason it works with things like 0 is because they cannot be mutated
[22:24:21] baweaver: Try it with a string or another array or an object


[04:23:48] baweaver: Here we go again:


[19:22:42] baweaver: Well this one took off like a rocket.
[19:22:42] baweaver:


[06:47:55] baweaver: Going to do a quick test drawing over on to test the setup before tomorrow's marathon. Starting in a minute.


[17:59:45] baweaver: havenwood / retromode: why not just use slices?
[18:00:10] baweaver: list[0..(index + 1)].each_with_index ...
[18:06:17] baweaver: or first, or several other bits
[18:06:37] baweaver: Ah, also havenwood, TIL: [1,2].first(1)
[18:06:39] baweaver: &>> [1,2].first(1)
[18:17:24] baweaver: matthewd: So any idea when Rails 6 hits officially?


[17:56:38] baweaver: Four straight hours of lemur art. Will likely release time-lapses later.
[17:56:38] baweaver:
[17:56:38] baweaver: Going to be livestreaming the process of creating a lemur talk:


[02:09:47] baweaver: s the error say?
[02:10:00] baweaver: alias is a reserved word
[02:10:11] baweaver: Also that regex will be literally alias
[02:10:20] baweaver: You can also make that a lot faster
[02:10:44] baweaver: aliases = Regexp.union([array, of, regexes])
[02:10:57] baweaver: ines=IO.readlines(dbfile).grep(aliases)
[02:11:34] baweaver: If you did a union on it
[02:11:34] baweaver: grep works with === so it can use regex
[02:11:39] baweaver: Regexp.union(array)
[02:12:01] baweaver: &>> Regexp.union([/a/, /b/, /c/])
[02:12:15] baweaver: &>> Regexp.union([/a/, /b/, /c/]).match 'a'
[04:22:07] baweaver: polysics: how so?
[04:23:36] baweaver: Hashes, possibly
[04:25:09] baweaver: So you need an arbitrarily deep structure of events?
[04:25:50] baweaver: Just make a module that wraps a set of constants
[04:27:01] baweaver: class Something; module GroupA; CONSTS
[04:27:33] baweaver: Hash keys could be anything


[17:18:05] baweaver: ACTION wanders in
[17:21:52] baweaver: ACTION is on vacation
[20:13:54] baweaver: chalkmonster: Have you seen the RailsConf one yet?
[20:14:02] baweaver: That one is an equal measure of chaos
[20:14:22] baweaver: The same talk was given at RubyConf (as rubyHack) so not much point in doubling back to that one
[20:15:46] baweaver:


[01:51:46] baweaver:
[01:51:46] baweaver: My thoughts on the new pipeline operator:


[03:28:32] baweaver: sevenseacat - guess what I got?
[03:28:50] baweaver:
[03:33:37] baweaver: Managed to find it on MechMarket for a pretty good price.
[03:33:57] baweaver: Decided to give it a whirl since it was made on an ALPS64 instead of needing a whole ton of conversion kits
[03:34:23] baweaver: 170 with the AEKII caps
[03:34:24] baweaver: Kinda feels like a steal TBH
[03:34:41] baweaver: But so far the board looks to be in good shape except for one key needing a spring swap that they'd mentioned in the trade
[03:34:53] baweaver: But it still types, just the 3 is a bit stiffer.
[03:43:22] baweaver: sevenseacat: Don't suppose you know about layer switching on a TMK firmware?
[03:44:00] baweaver: Debating if I want to remap it with QMK and just hose the right alt for it


[07:39:45] baweaver: so 0 doesn't really do anything, it's "empty"
[07:40:29] baweaver: + is how you join numbers together to get a new number
[07:40:53] baweaver: Those two properties are called Identity (empty) and Closure (binary operation to join, returns same type)
[07:41:20] baweaver: Add one more property, Associativity, and you have a Monoid. Associativity is being able to group them as long as the order stays the same
[07:41:39] baweaver: a + b + c == (a + b) + c == a + (b + c)
[07:42:29] baweaver: So Integers with the operation + behave like a Monoid
[07:42:30] baweaver: Mono - one, oid - like
[07:42:35] baweaver: Like one, or in other words, reducible
[07:43:10] baweaver: Granted that Integer addition has a few more properties to it that make it into something entirely different called an Abelian Group
[07:43:25] baweaver: Inversion - any operation can be inverted, like + 1 by + -1
[07:43:47] baweaver: Commutativity - You can combine elements in any order and get the same result
[07:45:57] baweaver: Monoids are super common
[07:46:29] baweaver: Mostly recognizing patterns. If data behaves a certain way we can work with it in predefined methods
[07:52:56] baweaver: Abstractions take a while to really get
[07:54:29] baweaver: dminuoso is a better source on that
[07:54:39] baweaver: though the answer is probably playing with Haskell for a bit